Enable SWC files support and building with zlib extension #20867
+19
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This optionally checks whether zlib is installed on the system, regardless of PHP extension zlib being built as static, shared or disabled. The zlib library is needed to be linked for having SWC files support in PHP.
Previously, only SWC support was possible only if PHP was built with static zlib PHP extension.
As SWC files are obsolete, no additional configuration option is provided and check is done as optional to have as little backward incopatibilities in builds.
Fixes: GH-4681
What do you think?
cc @andypost @glensc
Earlier bug report was also at: https://bugs.php.net/bug.php?id=34338
Edit: I've opened also an issue about this as it's unclear how to best resolve this issue #20868 It's problematic as it's hidden and undocumented that for SWC files zlib extension needs to be built as static. And there is also a new API that perhaps would resolve this better - commented in image.c as
TODO: with the new php_image_register_handler() APIs, this restriction could be solved.