diff options
author | Peter Kokot <peterkokot@gmail.com> | 2018-07-23 10:38:45 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2018-07-23 10:38:45 +0200 |
commit | aadd47319cc22bf278e1a479bb1d0a640d607207 (patch) | |
tree | 7d87490596e6856fc1cf6b7d3d8710afb7e1fbff /m4/ax_check_allocated_ctime.m4 | |
parent | 8ce1199b2756686f2c31dff26a71164cd5a07be7 (diff) | |
download | autoconf-archive-aadd47319cc22bf278e1a479bb1d0a640d607207.tar.gz |
Replace obsolete AC_TRY_RUN with AC_RUN_IFELSE
Autoconf made several macros obsolete including the AC_TRY_RUN and 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_RUN_IFELSE instead.
This patch was created with the help of the autoupdate script.
Reference docs:
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html
- https://www.gnu.org/software/autoconf/manual/autoconf-2.59/autoconf.pdf
Diffstat (limited to 'm4/ax_check_allocated_ctime.m4')
-rw-r--r-- | m4/ax_check_allocated_ctime.m4 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/m4/ax_check_allocated_ctime.m4 b/m4/ax_check_allocated_ctime.m4 index c824fdb..fe48f58 100644 --- a/m4/ax_check_allocated_ctime.m4 +++ b/m4/ax_check_allocated_ctime.m4 @@ -19,18 +19,18 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 7 +#serial 8 AU_ALIAS([AG_CHECK_ALLOCATED_CTIME], [AX_CHECK_ALLOCATED_CTIME]) AC_DEFUN([AX_CHECK_ALLOCATED_CTIME],[ AC_MSG_CHECKING([whether ctime() allocates memory for its result]) AC_CACHE_VAL([ax_cv_allocated_ctime],[ - AC_TRY_RUN([#include <time.h> + AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <time.h> int main (int argc, char** argv) { time_t timeVal = time( (time_t*)NULL ); char* pzTime = ctime( &timeVal ); free( pzTime ); - return 0; }],[ax_cv_allocated_ctime=yes],[ax_cv_allocated_ctime=no],[ax_cv_allocated_ctime=no] + return 0; }]])],[ax_cv_allocated_ctime=yes],[ax_cv_allocated_ctime=no],[ax_cv_allocated_ctime=no] ) # end of TRY_RUN]) # end of CACHE_VAL AC_MSG_RESULT([$ax_cv_allocated_ctime]) |