# HG changeset patch
# User Nick Wellnhofer <wellnhofer@aevum.de>
# Date 1662465081 -7200
#      Tue Sep 06 13:51:21 2022 +0200
# Node ID d02800290fd6db6ecb741da9c37655584e04ceed
# Parent  68c239cc709f976b577f871927374636f2600b22
autotools: Link with -no-undefined

This catches errors earlier.

diff --git a/libexslt/Makefile.am b/libexslt/Makefile.am
--- a/libexslt/Makefile.am
+++ b/libexslt/Makefile.am
@@ -28,7 +28,8 @@
 	dynamic.c
 
 libexslt_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(LIBXML_LIBS) $(EXTRA_LIBS) $(LIBGCRYPT_LIBS) $(LIBM)
-libexslt_la_LDFLAGS = -version-info $(LIBEXSLT_VERSION_INFO)
+libexslt_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined \
+		      -version-info $(LIBEXSLT_VERSION_INFO)
 
 man_MANS = libexslt.3
 
diff --git a/libxslt/Makefile.am b/libxslt/Makefile.am
--- a/libxslt/Makefile.am
+++ b/libxslt/Makefile.am
@@ -61,6 +61,7 @@
 
 libxslt_la_LIBADD = $(LIBXML_LIBS) $(EXTRA_LIBS) $(LIBM)
 libxslt_la_LDFLAGS =					\
+		$(AM_LDFLAGS) -no-undefined		\
 		$(LIBXSLT_VERSION_SCRIPT)		\
 		-version-info $(LIBXSLT_VERSION_INFO)
 
diff --git a/tests/plugins/Makefile.am b/tests/plugins/Makefile.am
--- a/tests/plugins/Makefile.am
+++ b/tests/plugins/Makefile.am
@@ -21,7 +21,9 @@
 xmlsoft_org_xslt_testplugin_la_CFLAGS = -DMODULE_COMPILE $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)
 xmlsoft_org_xslt_testplugin_la_SOURCES = testplugin.c
 xmlsoft_org_xslt_testplugin_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS)
-xmlsoft_org_xslt_testplugin_la_LDFLAGS = -module -avoid-version -rpath $(plugindir)
+xmlsoft_org_xslt_testplugin_la_LDFLAGS = \
+	$(AM_LDFLAGS) -no-undefined \
+	-module -avoid-version -rpath $(plugindir)
 
 test-logall:
 	@echo '## Running plugin tests'