[RFC/PATCH] Support PKG_CONFIG_FALLBACK_PATH

Dan Nicholson dbn.lists at gmail.com
Mon Sep 3 18:39:39 PDT 2012


On Aug 29, 2012 3:11 PM, "Jack Nagel" <jacknagel at gmail.com> wrote:
>
> If PKG_CONFIG_FALLBACK_PATH is set, any included paths will be searched
> after those on PKG_CONFIG_PATH and the internal pc search path.
>
> This allows a user to add directories that should be searched after
> PKG_CONFIG_PATH and the internal search path, but may not have existed
> at compile-time.

Thanks for the patch, but doesn't this duplicate the (poorly named)
PKG_CONFIG_LIBDIR variable? I think you could suitably alter the system
path like so:

if [ -z "$PKG_CONFIG_LIBDIR" ]; then
    PKG_CONFIG_LIBDIR="$extra_path:`pkg-config --variable pc_path
pkg-config`"
else
    PKG_CONFIG_LIBDIR="$extra_path:$PKG_CONFIG_LIBDIR"
fi

Then you can set the system path without interfering with your users. I'd
be wary of adding a third path altering environment variable. What do you
think?

--
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pkg-config/attachments/20120903/af17864d/attachment.html>


More information about the pkg-config mailing list