aboutsummaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/Makefile.am24
-rw-r--r--src/interface/interface_backend_netcf.c (renamed from src/interface/netcf_driver.c)2
-rw-r--r--src/interface/interface_driver.h (renamed from src/interface/netcf_driver.h)0
3 files changed, 19 insertions, 7 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
diff --git a/src/interface/netcf_driver.c b/src/interface/interface_backend_netcf.c
index 6e429db68..3b4ee1144 100644
--- a/src/interface/netcf_driver.c
+++ b/src/interface/interface_backend_netcf.c
@@ -27,7 +27,7 @@
#include "virterror_internal.h"
#include "datatypes.h"
-#include "netcf_driver.h"
+#include "interface_driver.h"
#include "interface_conf.h"
#include "memory.h"
#include "logging.h"
diff --git a/src/interface/netcf_driver.h b/src/interface/interface_driver.h
index 38fbc77eb..38fbc77eb 100644
--- a/src/interface/netcf_driver.h
+++ b/src/interface/interface_driver.h