1--- a/ltmain.sh 2014-07-31 10:43:01.634568799 -0300 2+++ b/ltmain.sh 2014-07-31 10:44:14.032018999 -0300 3@@ -226,8 +226,9 @@ 4 # line option must be used. 5 if test -z "$tagname"; then 6 $echo "$modename: unable to infer tagged configuration" 7- $echo "$modename: specify a tag with \`--tag'" 1>&2 8- exit $EXIT_FAILURE 9+ $echo "$modename: defaulting to \`CC'" 10+ $echo "$modename: if this is not correct, specify a tag with \`--tag'" 11+# exit $EXIT_FAILURE 12 # else 13 # $echo "$modename: using $tagname tagged configuration" 14 fi 15@@ -247,6 +248,11 @@ 16 arg="$1" 17 shift 18 19+ # Make -static behave as -all-static 20+ case $arg in 21+ -static) arg="-all-static" ;; 22+ esac 23+ 24 case $arg in 25 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; 26 *) optarg= ;; 27@@ -1238,7 +1244,8 @@ 28 prevarg="$arg" 29 30 case $arg in 31- -all-static) 32+ # Make -static behave like -all-static 33+ -all-static | -static) 34 if test -n "$link_static_flag"; then 35 compile_command="$compile_command $link_static_flag" 36 finalize_command="$finalize_command $link_static_flag" 37@@ -2146,8 +2153,14 @@ 38 absdir="$abs_ladir" 39 libdir="$abs_ladir" 40 else 41- dir="$libdir" 42- absdir="$libdir" 43+ # Adding 'libdir' from the .la file to our library search paths 44+ # breaks crosscompilation horribly. We cheat here and don't add 45+ # it, instead adding the path where we found the .la. -CL 46+ dir="$abs_ladir" 47+ absdir="$abs_ladir" 48+ libdir="$abs_ladir" 49+ #dir="$libdir" 50+ #absdir="$libdir" 51 fi 52 else 53 dir="$ladir/$objdir" 54@@ -2272,7 +2285,7 @@ 55 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 56 if test "$installed" = no; then 57 notinst_deplibs="$notinst_deplibs $lib" 58- need_relink=yes 59+ need_relink=no 60 fi 61 # This is a shared library 62 63@@ -5169,6 +5182,10 @@ 64 # Replace all uninstalled libtool libraries with the installed ones 65 newdependency_libs= 66 for deplib in $dependency_libs; do 67+ # Replacing uninstalled with installed can easily break crosscompilation, 68+ # since the installed path is generally the wrong architecture. -CL 69+ newdependency_libs="$newdependency_libs $deplib" 70+ continue 71 case $deplib in 72 *.la) 73 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` 74@@ -5487,10 +5504,13 @@ 75 # At present, this check doesn't affect windows .dll's that 76 # are installed into $libdir/../bin (currently, that works fine) 77 # but it's something to keep an eye on. 78- if test "$inst_prefix_dir" = "$destdir"; then 79- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 80- exit $EXIT_FAILURE 81- fi 82+ # 83+ # This breaks install into our staging area. -PB 84+ # 85+ # if test "$inst_prefix_dir" = "$destdir"; then 86+ # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 87+ # exit $EXIT_FAILURE 88+ # fi 89 90 if test -n "$inst_prefix_dir"; then 91 # Stick the inst_prefix_dir data into the link command. 92