~ubuntu-branches/ubuntu/hardy/gnomad2/hardy

« back to all changes in this revision

Viewing changes to config.guess

  • Committer: Bazaar Package Importer
  • Author(s): Shaun Jackman
  • Date: 2005-08-19 16:09:28 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050819160928-l2glu227nh0algdc
Tags: 2.8.0-2
Add a versioned dependency for libnjb-dev (>> 2.2). Closes: #324036.

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 Free Software Foundation, Inc.
 
4
#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
5
5
 
6
 
timestamp='2002-03-20'
 
6
timestamp='2004-11-12'
7
7
 
8
8
# This file is free software; you can redistribute it and/or modify it
9
9
# under the terms of the GNU General Public License as published by
53
53
GNU config.guess ($timestamp)
54
54
 
55
55
Originally written by Per Bothner.
56
 
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 
56
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
57
57
Free Software Foundation, Inc.
58
58
 
59
59
This is free software; see the source for copying conditions.  There is NO
88
88
  exit 1
89
89
fi
90
90
 
91
 
 
92
 
dummy=dummy-$$
93
 
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
94
 
 
95
 
# CC_FOR_BUILD -- compiler used by this script.
 
91
trap 'exit 1' 1 2 15
 
92
 
 
93
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 
94
# compiler to aid in system detection is discouraged as it requires
 
95
# temporary files to be created and, as you can see below, it is a
 
96
# headache to deal with in a portable fashion.
 
97
 
96
98
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
97
99
# use `HOST_CC' if defined, but it is deprecated.
98
100
 
99
 
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
100
 
 ,,)    echo "int dummy(){}" > $dummy.c ;
 
101
# Portable tmp directory creation inspired by the Autoconf team.
 
102
 
 
103
set_cc_for_build='
 
104
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
 
105
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
 
106
: ${TMPDIR=/tmp} ;
 
107
 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
 
108
 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
 
109
 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
 
110
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
 
111
dummy=$tmp/dummy ;
 
112
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
 
113
case $CC_FOR_BUILD,$HOST_CC,$CC in
 
114
 ,,)    echo "int x;" > $dummy.c ;
101
115
        for c in cc gcc c89 c99 ; do
102
 
          ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
103
 
          if test $? = 0 ; then
 
116
          if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
104
117
             CC_FOR_BUILD="$c"; break ;
105
118
          fi ;
106
119
        done ;
107
 
        rm -f $dummy.c $dummy.o $dummy.rel ;
108
120
        if test x"$CC_FOR_BUILD" = x ; then
109
121
          CC_FOR_BUILD=no_compiler_found ;
110
122
        fi
111
123
        ;;
112
124
 ,,*)   CC_FOR_BUILD=$CC ;;
113
125
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
114
 
esac'
 
126
esac ;'
115
127
 
116
128
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
117
129
# (ghazi@noc.rutgers.edu 1994-08-24)
142
154
        UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
143
155
            /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
144
156
        case "${UNAME_MACHINE_ARCH}" in
 
157
            armeb) machine=armeb-unknown ;;
145
158
            arm*) machine=arm-unknown ;;
146
159
            sh3el) machine=shl-unknown ;;
147
160
            sh3eb) machine=sh-unknown ;;
167
180
                ;;
168
181
        esac
169
182
        # The OS release
170
 
        release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 
183
        # Debian GNU/NetBSD machines have a different userland, and
 
184
        # thus, need a distinct triplet. However, they do not need
 
185
        # kernel version information, so it can be replaced with a
 
186
        # suitable tag, in the style of linux-gnu.
 
187
        case "${UNAME_VERSION}" in
 
188
            Debian*)
 
189
                release='-gnu'
 
190
                ;;
 
191
            *)
 
192
                release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 
193
                ;;
 
194
        esac
171
195
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
172
196
        # contains redundant information, the shorter form:
173
197
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
174
198
        echo "${machine}-${os}${release}"
175
199
        exit 0 ;;
 
200
    amd64:OpenBSD:*:*)
 
201
        echo x86_64-unknown-openbsd${UNAME_RELEASE}
 
202
        exit 0 ;;
176
203
    amiga:OpenBSD:*:*)
177
204
        echo m68k-unknown-openbsd${UNAME_RELEASE}
178
205
        exit 0 ;;
179
 
    arc:OpenBSD:*:*)
180
 
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
 
206
    cats:OpenBSD:*:*)
 
207
        echo arm-unknown-openbsd${UNAME_RELEASE}
