meson: add storage build check

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-24 15:14:37 +02:00
parent 57225bb988
commit 7d3a8ff0da
2 changed files with 9 additions and 13 deletions

View File

@ -184,19 +184,6 @@ LIBVIRT_STORAGE_CHECK_GLUSTER
LIBVIRT_STORAGE_CHECK_ZFS
LIBVIRT_STORAGE_CHECK_VSTORAGE
with_storage=no
for backend in dir fs lvm iscsi iscsi_direct scsi mpath rbd disk; do
if eval test \$with_storage_$backend = yes; then
with_storage=yes
break
fi
done
if test $with_storage = yes; then
AC_DEFINE([WITH_STORAGE], [1],
[Define to 1 if at least one storage backend is in use])
fi
AM_CONDITIONAL([WITH_STORAGE], [test "$with_storage" = "yes"])
dnl Python3 < 3.7 treats the C locale as 7-bit only.
dnl We must force env vars so it treats it as UTF-8
dnl regardless of the user's locale.

View File

@ -1879,6 +1879,15 @@ if conf.has('WITH_QEMU') or conf.has('WITH_LXC') or conf.has('WITH_NETWORK')
endif
# check for storage drivers
use_storage = false
if use_storage
conf.set('WITH_STORAGE', 1)
endif
# define top include directory
top_inc_dir = include_directories('.')