summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2011-10-21 15:18:14 -0400
committerDan Winship <danw@gnome.org>2011-10-21 15:18:14 -0400
commitf691eb6a7a41d06f1b8ceb2d98d9352c7ad23204 (patch)
treed22f5675dd897a0a1183afe97a286fda9ec9d92e /configure.ac
parentabb38b61b18fe8c837b731b2ca649c5809015840 (diff)
downloadlibsoup-f691eb6a7a41d06f1b8ceb2d98d9352c7ad23204.tar.gz
libsoup-f691eb6a7a41d06f1b8ceb2d98d9352c7ad23204.tar.bz2
libsoup-f691eb6a7a41d06f1b8ceb2d98d9352c7ad23204.zip
configure: turn some warnings into errors
Use -Werror=... to turn warnings into errors for warnings that occur in completely well-defined situations (ie, won't change with gcc versions or optimization levels) and that couldn't be triggered by foreign #include files.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac47
1 files changed, 18 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac
index db95dbb5..cd9f0513 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,35 +153,6 @@ dnl *** gobject-introspection ***
dnl *****************************
GOBJECT_INTROSPECTION_CHECK([0.9.5])
-dnl *************************************
-dnl *** Warnings to show if using GCC ***
-dnl *************************************
-
-AC_ARG_ENABLE(more-warnings,
- AS_HELP_STRING([--disable-more-warnings], [Inhibit compiler warnings]),
- set_more_warnings=no)
-
-if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
- CFLAGS="$CFLAGS \
- -Wall -Wstrict-prototypes -Wmissing-declarations \
- -Wmissing-prototypes -Wnested-externs -Wpointer-arith \
- -Wdeclaration-after-statement -Wformat=2 -Winit-self \
- -Waggregate-return -Wmissing-format-attribute"
-
- for option in -Wmissing-include-dirs -Wundef; do
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $option"
- AC_MSG_CHECKING([whether gcc understands $option])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])],
- [has_option=yes],
- [has_option=no])
- AC_MSG_RESULT($has_option)
- if test $has_option = no; then
- CFLAGS="$SAVE_CFLAGS"
- fi
- done
-fi
-
AC_MSG_CHECKING([for glib-networking (glib TLS implementation)])
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
@@ -343,6 +314,24 @@ fi
AC_SUBST(ntlm_auth)
AC_DEFINE_UNQUOTED(NTLM_AUTH, "$ntlm_auth", [Samba's 'winbind' daemon helper 'ntlm_auth' which can be used for NTLM single-sign-on])
+dnl ****************************************************
+dnl *** Warnings to show if using GCC ***
+dnl *** (do this last so -Werror won't mess up tests ***
+dnl ****************************************************
+
+AC_ARG_ENABLE(more-warnings,
+ AS_HELP_STRING([--disable-more-warnings], [Inhibit compiler warnings]),
+ set_more_warnings=no)
+
+if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
+ CFLAGS="$CFLAGS \
+ -Wall -Wstrict-prototypes -Werror=missing-prototypes \
+ -Werror=implicit-function-declaration \
+ -Werror=pointer-arith -Werror=init-self -Werror=format=2 \
+ -Werror=missing-include-dirs -Werror=aggregate-return \
+ -Werror=declaration-after-statement"
+fi
+
dnl *************************
dnl *** Output Everything ***
dnl *************************