[libsoup/gnome-2-26: 25/29] Fix cflags to work with older versions of gcc
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Subject: [libsoup/gnome-2-26: 25/29] Fix cflags to work with older versions of gcc
- Date: Mon, 18 May 2009 12:26:41 -0400 (EDT)
commit d09fbdcda8ad2643a086ae803f0d20976f78056c
Author: Dan Winship <danw gnome org>
Date: Sun Apr 19 10:46:40 2009 -0400
Fix cflags to work with older versions of gcc
Check that gcc supports -Wmissing-include-dirs and -Wundef rather than
using them unconditionally.
http://bugzilla.gnome.org/show_bug.cgi?id=578851
---
configure.in | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/configure.in b/configure.in
index 529c9a6..4e44482 100644
--- a/configure.in
+++ b/configure.in
@@ -241,8 +241,20 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
-Wall -Wstrict-prototypes -Wmissing-declarations \
-Wmissing-prototypes -Wnested-externs -Wpointer-arith \
-Wdeclaration-after-statement -Wformat=2 -Winit-self \
- -Wmissing-include-dirs -Wundef -Waggregate-return \
- -Wmissing-format-attribute"
+ -Waggregate-return -Wmissing-format-attribute"
+
+ for option in -Wmissing-include-dirs -Wundef; do
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $option"
+ AC_MSG_CHECKING([whether gcc understands $option])
+ AC_TRY_COMPILE([], [],
+ has_option=yes,
+ has_option=no,)
+ AC_MSG_RESULT($has_option)
+ if test $has_option = no; then
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ done
fi
if test "$os_win32" != yes; then
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]