Mercurial > emacs
comparison configure @ 109180:6b6f31e8107e
* configure.in: Use -Wold-style-definition if available.
This helps with the transition to standard C code, it can be
removed when done.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Thu, 08 Jul 2010 16:34:47 -0700 |
parents | 5df3f77a9df9 |
children | 8f3464b85afb |
comparison
equal
deleted
inserted
replaced
109179:8cfee7d2955f | 109180:6b6f31e8107e |
---|---|
4828 $as_echo "$has_option" >&6; } | 4828 $as_echo "$has_option" >&6; } |
4829 CFLAGS="$SAVE_CFLAGS" | 4829 CFLAGS="$SAVE_CFLAGS" |
4830 unset has_option | 4830 unset has_option |
4831 unset SAVE_CFLAGS | 4831 unset SAVE_CFLAGS |
4832 | 4832 |
4833 ### Use -Wold-style-definition if the compiler supports it | |
4834 # This can be removed when conversion to standard C is finished. | |
4835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5 | |
4836 $as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; } | |
4837 SAVE_CFLAGS="$CFLAGS" | |
4838 CFLAGS="$CFLAGS -Wold-style-definition" | |
4839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
4840 /* end confdefs.h. */ | |
4841 | |
4842 int | |
4843 main () | |
4844 { | |
4845 | |
4846 ; | |
4847 return 0; | |
4848 } | |
4849 _ACEOF | |
4850 if ac_fn_c_try_compile "$LINENO"; then : | |
4851 has_option=yes | |
4852 else | |
4853 has_option=no | |
4854 fi | |
4855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4856 if test $has_option = yes; then | |
4857 C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" | |
4858 fi | |
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 | |
4860 $as_echo "$has_option" >&6; } | |
4861 CFLAGS="$SAVE_CFLAGS" | |
4862 unset has_option | |
4863 unset SAVE_CFLAGS | |
4864 | |
4865 | |
4833 #### Some other nice autoconf tests. | 4866 #### Some other nice autoconf tests. |
4834 | 4867 |
4835 ac_ext=c | 4868 ac_ext=c |
4836 ac_cpp='$CPP $CPPFLAGS' | 4869 ac_cpp='$CPP $CPPFLAGS' |
4837 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | 4870 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |