diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2016-08-23 16:04:57 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2017-09-20 20:41:25 +0200 |
commit | 7871b86d086d7cd51f2301a5b46d4a6da0a3f218 (patch) | |
tree | ad87d26cb367c1a8a2d66da4ba0dab825ac2169f /configure | |
parent | 56f51802672305ef82016b30adedb6da2996362c (diff) | |
download | tcpdump-7871b86d086d7cd51f2301a5b46d4a6da0a3f218.tar.gz |
Compile with '-Wassign-enum' in devel mode if supported
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 43 |
1 files changed, 43 insertions, 0 deletions
@@ -7235,6 +7235,49 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wassign-enum option" >&5 +$as_echo_n "checking whether the compiler supports the -Wassign-enum option... " >&6; } + save_CFLAGS="$CFLAGS" + if expr "x-Wassign-enum" : "x-W.*" >/dev/null + then + CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wassign-enum" + elif expr "x-Wassign-enum" : "x-f.*" >/dev/null + then + CFLAGS="$CFLAGS -Werror -Wassign-enum" + elif expr "x-Wassign-enum" : "x-m.*" >/dev/null + then + CFLAGS="$CFLAGS -Werror -Wassign-enum" + else + CFLAGS="$CFLAGS -Wassign-enum" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +return 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + CFLAGS="$save_CFLAGS" + V_CCOPT="$V_CCOPT -Wassign-enum" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$save_CFLAGS" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5 |