]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* config/ltmain.m4sh: add foo/bin for every foo/lib
authorCharles Wilson <libtool@cwilson.fastmail.fm>
Wed, 13 Oct 2004 13:47:54 +0000 (13:47 +0000)
committerBob Friesenhahn <bfriesen@simple.dallas.tx.us>
Wed, 13 Oct 2004 13:47:54 +0000 (13:47 +0000)
in dllsearchpath when creating wrapper script.  Fixes
depdemo-relink test failure.

* config/ltmain.m4sh (func_mode_link): don't relink
on cygwin/mingw; no need.  But do ensure that wrappers
are created unless doing a purely static build.

ChangeLog
config/ltmain.m4sh

index c7a82ac2e0a24491e5bc3f3eba03dd8b34bf10de..29b3b49d5ca85cdcede52ba559a23aef13ce75ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2004-10-13  Charles Wilson  <spam.protected>
+
+       * config/ltmain.m4sh: add foo/bin for every foo/lib 
+       in dllsearchpath when creating wrapper script.  Fixes
+       depdemo-relink test failure.
+
+2004-10-13  Charles Wilson  <spam.protected>
+
+       * config/ltmain.m4sh (func_mode_link): don't relink
+       on cygwin/mingw; no need.  But do ensure that wrappers
+       are created unless doing a purely static build.
+
 2004-10-13  Gary V. Vaughan  <gary@gnu.org>
 
        * tests/tagdemo-undef.test: New test for hosts that allow shared
index 45edebe63ac15f2533b206409ed924ffa0390d06..efb3a28bfcdf581af566f8521ffd5dcc00d6f667 100644 (file)
@@ -2543,10 +2543,15 @@ func_mode_link ()
        esac
        case $host in
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+         testbindir=`${ECHO} "$dir" | ${SED} -e 's*/lib$*/bin*'`
          case :$dllsearchpath: in
          *":$dir:"*) ;;
          *) dllsearchpath="$dllsearchpath:$dir";;
          esac
+         case :$dllsearchpath: in
+         *":$testbindir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$testbindir";;
+         esac
          ;;
        esac
        continue
@@ -3541,10 +3546,19 @@ func_mode_link ()
        link_static=no # Whether the deplib will be linked statically
        if test -n "$library_names" &&
           { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
-         if test "$installed" = no; then
-           notinst_deplibs="$notinst_deplibs $lib"
-           need_relink=yes
-         fi
+         case $host in
+         *cygwin* | *mingw*)
+             # No point in relinking DLLs because paths are not encoded
+             notinst_deplibs="$notinst_deplibs $lib"
+             need_relink=no
+           ;;
+         *)
+           if test "$installed" = no; then
+             notinst_deplibs="$notinst_deplibs $lib"
+             need_relink=yes
+           fi
+           ;;
+         esac
          # This is a shared library
 
          # Warn about portability, can't link against -module's on some
@@ -5370,10 +5384,15 @@ EOF
        fi
        case $host in
        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+         testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
          case :$dllsearchpath: in
          *":$libdir:"*) ;;
          *) dllsearchpath="$dllsearchpath:$libdir";;
          esac
+         case :$dllsearchpath: in
+         *":$testbindir:"*) ;;
+         *) dllsearchpath="$dllsearchpath:$testbindir";;
+         esac
          ;;
        esac
       done
@@ -5429,7 +5448,21 @@ EOF
 
       func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
 
-      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+
+      wrappers_required=yes
+      case $host in
+      *cygwin* | *mingw* )
+        if test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      *)
+        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      esac
+      if test "$wrappers_required" = no; then
        # Replace the output file specification.
        compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
        link_command="$compile_command$compile_rpath"