diff options
author | Peter Kokot <peterkokot@gmail.com> | 2018-07-30 01:50:24 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2018-07-30 02:36:38 +0200 |
commit | 4371945b8b71e000ee060b9da668a6eea032df32 (patch) | |
tree | 53881f0f9b52f523fc87cdd7b93c272572ca3b61 /Zend/acinclude.m4 | |
parent | aac5cdc7d7d4323f9cf93736e2107d22405e09a6 (diff) | |
download | php-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/acinclude.m4')
-rw-r--r-- | Zend/acinclude.m4 | 45 |
1 files changed, 21 insertions, 24 deletions
diff --git a/Zend/acinclude.m4 b/Zend/acinclude.m4 index 8b8d942e2c..f45a7a7c13 100644 --- a/Zend/acinclude.m4 +++ b/Zend/acinclude.m4 @@ -44,16 +44,14 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[ AC_DEFUN([ZEND_FP_EXCEPT],[ AC_CACHE_CHECK(whether fp_except is defined, ac_cv_type_fp_except,[ - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <floatingpoint.h> -],[ +]],[[ fp_except x = (fp_except) 0; -],[ +]])],[ ac_cv_type_fp_except=yes ],[ ac_cv_type_fp_except=no -],[ - ac_cv_type_fp_except=no ])]) if test "$ac_cv_type_fp_except" = "yes"; then AC_DEFINE(HAVE_FP_EXCEPT, 1, [whether floatingpoint.h defines fp_except]) @@ -65,7 +63,7 @@ dnl Check for broken sprintf() dnl AC_DEFUN([AC_ZEND_BROKEN_SPRINTF],[ AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[ - AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[ + AC_RUN_IFELSE([AC_LANG_SOURCE([[main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }]])],[ ac_cv_broken_sprintf=no ],[ ac_cv_broken_sprintf=yes @@ -89,8 +87,7 @@ AC_DEFUN([AC_ZEND_C_BIGENDIAN], [AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php, [ ac_cv_c_bigendian_php=unknown - AC_TRY_RUN( - [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ int main(void) { short one = 1; @@ -102,7 +99,7 @@ int main(void) return(1); } } - ], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown]) + ]])], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown]) ]) if test $ac_cv_c_bigendian_php = yes; then AC_DEFINE(WORDS_BIGENDIAN, 1, [Define if processor uses big-endian word]) @@ -117,9 +114,9 @@ dnl x87 floating point internal precision control checks dnl See: http://wiki.php.net/rfc/rounding AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[ AC_MSG_CHECKING([for usable _FPU_SETCW]) - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <fpu_control.h> - ],[ + ]],[[ fpu_control_t fpu_oldcw, fpu_cw; volatile double result; double a = 2877.0; @@ -130,7 +127,7 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[ _FPU_SETCW(fpu_cw); result = a / b; _FPU_SETCW(fpu_oldcw); - ], [ac_cfp_have__fpu_setcw=yes], [ac_cfp_have__fpu_setcw=no]) + ]])],[ac_cfp_have__fpu_setcw=yes],[ac_cfp_have__fpu_setcw=no]) if test "$ac_cfp_have__fpu_setcw" = "yes" ; then AC_DEFINE(HAVE__FPU_SETCW, 1, [whether _FPU_SETCW is present and usable]) AC_MSG_RESULT(yes) @@ -139,9 +136,9 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[ fi AC_MSG_CHECKING([for usable fpsetprec]) - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <machine/ieeefp.h> - ],[ + ]],[[ fp_prec_t fpu_oldprec; volatile double result; double a = 2877.0; @@ -151,7 +148,7 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[ fpsetprec(FP_PD); result = a / b; fpsetprec(fpu_oldprec); - ], [ac_cfp_have_fpsetprec=yes], [ac_cfp_have_fpsetprec=no]) + ]])], [ac_cfp_have_fpsetprec=yes], [ac_cfp_have_fpsetprec=no]) if test "$ac_cfp_have_fpsetprec" = "yes" ; then AC_DEFINE(HAVE_FPSETPREC, 1, [whether fpsetprec is present and usable]) AC_MSG_RESULT(yes) @@ -160,9 +157,9 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[ fi AC_MSG_CHECKING([for usable _controlfp]) - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <float.h> - ],[ + ]],[[ unsigned int fpu_oldcw; volatile double result; double a = 2877.0; @@ -172,7 +169,7 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[ _controlfp(_PC_53, _MCW_PC); result = a / b; _controlfp(fpu_oldcw, _MCW_PC); - ], [ac_cfp_have__controlfp=yes], [ac_cfp_have__controlfp=no]) + ]])], [ac_cfp_have__controlfp=yes], [ac_cfp_have__controlfp=no]) if test "$ac_cfp_have__controlfp" = "yes" ; then AC_DEFINE(HAVE__CONTROLFP, 1, [whether _controlfp is present usable]) AC_MSG_RESULT(yes) @@ -181,9 +178,9 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[ fi AC_MSG_CHECKING([for usable _controlfp_s]) - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <float.h> - ],[ + ]],[[ unsigned int fpu_oldcw, fpu_cw; volatile double result; double a = 2877.0; @@ -194,7 +191,7 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[ _controlfp_s(&fpu_cw, _PC_53, _MCW_PC); result = a / b; _controlfp_s(&fpu_cw, fpu_oldcw, _MCW_PC); - ], [ac_cfp_have__controlfp_s=yes], [ac_cfp_have__controlfp_s=no]) + ]])], [ac_cfp_have__controlfp_s=yes], [ac_cfp_have__controlfp_s=no]) if test "$ac_cfp_have__controlfp_s" = "yes" ; then AC_DEFINE(HAVE__CONTROLFP_S, 1, [whether _controlfp_s is present and usable]) AC_MSG_RESULT(yes) @@ -203,9 +200,9 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[ fi AC_MSG_CHECKING([whether FPU control word can be manipulated by inline assembler]) - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ /* nothing */ - ],[ + ]],[[ unsigned int oldcw, cw; volatile double result; double a = 2877.0; @@ -218,7 +215,7 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[ result = a / b; __asm__ __volatile__ ("fldcw %0" : : "m" (*&oldcw)); - ], [ac_cfp_have_fpu_inline_asm_x86=yes], [ac_cfp_have_fpu_inline_asm_x86=no]) + ]])], [ac_cfp_have_fpu_inline_asm_x86=yes], [ac_cfp_have_fpu_inline_asm_x86=no]) if test "$ac_cfp_have_fpu_inline_asm_x86" = "yes" ; then AC_DEFINE(HAVE_FPU_INLINE_ASM_X86, 1, [whether FPU control word can be manipulated by inline assembler]) AC_MSG_RESULT(yes) |