From patchwork Wed Jan 13 08:48:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 42792 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 31E651007D4 for ; Wed, 13 Jan 2010 19:54:35 +1100 (EST) Received: from localhost ([127.0.0.1]:34287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUyzo-00079B-9s for incoming@patchwork.ozlabs.org; Wed, 13 Jan 2010 03:54:32 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUyuY-0005kB-Ui for qemu-devel@nongnu.org; Wed, 13 Jan 2010 03:49:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUyuU-0005hL-Ab for qemu-devel@nongnu.org; Wed, 13 Jan 2010 03:49:06 -0500 Received: from [199.232.76.173] (port=44951 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUyuU-0005hG-2v for qemu-devel@nongnu.org; Wed, 13 Jan 2010 03:49:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32123) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUyuT-0004En-IK for qemu-devel@nongnu.org; Wed, 13 Jan 2010 03:49:01 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0D8n0l7006405 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 13 Jan 2010 03:49:00 -0500 Received: from localhost.localdomain (vpn2-11-187.ams2.redhat.com [10.36.11.187]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0D8mukp012654 for ; Wed, 13 Jan 2010 03:49:00 -0500 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 13 Jan 2010 09:48:54 +0100 Message-Id: <1263372535-20535-4-git-send-email-pbonzini@redhat.com> In-Reply-To: <1263372535-20535-1-git-send-email-pbonzini@redhat.com> References: <1263372535-20535-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH v2 3/4] use pkg-config for sdl whenever available X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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