[libvirt] [PATCH 3/3] Setup configure.in to detect presence of libnetcf and change config.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Laine Stump <laine@xxxxxxxxxx>

---
 configure.in    |   22 ++++++++++++++++++++++
 src/Makefile.am |    2 +-
 2 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/configure.in b/configure.in
index 392f2b9..6fba66d 100644
--- a/configure.in
+++ b/configure.in
@@ -783,6 +783,27 @@ fi
 AM_CONDITIONAL([WITH_BRIDGE], [test "$with_bridge" = "yes"])
 
 dnl
+dnl Is the netcf library available and desired?
+dnl
+AC_ARG_WITH([netcf],
+[  --with-netcf            add libnetcf support (on)],[],[with_netcf=yes])
+if test "$with_netcf" = "yes" ; then
+  AC_CHECK_LIB([netcf], [ncf_init],
+          [AC_CHECK_HEADER([netcf.h],
+                  [LIB_NETCF=-lnetcf],
+                  [AC_MSG_WARN([header netcf.h was not found, support for libnetcf will not be built])]
+                  [with_netcf=no]
+                  )],
+          [AC_MSG_WARN([libnetcf library was not found or not usable, support for libnetcf will not be built])]
+          [with_netcf=no])
+  AC_SUBST([LIB_NETCF])
+fi
+if test "$with_netcf" = "yes" ; then
+  AC_DEFINE_UNQUOTED([WITH_NETCF], 1, [whether host interface config via libnetcf is enabled])
+fi
+AM_CONDITIONAL([WITH_NETCF], [test "$with_netcf" = "yes"])
+
+dnl
 dnl Storage driver checks
 dnl
 
@@ -1367,6 +1388,7 @@ AC_MSG_NOTICE([    Test: $with_test])
 AC_MSG_NOTICE([  Remote: $with_remote])
 AC_MSG_NOTICE([ Network: $with_network])
 AC_MSG_NOTICE([Libvirtd: $with_libvirtd])
+AC_MSG_NOTICE([   netcf: $with_netcf])
 AC_MSG_NOTICE([])
 AC_MSG_NOTICE([Storage Drivers])
 AC_MSG_NOTICE([])
diff --git a/src/Makefile.am b/src/Makefile.am
index 60b2d46..39766ee 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -207,7 +207,7 @@ libvirt_driver_la_SOURCES =					\
 		$(NODE_DEVICE_CONF_SOURCES)
 
 libvirt_driver_la_CFLAGS = $(XEN_CFLAGS) $(NUMACTL_CFLAGS)
-libvirt_driver_la_LDFLAGS = $(XEN_LIBS) $(NUMACTL_LIBS)
+libvirt_driver_la_LDFLAGS = $(XEN_LIBS) $(NUMACTL_LIBS) $(LIB_NETCF)
 
 USED_SYM_FILES = libvirt_private.syms
 
-- 
1.6.0.6

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]