[jhbuild] sysdeps: look in C{,PLUS}_INCLUDE_PATH for headers

commit 0d609dbe83521f70bfeba97198794d3e29a374c9
Author: Ryan Lortie <desrt desrt ca>
Date:   Sun Mar 9 10:59:51 2014 -0400

    sysdeps: look in C{,PLUS}_INCLUDE_PATH for headers
    jhbuild itself sets this variable, but it doesn't seem to consult it
    when looking for sysdeps.
    For additional system library paths, it turns out that setting this
    variable is a better idea than using -I or -isystem in CFLAGS because
    those options are "more powerful" than C_INCLUDE_PATH which is what
    jhbuild uses for pointing to the include directory in its prefix (which
    should take precedence).

 jhbuild/utils/systeminstall.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/jhbuild/utils/systeminstall.py b/jhbuild/utils/systeminstall.py
index e6cf675..93afc11 100644
--- a/jhbuild/utils/systeminstall.py
+++ b/jhbuild/utils/systeminstall.py
@@ -98,6 +98,8 @@ def systemdependencies_met(module_name, sysdeps, config):
                                              (module_name, ''))
         paths += extract_path_from_cflags(config.module_makeargs.get
                                              (module_name, ''))
+        paths += os.environ.get('C_INCLUDE_PATH', '').split(':')
+        paths += os.environ.get('CPLUS_INCLUDE_PATH', '').split(':')
         paths = list(set(paths)) # remove duplicates
         return paths

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]