mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Autotools: Enable adding a list of paths in PHP_ADD_INCLUDE (#15777)
This enables adding multiple include paths. For example: PHP_ADD_INCLUDE([ $abs_srcdir $abs_builddir $abs_srcdir/main $abs_builddir/main ], [1]) The 2nd argument "prepend" is now validated at Autoconf compile time instead of the configure time.
This commit is contained in:
parent
e358634cdc
commit
6d6bf0530a
2 changed files with 15 additions and 13 deletions
|
@ -200,6 +200,9 @@ PHP 8.4 INTERNALS UPGRADE NOTES
|
||||||
- Autoconf macros PHP_NEW_EXTENSION, PHP_ADD_SOURCES, PHP_ADD_SOURCES_X,
|
- Autoconf macros PHP_NEW_EXTENSION, PHP_ADD_SOURCES, PHP_ADD_SOURCES_X,
|
||||||
PHP_SELECT_SAPI now have the source files and flags arguments normalized so
|
PHP_SELECT_SAPI now have the source files and flags arguments normalized so
|
||||||
the list of items can be passed as a blank-or-newline-separated list.
|
the list of items can be passed as a blank-or-newline-separated list.
|
||||||
|
- Autoconf macro PHP_ADD_INCLUDE now takes also a blank-or-newline-separated
|
||||||
|
list of include directories instead of a single directory. The "prepend"
|
||||||
|
argument is validated at Autoconf compile time.
|
||||||
- TSRM/tsrm.m4 file and its TSRM_CHECK_PTHREADS macro have been removed.
|
- TSRM/tsrm.m4 file and its TSRM_CHECK_PTHREADS macro have been removed.
|
||||||
- Added pkg-config support to find libpq for the pdo_pgsql and pgsql
|
- 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
|
extensions. The libpq paths can be customized with the PGSQL_CFLAGS and
|
||||||
|
|
25
build/php.m4
25
build/php.m4
|
@ -467,21 +467,20 @@ AC_DEFUN([PHP_UTILIZE_RPATHS],[
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl PHP_ADD_INCLUDE(path [,before])
|
dnl PHP_ADD_INCLUDE(paths [,prepend])
|
||||||
dnl
|
dnl
|
||||||
dnl Add an include path. If before is 1, add in the beginning of INCLUDES.
|
dnl Add blank-or-newline-separated list of include paths. If "prepend" is given,
|
||||||
|
dnl paths are prepended to the beginning of INCLUDES.
|
||||||
dnl
|
dnl
|
||||||
AC_DEFUN([PHP_ADD_INCLUDE],[
|
AC_DEFUN([PHP_ADD_INCLUDE], [
|
||||||
if test "$1" != "/usr/include"; then
|
for include_path in m4_normalize(m4_expand([$1])); do
|
||||||
PHP_EXPAND_PATH($1, ai_p)
|
AS_IF([test "$include_path" != "/usr/include"], [
|
||||||
PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [
|
PHP_EXPAND_PATH([$include_path], [ai_p])
|
||||||
if test "$2"; then
|
PHP_RUN_ONCE([INCLUDEPATH], [$ai_p], [m4_ifnblank([$2],
|
||||||
INCLUDES="-I$ai_p $INCLUDES"
|
[INCLUDES="-I$ai_p $INCLUDES"],
|
||||||
else
|
[INCLUDES="$INCLUDES -I$ai_p"])])
|
||||||
INCLUDES="$INCLUDES -I$ai_p"
|
])
|
||||||
fi
|
done
|
||||||
])
|
|
||||||
fi
|
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue