]> xenbits.xensource.com Git - xen.git/commitdiff
configure: set blktap2 availability on configure
authorRoger Pau Monne <roger.pau@citrix.com>
Thu, 19 Jun 2014 16:32:44 +0000 (18:32 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 27 Jun 2014 13:13:22 +0000 (14:13 +0100)
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.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- reran autogen.sh ]

config/Tools.mk.in
tools/Makefile
tools/config.h.in
tools/configure
tools/configure.ac

index 84b261211a2dd55cf4b951a1dddc6b0efccf79b5..852c941d68bcb13149725f474e07a2f9be4a2bd9 100644 (file)
@@ -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@
 
index 63382b16e4cfbc19e8d124444901c45f79fe26f5..4682f439d2cd6d8749f86169312bf84452a14eeb 100644 (file)
@@ -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
index 028c36020756e6ee6018adecf1a4b808cccec6eb..40f3d1cde76010240178e848a7ab53362fe5a7b2 100644 (file)
@@ -1,5 +1,8 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* Blktap2 enabled */
+#undef HAVE_BLKTAP2
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
index c3a6824f559a5da93a16741cb6530d05fdf10e71..d84d9504ecba76131f8eff47d88fbb412abb84cf 100755 (executable)
@@ -689,6 +689,7 @@ seabios_path
 qemu_xen
 rombios
 qemu_traditional
+blktap2
 blktap1
 debug
 seabios
@@ -763,6 +764,7 @@ enable_ovmf
 enable_seabios
 enable_debug
 enable_blktap1
+enable_blktap2
 enable_qemu_traditional
 enable_rombios
 with_system_qemu
@@ -1424,6 +1426,8 @@ Optional Features:
   --disable-seabios       Disable SeaBIOS (default is ENABLED)
   --disable-debug         Disable debug build of tools (default is ENABLED)
   --enable-blktap1        Enable blktap1 tools (default is DISABLED)
+  --enable-blktap2        Enable blktap2, (DEFAULT is on for Linux, otherwise
+                          off)
   --enable-qemu-traditional
                           Enable qemu traditional device model, (DEFAULT is on
                           for Linux or NetBSD x86, otherwise off)
@@ -3724,6 +3728,33 @@ blktap1=$ax_cv_blktap1
 
 
 
+# Check whether --enable-blktap2 was given.
+if test "${enable_blktap2+set}" = set; then :
+  enableval=$enable_blktap2;
+else
+
+    case "$host_os" in
+        linux*)
+           enable_blktap2="yes";;
+        *) enable_blktap2="no";;
+    esac
+
+fi
+
+if test "x$enable_blktap2" = "xyes"; then :
+
+
+$as_echo "#define HAVE_BLKTAP2 1" >>confdefs.h
+
+    blktap2=y
+else
+
+    blktap2=n
+
+fi
+
+
+
 # Check whether --enable-qemu-traditional was given.
 if test "${enable_qemu_traditional+set}" = set; then :
   enableval=$enable_qemu_traditional;
index 9db798b57a9c085e1ddc6efed2fb8cf7267492de..836bbba4a3362b60cd231f32ec5e15052940dbb9 100644 (file)
@@ -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)]),,[