aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@cardoe.com>2012-09-17 20:27:06 -0500
committerEric Blake <eblake@redhat.com>2012-09-19 08:27:01 -0600
commitb95ad92e058d3b25b9fc0a9f48cf21c57c29e0b5 (patch)
treef6223ebecf35348d10c3c024325d6c0938643065 /src/Makefile.am
parentvirsh: Rename QEmu to QEMU to match upstream (diff)
downloadlibvirt-b95ad92e058d3b25b9fc0a9f48cf21c57c29e0b5.tar.gz
libvirt-b95ad92e058d3b25b9fc0a9f48cf21c57c29e0b5.tar.bz2
libvirt-b95ad92e058d3b25b9fc0a9f48cf21c57c29e0b5.zip
build: define WITH_INTERFACE for the driver
Based exclusively on work by Eric Blake in a patch posted with the same subject. However some modifications related to comments and my plans to add another backend. Added WITH_INTERFACE as the only automake variable deciding whether to build the driver and using WITH_NETCF to identify that we're wanting to use the netcf library as the backend. * configure.ac: Added with_interface * src/interface/netcf_driver.c: Renamed.. * src/interface/interface_backend_netcf.c: ..to this to match storage. * src/interface/netcf_driver.h: Renamed.. * src/interface/interface_driver.h: ..to this. * daemon/Makefile.am: Respect WITH_INTERFACE and WITH_NETCF. * libvirt.spec.in: Add RPM support for --with-interface
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 9f27fcfa7..4ae741be2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -552,8 +552,17 @@ PARALLELS_DRIVER_SOURCES = \
NETWORK_DRIVER_SOURCES = \
network/bridge_driver.h network/bridge_driver.c
-INTERFACE_DRIVER_SOURCES = \
- interface/netcf_driver.h interface/netcf_driver.c
+INTERFACE_DRIVER_SOURCES =
+
+if WITH_INTERFACE
+INTERFACE_DRIVER_SOURCES += \
+ interface/interface_driver.h
+endif
+
+if WITH_NETCF
+INTERFACE_DRIVER_SOURCES += \
+ interface/interface_backend_netcf.c
+endif
SECRET_DRIVER_SOURCES = \
secret/secret_driver.h secret/secret_driver.c
@@ -1021,7 +1030,7 @@ endif
EXTRA_DIST += network/default.xml
-if WITH_NETCF
+if WITH_INTERFACE
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_interface.la
else
@@ -1029,10 +1038,13 @@ noinst_LTLIBRARIES += libvirt_driver_interface.la
# Stateful, so linked to daemon instead
#libvirt_la_BUILT_LIBADD += libvirt_driver_interface.la
endif
-libvirt_driver_interface_la_CFLAGS = $(NETCF_CFLAGS) \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+libvirt_driver_interface_la_CFLAGS = -I$(top_srcdir)/src/conf $(AM_CFLAGS)
libvirt_driver_interface_la_LDFLAGS = $(AM_LDFLAGS)
-libvirt_driver_interface_la_LIBADD = $(NETCF_LIBS)
+libvirt_driver_interface_la_LIBADD =
+if WITH_NETCF
+libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
+libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
+endif
if WITH_DRIVER_MODULES
libvirt_driver_interface_la_LIBADD += ../gnulib/lib/libgnu.la
libvirt_driver_interface_la_LDFLAGS += -module -avoid-version