[poppler] 2 commits - configure.ac utils/pdfseparate.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Mon Jul 31 17:45:56 UTC 2017
configure.ac | 32 ++++++++++++++++++++++++++------
utils/pdfseparate.cc | 1 +
2 files changed, 27 insertions(+), 6 deletions(-)
New commits:
commit f55d6a64dd3f69fa9c1ba984218809cc50c9b052
Author: Albert Astals Cid <aacid at kde.org>
Date: Mon Jul 31 19:45:32 2017 +0200
Add missing (C)
diff --git a/utils/pdfseparate.cc b/utils/pdfseparate.cc
index 34cc1926..a6f1d5ec 100644
--- a/utils/pdfseparate.cc
+++ b/utils/pdfseparate.cc
@@ -9,6 +9,7 @@
// Copyright (C) 2013, 2016 Pino Toscano <pino at kde.org>
// Copyright (C) 2013 Daniel Kahn Gillmor <dkg at fifthhorseman.net>
// Copyright (C) 2013 Suzuki Toshiya <mpsuzuki at hiroshima-u.ac.jp>
+// Copyright (C) 2017 LĂ©onard Michelet <leonard.michelet at smile.fr>
//
//========================================================================
#include "config.h"
commit 543b0ea219191122fee0583ce62c19e31de34109
Author: Roland Hieber <r.hieber at pengutronix.de>
Date: Mon Jul 17 11:35:32 2017 +0200
configure.ac: fix --disable-FEATURE actually enabling the feature
Forwarded: https://bugs.freedesktop.org/show_bug.cgi?id=101818
A frequently seen antipattern is to use
AC_ARG_ENABLE(feature, help, action-if-given, action-if-not-given) as
AC_ARG_ENABLE(feature, help, action-if-enabled, action-if-disabled).
However, action-if-given is also evaluated for --disable-FEATURE (with
enableval=no), which results in --disable-FEATURE and --enable-FEATURE
doing the same in this case.
Rewrite the single-precision, fixedpoint and cmyk arguments accordingly
so the user is not confused if they explicitely want to disable those
options.
Signed-off-by: Roland Hieber <r.hieber at pengutronix.de>
diff --git a/configure.ac b/configure.ac
index 98d497a9..40a78d90 100644
--- a/configure.ac
+++ b/configure.ac
@@ -122,16 +122,36 @@ else
fi
AC_ARG_ENABLE(single-precision,
-[ --enable-single-precision use single precision arithmetic (instead of double precision) in the Splash backend],
-AC_DEFINE(USE_FLOAT, [1], [Use single precision arithmetic in the Splash backend]))
+ AC_HELP_STRING([--enable-single-precision],
+ [use single precision arithmetic (instead of double
+ precision) in the Splash backend]),
+ enable_single_precision=$enableval,
+ enable_single_precision=no)
+if test x$enable_single_precision != xno; then
+ AC_DEFINE(USE_FLOAT, [1], [Use single precision arithmetic in the Splash backend])
+fi
AC_ARG_ENABLE(fixedpoint,
-[ --enable-fixedpoint use fixed point (instead of double precision) arithmetic in the Splash backend],
-AC_DEFINE(USE_FIXEDPOINT, [1], [Use fixed point arithmetic in the Splash backend]))
+ AC_HELP_STRING([--enable-fixedpoint],
+ [use fixed point (instead of double precision) arithmetic
+ in the Splash backend]),
+ enable_fixedpoint=$enableval,
+ enable_fixedpoint=no)
+if test x$enable_fixedpoint != xno; then
+ if test x$enable_single_precision != xno; then
+ AC_MSG_ERROR([Choose only one of --enable-single-precision or --enable-fixedpoint!])
+ fi
+ AC_DEFINE(USE_FIXEDPOINT, [1], [Use fixed point arithmetic in the Splash backend])
+fi
AC_ARG_ENABLE(cmyk,
-[ --enable-cmyk Include support for CMYK rasterization],
-AC_DEFINE(SPLASH_CMYK, [1], [Include support for CMYK rasterization]))
+ AC_HELP_STRING([--enable-cmyk],
+ [Include support for CMYK rasterization]),
+ enable_cmyk=$enableval,
+ enable_cmyk=no)
+if test x$enable_cmyk != xno; then
+ AC_DEFINE(SPLASH_CMYK, [1], [Include support for CMYK rasterization])
+fi
dnl Relocation support
AC_ARG_ENABLE(relocatable,
More information about the poppler
mailing list