aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dependencies.py2
-rw-r--r--modules/gnome.py9
2 files changed, 11 insertions, 0 deletions
diff --git a/dependencies.py b/dependencies.py
index 492fee0..87c1ba1 100644
--- a/dependencies.py
+++ b/dependencies.py
@@ -71,6 +71,7 @@ class PkgConfigDependency(Dependency):
def __init__(self, name, environment, kwargs):
Dependency.__init__(self)
+ self.is_libtool = False
self.required = kwargs.get('required', True)
if 'native' in kwargs and environment.is_cross_build():
want_cross = not kwargs['native']
@@ -150,6 +151,7 @@ class PkgConfigDependency(Dependency):
'but we could not compute the actual shared'
'library path' % lib)
lib = shared_lib
+ self.is_libtool = True
self.libs.append(lib)
diff --git a/modules/gnome.py b/modules/gnome.py
index b7330d9..60c994e 100644
--- a/modules/gnome.py
+++ b/modules/gnome.py
@@ -168,6 +168,15 @@ class GnomeModule:
girdir = dep.held_object.get_variable ("girdir")
if girdir:
scan_command += ["--add-include-path=%s" % girdir]
+ for lib in dep.held_object.libs:
+ if os.path.isabs(lib) and dep.held_object.is_libtool:
+ scan_command += ["-L%s" % os.path.dirname(lib)]
+ libname = os.path.basename(lib)
+ if libname.startswith("lib"):
+ libname = libname[3:]
+ libname = libname.split(".so")[0]
+ lib = "-l%s" % libname
+ scan_command += [lib]
inc_dirs = None
if kwargs.get('include_directories'):