Bug 98334 - pkg-config: Make PKG_CHECK_MODULES report the module name instead of the variable prefix
Summary: pkg-config: Make PKG_CHECK_MODULES report the module name instead of the vari...
Status: RESOLVED FIXED
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: pkg-config
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-19 21:31 UTC by Guillem Jover
Modified: 2017-03-19 15:02 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Make PKG_CHECK_MODULES report the module name instead of the variable prefix (1.62 KB, patch)
2016-10-19 21:31 UTC, Guillem Jover
Details | Splinter Review

Description Guillem Jover 2016-10-19 21:31:00 UTC
Created attachment 127412 [details] [review]
Make PKG_CHECK_MODULES report the module name instead of the variable prefix

In Autoconf output from PKG_CHECK_MODULES in pkg.m4, the "checking for" message refers to the first argument of PKG_CHECK_MODULES, the variable prefix, instead of the second argument, the module being checked for.
    
This results in strange output (like ALL CAPS module names) in various packages. And when probing for modules, one can't always use a variable prefix that matches the module name (since ‘-’ and other characters aren't allowed in variable names), so the Autoconf output is going to refer to something odd.
    
The status output should reference the module name being probed for, both because it looks nicer and because, when debugging problems, this references the actual thing being probed for on the system, rather than an internal implementation detail.

There could be an argument against this change, because it might seem like it makes the variable prefix name less discoverable, but that would not stand as the actual variables are marked as precious and are listed in «configure --help» output anyway.

I'm attaching the change suggested by Russ Allbery in https://bugs.debian.org/732797, which I converted into an actual patch.
Comment 1 Dan Nicholson 2017-03-19 15:02:41 UTC
I'm a little worried that the output will be overwhelming when there are
a lot of modules, but I agree this is an improvment in most cases.

Attachment 127412 [details] pushed as 3b96e74 - Make PKG_CHECK_MODULES report the module name instead of the variable prefix


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.