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-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,
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
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
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"
# 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
enable_static=yes
enable_fast_install=yes
enable_dlopen=unknown
+enable_win32_dll=no
ltmain=
silent=
srcdir=
--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]
--enable-dlopen) enable_dlopen=yes ;;
+ --enable-win32-dll) enable_win32_dll=yes ;;
+
--quiet | --silent) silent=yes ;;
--srcdir) prev=srcdir ;;
# 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 "*)