3 @@ -443,7 +443,7 @@ opt_warning=:
4 # name if it has been set yet.
7 - $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
8 + $ECHO "OpenWrt-$progname-patched-2.4: ${opt_mode+$opt_mode: }$*"
12 @@ -469,14 +469,14 @@ func_echo_all ()
13 # Echo program name prefixed message to standard error.
16 - $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
17 + $ECHO "OpenWrt-$progname-patched-2.4: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
21 # Echo program name prefixed warning message to standard error.
24 - $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
25 + $opt_warning && $ECHO "OpenWrt-$progname-patched-2.4: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
29 @@ -1416,8 +1416,8 @@ func_infer_tag ()
30 # was found and let the user know that the "--tag" command
31 # line option must be used.
32 if test -z "$tagname"; then
33 - func_echo "unable to infer tagged configuration"
34 - func_fatal_error "specify a tag with \`--tag'"
35 + func_echo "defaulting to \`CC'"
36 + func_echo "if this is not correct, specify a tag with \`--tag'"
38 # func_verbose "using $tagname tagged configuration"
40 @@ -2953,8 +2953,15 @@ func_mode_install ()
41 func_append dir "$objdir"
43 if test -n "$relink_command"; then
44 + # Strip any trailing slash from the destination.
45 + func_stripname '' '/' "$libdir"
46 + s_libdir=$func_stripname_result
48 + func_stripname '' '/' "$destdir"
49 + s_destdir=$func_stripname_result
51 # Determine the prefix the user has applied to our future dir.
52 - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
53 + inst_prefix_dir=`$ECHO "$s_destdir" | $SED -e "s%$s_libdir\$%%"`
55 # Don't allow the user to place us outside of our expected
56 # location b/c this prevents finding dependent libraries that
57 @@ -2962,8 +2969,11 @@ func_mode_install ()
58 # At present, this check doesn't affect windows .dll's that
59 # are installed into $libdir/../bin (currently, that works fine)
60 # but it's something to keep an eye on.
61 - test "$inst_prefix_dir" = "$destdir" && \
62 - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
64 + # This breaks install into our staging area. -PB
66 + # test "$inst_prefix_dir" = "$destdir" && \
67 + # func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
69 if test -n "$inst_prefix_dir"; then
70 # Stick the inst_prefix_dir data into the link command.
71 @@ -2972,6 +2982,9 @@ func_mode_install ()
72 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
75 + relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/lib[^[:space:]]*%%"`
76 + relink_command=`$ECHO "$relink_command" | $SED "s%-L[[:space:]]*/usr/lib[^[:space:]]*%%"`
78 func_warning "relinking \`$file'"
79 func_show_eval "$relink_command" \
80 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
81 @@ -6504,8 +6517,12 @@ func_mode_link ()
85 - dir="$lt_sysroot$libdir"
86 - absdir="$lt_sysroot$libdir"
87 + # Adding 'libdir' from the .la file to our library search paths
88 + # breaks crosscompilation horribly. We cheat here and don't add
89 + # it, instead adding the path where we found the .la. -CL
90 + dir="$lt_sysroot$abs_ladir"
94 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
96 @@ -6683,7 +6700,7 @@ func_mode_link ()
98 if test "$installed" = no; then
99 func_append notinst_deplibs " $lib"
105 @@ -6887,7 +6904,6 @@ func_mode_link ()
106 test "$hardcode_direct_absolute" = no; then
107 add="$libdir/$linklib"
108 elif test "$hardcode_minus_L" = yes; then
109 - add_dir="-L$libdir"
111 elif test "$hardcode_shlibpath_var" = yes; then
112 case :$finalize_shlibpath: in
113 @@ -6903,8 +6919,6 @@ func_mode_link ()
114 add="$libdir/$linklib"
117 - # We cannot seem to hardcode it, guess we'll fake it.
118 - add_dir="-L$libdir"
119 # Try looking first in the location we're being installed to.
120 if test -n "$inst_prefix_dir"; then
122 @@ -7059,7 +7073,17 @@ func_mode_link ()
126 - path="-L$absdir/$objdir"
127 + # OE sets installed=no in staging. We need to look in $objdir and $absdir,
128 + # preferring $objdir. RP 31/04/2008
129 + if test -f "$absdir/$objdir/$depdepl" ; then
130 + depdepl="$absdir/$objdir/$depdepl"
131 + path="-L$absdir/$objdir"
132 + elif test -f "$absdir/$depdepl" ; then
133 + depdepl="$absdir/$depdepl"
136 + path="-L$absdir/$objdir"
141 @@ -8050,7 +8074,7 @@ EOF
142 elif test -n "$runpath_var"; then
143 case "$perm_rpath " in
145 - *) func_apped perm_rpath " $libdir" ;;
146 + *) func_append perm_rpath " $libdir" ;;
150 @@ -9257,6 +9281,10 @@ EOF
151 # Replace all uninstalled libtool libraries with the installed ones
153 for deplib in $dependency_libs; do
154 + # Replacing uninstalled with installed can easily break crosscompilation,
155 + # since the installed path is generally the wrong architecture. -CL
156 + newdependency_libs="$newdependency_libs $deplib"
160 func_basename "$deplib"