summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2019-04-25 22:44:56 +0200
committerPeter Kokot <peterkokot@gmail.com>2019-04-28 21:05:34 +0200
commitf9db357623434e8583a22553d26aeaa375b97e05 (patch)
treea5b1da6a02f0758b7ed3856e6cc11380f5aaab2c /scripts
parent78bed33862f361a0da96d4d2257ab8725055720b (diff)
downloadphp-git-f9db357623434e8583a22553d26aeaa375b97e05.tar.gz
Automatically remove aclocal.m4 if present
Commit 4e7064d173d2b5b22e159fcf52d22b10213b67b8 removed the usage of `aclocal.m4`. When using Git repositories, many times cleaning of the generated files is not done prior to running phpize or buildconf. For example: git clone git://github.com/php/php-src cd php-src git checkout PHP-7.3 ./buildconf ./configure git checkout PHP-7.4 ./buildconf # -> warnings ./configure # -> errors To not accidentally include `aclocal.m4` file in the generated configure this enhances build system experience a bit more by removing aclocal.m4 file prior to start building configure file using phpize or buildconf.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/phpize.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/phpize.in b/scripts/phpize.in
index 7a10a369bf..0d89341a75 100644
--- a/scripts/phpize.in
+++ b/scripts/phpize.in
@@ -157,6 +157,10 @@ phpize_replace_prefix()
phpize_autotools()
{
+ # Remove aclocal.m4 if present. It is automatically included by autoconf but
+ # not used by the PHP build system since PHP 7.4.
+ rm -f aclocal.m4
+
$PHP_AUTOCONF || exit 1
$PHP_AUTOHEADER || exit 1