~ubuntu-branches/ubuntu/saucy/libxt/saucy

« back to all changes in this revision

Viewing changes to config.guess

  • Committer: Package Import Robot
  • Author(s): Julien Cristau
  • Date: 2013-08-12 19:26:23 UTC
  • mfrom: (4.2.8 sid)
  • Revision ID: package-import@ubuntu.com-20130812192623-yd3n7wpd4119lq0x
Tags: 1:1.1.4-1
* New upstream release.
* Add copyright notice and license from the X Consortium to
  debian/copyright.  Thanks, Ansgar Burchardt!
* Disable silent build rules.

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
 
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
 
#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5
 
#   Free Software Foundation, Inc.
 
3
#   Copyright 1992-2013 Free Software Foundation, Inc.
6
4
 
7
 
timestamp='2010-08-21'
 
5
timestamp='2013-04-24'
8
6
 
9
7
# This file is free software; you can redistribute it and/or modify it
10
8
# under the terms of the GNU General Public License as published by
11
 
# the Free Software Foundation; either version 2 of the License, or
 
9
# the Free Software Foundation; either version 3 of the License, or
12
10
# (at your option) any later version.
13
11
#
14
12
# This program is distributed in the hope that it will be useful, but
17
15
# General Public License for more details.
18
16
#
19
17
# You should have received a copy of the GNU General Public License
20
 
# along with this program; if not, write to the Free Software
21
 
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22
 
# 02110-1301, USA.
 
18
# along with this program; if not, see <http://www.gnu.org/licenses/>.
23
19
#
24
20
# As a special exception to the GNU General Public License, if you
25
21
# distribute this file as part of a program that contains a
26
22
# configuration script generated by Autoconf, you may include it under
27
 
# the same distribution terms that you use for the rest of that program.
28
 
 
29
 
 
30
 
# Originally written by Per Bothner.  Please send patches (context
31
 
# diff format) to <config-patches@gnu.org> and include a ChangeLog
32
 
# entry.
 
23
# the same distribution terms that you use for the rest of that
 
24
# program.  This Exception is an additional permission under section 7
 
25
# of the GNU General Public License, version 3 ("GPLv3").
33
26
#
34
 
# This script attempts to guess a canonical system name similar to
35
 
# config.sub.  If it succeeds, it prints the system name on stdout, and
36
 
# exits with 0.  Otherwise, it exits with 1.
 
27
# Originally written by Per Bothner.
37
28
#
38
29
# You can get the latest version of this script from:
39
30
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
31
#
 
32
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
 
33
 
40
34
 
41
35
me=`echo "$0" | sed -e 's,.*/,,'`
42
36
 
56
50
GNU config.guess ($timestamp)
57
51
 
58
52
Originally written by Per Bothner.
59
 
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
60
 
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
61
 
Software Foundation, Inc.
 
53
Copyright 1992-2013 Free Software Foundation, Inc.
62
54
 
63
55
This is free software; see the source for copying conditions.  There is NO
64
56
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
92
84
  exit 1
93
85
fi
94
86
 
95
 
trap 'exit 1' HUP INT TERM
 
87
trap 'exit 1' 1 2 15
96
88
 
97
89
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
98
90
# compiler to aid in system detection is discouraged as it requires
106
98
 
107
99
set_cc_for_build='
108
100
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
109
 
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
 
101
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
110
102
: ${TMPDIR=/tmp} ;
111
103
 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
112
104
 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
145
137
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
146
138
    *:NetBSD:*:*)
147
139
        # NetBSD (nbsd) targets should (where applicable) match one or
148
 
        # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
 
140
        # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
149
141
        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
150
142
        # switched to ELF, *-*-netbsd* would select the old
151
143
        # object file format.  This provides both forward
181
173
                fi
182
174
                ;;
183
175
            *)
184
 
                os=netbsd
 
176
                os=netbsd
185
177
                ;;
186
178
        esac
187
179
        # The OS release
202
194
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
203
195
        echo "${machine}-${os}${release}"
204
196
        exit ;;
 
197
    *:Bitrig:*:*)
 
198
        UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
 
199
        echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
 
200
        exit ;;
205
201
    *:OpenBSD:*:*)
206
202
        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
207
203
        echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
224
220
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
225
221
                ;;
226
222
        *5.*)
227
 
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 
223
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
228
224
                ;;
229
225
        esac
