Skip to content

Autotools: Remove obsole Autoconf macros #18914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,18 @@ PHP 8.5 INTERNALS UPGRADE NOTES
without duplicate build rules. It is up to the SAPI maintainers to ensure
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)
configure options are used to ${libdir}/php (ex: /usr/lib64/php)
. 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
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
Expand Down
71 changes: 0 additions & 71 deletions build/php.m4
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ dnl ----------------------------------------------------------------------------
dnl Build system helper macros.
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 PHP_RUN_ONCE(namespace, variable, code)
dnl
Expand Down Expand Up @@ -89,17 +80,6 @@ AC_DEFUN([PHP_SUBST_OLD],[
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 Build system base macros.
dnl ----------------------------------------------------------------------------
Expand Down Expand Up @@ -743,13 +723,6 @@ dnl ----------------------------------------------------------------------------
dnl Build macros
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 PHP_REQUIRE_CXX
dnl
Expand Down Expand Up @@ -1518,31 +1491,6 @@ AC_DEFUN([PHP_CHECK_FUNC],[
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 Platform characteristics checks.
dnl ----------------------------------------------------------------------------
Expand Down Expand Up @@ -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 PHP_CONFIG_NICE(filename)
dnl
Expand Down