summaryrefslogtreecommitdiff
path: root/config.lib
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-02-11 17:39:28 +0000
committertruelight <truelight@openttd.org>2007-02-11 17:39:28 +0000
commitff8a82f749f02853303487ba5d72486df147cb15 (patch)
treed1b4af3a2b9d228061a61fc7c665895be66f78da /config.lib
parent6afa186e7cdc75c21173bd3d60896ce67c1c1899 (diff)
downloadopenttd-ff8a82f749f02853303487ba5d72486df147cb15.tar.xz
(svn r8680) [Configure] -Codechange: allow a bit more flexible code in check_compiler
Diffstat (limited to 'config.lib')
-rw-r--r--config.lib13
1 files changed, 9 insertions, 4 deletions
diff --git a/config.lib b/config.lib
index 4cfa5abf1..aade02ab9 100644
--- a/config.lib
+++ b/config.lib
@@ -899,16 +899,21 @@ check_compiler() {
if [ -n "$3" ]; then
# Check for system
- machine=`$3-$6 $9 2>/dev/null`
+ if [ -z "$6" ]; then
+ compiler="$3"
+ else
+ compiler="$3-$6"
+ fi
+ machine=`eval $compiler $9 2>/dev/null`
ret=$?
- eval "$2=$3-$6"
+ eval "$2=$compiler"
- log 2 "executing $3-$6 $9"
+ log 2 "executing $compiler $9"
log 2 " returned $machine"
log 2 " exit code $ret"
if ( [ -z "$machine" ] && [ "$8" != "3" ] ) || [ "$ret" != "0" ]; then
- log 1 "checking $1... $3-$6 not found"
+ log 1 "checking $1... $compiler not found"
log 1 "I couldn't detect any $6 binary for $3"
exit 1
fi