[jhbuild] sysdeps: Search C include files in multiarch subdirectories



commit 87b135a1f84baa857de5986c957b8e2c3c403245
Author: Emanuele Aina <emanuele aina collabora com>
Date:   Thu Sep 5 13:20:49 2013 +0200

    sysdeps: Search C include files in multiarch subdirectories
    
    Since version 3.9.7-2 of the libtiff4-dev Debian package, the tiff.h
    header file has been moved to /usr/include/x86_64-linux-gnu/tiff.h and
    jhbuild was unable to detect its availability when checking for system
    dependencies.
    
    Adding "/usr/include/`gcc -print-multiarch`" to the search paths fixes
    the problem.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707561

 jhbuild/utils/systeminstall.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/jhbuild/utils/systeminstall.py b/jhbuild/utils/systeminstall.py
index f9c2ddc..aeeca16 100755
--- a/jhbuild/utils/systeminstall.py
+++ b/jhbuild/utils/systeminstall.py
@@ -80,8 +80,14 @@ def systemdependencies_met(module_name, sysdeps, config):
             except StopIteration:
                 pass
             return paths
-        # search /usr/include by default
+        try:
+            multiarch = subprocess.check_output(['gcc', '-print-multiarch']).strip()
+        except:
+            multiarch = None
+        # search /usr/include and its multiarch subdir (if any) by default
         paths = [ os.path.join(os.sep, 'usr', 'include')]
+        if multiarch:
+            paths += [ os.path.join(paths[0], multiarch) ]
         paths += extract_path_from_cflags(os.environ.get('CPPFLAGS', ''))
         # check include paths incorrectly configured in CFLAGS, CXXFLAGS
         paths += extract_path_from_cflags(os.environ.get('CFLAGS', ''))


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