Following the discussion on the libtool and the mingw-users lists, I
have installed the following patches, to CVS branch-1-5 and HEAD,
respectively.

Cheers,
Ralf

2005-09-25  Alan W. Irwin  <[EMAIL PROTECTED]>,
            Ralf Wildenhues  <[EMAIL PROTECTED]>

        * libltdl/config/ltmain.m4sh (func_win32_libid)
        [ cygwin, mingw ]: Robustify sed script to determine
        win32_libid_type.
        (func_mode_link) [ mingw ]: Ignore `-lm'.

2005-09-25  Alan W. Irwin  <[EMAIL PROTECTED]>,
            Ralf Wildenhues  <[EMAIL PROTECTED]>

        * ltmain.in (func_win32_libid) [ cygwin, mingw ]: Robustify sed
        script to determine win32_libid_type.
        (link mode) [ mingw ]: Ignore `-lm'.
2005-09-25  Alan W. Irwin  <[EMAIL PROTECTED]>,
            Ralf Wildenhues  <[EMAIL PROTECTED]>

        * libltdl/config/ltmain.m4sh (func_win32_libid)
        [ cygwin, mingw ]: Robustify sed script to determine
        win32_libid_type.
        (func_mode_link) [ mingw ]: Ignore `-lm'.

Index: libltdl/config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.10
diff -u -r1.10 ltmain.m4sh
--- libltdl/config/ltmain.m4sh  22 Sep 2005 07:46:08 -0000      1.10
+++ libltdl/config/ltmain.m4sh  25 Sep 2005 07:29:59 -0000
@@ -681,12 +681,11 @@
     if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
        $EGREP '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*)
@@ -2597,11 +2596,11 @@
       -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
            ;;
2005-09-25  Alan W. Irwin  <[EMAIL PROTECTED]>,
            Ralf Wildenhues  <[EMAIL PROTECTED]>

        * ltmain.in (func_win32_libid) [ cygwin, mingw ]: Robustify sed
        script to determine win32_libid_type.
        (link mode) [ mingw ]: Ignore `-lm'.

Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v
retrieving revision 1.334.2.88
diff -u -r1.334.2.88 ltmain.in
--- ltmain.in   21 Sep 2005 12:47:54 -0000      1.334.2.88
+++ ltmain.in   25 Sep 2005 07:20:46 -0000
@@ -157,12 +157,11 @@
     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 @@
       -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
            ;;

Reply via email to