230
226
        # According to Compaq, /usr/sbin/psrinfo has been available on
270
266
        # A Xn.n version is an unreleased experimental baselevel.
271
267
        # 1.2 uses "1.2" for uname -r.
272
268
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
273
 
        exit ;;
 
269
        # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
 
270
        exitcode=$?
 
271
        trap '' 0
 
272
        exit $exitcode ;;
274
273
    Alpha\ *:Windows_NT*:*)
275
274
        # How do we know it's Interix rather than the generic POSIX subsystem?
276
275
        # Should we change UNAME_MACHINE based on the output of uname instead
296
295
        echo s390-ibm-zvmoe
297
296
        exit ;;
298
297
    *:OS400:*:*)
299
 
        echo powerpc-ibm-os400
 
298
        echo powerpc-ibm-os400
300
299
        exit ;;
301
300
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
302
301
        echo arm-acorn-riscix${UNAME_RELEASE}
303
302
        exit ;;
304
 
    arm:riscos:*:*|arm:RISCOS:*:*)
 
303
    arm*:riscos:*:*|arm*:RISCOS:*:*)
305
304
        echo arm-unknown-riscos
306
305
        exit ;;
307
306
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
395
394
    # MiNT.  But MiNT is downward compatible to TOS, so this should
396
395
    # be no problem.
397
396
    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
398
 
        echo m68k-atari-mint${UNAME_RELEASE}
 
397
        echo m68k-atari-mint${UNAME_RELEASE}
399
398
        exit ;;
400
399
    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
401
400
        echo m68k-atari-mint${UNAME_RELEASE}
402
 
        exit ;;
 
401
        exit ;;
403
402
    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
404
 
        echo m68k-atari-mint${UNAME_RELEASE}
 
403
        echo m68k-atari-mint${UNAME_RELEASE}
405
404
        exit ;;
406
405
    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
407
 
        echo m68k-milan-mint${UNAME_RELEASE}
408
 
        exit ;;
 
406
        echo m68k-milan-mint${UNAME_RELEASE}
 
407
        exit ;;
409
408
    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
410
 
        echo m68k-hades-mint${UNAME_RELEASE}
411
 
        exit ;;
 
409
        echo m68k-hades-mint${UNAME_RELEASE}
 
410
        exit ;;
412
411
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
413
 
        echo m68k-unknown-mint${UNAME_RELEASE}
414
 
        exit ;;
 
412
        echo m68k-unknown-mint${UNAME_RELEASE}
 
413
        exit ;;
415
414
    m68k:machten:*:*)
416
415
        echo m68k-apple-machten${UNAME_RELEASE}
417
416
        exit ;;
481
480
        echo m88k-motorola-sysv3
482
481
        exit ;;
483
482
    AViiON:dgux:*:*)
484
 
        # DG/UX returns AViiON for all architectures
485
 
        UNAME_PROCESSOR=`/usr/bin/uname -p`
 
483
        # DG/UX returns AViiON for all architectures
 
484
        UNAME_PROCESSOR=`/usr/bin/uname -p`
486
485
        if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
487
486
        then
488
487
            if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
495
494
        else
496
495
            echo i586-dg-dgux${UNAME_RELEASE}
497
496
        fi
498
 
        exit ;;
 
497
        exit ;;
499
498
    M88*:DolphinOS:*:*) # DolphinOS (SVR3)
500
499
        echo m88k-dolphin-sysv3
501
500
        exit ;;
595
594
            9000/[678][0-9][0-9])
596
595
                if [ -x /usr/bin/getconf ]; then
597
596
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
598
 
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
599
 
                    case "${sc_cpu_version}" in
600
 
                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
601
 
                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
602
 
                      532)                      # CPU_PA_RISC2_0
603
 
                        case "${sc_kernel_bits}" in
604
 
                          32) HP_ARCH="hppa2.0n" ;;
605
 
                          64) HP_ARCH="hppa2.0w" ;;
 
597
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
 
598
                    case "${sc_cpu_version}" in
 
599
                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
 
600
                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
 
601
                      532)                      # CPU_PA_RISC2_0
 
602
                        case "${sc_kernel_bits}" in
 
603
                          32) HP_ARCH="hppa2.0n" ;;
 
604
                          64) HP_ARCH="hppa2.0w" ;;
606
605
                          '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
607
 
                        esac ;;
608
 
                    esac
 
606
                        esac ;;
 
607
                    esac
