]> xenbits.xensource.com Git - libvirt.git/commitdiff
tools: Link libvirt.la and readline to libvirt_shell.a
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 25 Sep 2015 11:20:38 +0000 (13:20 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 25 Sep 2015 12:33:06 +0000 (14:33 +0200)
So, our mingw build is broken. It's because while libvirt_shell
library is using some of our internal APIs, e.g. virStrndup, and
readline API but it's not being linked with nor libvirt.la nor
libreadline.  Only subsequent users of the library, like virsh,
do link to the needed libraries. In fact, I'm surprised Linux
linker doesn't care, because how can it make a static library
with missing symbols is mystery to me.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
configure.ac
tools/Makefile.am

index 03463b048c3cc1ed2b42e58cd2e28b7f34ed8c5d..2d0603d391f2495b28ced9ab020813003c758c19 100644 (file)
@@ -1670,10 +1670,6 @@ if test "$with_pm_utils" = "yes"; then
 fi
 AM_CONDITIONAL([WITH_PM_UTILS], [test "$with_pm_utils" = "yes"])
 
-dnl virsh libraries
-VIRSH_LIBS="$VIRSH_LIBS $READLINE_LIBS"
-AC_SUBST([VIRSH_LIBS])
-
 dnl check if the network driver should be compiled
 
 AC_ARG_WITH([network],
index 0a00cee04ad43e1b4a5231d3fe4079ff81b988e6..d5638d9b20062e450bb64e11a89b6f2e0188a848 100644 (file)
@@ -143,6 +143,8 @@ libvirt_shell_la_LDFLAGS = \
                $(NULL)
 libvirt_shell_la_LIBADD = \
                $(LIBXML_LIBS)                                          \
+               $(READLINE_LIBS)                                        \
+               ../src/libvirt.la                                       \
                ../gnulib/lib/libgnu.la                         \
                $(NULL)
 libvirt_shell_la_SOURCES = vsh.c vsh.h
@@ -220,11 +222,9 @@ virsh_LDFLAGS = \
 virsh_LDADD =                                                  \
                $(STATIC_BINARIES)                              \
                $(PIE_LDFLAGS)                                  \
-               ../src/libvirt.la                               \
                ../src/libvirt-lxc.la                           \
                ../src/libvirt-qemu.la                          \
-               libvirt_shell.la                                \
-               $(VIRSH_LIBS)
+               libvirt_shell.la
 virsh_CFLAGS =                                                 \
                $(WARN_CFLAGS)                                  \
                $(PIE_CFLAGS)                                   \