summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReini Urban <rurban@cpan.org>2017-09-28 11:50:28 +0200
committerReini Urban <rurban@cpan.org>2017-09-28 12:09:57 +0200
commitd2a928f26c5b584e2820ae35a13266af8593bfb1 (patch)
treeebc05d5e96ed0c256365f459358efefc380052a2
parent31601b741c24f068e61e0531aba2a36aacd08aab (diff)
downloadautoconf-archive-d2a928f26c5b584e2820ae35a13266af8593bfb1.tar.gz
m4: update AX_COMPILE_CHECK_SIZEOF
replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE([AC_LANG_PROGRAM
-rw-r--r--m4/ax_compile_check_sizeof.m47
1 files changed, 4 insertions, 3 deletions
diff --git a/m4/ax_compile_check_sizeof.m4 b/m4/ax_compile_check_sizeof.m4
index 9da377a..5705508 100644
--- a/m4/ax_compile_check_sizeof.m4
+++ b/m4/ax_compile_check_sizeof.m4
@@ -57,6 +57,7 @@
# LICENSE
#
# Copyright (c) 2008 Kaveh Ghazi <ghazi@caip.rutgers.edu>
+# Copyright (c) 2017 Reini Urban <rurban@cpan.org>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
@@ -84,7 +85,7 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 6
+#serial 7
AU_ALIAS([AC_COMPILE_CHECK_SIZEOF], [AX_COMPILE_CHECK_SIZEOF])
AC_DEFUN([AX_COMPILE_CHECK_SIZEOF],
@@ -97,10 +98,10 @@ changequote([, ])dnl
AC_MSG_CHECKING(size of $1)
AC_CACHE_VAL(AC_CV_NAME,
[for ac_size in 4 8 1 2 16 $3 ; do # List sizes in rough order of prevalence.
- AC_TRY_COMPILE([#include "confdefs.h"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
$2
-], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
+]], [[switch (0) case 0: case (sizeof ($1) == $ac_size):;]])], [AC_CV_NAME=$ac_size])
if test x$AC_CV_NAME != x ; then break; fi
done
])