diff --git a/libexslt/Makefile.am b/libexslt/Makefile.am
index 68c239cc709f976b577f871927374636f2600b22_bGliZXhzbHQvTWFrZWZpbGUuYW0=..d02800290fd6db6ecb741da9c37655584e04ceed_bGliZXhzbHQvTWFrZWZpbGUuYW0= 100644
--- 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
index 68c239cc709f976b577f871927374636f2600b22_bGlieHNsdC9NYWtlZmlsZS5hbQ==..d02800290fd6db6ecb741da9c37655584e04ceed_bGlieHNsdC9NYWtlZmlsZS5hbQ== 100644
--- 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
index 68c239cc709f976b577f871927374636f2600b22_dGVzdHMvcGx1Z2lucy9NYWtlZmlsZS5hbQ==..d02800290fd6db6ecb741da9c37655584e04ceed_dGVzdHMvcGx1Z2lucy9NYWtlZmlsZS5hbQ== 100644
--- 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'