]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
gettext-runtime: Fix "make installcheck" failure on MSVC with --enable-shared.
authorBruno Haible <bruno@clisp.org>
Thu, 19 Jun 2025 11:35:05 +0000 (13:35 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 19 Jun 2025 11:35:05 +0000 (13:35 +0200)
* gettext-runtime/intl/Makefile.am (libintl.h): Insert '__declspec (dllimport)'
in the variable declarations, like in libgnuintl.h.

gettext-runtime/intl/Makefile.am

index b41676aaa929a80536c9037b42a67e27190e9718..8136f6e756b73763d496da158a39d18bed099c51 100644 (file)
@@ -250,7 +250,13 @@ libintl.h: $(srcdir)/libgnuintl.in.h
            -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
            -e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
            -e 's,@''ENHANCE_LOCALE_FUNCS''@,@ENHANCE_LOCALE_FUNCS@,g' \
-         < $(srcdir)/libgnuintl.in.h > libintl.h
+         < $(srcdir)/libgnuintl.in.h \
+       | if test '@WOE32DLL@' = 1; then \
+           sed -e 's/extern \([^()]*\);/extern __declspec (dllimport) \1;/'; \
+         else \
+           cat; \
+         fi \
+       | cat > libintl.h
 MOSTLYCLEANFILES += libintl.h
 
 # The Automake generated .y.c rule is broken: When executed in a VPATH build,