From: Gary V. Vaughan Date: Thu, 24 Dec 1998 16:02:41 +0000 (+0000) Subject: fix deplibs for non ltlibs on win32 X-Git-Tag: automake_1-4~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7791b0d40bb8059019e1d2600ecb8d5f5c0ae76d;p=thirdparty%2Flibtool.git fix deplibs for non ltlibs on win32 --- diff --git a/ChangeLog b/ChangeLog index a36059d96..f9c95be80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,18 @@ * 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 * ltmain.in (SP2NL, NL2SP): use `tr' magic to avoid passing very diff --git a/ltmain.in b/ltmain.in index 685a8ae23..43edde613 100644 --- 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