From patchwork Sun Mar 28 09:44:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 48773 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 9AEA3B7CF0 for ; Sun, 28 Mar 2010 20:47:29 +1100 (EST) Received: from localhost ([127.0.0.1]:40489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nvp5a-0001J4-MI for incoming@patchwork.ozlabs.org; Sun, 28 Mar 2010 05:47:26 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nvp2U-0000mP-Tq for qemu-devel@nongnu.org; Sun, 28 Mar 2010 05:44:15 -0400 Received: from [140.186.70.92] (port=38333 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nvp2P-0000jh-So for qemu-devel@nongnu.org; Sun, 28 Mar 2010 05:44:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nvp2O-0003xi-9z for qemu-devel@nongnu.org; Sun, 28 Mar 2010 05:44:09 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:55596) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nvp2N-0003xY-Uh for qemu-devel@nongnu.org; Sun, 28 Mar 2010 05:44:08 -0400 Received: from flocke.weilnetz.de (p54ADF74D.dip.t-dialin.net [84.173.247.77]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0M05tI-1Nb8KA2fDI-00u8UR; Sun, 28 Mar 2010 11:44:06 +0200 Received: from stefan by flocke.weilnetz.de with local (Exim 4.71) (envelope-from ) id 1Nvp2L-0001v4-T1; Sun, 28 Mar 2010 11:44:05 +0200 From: Stefan Weil To: QEMU Developers Date: Sun, 28 Mar 2010 11:44:05 +0200 Message-Id: <1269769445-7350-1-git-send-email-weil@mail.berlios.de> X-Mailer: git-send-email 1.7.0 X-Provags-ID: V01U2FsdGVkX1/TAkEfSPkT3E0thJ+Mf4nxzRXzXcFPn4cMVhi DjF69tgidEgQltOZsxxZ5j+u/TEQ6QXnC3TFDE6IMSxeUqPVgD A3D37lJfnwo8wwZVMJUnQmePlkVZEX+xGZKoUlH2HS3YXJYI2/ ZZA== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH] Fix cross compilation 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 This patch enhances the algorithm which finds the correct settings for SDL. For cross compilations (when cross_prefix is set), it looks for sdl-config with cross prefix. Here is the complete search order: ${cross_prefix}sdl_config (new, only used for cross compilation) $(cross_prefix}pkg-config (old) pkg-config (old, needs PATH) sdl-config (old, needs PATH) Cross SDL packages (or the user) now can simply set a link (for example /usr/bin/i586-mingw32msvc-sdl-config -> /usr/i586-mingw32msvc/bin/sdl-config) which allows cross compilations without PATH modifications. Without the patch, configure and make (which calls configure) typically need a non-standard PATH. Failing to set this special PATH results in broken builds. Signed-off-by: Stefan Weil --- configure | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/configure b/configure index 664c920..eb2d759 100755 --- a/configure +++ b/configure @@ -1047,7 +1047,10 @@ fi ########################################## # SDL probe -if $pkgconfig sdl --modversion >/dev/null 2>&1; then +if test -n "$cross_prefix" && has ${cross_prefix}sdl-config; then + sdlconfig="${cross_prefix}sdl-config" + _sdlversion=`$sdlconfig --version | sed 's/[^0-9]//g'` +elif $pkgconfig sdl --modversion >/dev/null 2>&1; then sdlconfig="$pkgconfig sdl" _sdlversion=`$sdlconfig --modversion 2>/dev/null | sed 's/[^0-9]//g'` elif has sdl-config; then