From bc515337a30f8ba82b8ae0d4ca576f4c4f58aa7b Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sun, 28 Jul 2024 00:35:33 +0200 Subject: [PATCH] Autotools: Simplify PHP_ALWAYS_SHARED macro Instead of defining an empty M4 macro PHP_ALWAYS_SHARED when configuring extensions in php-src using the main configure.ac, the m4_ifdef can be used to conditionally call the macro when it is defined (when using phpize). --- build/php.m4 | 3 ++- configure.ac | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build/php.m4 b/build/php.m4 index 8323525c32b7f..1f78c54ba793d 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -659,7 +659,8 @@ no[)] ;; esac -PHP_ALWAYS_SHARED([$1]) +dnl When using phpize, automatically enable and build extension as shared. +m4_ifdef([PHP_ALWAYS_SHARED], [PHP_ALWAYS_SHARED([$1])]) ]) dnl diff --git a/configure.ac b/configure.ac index 16c4214ed88ac..1ef78095db906 100644 --- a/configure.ac +++ b/configure.ac @@ -76,8 +76,6 @@ PHP_SUBST([PHP_MINOR_VERSION]) PHP_SUBST([PHP_RELEASE_VERSION]) PHP_SUBST([PHP_EXTRA_VERSION]) -AC_DEFUN([PHP_ALWAYS_SHARED],[])dnl - dnl Setting up the PHP version based on the information above. dnl ----------------------------------------------------------------------------