Bug 22375 - pkg-config needs a way to print out its idea of $PKG_CONFIG_PATH
Summary: pkg-config needs a way to print out its idea of $PKG_CONFIG_PATH
Status: RESOLVED INVALID
Alias: None
Product: pkg-config
Classification: Unclassified
Component: src (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Mac OS X (All)
: medium normal
Assignee: Tollef Fog Heen
QA Contact:
URL:
Whiteboard:
Keywords: janitor
Depends on:
Blocks:
 
Reported: 2009-06-19 13:37 UTC by Kyle H
Modified: 2009-08-15 13:13 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Kyle H 2009-06-19 13:37:50 UTC
pkg-config needs a way to print out its idea of what directories it will to search, much like the 'manpath' program.  The idea is that you could do:

PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig:`pkg-config --configpath`
export PKG_CONFIG_PATH

and simply update the current list without having to try to guess what's been compiled into it.

(I'm on OSX.  I have two independent copies of pkg-config, one of which was installed by MacPorts, the other of which was installed by Mono.  The default one is the one from MacPorts.  I need it to recognize where the Mono framework and configs are, but it doesn't by default.  This is currently causing distress with the OpenSimulator.org crowd.)
Comment 1 Daniel Macks 2009-08-15 12:17:53 UTC
As I understand search pathc, that seems overkill (or mis-kill), since pkg-config prepends PKG_CONFIG_PATH to its hardcoded default list. That's unlike man, for which if MANPATH is set, it totally replaces the built-in default. You shell command would put the defaults into PKG_CONFIG_PATH, which would mean duplicates in the ultimate search list (once pkg-config does its prepend-to-default at runtime). Probably harmless, but also definitely useless.

Maybe a different shell incantation would Do What You Need:

PKG_CONFIG_PATH=/Library/Frameworks/Mono.framework/Versions/Current/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
export PKG_CONFIG_PATH
Comment 2 Tollef Fog Heen 2009-08-15 13:13:48 UTC
You already have the pc_path variable:

pkg-config --variable pc_path pkg-config
/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig

In addition, as Daniel Macks points out, the _PATH setting will prepend to the default path, not overwrite it.  If you want to overwrite it, use PKG_CONFIG_LIBDIR.

I'm closing this bug as invalid since this is already well enough served by the features we have.


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.