mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
meson: add storage sheepdog 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
7eaa440f08
commit
0e15f535e0
@ -132,17 +132,14 @@ dnl
|
||||
dnl Storage driver checks
|
||||
dnl
|
||||
|
||||
LIBVIRT_STORAGE_ARG_SHEEPDOG
|
||||
LIBVIRT_STORAGE_ARG_ZFS
|
||||
LIBVIRT_STORAGE_ARG_VSTORAGE
|
||||
|
||||
if test "$with_libvirtd" = "no"; then
|
||||
with_storage_sheepdog=no
|
||||
with_storage_zfs=no
|
||||
with_storage_vstorage=no
|
||||
fi
|
||||
|
||||
LIBVIRT_STORAGE_CHECK_SHEEPDOG
|
||||
LIBVIRT_STORAGE_CHECK_ZFS
|
||||
LIBVIRT_STORAGE_CHECK_VSTORAGE
|
||||
|
||||
@ -202,7 +199,6 @@ AC_MSG_NOTICE([=====================])
|
||||
AC_MSG_NOTICE([])
|
||||
AC_MSG_NOTICE([Storage Drivers])
|
||||
AC_MSG_NOTICE([])
|
||||
LIBVIRT_STORAGE_RESULT_SHEEPDOG
|
||||
LIBVIRT_STORAGE_RESULT_ZFS
|
||||
LIBVIRT_STORAGE_RESULT_VSTORAGE
|
||||
AC_MSG_NOTICE([])
|
||||
|
@ -1,56 +0,0 @@
|
||||
dnl The storage Sheepdog 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_SHEEPDOG], [
|
||||
LIBVIRT_ARG_WITH_FEATURE([STORAGE_SHEEPDOG],
|
||||
[with Sheepdog backend for the storage driver], [check])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_STORAGE_CHECK_SHEEPDOG], [
|
||||
if test "$with_storage_sheepdog" = "yes" ||
|
||||
test "$with_storage_sheepdog" = "check"; then
|
||||
AC_PATH_PROGS([SHEEPDOGCLI], [collie dog], [], [$LIBVIRT_SBIN_PATH])
|
||||
|
||||
if test "$with_storage_sheepdog" = "yes"; then
|
||||
if test -z "$SHEEPDOGCLI"; then
|
||||
AC_MSG_ERROR([We need sheepdog client for Sheepdog storage driver])
|
||||
fi
|
||||
else
|
||||
if test -z "$SHEEPDOGCLI"; then
|
||||
with_storage_sheepdog=no
|
||||
fi
|
||||
|
||||
if test "$with_storage_sheepdog" = "check"; then
|
||||
with_storage_sheepdog=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$with_storage_sheepdog" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([WITH_STORAGE_SHEEPDOG], 1,
|
||||
[whether Sheepdog backend for storage driver is enabled])
|
||||
AC_DEFINE_UNQUOTED([SHEEPDOGCLI], ["$SHEEPDOGCLI"],
|
||||
[Location of sheepdog client program])
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_STORAGE_SHEEPDOG], [test "$with_storage_sheepdog" = "yes"])
|
||||
])
|
||||
|
||||
AC_DEFUN([LIBVIRT_STORAGE_RESULT_SHEEPDOG], [
|
||||
LIBVIRT_RESULT([Sheepdog], [$with_storage_sheepdog])
|
||||
])
|
11
meson.build
11
meson.build
@ -2006,6 +2006,16 @@ if conf.has('WITH_LIBVIRTD')
|
||||
use_storage = true
|
||||
conf.set('WITH_STORAGE_SCSI', 1)
|
||||
endif
|
||||
|
||||
if not get_option('storage_sheepdog').disabled()
|
||||
sheepdogcli_prog = find_program(['collie', 'dog'], required: get_option('storage_sheepdog'), dirs: libvirt_sbin_path)
|
||||
|
||||
if sheepdogcli_prog.found()
|
||||
use_storage = true
|
||||
conf.set('WITH_STORAGE_SHEEPDOG', 1)
|
||||
conf.set_quoted('SHEEPDOGCLI', sheepdogcli_prog.path())
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if use_storage
|
||||
@ -2061,6 +2071,7 @@ storagedriver_summary = {
|
||||
'mpath': conf.has('WITH_STORAGE_MPATH'),
|
||||
'Disk': conf.has('WITH_STORAGE_DISK'),
|
||||
'RBD': conf.has('WITH_STORAGE_RBD'),
|
||||
'Sheepdog': conf.has('WITH_STORAGE_SHEEPDOG'),
|
||||
'Gluster': conf.has('WITH_STORAGE_GLUSTER'),
|
||||
}
|
||||
summary(storagedriver_summary, section: 'Storage Drivers', bool_yn: true)
|
||||
|
@ -85,3 +85,4 @@ option('storage_lvm', type: 'feature', value: 'auto', description: 'LVM backend
|
||||
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')
|
||||
option('storage_scsi', type: 'feature', value: 'auto', description: 'SCSI backend for the storage driver')
|
||||
option('storage_sheepdog', type: 'feature', value: 'auto', description: 'Sheepdog backend for the storage driver')
|
||||
|
Loading…
Reference in New Issue
Block a user