[libvirt] [PATCH] Fix win32 platform build

* configure.in: Only define WITH_SECRETS if libvirtd is present * src/Makefile.am: Only build secrets driver if WITH_SECRETS is defined. Always add SECRET_DRIVER_SOURCES to EXTRA_DIST --- configure.in | 11 +++++++++++ src/Makefile.am | 3 +++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/configure.in b/configure.in index 120f7e7..fad1297 100644 --- a/configure.in +++ b/configure.in @@ -1062,6 +1062,17 @@ AM_CONDITIONAL([WITH_NETCF], [test "$with_netcf" = "yes"]) AC_SUBST([NETCF_CFLAGS]) AC_SUBST([NETCF_LIBS]) + +with_secrets=yes +if test "$with_libvirtd" = "no"; then + with_secrets=no +fi +if test "$with_secrets" = "yes" ; then + AC_DEFINE_UNQUOTED([WITH_SECRETS], 1, [whether local secrets management driver is available]) +fi +AM_CONDITIONAL([WITH_SECRETS], [test "$with_secrets" = "yes"]) + + AC_ARG_WITH([storage-fs], [ --with-storage-fs with FileSystem backend for the storage driver (on)],[],[with_storage_fs=check]) AC_ARG_WITH([storage-lvm], diff --git a/src/Makefile.am b/src/Makefile.am index 14a3a63..69f5ee7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -461,6 +461,7 @@ endif libvirt_driver_interface_la_SOURCES = $(INTERFACE_DRIVER_SOURCES) endif +if WITH_SECRETS if WITH_DRIVER_MODULES mod_LTLIBRARIES += libvirt_driver_secret.la else @@ -471,6 +472,7 @@ if WITH_DRIVER_MODULES libvirt_driver_secret_la_LDFLAGS = -module -avoid-version endif libvirt_driver_secret_la_SOURCES = $(SECRET_DRIVER_SOURCES) +endif # Needed to keep automake quiet about conditionals libvirt_driver_storage_la_SOURCES = @@ -574,6 +576,7 @@ EXTRA_DIST += \ $(NODE_DEVICE_DRIVER_HAL_SOURCES) \ $(NODE_DEVICE_DRIVER_DEVKIT_SOURCES) \ $(SECURITY_DRIVER_SELINUX_SOURCES) \ + $(SECRET_DRIVER_SOURCES) \ $(VBOX_DRIVER_EXTRA_DIST) # -- 1.6.2.5

On Mon, Sep 14, 2009 at 01:32:38PM +0100, Daniel P. Berrange wrote:
* configure.in: Only define WITH_SECRETS if libvirtd is present * src/Makefile.am: Only build secrets driver if WITH_SECRETS is defined. Always add SECRET_DRIVER_SOURCES to EXTRA_DIST --- configure.in | 11 +++++++++++ src/Makefile.am | 3 +++ 2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/configure.in b/configure.in index 120f7e7..fad1297 100644 --- a/configure.in +++ b/configure.in @@ -1062,6 +1062,17 @@ AM_CONDITIONAL([WITH_NETCF], [test "$with_netcf" = "yes"]) AC_SUBST([NETCF_CFLAGS]) AC_SUBST([NETCF_LIBS])
+ +with_secrets=yes +if test "$with_libvirtd" = "no"; then + with_secrets=no +fi +if test "$with_secrets" = "yes" ; then + AC_DEFINE_UNQUOTED([WITH_SECRETS], 1, [whether local secrets management driver is available]) +fi +AM_CONDITIONAL([WITH_SECRETS], [test "$with_secrets" = "yes"]) + + AC_ARG_WITH([storage-fs], [ --with-storage-fs with FileSystem backend for the storage driver (on)],[],[with_storage_fs=check]) AC_ARG_WITH([storage-lvm], diff --git a/src/Makefile.am b/src/Makefile.am index 14a3a63..69f5ee7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -461,6 +461,7 @@ endif libvirt_driver_interface_la_SOURCES = $(INTERFACE_DRIVER_SOURCES) endif
+if WITH_SECRETS if WITH_DRIVER_MODULES mod_LTLIBRARIES += libvirt_driver_secret.la else @@ -471,6 +472,7 @@ if WITH_DRIVER_MODULES libvirt_driver_secret_la_LDFLAGS = -module -avoid-version endif libvirt_driver_secret_la_SOURCES = $(SECRET_DRIVER_SOURCES) +endif
# Needed to keep automake quiet about conditionals libvirt_driver_storage_la_SOURCES = @@ -574,6 +576,7 @@ EXTRA_DIST += \ $(NODE_DEVICE_DRIVER_HAL_SOURCES) \ $(NODE_DEVICE_DRIVER_DEVKIT_SOURCES) \ $(SECURITY_DRIVER_SELINUX_SOURCES) \ + $(SECRET_DRIVER_SOURCES) \ $(VBOX_DRIVER_EXTRA_DIST)
#
Good catch, ACK ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel P. Berrange
-
Daniel Veillard