]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Fix MSVC builds with --enable-shared, part 2.
authorBruno Haible <bruno@clisp.org>
Thu, 5 Jun 2025 12:48:20 +0000 (14:48 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 5 Jun 2025 12:48:20 +0000 (14:48 +0200)
* gettext-tools/configure.ac (DLL_VARIABLE): On MSVC with --enable-shared, when
compiling the static .o files inside libgettextlib, define to empty, not to
'__declspec(dllimport)'.
(LIBGETTEXTSRC_DLL_VARIABLE): On MSVC with --enable-shared, when compiling the
static .o files inside libgettextsrc), define to empty, not to
'__declspec(dllimport)'.

gettext-tools/configure.ac

index b3b9b285a6e83db6fb5b9c79173b24e679862d2f..95d02303ba18bfae48a0a2aa706dce73c9882a90 100644 (file)
@@ -397,10 +397,14 @@ AH_BOTTOM([
    LIBGETTEXTSRC_DLL_VARIABLE is used for variables defined in libgettextsrc.
  */
 #if defined _MSC_VER && WOE32DLL && !defined IN_RELOCWRAPPER
-# if IN_LIBGETTEXTLIB && defined DLL_EXPORT
-#  define DLL_VARIABLE __declspec(dllexport)
+# if IN_LIBGETTEXTLIB
+#  if defined DLL_EXPORT
+#   define DLL_VARIABLE __declspec (dllexport)
+#  else
+#   define DLL_VARIABLE
+#  endif
 # else
-#  define DLL_VARIABLE __declspec(dllimport)
+#  define DLL_VARIABLE __declspec (dllimport)
 # endif
 #elif (defined _WIN32 || defined __CYGWIN__) && defined DLL_EXPORT && !defined IN_RELOCWRAPPER
 # define DLL_VARIABLE __declspec (dllimport)
@@ -408,10 +412,14 @@ AH_BOTTOM([
 # define DLL_VARIABLE
 #endif
 #if defined _MSC_VER && WOE32DLL && !defined IN_RELOCWRAPPER
-# if IN_LIBGETTEXTSRC && defined DLL_EXPORT
-#  define LIBGETTEXTSRC_DLL_VARIABLE __declspec(dllexport)
+# if IN_LIBGETTEXTSRC
+#  if defined DLL_EXPORT
+#   define LIBGETTEXTSRC_DLL_VARIABLE __declspec (dllexport)
+#  else
+#   define LIBGETTEXTSRC_DLL_VARIABLE
+#  endif
 # else
-#  define LIBGETTEXTSRC_DLL_VARIABLE __declspec(dllimport)
+#  define LIBGETTEXTSRC_DLL_VARIABLE __declspec (dllimport)
 # endif
 #elif (defined _WIN32 || defined __CYGWIN__) && defined DLL_EXPORT && !defined IN_RELOCWRAPPER
 # define LIBGETTEXTSRC_DLL_VARIABLE __declspec (dllimport)