~ubuntu-branches/debian/sid/libwps/sid

« back to all changes in this revision

Viewing changes to .pc/update-config-sub-and-guess/config.guess

  • Committer: Bazaar Package Importer
  • Author(s): Rene Engelhard
  • Date: 2011-05-04 22:02:18 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110504220218-va9i1xbysfsh3p94
Tags: 0.2.2-1
* New upstream release
* remove unused variables in WPS4.cpp and WPS8.cpp (closes: #625387)

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='2008-01-23'
 
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
324
334
        case `/usr/bin/uname -p` in
325
335
            sparc) echo sparc-icl-nx7; exit ;;
326
336
        esac ;;
 
337
    s390x:SunOS:*:*)
 
338
        echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 
339
        exit ;;
327
340
    sun4H:SunOS:5.*:*)
328
341
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
329
342
        exit ;;
330
343
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
331
344
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
332
345
        exit ;;
 
346
    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
 
347
        echo i386-pc-auroraux${UNAME_RELEASE}
 
348
        exit ;;
333
349
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
334
 
        echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 
350
        eval $set_cc_for_build
 
351
        SUN_ARCH="i386"
 
352
        # If there is a compiler, see if it is configured for 64-bit objects.
 
353
        # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
 
354
        # This test works for both compilers.
 
355
        if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
 
356
            if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
 
357
                (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
 
358
                grep IS_64BIT_ARCH >/dev/null
 
359
            then
 
360
                SUN_ARCH="x86_64"
 
361
            fi
 
362
        fi
 
363
        echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335
364
        exit ;;
336
365
    sun4*:SunOS:6*:*)
337
366
        # According to config.sub, this is the proper way to canonicalize
390
419
        echo m68k-hades-mint${UNAME_RELEASE}
391
420
        exit ;;
392
421
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
393
 
        echo m68k-unknown-mint${UNAME_RELEASE}
 
422
        echo m68k-${VENDOR}-mint${UNAME_RELEASE}
394
423
        exit ;;
395
424
    m68k:machten:*:*)
396
425
        echo m68k-apple-machten${UNAME_RELEASE}
640
669
            # => hppa64-hp-hpux11.23
641
670
 
642
671
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
643
 
                grep __LP64__ >/dev/null
 
672
                grep -q __LP64__
644
673
            then
645
674
                HP_ARCH="hppa2.0w"
646
675
            else
701
730
        exit ;;
702
731
    i*86:OSF1:*:*)
703
732
        if [ -x /usr/sbin/sysversion ] ; then
704
 
            echo ${UNAME_MACHINE}-unknown-osf1mk
 
733
            echo ${UNAME_MACHINE}-${VENDOR}-osf1mk
705
734
        else
706
 
            echo ${UNAME_MACHINE}-unknown-osf1
 
735
            echo ${UNAME_MACHINE}-${VENDOR}-osf1
707
736
        fi
708
737
        exit ;;
709
738
    parisc*:Lites*:*:*)
763
792
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
764
793
        exit ;;
765
794
    sparc*:BSD/OS:*:*)
766
 
        echo sparc-unknown-bsdi${UNAME_RELEASE}
 
795
        echo sparc-${VENDOR}-bsdi${UNAME_RELEASE}
767
796
        exit ;;
768
797
    *:BSD/OS:*:*)
769
 
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
 
798
        echo ${UNAME_MACHINE}-${VENDOR}-bsdi${UNAME_RELEASE}
770
799
        exit ;;
771
800
    *:FreeBSD:*:*)
772
801
        case ${UNAME_MACHINE} in
773
802
            pc98)
774
 
                echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 
803
                echo i386-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
775
804
            amd64)
776
 
                echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 
805
                echo x86_64-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
777
806
            *)
778
 
                echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 
807
                echo ${UNAME_MACHINE}-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
779
808
        esac
780
809
        exit ;;
781
810
    i*:CYGWIN*:*)
791
820
    i*:PW*:*)
792
821
        echo ${UNAME_MACHINE}-pc-pw32
793
822
        exit ;;
794
 
    *:Interix*:[3456]*)
 
823
    *:Interix*:*)
795
824
        case ${UNAME_MACHINE} in
