From: Peter O'Gorman Date: Wed, 2 Apr 2003 16:44:38 +0000 (+0000) Subject: * libtool.m4: Fix the echo test which I broke earlier. X-Git-Tag: release-1-5~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7fd37b420a7fe326c3bc33edd3c411f4a1552b8;p=thirdparty%2Flibtool.git * libtool.m4: Fix the echo test which I broke earlier. * ltmain.in: Make DESTDIR work on darwin, don't use otool. --- diff --git a/ChangeLog b/ChangeLog index ea9c9fb12..8d25ca20f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-04-01 Peter O'Gorman + + * libtool.m4: Fix the echo test which I broke earlier. + * ltmain.in: Make DESTDIR work on darwin, don't use otool. + 2003-03-31 Keith Packard * ltmain.in: New flag -version-number to be used for maintaining diff --git a/libtool.m4 b/libtool.m4 index f594fd040..b66e22298 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -392,6 +392,8 @@ else : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && + eval echo_test_var=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\\\t') 2>/dev/null` && + test "X$echo_test_var" = "X\t" && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL @@ -401,6 +403,8 @@ else echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && + eval echo_test_var=`($CONFIG_SHELL "[$]0" --fallback-echo '\\\t') 2>/dev/null` && + test "X$echo_test_var" = "X\t" && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" diff --git a/ltmain.in b/ltmain.in index 5ac8f8a8e..09b15501b 100644 --- a/ltmain.in +++ b/ltmain.in @@ -2319,7 +2319,7 @@ EOF *-*-darwin* ) # if the lib is a module then we can not link against it, someone # is ignoring the new warnings I added - if test -z `otool -XD $add` ; then + if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo @@ -2411,6 +2411,12 @@ EOF *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir"