From 4ade8fc90115c4932bc198a500a1efd13f243cd4 Mon Sep 17 00:00:00 2001 From: v4hn Date: Sun, 19 Mar 2017 09:13:59 -0500 Subject: 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 --- pkg.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg.c b/pkg.c index a8a3fcd..bff5c42 100644 --- a/pkg.c +++ b/pkg.c @@ -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) { -- cgit v1.2.1