181
208
        exit 0 ;;
182
209
    hp300:OpenBSD:*:*)
183
210
        echo m68k-unknown-openbsd${UNAME_RELEASE}
184
211
        exit 0 ;;
 
212
    luna88k:OpenBSD:*:*)
 
213
        echo m88k-unknown-openbsd${UNAME_RELEASE}
 
214
        exit 0 ;;
185
215
    mac68k:OpenBSD:*:*)
186
216
        echo m68k-unknown-openbsd${UNAME_RELEASE}
187
217
        exit 0 ;;
197
227
    mvmeppc:OpenBSD:*:*)
198
228
        echo powerpc-unknown-openbsd${UNAME_RELEASE}
199
229
        exit 0 ;;
200
 
    pmax:OpenBSD:*:*)
201
 
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
202
 
        exit 0 ;;
203
230
    sgi:OpenBSD:*:*)
204
 
        echo mipseb-unknown-openbsd${UNAME_RELEASE}
 
231
        echo mips64-unknown-openbsd${UNAME_RELEASE}
205
232
        exit 0 ;;
206
233
    sun3:OpenBSD:*:*)
207
234
        echo m68k-unknown-openbsd${UNAME_RELEASE}
208
235
        exit 0 ;;
209
 
    wgrisc:OpenBSD:*:*)
210
 
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
211
 
        exit 0 ;;
212
236
    *:OpenBSD:*:*)
213
237
        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
214
238
        exit 0 ;;
 
239
    *:ekkoBSD:*:*)
 
240
        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
 
241
        exit 0 ;;
 
242
    macppc:MirBSD:*:*)
 
243
        echo powerppc-unknown-mirbsd${UNAME_RELEASE}
 
244
        exit 0 ;;
 
245
    *:MirBSD:*:*)
 
246
        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
 
247
        exit 0 ;;
215
248
    alpha:OSF1:*:*)
216
 
        if test $UNAME_RELEASE = "V4.0"; then
 
249
        case $UNAME_RELEASE in
 
250
        *4.0)
217
251
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
218
 
        fi
 
252
                ;;
 
253
        *5.*)
 
254
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 
255
                ;;
 
256
        esac
 
257
        # According to Compaq, /usr/sbin/psrinfo has been available on
 
258
        # OSF/1 and Tru64 systems produced since 1995.  I hope that
 
259
        # covers most systems running today.  This code pipes the CPU
 
260
        # types through head -n 1, so we only detect the type of CPU 0.
 
261
        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
 
262
        case "$ALPHA_CPU_TYPE" in
 
263
            "EV4 (21064)")
 
264
                UNAME_MACHINE="alpha" ;;
 
265
            "EV4.5 (21064)")
 
266
                UNAME_MACHINE="alpha" ;;
 
267
            "LCA4 (21066/21068)")
 
268
                UNAME_MACHINE="alpha" ;;
 
269
            "EV5 (21164)")
 
270
                UNAME_MACHINE="alphaev5" ;;
 
271
            "EV5.6 (21164A)")
 
272
                UNAME_MACHINE="alphaev56" ;;
 
273
            "EV5.6 (21164PC)")
 
274
                UNAME_MACHINE="alphapca56" ;;
 
275
            "EV5.7 (21164PC)")
 
276
                UNAME_MACHINE="alphapca57" ;;
 
277
            "EV6 (21264)")
 
278
                UNAME_MACHINE="alphaev6" ;;
 
279
            "EV6.7 (21264A)")
 
280
                UNAME_MACHINE="alphaev67" ;;
 
281
            "EV6.8CB (21264C)")
 
282
                UNAME_MACHINE="alphaev68" ;;
 
283
            "EV6.8AL (21264B)")
 
284
                UNAME_MACHINE="alphaev68" ;;
 
285
            "EV6.8CX (21264D)")
 
286
                UNAME_MACHINE="alphaev68" ;;
 
287
            "EV6.9A (21264/EV69A)")
 
288
                UNAME_MACHINE="alphaev69" ;;
 
289
            "EV7 (21364)")
 
290
                UNAME_MACHINE="alphaev7" ;;
 
291
            "EV7.9 (21364A)")
 
292
                UNAME_MACHINE="alphaev79" ;;
 
293
        esac
 
294
        # A Pn.n version is a patched version.
219
295
        # A Vn.n version is a released version.
220
296
        # A Tn.n version is a released field test version.
221
297
        # A Xn.n version is an unreleased experimental baselevel.
