From patchwork Sun Jan 17 16:06:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Check for sdl-config before calling it Date: Sun, 17 Jan 2010 06:06:39 -0000 From: =?utf-8?q?Lo=C3=AFc_Minier?= X-Patchwork-Id: 43035 Message-Id: <20100117160639.GA12343@pig.zood.org> To: Stefan Weil Cc: qemu-devel@nongnu.org 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 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