summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorv4hn <me@v4hn.de>2017-03-19 09:13:59 -0500
committerDan Nicholson <dbn.lists@gmail.com>2017-03-19 09:13:59 -0500
commit4ade8fc90115c4932bc198a500a1efd13f243cd4 (patch)
tree2cdedee99a3648301f85eb4002a87b53025fec7f
parentc53385b5dbd25844faa89b1c8297d61ab05ed6ef (diff)
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
-rw-r--r--pkg.c6
1 files changed, 6 insertions, 0 deletions
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)
{