From patchwork Wed Aug 25 14:19:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 62681 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D8CFDB70D4 for ; Thu, 26 Aug 2010 00:23:02 +1000 (EST) Received: from localhost ([127.0.0.1]:57895 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OoGsV-0007Ie-C1 for incoming@patchwork.ozlabs.org; Wed, 25 Aug 2010 10:22:59 -0400 Received: from [140.186.70.92] (port=37718 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OoGpD-0005o9-Ew for qemu-devel@nongnu.org; Wed, 25 Aug 2010 10:19:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OoGpC-00088o-0O for qemu-devel@nongnu.org; Wed, 25 Aug 2010 10:19:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46612) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OoGpB-00088Z-QR for qemu-devel@nongnu.org; Wed, 25 Aug 2010 10:19:33 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7PEJXSn031095 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 25 Aug 2010 10:19:33 -0400 Received: from rincewind.home.kraxel.org (vpn1-5-126.ams2.redhat.com [10.36.5.126]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7PEJVZS003717; Wed, 25 Aug 2010 10:19:32 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id BC792403D0; Wed, 25 Aug 2010 16:19:30 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 25 Aug 2010 16:19:25 +0200 Message-Id: <1282745970-11506-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1282745970-11506-1-git-send-email-kraxel@redhat.com> References: <1282745970-11506-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH v3 05/10] add spice into the configure file X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Gerd Hoffmann --- configure | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 13d8be0..0998e86 100755 --- a/configure +++ b/configure @@ -318,6 +318,7 @@ pkgversion="" check_utests="no" user_pie="no" zero_malloc="" +spice="" # OS specific if check_define __linux__ ; then @@ -619,6 +620,10 @@ for opt do ;; --enable-kvm) kvm="yes" ;; + --disable-spice) spice="no" + ;; + --enable-spice) spice="yes" + ;; --enable-profiler) profiler="yes" ;; --enable-cocoa) @@ -898,6 +903,8 @@ echo " --enable-docs enable documentation build" echo " --disable-docs disable documentation build" echo " --disable-vhost-net disable vhost-net acceleration support" echo " --enable-vhost-net enable vhost-net acceleration support" +echo " --disable-spice disable spice" +echo " --enable-spice enable spice" echo "" echo "NOTE: The object files are built at the place where configure is launched" exit 1 @@ -2048,6 +2055,29 @@ if compile_prog "" ""; then gcc_attribute_warn_unused_result=yes fi +# spice probe +if test "$spice" != "no" ; then + cat > $TMPC << EOF +#include +int main(void) { spice_server_new(); return 0; } +EOF + spice_cflags=$($pkgconfig --cflags spice-protocol spice-server 2>/dev/null) + spice_libs=$($pkgconfig --libs spice-protocol spice-server 2>/dev/null) + if $pkgconfig --atleast-version=0.5.3 spice-server &&\ + compile_prog "$spice_cflags" "$spice_libs" ; then + spice="yes" + libs_softmmu="$libs_softmmu $spice_libs" + QEMU_CFLAGS="$QEMU_CFLAGS $spice_cflags" + else + if test "$spice" = "yes" ; then + feature_not_found "spice" + fi + spice="no" + fi +fi + +########################################## + ########################################## # check if we have fdatasync @@ -2190,6 +2220,7 @@ echo "preadv support $preadv" echo "fdatasync $fdatasync" echo "uuid support $uuid" echo "vhost-net support $vhost_net" +echo "spice support $spice" if test $sdl_too_old = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" @@ -2427,6 +2458,10 @@ if test "$fdatasync" = "yes" ; then echo "CONFIG_FDATASYNC=y" >> $config_host_mak fi +if test "$spice" = "yes" ; then + echo "CONFIG_SPICE=y" >> $config_host_mak +fi + # XXX: suppress that if [ "$bsd" = "yes" ] ; then echo "CONFIG_BSD=y" >> $config_host_mak