summaryrefslogtreecommitdiff
path: root/tools/configure
diff options
context:
space:
mode:
Diffstat (limited to 'tools/configure')
-rwxr-xr-xtools/configure37
1 files changed, 21 insertions, 16 deletions
diff --git a/tools/configure b/tools/configure
index d9324fdb82..755c04c159 100755
--- a/tools/configure
+++ b/tools/configure
@@ -147,26 +147,30 @@ findtool(){
147# scan the $PATH for sdl-config - check whether for a (cross-)win32 147# scan the $PATH for sdl-config - check whether for a (cross-)win32
148# sdl as requested 148# sdl as requested
149findsdl(){ 149findsdl(){
150 file="sdl-config" 150 # sdl-config might (not) be prefixed for cross compiles so try both.
151 files="sdl-config:${CROSS}sdl-config"
151 winbuild="$1" 152 winbuild="$1"
152 153
153 IFS=":" 154 IFS=":"
154 for path in $PATH 155 for file in $files
155 do 156 do
156 #echo "checks for $file in $path" >&2 157 for path in $PATH
157 if test -f "$path/$file"; then 158 do
158 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then 159 #echo "checks for $file in $path" >&2
159 if [ "yes" = "${winbuild}" ]; then 160 if test -f "$path/$file"; then
160 echo "$path/$file" 161 if [ "0" != `$path/$file --libs |grep -c mwindows` ]; then
161 return 162 if [ "yes" = "${winbuild}" ]; then
162 fi 163 echo "$path/$file"
163 else 164 return
164 if [ "yes" != "${winbuild}" ]; then 165 fi
165 echo "$path/$file" 166 else
166 return 167 if [ "yes" != "${winbuild}" ]; then
168 echo "$path/$file"
169 return
170 fi
167 fi 171 fi
168 fi 172 fi
169 fi 173 done
170 done 174 done
171} 175}
172 176
@@ -233,6 +237,7 @@ simcc () {
233 LDOPTS="$LDOPTS -mconsole" 237 LDOPTS="$LDOPTS -mconsole"
234 output="$output.exe" 238 output="$output.exe"
235 winbuild="yes" 239 winbuild="yes"
240 CROSS=${CROSS:-"i586-mingw32msvc-"}
236 SHARED_CFLAGS='' 241 SHARED_CFLAGS=''
237 else 242 else
238 case $uname in 243 case $uname in
@@ -360,7 +365,7 @@ EOF
360 else 365 else
361 # We are crosscompiling 366 # We are crosscompiling
362 # add cross-compiler option(s) 367 # add cross-compiler option(s)
363 prefixtools i586-mingw32msvc- 368 prefixtools $CROSS
364 LDOPTS="$LDOPTS -mconsole" 369 LDOPTS="$LDOPTS -mconsole"
365 fibers=`check_fiber` 370 fibers=`check_fiber`
366 output="rockboxui.exe" 371 output="rockboxui.exe"
@@ -3445,7 +3450,7 @@ else
3445 ""|"$CROSS_COMPILE") 3450 ""|"$CROSS_COMPILE")
3446 # simulator 3451 # simulator
3447 ;; 3452 ;;
3448 i586-mingw32msvc-) 3453 ${CROSS})
3449 # cross-compile for win32 3454 # cross-compile for win32
3450 ;; 3455 ;;
3451 *) 3456 *)