aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorDan Nicolaescu2009-11-20 06:05:10 +0000
committerDan Nicolaescu2009-11-20 06:05:10 +0000
commit7a2efa6f088dee91feb2c095f81cf9c2030c2e97 (patch)
tree1ab2d0dd5239c29fa3eea17b13187badeb850be0 /configure
parent9717f1199f337920aeeb66417233c28d5f978f79 (diff)
downloademacs-7a2efa6f088dee91feb2c095f81cf9c2030c2e97.tar.gz
emacs-7a2efa6f088dee91feb2c095f81cf9c2030c2e97.zip
Use -Wdeclaration-after-statement if available.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure56
1 files changed, 56 insertions, 0 deletions
diff --git a/configure b/configure
index 3f1b2bcde69..c698db5e762 100755
--- a/configure
+++ b/configure
@@ -4896,6 +4896,62 @@ CFLAGS="$SAVE_CFLAGS"
4896unset has_option 4896unset has_option
4897unset SAVE_CFLAGS 4897unset 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; }
4902SAVE_CFLAGS="$CFLAGS"
4903CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4904cat >conftest.$ac_ext <<_ACEOF
4905/* confdefs.h. */
4906_ACEOF
4907cat confdefs.h >>conftest.$ac_ext
4908cat >>conftest.$ac_ext <<_ACEOF
4909/* end confdefs.h. */
4910
4911int
4912main ()
4913{
4914
4915 ;
4916 return 0;
4917}
4918_ACEOF
4919rm -f conftest.$ac_objext
4920if { (ac_try="$ac_compile"
4921case "(($ac_try" in
4922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4923 *) ac_try_echo=$ac_try;;
4924esac
4925eval 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
4938else
4939 $as_echo "$as_me: failed program was:" >&5
4940sed 's/^/| /' conftest.$ac_ext >&5
4941
4942 has_option=no
4943fi
4944
4945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4946if test $has_option = yes; then
4947 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
4948fi
4949{ $as_echo "$as_me:$LINENO: result: $has_option" >&5
4950$as_echo "$has_option" >&6; }
4951CFLAGS="$SAVE_CFLAGS"
4952unset has_option
4953unset 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