pkg: Include CPATH in header search path

Look for the CPATH environment variable when constructing the -I header
search path like GCC does. See
https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html.

https://bugs.freedesktop.org/show_bug.cgi?id=99224
This commit is contained in:
v4hn 2017-03-19 09:13:59 -05:00 committed by Dan Nicholson
parent c53385b5db
commit 4ade8fc901

6
pkg.c
View file

@ -745,6 +745,12 @@ verify_package (Package *pkg)
system_directories = add_env_variable_to_list (system_directories, search_path);
search_path = g_getenv ("CPATH");
if (search_path != NULL)
{
system_directories = add_env_variable_to_list (system_directories, search_path);
}
search_path = g_getenv ("C_INCLUDE_PATH");
if (search_path != NULL)
{