pkg: add support for PKG_CONFIG_LIBDIR env variable

pull/15/head
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); free(path);
} }
env_path = getenv("PKG_CONFIG_LIBDIR");
if (env_path == NULL)
env_path = PKG_DEFAULT_PATH;
if (!(flags & PKGF_ENV_ONLY)) if (!(flags & PKGF_ENV_ONLY))
{ {
count = path_split(PKG_DEFAULT_PATH, &path); count = path_split(env_path, &path);
iter = 0; iter = 0;
while (iter < count) while (iter < count)