Skip to content

config.m4: explicit on and off options for APCu#99

Merged
kjdev merged 1 commit into
kjdev:masterfrom
pavetheway91:config
Jun 9, 2026
Merged

config.m4: explicit on and off options for APCu#99
kjdev merged 1 commit into
kjdev:masterfrom
pavetheway91:config

Conversation

@pavetheway91

@pavetheway91 pavetheway91 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Hi

I maintain FreeBSD package for this and several other compression extensions of yours.

Due to some policy stuff, our system would like to have explicit on and off options for the APCu dependency. But no hurry with a new release, I can patch it locally in our system while waiting for the next one.

Default value "auto" is is the current behaviour, build with APCu if the header happens to be there.

"yes" will fail if the header doesn't exist.

"no" won't even attempt to find the header.

Similar PR to follow to brotli and lz4 too if this gets in.

Summary by CodeRabbit

  • New Features
    • Configuration option added to enable APCu support, with automatic detection enabled by default.
    • Configuration validation enhanced with improved error reporting when required dependencies are unavailable.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR modifies config.m4 to add a new --enable-apcu build option with auto default and updates APCu header detection to be conditional. When the header is missing, detection now errors only if APCu was explicitly requested, otherwise it reports "not found".

Changes

APCu Configuration and Detection

Layer / File(s) Summary
APCu option and detection logic
config.m4
New --enable-apcu option with auto default controls APCu support. Conditional detection block checks for apc_serializer.h only when PHP_APCU is not no, and differentiates error handling: fails with AC_MSG_ERROR if explicitly enabled but header missing, otherwise reports "not found" without failing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • kjdev/php-ext-zstd#96: The HAVE_APCU_SUPPORT definition set by this PR's detection logic gates APCu-related globals and INI entries in the zstd extension.

Poem

🐰 A toggle for APCu springs to life,
With auto by default, no strife,
Headers checked with gentle care—
Missing? Fail if you declare!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: adding explicit on/off configuration options for APCu in config.m4.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kjdev kjdev merged commit fa92585 into kjdev:master Jun 9, 2026
153 checks passed
@kjdev

kjdev commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Thanks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants