From 39b426b5038277fb5263444e74a1824cbf0b6f10 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 19 Jun 2025 13:35:05 +0200 Subject: [PATCH] gettext-runtime: Fix "make installcheck" failure on MSVC with --enable-shared. * gettext-runtime/intl/Makefile.am (libintl.h): Insert '__declspec (dllimport)' in the variable declarations, like in libgnuintl.h. --- gettext-runtime/intl/Makefile.am | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gettext-runtime/intl/Makefile.am b/gettext-runtime/intl/Makefile.am index b41676aaa..8136f6e75 100644 --- a/gettext-runtime/intl/Makefile.am +++ b/gettext-runtime/intl/Makefile.am @@ -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,