From f9db357623434e8583a22553d26aeaa375b97e05 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Thu, 25 Apr 2019 22:44:56 +0200 Subject: 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. --- scripts/phpize.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts/phpize.in') 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 -- cgit v1.2.1