Mercurial > emacs
comparison configure @ 106158:734dbd0c890e
Use -Wdeclaration-after-statement if available.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Fri, 20 Nov 2009 06:05:10 +0000 |
parents | cd4cbab8bb21 |
children | b5eb529d2739 |
comparison
equal
deleted
inserted
replaced
106157:42f3f64ab6e5 | 106158:734dbd0c890e |
---|---|
4894 $as_echo "$has_option" >&6; } | 4894 $as_echo "$has_option" >&6; } |
4895 CFLAGS="$SAVE_CFLAGS" | 4895 CFLAGS="$SAVE_CFLAGS" |
4896 unset has_option | 4896 unset has_option |
4897 unset SAVE_CFLAGS | 4897 unset SAVE_CFLAGS |
4898 | 4898 |
4899 ### Use -Wdeclaration-after-statement if the compiler supports it | |
4900 { $as_echo "$as_me:$LINENO: checking whether gcc understands -Wdeclaration-after-statement" >&5 | |
4901 $as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; } | |
4902 SAVE_CFLAGS="$CFLAGS" | |
4903 CFLAGS="$CFLAGS -Wdeclaration-after-statement" | |
4904 cat >conftest.$ac_ext <<_ACEOF | |
4905 /* confdefs.h. */ | |
4906 _ACEOF | |
4907 cat confdefs.h >>conftest.$ac_ext | |
4908 cat >>conftest.$ac_ext <<_ACEOF | |
4909 /* end confdefs.h. */ | |
4910 | |
4911 int | |
4912 main () | |
4913 { | |
4914 | |
4915 ; | |
4916 return 0; | |
4917 } | |
4918 _ACEOF | |
4919 rm -f conftest.$ac_objext | |
4920 if { (ac_try="$ac_compile" | |
4921 case "(($ac_try" in | |
4922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
4923 *) ac_try_echo=$ac_try;; | |
4924 esac | |
4925 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" | |
4926 $as_echo "$ac_try_echo") >&5 | |
4927 (eval "$ac_compile") 2>conftest.er1 | |
4928 ac_status=$? | |
4929 grep -v '^ *+' conftest.er1 >conftest.err | |
4930 rm -f conftest.er1 | |
4931 cat conftest.err >&5 | |
4932 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4933 (exit $ac_status); } && { | |
4934 test -z "$ac_c_werror_flag" || | |
4935 test ! -s conftest.err | |
4936 } && test -s conftest.$ac_objext; then | |
4937 has_option=yes | |
4938 else | |
4939 $as_echo "$as_me: failed program was:" >&5 | |
4940 sed 's/^/| /' conftest.$ac_ext >&5 | |
4941 | |
4942 has_option=no | |
4943 fi | |
4944 | |
4945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | |
4946 if test $has_option = yes; then | |
4947 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH" | |
4948 fi | |
4949 { $as_echo "$as_me:$LINENO: result: $has_option" >&5 | |
4950 $as_echo "$has_option" >&6; } | |
4951 CFLAGS="$SAVE_CFLAGS" | |
4952 unset has_option | |
4953 unset SAVE_CFLAGS | |
4954 | |
4899 #### Some other nice autoconf tests. | 4955 #### Some other nice autoconf tests. |
4900 | 4956 |
4901 { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 | 4957 { $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 |
4902 $as_echo_n "checking whether ln -s works... " >&6; } | 4958 $as_echo_n "checking whether ln -s works... " >&6; } |
4903 LN_S=$as_ln_s | 4959 LN_S=$as_ln_s |