diff options
author | Matthieu Herrb <matthieu.herrb@laas.fr> | 2008-12-07 11:54:39 +0100 |
---|---|---|
committer | Matthieu Herrb <matthieu.herrb@laas.fr> | 2008-12-07 11:54:39 +0100 |
commit | 9ff834493ece0a0ea7d7f15c1706bab022362cc5 (patch) | |
tree | 573d27d66d71e81da6b33a02589ffe866b55426f | |
parent | 1d2a0c58ffa7be9c47ea0a097f54e012cf5d44de (diff) |
Fix CWARNFLAGS for gcc versions < 4
-rw-r--r-- | xorg-macros.m4.in | 8 |
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 - |