From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUyyT-00070Y-JM for qemu-devel@nongnu.org; Wed, 13 Jan 2010 03:53:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUyyP-0006xt-08 for qemu-devel@nongnu.org; Wed, 13 Jan 2010 03:53:09 -0500 Received: from [199.232.76.173] (port=57723 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUyyO-0006xo-QK for qemu-devel@nongnu.org; Wed, 13 Jan 2010 03:53:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57659) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUyyN-00058o-Ky for qemu-devel@nongnu.org; Wed, 13 Jan 2010 03:53:04 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0D8r27h028481 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 13 Jan 2010 03:53:02 -0500 Received: from localhost.localdomain (vpn2-11-187.ams2.redhat.com [10.36.11.187]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0D8qvra030066 for ; Wed, 13 Jan 2010 03:53:02 -0500 From: Paolo Bonzini Date: Wed, 13 Jan 2010 09:52:55 +0100 Message-Id: <1263372776-23753-4-git-send-email-pbonzini@redhat.com> In-Reply-To: <1263372776-23753-1-git-send-email-pbonzini@redhat.com> References: <1263372776-23753-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v3 3/4] use pkg-config for sdl whenever available List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Together with the first patch this enables using the prefixed pkg-config, thus picking up the correct flags for SDL. Signed-off-by: Paolo Bonzini --- configure | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/configure b/configure index b8641b8..2553724 100755 --- a/configure +++ b/configure @@ -989,18 +989,24 @@ fi ########################################## # SDL probe -sdl_too_old=no +if $pkgconfig sdl --modversion >/dev/null 2>&1; then + sdlconfig="$pkgconfig sdl" + _sdlversion=`$sdlconfig --modversion 2>/dev/null | sed 's/[^0-9]//g'` +else + sdlconfig='sdl-config' + _sdlversion=`$sdlconfig --version | sed 's/[^0-9]//g'` +fi +sdl_too_old=no if test "$sdl" != "no" ; then cat > $TMPC << EOF #include #undef main /* We don't want SDL to override our main() */ int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } EOF - sdl_cflags=`sdl-config --cflags 2> /dev/null` - sdl_libs=`sdl-config --libs 2> /dev/null` + sdl_cflags=`$sdlconfig --cflags 2> /dev/null` + sdl_libs=`$sdlconfig --libs 2> /dev/null` if compile_prog "$sdl_cflags" "$sdl_libs" ; then - _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'` if test "$_sdlversion" -lt 121 ; then sdl_too_old=yes else -- 1.6.5.2