peterdelevoryas / rpms / qemu

Forked from rpms/qemu 2 years ago
Clone

Blame 0125-Add-ability-to-force-enable-disable-of-tools-build.patch

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