summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorsuzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>2012-04-17 20:19:41 +0200
committerAlbert Astals Cid <aacid@kde.org>2012-04-17 20:19:41 +0200
commit9e0f0368e543df46b40cbd7bed6fdc1abf846e7d (patch)
tree8d041cd5def41c0f1610dedd3d282c7a9f710991 /configure.ac
parent2f1e7ef252b8d1f7ee6004825c2926f0f5e181a5 (diff)
Do not append "-ansi" to CXXFLAG, if "-std=XXX" is already specified.
SplashOutputDev.cc uses isfinite() function (defined by math.h). isfinite() was standardized in C99, and imported to C++0x in later. In QNX header file system, isfinite() is disabled by default, the definition of __STDC_VERSION__ > 199901 is required to enable it. In the case of GCC, "-std=c99" (for C) or "-std=gnu++0x" (for C++) is expected. But, current configure of poppler appends "-ansi" flag for CXXFLAGS, if the compiler is known to be GNU. "-ansi" is C89 or C++98, so isfinite() is unavailable. I propose a patch NOT to "-ansi" flag, if CXXFLAGS includes "-std=XXX" already.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index d7f7f868..2e3be7c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,13 @@ if test "x$GXX" = "xyes"; then
cygwin* | mingw*)
;;
*)
- CXXFLAGS="$CXXFLAGS -ansi"
+ case "${CXXFLAGS}" in
+ *-std=*)
+ ;;
+ *)
+ CXXFLAGS="$CXXFLAGS -ansi"
+ ;;
+ esac
;;
esac
fi