Don't use -Wextra on older gcc.
authorMarko Kreen <markokr@gmail.com>
Sat, 25 Sep 2010 12:17:18 +0000 (05:17 -0700)
committerMarko Kreen <markokr@gmail.com>
Sun, 26 Sep 2010 04:07:05 +0000 (21:07 -0700)
Check for -Wno-missing-field-initializers,
gcc without it would be too noisy.

m4/usual.m4

index dd610779fb7fdca521ba193f6d3a977ff7dbce23..0519882f7edfd2352cf0872782e4b498183ff231 100644 (file)
@@ -80,6 +80,11 @@ if test x"$GCC" = xyes; then
     CFLAGS="$good_CFLAGS $WFLAGS $f"
     AC_COMPILE_IFELSE([void foo(void){}], [WFLAGS="$WFLAGS $f"])
   done
+
+  # avoid -Wextra if missing-field.initializers does not work
+  echo "$warnings" | grep missing-field-initializers > /dev/null \
+  || warnings=`echo "$warnings"|sed 's/-Wextra//'`
+
   CFLAGS="$good_CFLAGS"
   AC_MSG_RESULT([done])
 fi