From: Roy Marples Date: Sun, 2 Mar 2014 08:36:19 +0000 (+0000) Subject: Work better with autoconf build host X-Git-Tag: v6.3.2~48 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ef3e8195fede5e6cb98b7fb0b233dcaa628cd7cc;p=thirdparty%2Fdhcpcd.git Work better with autoconf build host --- 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