Skip to content

Commit 44c2733

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 3bde483 commit 44c2733

File tree

8 files changed

+72
-75
lines changed

8 files changed

+72
-75
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: 56 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,88 +1587,86 @@ AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ])
15871587
$php_shtool mkdir -p scripts
15881588
$php_shtool mkdir -p scripts/man1
15891589

1590-
ALL_OUTPUT_FILES="main/build-defs.h \
1591-
scripts/phpize scripts/man1/phpize.1 \
1592-
scripts/php-config scripts/man1/php-config.1 \
1593-
$PHP_OUTPUT_FILES"
1594-
15951590
dnl Generate build files.
1596-
AC_CONFIG_FILES([$ALL_OUTPUT_FILES])
1597-
AC_CONFIG_COMMANDS([default],[
1598-
cat <<X
1599-
1600-
+--------------------------------------------------------------------+
1601-
| License: |
1602-
| This software is subject to the PHP License, available in this |
1603-
| distribution in the file LICENSE. By continuing this installation |
1604-
| process, you are bound by the terms of this license agreement. |
1605-
| If you do not agree with the terms of this license, you must abort |
1606-
| the installation process at this point. |
1607-
+--------------------------------------------------------------------+
1608-
1609-
Thank you for using PHP.
1591+
AC_CONFIG_FILES([
1592+
main/build-defs.h
1593+
scripts/man1/phpize.1
1594+
scripts/man1/php-config.1
1595+
scripts/phpize
1596+
scripts/php-config
1597+
])
16101598

1611-
X
1599+
AC_CONFIG_FILES([
1600+
main/internal_functions.c
16121601
],[
1602+
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_STATIC" > $srcdir/main/internal_functions.c
1603+
],[
1604+
EXT_STATIC="$EXT_STATIC"
1605+
AWK="$AWK"
1606+
])
16131607

1614-
if test "\$CONFIG_FILES" = "$ALL_OUTPUT_FILES" || test "\$CONFIG_FILES" = " $ALL_OUTPUT_FILES" || test -z "\$CONFIG_FILES"; then
1615-
REDO_ALL=yes
1616-
fi
1617-
1618-
dnl Create configuration headers.
1619-
dnl ----------------------------------------------------------------------------
1620-
test -d Zend || $php_shtool mkdir Zend
1608+
AC_CONFIG_FILES([
1609+
main/internal_functions_cli.c:main/internal_functions.c.in
1610+
],[
1611+
AWK="$AWK" sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in "$EXT_CLI_STATIC" > $srcdir/main/internal_functions_cli.c
1612+
],[
1613+
EXT_CLI_STATIC="$EXT_CLI_STATIC"
1614+
AWK="$AWK"
1615+
])
16211616

1622-
cat >Zend/zend_config.h <<FEO
1623-
#include <../main/php_config.h>
1624-
#if defined(APACHE) && defined(PHP_API_VERSION)
1625-
#undef HAVE_DLFCN_H
1626-
#endif
1627-
FEO
1628-
1629-
dnl Run this only when generating all the files.
1630-
if test -n "\$REDO_ALL"; then
1631-
echo "creating main/internal_functions.c"
1632-
extensions="$EXT_STATIC"
1633-
sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" $AWK \$extensions > main/internal_functions.c
1634-
1635-
echo "creating main/internal_functions_cli.c"
1636-
cli_extensions="$EXT_CLI_STATIC"
1637-
sh $srcdir/build/genif.sh $srcdir/main/internal_functions.c.in $srcdir "$EXTRA_MODULE_PTRS" $AWK \$cli_extensions > main/internal_functions_cli.c
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-
cat <<X
1617+
AC_CONFIG_COMMANDS([default],[
1618+
if test "x$php_warning_apache" != "x"; then
1619+
cat <<X
16431620
+--------------------------------------------------------------------+
16441621
| *** WARNING *** |
16451622
| |
16461623
| You have built PHP for Apache's current non-threaded MPM. |
16471624
| If you change Apache to use a threaded MPM you must reconfigure |
16481625
| PHP with --enable-maintainer-zts |
16491626
X
1650-
fi
1651-
fi
1652-
fi
1627+
fi
16531628
1654-
dnl Warn about Apache if oci8 extension is enabled on Linux.
1655-
if test "$PHP_OCI8" != "no"; then
1656-
if test "$PHP_SIGCHILD" != "yes"; then
1657-
if test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
1658-
cat <<X
1629+
if test "x$php_warning_oci8" != "x"; then
1630+
cat <<X
16591631
+--------------------------------------------------------------------+
16601632
| Notice: |
16611633
| If you encounter <defunc> processes when using a local Oracle |
16621634
| database, set the value BEQUEATH_DETACH=YES in Oracle Net's |
16631635
| sqlnet.ora file on the PHP host, or set the environment variable |
1664-
| BEQUEATH_DETACH to YES before starting Apache. If the problem |
1636+
| BEQUEATH_DETACH to YES before starting Apache. If the problem |
16651637
| still occurs, then recompile PHP and specify --enable-sigchild |
16661638
| when configuring. |
16671639
X
1640+
fi
1641+
1642+
cat <<X
1643+
+--------------------------------------------------------------------+
1644+
| License: |
1645+
| This software is subject to the PHP License, available in this |
1646+
| distribution in the file LICENSE. By continuing this installation |
1647+
| process, you are bound by the terms of this license agreement. |
1648+
| If you do not agree with the terms of this license, you must abort |
1649+
| the installation process at this point. |
1650+
+--------------------------------------------------------------------+
1651+
1652+
Thank you for using PHP.
1653+
1654+
X
1655+
],[
1656+
if test "$PHP_SAPI" = "apache2handler"; then
1657+
if test "$APACHE_VERSION" -ge 2004001; then
1658+
if test -z "$APACHE_THREADED_MPM"; then
1659+
php_warning_apache=1
16681660
fi
16691661
fi
16701662
fi
16711663
1672-
fi
1664+
if test "$PHP_OCI8" != "no"; then
1665+
if test "$PHP_SIGCHILD" != "yes"; then
1666+
if test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
1667+
php_warning_oci8=1
1668+
fi
1669+
fi
1670+
fi
16731671
])
16741672
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)