* libltdl/Makefile.am: Use -no-undefined for dll compliance.
* libltdl/configure.in: Use AC_LIBTOOL_WIN32_DLL for dll
compliance.
* libltdl/ltdl.c: Define and use LTDL_GLOBAL_DATA to correctly
export global data symbols from libtldl.dll.
* libltdl/ltdl.h: Define and use LTDL_SCOPE to declare data
symbols as dllexport, dllimport or plain ornary extern depending
in the context in which it is used.
1999-12-13 Gary V. Vaughan <gary@oranda.demon.co.uk>
+ * NEWS: updated.
+ * libltdl/Makefile.am: Use -no-undefined for dll compliance.
+ * libltdl/configure.in: Use AC_LIBTOOL_WIN32_DLL for dll
+ compliance.
+ * libltdl/ltdl.c: Define and use LTDL_GLOBAL_DATA to correctly
+ export global data symbols from libtldl.dll.
+ * libltdl/ltdl.h: Define and use LTDL_SCOPE to declare data
+ symbols as dllexport, dllimport or plain ornary extern depending
+ in the context in which it is used.
+
* doc/libtool.texi (Distributing libltdl): document use of
ltdl.m4.
* libltdl/configure.in: Removed header checks, as they are
NEWS - list of user-visible changes between releases of GNU Libtool
New in 1.3d: 1999-??-??; CVS version 1.3c, Libtool team:
+* libltdl can now be built as a dll with win32.
* m4 macros needed to configure libltdl split out into libltdl/ltdl.m4.
* Start of support code for cross-compiling to win32.
* Improved support for mingw32.
environments is inherited from --build flag passed to configure.
* Various bugfixes
\f
-New in 1.3.4: 1999-??-??, CVS version 1.3.3a, Libtool team:
+New in 1.3.4: 1999-12-08, CVS version 1.3.3a, Libtool team:
* Support for Compaq Tru64 V5.0.
+* Improved support for Digital Unix V4.*.
* Improved support for NetBSD, FreeBSD and Unixware.
* Many fine bugfixes.
\f
endif
libltdl_la_SOURCES = ltdl.c
-libltdl_la_LDFLAGS = -version-info 1:2:1
+libltdl_la_LDFLAGS = -no-undefined -version-info 1:2:1
libltdl_la_LIBADD = $(LIBADD_DL)
libltdlc_la_SOURCES = ltdl.c
AC_PROG_CC
AC_C_CONST
AC_C_INLINE
+
+AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
#include "ltdl.h"
+#ifdef DLL_EXPORT
+# define LTDL_GLOBAL_DATA __declspec(dllexport)
+#else
+# define LTDL_GLOBAL_DATA
+#endif
+
/* max. filename length */
#ifndef LTDL_FILENAME_MAX
#define LTDL_FILENAME_MAX 1024
#ifndef HAVE_PRELOADED_SYMBOLS
/* If libtool won't define it, we'd better do */
-const lt_dlsymlist lt_preloaded_symbols[1] = { { 0, 0 } };
+LTDL_GLOBAL_DATA const lt_dlsymlist lt_preloaded_symbols[1] = { { 0, 0 } };
#endif
static const char *last_error = 0;
-lt_ptr_t (*lt_dlmalloc) LTDL_PARAMS((size_t size)) = (lt_ptr_t(*)LTDL_PARAMS((size_t)))malloc;
-void (*lt_dlfree) LTDL_PARAMS((lt_ptr_t ptr)) = (void(*)LTDL_PARAMS((lt_ptr_t)))free;
+LTDL_GLOBAL_DATA lt_ptr_t (*lt_dlmalloc) LTDL_PARAMS((size_t size)) = (lt_ptr_t(*)LTDL_PARAMS((size_t)))malloc;
+LTDL_GLOBAL_DATA void (*lt_dlfree) LTDL_PARAMS((lt_ptr_t ptr)) = (void(*)LTDL_PARAMS((lt_ptr_t)))free;
typedef struct lt_dltype_t {
struct lt_dltype_t *next;
# define lt_ptr_t char*
#endif
+/* DLL building support on win32 hosts; mostly to workaround their
+ ridiculous implementation of data symbol exporting. */
+#ifndef LTDL_SCOPE
+# ifdef _WIN32
+# ifdef DLL_EXPORT /* defined by libtool (if required) */
+# define LTDL_SCOPE __declspec(dllexport)
+# endif
+# ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */
+# define LTDL_SCOPE extern __declspec(dllimport)
+# endif
+# endif
+# ifndef LTDL_SCOPE /* static linking or !_WIN32 */
+# define LTDL_SCOPE extern
+# endif
+#endif
+
#include <stdlib.h>
#ifdef _LTDL_COMPILE_
extern int lt_dlsetsearchpath LTDL_PARAMS((const char *search_path));
extern const char *lt_dlgetsearchpath LTDL_PARAMS((void));
-extern const lt_dlsymlist lt_preloaded_symbols[];
+LTDL_SCOPE const lt_dlsymlist lt_preloaded_symbols[];
#define LTDL_SET_PRELOADED_SYMBOLS() lt_dlpreload_default(lt_preloaded_symbols)
-extern lt_ptr_t (*lt_dlmalloc)LTDL_PARAMS((size_t size));
-extern void (*lt_dlfree)LTDL_PARAMS((lt_ptr_t ptr));
+LTDL_SCOPE lt_ptr_t (*lt_dlmalloc)LTDL_PARAMS((size_t size));
+LTDL_SCOPE void (*lt_dlfree)LTDL_PARAMS((lt_ptr_t ptr));
__END_DECLS