1 From d9f498f4b7b7ca2ff96b4d87827713caea3743b5 Mon Sep 17 00:00:00 2001
2 From: "Daniel P. Berrange" <berrange@redhat.com>
3 Date: Mon, 10 Sep 2012 12:26:29 +0100
4 Subject: [PATCH] Add ability to force enable/disable of tools build
6 The qemu-img, qemu-nbd and qemu-io tools are built conditionally
7 based on whether any softmmu target is enabled. These are useful
8 self-contained tools which can be used in many other scenarios.
9 Add new --enable-tools/--disable-tools args to configure to allow
10 the user to explicitly turn on / off their build. The default
11 behaviour is now to build these tools are all times, regardless
12 of whether any softmmu target is enabled
14 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
15 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
16 (cherry picked from commit 4b1c11fd20e8901f04a2d9c225cd10fc05a762ff)
18 Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
20 configure | 21 +++++++++++++++------
21 1 file changed, 15 insertions(+), 6 deletions(-)
23 diff --git a/configure b/configure
24 index d01f9dc..a8061c1 100755
27 @@ -225,6 +225,7 @@ usb_redir=""
35 @@ -857,6 +858,10 @@ for opt do
37 --disable-guest-agent) guest_agent="no"
39 + --enable-tools) want_tools="yes"
41 + --disable-tools) want_tools="no"
43 --enable-seccomp) seccomp="yes"
45 --disable-seccomp) seccomp="no"
46 @@ -3017,9 +3022,14 @@ fi
47 qemu_confdir=$sysconfdir$confsuffix
48 qemu_datadir=$datadir$confsuffix
51 -if test "$softmmu" = yes ; then
53 +if test "$want_tools" = "yes" ; then
54 tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
55 + if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
56 + tools="qemu-nbd\$(EXESUF) $tools"
59 +if test "$softmmu" = yes ; then
60 if test "$virtfs" != no ; then
61 if test "$cap" = yes && test "$linux" = yes && test "$attr" = yes ; then
63 @@ -3033,14 +3043,13 @@ if test "$softmmu" = yes ; then
66 if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
67 - tools="qemu-nbd\$(EXESUF) $tools"
68 if [ "$guest_agent" = "yes" ]; then
69 tools="qemu-ga\$(EXESUF) $tools"
73 -if test "$smartcard_nss" = "yes" ; then
74 - tools="vscclient\$(EXESUF) $tools"
75 + if test "$smartcard_nss" = "yes" ; then
76 + tools="vscclient\$(EXESUF) $tools"
80 # Mac OS X ships with a broken assembler