]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
fix deplibs for non ltlibs on win32
authorGary V. Vaughan <gary@gnu.org>
Thu, 24 Dec 1998 16:02:41 +0000 (16:02 +0000)
committerGary V. Vaughan <gary@gnu.org>
Thu, 24 Dec 1998 16:02:41 +0000 (16:02 +0000)
ChangeLog
ltmain.in

index a36059d967de5043188c5abe5f0a070291ec424b..f9c95be80e031c1db7e569fd52d1f52512fc014b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * TODO: removed the reference to making libltdl and demo work on
        win32.  They *do* work now that wrapper scripts are functioning.
        
+       * ltmain.in (file_magic_command): It turns out that if the
+       file_magic_command generates huge output (e.g. running `objdump
+       -f' over a large import lib [say libX11.a]) the expr to check it
+       against the file_magic_regex blows up.  There is now an optimistic
+       heuristic, to save only the first 10 lines of running
+       file_magic_command which (at risk of sounding like Bill) should be
+       enough for anyone =)O|.
+
+       * ltmain.in: Set the compile_dependencylibs and dllsearchpath for
+       non-libtool libs, or else libdeps only works between ltlibs for
+       cygwin32.
+
 1998-12-23  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * ltmain.in (SP2NL, NL2SP): use `tr' magic to avoid passing very
index 685a8ae231a291b617f5c8197bcb83af520de3cc..43edde61303c21568b59d0adc53d47d3aa3eb75c 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -740,9 +740,22 @@ compiler."
        esac
        deplibs="$deplibs $arg"
        lib_search_path="$lib_search_path `expr $arg : '-L\(.*\)'`"
+       case "$host" in
+       *-*-cygwin32* | *-*-mingw32* | *-*-os2*)
+         compile_dependencylibs="$compile_dependencylibs $arg"
+         if test -n "$dllsearchpath"; then
+           dllsearchpath="$dllsearchpath:`expr $arg : '-L\(.*\)'`"
+         else
+           dllsearchpath="`expr $arg : '-L\(.*\)'`"
+         fi
+         ;;
+       esac
        ;;
 
-      -l*) deplibs="$deplibs $arg" ;;
+      -l*)
+       deplibs="$deplibs $arg"
+       compile_dependencylibs="$compile_dependencylibs $arg"
+       ;;
 
       -module)
        if test "$module" != yes; then
@@ -1504,8 +1517,9 @@ EOF
                   # strict.  What do you think Gordon?
                    potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
                    for potent_lib in $potential_libs; do
-                     file_output=`eval $file_magic_command $potent_lib`
-                     if test `expr "$file_output" : ".*$file_magic_regex"` -ne 0 ; then
+                     file_output=`eval $file_magic_command $potent_lib \
+                                  | sed '11,$d'`
+                     if test `expr "X$file_output" : "X.*$file_magic_regex"` -ne 0 ; then
                        newdeplibs="$newdeplibs $a_deplib"
                        a_deplib=""
                        break 2