~ubuntu-branches/ubuntu/trusty/sound-juicer/trusty

« back to all changes in this revision

Viewing changes to config.guess

  • Committer: Bazaar Package Importer
  • Author(s): Bilal Akhtar
  • Date: 2010-08-20 14:02:25 UTC
  • mfrom: (1.1.44 upstream)
  • Revision ID: james.westby@ubuntu.com-20100820140225-cj8w9u6uj4ml19or
Tags: 2.31.6-0ubuntu1
New upstream release. (LP: #621065)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
# Attempt to guess a canonical system name.
3
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
 
#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 
4
#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5
5
#   Free Software Foundation, Inc.
6
6
 
7
 
timestamp='2009-04-27'
 
7
timestamp='2009-11-20'
8
8
 
9
9
# This file is free software; you can redistribute it and/or modify it
10
10
# under the terms of the GNU General Public License as published by
27
27
# the same distribution terms that you use for the rest of that program.
28
28
 
29
29
 
30
 
# Originally written by Per Bothner <per@bothner.com>.
31
 
# Please send patches to <config-patches@gnu.org>.  Submit a context
32
 
# diff and a properly formatted ChangeLog entry.
 
30
# Originally written by Per Bothner.  Please send patches (context
 
31
# diff format) to <config-patches@gnu.org> and include a ChangeLog
 
32
# entry.
33
33
#
34
34
# This script attempts to guess a canonical system name similar to
35
35
# config.sub.  If it succeeds, it prints the system name on stdout, and
36
36
# exits with 0.  Otherwise, it exits with 1.
37
37
#
38
 
# The plan is that this can be called by configure scripts if you
39
 
# don't specify an explicit build system type.
 
38
# You can get the latest version of this script from:
 
39
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
40
40
 
41
41
me=`echo "$0" | sed -e 's,.*/,,'`
42
42
 
139
139
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
140
140
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
141
141
 
 
142
case "${UNAME_MACHINE}" in
 
143
    i?86)
 
144
        test -z "$VENDOR" && VENDOR=pc
 
145
        ;;
 
146
    *)
 
147
        test -z "$VENDOR" && VENDOR=unknown
 
148
        ;;
 
149
esac
 
150
test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
 
151
 
142
152
# Note: order is significant - the case branches are not exclusive.
143
153
 
144
154
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
170
180
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
171
181
                eval $set_cc_for_build
172
182
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
173
 
                        | grep __ELF__ >/dev/null
 
183
                        | grep -q __ELF__
174
184
                then
175
185
                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
176
186
                    # Return netbsd for either.  FIX?
203
213
        exit ;;
204
214
    *:OpenBSD:*:*)
205
215
        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
206
 
        echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
 
216
        echo ${UNAME_MACHINE_ARCH}-${VENDOR}-openbsd${UNAME_RELEASE}
207
217
        exit ;;
208
218
    *:ekkoBSD:*:*)
209
 
        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
 
219
        echo ${UNAME_MACHINE}-${VENDOR}-ekkobsd${UNAME_RELEASE}
210
220
        exit ;;
211
221
    *:SolidBSD:*:*)
212
 
        echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
 
222
        echo ${UNAME_MACHINE}-${VENDOR}-solidbsd${UNAME_RELEASE}
213
223
        exit ;;
214
224
    macppc:MirBSD:*:*)
215
 
        echo powerpc-unknown-mirbsd${UNAME_RELEASE}
 
225
        echo powerpc-${VENDOR}-mirbsd${UNAME_RELEASE}
216
226
        exit ;;
217
227
    *:MirBSD:*:*)
218
 
        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
 
228
        echo ${UNAME_MACHINE}-${VENDOR}-mirbsd${UNAME_RELEASE}
219
229
        exit ;;
220
230
    alpha:OSF1:*:*)
221
231
        case $UNAME_RELEASE in
280
290
        echo alpha-dec-winnt3.5
281
291
        exit ;;
282
292
    Amiga*:UNIX_System_V:4.0:*)
283
 
        echo m68k-unknown-sysv4
 
293
        echo m68k-${VENDOR}-sysv4
284
294
        exit ;;
285
295
    *:[Aa]miga[Oo][Ss]:*:*)
286
 
        echo ${UNAME_MACHINE}-unknown-amigaos
 
296
        echo ${UNAME_MACHINE}-${VENDOR}-amigaos
