Skip to content

Add PHP_SETUP_ZLIB M4 macro #14591

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 4 commits into from
Jun 21, 2024
Merged

Add PHP_SETUP_ZLIB M4 macro #14591

merged 4 commits into from
Jun 21, 2024

Conversation

petk
Copy link
Member

@petk petk commented Jun 17, 2024

This enables the zlib library (https://zlib.net/) from a single place to match the minimum required version across the php-src. This provides a possible simpler version bump in the future. Macro's 2nd and 3rd arguments can pass additional actions whether zlib library is found or not for the possible future adjustments in the ext/standard where also zlib might be required.

This enables the zlib library (https://zlib.net/) from a single place to
match the minimum required version across the php-src. This provides a
possible simpler version bump in the future. Macro's 2nd and 3rd
arguments can pass additional actions whether zlib library is found or
not for the possible future adjustments in the ext/standard where also
zlib might be required.
build/php.m4 Outdated
dnl is given.
dnl
AC_DEFUN([PHP_SETUP_ZLIB], [dnl
PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.0.4], [dnl
Copy link
Member

Choose a reason for hiding this comment

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

unrelated but 1.2.0.4 seems really old :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Released in 2003 🙈 oh my... yes, this can be also bumped.

Copy link
Member Author

@petk petk Jun 17, 2024

Choose a reason for hiding this comment

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

Interesting info is that pkg-config support was added in 1.2.3.1, so PHP already kind of requires 1.2.3.1 already :D

Copy link
Member Author

Choose a reason for hiding this comment

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

And Windows zlib package is at 1.2.12 https://github.com/winlibs/zlib

Copy link
Member Author

Choose a reason for hiding this comment

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

I've for now bumped this to 1.2.3.1 version... Probably could be bumped way more here.

Copy link
Member

Choose a reason for hiding this comment

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

Note that centos 8 seems to use the 1.2.11 version, that might be a starting point as you re targetting master. Just my 2 cents :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good to me. Added in the next commit.

petk added 2 commits June 17, 2024 14:35
Support for pkg-config was introduced in 1.2.3.1.
This is aligned with CentOS 8, which has 1.2.11 in the default packages.
This matches the OpenSSL style version change notice already done in
this file.
@petk
Copy link
Member Author

petk commented Jun 19, 2024

I've added here also a notice to UPGRADING file. I'll recheck all these build system changes in the UPGRADING.INTERNALS file on the way if all is correctly written and with correct style. Because these minimum versions (OpenSSL and zlib) are not specific only to extensions anymore but to entire php-src with these common macros. No problem for now I think.

@petk
Copy link
Member Author

petk commented Jun 20, 2024

I think everything is correct here. Merge coming up then in the following days. If by any chance it turns out that this version is "too new" for some system, we can adjust it further but the zlib is so "standard" these days over the systems, that there shouldn't be any issues with bumping this.

@petk petk merged commit b12ccb3 into php:master Jun 21, 2024
2 checks passed
@petk petk deleted the patch-PHP_SETUP_ZLIB branch June 21, 2024 13:06
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