796
825
            x86)
797
826
                echo i586-pc-interix${UNAME_RELEASE}
798
827
                exit ;;
799
 
            EM64T | authenticamd)
800
 
                echo x86_64-unknown-interix${UNAME_RELEASE}
 
828
            authenticamd | genuineintel | EM64T)
 
829
                echo x86_64-${VENDOR}-interix${UNAME_RELEASE}
801
830
                exit ;;
802
831
            IA64)
803
 
                echo ia64-unknown-interix${UNAME_RELEASE}
 
832
                echo ia64-${VENDOR}-interix${UNAME_RELEASE}
804
833
                exit ;;
805
834
        esac ;;
806
835
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
807
836
        echo i${UNAME_MACHINE}-pc-mks
808
837
        exit ;;
 
838
    8664:Windows_NT:*)
 
839
        echo x86_64-pc-mks
 
840
        exit ;;
809
841
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
810
842
        # How do we know it's Interix rather than the generic POSIX subsystem?
811
843
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
816
848
        echo ${UNAME_MACHINE}-pc-uwin
817
849
        exit ;;
818
850
    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
819
 
        echo x86_64-unknown-cygwin
 
851
        echo x86_64-${VENDOR}-cygwin
820
852
        exit ;;
821
853
    p*:CYGWIN*:*)
822
 
        echo powerpcle-unknown-cygwin
 
854
        echo powerpcle-${VENDOR}-cygwin
823
855
        exit ;;
824
856
    prep*:SunOS:5.*:*)
825
 
        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 
857
        echo powerpcle-${VENDOR}-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
826
858
        exit ;;
827
859
    *:GNU:*:*)
828
860
        # the GNU system
829
 
        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,/.*$,,'`
830
862
        exit ;;
831
863
    *:GNU/*:*:*)
832
864
        # other systems with GNU libc and userland
833
 
        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
834
866
        exit ;;
835
867
    i*86:Minix:*:*)
836
868
        echo ${UNAME_MACHINE}-pc-minix
837
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 ;;
838
884
    arm*:Linux:*:*)
839
885
        eval $set_cc_for_build
840
886
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
841
887
            | grep -q __ARM_EABI__
842
888
        then
843
 
            echo ${UNAME_MACHINE}-unknown-linux-gnu
 
889
            echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
844
890
        else
845
 
            echo ${UNAME_MACHINE}-unknown-linux-gnueabi
 
891
            echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabi
846
892
        fi
847
893
        exit ;;
848
894
    avr32*:Linux:*:*)
849
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
895
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
850
896
        exit ;;
851
897
    cris:Linux:*:*)
852
898
        echo cris-axis-linux-gnu
855
901
        echo crisv32-axis-linux-gnu
856
902
        exit ;;
857
903
    frv:Linux:*:*)
858
 
        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}"
859
916
        exit ;;
860
917
    ia64:Linux:*:*)
861
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
918
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
862
919
        exit ;;
863
920
    m32r*:Linux:*:*)
864
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
921
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
865
922
        exit ;;
866
923
    m68*:Linux:*:*)
867
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
924
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
868
925
        exit ;;
869
 
    mips:Linux:*:*)
870
 
        eval $set_cc_for_build
871
 
        sed 's/^        //' << EOF >$dummy.c
872
 
        #undef CPU
873
 
        #undef mips
874
 
        #undef mipsel
875
 
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
876
 
        CPU=mipsel
877
 
        #else
878
 
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
879
 
        CPU=mips
880
 
        #else
881
 
        CPU=
882
 
        #endif
883
 
        #endif
884
 
EOF
885
 
        eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
886
 
            /^CPU/{
887
 
                s: ::g
888
 
                p
889
 
            }'`"
890
 
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
891
 
        ;;
892
 
    mips64:Linux:*:*)
893
 
        eval $set_cc_for_build
894
 
        sed 's/^        //' << EOF >$dummy.c
895
 
        #undef CPU
896
 
        #undef mips64
897
 
        #undef mips64el
898
 
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
899
 
        CPU=mips64el
900
 
        #else
901
 
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
902
 
        CPU=mips64
903
 
        #else
904
 
        CPU=
905
 
        #endif
906
 
        #endif
907
 
EOF
908
 
        eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
909
 
            /^CPU/{
910
 
                s: ::g
911
 
                p
912
 
            }'`"
913
 
        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; }
914
944
        ;;
915
945
    or32:Linux:*:*)
916
 
        echo or32-unknown-linux-gnu
917
 
        exit ;;
918
 
    ppc:Linux:*:*)
919
 
        echo powerpc-unknown-linux-gnu
920
 
        exit ;;
921
 
    ppc64:Linux:*:*)
922
 
        echo powerpc64-unknown-linux-gnu
923
 
        exit ;;
924
 
    alpha:Linux:*:*)
925
 
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
926
 
          EV5)   UNAME_MACHINE=alphaev5 ;;
927
 
          EV56)  UNAME_MACHINE=alphaev56 ;;
928
 
          PCA56) UNAME_MACHINE=alphapca56 ;;
929
 
          PCA57) UNAME_MACHINE=alphapca56 ;;
930
 
          EV6)   UNAME_MACHINE=alphaev6 ;;
931
 
          EV67)  UNAME_MACHINE=alphaev67 ;;
932
 
          EV68*) UNAME_MACHINE=alphaev68 ;;
933
 
        esac
934
 
        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
935
 
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
936
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
 
946
        echo or32-${VENDOR}-linux-gnu
 
947
        exit ;;
 
948
    padre:Linux:*:*)
 
949
        echo sparc-${VENDOR}-linux-gnu
 
950
        exit ;;
 
951
    parisc64:Linux:*:* | hppa64:Linux:*:*)
 
952
        echo hppa64-${VENDOR}-linux-gnu
937
953
        exit ;;
938
954
    parisc:Linux:*:* | hppa:Linux:*:*)
939
955
        # Look for CPU level
940
956
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
941
 
          PA7*) echo hppa1.1-unknown-linux-gnu ;;
942
 
          PA8*) echo hppa2.0-unknown-linux-gnu ;;
943
 
          *)    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 ;;
944
960
        esac
945
961
        exit ;;
946
 
    parisc64:Linux:*:* | hppa64:Linux:*:*)
947
 
        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
948
967
        exit ;;
949
968
    s390:Linux:*:* | s390x:Linux:*:*)
950
969
        echo ${UNAME_MACHINE}-ibm-linux
951
970
        exit ;;
952
971
    sh64*:Linux:*:*)
953
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
972
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
954
973
        exit ;;
955
974
    sh*:Linux:*:*)
956
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
975
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
957
976
        exit ;;
958
977
    sparc:Linux:*:* | sparc64:Linux:*:*)
959
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
978
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
960
979
        exit ;;
961
980
    vax:Linux:*:*)
962
981
        echo ${UNAME_MACHINE}-dec-linux-gnu
963
982
        exit ;;
964
983
    x86_64:Linux:*:*)
965
 
        echo x86_64-unknown-linux-gnu
 
984
        echo x86_64-${VENDOR}-linux-gnu
966
985
        exit ;;
967
986
    xtensa*:Linux:*:*)
968
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
987
        echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu
969
988
        exit ;;
970
 
    i*86:Linux:*:*)
971
 
        # The BFD linker knows what the default object file format is, so
972
 
        # first see if it will tell us. cd to the root directory to prevent
973
 
        # problems with other programs or directories called `ld' in the path.
974
 
        # Set LC_ALL=C to ensure ld outputs messages in English.
975
 
        ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
976
 
                         | sed -ne '/supported targets:/!d
977
 
                                    s/[         ][      ]*/ /g
978
 
                                    s/.*supported targets: *//
979
 
                                    s/ .*//
980
 
                                    p'`
981
 
        case "$ld_supported_targets" in
982
 
          elf32-i386)
983
 
                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
984
 
                ;;
985
 
          a.out-i386-linux)
986
 
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
987
 
                exit ;;
988
 
          coff-i386)
989
 
                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
990
 
                exit ;;
991
 
          "")
992
 
                # Either a pre-BFD a.out linker (linux-gnuoldld) or
993
 
                # one that does not give us useful --help.
994
 
                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
995
 
                exit ;;
996
 
        esac
997
 
        # Determine whether the default compiler is a.out or elf
998
 
        eval $set_cc_for_build
999
 
        sed 's/^        //' << EOF >$dummy.c
1000
 
        #include <features.h>
1001
 
        #ifdef __ELF__
1002
 
        # ifdef __GLIBC__
1003
 
        #  if __GLIBC__ >= 2
1004
 
        LIBC=gnu
1005
 
        #  else
1006
 
        LIBC=gnulibc1
1007
 
        #  endif
1008
 
        # else
1009
 
        LIBC=gnulibc1
1010
 
        # endif
1011
 
        #else
1012
 
        #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1013
 
        LIBC=gnu
1014
 
        #else
1015
 
        LIBC=gnuaout
1016
 
        #endif
1017
 
        #endif
1018
 
        #ifdef __dietlibc__
1019
 
        LIBC=dietlibc
1020
 
        #endif
1021
 
EOF
1022
 
        eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1023
 
            /^LIBC/{
1024
 
                s: ::g
1025
 
                p
1026
 
            }'`"
1027
 
        test x"${LIBC}" != x && {
1028
 
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1029
 
                exit
1030
 
        }
1031
 
        test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1032
 
        ;;
1033
989
    i*86:DYNIX/ptx:4*:*)
1034
990
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1035
991
        # earlier versions are messed up and put the nodename in both
1050
1006
        echo ${UNAME_MACHINE}-pc-os2-emx
1051
1007
        exit ;;
1052
1008
    i*86:XTS-300:*:STOP)
1053
 
        echo ${UNAME_MACHINE}-unknown-stop
 
1009
        echo ${UNAME_MACHINE}-${VENDOR}-stop
1054
1010
        exit ;;
1055
1011
    i*86:atheos:*:*)
1056
 
        echo ${UNAME_MACHINE}-unknown-atheos
 
1012
        echo ${UNAME_MACHINE}-${VENDOR}-atheos
1057
1013
        exit ;;
1058
1014
    i*86:syllable:*:*)
1059
1015
        echo ${UNAME_MACHINE}-pc-syllable
1060
1016
        exit ;;
1061
 
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1062
 
        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}
1063
1019
        exit ;;
1064
1020
    i*86:*DOS:*:*)
1065
1021
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
1079
1035
            *Pentium)        UNAME_MACHINE=i586 ;;
1080
1036
            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1081
1037
        esac
1082
 
        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
 
1038
        echo ${UNAME_MACHINE}-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1083
1039
        exit ;;
1084
1040
    i*86:*:3.2:*)
1085
1041
        if test -f /usr/options/cb.name; then
1102
1058
    pc:*:*:*)
1103
1059
        # Left here for compatibility:
1104
1060
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
1105
 
        # the processor, so we play safe by assuming i386.
1106
 
        echo i386-pc-msdosdjgpp
 
1061
        # the processor, so we play safe by assuming i586.
 
1062
        # Note: whatever this is, it MUST be the same as what config.sub
 
1063
        # prints for the "djgpp" host, or else GDB configury will decide that
 
1064
        # this is a cross-build.
 
1065
        echo i586-pc-msdosdjgpp
1107
1066
        exit ;;
1108
1067
    Intel:Mach:3*:*)
1109
1068
        echo i386-pc-mach3
1115
1074
        if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1116
1075
          echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1117
1076
        else # Add other i860-SVR4 vendors below as they are discovered.
1118
 
          echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
 
1077
          echo i860-${VENDOR}-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
1119
1078
        fi
1120
1079
        exit ;;
1121
1080
    mini*:CTIX:SYS*5:*)
1141
1100
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1142
1101
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1143
1102
          && { echo i486-ncr-sysv4; exit; } ;;
 
1103
    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
 
1104
        OS_REL='.3'
 
1105
        test -r /etc/.relid \
 
1106
            && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
 
1107
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
 
1108
            && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
 
1109
        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
 
1110
            && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
 
1111
        /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
 
1112
            && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1144
1113
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1145
 
        echo m68k-unknown-lynxos${UNAME_RELEASE}
 
1114
        echo m68k-${VENDOR}-lynxos${UNAME_RELEASE}
1146
1115
        exit ;;
