1
diff -r 39dc3bef2ec7 gettext-runtime/configure.ac
2
--- a/gettext-runtime/configure.ac Sun Feb 24 17:55:28 2013 +0100
3
+++ b/gettext-runtime/configure.ac Sun Feb 24 17:57:12 2013 +0100
8
+dnl Compilation on mingw and Cygwin needs special Makefile rules, because
9
+dnl 1. when we install a shared library, we must arrange to export
10
+dnl auxiliary pointer variables for every exported variable,
11
+dnl 2. when we install a shared library and a static library simultaneously,
12
+dnl the include file specifies __declspec(dllimport) and therefore we
13
+dnl must arrange to define the auxiliary pointer variables for the
14
+dnl exported variables _also_ in the static library.
15
+if test "$enable_shared" = yes; then
17
+ mingw* | cygwin*) is_woe32dll=yes ;;
18
+ *) is_woe32dll=no ;;
23
+AM_CONDITIONAL([WOE32DLL], [test $is_woe32dll = yes])
24
+if test $is_woe32dll = yes; then
25
+ AC_DEFINE([WOE32DLL], [1],
26
+ [Define when --enable-shared is used on mingw or Cygwin.])
30
+dnl 64-bit mingw does not prepend an underscore to C symbols.
31
+dnl USER_LABEL_PREFIX is set by gl_ASM_SYMBOL_PREFIX, inside gl_INIT.
32
+if test "$USER_LABEL_PREFIX" = _; then
33
+ INTL_EXPORTS_FLAGS="-DUSER_LABEL_PREFIX_UNDERSCORE $INTL_EXPORTS_FLAGS"
35
+AC_SUBST([INTL_EXPORTS_FLAGS])
37
dnl Check for tools needed for formatting the documentation.
38
ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
39
AC_PATH_PROG([PERL], [perl], [$ac_aux_dir_abs/missing perl])
40
diff -r 39dc3bef2ec7 gettext-runtime/intl/intl-exports.c
41
--- a/gettext-runtime/intl/intl-exports.c Sun Feb 24 17:55:28 2013 +0100
42
+++ b/gettext-runtime/intl/intl-exports.c Sun Feb 24 17:57:12 2013 +0100
46
/* IMP(x) is a symbol that contains the address of x. */
47
-#define IMP(x) _imp__##x
48
+#if USER_LABEL_PREFIX_UNDERSCORE
49
+# define IMP(x) _imp__##x
51
+# define IMP(x) __imp_##x
54
/* Ensure that the variable x is exported from the library, and that a
55
pseudo-variable IMP(x) is available. */
56
diff -r 39dc3bef2ec7 gnulib-local/modules/gettext-runtime-misc
57
--- a/gnulib-local/modules/gettext-runtime-misc Sun Feb 24 17:55:28 2013 +0100
58
+++ b/gnulib-local/modules/gettext-runtime-misc Sun Feb 24 17:57:12 2013 +0100
60
# Parametrization of the 'relocatable' module.
61
AM_CPPFLAGS += -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1
63
+# Tell the mingw or Cygwin linker which symbols to export.
65
+AM_CPPFLAGS += @INTL_EXPORTS_FLAGS@