summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4fc9681)
raw | patch | inline | side by side (parent: 4fc9681)
author | jiho-sf <jiho-sf@users.sourceforge.net> | |
Mon, 30 Apr 2007 20:56:49 +0000 (20:56 +0000) | ||
committer | jiho-sf <jiho-sf@users.sourceforge.net> | |
Mon, 30 Apr 2007 20:56:49 +0000 (20:56 +0000) |
"-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 | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index e80bea60c21dc1c064274aa6e4b1d4ad47b52bc9..f5eafa6b2c1b9f6eb13129c03454298f88350ff3 100644 (file)
--- a/configure.ac
+++ b/configure.ac
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