Skip to content

Replace PHP_OUTPUT with AC_CONFIG_FILES #15186

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
Aug 3, 2024
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
1 change: 1 addition & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions build/php.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
30 changes: 11 additions & 19 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1824,13 +1824,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])])

Expand All @@ -1850,24 +1850,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
5 changes: 4 additions & 1 deletion ext/phar/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion sapi/cgi/config9.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion sapi/cli/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion sapi/fpm/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sapi/phpdbg/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,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