609
608
                fi
610
609
                if [ "${HP_ARCH}" = "" ]; then
611
610
                    eval $set_cc_for_build
612
 
                    sed 's/^              //' << EOF >$dummy.c
613
 
 
614
 
              #define _HPUX_SOURCE
615
 
              #include <stdlib.h>
616
 
              #include <unistd.h>
617
 
 
618
 
              int main ()
619
 
              {
620
 
              #if defined(_SC_KERNEL_BITS)
621
 
                  long bits = sysconf(_SC_KERNEL_BITS);
622
 
              #endif
623
 
                  long cpu  = sysconf (_SC_CPU_VERSION);
624
 
 
625
 
                  switch (cpu)
626
 
                {
627
 
                case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
628
 
                case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
629
 
                case CPU_PA_RISC2_0:
630
 
              #if defined(_SC_KERNEL_BITS)
631
 
                    switch (bits)
632
 
                        {
633
 
                        case 64: puts ("hppa2.0w"); break;
634
 
                        case 32: puts ("hppa2.0n"); break;
635
 
                        default: puts ("hppa2.0"); break;
636
 
                        } break;
637
 
              #else  /* !defined(_SC_KERNEL_BITS) */
638
 
                    puts ("hppa2.0"); break;
639
 
              #endif
640
 
                default: puts ("hppa1.0"); break;
641
 
                }
642
 
                  exit (0);
643
 
              }
 
611
                    sed 's/^            //' << EOF >$dummy.c
 
612
 
 
613
                #define _HPUX_SOURCE
 
614
                #include <stdlib.h>
 
615
                #include <unistd.h>
 
616
 
 
617
                int main ()
 
618
                {
 
619
                #if defined(_SC_KERNEL_BITS)
 
620
                    long bits = sysconf(_SC_KERNEL_BITS);
 
621
                #endif
 
622
                    long cpu  = sysconf (_SC_CPU_VERSION);
 
623
 
 
624
                    switch (cpu)
 
625
                        {
 
626
                        case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
 
627
                        case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
 
628
                        case CPU_PA_RISC2_0:
 
629
                #if defined(_SC_KERNEL_BITS)
 
630
                            switch (bits)
 
631
                                {
 
632
                                case 64: puts ("hppa2.0w"); break;
 
633
                                case 32: puts ("hppa2.0n"); break;
 
634
                                default: puts ("hppa2.0"); break;
 
635
                                } break;
 
636
                #else  /* !defined(_SC_KERNEL_BITS) */
 
637
                            puts ("hppa2.0"); break;
 
638
                #endif
 
639
                        default: puts ("hppa1.0"); break;
 
640
                        }
 
641
                    exit (0);
 
642
                }
644
643
EOF
645
644
                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
646
645
                    test -z "$HP_ARCH" && HP_ARCH=hppa
731
730
        exit ;;
732
731
    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
733
732
        echo c1-convex-bsd
734
 
        exit ;;
 
733
        exit ;;
735
734
    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
736
735
        if getsysinfo -f scalar_acc
737
736
        then echo c32-convex-bsd
738
737
        else echo c2-convex-bsd
739
738
        fi
740
 
        exit ;;
 
739
        exit ;;
741
740
    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
742
741
        echo c34-convex-bsd
743
 
        exit ;;
 
742
        exit ;;
744
743
    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
745
744
        echo c38-convex-bsd
746
 
        exit ;;
 
745
        exit ;;
747
746
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
748
747
        echo c4-convex-bsd
749
 
        exit ;;
 
748
        exit ;;
750
749
    CRAY*Y-MP:*:*:*)
751
750
        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
752
751
        exit ;;
770
769
        exit ;;
771
770
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
772
771
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
773
 
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
774
 
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
775
 
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
776
 
        exit ;;
 
772
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
 
773
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
 
774
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 
775
        exit ;;
777
776
    5000:UNIX_System_V:4.*:*)
778
 
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
779
 
        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
780
 
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 
777
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
 
778
        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
 
779
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
781
780
        exit ;;
782
781
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
783
782
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
789
788
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
790
789
        exit ;;
791
790
    *:FreeBSD:*:*)
792
 
        case ${UNAME_MACHINE} in
793
 
            pc98)
794
 
                echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 
791
        UNAME_PROCESSOR=`/usr/bin/uname -p`
 
792
        case ${UNAME_PROCESSOR} in
