* gettext-tools/configure.ac (WINDOWS_MSVC): New conditional.
* gnulib-local/modules/gettext-tools-misc (Makefile.am): Re-add the
--export-all-symbols linker option.
* gettext-tools/src/Makefile.am (libgettextsrc_la_LDFLAGS): Re-add the
--export-all-symbols linker option.
esac
AM_CONDITIONAL([WINDOWS_NATIVE], [test $is_windows_native = yes])
+dnl Linking a shared library works slightly differently on MSVC than on
+dnl Cygwin and mingw.
+is_msvc=false
+case "$host_os" in
+ windows*-msvc*) is_msvc=true ;;
+ mingw* | windows*)
+ AC_EGREP_CPP([Special], [
+#ifdef _MSC_VER
+ Special
+#endif
+], [is_msvc=true])
+ ;;
+esac
+gl_CONDITIONAL([WINDOWS_MSVC], [$is_msvc])
+
dnl Package-private libraries do not need to be installed when we build only
dnl static libraries. Don't install them in this case. This avoids a build
dnl error on AIX with --enable-shared, when some other version of GNU gettext,
# Needed for the expansion of LIBGETTEXTSRC_DLL_VARIABLE on MSVC.
libgettextsrc_la_CPPFLAGS += -DIN_LIBGETTEXTSRC
+# Tell the mingw or Cygwin linker which symbols to export.
+if WOE32DLL
+if !WINDOWS_MSVC
+libgettextsrc_la_LDFLAGS += -Wl,--export-all-symbols
+endif
+endif
+
# Specify installation directory, for --enable-relocatable.
if RELOCATABLE_VIA_LD
# This is needed, because libgettextsrc depends on libgettextlib and libintl.
lib_LDFLAGS += -release @VERSION@
+# Tell the mingw or Cygwin linker which symbols to export.
+if WOE32DLL
+if !WINDOWS_MSVC
+lib_LDFLAGS += -Wl,--export-all-symbols
+endif
+endif
+
Include:
License: