Autotools: Remove obsole Autoconf macros (#18914)

These Autoconf macros have been marked as obsolete in PHP-8.4 and now
also removed:
- PHP_AP_EXTRACT_VERSION
- PHP_BUILD_THREAD_SAFE
- PHP_DEF_HAVE
- PHP_OUTPUT
- PHP_TEST_BUILD
This commit is contained in:
Peter Kokot 2025-06-23 23:43:52 +02:00 committed by GitHub
parent d8c48903c4
commit 29e94f89db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 72 deletions

View file

@ -55,12 +55,18 @@ PHP 8.5 INTERNALS UPGRADE NOTES
without duplicate build rules. It is up to the SAPI maintainers to ensure without duplicate build rules. It is up to the SAPI maintainers to ensure
that appropriate build rules are created. that appropriate build rules are created.
- Linux build system changes - Unix build system changes
. libdir is properly set when --libdir (ex: /usr/lib64) and --with-libdir (ex lib64) . libdir is properly set when --libdir (ex: /usr/lib64) and --with-libdir (ex lib64)
configure options are used to ${libdir}/php (ex: /usr/lib64/php) configure options are used to ${libdir}/php (ex: /usr/lib64/php)
. PHP_ODBC_CFLAGS, PHP_ODBC_LFLAGS, PHP_ODBC_LIBS, PHP_ODBC_TYPE preprocessor . PHP_ODBC_CFLAGS, PHP_ODBC_LFLAGS, PHP_ODBC_LIBS, PHP_ODBC_TYPE preprocessor
macros defined by ext/odbc are now defined in php_config.h instead of the macros defined by ext/odbc are now defined in php_config.h instead of the
build-defs.h header. build-defs.h header.
. Autoconf macro PHP_AP_EXTRACT_VERSION has been removed.
. Autoconf macro PHP_BUILD_THREAD_SAFE has been removed (set enable_zts
manually).
. Autoconf macro PHP_DEF_HAVE has been removed (use AC_DEFINE).
. Autoconf macro PHP_OUTPUT has been removed (use AC_CONFIG_FILES).
. Autoconf macro PHP_TEST_BUILD has been removed (use AC_* macros).
======================== ========================
3. Module changes 3. Module changes

View file

@ -26,15 +26,6 @@ dnl ----------------------------------------------------------------------------
dnl Build system helper macros. dnl Build system helper macros.
dnl ---------------------------------------------------------------------------- dnl ----------------------------------------------------------------------------
dnl
dnl PHP_DEF_HAVE(what)
dnl
dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [ ])'.
dnl
AC_DEFUN([PHP_DEF_HAVE], [m4_warn([obsolete],
[The macro 'PHP_DEF_HAVE' is obsolete. Use AC_DEFINE.])
AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___), 1, [ ])])
dnl dnl
dnl PHP_RUN_ONCE(namespace, variable, code) dnl PHP_RUN_ONCE(namespace, variable, code)
dnl dnl
@ -89,17 +80,6 @@ AC_DEFUN([PHP_SUBST_OLD],[
PHP_SUBST([$1]) PHP_SUBST([$1])
]) ])
dnl
dnl PHP_OUTPUT(file)
dnl
dnl Adds "file" to the list of files generated by AC_OUTPUT. This macro can be
dnl used several times. This macro is obsolete as of PHP 8.4 in favor of the
dnl default AC_CONFIG_FILES.
dnl
AC_DEFUN([PHP_OUTPUT],
[m4_warn([obsolete], [The macro 'PHP_OUTPUT' is obsolete. Use AC_CONFIG_FILES.])
AC_CONFIG_FILES([$1])])
dnl ---------------------------------------------------------------------------- dnl ----------------------------------------------------------------------------
dnl Build system base macros. dnl Build system base macros.
dnl ---------------------------------------------------------------------------- dnl ----------------------------------------------------------------------------
@ -743,13 +723,6 @@ dnl ----------------------------------------------------------------------------
dnl Build macros dnl Build macros
dnl ---------------------------------------------------------------------------- dnl ----------------------------------------------------------------------------
dnl
dnl PHP_BUILD_THREAD_SAFE
dnl
AC_DEFUN([PHP_BUILD_THREAD_SAFE], [m4_warn([obsolete],
[The macro 'PHP_BUILD_THREAD_SAFE' is obsolete. Set 'enable_zts' manually.])
enable_zts=yes])
dnl dnl
dnl PHP_REQUIRE_CXX dnl PHP_REQUIRE_CXX
dnl dnl
@ -1518,31 +1491,6 @@ AC_DEFUN([PHP_CHECK_FUNC],[
esac esac
]) ])
dnl
dnl PHP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs [, extra-source]])
dnl
dnl This macro checks whether build works and given function exists.
dnl
AC_DEFUN([PHP_TEST_BUILD], [m4_warn([obsolete],
[The macro 'PHP_TEST_BUILD' is obsolete. Use AC_* macros.])
old_LIBS=$LIBS
LIBS="$4 $LIBS"
AC_LINK_IFELSE([AC_LANG_SOURCE([
$5
char $1(void);
int main(void) {
$1();
return 0;
}
])],[
LIBS=$old_LIBS
$2
],[
LIBS=$old_LIBS
$3
])
])
dnl ---------------------------------------------------------------------------- dnl ----------------------------------------------------------------------------
dnl Platform characteristics checks. dnl Platform characteristics checks.
dnl ---------------------------------------------------------------------------- dnl ----------------------------------------------------------------------------
@ -2039,25 +1987,6 @@ AC_DEFUN([PHP_INSTALL_HEADERS],
]) ])
]) ])
dnl
dnl PHP_AP_EXTRACT_VERSION(/path/httpd)
dnl
dnl This macro is used to get a comparable version for Apache.
dnl
AC_DEFUN([PHP_AP_EXTRACT_VERSION], [m4_warn([obsolete],
[The macro 'PHP_AP_EXTRACT_VERSION' is obsolete. Use 'apxs -q HTTPD_VERSION'])
AS_IF([test -x "$1"], [
ac_output=$($1 -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//')
ac_IFS=$IFS
IFS="- /.
"
set $ac_output
IFS=$ac_IFS
APACHE_VERSION=$(expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6)
])
])
dnl dnl
dnl PHP_CONFIG_NICE(filename) dnl PHP_CONFIG_NICE(filename)
dnl dnl