From 504c66e0a8882dfb48bba04881512da95b89e6fb Mon Sep 17 00:00:00 2001 From: jiho-sf Date: Mon, 30 Apr 2007 20:56:49 +0000 Subject: [PATCH] committed patch 1702352 from John Faith. "-Wno-pointer-sign" is added to CFLAGS, then AC_COMPILE_IFELSE is run, but g++ instead of gcc is used. For gcc 3.3 (Mac OS 10.3.9) this causes compiler failure "unrecognized option" when building libcroco. This is apparently due to the "AC_LANG(C++)" line before the compile test, so adding "AC_LANG_PUSH(C)" before the compile test and "AC_LANG_POP" after the test seems to set the correct compiler. --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index e80bea60c..f5eafa6b2 100644 --- a/configure.ac +++ b/configure.ac @@ -33,16 +33,18 @@ AC_HEADER_STDC dnl These next few lines are needed only while libcroco is in our source tree. AC_PROG_CC AM_PROG_CC_C_O +AC_MSG_NOTICE([Testing -Wno-pointer-sign]) if test "$GCC" = "yes"; then # Enable some warnings from gcc. + AC_LANG_PUSH(C) # -Wno-pointer-sign is probably new in gcc 4.0; certainly it isn't accepted # by gcc 2.95. ink_svd_CFLAGS="$CFLAGS" CFLAGS="-Wno-pointer-sign $CFLAGS" - AC_COMPILE_IFELSE([int dummy; -], , CFLAGS="$ink_svd_CFLAGS",) + AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), AC_MSG_NOTICE([ compiler supports -Wno-pointer-sign]), CFLAGS="$ink_svd_CFLAGS") CFLAGS="-Wall -Wformat-security -W -D_FORTIFY_SOURCE=2 $CFLAGS" + AC_LANG_POP fi dnl Honor aclocal flags -- 2.30.2