795
793
            amd64)
796
794
                echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
797
795
            *)
798
 
                echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 
796
                echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
799
797
        esac
800
798
        exit ;;
801
799
    i*:CYGWIN*:*)
802
800
        echo ${UNAME_MACHINE}-pc-cygwin
803
801
        exit ;;
 
802
    *:MINGW64*:*)
 
803
        echo ${UNAME_MACHINE}-pc-mingw64
 
804
        exit ;;
804
805
    *:MINGW*:*)
805
806
        echo ${UNAME_MACHINE}-pc-mingw32
806
807
        exit ;;
 
808
    i*:MSYS*:*)
 
809
        echo ${UNAME_MACHINE}-pc-msys
 
810
        exit ;;
807
811
    i*:windows32*:*)
808
 
        # uname -m includes "-pc" on this system.
809
 
        echo ${UNAME_MACHINE}-mingw32
 
812
        # uname -m includes "-pc" on this system.
 
813
        echo ${UNAME_MACHINE}-mingw32
810
814
        exit ;;
811
815
    i*:PW*:*)
812
816
        echo ${UNAME_MACHINE}-pc-pw32
813
817
        exit ;;
814
818
    *:Interix*:*)
815
 
        case ${UNAME_MACHINE} in
 
819
        case ${UNAME_MACHINE} in
816
820
            x86)
817
821
                echo i586-pc-interix${UNAME_RELEASE}
818
822
                exit ;;
858
862
    i*86:Minix:*:*)
859
863
        echo ${UNAME_MACHINE}-pc-minix
860
864
        exit ;;
 
865
    aarch64:Linux:*:*)
 
866
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
867
        exit ;;
 
868
    aarch64_be:Linux:*:*)
 
869
        UNAME_MACHINE=aarch64_be
 
870
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
871
        exit ;;
861
872
    alpha:Linux:*:*)
862
873
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
863
874
          EV5)   UNAME_MACHINE=alphaev5 ;;
867
878
          EV6)   UNAME_MACHINE=alphaev6 ;;
868
879
          EV67)  UNAME_MACHINE=alphaev67 ;;
869
880
          EV68*) UNAME_MACHINE=alphaev68 ;;
870
 
        esac
 
881
        esac
871
882
        objdump --private-headers /bin/sh | grep -q ld.so.1
872
883
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
873
884
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
874
885
        exit ;;
 
886
    arc:Linux:*:* | arceb:Linux:*:*)
 
887
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
888
        exit ;;
875
889
    arm*:Linux:*:*)
876
890
        eval $set_cc_for_build
877
891
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
879
893
        then
880
894
            echo ${UNAME_MACHINE}-unknown-linux-gnu
881
895
        else
882
 
            echo ${UNAME_MACHINE}-unknown-linux-gnueabi
 
896
            if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
 
897
                | grep -q __ARM_PCS_VFP
 
898
            then
 
899
                echo ${UNAME_MACHINE}-unknown-linux-gnueabi
 
900
            else
 
901
                echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
 
902
            fi
883
903
        fi
884
904
        exit ;;
885
905
    avr32*:Linux:*:*)
886
906
        echo ${UNAME_MACHINE}-unknown-linux-gnu
887
907
        exit ;;
888
908
    cris:Linux:*:*)
889
 
        echo cris-axis-linux-gnu
 
909
        echo ${UNAME_MACHINE}-axis-linux-gnu
890
910
        exit ;;
891
911
    crisv32:Linux:*:*)
892
 
        echo crisv32-axis-linux-gnu
 
912
        echo ${UNAME_MACHINE}-axis-linux-gnu
893
913
        exit ;;
894
914
    frv:Linux:*:*)
895
 
        echo frv-unknown-linux-gnu
 
915
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
916
        exit ;;
 
917
    hexagon:Linux:*:*)
 
918
        echo ${UNAME_MACHINE}-unknown-linux-gnu
896
919
        exit ;;
897
920
    i*86:Linux:*:*)
898
921
        LIBC=gnu
901
924
        #ifdef __dietlibc__
902
925
        LIBC=dietlibc
903
926
        #endif
 
927
        #else
 
928
        #include <features.h>
 
929
        #ifdef __UCLIBC__
 
930
        LIBC=uclibc
 
931
        #endif
904
932
EOF
905
933
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
906
934
        echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
933
961
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
934
962
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
935
963
        ;;
 
