[PATCH 1/7] kvmtool: Add configure support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Assumes the binary of "Native Linux KVM Tool" will be named as
"kvmtool", and installed to "/usr/bin".
---
 configure.ac |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3b7535e..bcb2a40 100644
--- a/configure.ac
+++ b/configure.ac
@@ -299,6 +299,8 @@ AC_ARG_WITH([esx],
   AC_HELP_STRING([--with-esx], [add ESX support @<:@default=check@:>@]),[],[with_esx=check])
 AC_ARG_WITH([hyperv],
   AC_HELP_STRING([--with-hyperv], [add Hyper-V support @<:@default=check@:>@]),[],[with_hyperv=check])
+AC_ARG_WITH([kvmtool],
+  AC_HELP_STRING([--with-kvmtool], [add kvm tool driver support @<:@default=yes@:>@]),[],[with_kvmtool=check])
 AC_ARG_WITH([test],
   AC_HELP_STRING([--with-test], [add test driver support @<:@default=yes@:>@]),[],[with_test=yes])
 AC_ARG_WITH([remote],
@@ -485,6 +487,27 @@ if test "$with_qemu" = "yes" ; then
 fi
 AM_CONDITIONAL([WITH_QEMU], [test "$with_qemu" = "yes"])
 
+dnl
+dnl Check if kvm tool binary available (Native Linux KVM Tool driver)
+dnl
+if test "$with_kvmtool" = "yes" || test "$with_kvmtool" = "check"; then
+  AC_PATH_PROG([KVMTOOL], [kvmtool], [], [$PATH:/sbin:/usr/sbin])
+
+  if test "$with_kvmtool" = "yes"; then
+    if test -z "$KVMTOOL"; then AC_MSG_ERROR([kvm tool binary is required for kvm tool driver]); fi
+  else
+    if test -z "$KVMTOOL"; then with_kvmtool=no; fi
+
+    if test "$with_kvmtool" = "check"; then with_kvmtool=yes; fi
+  fi
+
+  if test "$with_kvmtool" = "yes"; then
+    AC_DEFINE_UNQUOTED([WITH_KVMTOOL], 1, [whether kvm tool driver is enabled])
+    AC_DEFINE_UNQUOTED([KVMTOOL],["$KVMTOOL"],[Location of kvm tool binary])
+  fi
+fi
+AM_CONDITIONAL([WITH_KVMTOOL], [test "$with_kvmtool" = "yes"])
+
 if test "$with_test" = "yes" ; then
     AC_DEFINE_UNQUOTED([WITH_TEST], 1, [whether Test driver is enabled])
 fi
@@ -2509,6 +2532,7 @@ AC_MSG_NOTICE([     LXC: $with_lxc])
 AC_MSG_NOTICE([    PHYP: $with_phyp])
 AC_MSG_NOTICE([     ESX: $with_esx])
 AC_MSG_NOTICE([ Hyper-V: $with_hyperv])
+AC_MSG_NOTICE([ KVMTOOL: $with_kvmtool])
 AC_MSG_NOTICE([    Test: $with_test])
 AC_MSG_NOTICE([  Remote: $with_remote])
 AC_MSG_NOTICE([ Network: $with_network])
-- 
1.7.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]