[php-src] PR #14872: Autotools: Move Apache warning to SAPI's config.m4
| From: | petk | Date: | Mon, 08 Jul 2024 12:12:05 +0000 |
| Subject: | [php-src] PR #14872: Autotools: Move Apache warning to SAPI's config.m4 | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-27127@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/14872
Author: petk
This uses AC_CONFIG_COMMANDS macro to conditionally output the warning message at the end of
configure phase if non-threaded Apache installation has been found and PHP is built without
--enable-zts.
Variables set in the 2nd argument (init-cmds) are for the command invocation scope as the first
argument doesn't have any knowledge of configure variables as described in the Autoconf docs.
This is moved as it is related only to apache2handler SAPI and also now warning is displayed a bit
nicer at the end of the configure phase after files are generated. This also enables outputting
warning when using config.status script.
<details><summary>Before:</summary>
```
Generating files
configure: creating build directories
configure: creating Makefile
configure: patching main/php_config.h.in
configure: creating ./config.status
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| *** WARNING *** |
| |
| You have built PHP for Apache's current non-threaded MPM. |
| If you change Apache to use a threaded MPM you must reconfigure |
| PHP with --enable-zts |
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/phpdbg/phpdbg.1
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.
```
</details>
<details><summary>After:</summary>
```
Generating files
configure: creating build directories
configure: creating Makefile
configure: patching main/php_config.h.in
configure: creating ./config.status
creating main/internal_functions.c
creating main/internal_functions_cli.c
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/phpdbg/phpdbg.1
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: main/php_config.h is unchanged
config.status: executing apache2handler commands
config.status: WARNING:
+--------------------------------------------------------------------+
| *** WARNING *** |
| |
| You have built PHP for Apache's current non-threaded MPM. |
| If you change Apache to use a threaded MPM you must reconfigure |
| PHP with --enable-zts |
+--------------------------------------------------------------------+
config.status: executing default commands
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.
```
</details>