964
    or1k:Linux:*:*)
 
965
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
966
        exit ;;
936
967
    or32:Linux:*:*)
937
 
        echo or32-unknown-linux-gnu
 
968
        echo ${UNAME_MACHINE}-unknown-linux-gnu
938
969
        exit ;;
939
970
    padre:Linux:*:*)
940
971
        echo sparc-unknown-linux-gnu
960
991
        echo ${UNAME_MACHINE}-ibm-linux
961
992
        exit ;;
962
993
    sh64*:Linux:*:*)
963
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
994
        echo ${UNAME_MACHINE}-unknown-linux-gnu
964
995
        exit ;;
965
996
    sh*:Linux:*:*)
966
997
        echo ${UNAME_MACHINE}-unknown-linux-gnu
969
1000
        echo ${UNAME_MACHINE}-unknown-linux-gnu
970
1001
        exit ;;
971
1002
    tile*:Linux:*:*)
972
 
        echo ${UNAME_MACHINE}-tilera-linux-gnu
 
1003
        echo ${UNAME_MACHINE}-unknown-linux-gnu
973
1004
        exit ;;
974
1005
    vax:Linux:*:*)
975
1006
        echo ${UNAME_MACHINE}-dec-linux-gnu
976
1007
        exit ;;
977
1008
    x86_64:Linux:*:*)
978
 
        echo x86_64-unknown-linux-gnu
 
1009
        LIBC=gnu
 
1010
        test -r /lib/libc.so && od -An -S13 /lib/libc.so | grep -q __uClibc_main && LIBC=uclibc
 
1011
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
979
1012
        exit ;;
980
1013
    xtensa*:Linux:*:*)
981
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
1014
        echo ${UNAME_MACHINE}-unknown-linux-gnu
982
1015
        exit ;;
983
1016
    i*86:DYNIX/ptx:4*:*)
984
1017
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
987
1020
        echo i386-sequent-sysv4
988
1021
        exit ;;
989
1022
    i*86:UNIX_SV:4.2MP:2.*)
990
 
        # Unixware is an offshoot of SVR4, but it has its own version
991
 
        # number series starting with 2...
992
 
        # I am not positive that other SVR4 systems won't match this,
 
1023
        # Unixware is an offshoot of SVR4, but it has its own version
 
1024
        # number series starting with 2...
 
1025
        # I am not positive that other SVR4 systems won't match this,
993
1026
        # I just have to hope.  -- rms.
994
 
        # Use sysv4.2uw... so that sysv4* matches it.
 
1027
        # Use sysv4.2uw... so that sysv4* matches it.
995
1028
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
996
1029
        exit ;;
997
1030
    i*86:OS/2:*:*)
1023
1056
        fi
1024
1057
        exit ;;
1025
1058
    i*86:*:5:[678]*)
1026
 
        # UnixWare 7.x, OpenUNIX and OpenServer 6.
 
1059
        # UnixWare 7.x, OpenUNIX and OpenServer 6.
1027
1060
        case `/bin/uname -X | grep "^Machine"` in
1028
1061
            *486*)           UNAME_MACHINE=i486 ;;
1029
1062
            *Pentium)        UNAME_MACHINE=i586 ;;
1051
1084
        exit ;;
1052
1085
    pc:*:*:*)
1053
1086
        # Left here for compatibility:
1054
 
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
1055
 
        # the processor, so we play safe by assuming i586.
 
1087
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
 
1088
        # the processor, so we play safe by assuming i586.
1056
1089
        # Note: whatever this is, it MUST be the same as what config.sub
1057
1090
        # prints for the "djgpp" host, or else GDB configury will decide that
1058
1091
        # this is a cross-build.
1059
1092
        echo i586-pc-msdosdjgpp
1060
 
        exit ;;
 
1093
        exit ;;
1061
1094
    Intel:Mach:3*:*)
1062
1095
        echo i386-pc-mach3
1063
1096
        exit ;;
1092
1125
        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1093
1126
          && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1094
1127
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1095
 
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1096
 
          && { echo i486-ncr-sysv4; exit; } ;;
 
1128
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
 
1129
          && { echo i486-ncr-sysv4; exit; } ;;
1097
1130
    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1098
1131
        OS_REL='.3'
1099
1132
        test -r /etc/.relid \
1136
1169
                echo ns32k-sni-sysv
1137
1170
        fi
1138
1171
        exit ;;