287
297
        exit ;;
288
298
    *:[Mm]orph[Oo][Ss]:*:*)
289
 
        echo ${UNAME_MACHINE}-unknown-morphos
 
299
        echo ${UNAME_MACHINE}-${VENDOR}-morphos
290
300
        exit ;;
291
301
    *:OS/390:*:*)
292
302
        echo i370-ibm-openedition
301
311
        echo arm-acorn-riscix${UNAME_RELEASE}
302
312
        exit ;;
303
313
    arm:riscos:*:*|arm:RISCOS:*:*)
304
 
        echo arm-unknown-riscos
 
314
        echo arm-${VENDOR}-riscos
305
315
        exit ;;
306
316
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
307
317
        echo hppa1.1-hitachi-hiuxmpp
333
343
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
334
344
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335
345
        exit ;;
 
346
    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
 
347
        echo i386-pc-auroraux${UNAME_RELEASE}
 
348
        exit ;;
336
349
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
337
350
        eval $set_cc_for_build
338
351
        SUN_ARCH="i386"
406
419
        echo m68k-hades-mint${UNAME_RELEASE}
407
420
        exit ;;
408
421
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
409
 
        echo m68k-unknown-mint${UNAME_RELEASE}
 
422
        echo m68k-${VENDOR}-mint${UNAME_RELEASE}
410
423
        exit ;;
411
424
    m68k:machten:*:*)
412
425
        echo m68k-apple-machten${UNAME_RELEASE}
656
669
            # => hppa64-hp-hpux11.23
657
670
 
658
671
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
659
 
                grep __LP64__ >/dev/null
 
672
                grep -q __LP64__
660
673
            then
661
674
                HP_ARCH="hppa2.0w"
662
675
            else
717
730
        exit ;;
718
731
    i*86:OSF1:*:*)
719
732
        if [ -x /usr/sbin/sysversion ] ; then
720
 
            echo ${UNAME_MACHINE}-unknown-osf1mk
 
733
            echo ${UNAME_MACHINE}-${VENDOR}-osf1mk
721
734
        else
722
 
            echo ${UNAME_MACHINE}-unknown-osf1
 
735
            echo ${UNAME_MACHINE}-${VENDOR}-osf1
723
736
        fi
724
737
        exit ;;
725
738
    parisc*:Lites*:*:*)
779
792
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
780
793
        exit ;;
781
794
    sparc*:BSD/OS:*:*)
782
 
        echo sparc-unknown-bsdi${UNAME_RELEASE}
 
795
        echo sparc-${VENDOR}-bsdi${UNAME_RELEASE}
783
796
        exit ;;
784
797
    *:BSD/OS:*:*)
785
 
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
 
798
        echo ${UNAME_MACHINE}-${VENDOR}-bsdi${UNAME_RELEASE}
786
799
        exit ;;
787
800
    *:FreeBSD:*:*)
788
801
        case ${UNAME_MACHINE} in
789
802
            pc98)
790
 
                echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 
803
                echo i386-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
791
804
            amd64)
792
 
                echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 
805
                echo x86_64-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
793
806
            *)
794
 
                echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 
807
                echo ${UNAME_MACHINE}-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
795
808
        esac
796
809
        exit ;;
797
810
    i*:CYGWIN*:*)
807
820
    i*:PW*:*)
808
821
        echo ${UNAME_MACHINE}-pc-pw32
809
822
        exit ;;
810
 
    *:Interix*:[3456]*)
 
823
    *:Interix*:*)
811
824
        case ${UNAME_MACHINE} in
812
825
            x86)
813
826
                echo i586-pc-interix${UNAME_RELEASE}
814
827
                exit ;;
815
 
            EM64T | authenticamd | genuineintel)
816
 
                echo x86_64-unknown-interix${UNAME_RELEASE}
 
828
            authenticamd | genuineintel | EM64T)
 
829
                echo x86_64-${VENDOR}-interix${UNAME_RELEASE}
817
830
                exit ;;
818
831
            IA64)
819
 
                echo ia64-unknown-interix${UNAME_RELEASE}
 
832
                echo ia64-${VENDOR}-interix${UNAME_RELEASE}
820
833
                exit ;;
821
834
        esac ;;
822
835
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
823
836
        echo i${UNAME_MACHINE}-pc-mks
824
837
        exit ;;
 
