Patchwork Check for sdl-config before calling it

login
register
mail settings
Submitter Loïc Minier
Date Jan. 17, 2010, 4:06 p.m.
Message ID <20100117160639.GA12343@pig.zood.org>
Download mbox | patch
Permalink /patch/43035/
State New
Headers show

Comments

Loïc Minier - Jan. 17, 2010, 4:06 p.m.
On Sun, Jan 17, 2010, Stefan Weil wrote:
> > On systems were sdl-config isn't installed, ./configure triggers this
> > warning:
> > ./configure: 957: sdl-config: not found
> 
> which version did you test?
> Git master has no sdl-config call at configure:957.
> 
> But I get warning messages, too, when pkg-config or
> sdl-config are missing.

 Yes, the line is bogus for me as well; not sure why.  I'm using master.

> Your patch fixes the warning for sdl-config and sets
> sdl=no. If configure was called with --enable-sdl,
> this solution is wrong: configure should abort with
> an error message (feature_not_found).

 Ack; how about the attached one instead?
Paolo Bonzini - Jan. 18, 2010, 11:35 a.m.
On 01/17/2010 05:06 PM, Loïc Minier wrote:
> On Sun, Jan 17, 2010, Stefan Weil wrote:
>>> On systems were sdl-config isn't installed, ./configure triggers this
>>> warning:
>>> ./configure: 957: sdl-config: not found
>>
>> which version did you test?
>> Git master has no sdl-config call at configure:957.
>>
>> But I get warning messages, too, when pkg-config or
>> sdl-config are missing.
>
>   Yes, the line is bogus for me as well; not sure why.  I'm using master.
>
>> Your patch fixes the warning for sdl-config and sets
>> sdl=no. If configure was called with --enable-sdl,
>> this solution is wrong: configure should abort with
>> an error message (feature_not_found).
>
>   Ack; how about the attached one instead?

Acked-By: Paolo Bonzini <pbonzini@redhat.com>

Paolo

Patch

diff --git a/configure b/configure
index 5631bbb..baa2800 100755
--- a/configure
+++ b/configure
@@ -993,9 +993,14 @@  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
+  if test "$sdl" = "yes" ; then
+    feature_not_found "sdl"
+  fi
+  sdl=no
 fi
 
 sdl_too_old=no