File kexec-tools-xen-static.patch of Package kexec-tools

From: Bernhard Walle <bwalle@suse.de>
Subject: [PATCH] Link xenctrl statically

This patch just links the xenctrl library statically. That allows
to use Xen support without a runtime dependency to the Xen package.


Signed-off-by: Bernhard Walle <bwalle@suse.de>

================================================================================
---
 configure.ac |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/configure.ac
+++ b/configure.ac
@@ -160,7 +160,8 @@ fi
 dnl find Xen control stack libraries
 if test "$with_xen" = yes ; then
 	AC_CHECK_HEADER(xenctrl.h,
-		AC_CHECK_LIB(xenctrl, xc_version, ,
+		AC_CHECK_LIB(xenctrl, xc_version,
+		[[LIBS="$LIBS -Wl,-Bstatic -lxenctrl -Wl,-Bdynamic"]]
 		AC_MSG_NOTICE([Xen support disabled])))
 	if test "$ac_cv_lib_xenctrl_xc_version" = yes ; then
 		AC_CHECK_FUNCS(xc_get_machine_memory_map)
openSUSE Build Service is sponsored by