8a5744
Ensure that $(LIBLTDL) is built first
8a5744
8a5744
After Automake upstream commit f4e91bfc490d, the list in 'all-am:' is
8a5744
reordered for this test-case (*_LTLIBRARIES is before *_PROGRAMS), which
8a5744
means that linker will fail to link 'old' binary.
8a5744
8a5744
Previously (with automake <= 1.16), it was matter of luck -- it worked if
8a5744
(a) the build was serial (-j1), and/or (b) libtool-ltdl-devel package was
8a5744
installed on the box so ./configure picked the system version of libltdl.
8a5744
8a5744
Users should anyways use system's ltdl, so this has low priority.
8a5744
8a5744
diff --git a/tests/old-ltdl-iface.at b/tests/old-ltdl-iface.at
8a5744
index cee29089..6f9c8001 100644
8a5744
--- a/tests/old-ltdl-iface.at
8a5744
+++ b/tests/old-ltdl-iface.at
8a5744
@@ -62,6 +62,9 @@ MOSTLYCLEANFILES =
8a5744
 include ltdl/Makefile.inc
8a5744
 bin_PROGRAMS = old
8a5744
 old_LDADD = -Lltdl $(LIBLTDL)
8a5744
+# TODO: if --with-included-ltdl was unused this would
8a5744
+# generate useless dependency.
8a5744
+old_DEPENDENCIES = $(LIBLTDL)
8a5744
 ]])
8a5744
 
8a5744
 AT_DATA([old.c],
8a5744
@@ -131,7 +134,7 @@ LT_AT_CHECK_LIBTOOLIZE([--ltdl=ltdl --nonrecursive --install], 0, [expout], [exp
8a5744
 
8a5744
 AT_CHECK([test -f ltdl/Makefile.inc])
8a5744
 
8a5744
-LT_AT_BOOTSTRAP([ignore], [-I m4], [], [--add-missing], [--force])
8a5744
+LT_AT_BOOTSTRAP([ignore], [-I m4], [], [--add-missing], [--force], [--with-included-ltdl])
8a5744
 
8a5744
 LT_AT_EXEC_CHECK([./old], 0, [[...]])
8a5744