222
298
        # 1.2 uses "1.2" for uname -r.
223
 
        cat <<EOF >$dummy.s
224
 
        .data
225
 
\$Lformat:
226
 
        .byte 37,100,45,37,120,10,0     # "%d-%x\n"
227
 
 
228
 
        .text
229
 
        .globl main
230
 
        .align 4
231
 
        .ent main
232
 
main:
233
 
        .frame \$30,16,\$26,0
234
 
        ldgp \$29,0(\$27)
235
 
        .prologue 1
236
 
        .long 0x47e03d80 # implver \$0
237
 
        lda \$2,-1
238
 
        .long 0x47e20c21 # amask \$2,\$1
239
 
        lda \$16,\$Lformat
240
 
        mov \$0,\$17
241
 
        not \$1,\$18
242
 
        jsr \$26,printf
243
 
        ldgp \$29,0(\$26)
244
 
        mov 0,\$16
245
 
        jsr \$26,exit
246
 
        .end main
247
 
EOF
248
 
        eval $set_cc_for_build
249
 
        $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
250
 
        if test "$?" = 0 ; then
251
 
                case `./$dummy` in
252
 
                        0-0)
253
 
                                UNAME_MACHINE="alpha"
254
 
                                ;;
255
 
                        1-0)
256
 
                                UNAME_MACHINE="alphaev5"
257
 
                                ;;
258
 
                        1-1)
259
 
                                UNAME_MACHINE="alphaev56"
260
 
                                ;;
261
 
                        1-101)
262
 
                                UNAME_MACHINE="alphapca56"
263
 
                                ;;
264
 
                        2-303)
265
 
                                UNAME_MACHINE="alphaev6"
266
 
                                ;;
267
 
                        2-307)
268
 
                                UNAME_MACHINE="alphaev67"
269
 
                                ;;
270
 
                        2-1307)
271
 
                                UNAME_MACHINE="alphaev68"
272
 
                                ;;
273
 
                esac
274
 
        fi
275
 
        rm -f $dummy.s $dummy
276
 
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 
299
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
277
300
        exit 0 ;;
278
301
    Alpha\ *:Windows_NT*:*)
279
302
        # How do we know it's Interix rather than the generic POSIX subsystem?
296
319
    *:OS/390:*:*)
297
320
        echo i370-ibm-openedition
298
321
        exit 0 ;;
 
322
    *:z/VM:*:*)
 
323
        echo s390-ibm-zvmoe
 
324
        exit 0 ;;
 
325
    *:OS400:*:*)
 
326
        echo powerpc-ibm-os400
 
327
        exit 0 ;;
299
328
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
300
329
        echo arm-acorn-riscix${UNAME_RELEASE}
301
330
        exit 0;;
313
342
    NILE*:*:*:dcosx)
314
343
        echo pyramid-pyramid-svr4
315
344
        exit 0 ;;
 
345
    DRS?6000:unix:4.0:6*)
 
346
        echo sparc-icl-nx6
 
347
        exit 0 ;;
 
348
    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
 
349
        case `/usr/bin/uname -p` in
 
350
            sparc) echo sparc-icl-nx7 && exit 0 ;;
 
351
        esac ;;
316
352
    sun4H:SunOS:5.*:*)
317
353
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
318
354
        exit 0 ;;
381
417
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
382
418
        echo m68k-unknown-mint${UNAME_RELEASE}
383
419
        exit 0 ;;
 
420
    m68k:machten:*:*)
 
421
        echo m68k-apple-machten${UNAME_RELEASE}
 
422
        exit 0 ;;
384
423
    powerpc:machten:*:*)
385
424
        echo powerpc-apple-machten${UNAME_RELEASE}
386
425
        exit 0 ;;
419
458
          exit (-1);
420
459
        }
421
460
EOF
422
 
        $CC_FOR_BUILD $dummy.c -o $dummy \
423
 
          && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
424
 
          && rm -f $dummy.c $dummy && exit 0
425
 
        rm -f $dummy.c $dummy
 
461
        $CC_FOR_BUILD -o $dummy $dummy.c \
 
462
          && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
 
463
          && exit 0
426
464
        echo mips-mips-riscos${UNAME_RELEASE}
427
465
        exit 0 ;;
428
466
    Motorola:PowerMAX_OS:*:*)
429
467
        echo powerpc-motorola-powermax
430
468
        exit 0 ;;
 
469
    Motorola:*:4.3:PL8-*)
 
470
        echo powerpc-harris-powermax
 
