]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Work better with autoconf build host
authorRoy Marples <roy@marples.name>
Sun, 2 Mar 2014 08:36:19 +0000 (08:36 +0000)
committerRoy Marples <roy@marples.name>
Sun, 2 Mar 2014 08:36:19 +0000 (08:36 +0000)
configure

index cc9ceab1909078ff6c19c56f4656e8202397c1fd..e1d7c197d6e82402931418cf9bde6b82961fdcde 100755 (executable)
--- 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