838
    8664:Windows_NT:*)
 
839
        echo x86_64-pc-mks
 
840
        exit ;;
825
841
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
826
842
        # How do we know it's Interix rather than the generic POSIX subsystem?
827
843
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
832
848
        echo ${UNAME_MACHINE}-pc-uwin
833
849
        exit ;;
834
850
    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
835
 
        echo x86_64-unknown-cygwin
 
851
        echo x86_64-${VENDOR}-cygwin
836
852
        exit ;;
837
853
    p*:CYGWIN*:*)
838
 
        echo powerpcle-unknown-cygwin
 
854
        echo powerpcle-${VENDOR}-cygwin
839
855
        exit ;;
840
856
    prep*:SunOS:5.*:*)
841
 
        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 
857
        echo powerpcle-${VENDOR}-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
842
858
        exit ;;
843
859
    *:GNU:*:*)
844
860
        # the GNU system
845
 
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 
861
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-${VENDOR}-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
846
862
        exit ;;
847
863
    *:GNU/*:*:*)
848
864
        # other systems with GNU libc and userland
849
 
        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
 
865
        echo ${UNAME_MACHINE}-${VENDOR}-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
850
866
        exit ;;
851
867
    i*86:Minix:*:*)
852
868
        echo ${UNAME_MACHINE}-pc-minix
853
869
        exit ;;
 
870
    alpha:Linux:*:*)
 
871
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 
872
          EV5)   UNAME_MACHINE=alphaev5 ;;
 
873
          EV56)  UNAME_MACHINE=alphaev56 ;;
 
874
          PCA56) UNAME_MACHINE=alphapca56 ;;
 
875
          PCA57) UNAME_MACHINE=alphapca56 ;;
 
876
          EV6)   UNAME_MACHINE=alphaev6 ;;
 
877
          EV67)  UNAME_MACHINE=alphaev67 ;;
 
878
          EV68*) UNAME_MACHINE=alphaev68 ;;
 
879
        esac
 
880
        objdump --private-headers /bin/sh | grep -q ld.so.1
 
881
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
 
882
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu${LIBC}
 
883
        exit ;;
854
884
    arm*:Linux:*:*)
855
885
        eval $set_cc_for_build
856
886
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
857
887
            | grep -q __ARM_EABI__
858
888
        then
859
 
            echo ${UNAME_MACHINE}-unknown-linux-gnu
 
889
            echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
860
890
        else
861
 
            echo ${UNAME_MACHINE}-unknown-linux-gnueabi
 
891
            echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabi
862
892
        fi
863
893
        exit ;;
864
894
    avr32*:Linux:*:*)
865
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
895
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
866
896
        exit ;;
867
897
    cris:Linux:*:*)
868
898
        echo cris-axis-linux-gnu
871
901
        echo crisv32-axis-linux-gnu
872
902
        exit ;;
873
903
    frv:Linux:*:*)
874
 
        echo frv-unknown-linux-gnu
 
904
        echo frv-${VENDOR}-linux-gnu
 
905
        exit ;;
 
906
    i*86:Linux:*:*)
 
907
        LIBC=gnu
 
908
        eval $set_cc_for_build
 
909
        sed 's/^        //' << EOF >$dummy.c
 
910
        #ifdef __dietlibc__
 
911
        LIBC=dietlibc
 
912
        #endif
 
913
EOF
 
914
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
 
915
        echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}"
875
916
        exit ;;
876
917
    ia64:Linux:*:*)
877
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
918
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
878
919
        exit ;;
879
920
    m32r*:Linux:*:*)
880
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
921
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
881
922
        exit ;;
882
923
    m68*:Linux:*:*)
883
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
924
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
884
925
        exit ;;
885
 
    mips:Linux:*:*)
886
 
        eval $set_cc_for_build
887
 
        sed 's/^        //' << EOF >$dummy.c
888
 
        #undef CPU
889
 
        #undef mips
890
 
        #undef mipsel
891
 
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
892
 
        CPU=mipsel
893
 
        #else
894
 
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
895
 
        CPU=mips
896
 
        #else
897
 
        CPU=
898
 
        #endif
899
 
        #endif
900
 
EOF
901
 
        eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
902
 
            /^CPU/{
903
 
                s: ::g
904
 
                p
905
 
            }'`"
906
 
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
907
 
        ;;
908
 
    mips64:Linux:*:*)
909
 
        eval $set_cc_for_build
910
 
        sed 's/^        //' << EOF >$dummy.c
911
 
        #undef CPU
912
 
        #undef mips64
913
 
        #undef mips64el
914
 
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
915
 
        CPU=mips64el
916
 
        #else
917
 
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
918
 
        CPU=mips64
919
 
        #else
920
 
        CPU=
921
 
        #endif
922
 
        #endif
923
 
EOF
924
 
        eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
925
 
            /^CPU/{
926
 
                s: ::g
927
 
                p
928
 
            }'`"
929
 
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 
926
    mips:Linux:*:* | mips64:Linux:*:*)
 
927
        eval $set_cc_for_build
 
928
        sed 's/^        //' << EOF >$dummy.c
 
929
        #undef CPU
 
930
        #undef ${UNAME_MACHINE}
 
931
        #undef ${UNAME_MACHINE}el
 
932
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
 
933
        CPU=${UNAME_MACHINE}el
 
934
        #else
 
935
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
 
936
        CPU=${UNAME_MACHINE}
 
937
        #else
 
938
        CPU=
 
939
        #endif
 
940
        #endif
 
941
EOF
 
942
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
 
943
        test x"${CPU}" != x && { echo "${CPU}-${VENDOR}-linux-gnu"; exit; }
930
944
        ;;
931
945
    or32:Linux:*:*)
932
 
        echo or32-unknown-linux-gnu
933
 
        exit ;;
934
 
    ppc:Linux:*:*)
935
 
        echo powerpc-unknown-linux-gnu
936
 
        exit ;;
937
 
    ppc64:Linux:*:*)
938
 
        echo powerpc64-unknown-linux-gnu
939
 
        exit ;;
940
 
    alpha:Linux:*:*)
941
 
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
942
 
          EV5)   UNAME_MACHINE=alphaev5 ;;
943
 
          EV56)  UNAME_MACHINE=alphaev56 ;;
944
 
          PCA56) UNAME_MACHINE=alphapca56 ;;
945
 
          PCA57) UNAME_MACHINE=alphapca56 ;;
946
 
          EV6)   UNAME_MACHINE=alphaev6 ;;
947
 
          EV67)  UNAME_MACHINE=alphaev67 ;;
948
 
          EV68*) UNAME_MACHINE=alphaev68 ;;
949
 
        esac
950
 
        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
951
 
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
952
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
 
946
        echo or32-${VENDOR}-linux-gnu
953
947
        exit ;;
954
948
    padre:Linux:*:*)
955
 
        echo sparc-unknown-linux-gnu
 
949
        echo sparc-${VENDOR}-linux-gnu
 
950
        exit ;;
 
951
    parisc64:Linux:*:* | hppa64:Linux:*:*)
 
952
        echo hppa64-${VENDOR}-linux-gnu
956
953
        exit ;;
957
954
    parisc:Linux:*:* | hppa:Linux:*:*)
958
955
        # Look for CPU level
959
956
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
960
 
          PA7*) echo hppa1.1-unknown-linux-gnu ;;
961
 
          PA8*) echo hppa2.0-unknown-linux-gnu ;;
962
 
          *)    echo hppa-unknown-linux-gnu ;;
 
957
          PA7*) echo hppa1.1-${VENDOR}-linux-gnu ;;
 
958
          PA8*) echo hppa2.0-${VENDOR}-linux-gnu ;;
 
959
          *)    echo hppa-${VENDOR}-linux-gnu ;;
963
960
        esac
964
961
        exit ;;
965
 
    parisc64:Linux:*:* | hppa64:Linux:*:*)
966
 
        echo hppa64-unknown-linux-gnu
 
962
    ppc64:Linux:*:*)
 
963
        echo powerpc64-${VENDOR}-linux-gnu
 
964
        exit ;;
 
965
    ppc:Linux:*:*)
 
966
        echo powerpc-${VENDOR}-linux-gnu
967
967
        exit ;;
968
968
    s390:Linux:*:* | s390x:Linux:*:*)
969
969
        echo ${UNAME_MACHINE}-ibm-linux
970
970
        exit ;;
971
971
    sh64*:Linux:*:*)
972
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
972
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
973
973
        exit ;;
974
974
    sh*:Linux:*:*)
975
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
975
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
976
976
        exit ;;
977
977
    sparc:Linux:*:* | sparc64:Linux:*:*)
978
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
978
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
979
979
        exit ;;
980
980
    vax:Linux:*:*)
981
981
        echo ${UNAME_MACHINE}-dec-linux-gnu
982
982
        exit ;;
983
983
    x86_64:Linux:*:*)
984
 
        echo x86_64-unknown-linux-gnu
 
984
        echo x86_64-${VENDOR}-linux-gnu
985
985
        exit ;;
986
986
    xtensa*:Linux:*:*)
987
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
987
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
988
988
        exit ;;
989
 
    i*86:Linux:*:*)
990
 
        # The BFD linker knows what the default object file format is, so
991
 
        # first see if it will tell us. cd to the root directory to prevent
992
 
        # problems with other programs or directories called `ld' in the path.
993
 
        # Set LC_ALL=C to ensure ld outputs messages in English.
994
 
        ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
995
 
                         | sed -ne '/supported targets:/!d
996
 
                                    s/[         ][      ]*/ /g
