diff options
| author | Roy Marples <roy@marples.name> | 2014-03-02 08:36:19 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2014-03-02 08:36:19 +0000 |
| commit | ef3e8195fede5e6cb98b7fb0b233dcaa628cd7cc (patch) | |
| tree | ed8664f5fb666d177d51153d88885acc39cc4bea /configure | |
| parent | 91bf55879b49e589181e10ed105e455c2fc84f90 (diff) | |
| download | dhcpcd-ef3e8195fede5e6cb98b7fb0b233dcaa628cd7cc.tar.xz | |
Work better with autoconf build host
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -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 |
