]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: add storage SCSI build option
authorPavel Hrdina <phrdina@redhat.com>
Thu, 30 Apr 2020 09:31:33 +0000 (11:31 +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-scsi.m4 [deleted file]
meson.build
meson_options.txt

index 3a77df4c0c94f8e50c2a7d320eb8dd95b1be0645..8c58a344c605c2f556a20b773e5ffe7fbd8ef649 100644 (file)
@@ -75,10 +75,8 @@ esac
 
 if test $with_linux = no; then
     with_dtrace=no
-    with_storage_scsi=no
 fi
 
-
 AM_CONDITIONAL([WITH_LINUX], [test "$with_linux" = "yes"])
 AM_CONDITIONAL([WITH_FREEBSD], [test "$with_freebsd" = "yes"])
 AM_CONDITIONAL([WITH_MACOS], [test "$with_macos" = "yes"])
@@ -134,19 +132,16 @@ dnl
 dnl Storage driver checks
 dnl
 
-LIBVIRT_STORAGE_ARG_SCSI
 LIBVIRT_STORAGE_ARG_SHEEPDOG
 LIBVIRT_STORAGE_ARG_ZFS
 LIBVIRT_STORAGE_ARG_VSTORAGE
 
 if test "$with_libvirtd" = "no"; then
-  with_storage_scsi=no
   with_storage_sheepdog=no
   with_storage_zfs=no
   with_storage_vstorage=no
 fi
 
-LIBVIRT_STORAGE_CHECK_SCSI
 LIBVIRT_STORAGE_CHECK_SHEEPDOG
 LIBVIRT_STORAGE_CHECK_ZFS
 LIBVIRT_STORAGE_CHECK_VSTORAGE
@@ -207,7 +202,6 @@ AC_MSG_NOTICE([=====================])
 AC_MSG_NOTICE([])
 AC_MSG_NOTICE([Storage Drivers])
 AC_MSG_NOTICE([])
-LIBVIRT_STORAGE_RESULT_SCSI
 LIBVIRT_STORAGE_RESULT_SHEEPDOG
 LIBVIRT_STORAGE_RESULT_ZFS
 LIBVIRT_STORAGE_RESULT_VSTORAGE
diff --git a/m4/virt-storage-scsi.m4 b/m4/virt-storage-scsi.m4
deleted file mode 100644 (file)
index ea4e47c..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-dnl The storage SCSI 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_SCSI], [
-  LIBVIRT_ARG_WITH_FEATURE([STORAGE_SCSI], [SCSI backend for the storage driver], [check])
-])
-
-AC_DEFUN([LIBVIRT_STORAGE_CHECK_SCSI], [
-  if test "$with_storage_scsi" = "check" || test "$with_storage_scsi" = "yes"; then
-    with_storage_scsi=yes
-
-    AC_DEFINE_UNQUOTED([WITH_STORAGE_SCSI], 1,
-                       [whether SCSI backend for storage driver is enabled])
-  fi
-  AM_CONDITIONAL([WITH_STORAGE_SCSI], [test "$with_storage_scsi" = "yes"])
-])
-
-AC_DEFUN([LIBVIRT_STORAGE_RESULT_SCSI], [
-  LIBVIRT_RESULT([SCSI], [$with_storage_scsi])
-])
index 645deafdb803598d75cef4fa4b0f424b7fd7b7db..fc33fc258c371f7a2a8bf289ef8bb82e149876c5 100644 (file)
@@ -2001,6 +2001,11 @@ if conf.has('WITH_LIBVIRTD')
   elif get_option('storage_rbd').enabled()
     error('You must install the librbd library & headers to compile libvirt')
   endif
+
+  if not get_option('storage_scsi').disabled() and host_machine.system() == 'linux'
+    use_storage = true
+    conf.set('WITH_STORAGE_SCSI', 1)
+  endif
 endif
 
 if use_storage
@@ -2052,6 +2057,7 @@ storagedriver_summary = {
   'LVM': conf.has('WITH_STORAGE_LVM'),
   'iSCSI': conf.has('WITH_STORAGE_ISCSI'),
   'iscsi-direct': conf.has('WITH_STORAGE_ISCSI_DIRECT'),
+  'SCSI': conf.has('WITH_STORAGE_SCSI'),
   'mpath': conf.has('WITH_STORAGE_MPATH'),
   'Disk': conf.has('WITH_STORAGE_DISK'),
   'RBD': conf.has('WITH_STORAGE_RBD'),
index 3afa53124ddbcbb5e8af137de8e5a315b29cfc1e..a4dfdcc5edbbd6d669d7bcc58ade52c8ff1453d6 100644 (file)
@@ -84,3 +84,4 @@ option('storage_iscsi_direct', type: 'feature', value: 'auto', description: 'isc
 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_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')