diff --git a/configure.ac b/configure.ac index 7d8d26b1e6..dda764d3f0 100644 --- a/configure.ac +++ b/configure.ac @@ -2076,6 +2076,19 @@ fi AC_SUBST([DEVMAPPER_CFLAGS]) AC_SUBST([DEVMAPPER_LIBS]) +with_storage=no +for backend in dir fs lvm iscsi 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 dnl check for libcurl (ESX/XenAPI) dnl diff --git a/daemon/Makefile.am b/daemon/Makefile.am index b1518c58c3..fbb0ae1f90 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -140,7 +140,7 @@ if WITH_UML libvirtd_LDADD += ../src/libvirt_driver_uml.la endif -if WITH_STORAGE_DIR +if WITH_STORAGE libvirtd_LDADD += ../src/libvirt_driver_storage.la endif diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index c74cd43092..d5ad05e92d 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -77,7 +77,7 @@ # ifdef WITH_NETCF # include "interface/netcf_driver.h" # endif -# ifdef WITH_STORAGE_DIR +# ifdef WITH_STORAGE # include "storage/storage_driver.h" # endif # ifdef WITH_NODE_DEVICES @@ -403,7 +403,7 @@ static void daemonInitialize(void) # ifdef WITH_NETCF interfaceRegister(); # endif -# ifdef WITH_STORAGE_DIR +# ifdef WITH_STORAGE storageRegister(); # endif # ifdef WITH_NODE_DEVICES diff --git a/src/Makefile.am b/src/Makefile.am index dd1af6595e..2d737afff9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -967,7 +967,7 @@ if HAVE_LIBBLKID libvirt_driver_storage_la_CFLAGS += $(BLKID_CFLAGS) libvirt_driver_storage_la_LIBADD += $(BLKID_LIBS) endif -if WITH_STORAGE_DIR +if WITH_STORAGE if WITH_DRIVER_MODULES mod_LTLIBRARIES += libvirt_driver_storage.la else