]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4(cygwin mingw32, AC_LIBTOOL_SETUP): On second
authorOlly Betts <olly@muscat.co.uk>
Mon, 26 Jul 1999 12:45:03 +0000 (12:45 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 26 Jul 1999 12:45:03 +0000 (12:45 +0000)
thoughts, only probe for -mdll vs -dll on mingw, and revert to
the old `-Wl,--dll -nostartfiles' on cygwin.

ChangeLog
libtool.m4

index 6302aa6ea7e3f21b1c5a1c58918dcc2b0b9c8268..7c68ff1158e783fbfaaee415c1bb696f263cdfea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+1999-07-26  Olly Betts  <olly@muscat.co.uk>
+
+       * libtool.m4(cygwin mingw32, AC_LIBTOOL_SETUP):  On second
+       thoughts, only probe for -mdll vs -dll on mingw, and revert to
+       the old `-Wl,--dll -nostartfiles' on cygwin.
+
 1999-07-24  Erez Zadok  <ezk@cs.columbia.edu>
 
        * doc/PLATFORMS (i*86-*openbsd2.5):  New platform.
index 3e3d533bde0d877e87f79c27af9fd791abc96b2d..1a5be173e8a9d2f105863369da84a669ebb27848 100644 (file)
@@ -136,23 +136,22 @@ ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
       [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);],
       [lt_cv_need_dllmain=yes],[lt_cv_need_dllmain=no])])
 
-  # old mingw systems require "-dll" to link a DLL, while more recent ones
-  # require "-mdll"
-  lt_nostartfiles=
   case $host in
-  *-*-cygwin)
-    # on cygwin we must also not link crt.o, or else the dll will need
-    # a WinMain@16 definition.
-    lt_nostartfiles=" -nostartfiles" ;;
+  *-*-cygwin*)
+    # cygwin systems need to tell pass --dll to the linker, and not link
+    # crt.o which will require a WinMain@16 definition.
+    lt_cv_cc_ddll_switch="-Wl,-dll -nostartfiles" ;;
+  *-*-mingw*)
+    # old mingw systems require "-dll" to link a DLL, while more recent ones
+    # require "-mdll"
+    SAVE_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -mdll$lt_nostartfiles"
+    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
+      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
+    CFLAGS="$SAVE_CFLAGS" ;;
   esac
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -mdll$lt_nostartfiles"
-  AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
-    [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
-  lt_cv_cc_dll_switch="$lt_cv_cc_dll_switch$lt_nostartfiles"
-  CFLAGS="$SAVE_CFLAGS"
   ;;
-])
+  ])
 esac
 ])