Skip to content

Commit 0db0a57

Browse files
committed
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.
1 parent 93b3d2f commit 0db0a57

File tree

8 files changed

+75
-69
lines changed

8 files changed

+75
-69
lines changed

build/php.m4

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,6 @@ AC_DEFUN([PHP_SUBST_OLD],[
9999
AC_SUBST($1)
100100
])
101101

102-
dnl
103-
dnl PHP_OUTPUT(file)
104-
dnl
105-
dnl Adds "file" to the list of files generated by AC_OUTPUT. This macro can be
106-
dnl used several times.
107-
dnl
108-
AC_DEFUN([PHP_OUTPUT],[
109-
PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1"
110-
])
111-
112102
dnl ----------------------------------------------------------------------------
113103
dnl Build system base macros.
114104
dnl ----------------------------------------------------------------------------

configure.ac

Lines changed: 59 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,86 +1563,93 @@ AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ])
15631563
$php_shtool mkdir -p scripts
15641564
$php_shtool mkdir -p scripts/man1
15651565

1566-
ALL_OUTPUT_FILES="main/build-defs.h \
1567-
scripts/phpize scripts/man1/phpize.1 \
1568-
scripts/php-config scripts/man1/php-config.1 \
1569-
$PHP_OUTPUT_FILES"
1570-
15711566
dnl Generate build files.
1572-
AC_CONFIG_FILES([$ALL_OUTPUT_FILES])
1573-
1574-
AC_CONFIG_COMMANDS_PRE([PHP_PATCH_CONFIG_HEADERS([main/php_config.h.in])])
1575-
1576-
AC_CONFIG_COMMANDS([default],[
1577-
cat <<X
1578-
1579-
+--------------------------------------------------------------------+
1580-
| License: |
1581-
| This software is subject to the PHP License, available in this |
1582-
| distribution in the file LICENSE. By continuing this installation |
1583-
| process, you are bound by the terms of this license agreement. |
1584-
| If you do not agree with the terms of this license, you must abort |
1585-
| the installation process at this point. |
1586-
+--------------------------------------------------------------------+
1587-
1588-
Thank you for using PHP.
1567+
AC_CONFIG_FILES([
1568+
main/build-defs.h
1569+
scripts/man1/phpize.1
1570+
scripts/man1/php-config.1
1571+
scripts/phpize
1572+
scripts/php-config
1573+
])
15891574

1590-
X
1575+
AC_CONFIG_FILES([
1576+
main/internal_functions.c
1577+
],[
1578+
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_STATIC" > main/internal_functions.c
15911579
],[
1580+
EXT_STATIC="$EXT_STATIC"
1581+
AWK="$AWK"
1582+
])
15921583

1593-
if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then
1594-
REDO_ALL=yes
1595-
fi
1584+
AC_CONFIG_FILES([
1585+
main/internal_functions_cli.c:main/internal_functions.c.in
1586+
],[
1587+
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_CLI_STATIC" > main/internal_functions_cli.c
1588+
],[
1589+
EXT_CLI_STATIC="$EXT_CLI_STATIC"
1590+
AWK="$AWK"
1591+
])
15961592

1597-
dnl Create configuration headers.
1598-
dnl ----------------------------------------------------------------------------
1599-
test -d Zend || $php_shtool mkdir Zend
1593+
AC_CONFIG_COMMANDS_PRE([PHP_PATCH_CONFIG_HEADERS([main/php_config.h.in])])
16001594

1601-
cat >Zend/zend_config.h <<FEO
1595+
AC_CONFIG_COMMANDS([default],[
1596+
test -d Zend || $php_shtool mkdir Zend
1597+
cat >Zend/zend_config.h <<FEO
16021598
#include <../main/php_config.h>
16031599
FEO
16041600
1605-
dnl Run this only when generating all the files.
1606-
if test -n "\$REDO_ALL"; then
1607-
echo "creating main/internal_functions.c"
1608-
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_STATIC" > main/internal_functions.c
1609-
1610-
echo "creating main/internal_functions_cli.c"
1611-
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_CLI_STATIC" > main/internal_functions_cli.c
1612-
1613-
if test "$PHP_SAPI" = "apache2handler"; then
1614-
if test "$APACHE_VERSION" -ge 2004001; then
1615-
if test -z "$APACHE_THREADED_MPM"; then
1616-
cat <<X
1601+
if test "x$php_warning_apache" != "x"; then
1602+
cat <<X
16171603
+--------------------------------------------------------------------+
16181604
| *** WARNING *** |
16191605
| |
16201606
| You have built PHP for Apache's current non-threaded MPM. |
16211607
| If you change Apache to use a threaded MPM you must reconfigure |
16221608
| PHP with --enable-maintainer-zts |
16231609
X
1624-
fi
1625-
fi
1626-
fi
1610+
fi
16271611
1628-
dnl Warn about Apache if oci8 extension is enabled on Linux.
1629-
if test "$PHP_OCI8" != "no"; then
1630-
if test "$PHP_SIGCHILD" != "yes"; then
1631-
if test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
1632-
cat <<X
1612+
if test "x$php_warning_oci8" != "x"; then
1613+
cat <<X
16331614
+--------------------------------------------------------------------+
16341615
| Notice: |
16351616
| If you encounter <defunc> processes when using a local Oracle |
16361617
| database, set the value BEQUEATH_DETACH=YES in Oracle Net's |
16371618
| sqlnet.ora file on the PHP host, or set the environment variable |
1638-
| BEQUEATH_DETACH to YES before starting Apache. If the problem |
1619+
| BEQUEATH_DETACH to YES before starting Apache. If the problem |
16391620
| still occurs, then recompile PHP and specify --enable-sigchild |
16401621
| when configuring. |
16411622
X
1623+
fi
1624+
1625+
cat <<X
1626+
+--------------------------------------------------------------------+
1627+
| License: |
1628+
| This software is subject to the PHP License, available in this |
1629+
| distribution in the file LICENSE. By continuing this installation |
1630+
| process, you are bound by the terms of this license agreement. |
1631+
| If you do not agree with the terms of this license, you must abort |
1632+
| the installation process at this point. |
1633+
+--------------------------------------------------------------------+
1634+
1635+
Thank you for using PHP.
1636+
1637+
X
1638+
],[
1639+
if test "$PHP_SAPI" = "apache2handler"; then
1640+
if test "$APACHE_VERSION" -ge 2004001; then
1641+
if test -z "$APACHE_THREADED_MPM"; then
1642+
php_warning_apache=1
16421643
fi
16431644
fi
16441645
fi
16451646
1646-
fi
1647+
if test "$PHP_OCI8" != "no"; then
1648+
if test "$PHP_SIGCHILD" != "yes"; then
1649+
if test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
1650+
php_warning_oci8=1
1651+
fi
1652+
fi
1653+
fi
16471654
])
16481655
AC_OUTPUT

ext/phar/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ if test "$PHP_PHAR" != "no"; then
2323

2424
PHP_INSTALL_HEADERS([ext/phar], [php_phar.h])
2525

26-
PHP_OUTPUT(ext/phar/phar.1 ext/phar/phar.phar.1)
26+
AC_CONFIG_FILES([ext/phar/phar.1 ext/phar/phar.phar.1])
2727
fi

sapi/cgi/config9.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ if test "$PHP_CGI" != "no"; then
6969
PHP_SUBST(SAPI_CGI_PATH)
7070
PHP_SUBST(BUILD_CGI)
7171

72-
PHP_OUTPUT(sapi/cgi/php-cgi.1)
72+
AC_CONFIG_FILES([sapi/cgi/php-cgi.1])
7373
else
7474
AC_MSG_RESULT(no)
7575
fi

sapi/cli/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ if test "$PHP_CLI" != "no"; then
5454
PHP_SUBST(SAPI_CLI_PATH)
5555
PHP_SUBST(BUILD_CLI)
5656

57-
PHP_OUTPUT(sapi/cli/php.1)
57+
AC_CONFIG_FILES([sapi/cli/php.1])
5858

5959
PHP_INSTALL_HEADERS([sapi/cli/cli.h])
6060
fi

sapi/fpm/config.m4

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,16 @@ if test "$PHP_FPM" != "no"; then
634634

635635
PHP_ADD_BUILD_DIR(sapi/fpm/fpm)
636636
PHP_ADD_BUILD_DIR(sapi/fpm/fpm/events)
637-
PHP_OUTPUT(sapi/fpm/php-fpm.conf sapi/fpm/www.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html)
637+
638+
AC_CONFIG_FILES([
639+
sapi/fpm/init.d.php-fpm
640+
sapi/fpm/php-fpm.8
641+
sapi/fpm/php-fpm.conf
642+
sapi/fpm/php-fpm.service
643+
sapi/fpm/status.html
644+
sapi/fpm/www.conf
645+
])
646+
638647
PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/fpm/Makefile.frag])
639648

640649
SAPI_FPM_PATH=sapi/fpm/php-fpm

sapi/phpdbg/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ if test "$BUILD_PHPDBG" = "" && test "$PHP_PHPDBG" != "no"; then
8888
PHP_SUBST(BUILD_PHPDBG)
8989
PHP_SUBST(BUILD_PHPDBG_SHARED)
9090

91-
PHP_OUTPUT(sapi/phpdbg/phpdbg.1)
91+
AC_CONFIG_FILES([sapi/phpdbg/phpdbg.1])
9292
fi
9393

9494
if test "$PHP_PHPDBG_WEBHELPER" != "no"; then

scripts/Makefile.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ install-programs: $(builddir)/phpize $(builddir)/php-config
4747
done
4848

4949
$(builddir)/phpize: $(srcdir)/phpize.in $(top_builddir)/config.status
50-
(CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)
50+
$(top_builddir)/config.status $@
5151

5252
$(builddir)/php-config: $(srcdir)/php-config.in $(top_builddir)/config.status
53-
(CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)
53+
$(top_builddir)/config.status $@

0 commit comments

Comments
 (0)