From: Bernhard Walle 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 ================================================================================ --- configure.ac | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/configure.ac +++ b/configure.ac @@ -163,9 +163,17 @@ fi dnl find Xen control stack libraries if test "$with_xen" = yes ; then + if pkg-config --exists 'xenlight >= 4.7' ; then AC_CHECK_HEADER(xenctrl.h, - [AC_CHECK_LIB(xenctrl, xc_kexec_load, , + [AC_CHECK_LIB(xenctrl, xc_kexec_load, + [AC_DEFINE([HAVE_LIBXENCTRL], [1], [libxenctrl]) [LIBS="-Wl,-Bstatic -lxenctrl -lxencall -lxentoollog -lxenforeignmemory -Wl,-Bdynamic -lpthread -ldl $LIBS"]], AC_MSG_NOTICE([Xen support disabled]))]) + else + AC_CHECK_HEADER(xenctrl.h, + [AC_CHECK_LIB(xenctrl, xc_kexec_load, + [AC_DEFINE([HAVE_LIBXENCTRL], [1], [libxenctrl]) [LIBS="-Wl,-Bstatic -lxenctrl -Wl,-Bdynamic -lpthread -ldl $LIBS"]], + AC_MSG_NOTICE([Xen support disabled]))]) + fi fi dnl ---Sanity checks