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 /ext/posix | |
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 'ext/posix')
-rw-r--r-- | ext/posix/config.m4 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/posix/config.m4 b/ext/posix/config.m4 index fa47a67d42..dccdcd69a4 100644 --- a/ext/posix/config.m4 +++ b/ext/posix/config.m4 @@ -12,7 +12,7 @@ if test "$PHP_POSIX" = "yes"; then AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod setrlimit getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r) AC_MSG_CHECKING([for working ttyname_r() implementation]) - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <unistd.h> int main(int argc, char *argv[]) @@ -21,7 +21,7 @@ int main(int argc, char *argv[]) return !ttyname_r(0, buf, 64); } - ],[ + ]])],[ AC_MSG_RESULT([yes]) AC_DEFINE(HAVE_TTYNAME_R, 1, [Whether you have a working ttyname_r]) ],[ @@ -31,12 +31,12 @@ int main(int argc, char *argv[]) ]) AC_CACHE_CHECK([for utsname.domainname], ac_cv_have_utsname_domainname, [ - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #define _GNU_SOURCE #include <sys/utsname.h> - ],[ + ]],[[ return sizeof(((struct utsname *)0)->domainname); - ],[ + ]])],[ ac_cv_have_utsname_domainname=yes ],[ ac_cv_have_utsname_domainname=no |