mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-11 04:15:49 +00:00
build: ensure storage driver is used
Commit 1c275e9a
accidentally dropped the storage driver from
libvirtd, because it depended on a C preprocessor macro that
was not defined. Furthermore, if you do './configure
--without-storage-dir --with-storage-disk' or any other combination
where you explicitly build a subset of storage backends excluding
the dir backend, then the build is broken.
Based on analysis by Osier Yang.
* configure.ac (WITH_STORAGE): Define top-level conditional.
* src/Makefile.am (mod_LTLIBRARIES): Build driver even when
storage_dir is disabled.
* daemon/libvirtd.c: Pick up storage driver for any backend, not
just dir.
* daemon/Makefile.am (libvirtd_LDADD): Likewise.
This commit is contained in:
parent
eb635de1fe
commit
3c3644d30f
13
configure.ac
13
configure.ac
@ -2076,6 +2076,19 @@ fi
|
|||||||
AC_SUBST([DEVMAPPER_CFLAGS])
|
AC_SUBST([DEVMAPPER_CFLAGS])
|
||||||
AC_SUBST([DEVMAPPER_LIBS])
|
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
|
||||||
dnl check for libcurl (ESX/XenAPI)
|
dnl check for libcurl (ESX/XenAPI)
|
||||||
dnl
|
dnl
|
||||||
|
@ -140,7 +140,7 @@ if WITH_UML
|
|||||||
libvirtd_LDADD += ../src/libvirt_driver_uml.la
|
libvirtd_LDADD += ../src/libvirt_driver_uml.la
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if WITH_STORAGE_DIR
|
if WITH_STORAGE
|
||||||
libvirtd_LDADD += ../src/libvirt_driver_storage.la
|
libvirtd_LDADD += ../src/libvirt_driver_storage.la
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
# ifdef WITH_NETCF
|
# ifdef WITH_NETCF
|
||||||
# include "interface/netcf_driver.h"
|
# include "interface/netcf_driver.h"
|
||||||
# endif
|
# endif
|
||||||
# ifdef WITH_STORAGE_DIR
|
# ifdef WITH_STORAGE
|
||||||
# include "storage/storage_driver.h"
|
# include "storage/storage_driver.h"
|
||||||
# endif
|
# endif
|
||||||
# ifdef WITH_NODE_DEVICES
|
# ifdef WITH_NODE_DEVICES
|
||||||
@ -403,7 +403,7 @@ static void daemonInitialize(void)
|
|||||||
# ifdef WITH_NETCF
|
# ifdef WITH_NETCF
|
||||||
interfaceRegister();
|
interfaceRegister();
|
||||||
# endif
|
# endif
|
||||||
# ifdef WITH_STORAGE_DIR
|
# ifdef WITH_STORAGE
|
||||||
storageRegister();
|
storageRegister();
|
||||||
# endif
|
# endif
|
||||||
# ifdef WITH_NODE_DEVICES
|
# ifdef WITH_NODE_DEVICES
|
||||||
|
@ -967,7 +967,7 @@ if HAVE_LIBBLKID
|
|||||||
libvirt_driver_storage_la_CFLAGS += $(BLKID_CFLAGS)
|
libvirt_driver_storage_la_CFLAGS += $(BLKID_CFLAGS)
|
||||||
libvirt_driver_storage_la_LIBADD += $(BLKID_LIBS)
|
libvirt_driver_storage_la_LIBADD += $(BLKID_LIBS)
|
||||||
endif
|
endif
|
||||||
if WITH_STORAGE_DIR
|
if WITH_STORAGE
|
||||||
if WITH_DRIVER_MODULES
|
if WITH_DRIVER_MODULES
|
||||||
mod_LTLIBRARIES += libvirt_driver_storage.la
|
mod_LTLIBRARIES += libvirt_driver_storage.la
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user