diff options
author | Peter Kokot <peterkokot@gmail.com> | 2018-07-26 15:31:37 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2018-07-26 15:54:20 +0200 |
commit | 27efe2db1b0988303e46bd5dda65ff9ec12de18b (patch) | |
tree | 79da0613ed4c5ea1f8bb2807f99ec6a9fad44fb1 /m4/ax_cflags_force_c89.m4 | |
parent | 72e8def2648d7d05daa95d533079e7373b7218d7 (diff) | |
download | autoconf-archive-27efe2db1b0988303e46bd5dda65ff9ec12de18b.tar.gz |
Replace AC_TRY_COMPILE and AC_LANG_
Autoconf 2.50 in 2001 made several macros obsolete. These include macros
for temporary changing the language - AC_LANG_SAVE, AC_LANG_CPLUSPLUS,
AC_LANG_C, and AC_LANG_RESTORE. Instead of these the AC_LANG_PUSH and
AC_LANG_POP macros should be used with later Autoconf versions.
AC_TRY_COMPILE macros should be replaced with AC_COMPILE_IFELSE.
Refs:
- http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Language-Choice.html
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html
Diffstat (limited to 'm4/ax_cflags_force_c89.m4')
-rw-r--r-- | m4/ax_cflags_force_c89.m4 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/m4/ax_cflags_force_c89.m4 b/m4/ax_cflags_force_c89.m4 index d0fac15..815fb68 100644 --- a/m4/ax_cflags_force_c89.m4 +++ b/m4/ax_cflags_force_c89.m4 @@ -34,15 +34,14 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 11 +#serial 12 AC_DEFUN([AX_CFLAGS_FORCE_C89],[dnl AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_force_c89])dnl AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for C89 mode], VAR,[VAR="no, unknown" - AC_LANG_SAVE - AC_LANG_C + AC_LANG_PUSH([C]) ac_save_[]FLAGS="$[]FLAGS" for ac_arg dnl in "-pedantic % -ansi -pedantic" dnl GCC @@ -55,11 +54,12 @@ in "-pedantic % -ansi -pedantic" dnl GCC "-h conform % -h conform" dnl Cray C (Unicos) # do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'` - AC_TRY_COMPILE([],[return 0;], - [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], + [[return 0;]])], + [VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break],[]) done FLAGS="$ac_save_[]FLAGS" - AC_LANG_RESTORE + AC_LANG_POP([C]) ]) AS_VAR_POPDEF([FLAGS])dnl AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) |