1147
1116
    mc68030:UNIX_System_V:4.*:*)
1148
1117
        echo m68k-atari-sysv4
1149
1118
        exit ;;
1150
1119
    TSUNAMI:LynxOS:2.*:*)
1151
 
        echo sparc-unknown-lynxos${UNAME_RELEASE}
 
1120
        echo sparc-${VENDOR}-lynxos${UNAME_RELEASE}
1152
1121
        exit ;;
1153
1122
    rs6000:LynxOS:2.*:*)
1154
 
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
 
1123
        echo rs6000-${VENDOR}-lynxos${UNAME_RELEASE}
1155
1124
        exit ;;
1156
 
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1157
 
        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}
1158
1127
        exit ;;
1159
1128
    SM[BE]S:UNIX_SV:*:*)
1160
1129
        echo mips-dde-sysv${UNAME_RELEASE}
1204
1173
        if [ -d /usr/nec ]; then
1205
1174
                echo mips-nec-sysv${UNAME_RELEASE}
1206
1175
        else
1207
 
                echo mips-unknown-sysv${UNAME_RELEASE}
 
1176
                echo mips-${VENDOR}-sysv${UNAME_RELEASE}
1208
1177
        fi
1209
1178
        exit ;;
1210
1179
    BeBox:BeOS:*:*)     # BeOS running on hardware made by Be, PPC only.
1216
1185
    BePC:BeOS:*:*)      # BeOS running on Intel PC compatible.
1217
1186
        echo i586-pc-beos
1218
1187
        exit ;;
 
1188
    BePC:Haiku:*:*)     # Haiku running on Intel PC compatible.
 
1189
        echo i586-pc-haiku
 
1190
        exit ;;
1219
1191
    SX-4:SUPER-UX:*:*)
1220
1192
        echo sx4-nec-superux${UNAME_RELEASE}
1221
1193
        exit ;;
1243
1215
    *:Darwin:*:*)
1244
1216
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1245
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 ;;
1246
1228
            unknown) UNAME_PROCESSOR=powerpc ;;
1247
1229
        esac
1248
1230
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1282
1264
        else
1283
1265
            UNAME_MACHINE="$cputype"
1284
1266
        fi
1285
 
        echo ${UNAME_MACHINE}-unknown-plan9
 
1267
        echo ${UNAME_MACHINE}-${VENDOR}-plan9
1286
1268
        exit ;;
1287
1269
    *:TOPS-10:*:*)
1288
 
        echo pdp10-unknown-tops10
 
1270
        echo pdp10-${VENDOR}-tops10
1289
1271
        exit ;;
1290
1272
    *:TENEX:*:*)
1291
 
        echo pdp10-unknown-tenex
 
1273
        echo pdp10-${VENDOR}-tenex
1292
1274
        exit ;;
1293
1275
    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1294
1276
        echo pdp10-dec-tops20
1297
1279
        echo pdp10-xkl-tops20
1298
1280
        exit ;;
1299
1281
    *:TOPS-20:*:*)
1300
 
        echo pdp10-unknown-tops20
 
1282
        echo pdp10-${VENDOR}-tops20
1301
1283
        exit ;;
1302
1284
    *:ITS:*:*)
1303
 
        echo pdp10-unknown-its
 
1285
        echo pdp10-${VENDOR}-its
1304
1286
        exit ;;
1305
1287
    SEI:*:*:SEIUX)
1306
1288
        echo mips-sei-seiux${UNAME_RELEASE}
1307
1289
        exit ;;
1308
1290
    *:DragonFly:*:*)
1309
 
        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 
1291
        echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1310
1292
        exit ;;
1311
1293
    *:*VMS:*:*)
1312
1294
        UNAME_MACHINE=`(uname -p) 2>/dev/null`
1324
1306
    i*86:rdos:*:*)
1325
1307
        echo ${UNAME_MACHINE}-pc-rdos
1326
1308
        exit ;;
 
1309
    i*86:AROS:*:*)
 
1310
        echo ${UNAME_MACHINE}-pc-aros
 
1311
        exit ;;
1327
1312
esac
1328
1313
 
1329
1314
#echo '(No uname command or uname output not recognized.)' 1>&2