mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
meson: add libvirtd driver build option
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
1ac1dce4d0
commit
9fbdd7d0bb
13
configure.ac
13
configure.ac
@ -87,16 +87,6 @@ AM_CONDITIONAL([WITH_LINUX], [test "$with_linux" = "yes"])
|
||||
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
|
||||
@ -130,7 +120,6 @@ LIBVIRT_DRIVER_ARG_BHYVE
|
||||
LIBVIRT_DRIVER_ARG_ESX
|
||||
LIBVIRT_DRIVER_ARG_HYPERV
|
||||
LIBVIRT_DRIVER_ARG_TEST
|
||||
LIBVIRT_DRIVER_ARG_LIBVIRTD
|
||||
LIBVIRT_DRIVER_ARG_NETWORK
|
||||
LIBVIRT_DRIVER_ARG_INTERFACE
|
||||
|
||||
@ -145,7 +134,6 @@ LIBVIRT_DRIVER_CHECK_BHYVE
|
||||
LIBVIRT_DRIVER_CHECK_ESX
|
||||
LIBVIRT_DRIVER_CHECK_HYPERV
|
||||
LIBVIRT_DRIVER_CHECK_TEST
|
||||
LIBVIRT_DRIVER_CHECK_LIBVIRTD
|
||||
LIBVIRT_DRIVER_CHECK_NETWORK
|
||||
LIBVIRT_DRIVER_CHECK_INTERFACE
|
||||
|
||||
@ -351,7 +339,6 @@ LIBVIRT_DRIVER_RESULT_VZ
|
||||
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])
|
||||
|
@ -1,33 +0,0 @@
|
||||
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])
|
||||
])
|
23
meson.build
23
meson.build
@ -1567,6 +1567,28 @@ endif
|
||||
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
|
||||
|
||||
@ -1588,6 +1610,7 @@ configure_file(output: 'meson-config.h', configuration: conf)
|
||||
|
||||
driver_summary = {
|
||||
'Remote': conf.has('WITH_REMOTE'),
|
||||
'Libvirtd': conf.has('WITH_LIBVIRTD'),
|
||||
}
|
||||
summary(driver_summary, section: 'Drivers', bool_yn: true)
|
||||
|
||||
|
@ -48,5 +48,6 @@ option('yajl', type: 'feature', value: 'auto', description: 'yajl support')
|
||||
|
||||
|
||||
# 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')
|
||||
|
Loading…
Reference in New Issue
Block a user