471
        exit 0 ;;
 
472
    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
 
473
        echo powerpc-harris-powermax
 
474
        exit 0 ;;
431
475
    Night_Hawk:Power_UNIX:*:*)
432
476
        echo powerpc-harris-powerunix
433
477
        exit 0 ;;
500
544
                        exit(0);
501
545
                        }
502
546
EOF
503
 
                $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
504
 
                rm -f $dummy.c $dummy
 
547
                $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
505
548
                echo rs6000-ibm-aix3.2.5
506
549
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
507
550
                echo rs6000-ibm-aix3.2.4
599
642
                  exit (0);
600
643
              }
601
644
EOF
602
 
                    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
603
 
                    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
604
 
                    rm -f $dummy.c $dummy
 
645
                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 
646
                    test -z "$HP_ARCH" && HP_ARCH=hppa
605
647
                fi ;;
606
648
        esac
 
649
        if [ ${HP_ARCH} = "hppa2.0w" ]
 
650
        then
 
651
            # avoid double evaluation of $set_cc_for_build
 
652
            test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
 
653
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
 
654
            then
 
655
                HP_ARCH="hppa2.0w"
 
656
            else
 
657
                HP_ARCH="hppa64"
 
658
            fi
 
659
        fi
607
660
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
608
661
        exit 0 ;;
609
662
    ia64:HP-UX:*:*)
637
690
          exit (0);
638
691
        }
639
692
EOF
640
 
        $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
641
 
        rm -f $dummy.c $dummy
 
693
        $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
642
694
        echo unknown-hitachi-hiuxwe2
643
695
        exit 0 ;;
644
696
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
696
748
    CRAY*TS:*:*:*)
697
749
        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
698
750
        exit 0 ;;
699
 
    CRAY*T3D:*:*:*)
700
 
        echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
701
 
        exit 0 ;;
702
751
    CRAY*T3E:*:*:*)
703
752
        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
704
753
        exit 0 ;;
705
754
    CRAY*SV1:*:*:*)
706
755
        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
707
756
        exit 0 ;;
 
757
    *:UNICOS/mp:*:*)
 
758
        echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 
759
        exit 0 ;;
708
760
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
709
761
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
710
762
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
711
763
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
712
764
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
713
765
        exit 0 ;;
 
766
    5000:UNIX_System_V:4.*:*)
 
767
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
 
768
        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
 
769
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 
770
        exit 0 ;;
714
771
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
715
772
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
716
773
        exit 0 ;;
732
789
    i*:PW*:*)
733
790
        echo ${UNAME_MACHINE}-pc-pw32
734
791
        exit 0 ;;
735
 
    x86:Interix*:3*)
736
 
        echo i386-pc-interix3
 
792
    x86:Interix*:[34]*)
 
793
        echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
 
794
        exit 0 ;;
 
795
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 
796
        echo i${UNAME_MACHINE}-pc-mks
737
797
        exit 0 ;;
738
798
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
739
799
        # How do we know it's Interix rather than the generic POSIX subsystem?
740
800
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
741
801
        # UNAME_MACHINE based on the output of uname instead of i386?
742
 
        echo i386-pc-interix
 
802
        echo i586-pc-interix
743
803
        exit 0 ;;
744
804
    i*:UWIN*:*)
745
805
        echo ${UNAME_MACHINE}-pc-uwin
751
811
        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
752
812
        exit 0 ;;
753
813
    *:GNU:*:*)
 
814
        # the GNU system
754
815
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
755
816
        exit 0 ;;
 
