summaryrefslogtreecommitdiff
path: root/ext/recode
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 /ext/recode
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 'ext/recode')
-rw-r--r--ext/recode/config.m47
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/recode/config.m4 b/ext/recode/config.m4
index 280ed26b33..bb627d4a7a 100644
--- a/ext/recode/config.m4
+++ b/ext/recode/config.m4
@@ -37,12 +37,11 @@ if test "$PHP_RECODE" != "no"; then
old_LIBS=$LIBS
LDFLAGS="$LDFLAGS -L$RECODE_DIR/$RECODE_LIB"
LIBS="$LIBS -lrecode"
- AC_TRY_LINK(
- [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
char *program_name;
- ],[
+ ]],[[
recode_format_table();
- ],[
+ ]])],[
PHP_ADD_LIBRARY_DEFER_WITH_PATH(recode, $RECODE_DIR/$RECODE_LIB, RECODE_SHARED_LIBADD)
AC_DEFINE(HAVE_BROKEN_RECODE, 1, [Whether we have librecode 3.5])
],[