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

Conversation

petk
Copy link
Member

@petk petk commented Jul 11, 2024

PHP_EVAL_LIBALINE macro processes the given libraries flags (-l) and/or library paths flags (-L) and appends the -l flags to either LIBS or the given *_SHARED_LIBADD variables. The -L flags are appended to the LDFLAGS. The new 3rd argument enables appending libraries to the given variable in the 2nd argument without manual setting whether the extension is shared. For example, to simplify usage in SAPIs where additional libraries need to be appended but they shouldn't go to the global LIBS. This can be then used in PHP-FPM SAPI to link apparmor, SELinux, systemd, etc.

This will simplify these PRs:

PHP_EVAL_LIBALINE macro processes the given libraries flags (-l) and/or
library paths flags (-L) and appends the -l flags to either LIBS or the
given *_SHARED_LIBADD variables. The -L flags are appended to the
LDFLAGS. The new 3rd argument enables appending libraries to the given
variable in the 2nd argument without manual setting whether the
extension is shared. For example, to simplify usage in SAPIs where
additional libraries need to be appended but they shouldn't go to the
global LIBS. This can be then used in PHP-FPM SAPI to link apparmor,
SELinux, systemd, etc.
@petk petk marked this pull request as draft July 11, 2024 22:04
@petk petk marked this pull request as ready for review July 11, 2024 22:22
Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LCTM

@petk petk merged commit 8fe127a into php:master Jul 12, 2024
1 check passed
@petk petk deleted the patch-PHP_EVAL_LIBLINE branch July 12, 2024 21:48
@petk
Copy link
Member Author

petk commented Jul 12, 2024

Thanks for the review. I think this will work fine and was needed to be changed. Merged to master. But there are still a lot of stuff to improve further to work more efficiently with these LIBS, CFLAGS, CPPFLAGS, LDFLAGS variables. I'll see what else I can enhance in the current release cycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants