diff options
author | Werner Koch <[email protected]> | 2008-10-17 19:18:46 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2008-10-17 19:18:46 +0000 |
commit | 0698c5169fca5b7969e6b0fa4de22b693e7fd2e4 (patch) | |
tree | ebfa56dde985a7925e9dc6ea60bda96569106718 /configure.ac | |
parent | Reset the context lock flag after a failed dirmngr start which may happend (diff) | |
download | gnupg-0698c5169fca5b7969e6b0fa4de22b693e7fd2e4.tar.gz gnupg-0698c5169fca5b7969e6b0fa4de22b693e7fd2e4.zip |
Use more warning options with modern GCCs.
Other minor changes.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 010115ae2..ec5361c55 100644 --- a/configure.ac +++ b/configure.ac @@ -1248,6 +1248,24 @@ if test "$GCC" = yes; then if test "$USE_MAINTAINER_MODE" = "yes"; then CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes" CFLAGS="$CFLAGS -Wformat -Wno-format-y2k -Wformat-security" + AC_MSG_CHECKING([if gcc supports -Wno-missing-field-initializers]) + _gcc_cflags_save=$CFLAGS + CFLAGS="-Wno-missing-field-initializers" + AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no) + AC_MSG_RESULT($_gcc_wopt) + CFLAGS=$_gcc_cflags_save; + if test x"$_gcc_wopt" = xyes ; then + CFLAGS="$CFLAGS -W -Wno-sign-compare -Wno-missing-field-initializers" + fi + AC_MSG_CHECKING([if gcc supports -Wdeclaration-after-statement]) + _gcc_cflags_save=$CFLAGS + CFLAGS="-Wdeclaration-after-statement" + AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]),_gcc_wopt=yes,_gcc_wopt=no) + AC_MSG_RESULT($_gcc_wopt) + CFLAGS=$_gcc_cflags_save; + if test x"$_gcc_wopt" = xyes ; then + CFLAGS="$CFLAGS -Wdeclaration-after-statement" + fi else CFLAGS="$CFLAGS -Wall" fi |