pkg: add support for PKG_CONFIG_LIBDIR env variable

feature/tap-sh
William Pitcock 2012-05-06 19:44:22 -05:00
parent 52602d336f
commit ed126f5b5b
1 changed files with 5 additions and 1 deletions

6
pkg.c
View File

@ -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)