summaryrefslogtreecommitdiff
path: root/ext/fileinfo/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 /ext/fileinfo/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 'ext/fileinfo/config.m4')
-rw-r--r--ext/fileinfo/config.m46
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/fileinfo/config.m4 b/ext/fileinfo/config.m4
index b2fab3cdd1..002066b8eb 100644
--- a/ext/fileinfo/config.m4
+++ b/ext/fileinfo/config.m4
@@ -14,7 +14,7 @@ if test "$PHP_FILEINFO" != "no"; then
libmagic/buffer.c"
AC_MSG_CHECKING([for strcasestr])
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <string.h>
#include <strings.h>
#include <stdlib.h>
@@ -39,14 +39,14 @@ int main(void)
return !(NULL != ret);
}
- ],[
+ ]])],[
dnl using the platform implementation
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
AC_MSG_NOTICE(using libmagic strcasestr implementation)
libmagic_sources="$libmagic_sources libmagic/strcasestr.c"
- ])
+ ],[])
PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic)
PHP_ADD_BUILD_DIR($ext_builddir/libmagic)