diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-04 17:08:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-04 17:08:44 +0300 |
commit | 3732bd4a6b708651f6b4bcd32d6beb2b7f49c478 (patch) | |
tree | 83155915c35c72d018108231437248cc78d5060d /configure | |
parent | 0bd30a0fac1db1b478b3173a22a81bd5249113f8 (diff) | |
parent | 9147fe9473b26ee32aafed65fd02b03f11397629 (diff) | |
download | hercules-3732bd4a6b708651f6b4bcd32d6beb2b7f49c478.tar.gz hercules-3732bd4a6b708651f6b4bcd32d6beb2b7f49c478.tar.bz2 hercules-3732bd4a6b708651f6b4bcd32d6beb2b7f49c478.tar.xz hercules-3732bd4a6b708651f6b4bcd32d6beb2b7f49c478.zip |
Merge pull request #1210 from HerculesWS/wcast_qual
Added -Wcast-qual compiler flag
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 51 |
1 files changed, 50 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" |