mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Replace PHP_OUTPUT with AC_CONFIG_FILES (#15186)
This is a follow-up of GH-15177 (c96f08aa70
) and GH-15185 (9467ffb43c
) The PHP_OUTPUT macro was introduced in the very early phase of the build system due to AC_OUTPUT handling issues in the old Autoconf versions before the AC_CONFIG_FILES, AC_CONFIG_COMMANDS etc were introduced with the AC_OUTPUT signature without arguments. The PHP_OUTPUT was also helping Makefile.in back then being properly generated based on whether all files were generated or only some (when using the obsolete CONFIG_FILES=... ./config.status invocation instead of the new ./config.status --file=...). Another issue is that PHP_OUTPUT can't be used by extensions when using phpize. This replaces the PHP_OUTPUT invocations with default AC_CONFIG_FILES. The obsolete "REDO_ALL" feature at the config.status invocation is also removed with a simpler unconditional generation. In phar extension the "ext/phar" is replaced with $ext_dir variable to be able to use phpize.
This commit is contained in:
parent
16d9bd0aae
commit
4f07cdc584
@ -174,6 +174,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES
|
||||
- M4 macro PHP_SETUP_LIBXML doesn't define the redundant HAVE_LIBXML symbol
|
||||
anymore.
|
||||
- M4 macro PHP_SETUP_ICONV doesn't define the HAVE_ICONV symbol anymore.
|
||||
- M4 macro PHP_OUTPUT is obsolete (use AC_CONFIG_FILES).
|
||||
- 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
|
||||
|
@ -94,10 +94,12 @@ 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.
|
||||
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],
|
||||
[AS_VAR_APPEND([PHP_OUTPUT_FILES], [" m4_normalize([$1])"])])
|
||||
[m4_warn([obsolete], [The macro 'PHP_OUTPUT' is obsolete. Use AC_CONFIG_FILES.])
|
||||
AC_CONFIG_FILES([$1])])
|
||||
|
||||
dnl ----------------------------------------------------------------------------
|
||||
dnl Build system base macros.
|
||||
|
30
configure.ac
30
configure.ac
@ -1829,13 +1829,13 @@ PHP_ADD_BUILD_DIR(m4_normalize([
|
||||
Zend/Optimizer
|
||||
]))
|
||||
|
||||
ALL_OUTPUT_FILES="main/build-defs.h \
|
||||
scripts/phpize scripts/man1/phpize.1 \
|
||||
scripts/php-config scripts/man1/php-config.1 \
|
||||
$PHP_OUTPUT_FILES"
|
||||
|
||||
dnl Generate build files.
|
||||
AC_CONFIG_FILES([$ALL_OUTPUT_FILES])
|
||||
AC_CONFIG_FILES([
|
||||
main/build-defs.h
|
||||
scripts/man1/php-config.1
|
||||
scripts/man1/phpize.1
|
||||
scripts/php-config
|
||||
scripts/phpize
|
||||
])
|
||||
|
||||
AC_CONFIG_COMMANDS_PRE([PHP_PATCH_CONFIG_HEADERS([main/php_config.h.in])])
|
||||
|
||||
@ -1855,24 +1855,16 @@ Thank you for using PHP.
|
||||
|
||||
X
|
||||
],[
|
||||
|
||||
if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then
|
||||
REDO_ALL=yes
|
||||
fi
|
||||
|
||||
dnl Create configuration headers.
|
||||
dnl ----------------------------------------------------------------------------
|
||||
cat >Zend/zend_config.h <<FEO
|
||||
#include <../main/php_config.h>
|
||||
FEO
|
||||
|
||||
dnl Run this only when generating all the files.
|
||||
if test -n "\$REDO_ALL"; then
|
||||
echo "creating main/internal_functions.c"
|
||||
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_STATIC" > main/internal_functions.c
|
||||
echo "creating main/internal_functions.c"
|
||||
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_STATIC" > main/internal_functions.c
|
||||
|
||||
echo "creating main/internal_functions_cli.c"
|
||||
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_CLI_STATIC" > main/internal_functions_cli.c
|
||||
fi
|
||||
echo "creating main/internal_functions_cli.c"
|
||||
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_CLI_STATIC" > main/internal_functions_cli.c
|
||||
])
|
||||
AC_OUTPUT
|
||||
|
@ -35,5 +35,8 @@ if test "$PHP_PHAR" != "no"; then
|
||||
|
||||
PHP_INSTALL_HEADERS([ext/phar], [php_phar.h])
|
||||
|
||||
PHP_OUTPUT([ext/phar/phar.1 ext/phar/phar.phar.1])
|
||||
AC_CONFIG_FILES([
|
||||
$ext_dir/phar.1
|
||||
$ext_dir/phar.phar.1
|
||||
])
|
||||
fi
|
||||
|
@ -58,5 +58,5 @@ if test "$PHP_CGI" != "no"; then
|
||||
PHP_SUBST([SAPI_CGI_PATH])
|
||||
PHP_SUBST([BUILD_CGI])
|
||||
|
||||
PHP_OUTPUT([sapi/cgi/php-cgi.1])
|
||||
AC_CONFIG_FILES([sapi/cgi/php-cgi.1])
|
||||
fi
|
||||
|
@ -55,7 +55,7 @@ if test "$PHP_CLI" != "no"; then
|
||||
PHP_SUBST([SAPI_CLI_PATH])
|
||||
PHP_SUBST([BUILD_CLI])
|
||||
|
||||
PHP_OUTPUT([sapi/cli/php.1])
|
||||
AC_CONFIG_FILES([sapi/cli/php.1])
|
||||
|
||||
PHP_INSTALL_HEADERS([sapi/cli], [cli.h])
|
||||
fi
|
||||
|
@ -508,7 +508,7 @@ if test "$PHP_FPM" != "no"; then
|
||||
|
||||
PHP_ADD_BUILD_DIR([sapi/fpm/fpm])
|
||||
PHP_ADD_BUILD_DIR([sapi/fpm/fpm/events])
|
||||
PHP_OUTPUT([
|
||||
AC_CONFIG_FILES([
|
||||
sapi/fpm/init.d.php-fpm
|
||||
sapi/fpm/php-fpm.8
|
||||
sapi/fpm/php-fpm.conf
|
||||
|
@ -102,5 +102,5 @@ if test "$PHP_PHPDBG" != "no"; then
|
||||
PHP_SUBST([BUILD_PHPDBG])
|
||||
PHP_SUBST([BUILD_PHPDBG_SHARED])
|
||||
|
||||
PHP_OUTPUT([sapi/phpdbg/phpdbg.1])
|
||||
AC_CONFIG_FILES([sapi/phpdbg/phpdbg.1])
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user