997
 
                                    s/.*supported targets: *//
998
 
                                    s/ .*//
999
 
                                    p'`
1000
 
        case "$ld_supported_targets" in
1001
 
          elf32-i386)
1002
 
                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
1003
 
                ;;
1004
 
          a.out-i386-linux)
1005
 
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
1006
 
                exit ;;
1007
 
          "")
1008
 
                # Either a pre-BFD a.out linker (linux-gnuoldld) or
1009
 
                # one that does not give us useful --help.
1010
 
                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
1011
 
                exit ;;
1012
 
        esac
1013
 
        # Determine whether the default compiler is a.out or elf
1014
 
        eval $set_cc_for_build
1015
 
        sed 's/^        //' << EOF >$dummy.c
1016
 
        #include <features.h>
1017
 
        #ifdef __ELF__
1018
 
        # ifdef __GLIBC__
1019
 
        #  if __GLIBC__ >= 2
1020
 
        LIBC=gnu
1021
 
        #  else
1022
 
        LIBC=gnulibc1
1023
 
        #  endif
1024
 
        # else
1025
 
        LIBC=gnulibc1
1026
 
        # endif
1027
 
        #else
1028
 
        #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1029
 
        LIBC=gnu
1030
 
        #else
1031
 
        LIBC=gnuaout
