mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
meson: add storage rbd 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
0504324fc7
commit
9c435deb77
@ -135,21 +135,18 @@ dnl Storage driver checks
|
|||||||
dnl
|
dnl
|
||||||
|
|
||||||
LIBVIRT_STORAGE_ARG_SCSI
|
LIBVIRT_STORAGE_ARG_SCSI
|
||||||
LIBVIRT_STORAGE_ARG_RBD
|
|
||||||
LIBVIRT_STORAGE_ARG_SHEEPDOG
|
LIBVIRT_STORAGE_ARG_SHEEPDOG
|
||||||
LIBVIRT_STORAGE_ARG_ZFS
|
LIBVIRT_STORAGE_ARG_ZFS
|
||||||
LIBVIRT_STORAGE_ARG_VSTORAGE
|
LIBVIRT_STORAGE_ARG_VSTORAGE
|
||||||
|
|
||||||
if test "$with_libvirtd" = "no"; then
|
if test "$with_libvirtd" = "no"; then
|
||||||
with_storage_scsi=no
|
with_storage_scsi=no
|
||||||
with_storage_rbd=no
|
|
||||||
with_storage_sheepdog=no
|
with_storage_sheepdog=no
|
||||||
with_storage_zfs=no
|
with_storage_zfs=no
|
||||||
with_storage_vstorage=no
|
with_storage_vstorage=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LIBVIRT_STORAGE_CHECK_SCSI
|
LIBVIRT_STORAGE_CHECK_SCSI
|
||||||
LIBVIRT_STORAGE_CHECK_RBD
|
|
||||||
LIBVIRT_STORAGE_CHECK_SHEEPDOG
|
LIBVIRT_STORAGE_CHECK_SHEEPDOG
|
||||||
LIBVIRT_STORAGE_CHECK_ZFS
|
LIBVIRT_STORAGE_CHECK_ZFS
|
||||||
LIBVIRT_STORAGE_CHECK_VSTORAGE
|
LIBVIRT_STORAGE_CHECK_VSTORAGE
|
||||||
@ -211,7 +208,6 @@ AC_MSG_NOTICE([])
|
|||||||
AC_MSG_NOTICE([Storage Drivers])
|
AC_MSG_NOTICE([Storage Drivers])
|
||||||
AC_MSG_NOTICE([])
|
AC_MSG_NOTICE([])
|
||||||
LIBVIRT_STORAGE_RESULT_SCSI
|
LIBVIRT_STORAGE_RESULT_SCSI
|
||||||
LIBVIRT_STORAGE_RESULT_RBD
|
|
||||||
LIBVIRT_STORAGE_RESULT_SHEEPDOG
|
LIBVIRT_STORAGE_RESULT_SHEEPDOG
|
||||||
LIBVIRT_STORAGE_RESULT_ZFS
|
LIBVIRT_STORAGE_RESULT_ZFS
|
||||||
LIBVIRT_STORAGE_RESULT_VSTORAGE
|
LIBVIRT_STORAGE_RESULT_VSTORAGE
|
||||||
@ -224,7 +220,6 @@ AC_MSG_NOTICE([Libraries])
|
|||||||
AC_MSG_NOTICE([])
|
AC_MSG_NOTICE([])
|
||||||
LIBVIRT_RESULT_NSS
|
LIBVIRT_RESULT_NSS
|
||||||
LIBVIRT_RESULT_PM_UTILS
|
LIBVIRT_RESULT_PM_UTILS
|
||||||
LIBVIRT_RESULT_RBD
|
|
||||||
AC_MSG_NOTICE([])
|
AC_MSG_NOTICE([])
|
||||||
AC_MSG_NOTICE([Windows])
|
AC_MSG_NOTICE([Windows])
|
||||||
AC_MSG_NOTICE([])
|
AC_MSG_NOTICE([])
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
dnl The storage RBD check
|
|
||||||
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_STORAGE_ARG_RBD], [
|
|
||||||
LIBVIRT_ARG_WITH_FEATURE([STORAGE_RBD],
|
|
||||||
[RADOS Block Device backend for the storage driver], [check])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([LIBVIRT_STORAGE_CHECK_RBD], [
|
|
||||||
LIBRBD_LIBS=
|
|
||||||
if test "$with_storage_rbd" = "yes" || test "$with_storage_rbd" = "check"; then
|
|
||||||
if test "$LIBRBD_FOUND" = "yes"; then
|
|
||||||
with_storage_rbd=yes
|
|
||||||
AC_DEFINE_UNQUOTED([WITH_STORAGE_RBD], [1],
|
|
||||||
[whether RBD backend for storage driver is enabled])
|
|
||||||
else
|
|
||||||
if test "$with_storage_rbd" = "yes"; then
|
|
||||||
AC_MSG_ERROR([You must install the librbd library & headers to compile libvirt])
|
|
||||||
else
|
|
||||||
with_storage_rbd=no
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL([WITH_STORAGE_RBD], [test "$with_storage_rbd" = "yes"])
|
|
||||||
AC_SUBST([LIBRBD_LIBS])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([LIBVIRT_STORAGE_RESULT_RBD], [
|
|
||||||
LIBVIRT_RESULT([RBD], [$with_storage_rbd])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([LIBVIRT_RESULT_RBD], [
|
|
||||||
LIBVIRT_RESULT([rbd], [$with_storage_rbd], [CFLAGS='' LIBS='$LIBRBD_LIBS'])
|
|
||||||
])
|
|
@ -1994,6 +1994,13 @@ if conf.has('WITH_LIBVIRTD')
|
|||||||
elif get_option('storage_mpath').enabled()
|
elif get_option('storage_mpath').enabled()
|
||||||
error('mpath storage driver is supported only on Linux and you must install libdevmapper')
|
error('mpath storage driver is supported only on Linux and you must install libdevmapper')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if not get_option('storage_rbd').disabled() and rbd_dep.found()
|
||||||
|
use_storage = true
|
||||||
|
conf.set('WITH_STORAGE_RBD', 1)
|
||||||
|
elif get_option('storage_rbd').enabled()
|
||||||
|
error('You must install the librbd library & headers to compile libvirt')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if use_storage
|
if use_storage
|
||||||
@ -2047,6 +2054,7 @@ storagedriver_summary = {
|
|||||||
'iscsi-direct': conf.has('WITH_STORAGE_ISCSI_DIRECT'),
|
'iscsi-direct': conf.has('WITH_STORAGE_ISCSI_DIRECT'),
|
||||||
'mpath': conf.has('WITH_STORAGE_MPATH'),
|
'mpath': conf.has('WITH_STORAGE_MPATH'),
|
||||||
'Disk': conf.has('WITH_STORAGE_DISK'),
|
'Disk': conf.has('WITH_STORAGE_DISK'),
|
||||||
|
'RBD': conf.has('WITH_STORAGE_RBD'),
|
||||||
'Gluster': conf.has('WITH_STORAGE_GLUSTER'),
|
'Gluster': conf.has('WITH_STORAGE_GLUSTER'),
|
||||||
}
|
}
|
||||||
summary(storagedriver_summary, section: 'Storage Drivers', bool_yn: true)
|
summary(storagedriver_summary, section: 'Storage Drivers', bool_yn: true)
|
||||||
|
@ -83,3 +83,4 @@ option('storage_iscsi', type: 'feature', value: 'auto', description: 'iscsi back
|
|||||||
option('storage_iscsi_direct', type: 'feature', value: 'auto', description: 'iscsi-direct backend for the storage driver')
|
option('storage_iscsi_direct', type: 'feature', value: 'auto', description: 'iscsi-direct backend for the storage driver')
|
||||||
option('storage_lvm', type: 'feature', value: 'auto', description: 'LVM backend for the storage driver')
|
option('storage_lvm', type: 'feature', value: 'auto', description: 'LVM backend for the storage driver')
|
||||||
option('storage_mpath', type: 'feature', value: 'auto', description: 'mpath backend for the storage driver')
|
option('storage_mpath', type: 'feature', value: 'auto', description: 'mpath backend for the storage driver')
|
||||||
|
option('storage_rbd', type: 'feature', value: 'auto', description: 'RADOS Block Device backend for the storage driver')
|
||||||
|
Loading…
Reference in New Issue
Block a user