Skip to content

Commit aeecfd8

Browse files
committed
Autotools: Obsolete PHP_TEST_BUILD and PHP_BUILD_THREAD_SAFE
The PHP_BUILD_THREAD_SAFE macro is a simple wrapper around setting the enable_zts variable and can't be used in PHP extensions realistically. The PHP_TEST_BUILD macro might produce warnings on certain compiler configurations and default AC_* macros like AC_LINK_IFELSE, AC_CHECK_LIB, or AC_CHECK_FUNC are better suited for such checks. Also, a quick browse through the open-source PHP extensions doesn't find usages of this macro except in imap extension where patch is was already sent: php/pecl-mail-imap#11
1 parent 7771ec0 commit aeecfd8

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

UPGRADING.INTERNALS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ PHP 8.4 INTERNALS UPGRADE NOTES
190190
- Autoconf macro PHP_SETUP_ICONV doesn't define the HAVE_ICONV symbol
191191
anymore.
192192
- Autoconf macro PHP_OUTPUT is obsolete (use AC_CONFIG_FILES).
193+
- Autoconf macro PHP_TEST_BUILD is obsolete (use AC_* macros).
194+
- Autoconf macro PHP_BUILD_THREAD_SAFE is obsolete (set enable_zts manually).
193195
- Autoconf macro PHP_PROG_SETUP now accepts an argument to set the minimum
194196
required PHP version during the build.
195197
- Autoconf macro PHP_INSTALL_HEADERS arguments can now be also

build/php.m4

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,9 @@ dnl ----------------------------------------------------------------------------
744744
dnl
745745
dnl PHP_BUILD_THREAD_SAFE
746746
dnl
747-
AC_DEFUN([PHP_BUILD_THREAD_SAFE], [enable_zts=yes])
747+
AC_DEFUN([PHP_BUILD_THREAD_SAFE], [m4_warn([obsolete],
748+
[The macro 'PHP_BUILD_THREAD_SAFE' is obsolete. Set 'enable_zts' manually.])
749+
enable_zts=yes])
748750

749751
dnl
750752
dnl PHP_REQUIRE_CXX
@@ -1510,7 +1512,8 @@ dnl PHP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs [, ext
15101512
dnl
15111513
dnl This macro checks whether build works and given function exists.
15121514
dnl
1513-
AC_DEFUN([PHP_TEST_BUILD], [
1515+
AC_DEFUN([PHP_TEST_BUILD], [m4_warn([obsolete],
1516+
[The macro 'PHP_TEST_BUILD' is obsolete. Use AC_* macros.])
15141517
old_LIBS=$LIBS
15151518
LIBS="$4 $LIBS"
15161519
AC_LINK_IFELSE([AC_LANG_SOURCE([

sapi/apache2handler/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ if test "$PHP_APXS2" != "no"; then
112112

113113
AS_IF([$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes' >/dev/null 2>&1], [
114114
APACHE_THREADED_MPM=yes
115-
PHP_BUILD_THREAD_SAFE
115+
enable_zts=yes
116116
], [APACHE_THREADED_MPM=no])
117117

118118
AC_CONFIG_COMMANDS([apache2handler], [AS_VAR_IF([enable_zts], [yes],,

0 commit comments

Comments
 (0)