817
    *:GNU/*:*:*)
 
818
        # other systems with GNU libc and userland
 
819
        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
 
820
        exit 0 ;;
756
821
    i*86:Minix:*:*)
757
822
        echo ${UNAME_MACHINE}-pc-minix
758
823
        exit 0 ;;
759
824
    arm*:Linux:*:*)
760
825
        echo ${UNAME_MACHINE}-unknown-linux-gnu
761
826
        exit 0 ;;
 
827
    cris:Linux:*:*)
 
828
        echo cris-axis-linux-gnu
 
829
        exit 0 ;;
 
830
    crisv32:Linux:*:*)
 
831
        echo crisv32-axis-linux-gnu
 
832
        exit 0 ;;
 
833
    frv:Linux:*:*)
 
834
        echo frv-unknown-linux-gnu
 
835
        exit 0 ;;
762
836
    ia64:Linux:*:*)
763
837
        echo ${UNAME_MACHINE}-unknown-linux-gnu
764
838
        exit 0 ;;
 
839
    m32r*:Linux:*:*)
 
840
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
841
        exit 0 ;;
765
842
    m68*:Linux:*:*)
766
843
        echo ${UNAME_MACHINE}-unknown-linux-gnu
767
844
        exit 0 ;;
782
859
        #endif
783
860
EOF
784
861
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
785
 
        rm -f $dummy.c
786
 
        test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
 
862
        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
 
863
        ;;
 
864
    mips64:Linux:*:*)
 
865
        eval $set_cc_for_build
 
866
        sed 's/^        //' << EOF >$dummy.c
 
867
        #undef CPU
 
868
        #undef mips64
 
869
        #undef mips64el
 
870
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
 
871
        CPU=mips64el
 
872
        #else
 
873
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
 
874
        CPU=mips64
 
875
        #else
 
876
        CPU=
 
877
        #endif
 
878
        #endif
 
879
EOF
 
880
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
 
881
        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
787
882
        ;;
788
883
    ppc:Linux:*:*)
789
884
        echo powerpc-unknown-linux-gnu
819
914
    s390:Linux:*:* | s390x:Linux:*:*)
820
915
        echo ${UNAME_MACHINE}-ibm-linux
821
916
        exit 0 ;;
 
917
    sh64*:Linux:*:*)
 
918
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
919
        exit 0 ;;
822
920
    sh*:Linux:*:*)
823
921
        echo ${UNAME_MACHINE}-unknown-linux-gnu
824
922
        exit 0 ;;
845
943
                ;;
846
944
          a.out-i386-linux)
847
945
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
848
 
                exit 0 ;;               
 
946
                exit 0 ;;
849
947
          coff-i386)
850
948
                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
851
949
                exit 0 ;;
876
974
        LIBC=gnuaout
877
975
        #endif
878
976
        #endif
 
977
        #ifdef __dietlibc__
 
978
        LIBC=dietlibc
 
979
        #endif
879
980
EOF
880
981
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
881
 
        rm -f $dummy.c
882
982
        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
883
983
        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
884
984
        ;;
896
996
        # Use sysv4.2uw... so that sysv4* matches it.
897
997
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
898
998
        exit 0 ;;
 
999
    i*86:OS/2:*:*)
 
1000
        # If we were able to find `uname', then EMX Unix compatibility
 
1001
        # is probably installed.
 
1002
        echo ${UNAME_MACHINE}-pc-os2-emx
 
1003
        exit 0 ;;
 
1004
    i*86:XTS-300:*:STOP)
 
1005
        echo ${UNAME_MACHINE}-unknown-stop
 
1006
        exit 0 ;;
 
1007
    i*86:atheos:*:*)
 
1008
        echo ${UNAME_MACHINE}-unknown-atheos
 
1009
        exit 0 ;;
 
1010
        i*86:syllable:*:*)
 
1011
        echo ${UNAME_MACHINE}-pc-syllable
 
1012
        exit 0 ;;
 
1013
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
 
1014
        echo i386-unknown-lynxos${UNAME_RELEASE}
 
1015
        exit 0 ;;
 
1016
    i*86:*DOS:*:*)
 
1017
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
 
1018
        exit 0 ;;
899
1019
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
900
1020
        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
901
1021
        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
917
1037
                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
918
1038
                echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
919
1039
        elif /bin/uname -X 2>/dev/null >/dev/null ; then
920
 
                UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
921
 
                (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
922
 
                (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
 
1040
                UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
 
1041
                (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
 
1042
                (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
923
1043
                        && UNAME_MACHINE=i586
924
 
                (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
 
1044
                (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
925
1045
                        && UNAME_MACHINE=i686
926
 
                (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
 
1046
                (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
927
1047
                        && UNAME_MACHINE=i686
928
1048
                echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
929
1049
        else
930
1050
                echo ${UNAME_MACHINE}-pc-sysv32
931
1051
        fi
932
1052
        exit 0 ;;
933
 
    i*86:*DOS:*:*)
934
 
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
935
 
        exit 0 ;;
936
1053
    pc:*:*:*)
937
1054
        # Left here for compatibility:
938
1055
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
956
1073
        # "miniframe"
957
1074
        echo m68010-convergent-sysv
958
1075
        exit 0 ;;
959
 
    M68*:*:R3V[567]*:*)
 
1076
    mc68k:UNIX:SYSTEM5:3.51m)
 
1077
        echo m68k-convergent-sysv
 
1078
        exit 0 ;;
 
1079
    M680?0:D-NIX:5.3:*)
 
1080
        echo m68k-diab-dnix
 
1081
        exit 0 ;;
 
1082
    M68*:*:R3V[5678]*:*)
960
1083
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
961
 
    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
 
1084
    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
962
1085
        OS_REL=''
963
1086
        test -r /etc/.relid \
964
1087
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
975
1098
    mc68030:UNIX_System_V:4.*:*)
976
1099
        echo m68k-atari-sysv4
977
1100
        exit 0 ;;
978
 
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
979
 
        echo i386-unknown-lynxos${UNAME_RELEASE}
980
 
        exit 0 ;;
981
1101
    TSUNAMI:LynxOS:2.*:*)
982
1102
        echo sparc-unknown-lynxos${UNAME_RELEASE}
983
1103
        exit 0 ;;
1049
1169
    SX-5:SUPER-UX:*:*)
1050
1170
        echo sx5-nec-superux${UNAME_RELEASE}
1051
1171
        exit 0 ;;
 
1172
    SX-6:SUPER-UX:*:*)
 
1173
        echo sx6-nec-superux${UNAME_RELEASE}
 
1174
        exit 0 ;;
1052
1175
    Power*:Rhapsody:*:*)
1053
1176
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
1054
1177
        exit 0 ;;
1056
1179
        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1057
1180
        exit 0 ;;
1058
1181
    *:Darwin:*:*)
1059
 
        echo `uname -p`-apple-darwin${UNAME_RELEASE}
 
1182
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
 
1183
        case $UNAME_PROCESSOR in
 
1184
            *86) UNAME_PROCESSOR=i686 ;;
 
1185
            unknown) UNAME_PROCESSOR=powerpc ;;
 
1186
        esac
 
1187
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1060
1188
        exit 0 ;;
1061
1189
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1062
1190
        UNAME_PROCESSOR=`uname -p`
1069
1197
    *:QNX:*:4*)
1070
1198
        echo i386-pc-qnx
1071
1199
        exit 0 ;;
1072
 
    NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
 
1200
    NSR-?:NONSTOP_KERNEL:*:*)
1073
1201
        echo nsr-tandem-nsk${UNAME_RELEASE}
1074
1202
        exit 0 ;;
1075
1203
    *:NonStop-UX:*:*)
1092
1220
        fi
1093
1221
        echo ${UNAME_MACHINE}-unknown-plan9
1094
1222
        exit 0 ;;
1095
 
    i*86:OS/2:*:*)
1096
 
        # If we were able to find `uname', then EMX Unix compatibility
1097
 
        # is probably installed.
1098
 
        echo ${UNAME_MACHINE}-pc-os2-emx
1099
 
        exit 0 ;;
1100
1223
    *:TOPS-10:*:*)
1101
1224
        echo pdp10-unknown-tops10
1102
1225
        exit 0 ;;
1115
1238
    *:ITS:*:*)
1116
1239
        echo pdp10-unknown-its
1117
1240
        exit 0 ;;
1118
 
    i*86:XTS-300:*:STOP)
1119
 
        echo ${UNAME_MACHINE}-unknown-stop
1120
 
        exit 0 ;;
1121
 
    i*86:atheos:*:*)
1122
 
        echo ${UNAME_MACHINE}-unknown-atheos
 
1241
    SEI:*:*:SEIUX)
 
1242
        echo mips-sei-seiux${UNAME_RELEASE}
 
1243
        exit 0 ;;
 
1244
    *:DragonFly:*:*)
 
1245
        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 
1246
        exit 0 ;;
 
1247
    *:*VMS:*:*)
 
1248
        UNAME_MACHINE=`(uname -p) 2>/dev/null`
 
1249
        case "${UNAME_MACHINE}" in
 
1250
            A*) echo alpha-dec-vms && exit 0 ;;
 
1251
            I*) echo ia64-dec-vms && exit 0 ;;
 
1252
            V*) echo vax-dec-vms && exit 0 ;;
 
1253
        esac ;;
 
1254
    *:XENIX:*:SysV)
 
1255
        echo i386-pc-xenix
1123
1256
        exit 0 ;;
1124
1257
esac
1125
1258
 
1241
1374
}
1242
1375
EOF
1243
1376
 
1244
 
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
1245
 
rm -f $dummy.c $dummy
 
1377
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
1246
1378
 
1247
1379
# Apollos put the system type in the environment.
1248
1380