summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-03-02 08:36:19 +0000
committerRoy Marples <roy@marples.name>2014-03-02 08:36:19 +0000
commitef3e8195fede5e6cb98b7fb0b233dcaa628cd7cc (patch)
treeed8664f5fb666d177d51153d88885acc39cc4bea /configure
parent91bf55879b49e589181e10ed105e455c2fc84f90 (diff)
downloaddhcpcd-ef3e8195fede5e6cb98b7fb0b233dcaa628cd7cc.tar.xz
Work better with autoconf build host
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 9 insertions, 9 deletions
diff --git a/configure b/configure
index cc9ceab1..e1d7c197 100755
--- a/configure
+++ b/configure
@@ -183,7 +183,8 @@ CONFIG_H=config.h
CONFIG_MK=config.mk
if [ -z "$BUILD" ]; then
- BUILD=`uname -m`-`uname -s | tr '[:upper:]' '[:lower:]'`
+ # autoconf target triplet: cpu-vendor-os
+ BUILD=$(uname -m)-unknown-$(uname -s | tr '[:upper:]' '[:lower:]')
fi
if [ -z "$HOST" ]; then
[ -z "$TARGET" ] && TARGET=$BUILD
@@ -203,27 +204,26 @@ if [ -z "$OS" ]; then
fi
if [ -z "$OS" ]; then
- # Derive OS from cpu-manufacturer-os-kernel
+ # Derive OS from cpu-vendor-os-kernel
CPU=${TARGET%%-*}
REST=${TARGET#*-}
if [ "$CPU" != "$REST" ]; then
- MANU=${REST%%-*}
+ VENDOR=${REST%%-*}
REST=${REST#*-}
- if [ "$MANU" != "$REST" ]; then
+ if [ "$VENDOR" != "$REST" ]; then
OS=${REST%%-*}
REST=${REST#*-}
if [ "$OS" != "$REST" ]; then
+ # 4 tupple
KERNEL=${REST%%-*}
else
# 3 tupple
- KERNEL=$OS
- OS=$MANU
- MANU=
+ KERNEL=
fi
else
# 2 tupple
- OS=$MANU
- MANU=
+ OS=$VENDOR
+ VENDOR=
fi
fi
fi