]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Cygwin support.
authorBruno Haible <bruno@clisp.org>
Thu, 11 May 2006 20:55:46 +0000 (20:55 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:18 +0000 (12:13 +0200)
gettext-tools/ChangeLog
gettext-tools/Makefile.am
gettext-tools/configure.ac

index 6137b8aaa8f585ca4660fc10b40f97db8fe124cd..088a54c26c10cafc71737391453af1261c0ae707 100644 (file)
@@ -1,3 +1,17 @@
+2006-05-11  Bruno Haible  <bruno@clisp.org>
+
+       * woe32dll: Directory renamed from mingw.
+       * cygwin/export.h: New file.
+       * cygwin/gettextlib-exports.c: New file.
+       * cygwin/gettextsrc-exports.c: New file.
+       * cygwin/gettextpo-exports.c: New file.
+       * configure.ac (WOE32DLL): Condition renamed from MINGW. Activate it
+       also on Cygwin. Only activate it when compiling shared libraries.
+       (CYGWINDLL): New condition.
+       (CYGWINDLL): New define.
+       (DLL_VARIABLE): Use dllimport also on Cygwin.
+       * Makefile.am (EXTRA_DIST): Add cygwin/export.h.
+
 2006-05-11  Bruno Haible  <bruno@clisp.org>
 
        * woe32dll/c++format.cc: New file.
index e9073caf7a3025ac5dc4bac176689136d64d73ef..e29e7ebc77fc64458daef6201ec580033f2092ed 100644 (file)
@@ -237,3 +237,8 @@ windows/stdbool.h: lib/stdbool_.h
 all-local : windows/stdbool.h
 
 EXTRA_DIST += README.woe32 Makefile.msvc config.h.msvc windows/alloca.h windows/fnmatch.h windows/getopt.h windows/stdbool.h windows/gettextlib.def windows/gettextsrc.def windows/gettextpo.def windows/gettextlib.rc windows/gettextsrc.rc windows/gettextpo.rc
+
+
+# Cygwin support.
+
+EXTRA_DIST += cygwin/export.h
index 6d8a834e58f9d6b5354d73d633462e3bd6a90217..d10cb43b0d52283bc77e461220a32a77fc5ca216 100644 (file)
@@ -204,13 +204,37 @@ AC_DEFINE_UNQUOTED([ENDIANNESS], [$endianness],
 
 gt_PREREQ_HOSTNAME
 
-dnl Compilation on mingw needs special Makefile rules, because of variables
-dnl being exported from or imported into shared libraries.
-case "$host_os" in
-  mingw*) is_mingw=yes ;;
-  *) is_mingw=no ;;
-esac
-AM_CONDITIONAL([MINGW], [test $is_mingw = yes])
+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 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,
+dnl    the include file specifies __declspec(dllimport) and therefore we
+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 ;;
+  esac
+else
+  is_cygwindll=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.])
+fi
 
 dnl Put some default definitions into config.h.
 AH_TOP([
@@ -243,7 +267,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)
+#if (defined _MSC_VER && defined _DLL) || (defined __MINGW32__ && defined DLL_EXPORT) || defined CYGWINDLL
 # define DLL_VARIABLE __declspec (dllimport)
 #else
 # define DLL_VARIABLE