]> xenbits.xensource.com Git - libvirt.git/commitdiff
build: switch --with-qemu default from yes to check
authorJán Tomko <jtomko@redhat.com>
Fri, 11 May 2018 12:25:33 +0000 (14:25 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 18 Jul 2018 15:54:18 +0000 (17:54 +0200)
Unless explicitly requested, enable the QEMU driver
only if the Jansson library is present.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
m4/virt-driver-qemu.m4

index 80e1d3ad46d9d93782d1f04e91efa80b16c4a705..ddb283470596babc2a05cf4e5be650d62b04c886 100644 (file)
@@ -18,7 +18,7 @@ dnl <http://www.gnu.org/licenses/>.
 dnl
 
 AC_DEFUN([LIBVIRT_DRIVER_ARG_QEMU], [
-  LIBVIRT_ARG_WITH_FEATURE([QEMU], [QEMU/KVM], [yes])
+  LIBVIRT_ARG_WITH_FEATURE([QEMU], [QEMU/KVM], [check])
   LIBVIRT_ARG_WITH([QEMU_USER], [username to run QEMU system instance as],
                    ['platform dependent'])
   LIBVIRT_ARG_WITH([QEMU_GROUP], [groupname to run QEMU system instance as],
@@ -26,6 +26,10 @@ AC_DEFUN([LIBVIRT_DRIVER_ARG_QEMU], [
 ])
 
 AC_DEFUN([LIBVIRT_DRIVER_CHECK_QEMU], [
+  AC_REQUIRE([LIBVIRT_CHECK_JANSSON])
+  if test "$with_qemu" = "check"; then
+    with_qemu=$with_jansson
+  fi
   if test "$with_qemu" = "yes" ; then
     AC_DEFINE_UNQUOTED([WITH_QEMU], 1, [whether QEMU driver is enabled])
   fi