configure.ac | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
New commits: commit 0c47b769a77795bd866b6686b79fd20ad6f554bf Author: Daniel Macks <[email protected]> Date: Sun Dec 14 18:52:48 2014 +0100 Only consider adding -fno-check-new if compiler supports it Helps compiling on old clang's Bug #76963 diff --git a/configure.ac b/configure.ac index 3bf36e0..54dacf1 100644 --- a/configure.ac +++ b/configure.ac @@ -810,18 +810,32 @@ else fi AC_SUBST(TESTDATADIR) +# some compilers do not support this flag (see bug #76963) +fno_check_new= +AC_MSG_CHECKING([for -fno-check-new compiler flag]) +AC_LANG_PUSH([C++]) +saved_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-fno-check-new $CXXFLAGS" +AC_TRY_COMPILE([], [], + [AC_MSG_RESULT([yes]) + fno_check_new="-fno-check-new"], + AC_MSG_RESULT([no]) +) +CXXFLAGS=$saved_CXXFLAGS +AC_LANG_POP + if test "x$GCC" != xyes; then enable_compile_warnings=no fi case "$enable_compile_warnings" in no) ;; - yes) CXXFLAGS="-Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-check-new -fno-common $CXXFLAGS"; + yes) CXXFLAGS="-Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions $fno_check_new -fno-common $CXXFLAGS"; CFLAGS="-Wall $CFLAGS" ;; kde) CXXFLAGS="-Wnon-virtual-dtor -Wno-long-long -Wundef \ -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align \ -Wconversion -Wall -W -Wpointer-arith \ -Wwrite-strings -O2 -Wformat-security \ - -Wmissing-format-attribute -fno-exceptions -fno-check-new \ + -Wmissing-format-attribute -fno-exceptions $fno_check_new \ -fno-common $CXXFLAGS" ;; esac _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
