summaryrefslogtreecommitdiff
path: root/sapi/cli/config.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 /sapi/cli/config.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 'sapi/cli/config.m4')
-rw-r--r--sapi/cli/config.m49
1 files changed, 4 insertions, 5 deletions
diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4
index 7382963959..93c9e7b702 100644
--- a/sapi/cli/config.m4
+++ b/sapi/cli/config.m4
@@ -9,12 +9,11 @@ AC_CHECK_FUNCS(setproctitle)
AC_CHECK_HEADERS([sys/pstat.h])
AC_CACHE_CHECK([for PS_STRINGS], [cli_cv_var_PS_STRINGS],
-[AC_TRY_LINK(
-[#include <machine/vmparam.h>
+[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <machine/vmparam.h>
#include <sys/exec.h>
-],
-[PS_STRINGS->ps_nargvstr = 1;
-PS_STRINGS->ps_argvstr = "foo";],
+]],
+[[PS_STRINGS->ps_nargvstr = 1;
+PS_STRINGS->ps_argvstr = "foo";]])],
[cli_cv_var_PS_STRINGS=yes],
[cli_cv_var_PS_STRINGS=no])])
if test "$cli_cv_var_PS_STRINGS" = yes ; then