summaryrefslogtreecommitdiff
blob: 26f9c754dde5a04066e3ae49ab837637594059d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
With libtool, link local libraries with /path/to/libfile.la instead of libpath,
to avoid encoding local libpath into installed la-file.
These also have to be linked first, to avoid finding already installed
libraries of previous versions during libtool-relink.
--- libconfix/plugins/c/linked.py.orig	2010-06-25 11:30:40.885595798 +0200
+++ libconfix/plugins/c/linked.py	2010-06-25 11:31:07.055184455 +0200
@@ -128,6 +128,8 @@
         pass
 
     def get_linkline(self):
+        local_paths = []
+        local_libraries = []
         native_paths = []
         native_libraries = []
         external_linkline = []
@@ -150,8 +152,11 @@
 
         for bi in native_libs_to_use:
             if isinstance(bi, BuildInfo_CLibrary_NativeLocal):
-                native_paths.append('-L'+'/'.join(['$(top_builddir)']+bi.dir()))
-                native_libraries.append('-l'+bi.name())
+                if self.__use_libtool:
+                    local_libraries.append('/'.join(['$(top_builddir)']+bi.dir()+['lib'+bi.name()+'.la']))
+                else:
+                    local_paths.append('-L'+'/'.join(['$(top_builddir)']+bi.dir()))
+                    local_libraries.append('-l'+bi.name())
                 continue
             if isinstance(bi, BuildInfo_CLibrary_NativeInstalled):
                 using_installed_library = True
@@ -173,7 +178,7 @@
             external_linkline.extend(elem)
             pass
             
-        return native_paths + native_libraries + external_linkline
+        return local_paths + local_libraries + native_paths + native_libraries + external_linkline
     
     def __init_buildinfo(self):
         self.__buildinfo_direct_dependent_native_libs = []