Skip to content

Commit 9680196

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 48abed7 commit 9680196

File tree

8 files changed

+73
-67
lines changed

8 files changed

+73
-67
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: 57 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,83 +1578,90 @@ AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ])
15781578
$php_shtool mkdir -p scripts
15791579
$php_shtool mkdir -p scripts/man1
15801580

1581-
ALL_OUTPUT_FILES="main/build-defs.h \
1582-
scripts/phpize scripts/man1/phpize.1 \
1583-
scripts/php-config scripts/man1/php-config.1 \
1584-
$PHP_OUTPUT_FILES"
1585-
15861581
dnl Generate build files.
1587-
AC_CONFIG_FILES([$ALL_OUTPUT_FILES])
1588-
AC_CONFIG_COMMANDS([default],[
1589-
cat <<X
1590-
1591-
+--------------------------------------------------------------------+
1592-
| License: |
1593-
| This software is subject to the PHP License, available in this |
1594-
| distribution in the file LICENSE. By continuing this installation |
1595-
| process, you are bound by the terms of this license agreement. |
1596-
| If you do not agree with the terms of this license, you must abort |
1597-
| the installation process at this point. |
1598-
+--------------------------------------------------------------------+
1599-
1600-
Thank you for using PHP.
1582+
AC_CONFIG_FILES([
1583+
main/build-defs.h
1584+
scripts/man1/phpize.1
1585+
scripts/man1/php-config.1
1586+
scripts/phpize
1587+
scripts/php-config
1588+
])
16011589

1602-
X
1590+
AC_CONFIG_FILES([
1591+
main/internal_functions.c
16031592
],[
1593+
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_STATIC" > main/internal_functions.c
1594+
],[
1595+
EXT_STATIC="$EXT_STATIC"
1596+
AWK="$AWK"
1597+
])
16041598

1605-
if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then
1606-
REDO_ALL=yes
1607-
fi
1608-
1609-
dnl Create configuration headers.
1610-
dnl ----------------------------------------------------------------------------
1611-
test -d Zend || $php_shtool mkdir Zend
1599+
AC_CONFIG_FILES([
1600+
main/internal_functions_cli.c:main/internal_functions.c.in
1601+
],[
1602+
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_CLI_STATIC" > main/internal_functions_cli.c
1603+
],[
1604+
EXT_CLI_STATIC="$EXT_CLI_STATIC"
1605+
AWK="$AWK"
1606+
])
16121607

1613-
cat >Zend/zend_config.h <<FEO
1608+
AC_CONFIG_COMMANDS([default],[
1609+
cat >Zend/zend_config.h <<FEO
16141610
#include <../main/php_config.h>
16151611
FEO
16161612
1617-
dnl Run this only when generating all the files.
1618-
if test -n "\$REDO_ALL"; then
1619-
echo "creating main/internal_functions.c"
1620-
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_STATIC" > main/internal_functions.c
1621-
1622-
echo "creating main/internal_functions_cli.c"
1623-
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_CLI_STATIC" > main/internal_functions_cli.c
1624-
1625-
if test "$PHP_SAPI" = "apache2handler"; then
1626-
if test "$APACHE_VERSION" -ge 2004001; then
1627-
if test -z "$APACHE_THREADED_MPM"; then
1628-
cat <<X
1613+
if test "x$php_warning_apache" != "x"; then
1614+
cat <<X
16291615
+--------------------------------------------------------------------+
16301616
| *** WARNING *** |
16311617
| |
16321618
| You have built PHP for Apache's current non-threaded MPM. |
16331619
| If you change Apache to use a threaded MPM you must reconfigure |
16341620
| PHP with --enable-maintainer-zts |
16351621
X
1636-
fi
1637-
fi
1638-
fi
1622+
fi
16391623
1640-
dnl Warn about Apache if oci8 extension is enabled on Linux.
1641-
if test "$PHP_OCI8" != "no"; then
1642-
if test "$PHP_SIGCHILD" != "yes"; then
1643-
if test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
1644-
cat <<X
1624+
if test "x$php_warning_oci8" != "x"; then
1625+
cat <<X
16451626
+--------------------------------------------------------------------+
16461627
| Notice: |
16471628
| If you encounter <defunc> processes when using a local Oracle |
16481629
| database, set the value BEQUEATH_DETACH=YES in Oracle Net's |
16491630
| sqlnet.ora file on the PHP host, or set the environment variable |
1650-
| BEQUEATH_DETACH to YES before starting Apache. If the problem |
1631+
| BEQUEATH_DETACH to YES before starting Apache. If the problem |
16511632
| still occurs, then recompile PHP and specify --enable-sigchild |
16521633
| when configuring. |
16531634
X
1635+
fi
1636+
1637+
cat <<X
1638+
+--------------------------------------------------------------------+
1639+
| License: |
1640+
| This software is subject to the PHP License, available in this |
1641+
| distribution in the file LICENSE. By continuing this installation |
1642+
| process, you are bound by the terms of this license agreement. |
1643+
| If you do not agree with the terms of this license, you must abort |
1644+
| the installation process at this point. |
1645+
+--------------------------------------------------------------------+
1646+
1647+
Thank you for using PHP.
1648+
1649+
X
1650+
],[
1651+
if test "$PHP_SAPI" = "apache2handler"; then
1652+
if test "$APACHE_VERSION" -ge 2004001; then
1653+
if test -z "$APACHE_THREADED_MPM"; then
1654+
php_warning_apache=1
16541655
fi
16551656
fi
16561657
fi
16571658
1658-
fi
1659+
if test "$PHP_OCI8" != "no"; then
1660+
if test "$PHP_SIGCHILD" != "yes"; then
1661+
if test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
1662+
php_warning_oci8=1
1663+
fi
1664+
fi
1665+
fi
16591666
])
16601667
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)