summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d52a56d..ab2db1c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,9 +140,15 @@ dnl Figure out what tools backend to build
dnl ---------------------------------------------------------------------------
CK_BACKEND=""
+KVM_LIBS=""
case "$host" in
*-*-freebsd*)
CK_BACKEND="freebsd"
+ AC_CHECK_LIB(kvm, kvm_openfiles, have_kvm=yes,
+ AC_MSG_ERROR([Unable to find libkvm which is needed on FreeBSD]))
+ if test "x$have_kvm" = "xyes"; then
+ KVM_LIBS="-lkvm"
+ fi
;;
*-*-linux*)
CK_BACKEND="linux"
@@ -152,6 +158,8 @@ case "$host" in
;;
esac
+AC_SUBST(KVM_LIBS)
+
AM_CONDITIONAL(CK_COMPILE_LINUX, test x$CK_BACKEND = xlinux, [Compiling for Linux])
AM_CONDITIONAL(CK_COMPILE_FREEBSD, test x$CK_BACKEND = xfreebsd, [Compiling for FreeBSD])
AM_CONDITIONAL(CK_COMPILE_SOLARIS, test x$CK_BACKEND = xsolaris, [Compiling for Solaris])