Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWV3U-0000TQ-8r for qemu-devel@nongnu.org; Sun, 17 Jan 2010 08:20:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWV3P-0000O7-A9 for qemu-devel@nongnu.org; Sun, 17 Jan 2010 08:20:35 -0500 Received: from [199.232.76.173] (port=44547 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWV3P-0000Ny-7a for qemu-devel@nongnu.org; Sun, 17 Jan 2010 08:20:31 -0500 Received: from lo.gmane.org ([80.91.229.12]:59434) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NWV3O-0004An-Ol for qemu-devel@nongnu.org; Sun, 17 Jan 2010 08:20:31 -0500 Received: from list by lo.gmane.org with local (Exim 4.50) id 1NWV2Y-0003ks-GO for qemu-devel@nongnu.org; Sun, 17 Jan 2010 14:19:38 +0100 Received: from unicorn.mansr.com ([78.86.181.103]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Jan 2010 14:19:38 +0100 Received: from mans by unicorn.mansr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Jan 2010 14:19:38 +0100 From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= Date: Sun, 17 Jan 2010 13:17:53 +0000 Message-ID: References: <20100117124528.GA24106@bee.dooz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: news Subject: [Qemu-devel] Re: [PATCH] Check for sdl-config before calling it List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Loïc Minier writes: > Hi > > On systems were sdl-config isn't installed, ./configure triggers this > warning: > ./configure: 957: sdl-config: not found > > The attached patch fixes the warning for me. > > Thanks, > -- > Loïc Minier > > From 94876939db7f46cf8d920e289d0d4f929d3b7df1 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Lo=C3=AFc=20Minier?= > Date: Sun, 17 Jan 2010 13:42:04 +0100 > Subject: [PATCH] Check for sdl-config before calling it > MIME-Version: 1.0 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > > Check whether sdl-config is available before calling it, otherwise > ./configure triggers a warning: > ./configure: 957: sdl-config: not found > > If neither the .pc file not sdl-config are present, disable SDL support. > > Signed-off-by: Loïc Minier > --- > configure | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/configure b/configure > index 5631bbb..450e1a2 100755 > --- a/configure > +++ b/configure > @@ -993,9 +993,11 @@ fi > if $pkgconfig sdl --modversion >/dev/null 2>&1; then > sdlconfig="$pkgconfig sdl" > _sdlversion=`$sdlconfig --modversion 2>/dev/null | sed 's/[^0-9]//g'` > -else > +elif which sdl-config >/dev/null 2>&1; then > sdlconfig='sdl-config' > _sdlversion=`$sdlconfig --version | sed 's/[^0-9]//g'` > +else > + sdl=no > fi "which" isn't a standard command. Would simply 2>/dev/null do the trick just as well? If you really need to test for the existence of something, use "type". -- Måns Rullgård mans@mansr.com