This avoids unnecessarily embedding dllexport directives in all the object files.
This also fixes building with clang in MSVC mode, as the MSVC definition of XSLTPUBVAR in xsltexports.h is lacking 'extern' when doing dllexport. (This probably used to work before compilers defaulted to -fcommon.) This fixes duplicate symbols like these:
lld-link: error: duplicate symbol: xsltGenericError
defined at ../src/libs/xslt/libxslt/xsltutils.h:140 libxslt.cross.a(documents.cross.o) defined at ../src/libs/xslt/libxslt/xsltutils.h:140 libxslt.cross.a(extensions.cross.o)
Signed-off-by: Martin Storsjö martin@martin.st --- configure.ac | 2 +- libs/xslt/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac index 3f1d50a4dfc..62af43220ce 100644 --- a/configure.ac +++ b/configure.ac @@ -1060,7 +1060,7 @@ WINE_EXTLIB_FLAGS(LCMS2, lcms2, lcms2, "-I$(top_srcdir)/libs/lcms2/include") WINE_EXTLIB_FLAGS(PNG, png, "png $(ZLIB_PE_LIBS)", "-I$(top_srcdir)/libs/png") WINE_EXTLIB_FLAGS(TIFF, tiff, tiff, "-I$(top_srcdir)/libs/tiff/libtiff") WINE_EXTLIB_FLAGS(XML2, libxml2, xml2, "-I$(top_srcdir)/libs/xml2/include -DLIBXML_STATIC") -WINE_EXTLIB_FLAGS(XSLT, libxslt, xslt, "-I$(top_srcdir)/libs/xslt") +WINE_EXTLIB_FLAGS(XSLT, libxslt, xslt, "-I$(top_srcdir)/libs/xslt -DLIBXSLT_STATIC") WINE_EXTLIB_FLAGS(ZLIB, zlib, z, "-I$(top_srcdir)/libs/zlib -DFAR= -DZ_SOLO")
dnl **** Check for pthread **** diff --git a/libs/xslt/Makefile.in b/libs/xslt/Makefile.in index 3550010ce31..b620710c5af 100644 --- a/libs/xslt/Makefile.in +++ b/libs/xslt/Makefile.in @@ -1,5 +1,5 @@ EXTLIB = libxslt.a -EXTRAINCL = $(XML2_PE_CFLAGS) +EXTRAINCL = $(XML2_PE_CFLAGS) $(XSLT_PE_CFLAGS)
C_SRCS = \ libxslt/attributes.c \