Skip to content

Autotools: Enhance PHP_EVAL_LIBLINE M4 macro #14924

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 2 commits into from
Jul 12, 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
2 changes: 2 additions & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ PHP 8.4 INTERNALS UPGRADE NOTES
- PDO extensions in php-src don't have the include flag -I$pdo_cv_inc_path
directory anymore.
- M4 macro PHP_SETUP_OPENSSL doesn't accept the 3rd argument anymore.
- M4 macro PHP_EVAL_LIBLINE got a new 3rd argument to override the ext_shared
checks.
- 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
22 changes: 16 additions & 6 deletions build/php.m4
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,21 @@ AC_DEFUN([PHP_REMOVE_USR_LIB],[
])

dnl
dnl PHP_EVAL_LIBLINE(libline, SHARED-LIBADD)
dnl
dnl Use this macro, if you need to add libraries and or library search paths to
dnl the PHP build system which are only given in compiler notation.
dnl
AC_DEFUN([PHP_EVAL_LIBLINE],[
dnl PHP_EVAL_LIBLINE(libline, [libs-variable], [not-extension])
dnl
dnl Use this macro to add libraries and/or library search paths to the PHP build
dnl system when specified in compiler notation. Libraries (-l) are appended
dnl either to the global Autoconf LIBS variable or to the specified
dnl "libs-variable" (e.g., *_SHARED_LIBADD) when the extension is shared
dnl (ext_shared=yes). If "not-extension" is set to a non-blank value, the
dnl libraries are appended to "libs-variable" unconditionally (this is
dnl particularly useful when working with SAPIs). The -L flags are appended to
dnl the LDFLAGS.
dnl
AC_DEFUN([PHP_EVAL_LIBLINE],
[m4_ifnblank([$3], [m4_ifblank([$2],
[m4_warn([syntax], [Missing 2nd argument when skipping extension check])],
[_php_ext_shared_saved=$ext_shared; ext_shared=yes])])
for ac_i in $1; do
case $ac_i in
-pthread[)]
Expand All @@ -368,6 +377,7 @@ AC_DEFUN([PHP_EVAL_LIBLINE],[
;;
esac
done
m4_ifnblank([$3], [m4_ifnblank([$2], [ext_shared=$_php_ext_shared_saved])])dnl
])

dnl
Expand Down