From: Bruno Haible Date: Mon, 15 May 2006 20:33:22 +0000 (+0000) Subject: Treat mingw like Cygwin. X-Git-Tag: v0.15~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd29bf16239e3d4452409f55ad7c840c43a5d956;p=thirdparty%2Fgettext.git Treat mingw like Cygwin. --- diff --git a/gettext-runtime/ChangeLog b/gettext-runtime/ChangeLog index 15f351c82..ba0a2d832 100644 --- a/gettext-runtime/ChangeLog +++ b/gettext-runtime/ChangeLog @@ -1,3 +1,8 @@ +2006-05-15 Bruno Haible + + * configure.ac (DLL_VARIABLE): Define as empty on mingw, like on + Cygwin. + 2006-05-01 Bruno Haible * configure.ac: Pass a source-version and a target-version to diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac index f71faf89a..630c382bf 100644 --- a/gettext-runtime/configure.ac +++ b/gettext-runtime/configure.ac @@ -107,7 +107,7 @@ gl_CANONICALIZE dnl Put some default definitions into config.h. AH_BOTTOM([ /* On Windows, variables that may be in a DLL must be marked specially. */ -#if (defined _MSC_VER && defined _DLL) || (defined __MINGW32__ && defined DLL_EXPORT) +#if (defined _MSC_VER && defined _DLL) # define DLL_VARIABLE __declspec (dllimport) #else # define DLL_VARIABLE diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 262075e01..452c29a65 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,7 @@ +2006-05-15 Bruno Haible + + * Makefile.in (LDFLAGS, libgnuintl.h): Treat mingw like Cygwin. + 2006-05-15 Bruno Haible * libgnuintl.h.in: Move the _INTL_MAY_RETURN_STRING_ARG annotations diff --git a/gettext-runtime/intl/Makefile.in b/gettext-runtime/intl/Makefile.in index 520db2bb8..dc18b3315 100644 --- a/gettext-runtime/intl/Makefile.in +++ b/gettext-runtime/intl/Makefile.in @@ -72,7 +72,7 @@ DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ -DDEPENDS_ON_LIBICONV=1 @DEFS@ CPPFLAGS = @CPPFLAGS@ CFLAGS = @CFLAGS@ @CFLAG_VISIBILITY@ -LDFLAGS = @LDFLAGS@ $(LDFLAGS_@CYGWINDLL@) +LDFLAGS = @LDFLAGS@ $(LDFLAGS_@WOE32DLL@) LDFLAGS_yes = -Wl,--export-all-symbols LDFLAGS_no = LIBS = @LIBS@ @@ -273,7 +273,7 @@ libgnuintl.h: $(srcdir)/libgnuintl.h.in -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ < $(srcdir)/libgnuintl.h.in \ - | if test '@CYGWINDLL@' = yes; then \ + | if test '@WOE32DLL@' = yes; then \ sed -e 's/extern \([^()]*\);/extern __declspec (dllimport) \1;/'; \ else \ cat; \ diff --git a/gettext-runtime/m4/ChangeLog b/gettext-runtime/m4/ChangeLog index a374de098..e8ea2349f 100644 --- a/gettext-runtime/m4/ChangeLog +++ b/gettext-runtime/m4/ChangeLog @@ -1,3 +1,8 @@ +2006-05-15 Bruno Haible + + * gettext.m4 (AM_INTL_SUBDIR): Set variable WOE32DLL instead of + CYGWINDLL. + 2006-05-11 Bruno Haible * gettext.m4 (AM_INTL_SUBDIR): Set variable CYGWINDLL. diff --git a/gettext-runtime/m4/gettext.m4 b/gettext-runtime/m4/gettext.m4 index 3d8800a8c..67e1b3ae4 100644 --- a/gettext-runtime/m4/gettext.m4 +++ b/gettext-runtime/m4/gettext.m4 @@ -1,4 +1,4 @@ -# gettext.m4 serial 48 (gettext-0.15) +# gettext.m4 serial 49 (gettext-0.15) dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -419,7 +419,7 @@ AC_DEFUN([AM_INTL_SUBDIR], AM_LANGINFO_CODESET gt_LC_MESSAGES - dnl Compilation on Cygwin needs special Makefile rules, because + dnl Compilation on mingw and Cygwin needs special Makefile rules, because dnl 1. when we install a shared library, we must arrange to export dnl auxiliary pointer variables for every exported variable, dnl 2. when we install a shared library and a static library simultaneously, @@ -428,14 +428,14 @@ AC_DEFUN([AM_INTL_SUBDIR], dnl exported variables _also_ in the static library. if test "$enable_shared" = yes; then case "$host_os" in - cygwin*) is_cygwindll=yes ;; - *) is_cygwindll=no ;; + cygwin*) is_woe32dll=yes ;; + *) is_woe32dll=no ;; esac else - is_cygwindll=no + is_woe32dll=no fi - CYGWINDLL=$is_cygwindll - AC_SUBST([CYGWINDLL]) + WOE32DLL=$is_woe32dll + AC_SUBST([WOE32DLL]) dnl Rename some macros and functions used for locking. AH_BOTTOM([ diff --git a/gettext-tools/ChangeLog b/gettext-tools/ChangeLog index 088a54c26..6a1e0461c 100644 --- a/gettext-tools/ChangeLog +++ b/gettext-tools/ChangeLog @@ -1,3 +1,14 @@ +2006-05-15 Bruno Haible + + * woe32dll/export.h: Renamed from cygwin/export.h. + * woe32dll/gettextlib-exports: Renamed from cygwin/gettextlib-exports.h. + * woe32dll/gettextsrc-exports: Renamed from cygwin/gettextsrc-exports.h. + * woe32dll/gettextpo-exports: Renamed from cygwin/gettextpo-exports.h. + * configure.ac (WOE32DLL): Renamed from CYGWINDLL. + (DLL_VARIABLE): Define as nonempty on mingw if and only if + --enable-shared was specified. + * Makefile.am (EXTRA_DIST): Update. + 2006-05-11 Bruno Haible * woe32dll: Directory renamed from mingw. diff --git a/gettext-tools/Makefile.am b/gettext-tools/Makefile.am index e29e7ebc7..5b08fe498 100644 --- a/gettext-tools/Makefile.am +++ b/gettext-tools/Makefile.am @@ -241,4 +241,4 @@ EXTRA_DIST += README.woe32 Makefile.msvc config.h.msvc windows/alloca.h windows/ # Cygwin support. -EXTRA_DIST += cygwin/export.h +EXTRA_DIST += woe32dll/export.h diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index d10cb43b0..5900f38bf 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -204,19 +204,7 @@ AC_DEFINE_UNQUOTED([ENDIANNESS], [$endianness], gt_PREREQ_HOSTNAME -dnl Compilation on mingw and Cygwin needs special Makefile rules, because of -dnl variables being exported from or imported into shared libraries. -if test "$enable_shared" = yes; then - case "$host_os" in - mingw* | cygwin*) is_woe32dll=yes ;; - *) is_woe32dll=no ;; - esac -else - is_woe32dll=no -fi -AM_CONDITIONAL([WOE32DLL], [test $is_woe32dll = yes]) - -dnl Compilation on Cygwin needs special Makefile rules, because +dnl Compilation on mingw and Cygwin needs special Makefile rules, because dnl 1. when we install a shared library, we must arrange to export dnl auxiliary pointer variables for every exported variable, dnl 2. when we install a shared library and a static library simultaneously, @@ -225,15 +213,16 @@ dnl must arrange to define the auxiliary pointer variables for the dnl exported variables _also_ in the static library. if test "$enable_shared" = yes; then case "$host_os" in - cygwin*) is_cygwindll=yes ;; - *) is_cygwindll=no ;; + mingw* | cygwin*) is_woe32dll=yes ;; + *) is_woe32dll=no ;; esac else - is_cygwindll=no + is_woe32dll=no fi -AM_CONDITIONAL([CYGWINDLL], [test $is_cygwindll = yes]) -if test $is_cygwindll = yes; then - AC_DEFINE([CYGWINDLL], 1, [Define when --enable-shared is used on Cygwin.]) +AM_CONDITIONAL([WOE32DLL], [test $is_woe32dll = yes]) +if test $is_woe32dll = yes; then + AC_DEFINE([WOE32DLL], 1, + [Define when --enable-shared is used on mingw or Cygwin.]) fi dnl Put some default definitions into config.h. @@ -267,7 +256,7 @@ AH_BOTTOM([ #define PAGE_WIDTH 79 /* On Windows, variables that may be in a DLL must be marked specially. */ -#if (defined _MSC_VER && defined _DLL) || (defined __MINGW32__ && defined DLL_EXPORT) || defined CYGWINDLL +#if (defined _MSC_VER && defined _DLL) || defined WOE32DLL # define DLL_VARIABLE __declspec (dllimport) #else # define DLL_VARIABLE diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index f8489f46b..ea605620f 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -1,3 +1,7 @@ +2006-05-15 Bruno Haible + + * Makefile.am: Test flag WOE32DLL instead of CYGWINDLL. + 2006-04-30 Bruno Haible * progreloc.c: Include if available. diff --git a/gettext-tools/lib/Makefile.am b/gettext-tools/lib/Makefile.am index 424fa9263..5b725f479 100644 --- a/gettext-tools/lib/Makefile.am +++ b/gettext-tools/lib/Makefile.am @@ -128,9 +128,9 @@ libgettextlib_la_LDFLAGS = \ -release @VERSION@ \ @LTLIBINTL@ @LTLIBICONV@ -lc @LTNOUNDEF@ -# Tell the Cygwin linker which symbols to export. -if CYGWINDLL -libgettextlib_la_SOURCES += ../cygwin/gettextlib-exports.c +# Tell the mingw or Cygwin linker which symbols to export. +if WOE32DLL +libgettextlib_la_SOURCES += ../woe32dll/gettextlib-exports.c libgettextlib_la_LDFLAGS += -Wl,--export-all-symbols endif diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 3126e2a4b..a9cf4bc3f 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,7 @@ +2006-05-15 Bruno Haible + + * Makefile.am: Test flag WOE32DLL instead of CYGWINDLL. + 2006-05-14 Bruno Haible * x-php.c (x_php_lex): Fix handling of here documents. diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am index 9d7d1121e..b0189fceb 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am @@ -223,9 +223,9 @@ libgettextsrc_la_LDFLAGS = \ -release @VERSION@ \ ../lib/libgettextlib.la @LTLIBINTL@ @LTLIBICONV@ -lc @LTNOUNDEF@ -# Tell the Cygwin linker which symbols to export. -if CYGWINDLL -libgettextsrc_la_SOURCES += ../cygwin/gettextsrc-exports.c +# Tell the mingw or Cygwin linker which symbols to export. +if WOE32DLL +libgettextsrc_la_SOURCES += ../woe32dll/gettextsrc-exports.c libgettextsrc_la_LDFLAGS += -Wl,--export-all-symbols endif @@ -247,9 +247,9 @@ libgettextpo_la_LDFLAGS = \ # Build order. Only needed for "make -j[N]". libgettextpo_la_DEPENDENCIES = libgettextsrc.la -# Tell the Cygwin linker which symbols to export. -if CYGWINDLL -libgettextpo_la_SOURCES += ../cygwin/gettextpo-exports.c +# Tell the mingw or Cygwin linker which symbols to export. +if WOE32DLL +libgettextpo_la_SOURCES += ../woe32dll/gettextpo-exports.c libgettextpo_la_LDFLAGS += -Wl,--export-all-symbols endif @@ -330,7 +330,7 @@ po-gram-gen2.h: po-gram-gen.h EXTRA_DIST += gettext-po.h.in BUILT_SOURCES += gettext-po.h gettext-po.h: gettext-po.h.in -if CYGWINDLL +if WOE32DLL sed -e 's/extern \([^()]*\);/extern __declspec (dllimport) \1;/' $(srcdir)/gettext-po.h.in > gettext-po.h-tmp else cp $(srcdir)/gettext-po.h.in gettext-po.h-tmp