From ed126f5b5b675830df8642a07a5849fe9fcf4931 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 6 May 2012 19:44:22 -0500 Subject: [PATCH] pkg: add support for PKG_CONFIG_LIBDIR env variable --- pkg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg.c b/pkg.c index 9abc728..de3f8c4 100644 --- a/pkg.c +++ b/pkg.c @@ -116,9 +116,13 @@ pkg_find(const char *name, unsigned int flags) free(path); } + env_path = getenv("PKG_CONFIG_LIBDIR"); + if (env_path == NULL) + env_path = PKG_DEFAULT_PATH; + if (!(flags & PKGF_ENV_ONLY)) { - count = path_split(PKG_DEFAULT_PATH, &path); + count = path_split(env_path, &path); iter = 0; while (iter < count)