From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0LuA-00043Y-OP for qemu-devel@nongnu.org; Fri, 09 Apr 2010 17:38:22 -0400 Received: from [140.186.70.92] (port=56147 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0Lu5-00041E-Bc for qemu-devel@nongnu.org; Fri, 09 Apr 2010 17:38:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0Lu0-0000Tq-L2 for qemu-devel@nongnu.org; Fri, 09 Apr 2010 17:38:14 -0400 Received: from hall.aurel32.net ([88.191.82.174]:40758) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0Ltz-0000Ta-QN for qemu-devel@nongnu.org; Fri, 09 Apr 2010 17:38:12 -0400 Date: Fri, 9 Apr 2010 21:44:01 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] Fix cross compilation Message-ID: <20100409194401.GE21042@volta.aurel32.net> References: <1269769445-7350-1-git-send-email-weil@mail.berlios.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1269769445-7350-1-git-send-email-weil@mail.berlios.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: QEMU Developers On Sun, Mar 28, 2010 at 11:44:05AM +0200, Stefan Weil wrote: > 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) Why a different order for cross-compilation than for native compilation? I would expect the same order in both case, that is pkg-config first, and then sdl_config. The general rule, not specific to QEMU, is to prefer pkg-config over *config programs. > 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 > -- > 1.7.0 > > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net