diff options
author | Haru <haru@dotalux.com> | 2016-02-20 21:15:13 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-03-20 18:32:09 +0100 |
commit | 1a8c933f2e74758082eb79d7d924baa4c39bbd95 (patch) | |
tree | d89423154f02b61a8cafb1b839167db12b66c259 | |
parent | 787d25edf045de8df1460a6a975186df0f8d402f (diff) | |
download | hercules-1a8c933f2e74758082eb79d7d924baa4c39bbd95.tar.gz hercules-1a8c933f2e74758082eb79d7d924baa4c39bbd95.tar.bz2 hercules-1a8c933f2e74758082eb79d7d924baa4c39bbd95.tar.xz hercules-1a8c933f2e74758082eb79d7d924baa4c39bbd95.zip |
Enabled the -Wcast-qual diagnostic flag in the configure script
Signed-off-by: Haru <haru@dotalux.com>
-rwxr-xr-x | configure | 51 | ||||
-rw-r--r-- | configure.in | 1 |
2 files changed, 51 insertions, 1 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in 8aa0749. +# From configure.in 2e1b3eb. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # @@ -7158,6 +7158,55 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wcast-qual" >&5 +$as_echo_n "checking whether $CC supports -Wcast-qual... " >&6; } + OLD_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror -Wcast-qual" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CFLAGS="$OLD_CFLAGS -Wcast-qual" + # Optionally, run a test + if test "x" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wcast-qual" >&5 +$as_echo_n "checking whether $CC can actually use -Wcast-qual... " >&6; } + CFLAGS="$OLD_CFLAGS -Werror -Wcast-qual" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$OLD_CFLAGS" + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CFLAGS="$OLD_CFLAGS -Wcast-qual" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$OLD_CFLAGS" + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-format-nonliteral" >&5 $as_echo_n "checking whether $CC supports -Wno-format-nonliteral... " >&6; } OLD_CFLAGS="$CFLAGS" diff --git a/configure.in b/configure.in index fd60e58c6..5bb2cdec3 100644 --- a/configure.in +++ b/configure.in @@ -832,6 +832,7 @@ AC_CHECK_COMPILER_WFLAG(nested-externs) AC_CHECK_COMPILER_WFLAG(old-style-definition) AC_CHECK_COMPILER_WFLAG(overlength-strings) AC_CHECK_COMPILER_WFLAG(redundant-decls) +AC_CHECK_COMPILER_WFLAG(cast-qual) AC_CHECK_COMPILER_WNOFLAG(format-nonliteral) AC_CHECK_COMPILER_WNOFLAG(switch) AC_CHECK_COMPILER_WNOFLAG(missing-field-initializers) |