Skip to content

Autotools: Normalize PHP_INSTALL_HEADERS arguments #15620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 15 additions & 14 deletions build/php.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
])
])
Expand Down
Loading