meson: add storage dir 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:
Pavel Hrdina 2020-04-30 10:43:08 +02:00
parent 7d3a8ff0da
commit b217a9ec78
4 changed files with 16 additions and 37 deletions

View File

@ -134,7 +134,6 @@ dnl
dnl Storage driver checks
dnl
LIBVIRT_STORAGE_ARG_DIR
LIBVIRT_STORAGE_ARG_FS
LIBVIRT_STORAGE_ARG_LVM
LIBVIRT_STORAGE_ARG_ISCSI
@ -149,7 +148,6 @@ LIBVIRT_STORAGE_ARG_ZFS
LIBVIRT_STORAGE_ARG_VSTORAGE
if test "$with_libvirtd" = "no"; then
with_storage_dir=no
with_storage_fs=no
with_storage_lvm=no
with_storage_iscsi=no
@ -170,7 +168,6 @@ if test "$with_macos" = "yes"; then
with_storage_fs=no
fi
LIBVIRT_STORAGE_CHECK_DIR
LIBVIRT_STORAGE_CHECK_FS
LIBVIRT_STORAGE_CHECK_LVM
LIBVIRT_STORAGE_CHECK_ISCSI
@ -240,7 +237,6 @@ AC_MSG_NOTICE([=====================])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Storage Drivers])
AC_MSG_NOTICE([])
LIBVIRT_STORAGE_RESULT_DIR
LIBVIRT_STORAGE_RESULT_FS
LIBVIRT_STORAGE_RESULT_LVM
LIBVIRT_STORAGE_RESULT_ISCSI

View File

@ -1,33 +0,0 @@
dnl The storage dir 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_DIR], [
LIBVIRT_ARG_WITH_FEATURE([STORAGE_DIR], [directory backend for the storage driver], [yes])
])
AC_DEFUN([LIBVIRT_STORAGE_CHECK_DIR], [
if test "$with_storage_dir" = "yes" ; then
AC_DEFINE_UNQUOTED([WITH_STORAGE_DIR], 1, [whether directory backend for storage driver is enabled])
fi
AM_CONDITIONAL([WITH_STORAGE_DIR], [test "$with_storage_dir" = "yes"])
])
AC_DEFUN([LIBVIRT_STORAGE_RESULT_DIR], [
LIBVIRT_RESULT([Dir], [$with_storage_dir])
])

View File

@ -1883,6 +1883,13 @@ endif
use_storage = false
if conf.has('WITH_LIBVIRTD')
if not get_option('storage_dir').disabled()
use_storage = true
conf.set('WITH_STORAGE_DIR', 1)
endif
endif
if use_storage
conf.set('WITH_STORAGE', 1)
endif
@ -1925,6 +1932,11 @@ driver_summary = {
}
summary(driver_summary, section: 'Drivers', bool_yn: true)
storagedriver_summary = {
'Dir': conf.has('WITH_STORAGE_DIR'),
}
summary(storagedriver_summary, section: 'Storage Drivers', bool_yn: true)
secdriver_summary = {
'SELinux': conf.has('WITH_SECDRIVER_SELINUX'),
'AppArmor': conf.has('WITH_SECDRIVER_APPARMOR'),

View File

@ -72,3 +72,7 @@ option('driver_vz', type: 'feature', value: 'auto', description: 'Virtuozzo driv
option('secdriver_apparmor', type: 'feature', value: 'auto', description: 'use AppArmor security driver')
option('apparmor_profiles', type: 'boolean', value: false, description: 'install apparmor profiles')
option('secdriver_selinux', type: 'feature', value: 'auto', description: 'use SELinux security driver')
# storage driver options
option('storage_dir', type: 'feature', value: 'auto', description: 'directory backand for the storage driver')