We optionally include QEMU and LXC support in this test and
depending on which is enabled (if either is enabled at all) we
need to link in different objects.

Right now we implicitly depend on the fact that qemu_LDADDS is
empty when QEMU is not enabled to get the correct set of objects,
but it's better to be explicit about it.

Signed-off-by: Andrea Bolognani <abolo...@redhat.com>
---
 tests/Makefile.am | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index c34cfba34c..f9dbf9a0f6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1029,7 +1029,11 @@ endif WITH_LXC
 if WITH_QEMU
 vircapstest_SOURCES += testutilsqemu.c testutilsqemu.h
 endif WITH_QEMU
+if WITH_QEMU
 vircapstest_LDADD = $(qemu_LDADDS) $(LDADDS)
+else ! WITH_QEMU
+vircapstest_LDADD = $(LDADDS)
+endif ! WITH_QEMU
 
 domaincapsmock_la_SOURCES = domaincapsmock.c
 domaincapsmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to