From 35971c4103379dc10d0892dfe182141ef3f710d9 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Wed, 9 Apr 2008 18:28:47 +0200 Subject: [PATCH] Make --enable-warnings work again, and make the warnings a bit more sensible. --- configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index fb768dc..fc7fa6b 100644 --- a/configure.ac +++ b/configure.ac @@ -128,7 +128,7 @@ if test "$ac_cv_c_compiler_gnu" = yes; then ;; esac - IRC_CFLAGS="$IRC_CFLAGS -O0 -Wall" + IRC_CFLAGS="$IRC_CFLAGS -O0 -Wall -std=gnu99" fi dnl If we support -g, use it! @@ -1066,6 +1066,7 @@ fi # This must be down here, or it will mess up checks like the ones # for -Wl,-export-dynamic # -- jilles +CWARNS="" AC_ARG_ENABLE(warnings, AC_HELP_STRING([--enable-warnings],[Enable all sorts of warnings for debugging.]), [ @@ -1077,6 +1078,7 @@ CHARYBDIS_C_GCC_TRY_FLAGS([-Wpointer-arith], charybdis_cv_c_gcc_w_pointer_arith) CHARYBDIS_C_GCC_TRY_FLAGS([-Wimplicit -Wnested-externs], charybdis_cv_c_gcc_w_implicit) CHARYBDIS_C_GCC_TRY_FLAGS([-Wcast-align], charybdis_cv_c_gcc_w_cast_align) CHARYBDIS_C_GCC_TRY_FLAGS([-Wcast-qual], charybdis_cv_c_gcc_w_cast_qual) +CHARYBDIS_C_GCC_TRY_FLAGS([-Wwrite-strings], charybdis_cv_c_gcc_w_float_equal) CHARYBDIS_C_GCC_TRY_FLAGS([-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations], charybdis_cv_c_gcc_prototypes) CHARYBDIS_C_GCC_TRY_FLAGS([-Wparenthesis], charybdis_cv_c_gcc_parenthesis) CHARYBDIS_C_GCC_TRY_FLAGS([-W -Wno-unused], charybdis_cv_c_gcc_w) @@ -1090,7 +1092,7 @@ CHARYBDIS_C_GCC_TRY_FLAGS([-Wbad-function-cast], charybdis_cv_c_gcc_w_bad_functi CHARYBDIS_C_GCC_TRY_FLAGS([-Wunused-function -Wunused-label -Wunused-value -Wunused-variable], charybdis_cv_c_gcc_w_unused) CHARYBDIS_C_GCC_TRY_FLAGS([-Wredundant-decls], charybdis_cv_c_gcc_w_redundant_decls) CHARYBDIS_C_GCC_TRY_FLAGS([-Wfloat-equal], charybdis_cv_c_gcc_w_float_equal) -CHARYBDIS_C_GCC_TRY_FLAGS([-Wformat=2], charybdis_cv_c_gcc_w_format) +CHARYBDIS_C_GCC_TRY_FLAGS([-Wformat -Wformat-y2k -Wformat-security], charybdis_cv_c_gcc_w_format) CHARYBDIS_C_GCC_TRY_FLAGS([-pedantic], charybdis_cv_c_gcc_pedantic) IRC_CFLAGS="$CFLAGS" @@ -1165,6 +1167,8 @@ EOF fi fi +IRC_CFLAGS="$IRC_CFLAGS $CWARNS" + AC_SUBST(MODULES_LIBS) AC_SUBST(MOD_TARGET)