Directly link against needed libraries

otherwise having a strict --no-copy-dt-needed-entries fails in several
places like:

    CCLD     virdbustest
    /usr/bin/ld: virdbustest-virdbustest.o: undefined reference to symbol 'dbus_message_unref'
    /lib/x86_64-linux-gnu/libdbus-1.so.3: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
This commit is contained in:
Guido Günther 2013-08-12 21:13:14 +02:00
parent 0adc2b977d
commit 6ba0b7d2b4
2 changed files with 9 additions and 6 deletions

View File

@ -1119,7 +1119,9 @@ libvirt_driver_qemu_impl_la_CFLAGS = \
libvirt_driver_qemu_impl_la_LDFLAGS = $(AM_LDFLAGS)
libvirt_driver_qemu_impl_la_LIBADD = $(CAPNG_LIBS) \
$(GNUTLS_LIBS) \
$(LIBNL_LIBS)
$(LIBNL_LIBS) \
$(LIBXML_LIBS) \
$(NULL)
libvirt_driver_qemu_impl_la_SOURCES = $(QEMU_DRIVER_SOURCES)
conf_DATA += qemu/qemu.conf
@ -1280,6 +1282,7 @@ libvirt_driver_network_impl_la_CFLAGS = \
-I$(top_srcdir)/src/conf \
$(AM_CFLAGS)
libvirt_driver_network_impl_la_SOURCES = $(NETWORK_DRIVER_SOURCES)
libvirt_driver_network_impl_la_LIBADD = $(DBUS_LIBS)
endif
EXTRA_DIST += network/default.xml

View File

@ -391,7 +391,7 @@ qemu_LDADDS += $(LDADDS)
qemuxml2argvtest_SOURCES = \
qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \
testutils.c testutils.h
qemuxml2argvtest_LDADD = $(qemu_LDADDS)
qemuxml2argvtest_LDADD = $(qemu_LDADDS) $(LIBXML_LIBS)
qemuxml2xmltest_SOURCES = \
qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \
@ -559,7 +559,7 @@ interfacexml2xmltest_LDADD = $(LDADDS)
cputest_SOURCES = \
cputest.c \
testutils.c testutils.h
cputest_LDADD = $(LDADDS)
cputest_LDADD = $(LDADDS) $(LIBXML_LIBS)
virshtest_SOURCES = \
virshtest.c \
@ -606,12 +606,12 @@ virnettlscontexttest_SOURCES = \
virnettlscontexttest.c \
virnettlshelpers.h virnettlshelpers.c \
testutils.h testutils.c
virnettlscontexttest_LDADD = $(LDADDS)
virnettlscontexttest_LDADD = $(LDADDS) $(GNUTLS_LIBS)
virnettlssessiontest_SOURCES = \
virnettlssessiontest.c \
virnettlshelpers.h virnettlshelpers.c \
testutils.h testutils.c
virnettlssessiontest_LDADD = $(LDADDS)
virnettlssessiontest_LDADD = $(LDADDS) $(GNUTLS_LIBS)
if HAVE_LIBTASN1
virnettlscontexttest_SOURCES += pkix_asn1_tab.c
virnettlscontexttest_LDADD += -ltasn1
@ -675,7 +675,7 @@ if WITH_DBUS
virdbustest_SOURCES = \
virdbustest.c testutils.h testutils.c
virdbustest_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
virdbustest_LDADD = $(LDADDS)
virdbustest_LDADD = $(LDADDS) $(DBUS_LIBS)
virsystemdtest_SOURCES = \
virsystemdtest.c testutils.h testutils.c