-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Add PHP_SETUP_ZLIB M4 macro #14591
Conversation
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 |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
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.
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. |
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. |
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.