1 --- a/libltdl/config/ltmain.m4sh
2 +++ b/libltdl/config/ltmain.m4sh
3 @@ -5715,8 +5715,14 @@ func_mode_link ()
7 - dir="$lt_sysroot$libdir"
8 - absdir="$lt_sysroot$libdir"
9 + # Adding 'libdir' from the .la file to our library search paths
10 + # breaks crosscompilation horribly. We cheat here and don't add
11 + # it, instead adding the path where we found the .la. -CL
12 + dir="$lt_sysroot$abs_ladir"
16 + #absdir="$lt_sysroot$libdir"
18 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
20 @@ -6114,8 +6120,6 @@ func_mode_link ()
21 add="$libdir/$linklib"
24 - # We cannot seem to hardcode it, guess we'll fake it.
26 # Try looking first in the location we're being installed to.
27 if test -n "$inst_prefix_dir"; then
29 @@ -6270,7 +6274,17 @@ func_mode_link ()
33 - path="-L$absdir/$objdir"
34 + # OE sets installed=no in staging. We need to look in $objdir and $absdir,
35 + # preferring $objdir. RP 31/04/2008
36 + if test -f "$absdir/$objdir/$depdepl" ; then
37 + depdepl="$absdir/$objdir/$depdepl"
38 + path="-L$absdir/$objdir"
39 + elif test -f "$absdir/$depdepl" ; then
40 + depdepl="$absdir/$depdepl"
43 + path="-L$absdir/$objdir"
48 --- a/libltdl/config/ltmain.sh
49 +++ b/libltdl/config/ltmain.sh
50 @@ -6504,8 +6504,14 @@ func_mode_link ()
54 - dir="$lt_sysroot$libdir"
55 - absdir="$lt_sysroot$libdir"
56 + # Adding 'libdir' from the .la file to our library search paths
57 + # breaks crosscompilation horribly. We cheat here and don't add
58 + # it, instead adding the path where we found the .la. -CL
59 + dir="$lt_sysroot$abs_ladir"
63 + #absdir="$lt_sysroot$libdir"
65 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
67 @@ -6903,8 +6909,6 @@ func_mode_link ()
68 add="$libdir/$linklib"
71 - # We cannot seem to hardcode it, guess we'll fake it.
73 # Try looking first in the location we're being installed to.
74 if test -n "$inst_prefix_dir"; then
76 @@ -7059,7 +7063,17 @@ func_mode_link ()
80 - path="-L$absdir/$objdir"
81 + # OE sets installed=no in staging. We need to look in $objdir and $absdir,
82 + # preferring $objdir. RP 31/04/2008
83 + if test -f "$absdir/$objdir/$depdepl" ; then
84 + depdepl="$absdir/$objdir/$depdepl"
85 + path="-L$absdir/$objdir"
86 + elif test -f "$absdir/$depdepl" ; then
87 + depdepl="$absdir/$depdepl"
90 + path="-L$absdir/$objdir"