aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicolaescu2010-07-08 16:34:47 -0700
committerDan Nicolaescu2010-07-08 16:34:47 -0700
commit45871610dd1fd2f0ac738c94b1963d347e438afe (patch)
tree40fbbc216a3911de65945ba02241cb83839e7156
parent5842a27bbfb7efa6872824e501bc7ec98b631553 (diff)
downloademacs-45871610dd1fd2f0ac738c94b1963d347e438afe.tar.gz
emacs-45871610dd1fd2f0ac738c94b1963d347e438afe.zip
* configure.in: Use -Wold-style-definition if available.
This helps with the transition to standard C code, it can be removed when done.
-rw-r--r--ChangeLog4
-rwxr-xr-xconfigure33
-rw-r--r--configure.in15
3 files changed, 52 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c3e71cd62c..13b2fff124a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
12010-07-08 Dan Nicolaescu <dann@ics.uci.edu> 12010-07-08 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 * configure.in: Use -Wold-style-definition if available.
4 This helps with the transition to standard C code, it can be
5 removed when done.
6
3 * configure.in (PRE_EDIT_LDFLAGS, POST_EDIT_LDFLAGS): Remove. 7 * configure.in (PRE_EDIT_LDFLAGS, POST_EDIT_LDFLAGS): Remove.
4 8
5 * configure.in (UNEXEC_OBJ): Add comment about values for MSDOS 9 * configure.in (UNEXEC_OBJ): Add comment about values for MSDOS
diff --git a/configure b/configure
index 41d0e6374c7..c430dec9ee2 100755
--- a/configure
+++ b/configure
@@ -4830,6 +4830,39 @@ CFLAGS="$SAVE_CFLAGS"
4830unset has_option 4830unset has_option
4831unset SAVE_CFLAGS 4831unset 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; }
4837SAVE_CFLAGS="$CFLAGS"
4838CFLAGS="$CFLAGS -Wold-style-definition"
4839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4840/* end confdefs.h. */
4841
4842int
4843main ()
4844{
4845
4846 ;
4847 return 0;
4848}
4849_ACEOF
4850if ac_fn_c_try_compile "$LINENO"; then :
4851 has_option=yes
4852else
4853 has_option=no
4854fi
4855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4856if test $has_option = yes; then
4857 C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH"
4858fi
4859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4860$as_echo "$has_option" >&6; }
4861CFLAGS="$SAVE_CFLAGS"
4862unset has_option
4863unset SAVE_CFLAGS
4864
4865
4833#### Some other nice autoconf tests. 4866#### Some other nice autoconf tests.
4834 4867
4835ac_ext=c 4868ac_ext=c
diff --git a/configure.in b/configure.in
index a91d3c7b6ac..aee62c0e11d 100644
--- a/configure.in
+++ b/configure.in
@@ -757,6 +757,21 @@ CFLAGS="$SAVE_CFLAGS"
757unset has_option 757unset has_option
758unset SAVE_CFLAGS 758unset SAVE_CFLAGS
759 759
760### Use -Wold-style-definition if the compiler supports it
761# This can be removed when conversion to standard C is finished.
762AC_MSG_CHECKING([whether gcc understands -Wold-style-definition])
763SAVE_CFLAGS="$CFLAGS"
764CFLAGS="$CFLAGS -Wold-style-definition"
765AC_TRY_COMPILE([], [], has_option=yes, has_option=no,)
766if test $has_option = yes; then
767 C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH"
768fi
769AC_MSG_RESULT($has_option)
770CFLAGS="$SAVE_CFLAGS"
771unset has_option
772unset SAVE_CFLAGS
773
774
760#### Some other nice autoconf tests. 775#### Some other nice autoconf tests.
761 776
762dnl checks for programs 777dnl checks for programs