diff --git a/configure.in b/configure.in index 8dcee82a4..0f25eb98e 100644 --- a/configure.in +++ b/configure.in @@ -875,6 +875,28 @@ CheckVisibilityHidden() fi } +dnl See if GCC's -Wall is supported. +CheckWarnAll() +{ + AC_MSG_CHECKING(for GCC -Wall option) + have_gcc_Wall=no + + save_CFLAGS="$CFLAGS" + CFLAGS="$save_CFLAGS -Wall" + AC_TRY_COMPILE([ + int x = 0; + ],[ + ],[ + have_gcc_Wall=yes + ]) + AC_MSG_RESULT($have_gcc_Wall) + CFLAGS="$save_CFLAGS" + + if test x$have_gcc_Wall = xyes; then + EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall" + fi +} + dnl Do the iPod thing CheckIPod() @@ -2785,6 +2807,9 @@ case "$host" in ;; esac +dnl Do this on all platforms, after everything else. +CheckWarnAll + # Verify that we have all the platform specific files we need if test x$enable_joystick = xyes; then