]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4 (ltconfig_enable_win32_dll): pass --enable-win32-dll to
authorGary V. Vaughan <gary@gnu.org>
Wed, 28 Apr 1999 14:46:44 +0000 (14:46 +0000)
committerGary V. Vaughan <gary@gnu.org>
Wed, 28 Apr 1999 14:46:44 +0000 (14:46 +0000)
ltconfig if this is set.
(AC_LIBTOOL_WIN32_DLL): New macro required for libtool to attempt
a dll build on win32 hosts.
* ltconfig.in (--enable-win32-dll): new flag for the cli.
(cygwin*|mingw*|os2*, ltconfig_enable_win32_dll): if this is not set
to yes, then do not attempt to build shared libraries.
* doc/libtool.texi: document AC_LIBTOOL_WIN32_DLL.
* NEWS: noted new macro.

ChangeLog
NEWS
doc/libtool.texi
libtool.m4
ltconfig.in

index b36c0b5c5a2a3849ba0b47c30723b09a46c8bf32..813e268e99ea967d3ccad27960979ca27767c3dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+1999-04-28  Gary V. Vaughan  <gary@oranda.demon.co.uk>
+
+       * libtool.m4 (ltconfig_enable_win32_dll): pass --enable-win32-dll to
+       ltconfig if this is set.
+       (AC_LIBTOOL_WIN32_DLL): New macro required for libtool to attempt
+       a dll build on win32 hosts.
+       * ltconfig.in (--enable-win32-dll): new flag for the cli.
+       (cygwin*|mingw*|os2*, ltconfig_enable_win32_dll): if this is not set
+       to yes, then do not attempt to build shared libraries.
+       * doc/libtool.texi: document AC_LIBTOOL_WIN32_DLL.
+       * NEWS: noted new macro.
+
 1999-04-27  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * libtool.m4 (AC_LIBTOOL_DLOPEN, AC_ENABLE_SHARED,
diff --git a/NEWS b/NEWS
index c17792175d8509ee3944dbfc94a57d33a093e3f2..6d19b0428fb393740ce4bb0344be69244da53d07 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@ NEWS - list of user-visible changes between releases of GNU Libtool
 
 New in 1.3: 1999-04-??; CVS version 1.2g, Libtool team:
 * AM_PROG_LIBTOOL is smaller and faster
+* AC_LIBTOOL_WIN32_DLL is required in configure.in for libtool to
+  attempt to build dlls on win32 hosts
 * Shared libraries on AmigaOS up to version 4 are now disabled
   since they don't meet libtool's requirements for shared libraries
 * -L supports now relative directories
index 61e836f8d5746dec6052a46cb79a8d8da1131c6b..3b8eeeedb237871ac6f9ab722d44db586d0fcf3f 100644 (file)
@@ -1785,7 +1785,22 @@ on @file{libtool}.
 Enable checking for dlopen support. This macro should be used if
 the package makes use of the @samp{-dlopen} and @samp{-dlpreopen} flags,
 otherwise libtool will assume that the system does not support dlopening.
-The macro must be called *before* @code{AM_PROG_LIBTOOL}.
+The macro must be called @strong{before} @code{AM_PROG_LIBTOOL}.
+@end defmac
+
+@defmac AC_LIBTOOL_WIN32_DLL
+This macro should be used if the package has been ported to build clean
+dlls on win32 platforms.  Usually this means that any library data items
+are exported with @code{__declspec(dllexport)} and imported with
+@code{__declspec(dllimport)}.  If this macro is not used, libtool will
+assume that the package libraries are not dll clean and will build only
+static libraries on win32 hosts.
+
+@code{AM_PROG_LIBTOOL} must be called @strong{after} this macro, and
+provision must be made to pass @samp{-no-undefined} to @code{libtool}
+in link mode from the package @code{Makefile}.  Naturally, passing
+@samp{-no-undefined} means that all the library symbols @strong{really are}
+defined at link time!
 @end defmac
 
 @defmac AC_DISABLE_FAST_INSTALL
index 80a07aecbb1ffcd959c71364a1934ab9833f93e1..d45e11431208132771f9b908ea0673e9414744c4 100644 (file)
@@ -75,6 +75,8 @@ test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
 [libtool_flags="$libtool_flags --enable-dlopen"])
+ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
+[libtool_flags="$libtool_flags --enable-win32-dll"])
 AC_ARG_ENABLE(libtool-lock,
   [  --disable-libtool-lock  avoid locking (might break parallel builds)])
 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
@@ -126,6 +128,10 @@ esac
 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([AC_LIBTOOL_SETUP])])
 
+# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
+AC_DEFUN(AC_LIBTOOL_WIN32_DLL,
+[AC_BEFORE([AC_LIBTOOL_WIN32_DLL], [AC_LIBTOOL_SETUP])])
+
 # AC_ENABLE_SHARED - implement the --enable-shared flag
 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
index 6194af33b400e19e93e8cc9247d51be6fe115752..9418cd9d16b93ead1ffc08fed990076da81f415a 100755 (executable)
@@ -185,6 +185,7 @@ enable_shared=yes
 enable_static=yes
 enable_fast_install=yes
 enable_dlopen=unknown
+enable_win32_dll=no
 ltmain=
 silent=
 srcdir=
@@ -244,6 +245,7 @@ Generate a system-specific libtool script.
     --disable-static       do not build static libraries
     --disable-fast-install do not optimize for fast installation
     --enable-dlopen        enable dlopen support
+    --enable-win32-dll     enable building dlls on win32 hosts
     --help                 display this help and exit
     --no-verify            do not verify that HOST is a valid host type
 -o, --output=FILE          specify the output file [default=$default_ofile]
@@ -277,6 +279,8 @@ EOM
 
   --enable-dlopen) enable_dlopen=yes ;;
 
+  --enable-win32-dll) enable_win32_dll=yes ;;
+
   --quiet | --silent) silent=yes ;;
 
   --srcdir) prev=srcdir ;;
@@ -1966,6 +1970,17 @@ test "$dynamic_linker" = no && can_build_shared=no
 # Report the final consequences.
 echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
 
+# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
+# configure.in, otherwise build static only libraries.
+case "$host_os" in
+cygwin* | mingw* | os2*)
+  if test x$can_build_shared = xyes; then
+    test x$enable_win32_dll = xno && can_build_shared=no
+    echo "checking if package supports dlls... $can_build_shared" 1>&6
+  fi
+;;
+esac
+
 if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
   case "$deplibs_check_method" in
   "file_magic "*)