diff --git a/TSRM/tsrm.m4 b/TSRM/tsrm.m4 deleted file mode 100644 index d956094a1d9..00000000000 --- a/TSRM/tsrm.m4 +++ /dev/null @@ -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) -]) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 2efabc4cfaa..52032917251 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -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 directory 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 extensions. The libpq paths can be customized with the PGSQL_CFLAGS and PGSQL_LIBS environment variables. When a directory argument is provided to diff --git a/build/php.m4 b/build/php.m4 index 880db91ae8c..1504bfe12cd 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -724,12 +724,7 @@ dnl ---------------------------------------------------------------------------- dnl dnl PHP_BUILD_THREAD_SAFE dnl -AC_DEFUN([PHP_BUILD_THREAD_SAFE],[ - 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 -]) +AC_DEFUN([PHP_BUILD_THREAD_SAFE], [enable_zts=yes]) dnl dnl PHP_REQUIRE_CXX diff --git a/configure.ac b/configure.ac index c9ae2052337..2991fdd0175 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,6 @@ m4_include([build/php_cxx_compile_stdcxx.m4]) m4_include([build/php.m4]) m4_include([build/pkg.m4]) m4_include([TSRM/threads.m4]) -m4_include([TSRM/tsrm.m4]) m4_include([Zend/Zend.m4]) dnl Basic autoconf initialization, generation of config.nice. @@ -871,6 +870,17 @@ else PHP_THREAD_SAFETY=no 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], [whether to dlopen extensions with RTLD_NOW instead of RTLD_LAZY], [AS_HELP_STRING([--enable-rtld-now], @@ -1337,11 +1347,6 @@ PHP_ADD_INCLUDE([$abs_srcdir/TSRM]) ZEND_EXTRA_LIBS="$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_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $LDFLAGS" EXTRA_LIBS="$EXTRA_LIBS $LIBS"