diff options
| author | Dan Nicolaescu | 2010-07-08 16:34:47 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-08 16:34:47 -0700 |
| commit | 45871610dd1fd2f0ac738c94b1963d347e438afe (patch) | |
| tree | 40fbbc216a3911de65945ba02241cb83839e7156 | |
| parent | 5842a27bbfb7efa6872824e501bc7ec98b631553 (diff) | |
| download | emacs-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-- | ChangeLog | 4 | ||||
| -rwxr-xr-x | configure | 33 | ||||
| -rw-r--r-- | configure.in | 15 |
3 files changed, 52 insertions, 0 deletions
| @@ -1,5 +1,9 @@ | |||
| 1 | 2010-07-08 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2010-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 |
| @@ -4830,6 +4830,39 @@ 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 |
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" | |||
| 757 | unset has_option | 757 | unset has_option |
| 758 | unset SAVE_CFLAGS | 758 | unset 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. | ||
| 762 | AC_MSG_CHECKING([whether gcc understands -Wold-style-definition]) | ||
| 763 | SAVE_CFLAGS="$CFLAGS" | ||
| 764 | CFLAGS="$CFLAGS -Wold-style-definition" | ||
| 765 | AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) | ||
| 766 | if test $has_option = yes; then | ||
| 767 | C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH" | ||
| 768 | fi | ||
| 769 | AC_MSG_RESULT($has_option) | ||
| 770 | CFLAGS="$SAVE_CFLAGS" | ||
| 771 | unset has_option | ||
| 772 | unset SAVE_CFLAGS | ||
| 773 | |||
| 774 | |||
| 760 | #### Some other nice autoconf tests. | 775 | #### Some other nice autoconf tests. |
| 761 | 776 | ||
| 762 | dnl checks for programs | 777 | dnl checks for programs |