Skip to content

filter/config: restore “system‑first, bundled‑fallback” Brotli detection #172

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikelolasagasti
Copy link

63ca02a made the bundled sub‑module mandatory by hard‑coding deps/brotli and linking the objects produced in ../out. This broke distribution builds that are required to link against the shared libbrotli already shipped by the system.

This change brings back the original behaviour while integrating pkg-config:

  • Detect a system installation with pkg-config libbrotlienc; if found, use the reported cflags/libs and compile only the NGINX wrapper source.
  • If no suitable system copy exists, fall back to the bundled git sub‑module exactly as before.
  • Abort early with a clear error message when neither flavour is available, including instructions to initialise the sub‑module.

No command‑line flags are needed for the common case; packagers simply omit the sub‑module and let pkg-config do the work, while end users who prefer the bundled copy keep the sub‑module checked out.

Fixes: 63ca02a (“filter: require bundled Brotli out/ artifacts”)

63ca02a made the bundled sub‑module mandatory by hard‑coding
deps/brotli and linking the objects produced in ../out. This broke
distribution builds that are required to link against the shared
libbrotli already shipped by the system.

This change brings back the original behaviour while integrating
`pkg-config`:

* Detect a system installation with `pkg-config libbrotlienc`;
  if found, use the reported cflags/libs and compile only the NGINX
  wrapper source.
* If no suitable system copy exists, fall back to the bundled
  git sub‑module exactly as before.
* Abort early with a clear error message when neither flavour is
  available, including instructions to initialise the sub‑module.

No command‑line flags are needed for the common case; packagers simply
omit the sub‑module and let `pkg-config` do the work, while end users
who prefer the bundled copy keep the sub‑module checked out.

Fixes: 63ca02a (“filter: require bundled Brotli out/ artifacts”)

Signed-off-by: Mikel Olasagasti Uranga <[email protected]>
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.

1 participant