diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2010-07-08 16:34:47 -0700 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2010-07-08 16:34:47 -0700 |
commit | 45871610dd1fd2f0ac738c94b1963d347e438afe (patch) | |
tree | 40fbbc216a3911de65945ba02241cb83839e7156 /configure | |
parent | 5842a27bbfb7efa6872824e501bc7ec98b631553 (diff) | |
download | emacs-45871610dd1fd2f0ac738c94b1963d347e438afe.tar.gz |
* configure.in: Use -Wold-style-definition if available.
This helps with the transition to standard C code, it can be
removed when done.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/configure b/configure index 41d0e6374c7..c430dec9ee2 100755 --- a/configure +++ b/configure @@ -4830,6 +4830,39 @@ CFLAGS="$SAVE_CFLAGS" unset has_option unset SAVE_CFLAGS +### Use -Wold-style-definition if the compiler supports it +# This can be removed when conversion to standard C is finished. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5 +$as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; } +SAVE_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Wold-style-definition" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + has_option=yes +else + has_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if test $has_option = yes; then + C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 +$as_echo "$has_option" >&6; } +CFLAGS="$SAVE_CFLAGS" +unset has_option +unset SAVE_CFLAGS + + #### Some other nice autoconf tests. ac_ext=c |