]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (func_win32_libid) [ cygwin, mingw ]: Robustify sed
authorAlan W. Irwin <irwin@beluga.phys.uvic.ca>
Sun, 25 Sep 2005 07:37:09 +0000 (07:37 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 25 Sep 2005 07:37:09 +0000 (07:37 +0000)
script to determine win32_libid_type.
(link mode) [ mingw ]: Ignore `-lm'.

ChangeLog
ltmain.in

index b7fb1629d0e88c488a2ab6f6070912a2f6ecfe80..c21ccfc464aa4aa073b2c48f3d7e970417ea00eb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-09-25  Alan W. Irwin  <irwin@beluga.phys.uvic.ca>,
+           Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * ltmain.in (func_win32_libid) [ cygwin, mingw ]: Robustify sed
+       script to determine win32_libid_type.
+       (link mode) [ mingw ]: Ignore `-lm'.
+
 2005-09-22  Tim Rice  <tim@multitalents.net>
 
        * libtool.m4 (AC_PROG_NM, AC_LIBTOOL_LANG_CXX_CONFIG)
index debc381761c9cc76c27165818df5f96908641db1..c1b3ddc189783df398726d87bc1dc88ed92da43d 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -157,12 +157,11 @@ func_win32_libid ()
     if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
       $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
       win32_nmres=`eval $NM -f posix -A $1 | \
-       sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
-      if test "X$win32_nmres" = "Ximport" ; then
-        win32_libid_type="x86 archive import"
-      else
-        win32_libid_type="x86 archive static"
-      fi
+       sed -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
     fi
     ;;
   *DLL*)
@@ -1479,11 +1478,11 @@ EOF
       -l*)
        if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
          case $host in
-         *-*-cygwin* | *-*-pw32* | *-*-beos*)
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
            # These systems don't actually have a C or math library (as such)
            continue
            ;;
-         *-*-mingw* | *-*-os2*)
+         *-*-os2*)
            # These systems don't actually have a C library (as such)
            test "X$arg" = "X-lc" && continue
            ;;