1032
 
        #endif
1033
 
        #endif
1034
 
        #ifdef __dietlibc__
1035
 
        LIBC=dietlibc
1036
 
        #endif
1037
 
EOF
1038
 
        eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1039
 
            /^LIBC/{
1040
 
                s: ::g
1041
 
                p
1042
 
            }'`"
1043
 
        test x"${LIBC}" != x && {
1044
 
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1045
 
                exit
1046
 
        }
1047
 
        test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1048
 
        ;;
1049
989
    i*86:DYNIX/ptx:4*:*)
1050
990
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1051
991
        # earlier versions are messed up and put the nodename in both
1066
1006
        echo ${UNAME_MACHINE}-pc-os2-emx
1067
1007
        exit ;;
1068
1008
    i*86:XTS-300:*:STOP)
1069
 
        echo ${UNAME_MACHINE}-unknown-stop
 
1009
        echo ${UNAME_MACHINE}-${VENDOR}-stop
1070
1010
        exit ;;
1071
1011
    i*86:atheos:*:*)
1072
 
        echo ${UNAME_MACHINE}-unknown-atheos
 
1012
        echo ${UNAME_MACHINE}-${VENDOR}-atheos
1073
1013
        exit ;;
1074
1014
    i*86:syllable:*:*)
1075
1015
        echo ${UNAME_MACHINE}-pc-syllable
1076
1016
        exit ;;
1077
 
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1078
 
        echo i386-unknown-lynxos${UNAME_RELEASE}
 
1017
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
 
1018
        echo i386-${VENDOR}-lynxos${UNAME_RELEASE}
1079
1019
        exit ;;
1080
1020
    i*86:*DOS:*:*)
1081
1021
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
1095
1035
            *Pentium)        UNAME_MACHINE=i586 ;;
1096
1036
            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1097
1037
        esac
1098
 
        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
 
1038
        echo ${UNAME_MACHINE}-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1099
1039
        exit ;;
1100
1040
    i*86:*:3.2:*)
1101
1041
        if test -f /usr/options/cb.name; then
