diff options
author | Peter Kokot <peterkokot@gmail.com> | 2018-07-27 09:18:17 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2018-07-27 18:35:29 +0200 |
commit | b26684dc2f29222d9581089ea8cfb2fc54319fb4 (patch) | |
tree | fc9b3a24381315e755f7d3d965634c2a74875cfd /m4/ax_c_long_long.m4 | |
parent | 68e93457f1d6f73f8e5019e7a0a97851085dc0fa (diff) | |
download | autoconf-archive-b26684dc2f29222d9581089ea8cfb2fc54319fb4.tar.gz |
Replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE
Autoconf made several macros obsolete including the AC_TRY_COMPILE in
2000 and since Autoconf 2.50:
http://git.savannah.gnu.org/cgit/autoconf.git/tree/ChangeLog.2
These macros should be replaced with the current AC_COMPILE_IFELSE
instead.
Refs:
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/AC_005fACT_005fIFELSE-vs-AC_005fTRY_005fACT.html
Diffstat (limited to 'm4/ax_c_long_long.m4')
-rw-r--r-- | m4/ax_c_long_long.m4 | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/m4/ax_c_long_long.m4 b/m4/ax_c_long_long.m4 index 23f2e91..91a4302 100644 --- a/m4/ax_c_long_long.m4 +++ b/m4/ax_c_long_long.m4 @@ -20,7 +20,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 6 +#serial 7 AU_ALIAS([AC_C_LONG_LONG], [AX_C_LONG_LONG]) AC_DEFUN([AX_C_LONG_LONG], @@ -28,11 +28,11 @@ AC_DEFUN([AX_C_LONG_LONG], [if test "$GCC" = yes; then ac_cv_c_long_long=yes else - AC_TRY_COMPILE(,[long long int i;], - ac_cv_c_long_long=yes, - ac_cv_c_long_long=no) - fi]) - if test $ac_cv_c_long_long = yes; then - AC_DEFINE(HAVE_LONG_LONG, 1, [compiler understands long long]) - fi + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[long long int i;]])], + [ac_cv_c_long_long=yes], + [ac_cv_c_long_long=no]) + fi]) + if test $ac_cv_c_long_long = yes; then + AC_DEFINE(HAVE_LONG_LONG, 1, [compiler understands long long]) + fi ]) |