From: Stefan Weil <weil@mail.berlios.de>
To: QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] Fix cross compilation
Date: Sun, 28 Mar 2010 11:44:05 +0200 [thread overview]
Message-ID: <1269769445-7350-1-git-send-email-weil@mail.berlios.de> (raw)
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 <weil@mail.berlios.de>
---
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
next reply other threads:[~2010-03-28 9:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-28 9:44 Stefan Weil [this message]
2010-04-09 19:44 ` [Qemu-devel] [PATCH] Fix cross compilation Aurelien Jarno
2010-04-10 7:34 ` Stefan Weil
2010-04-10 15:06 ` Aurelien Jarno
2010-04-10 15:15 ` Stefan Weil
2010-04-11 16:44 ` Stefan Weil
2010-05-08 14:29 ` [Qemu-devel] " Stefan Weil
2010-05-18 17:43 ` [Qemu-devel] " Aurelien Jarno
2010-05-18 20:12 ` Stefan Weil
2010-05-19 6:06 ` Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1269769445-7350-1-git-send-email-weil@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).