summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu.herrb@laas.fr>2008-12-07 11:54:39 +0100
committerMatthieu Herrb <matthieu.herrb@laas.fr>2008-12-07 11:54:39 +0100
commit9ff834493ece0a0ea7d7f15c1706bab022362cc5 (patch)
tree573d27d66d71e81da6b33a02589ffe866b55426f
parent1d2a0c58ffa7be9c47ea0a097f54e012cf5d44de (diff)
Fix CWARNFLAGS for gcc versions < 4
-rw-r--r--xorg-macros.m4.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index cc04fa3..9a2e26a 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -444,7 +444,12 @@ AC_REQUIRE([AC_PROG_CC])
if test "x$GCC" = xyes ; then
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
--Wold-style-definition -Wbad-function-cast -Wdeclaration-after-statement"
+-Wbad-function-cast"
+ case `gcc -dumpversion` in
+ 4.*)
+ CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
+ ;;
+ esac
else
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
if test "x$SUNCC" = "xyes"; then
@@ -453,4 +458,3 @@ else
fi
AC_SUBST(CWARNFLAGS)
]) # XORG_CWARNFLAGS
-