AM_CONDITIONAL([WITH_FREEBSD], [test "$with_freebsd" = "yes"])
AM_CONDITIONAL([WITH_MACOS], [test "$with_macos" = "yes"])
-if test "$with_win" = "yes" ; then
- # We don't support the daemon yet
- with_libvirtd=no
-fi
-
-# The daemon requires remote support. Likewise, if we are not using
-# RPC, we don't need several libraries.
-if test "$with_remote" = "no" ; then
- with_libvirtd=no
-fi
# Stateful drivers are useful only when building the daemon.
if test "$with_libvirtd" = "no" ; then
with_qemu=no
LIBVIRT_DRIVER_ARG_ESX
LIBVIRT_DRIVER_ARG_HYPERV
LIBVIRT_DRIVER_ARG_TEST
-LIBVIRT_DRIVER_ARG_LIBVIRTD
LIBVIRT_DRIVER_ARG_NETWORK
LIBVIRT_DRIVER_ARG_INTERFACE
LIBVIRT_DRIVER_CHECK_ESX
LIBVIRT_DRIVER_CHECK_HYPERV
LIBVIRT_DRIVER_CHECK_TEST
-LIBVIRT_DRIVER_CHECK_LIBVIRTD
LIBVIRT_DRIVER_CHECK_NETWORK
LIBVIRT_DRIVER_CHECK_INTERFACE
LIBVIRT_DRIVER_RESULT_BHYVE
LIBVIRT_DRIVER_RESULT_TEST
LIBVIRT_DRIVER_RESULT_NETWORK
-LIBVIRT_DRIVER_RESULT_LIBVIRTD
LIBVIRT_DRIVER_RESULT_INTERFACE
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Storage Drivers])
+++ /dev/null
-dnl The libvirtd driver
-dnl
-dnl Copyright (C) 2016 Red Hat, Inc.
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License, or (at your option) any later version.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library. If not, see
-dnl <http://www.gnu.org/licenses/>.
-dnl
-
-AC_DEFUN([LIBVIRT_DRIVER_ARG_LIBVIRTD], [
- LIBVIRT_ARG_WITH_FEATURE([LIBVIRTD], [libvirtd], [yes])
-])
-
-AC_DEFUN([LIBVIRT_DRIVER_CHECK_LIBVIRTD], [
- if test "$with_libvirtd" = "yes" ; then
- AC_DEFINE_UNQUOTED([WITH_LIBVIRTD], 1, [whether libvirtd daemon is enabled])
- fi
- AM_CONDITIONAL([WITH_LIBVIRTD], [test "$with_libvirtd" = "yes"])
-])
-
-AC_DEFUN([LIBVIRT_DRIVER_RESULT_LIBVIRTD], [
- LIBVIRT_RESULT([Libvirtd], [$with_libvirtd])
-])
remote_default_mode = get_option('remote_default_mode').to_upper()
conf.set('REMOTE_DRIVER_MODE_DEFAULT', 'REMOTE_DRIVER_MODE_@0@'.format(remote_default_mode))
+if not get_option('driver_libvirtd').disabled()
+ use_libvirtd = true
+
+ if host_machine.system() == 'windows'
+ use_libvirtd = false
+ if get_option('driver_libvirtd').enabled()
+ error('libvirtd daemon is not supported on windows')
+ endif
+ endif
+
+ if not conf.has('WITH_REMOTE')
+ use_libvirtd = false
+ if get_option('driver_libvirtd').enabled()
+ error('remote driver is required for libvirtd daemon')
+ endif
+ endif
+
+ if use_libvirtd
+ conf.set('WITH_LIBVIRTD', 1)
+ endif
+endif
+
# define top include directory
driver_summary = {
'Remote': conf.has('WITH_REMOTE'),
+ 'Libvirtd': conf.has('WITH_LIBVIRTD'),
}
summary(driver_summary, section: 'Drivers', bool_yn: true)
# build driver options
+option('driver_libvirtd', type: 'feature', value: 'auto', description: 'libvirtd driver')
option('driver_remote', type: 'feature', value: 'enabled', description: 'remote driver')
option('remote_default_mode', type: 'combo', choices: ['legacy', 'direct'], value: 'legacy', description: 'remote driver default mode')