diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-11-24 15:52:41 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-11-25 11:47:05 +0100 |
commit | 4633e70ab1d03cbbfdb166a3c1912d2277c02882 (patch) | |
tree | 79ca1620d8f318b56464c8ed93e41573e5f52b78 /configure.ac | |
parent | 37f96d990c1152de7cb0ab1ad4d7d001420aa716 (diff) | |
download | php-git-4633e70ab1d03cbbfdb166a3c1912d2277c02882.tar.gz |
Fixed bug #80377
Make sure the $PHP_THREAD_SAFETY variable is always available
when configuring extensions. It was previously available for
phpized extensions, but for in-tree builds it was being set
too late.
Then, use $PHP_THREAD_SAFETY instead of $enable_zts to check for
ZTS in bundled extensions, which makes sure these checks also
work for phpize builds.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 8d6e922fa9..e07a75d19a 100644 --- a/configure.ac +++ b/configure.ac @@ -797,6 +797,19 @@ if test "$PHP_DEBUG_ASSERTIONS" = "yes"; then ZEND_DEBUG=yes fi +AC_ARG_ENABLE([zts], + [AS_HELP_STRING([--enable-zts], + [Enable thread safety])], + [ZEND_ZTS=$enableval], + [ZEND_ZTS=no]) + +if test "$ZEND_ZTS" = "yes"; then + AC_DEFINE(ZTS, 1,[ ]) + PHP_THREAD_SAFETY=yes +else + PHP_THREAD_SAFETY=no +fi + PHP_ARG_ENABLE([rtld-now], [whether to dlopen extensions with RTLD_NOW instead of RTLD_LAZY], [AS_HELP_STRING([--enable-rtld-now], @@ -1136,13 +1149,6 @@ LIBZEND_BASIC_CHECKS LIBZEND_DLSYM_CHECK LIBZEND_OTHER_CHECKS -if test "$ZEND_ZTS" = "yes"; then - AC_DEFINE(ZTS,1,[ ]) - PHP_THREAD_SAFETY=yes -else - PHP_THREAD_SAFETY=no -fi - INCLUDES="$INCLUDES -I\$(top_builddir)/TSRM" INCLUDES="$INCLUDES -I\$(top_builddir)/Zend" |