summaryrefslogtreecommitdiff
path: root/Zend/Zend.m4
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-07-30 01:50:24 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-07-30 02:36:38 +0200
commit4371945b8b71e000ee060b9da668a6eea032df32 (patch)
tree53881f0f9b52f523fc87cdd7b93c272572ca3b61 /Zend/Zend.m4
parentaac5cdc7d7d4323f9cf93736e2107d22405e09a6 (diff)
downloadphp-git-4371945b8b71e000ee060b9da668a6eea032df32.tar.gz
Replace obsolete AC_TRY_FOO with AC_FOO_IFELSE
Autoconf 2.50 released in 2001 made several macros obsolete including the AC_TRY_RUN, AC_TRY_COMPILE and AC_TRY_LINK: http://git.savannah.gnu.org/cgit/autoconf.git/tree/ChangeLog.2 These macros should be replaced with the current AC_FOO_IFELSE instead: - AC_TRY_RUN with AC_RUN_IFELSE and AC_LANG_SOURCE - AC_TRY_LINK with AC_LINK_IFELSE and AC_LANG_PROGRAM - AC_TRY_COMPILE with AC_COMPILE_IFELSE and AC_LANG_PROGRAM PHP 5.4 to 7.1 require Autoconf 2.59+ version, PHP 7.2 and above require 2.64+ version, and the PHP 7.2 phpize script requires 2.59+ version which are all greater than above mentioned 2.50 version therefore systems should be well supported by now. This patch was created with the help of autoupdate script: autoupdate <file> 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 'Zend/Zend.m4')
-rw-r--r--Zend/Zend.m450
1 files changed, 25 insertions, 25 deletions
diff --git a/Zend/Zend.m4 b/Zend/Zend.m4
index 2b489a82f2..3be411fe43 100644
--- a/Zend/Zend.m4
+++ b/Zend/Zend.m4
@@ -4,7 +4,7 @@ dnl
AC_DEFUN([LIBZEND_CHECK_INT_TYPE],[
AC_MSG_CHECKING(for $1)
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -12,16 +12,16 @@ AC_TRY_COMPILE([
#include <inttypes.h>
#elif HAVE_STDINT_H
#include <stdint.h>
-#endif],
-[if (($1 *) 0)
+#endif]],
+[[if (($1 *) 0)
return 0;
if (sizeof ($1))
return 0;
-],[
+]])],[
AC_DEFINE_UNQUOTED([HAVE_]translit($1,a-z_-,A-Z__), 1,[Define if $1 type is present. ])
AC_MSG_RESULT(yes)
-], AC_MSG_RESULT(no)
-)dnl
+], [AC_MSG_RESULT(no)
+])dnl
])
AC_DEFUN([LIBZEND_BASIC_CHECKS],[
@@ -106,7 +106,7 @@ ZEND_CHECK_FLOAT_PRECISION
dnl test whether double cast to long preserves least significant bits
AC_MSG_CHECKING(whether double cast to long preserves least significant bits)
-AC_TRY_RUN([
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <limits.h>
int main()
@@ -126,7 +126,7 @@ int main()
}
exit(1);
}
-], [
+]])], [
AC_DEFINE([ZEND_DVAL_TO_LVAL_CAST_OK], 1, [Define if double cast to long preserves least significant bits])
AC_MSG_RESULT(yes)
], [
@@ -219,7 +219,7 @@ dnl test and set the alignment define for ZEND_MM
dnl this also does the logarithmic test for ZEND_MM.
AC_MSG_CHECKING(for MM alignment and log values)
-AC_TRY_RUN([
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
typedef union _mm_align_test {
@@ -251,7 +251,7 @@ int main()
exit(0);
}
-], [
+]])], [
LIBZEND_MM_ALIGN=`cat conftest.zend | cut -d ' ' -f 1`
LIBZEND_MM_ALIGN_LOG2=`cat conftest.zend | cut -d ' ' -f 2`
AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT, $LIBZEND_MM_ALIGN, [ ])
@@ -266,7 +266,7 @@ AC_MSG_RESULT(done)
dnl test for memory allocation using mmap(MAP_ANON)
AC_MSG_CHECKING(for memory allocation using mmap(MAP_ANON))
-AC_TRY_RUN([
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -298,7 +298,7 @@ int main()
}
return 0;
}
-], [
+]])], [
AC_DEFINE([HAVE_MEM_MMAP_ANON], 1, [Define if the target system has support for memory allocation using mmap(MAP_ANON)])
AC_MSG_RESULT(yes)
], [
@@ -311,7 +311,7 @@ int main()
dnl test for memory allocation using mmap("/dev/zero")
AC_MSG_CHECKING(for memory allocation using mmap("/dev/zero"))
-AC_TRY_RUN([
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -353,7 +353,7 @@ int main()
}
return 0;
}
-], [
+]])], [
AC_DEFINE([HAVE_MEM_MMAP_ZERO], 1, [Define if the target system has support for memory allocation using mmap("/dev/zero")])
AC_MSG_RESULT(yes)
], [
@@ -417,7 +417,7 @@ AC_ARG_ENABLE(gcc-global-regs,
])
AC_MSG_CHECKING(for global register variables support)
if test "$ZEND_GCC_GLOBAL_REGS" != "no"; then
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if defined(__GNUC__)
# define ZEND_GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
#else
@@ -450,8 +450,8 @@ int emu(const opcode_handler_t *ip, void *fp) {
FP = orig_fp;
IP = orig_ip;
}
- ], [
- ], [
+ ]], [[
+ ]])], [
ZEND_GCC_GLOBAL_REGS=yes
], [
ZEND_GCC_GLOBAL_REGS=no
@@ -468,7 +468,7 @@ dnl
dnl Check if atof() accepts NAN
dnl
AC_CACHE_CHECK(whether atof() accepts NAN, ac_cv_atof_accept_nan,[
-AC_TRY_RUN([
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <math.h>
#include <stdlib.h>
@@ -484,7 +484,7 @@ int main(int argc, char** argv)
{
return zend_isnan(atof("NAN")) ? 0 : 1;
}
-],[
+]])],[
ac_cv_atof_accept_nan=yes
],[
ac_cv_atof_accept_nan=no
@@ -499,7 +499,7 @@ dnl
dnl Check if atof() accepts INF
dnl
AC_CACHE_CHECK(whether atof() accepts INF, ac_cv_atof_accept_inf,[
-AC_TRY_RUN([
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <math.h>
#include <stdlib.h>
@@ -518,7 +518,7 @@ int main(int argc, char** argv)
{
return zend_isinf(atof("INF")) && zend_isinf(atof("-INF")) ? 0 : 1;
}
-],[
+]])],[
ac_cv_atof_accept_inf=yes
],[
ac_cv_atof_accept_inf=no
@@ -533,7 +533,7 @@ dnl
dnl Check if HUGE_VAL == INF
dnl
AC_CACHE_CHECK(whether HUGE_VAL == INF, ac_cv_huge_val_inf,[
-AC_TRY_RUN([
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <math.h>
#include <stdlib.h>
@@ -552,7 +552,7 @@ int main(int argc, char** argv)
{
return zend_isinf(HUGE_VAL) ? 0 : 1;
}
-],[
+]])],[
ac_cv_huge_val_inf=yes
],[
ac_cv_huge_val_inf=no
@@ -568,7 +568,7 @@ dnl
dnl Check if HUGE_VAL + -HUGEVAL == NAN
dnl
AC_CACHE_CHECK(whether HUGE_VAL + -HUGEVAL == NAN, ac_cv_huge_val_nan,[
-AC_TRY_RUN([
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <math.h>
#include <stdlib.h>
@@ -589,7 +589,7 @@ int main(int argc, char** argv)
return zend_isnan(HUGE_VAL + -HUGE_VAL) ? 0 : 1;
#endif
}
-],[
+]])],[
ac_cv_huge_val_nan=yes
],[
ac_cv_huge_val_nan=no