From cd0160a4a2b29cc6a32f4dde95af6a2b1372538b Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 21 Dec 2016 19:54:32 -0600 Subject: [PATCH] libpkgconf: handle PKG_CONFIG_SYSTEM_INCLUDE_PATH and PKG_CONFIG_SYSTEM_LIBRARY_PATH environment variables at client init time --- libpkgconf/client.c | 3 +++ main.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libpkgconf/client.c b/libpkgconf/client.c index b503d89..6ba37ef 100644 --- a/libpkgconf/client.c +++ b/libpkgconf/client.c @@ -53,6 +53,9 @@ pkgconf_client_init(pkgconf_client_t *client, pkgconf_error_handler_func_t error if (client->error_handler == NULL) client->error_handler = pkgconf_default_error_handler; + + pkgconf_path_build_from_environ("PKG_CONFIG_SYSTEM_LIBRARY_PATH", SYSTEM_LIBDIR, &client->filter_libdirs); + pkgconf_path_build_from_environ("PKG_CONFIG_SYSTEM_INCLUDE_PATH", SYSTEM_INCLUDEDIR, &client->filter_includedirs); } /* diff --git a/main.c b/main.c index 083772a..f938a7e 100644 --- a/main.c +++ b/main.c @@ -683,8 +683,6 @@ main(int argc, char *argv[]) }; pkgconf_client_init(&pkg_client, error_handler, NULL); - pkgconf_path_build_from_environ("PKG_CONFIG_SYSTEM_LIBRARY_PATH", SYSTEM_LIBDIR, &pkg_client.filter_libdirs); - pkgconf_path_build_from_environ("PKG_CONFIG_SYSTEM_INCLUDE_PATH", SYSTEM_INCLUDEDIR, &pkg_client.filter_includedirs); while ((ret = pkg_getopt_long_only(argc, argv, "", options, NULL)) != -1) {