]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: add storage dir build option
authorPavel Hrdina <phrdina@redhat.com>
Thu, 30 Apr 2020 08:43:08 +0000 (10:43 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:27:00 +0000 (09:27 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
configure.ac
m4/virt-storage-dir.m4 [deleted file]
meson.build
meson_options.txt

index 6ba1a37cb72789bea69089e1181fb078d14b9935..3175877da701404a71a17a7e56e7415ed8b59cf9 100644 (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
diff --git a/m4/virt-storage-dir.m4 b/m4/virt-storage-dir.m4
deleted file mode 100644 (file)
index 798bf93..0000000
+++ /dev/null
@@ -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])
-])
index 19deb58c53a1e35060874f896bdd81494450f8cf..b94d7cea5cf1871b3d693cf719088e60690312e2 100644 (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'),
index 0e9b46db89da04c699e04fa00d336f3140027143..bebc53d4bcb12ed6102b26ae7988d5f416a33a83 100644 (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')