Skip to content
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

Widespread issues with empty PKG_CONFIG #350

Closed
ismaell opened this issue Apr 1, 2024 · 0 comments
Closed

Widespread issues with empty PKG_CONFIG #350

ismaell opened this issue Apr 1, 2024 · 0 comments

Comments

@ismaell
Copy link
Contributor

ismaell commented Apr 1, 2024

Too many projects' configure scripts don't check for empty PKG_CONFIG, yet use the variable directly, resulting in weird error messages through the run, which often confuse users. It would be useful to either error-out or set PKG_CONFIG=false, so that calls result in a fail without bogus errors.

In order to support both scenarios, I propose the PKG_PROG_PKG_CONFIG macro:

  • by default abort the configure script.
  • take an extra (optional) argument to specify a custom action instead.
ismaell added a commit to ismaell/pkgconf that referenced this issue Apr 1, 2024
Provide a second optional argument to PKG_PROG_PKG_CONFIG with an action to
take if no pkgconf is found, and default to aborting.

Too many configure scripts in the wild don't handle an empty PKG_CONFIG,
resulting in weird error messages through the run, which often confuse
users.

Authors wishing to fallback to other methods can either return to the old
behavior by specifying [:] as an action, or use [PKG_CONFIG=false] and call
pkg-config macros normally, handling the fallback as any other failure.

Users can override PKG_CONFIG in the command line so this should imply no
regression.

Closes: pkgconf#350
Ref: https://gitlab.freedesktop.org/pkg-config/pkg-config/-/issues/69
Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
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 a pull request may close this issue.

1 participant