From c7cd546b6ca5a1d51924a6fab84cc7a76ad98fd2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
Date: Tue, 8 Mar 2011 19:24:28 +0100
Subject: [PATCH] virsh: Remove indirect link against libxml2

as described at
http://wiki.debian.org/ToolChain/DSOLinking
https://fedoraproject.org/wiki/UnderstandingDSOLinkChange

otherwise the build fails on current Debian unstable with:

CCLD   virsh
/usr/bin/ld: virsh-virsh.o: undefined reference to symbol 'xmlSaveTree@@LIBXML2_2.6.8'
/usr/bin/ld: note: 'xmlSaveTree@@LIBXML2_2.6.8' is defined in DSO //usr/lib/libxml2.so.2 so try adding it to the linker command line
//usr/lib/libxml2.so.2: could not read symbols: Invalid operation
---
 tools/Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/Makefile.am b/tools/Makefile.am
index 68471ea379..3e31dbd031 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -47,6 +47,7 @@ virsh_LDADD =							\
 		../src/libvirt.la				\
 		../src/libvirt-qemu.la				\
 		../gnulib/lib/libgnu.la				\
+		$(LIBXML_LIBS)					\
 		$(VIRSH_LIBS)
 virsh_CFLAGS =							\
 		-I$(top_srcdir)/gnulib/lib -I../gnulib/lib	\