libpkgconf: handle PKG_CONFIG_SYSTEM_INCLUDE_PATH and PKG_CONFIG_SYSTEM_LIBRARY_PATH environment variables at client init time

pull/109/head
William Pitcock 2016-12-21 19:54:32 -06:00
parent 76754216a4
commit cd0160a4a2
2 changed files with 3 additions and 2 deletions

View File

@ -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);
}
/*

2
main.c
View File

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