summaryrefslogtreecommitdiff
path: root/m4/ax_gcc_malloc_call.m4
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-07-27 09:18:17 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-07-27 18:35:29 +0200
commitb26684dc2f29222d9581089ea8cfb2fc54319fb4 (patch)
treefc9b3a24381315e755f7d3d965634c2a74875cfd /m4/ax_gcc_malloc_call.m4
parent68e93457f1d6f73f8e5019e7a0a97851085dc0fa (diff)
downloadautoconf-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_gcc_malloc_call.m4')
-rw-r--r--m4/ax_gcc_malloc_call.m410
1 files changed, 5 insertions, 5 deletions
diff --git a/m4/ax_gcc_malloc_call.m4 b/m4/ax_gcc_malloc_call.m4
index 96e8b68..7c0e34f 100644
--- a/m4/ax_gcc_malloc_call.m4
+++ b/m4/ax_gcc_malloc_call.m4
@@ -20,16 +20,16 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 9
+#serial 10
AC_DEFUN([AX_GCC_MALLOC_CALL],[dnl
AC_CACHE_CHECK(
[whether the compiler supports function __attribute__((__malloc__))],
ax_cv_gcc_malloc_call,[
- AC_TRY_COMPILE([__attribute__((__malloc__))
- int f(int i) { return i; }],
- [],
- ax_cv_gcc_malloc_call=yes, ax_cv_gcc_malloc_call=no)])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[__attribute__((__malloc__))
+ int f(int i) { return i; }]],
+ [])],
+ [ax_cv_gcc_malloc_call=yes], [ax_cv_gcc_malloc_call=no])])
if test "$ax_cv_gcc_malloc_call" = yes; then
AC_DEFINE([GCC_MALLOC_CALL],[__attribute__((__malloc__))],
[most gcc compilers know a function __attribute__((__malloc__))])