1139
 
    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1140
 
                      # says <Richard.M.Bartel@ccMail.Census.GOV>
1141
 
        echo i586-unisys-sysv4
1142
 
        exit ;;
 
1172
    PENTIUM:*:4.0*:*)   # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
 
1173
                        # says <Richard.M.Bartel@ccMail.Census.GOV>
 
1174
        echo i586-unisys-sysv4
 
1175
        exit ;;
1143
1176
    *:UNIX_System_V:4*:FTX*)
1144
1177
        # From Gerald Hewes <hewes@openmarket.com>.
1145
1178
        # How about differentiating between stratus architectures? -djm
1165
1198
        exit ;;
1166
1199
    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1167
1200
        if [ -d /usr/nec ]; then
1168
 
                echo mips-nec-sysv${UNAME_RELEASE}
 
1201
                echo mips-nec-sysv${UNAME_RELEASE}
1169
1202
        else
1170
 
                echo mips-unknown-sysv${UNAME_RELEASE}
 
1203
                echo mips-unknown-sysv${UNAME_RELEASE}
1171
1204
        fi
1172
 
        exit ;;
 
1205
        exit ;;
1173
1206
    BeBox:BeOS:*:*)     # BeOS running on hardware made by Be, PPC only.
1174
1207
        echo powerpc-be-beos
1175
1208
        exit ;;
1182
1215
    BePC:Haiku:*:*)     # Haiku running on Intel PC compatible.
1183
1216
        echo i586-pc-haiku
1184
1217
        exit ;;
 
1218
    x86_64:Haiku:*:*)
 
1219
        echo x86_64-unknown-haiku
 
1220
        exit ;;
1185
1221
    SX-4:SUPER-UX:*:*)
1186
1222
        echo sx4-nec-superux${UNAME_RELEASE}
1187
1223
        exit ;;
1234
1270
    *:QNX:*:4*)
1235
1271
        echo i386-pc-qnx
1236
1272
        exit ;;
1237
 
    NSE-?:NONSTOP_KERNEL:*:*)
 
1273
    NEO-?:NONSTOP_KERNEL:*:*)
 
1274
        echo neo-tandem-nsk${UNAME_RELEASE}
 
1275
        exit ;;
 
1276
    NSE-*:NONSTOP_KERNEL:*:*)
1238
1277
        echo nse-tandem-nsk${UNAME_RELEASE}
1239
1278
        exit ;;
1240
1279
    NSR-?:NONSTOP_KERNEL:*:*)
1279
1318
        echo pdp10-unknown-its
1280
1319
        exit ;;
1281
1320
    SEI:*:*:SEIUX)
1282
 
        echo mips-sei-seiux${UNAME_RELEASE}
 
1321
        echo mips-sei-seiux${UNAME_RELEASE}
1283
1322
        exit ;;
1284
1323
    *:DragonFly:*:*)
1285
1324
        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1286
1325
        exit ;;
1287
1326
    *:*VMS:*:*)
1288
 
        UNAME_MACHINE=`(uname -p) 2>/dev/null`
 
1327
        UNAME_MACHINE=`(uname -p) 2>/dev/null`
1289
1328
        case "${UNAME_MACHINE}" in
1290
1329
            A*) echo alpha-dec-vms ; exit ;;
1291
1330
            I*) echo ia64-dec-vms ; exit ;;
1303
1342
    i*86:AROS:*:*)
1304
1343
        echo ${UNAME_MACHINE}-pc-aros
1305
1344
        exit ;;
 
1345
    x86_64:VMkernel:*:*)
 
1346
        echo ${UNAME_MACHINE}-unknown-esx
 
1347
        exit ;;
1306
1348
esac
1307
1349
 
1308
 
#echo '(No uname command or uname output not recognized.)' 1>&2
1309
 
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1310
 
 
1311
1350
eval $set_cc_for_build
1312
1351
cat >$dummy.c <<EOF
1313
1352
#ifdef _SEQUENT_
1325
1364
#include <sys/param.h>
1326
1365
  printf ("m68k-sony-newsos%s\n",
1327
1366
#ifdef NEWSOS4
1328
 
          "4"
 
1367
        "4"
1329
1368
#else
1330
 
          ""
 
1369
        ""
1331
1370
#endif
1332
 
         ); exit (0);
 
1371
        ); exit (0);
1333
1372
#endif
1334
1373
#endif
1335
1374