diff --git a/libpkgconf/client.c b/libpkgconf/client.c index 4ddc13d..139098c 100644 --- a/libpkgconf/client.c +++ b/libpkgconf/client.c @@ -56,8 +56,13 @@ pkgconf_client_init(pkgconf_client_t *client, pkgconf_error_handler_func_t error 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); + + /* GCC uses these environment variables to define system include paths, so we should check them. */ + pkgconf_path_build_from_environ("LIBRARY_PATH", NULL, &client->filter_libdirs); + pkgconf_path_build_from_environ("CPATH", NULL, &client->filter_includedirs); pkgconf_path_build_from_environ("C_INCLUDE_PATH", NULL, &client->filter_includedirs); pkgconf_path_build_from_environ("CPLUS_INCLUDE_PATH", NULL, &client->filter_includedirs); + pkgconf_path_build_from_environ("OBJC_INCLUDE_PATH", NULL, &client->filter_includedirs); } /*