summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/configure13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/configure b/tools/configure
index 505598f..7c41a0b 100755
--- a/tools/configure
+++ b/tools/configure
@@ -97,7 +97,7 @@ findsdl(){
simcc () {
# default tool setup for native building
- prefixtools ""
+ prefixtools "$CROSS_COMPILE"
simver=sdl
winbuild="$crosscompile"
@@ -204,7 +204,10 @@ EOF
$CC -o $tmpdir/conftest-$id $tmpdir/conftest-$id.c 2>/dev/null
- if test `$tmpdir/conftest-$id 2>/dev/null` -gt "1"; then
+ # when cross compiling, the endianess cannot be detected because the above program doesn't run
+ # on the local machine. assume little endian but print a warning
+ endian=`$tmpdir/conftest-$id 2> /dev/null`
+ if [ "$endian" != "" ] && [ $endian -gt "1" ]; then
# big endian
endian="big"
else
@@ -212,6 +215,10 @@ EOF
endian="little"
fi
+ if [ "$CROSS_COMPILE" != "" ]; then
+ echo "WARNING: Cross Compiling, cannot detect endianess. Assuming little endian!"
+ fi
+
if [ $1 = "sdl" ]; then
echo "Simulator environment deemed $endian endian"
elif [ $1 = "checkwps" ]; then
@@ -2841,7 +2848,7 @@ else
fi
case $prefix in
- "")
+ ""|"$CROSS_COMPILE")
# simulator
;;
i586-mingw32msvc-)