]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4 (AC_LIBTOOL_SETUP): GCC now checks -shared to
authorElizabeth Barham <soggytrousers@yahoo.com>
Fri, 4 Oct 2002 15:34:50 +0000 (15:34 +0000)
committerRobert Boehne <rboehne@gnu.org>
Fri, 4 Oct 2002 15:34:50 +0000 (15:34 +0000)
create a dll for Windows targets.

ChangeLog
libtool.m4

index 114c8baa9603630344ea1a0c9c9daab7d11b2321..902677a904711a5d3dbd8d004423eecfdc75a1d5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-10-04  Elizabeth Barham  <soggytrousers@yahoo.com>
+
+       * libtool.m4 (AC_LIBTOOL_SETUP): GCC now checks -shared to
+       create a dll for Windows targets.
+
 2002-09-24  Robert Boehne  <rboehne@gnu.org>
 
        * ltmain.in: Fixed a few spelling errors.
index 3566c3f40d6819973f3185e9ce491f7bb8fe45e9..7b454202ec6b070d8b6459fbb8c1f43e4c22fe7b 100644 (file)
@@ -507,11 +507,14 @@ AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
   case $host/$CC in
   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
     # old mingw systems require "-dll" to link a DLL, while more recent ones
-    # require "-mdll"
+    # require "-mdll" (and still newer ones would rather have "-shared")
     SAVE_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -mdll"
+    CFLAGS="$CFLAGS -shared"
     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])])
+      [AC_TRY_LINK([],[],[lt_cv_cc_dll_switch=-shared],
+       [
+         CFLAGS="$SAVE_CFLAGS -mdll"
+       AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])])
     CFLAGS="$SAVE_CFLAGS" ;;
   *-*-cygwin* | *-*-pw32*)
     # cygwin systems need to pass --dll to the linker, and not link