From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42738 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8IAd-0000px-Vs for qemu-devel@nongnu.org; Fri, 08 Apr 2011 16:20:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q8IAc-0008OY-Lj for qemu-devel@nongnu.org; Fri, 08 Apr 2011 16:20:43 -0400 Received: from tx2ehsobe001.messaging.microsoft.com ([65.55.88.11]:32506 helo=TX2EHSOBE001.bigfish.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q8IAc-0008O7-HD for qemu-devel@nongnu.org; Fri, 08 Apr 2011 16:20:42 -0400 Date: Fri, 8 Apr 2011 15:20:38 -0500 From: Scott Wood Subject: Re: [Qemu-devel] [PATCH] configure: avoid basename usage message Message-ID: <20110408152038.677cb9da@schlenkerla.am.freescale.net> In-Reply-To: <4D9F6AE1.1030808@codemonkey.ws> References: <20110408163349.GA1212@schlenkerla.am.freescale.net> <20110408185602.GA15734@stefanha-thinkpad.localdomain> <4D9F6AE1.1030808@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Stefan Hajnoczi , qemu-devel@nongnu.org On Fri, 8 Apr 2011 15:06:57 -0500 Anthony Liguori wrote: > On 04/08/2011 01:56 PM, Stefan Hajnoczi wrote: > > On Fri, Apr 08, 2011 at 11:33:49AM -0500, Scott Wood wrote: > >> diff --git a/configure b/configure > >> index ae97e11..c5b85fe 100755 > >> --- a/configure > >> +++ b/configure > >> @@ -1233,7 +1233,8 @@ else > >> fi > >> sdl=no > >> fi > >> -if test -n "$cross_prefix"&& test "`basename $sdlconfig`" = sdl-config; then > >> +if test -n "$cross_prefix" -a -n "$sdlconfig"&& \ > >> + test "`basename $sdlconfig`" = sdl-config; then > > Instead of doing test -n "$sdlconfig" first with short-circuit > > evaluation, I think would should do: > > > > test $(basename "$sdlconfig") = sdl-config > > $() is a bash-ism FYI. See section 2.6.3 of http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html And I've tested that it works in dash. -Scott