diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 85b0da4cf00cc..ffcf986d4d065 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -183,6 +183,9 @@ PHP 8.4 INTERNALS UPGRADE NOTES - M4 macro PHP_OUTPUT is obsolete (use AC_CONFIG_FILES). - M4 macro PHP_PROG_SETUP now accepts an argument to set the minimum required PHP version during the build. + - M4 macro PHP_INSTALL_HEADERS arguments can now be also + blank-or-newline-separated lists instead of only separated with whitespace + or backslash-then-newline. - TSRM/tsrm.m4 file and its TSRM_CHECK_PTHREADS M4 macro have been removed. - Added pkg-config support to find libpq for the pdo_pgsql and pgsql extensions. The libpq paths can be customized with the PGSQL_CFLAGS and diff --git a/build/php.m4 b/build/php.m4 index 442779ba734b4..f209e521e9519 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -2030,24 +2030,25 @@ dnl Misc. macros dnl ---------------------------------------------------------------------------- dnl -dnl PHP_INSTALL_HEADERS(path [, file ...]) -dnl -dnl PHP header files to be installed. -dnl -AC_DEFUN([PHP_INSTALL_HEADERS],[ - ifelse([$2],[],[ - for header_file in $1; do - PHP_RUN_ONCE(INSTALLHEADERS, $header_file, [ - INSTALL_HEADERS="$INSTALL_HEADERS $header_file" - ]) +dnl PHP_INSTALL_HEADERS(path [, files ...]) +dnl +dnl Add PHP header files to the list to be installed on the system. The "files" +dnl argument is a blank-or-newline-separated list of header files or directories +dnl located in the "path". If 2nd argument is not given, it installs header +dnl files in all paths from the blank-or-newline-separated "path" argument. +dnl +AC_DEFUN([PHP_INSTALL_HEADERS], + [m4_ifblank([$2], [ + for header_file in m4_normalize(m4_expand([$1])); do + PHP_RUN_ONCE([INSTALLHEADERS], [$header_file], + [INSTALL_HEADERS="$INSTALL_HEADERS $header_file"]) done ], [ header_path=$1 - for header_file in $2; do + for header_file in m4_normalize(m4_expand([$2])); do hp_hf="$header_path/$header_file" - PHP_RUN_ONCE(INSTALLHEADERS, $hp_hf, [ - INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf" - ]) + PHP_RUN_ONCE([INSTALLHEADERS], [$hp_hf], + [INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"]) done ]) ])