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

[Xen-devel] [PATCH v3 1/5] configure: set blktap2 availability on configure



blktap2 will be enabled by default on Linux systems only, also give
the oportunity to disable it from configure.

Remove the gate in the Makefile that only allows enabling blktap{1,2}
on Linux, since this is now done in a more flexible way on configure.

Please re-run autoconf after applying this patch.

Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx>
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 config/Tools.mk.in |    1 +
 tools/Makefile     |    5 +----
 tools/configure.ac |   18 ++++++++++++++++++
 3 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index 84b2612..852c941 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -54,6 +54,7 @@ CONFIG_SEABIOS      := @seabios@
 CONFIG_QEMU_TRAD    := @qemu_traditional@
 CONFIG_QEMU_XEN     := @qemu_xen@
 CONFIG_BLKTAP1      := @blktap1@
+CONFIG_BLKTAP2      := @blktap2@
 CONFIG_VTPM         := @vtpm@
 CONFIG_QEMUU_EXTRA_ARGS:= @EXTRA_QEMUU_CONFIGURE_ARGS@
 
diff --git a/tools/Makefile b/tools/Makefile
index 63382b1..4682f43 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -16,11 +16,8 @@ SUBDIRS-y += console
 SUBDIRS-y += xenmon
 SUBDIRS-y += xenstat
 SUBDIRS-$(CONFIG_Linux) += memshr 
-ifeq ($(CONFIG_X86)$(CONFIG_Linux),yy)
 SUBDIRS-$(CONFIG_BLKTAP1) += blktap
-endif
-SUBDIRS-$(CONFIG_Linux) += blktap2
-SUBDIRS-$(CONFIG_NetBSD) += blktap2
+SUBDIRS-$(CONFIG_BLKTAP2) += blktap2
 SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
 SUBDIRS-y += libfsimage
 SUBDIRS-$(CONFIG_Linux) += libvchan
diff --git a/tools/configure.ac b/tools/configure.ac
index 9db798b..836bbba 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -58,6 +58,24 @@ AX_ARG_DEFAULT_ENABLE([seabios], [Disable SeaBIOS])
 AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of tools])
 AX_ARG_DEFAULT_DISABLE([blktap1], [Enable blktap1 tools])
 
+dnl Enable blktap2 on Linux only.
+AC_ARG_ENABLE([blktap2],
+    AS_HELP_STRING([--enable-blktap2],
+                   [Enable blktap2, (DEFAULT is on for Linux, otherwise 
off)]),,[
+    case "$host_os" in
+        linux*)
+           enable_blktap2="yes";;
+        *) enable_blktap2="no";;
+    esac
+])
+AS_IF([test "x$enable_blktap2" = "xyes"], [
+AC_DEFINE([HAVE_BLKTAP2], [1], [Blktap2 enabled])
+    blktap2=y],[
+    blktap2=n
+])
+AC_SUBST(blktap2)
+
+
 AC_ARG_ENABLE([qemu-traditional],
     AS_HELP_STRING([--enable-qemu-traditional],
                    [Enable qemu traditional device model, (DEFAULT is on for 
Linux or NetBSD x86, otherwise off)]),,[
-- 
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.