The man page documents PKG_CONFIG_LIBDIR: "Replaces the default pkg-config search directory." If you set PKG_CONFIG_PATH it will also default directory too (as documented). But in some cases, the default pkg-config directory should not be looked at. I am a maintainer for the Pkgsrc package build system. We only want our packages to build using the pkg-config files that we specifically choose. We don't want our packages to build based on what is detected using the default pkg-config path. Please consider the following patch so when PKG_CONFIG_LIBDIR is set, use it; otherwise PKG_CONFIG_PATH and default directories are used. $NetBSD: patch-aa,v 1.5 2005/04/21 08:22:32 xtraeme Exp $ --- main.c.orig2005-04-21 10:11:45.000000000 +0200 +++ main.c2005-04-21 10:12:43.000000000 +0200 @@ -278,13 +278,17 @@ debug_spew ("PKG_CONFIG_DEBUG_SPEW variable enabling debug spew\n"); } - search_path = getenv ("PKG_CONFIG_PATH"); + search_path = getenv("PKG_CONFIG_LIBDIR"); + + if (search_path) +add_search_dirs(search_path, G_SEARCHPATH_SEPARATOR_S); + else { +search_path = getenv("PKG_CONFIG_PATH"); if (search_path) - { add_search_dirs(search_path, G_SEARCHPATH_SEPARATOR_S); - } add_search_dirs(PKG_CONFIG_PC_PATH, G_SEARCHPATH_SEPARATOR_S); + } #ifdef G_OS_WIN32 {
Created attachment 2497 [details] [review] Patch is same as in bug report.
Patch is in CVS now, thanks.
pkg-config 0.18 has now been released with a fix for this bug.
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.