From 0db0a571f52e6905d2bd5680c6d9d63c3aa82316 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sun, 7 Jul 2019 18:24:52 +0200 Subject: [PATCH] Remove PHP_OUTPUT - Using AC_CONFIG_FILES instead of custom PHP_OUTPUT - config.status refactorings: - Instead of setting the REDO_ALL variable commands can be used and newer config.status invocation where needed. --- build/php.m4 | 10 ---- configure.ac | 111 ++++++++++++++++++++++-------------------- ext/phar/config.m4 | 2 +- sapi/cgi/config9.m4 | 2 +- sapi/cli/config.m4 | 2 +- sapi/fpm/config.m4 | 11 ++++- sapi/phpdbg/config.m4 | 2 +- scripts/Makefile.frag | 4 +- 8 files changed, 75 insertions(+), 69 deletions(-) diff --git a/build/php.m4 b/build/php.m4 index a17a4b9b6066e..a052227492b56 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -99,16 +99,6 @@ AC_DEFUN([PHP_SUBST_OLD],[ AC_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. -dnl -AC_DEFUN([PHP_OUTPUT],[ - PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1" -]) - dnl ---------------------------------------------------------------------------- dnl Build system base macros. dnl ---------------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 336f0832a45d8..d860b5413b6db 100644 --- a/configure.ac +++ b/configure.ac @@ -1563,57 +1563,43 @@ AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ]) $php_shtool mkdir -p scripts $php_shtool mkdir -p scripts/man1 -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_COMMANDS_PRE([PHP_PATCH_CONFIG_HEADERS([main/php_config.h.in])]) - -AC_CONFIG_COMMANDS([default],[ -cat < main/internal_functions.c ],[ + EXT_STATIC="$EXT_STATIC" + AWK="$AWK" +]) -if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then - REDO_ALL=yes -fi +AC_CONFIG_FILES([ + main/internal_functions_cli.c:main/internal_functions.c.in +],[ + AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_CLI_STATIC" > main/internal_functions_cli.c +],[ + EXT_CLI_STATIC="$EXT_CLI_STATIC" + AWK="$AWK" +]) -dnl Create configuration headers. -dnl ---------------------------------------------------------------------------- -test -d Zend || $php_shtool mkdir Zend +AC_CONFIG_COMMANDS_PRE([PHP_PATCH_CONFIG_HEADERS([main/php_config.h.in])]) -cat >Zend/zend_config.h <Zend/zend_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_cli.c" - AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_CLI_STATIC" > main/internal_functions_cli.c - - if test "$PHP_SAPI" = "apache2handler"; then - if test "$APACHE_VERSION" -ge 2004001; then - if test -z "$APACHE_THREADED_MPM"; then -cat < processes when using a local Oracle | | database, set the value BEQUEATH_DETACH=YES in Oracle Net's | | sqlnet.ora file on the PHP host, or set the environment variable | -| BEQUEATH_DETACH to YES before starting Apache. If the problem | +| BEQUEATH_DETACH to YES before starting Apache. If the problem | | still occurs, then recompile PHP and specify --enable-sigchild | | when configuring. | X + fi + + cat <