mirror of
https://github.com/php/php-src.git
synced 2024-09-21 01:47:25 +00:00
Autotools: Simplify POSIX Threads check (#14855)
The PTHREADS_CHECK is using cache variables so it is run only once early during the configuration phase, before including SAPI and other M4 files. This removes the TSRM_CHECK_PTHREADS macro and moves the POSIX Threads check after the PHP_THREAD_SAFETY variable is set in configure.ac. The check and error throw in PHP_BUILD_THREAD_SAFE is also joing into this single check. This removes the redundant tsrm.m4 file and PHP_CONFIGURE_PART call for TSRM as it doesn't run any configuration checks anymore.
This commit is contained in:
parent
9def76ebbc
commit
e9254494ff
15
TSRM/tsrm.m4
15
TSRM/tsrm.m4
@ -1,15 +0,0 @@
|
|||||||
dnl This file contains TSRM specific autoconf macros.
|
|
||||||
|
|
||||||
dnl
|
|
||||||
dnl TSRM_CHECK_PTHREADS
|
|
||||||
dnl
|
|
||||||
AC_DEFUN([TSRM_CHECK_PTHREADS],[
|
|
||||||
PTHREADS_CHECK
|
|
||||||
|
|
||||||
if test "$pthreads_working" != "yes"; then
|
|
||||||
AC_MSG_ERROR(Your system seems to lack POSIX threads.)
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(for POSIX threads)
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
])
|
|
@ -156,6 +156,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES
|
|||||||
- PDO extensions in php-src don't have the include flag -I$pdo_cv_inc_path
|
- PDO extensions in php-src don't have the include flag -I$pdo_cv_inc_path
|
||||||
directory anymore.
|
directory anymore.
|
||||||
- M4 macro PHP_SETUP_OPENSSL doesn't accept the 3rd argument anymore.
|
- M4 macro PHP_SETUP_OPENSSL doesn't accept the 3rd argument anymore.
|
||||||
|
- TSRM/tsrm.m4 file and its TSRM_CHECK_PTHREADS M4 macro have been removed.
|
||||||
- Added pkg-config support to find libpq for the pdo_pgsql and pgsql
|
- Added pkg-config support to find libpq for the pdo_pgsql and pgsql
|
||||||
extensions. The libpq paths can be customized with the PGSQL_CFLAGS and
|
extensions. The libpq paths can be customized with the PGSQL_CFLAGS and
|
||||||
PGSQL_LIBS environment variables. When a directory argument is provided to
|
PGSQL_LIBS environment variables. When a directory argument is provided to
|
||||||
|
@ -724,12 +724,7 @@ dnl ----------------------------------------------------------------------------
|
|||||||
dnl
|
dnl
|
||||||
dnl PHP_BUILD_THREAD_SAFE
|
dnl PHP_BUILD_THREAD_SAFE
|
||||||
dnl
|
dnl
|
||||||
AC_DEFUN([PHP_BUILD_THREAD_SAFE],[
|
AC_DEFUN([PHP_BUILD_THREAD_SAFE], [enable_zts=yes])
|
||||||
enable_zts=yes
|
|
||||||
if test "$pthreads_working" != "yes"; then
|
|
||||||
AC_MSG_ERROR([ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads.])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl PHP_REQUIRE_CXX
|
dnl PHP_REQUIRE_CXX
|
||||||
|
17
configure.ac
17
configure.ac
@ -11,7 +11,6 @@ m4_include([build/php_cxx_compile_stdcxx.m4])
|
|||||||
m4_include([build/php.m4])
|
m4_include([build/php.m4])
|
||||||
m4_include([build/pkg.m4])
|
m4_include([build/pkg.m4])
|
||||||
m4_include([TSRM/threads.m4])
|
m4_include([TSRM/threads.m4])
|
||||||
m4_include([TSRM/tsrm.m4])
|
|
||||||
m4_include([Zend/Zend.m4])
|
m4_include([Zend/Zend.m4])
|
||||||
|
|
||||||
dnl Basic autoconf initialization, generation of config.nice.
|
dnl Basic autoconf initialization, generation of config.nice.
|
||||||
@ -871,6 +870,17 @@ else
|
|||||||
PHP_THREAD_SAFETY=no
|
PHP_THREAD_SAFETY=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AS_VAR_IF([PHP_THREAD_SAFETY], [yes], [
|
||||||
|
AS_VAR_IF([pthreads_working], [yes], [],
|
||||||
|
[AC_MSG_ERROR([m4_normalize([
|
||||||
|
Unable to verify system support for POSIX Threads, which are required for
|
||||||
|
PHP thread safety (ZTS) build.
|
||||||
|
])])])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([for POSIX threads])
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
])
|
||||||
|
|
||||||
PHP_ARG_ENABLE([rtld-now],
|
PHP_ARG_ENABLE([rtld-now],
|
||||||
[whether to dlopen extensions with RTLD_NOW instead of RTLD_LAZY],
|
[whether to dlopen extensions with RTLD_NOW instead of RTLD_LAZY],
|
||||||
[AS_HELP_STRING([--enable-rtld-now],
|
[AS_HELP_STRING([--enable-rtld-now],
|
||||||
@ -1337,11 +1347,6 @@ PHP_ADD_INCLUDE([$abs_srcdir/TSRM])
|
|||||||
ZEND_EXTRA_LIBS="$LIBS"
|
ZEND_EXTRA_LIBS="$LIBS"
|
||||||
unset LIBS
|
unset LIBS
|
||||||
|
|
||||||
PHP_CONFIGURE_PART(Configuring TSRM)
|
|
||||||
if test "$PHP_THREAD_SAFETY" = "yes"; then
|
|
||||||
TSRM_CHECK_PTHREADS
|
|
||||||
fi
|
|
||||||
|
|
||||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LDFLAGS"
|
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LDFLAGS"
|
||||||
EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $LDFLAGS"
|
EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $LDFLAGS"
|
||||||
EXTRA_LIBS="$EXTRA_LIBS $LIBS"
|
EXTRA_LIBS="$EXTRA_LIBS $LIBS"
|
||||||
|
Loading…
Reference in New Issue
Block a user