+2006-05-11 Bruno Haible <bruno@clisp.org>
+
+ * intl-exports.c: New file.
+ * osdep.c: Include it on Cygwin.
+ * Makefile.in (LDFLAGS_yes, LDFLAGS_no): New variables.
+ (LDFLAGS): Use it.
+ (SOURCES): Add intl-exports.c.
+ (libgnuintl.h): When compiling a DLL on Cygwin, mark all exported
+ variables as to be imported.
+
2006-04-17 Bruno Haible <bruno@clisp.org>
* Makefile.in (MKINSTALLDIRS, mkinstalldirs): Remove variables.
-DDEPENDS_ON_LIBICONV=1 @DEFS@
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@ @CFLAG_VISIBILITY@
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@ $(LDFLAGS_@CYGWINDLL@)
+LDFLAGS_yes = -Wl,--export-all-symbols
+LDFLAGS_no =
LIBS = @LIBS@
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
version.c \
osdep.c \
os2compat.c \
+ intl-exports.c \
intl-compat.c
OBJECTS = \
bindtextdom.$lo \
-e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
-e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
< $(srcdir)/libgnuintl.h.in \
+ | if test '@CYGWINDLL@' = yes; then \
+ sed -e 's/extern \([^()]*\);/extern __declspec (dllimport) \1;/'; \
+ else \
+ cat; \
+ fi \
| sed -e 's/extern \([^"]\)/extern LIBINTL_DLL_EXPORTED \1/' \
-e "/#define _LIBINTL_H/r $(srcdir)/export.h" \
| sed -e 's,@''HAVE_VISIBILITY''@,@HAVE_VISIBILITY@,g' \
/* OS dependent parts of libintl.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA. */
-#if defined __EMX__
+#if defined __CYGWIN__
+# include "intl-exports.c"
+#elif defined __EMX__
# include "os2compat.c"
#else
/* Avoid AIX compiler warning. */