From: Roger Pau Monne Date: Thu, 19 Jun 2014 16:32:44 +0000 (+0200) Subject: configure: set blktap2 availability on configure X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4763 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=653881ce41ec8db3ce7fad38dc280c165f027bb4;p=xen.git 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. Signed-off-by: Roger Pau Monné Cc: Ian Jackson Cc: Ian Campbell Acked-by: Ian Campbell [ ijc -- reran autogen.sh ] --- diff --git a/config/Tools.mk.in b/config/Tools.mk.in index 84b261211a..852c941d68 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 63382b16e4..4682f439d2 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/config.h.in b/tools/config.h.in index 028c360207..40f3d1cde7 100644 --- a/tools/config.h.in +++ b/tools/config.h.in @@ -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 header file. */ #undef HAVE_INTTYPES_H diff --git a/tools/configure b/tools/configure index c3a6824f55..d84d9504ec 100755 --- a/tools/configure +++ b/tools/configure @@ -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; diff --git a/tools/configure.ac b/tools/configure.ac index 9db798b57a..836bbba4a3 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)]),,[