1134
1074
        if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1135
1075
          echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1136
1076
        else # Add other i860-SVR4 vendors below as they are discovered.
1137
 
          echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
 
1077
          echo i860-${VENDOR}-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
1138
1078
        fi
1139
1079
        exit ;;
1140
1080
    mini*:CTIX:SYS*5:*)
1171
1111
        /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1172
1112
            && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1173
1113
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1174
 
        echo m68k-unknown-lynxos${UNAME_RELEASE}
 
1114
        echo m68k-${VENDOR}-lynxos${UNAME_RELEASE}
1175
1115
        exit ;;
1176
1116
    mc68030:UNIX_System_V:4.*:*)
1177
1117
        echo m68k-atari-sysv4
1178
1118
        exit ;;
1179
1119
    TSUNAMI:LynxOS:2.*:*)
1180
 
        echo sparc-unknown-lynxos${UNAME_RELEASE}
 
1120
        echo sparc-${VENDOR}-lynxos${UNAME_RELEASE}
1181
1121
        exit ;;
1182
1122
    rs6000:LynxOS:2.*:*)
1183
 
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
 
1123
        echo rs6000-${VENDOR}-lynxos${UNAME_RELEASE}
1184
1124
        exit ;;
1185
 
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1186
 
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
 
1125
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
 
1126
        echo powerpc-${VENDOR}-lynxos${UNAME_RELEASE}
1187
1127
        exit ;;
1188
1128
    SM[BE]S:UNIX_SV:*:*)
1189
1129
        echo mips-dde-sysv${UNAME_RELEASE}
1233
1173
        if [ -d /usr/nec ]; then
1234
1174
                echo mips-nec-sysv${UNAME_RELEASE}
1235
1175
        else
1236
 
                echo mips-unknown-sysv${UNAME_RELEASE}
 
1176
                echo mips-${VENDOR}-sysv${UNAME_RELEASE}
1237
1177
        fi
1238
1178
        exit ;;
1239
1179
    BeBox:BeOS:*:*)     # BeOS running on hardware made by Be, PPC only.
1275
1215
    *:Darwin:*:*)
1276
1216
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1277
1217
        case $UNAME_PROCESSOR in
 
1218
            i386)
 
1219
                eval $set_cc_for_build
 
1220
                if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
 
1221
                  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
 
1222
                      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
 
1223
                      grep IS_64BIT_ARCH >/dev/null
 
1224
                  then
 
1225
                      UNAME_PROCESSOR="x86_64"
 
1226
                  fi
 
1227
                fi ;;
1278
1228
            unknown) UNAME_PROCESSOR=powerpc ;;
1279
1229
        esac
1280
1230
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1314
1264
        else
1315
1265
            UNAME_MACHINE="$cputype"
1316
1266
        fi
1317
 
        echo ${UNAME_MACHINE}-unknown-plan9
 
1267
        echo ${UNAME_MACHINE}-${VENDOR}-plan9
1318
1268
        exit ;;
1319
1269
    *:TOPS-10:*:*)
1320
 
        echo pdp10-unknown-tops10
 
1270
        echo pdp10-${VENDOR}-tops10
1321
1271
        exit ;;
1322
1272
    *:TENEX:*:*)
1323
 
        echo pdp10-unknown-tenex
 
1273
        echo pdp10-${VENDOR}-tenex
1324
1274
        exit ;;
1325
1275
    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1326
1276
        echo pdp10-dec-tops20
1329
1279
        echo pdp10-xkl-tops20
1330
1280
        exit ;;
1331
1281
    *:TOPS-20:*:*)
1332
 
        echo pdp10-unknown-tops20
 
1282
        echo pdp10-${VENDOR}-tops20
1333
1283
        exit ;;
1334
1284
    *:ITS:*:*)
1335
 
        echo pdp10-unknown-its
 
1285
        echo pdp10-${VENDOR}-its
1336
1286
        exit ;;
1337
1287
    SEI:*:*:SEIUX)
1338
1288
        echo mips-sei-seiux${UNAME_RELEASE}
1339
1289
        exit ;;
1340
1290
    *:DragonFly:*:*)
1341
 
        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 
1291
        echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1342
1292
        exit ;;
1343
1293
    *:*VMS:*:*)
1344
1294
        UNAME_MACHINE=`(uname -p) 2>/dev/null`