From patchwork Fri Aug 31 17:06:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 180997 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 48AF92C037B for ; Sat, 1 Sep 2012 03:06:48 +1000 (EST) Received: from localhost ([::1]:41092 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7UgA-0002iu-5n for incoming@patchwork.ozlabs.org; Fri, 31 Aug 2012 13:06:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7Ug3-0002iZ-8Q for qemu-devel@nongnu.org; Fri, 31 Aug 2012 13:06:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T7Ug0-0004JZ-JN for qemu-devel@nongnu.org; Fri, 31 Aug 2012 13:06:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7Ug0-0004Io-Ap for qemu-devel@nongnu.org; Fri, 31 Aug 2012 13:06:36 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7VH6Y3b030394 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 31 Aug 2012 13:06:35 -0400 Received: from avocado.gsslab.fab.redhat.com (avocado.gsslab.fab.redhat.com [10.33.8.113]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7VH6XtT013613; Fri, 31 Aug 2012 13:06:34 -0400 From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Fri, 31 Aug 2012 18:06:28 +0100 Message-Id: <1346432788-14405-1-git-send-email-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] Add ability to build without any targets enabled X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: "Daniel P. Berrange" The qemu-img, qemu-nbd and qemu-io tools are quite useful in their own right. eg LXC can use qemu-img and qemu-nbd to support running of containers with qcow2 images. As such it is reasonable to allow building these tools, without enabling any QEMU targets. This change does two things: - Allows passing an empty string to the --target-list arg to disable all targets - Adds --enable-tools/--disable-tools args to enable/disable building of qemu-img, qemu-nbd and qemu-io independantly of whether any softmmu target is disabled. The builds default to enabled at all times. With this you can do ./configure --target-list= and get a build that only includes the basic tools Signed-off-by: Daniel P. Berrange --- configure | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/configure b/configure index d97fd81..bbde154 100755 --- a/configure +++ b/configure @@ -128,6 +128,7 @@ libs_qga="" debug_info="yes" target_list="" +without_targets=0 # Default value for a variable defining feature "foo". # * foo="no" feature will only be used if --enable-foo arg is given @@ -216,6 +217,7 @@ usb_redir="" opengl="" zlib="yes" guest_agent="yes" +want_tools="yes" libiscsi="" coroutine="" seccomp="" @@ -614,7 +616,12 @@ for opt do ;; --cpu=*) ;; - --target-list=*) target_list="$optarg" + --target-list=*) + if test -z "$optarg" ; then + without_targets=1 + else + target_list="$optarg" + fi ;; --enable-trace-backend=*) trace_backend="$optarg" ;; @@ -865,6 +872,10 @@ for opt do ;; --disable-guest-agent) guest_agent="no" ;; + --enable-tools) want_tools="yes" + ;; + --disable-tools) want_tools="no" + ;; --enable-seccomp) seccomp="yes" ;; --disable-seccomp) seccomp="no" @@ -1315,14 +1326,13 @@ if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_ fi if test -z "$target_list" ; then - target_list="$default_target_list" + if test $without_targets = 0 ; then + target_list="$default_target_list" + fi else target_list=`echo "$target_list" | sed -e 's/,/ /g'` fi -if test -z "$target_list" ; then - echo "No targets enabled" - exit 1 -fi + # see if system emulation was really requested case " $target_list " in *"-softmmu "*) softmmu=yes @@ -3039,9 +3049,14 @@ fi qemu_confdir=$sysconfdir$confsuffix qemu_datadir=$datadir$confsuffix -tools= -if test "$softmmu" = yes ; then +tools="" +if test "$want_tools" = "yes" ; then tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools" + if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then + tools="qemu-nbd\$(EXESUF) $tools" + fi +fi +if test "$softmmu" = yes ; then if test "$virtfs" != no ; then if test "$cap" = yes && test "$linux" = yes && test "$attr" = yes ; then virtfs=yes @@ -3055,14 +3070,13 @@ if test "$softmmu" = yes ; then fi fi if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then - tools="qemu-nbd\$(EXESUF) $tools" if [ "$guest_agent" = "yes" ]; then tools="qemu-ga\$(EXESUF) $tools" fi fi -fi -if test "$smartcard_nss" = "yes" ; then - tools="vscclient\$(EXESUF) $tools" + if test "$smartcard_nss" = "yes" ; then + tools="vscclient\$(EXESUF) $tools" + fi fi # Mac OS X ships with a broken assembler