tools: Link libvirt.la and readline to libvirt_shell.a

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>
This commit is contained in:
Michal Privoznik 2015-09-25 13:20:38 +02:00
parent 08e5d1efcf
commit 1fb8ac4c79
2 changed files with 3 additions and 7 deletions

View File

@ -1670,10 +1670,6 @@ if test "$with_pm_utils" = "yes"; then
fi fi
AM_CONDITIONAL([WITH_PM_UTILS], [test "$with_pm_utils" = "yes"]) 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 dnl check if the network driver should be compiled
AC_ARG_WITH([network], AC_ARG_WITH([network],

View File

@ -143,6 +143,8 @@ libvirt_shell_la_LDFLAGS = \
$(NULL) $(NULL)
libvirt_shell_la_LIBADD = \ libvirt_shell_la_LIBADD = \
$(LIBXML_LIBS) \ $(LIBXML_LIBS) \
$(READLINE_LIBS) \
../src/libvirt.la \
../gnulib/lib/libgnu.la \ ../gnulib/lib/libgnu.la \
$(NULL) $(NULL)
libvirt_shell_la_SOURCES = vsh.c vsh.h libvirt_shell_la_SOURCES = vsh.c vsh.h
@ -220,11 +222,9 @@ virsh_LDFLAGS = \
virsh_LDADD = \ virsh_LDADD = \
$(STATIC_BINARIES) \ $(STATIC_BINARIES) \
$(PIE_LDFLAGS) \ $(PIE_LDFLAGS) \
../src/libvirt.la \
../src/libvirt-lxc.la \ ../src/libvirt-lxc.la \
../src/libvirt-qemu.la \ ../src/libvirt-qemu.la \
libvirt_shell.la \ libvirt_shell.la
$(VIRSH_LIBS)
virsh_CFLAGS = \ virsh_CFLAGS = \
$(WARN_CFLAGS) \ $(WARN_CFLAGS) \
$(PIE_CFLAGS) \ $(PIE_CFLAGS) \