From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/2] configure: passthrough for audio-{drv,card} and logic cleanup Date: Thu, 31 Jul 2008 12:49:55 +0300 Message-ID: <48918AC3.8080800@qumranet.com> References: <20080730195735.GA11853@tapir> <20080730201159.GB11939@tapir> <1217475243.6728.3.camel@hephaestion.lan.tjworld.net> <20080731092806.GC15168@tapir> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: TJ , kvm@vger.kernel.org To: Carlo Marcelo Arenas Belon Return-path: Received: from il.qumranet.com ([212.179.150.194]:27013 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750804AbYGaJt5 (ORCPT ); Thu, 31 Jul 2008 05:49:57 -0400 In-Reply-To: <20080731092806.GC15168@tapir> Sender: kvm-owner@vger.kernel.org List-ID: Carlo Marcelo Arenas Belon wrote: > Not really sure which patch you are referring to as there is none on this > email, but the one I sent originally in this thread with this subject and > that I got back from the list and that is in the mail archive seem to work > correctly as shown below : > > kvm-72 $ ./configure | grep Audio > Audio drivers oss > kvm-72 $ ./configure --audio-drv-list="alsa" | grep Audio > Audio drivers alsa > kvm-72 $ ./configure --audio-drv-list="sdl oss alsa" | grep Audio > Audio drivers sdl oss alsa > > in case your copy got somehow mangled I am sending it again attached so it > will be easier to apply by doing something like : > > $ tar -xzf kvm-72.tar.gz > $ cd kvm-72 > $ patch -p1 < kvm-72-configure-audio-list.patch > > diff --git a/configure b/configure > index 2558e0e..fc05767 100755 > --- a/configure > +++ b/configure > @@ -10,6 +10,8 @@ qemu_cflags= > qemu_ldflags= > qemu_opts= > cross_prefix= > +audio_drv_list= > +audio_card_list= > arch=`uname -m` > target_exec= > > @@ -39,7 +41,8 @@ EOF > } > > while [[ "$1" = -* ]]; do > - opt="$1"; shift > + optorig="$1"; shift > + opt="$optorig" > arg= > if [[ "$opt" = *=* ]]; then > arg="${opt#*=}" > @@ -67,16 +70,21 @@ while [[ "$1" = -* ]]; do > --cross-prefix) > cross_prefix="$arg" > ;; > + --audio-drv-list) > + audio_drv_list="$arg" > + ;; > + --audio-card-list) > + audio_card_list="$arg" > + ;; > --help) > usage > ;; > *) > - qemu_opts="$qemu_opts $opt" > + qemu_opts="$qemu_opts $optorig" > ;; > esac > done > > - > #set kenel directory > libkvm_kerneldir=$(readlink -f kernel) > > @@ -114,11 +122,12 @@ fi > --extra-ldflags="-L $PWD/../libkvm $qemu_ldflags" \ > --kernel-path="$libkvm_kerneldir" \ > --prefix="$prefix" \ > + ${audio_drv_list:+"--audio-drv-list=$audio_drv_list"} \ > + ${audio_card_list:+"--audio-card-list=$audio_card_list"} \ > ${cross_prefix:+"--cross-prefix=$cross_prefix"} \ > ${cross_prefix:+"--cpu=$arch"} $qemu_opts > ) || usage > Too fragile. It would be best to quote the argument properly so qemu/configure sees the right thing. I tried playing with printf %q, but only got more annoyed with bash that I usually am. Patches to rewrite ./configure in python are welcome. -- error compiling committee.c: too many arguments to function