OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [branches/] [oc/] [gdb-5.0/] [readline/] [support/] [config.guess] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 106 markom
#! /bin/sh
2
# Attempt to guess a canonical system name.
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
4
#
5
# This file is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 2 of the License, or
8
# (at your option) any later version.
9
#
10
# This program is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
# General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, write to the Free Software
17
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
#
19
# As a special exception to the GNU General Public License, if you
20
# distribute this file as part of a program that contains a
21
# configuration script generated by Autoconf, you may include it under
22
# the same distribution terms that you use for the rest of that program.
23
 
24
# Written by Per Bothner .
25
# The master version of this file is at the FSF in /home/gd/gnu/lib.
26
#
27
# This script attempts to guess a canonical system name similar to
28
# config.sub.  If it succeeds, it prints the system name on stdout, and
29
# exits with 0.  Otherwise, it exits with 1.
30
#
31
# The plan is that this can be called by configure scripts if you
32
# don't specify an explicit system type (host/target name).
33
#
34
# Only a few systems have been added to this list; please add others
35
# (but try to keep the structure clean).
36
#
37
 
38
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
39
# (ghazi@noc.rutgers.edu 8/24/94.)
40
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
41
        PATH=$PATH:/.attbin ; export PATH
42
elif (test -f /usr/5bin/uname) >/dev/null 2>&1 ; then
43
        PATH=$PATH:/usr/5bin
44
fi
45
 
46
UNAME=`(uname) 2>/dev/null` || UNAME=unknown
47
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
48
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
49
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
50
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
51
 
52
RELEASE=`expr "$UNAME_RELEASE" : '[^0-9]*\([0-9]*\)'` # 4
53
case "$RELEASE" in
54
"")     RELEASE=0 ;;
55
*)      RELEASE=`expr "$RELEASE" + 0` ;;
56
esac
57
REL_LEVEL=`expr "$UNAME_RELEASE" : '[^0-9]*[0-9]*.\([0-9]*\)'`    # 1
58
REL_SUBLEVEL=`expr "$UNAME_RELEASE" : '[^0-9]*[0-9]*.[0-9]*.\([0-9]*\)'` # 2
59
 
60
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
61
 
62
# Some versions of i386 SVR4.2 make `uname' equivalent to `uname -n', which
63
# is contrary to all other versions of uname
64
if [ -n "$UNAME" ] && [ "$UNAME_S" != "$UNAME" ] && [ "$UNAME_S" = UNIX_SV ]; then
65
        UNAME=UNIX_SV
66
fi
67
 
68
# Note: order is significant - the case branches are not exclusive.
69
 
70
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
71
    # Begin cases added for Bash
72
    alpha:NetBSD:*:*)
73
        echo alpha-dec-netbsd${UNAME_RELEASE}
74
        exit 0 ;;
75
    alpha:OpenBSD:*:*)
76
        echo alpha-dec-openbsd${UNAME_RELEASE}
77
        exit 0 ;;
78
    i?86:NetBSD:*:*)
79
        echo ${UNAME_MACHINE}-pc-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
80
        exit 0 ;;
81
    i?86:OpenBSD:*:*)
82
        echo ${UNAME_MACHINE}-pc-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
83
        exit 0 ;;
84
    i?86:FreeBSD:*:*)
85
        echo ${UNAME_MACHINE}-pc-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
86
        exit 0 ;;
87
    sparc:NetBSD:*:*)
88
        echo sparc-unknown-netbsd${UNAME_RELEASE}
89
        exit 0 ;;
90
    sparc:OpenBSD:*:*)
91
        echo sparc-unknown-openbsd${UNAME_RELEASE}
92
        exit 0 ;;
93
    vax:NetBSD:*:*)
94
        echo vax-dec-netbsd${UNAME_RELEASE}
95
        exit 0 ;;
96
    vax:OpenBSD:*:*)
97
        echo vax-dec-openbsd${UNAME_RELEASE}
98
        exit 0 ;;
99
    mac68k:machten:*:*)
100
        echo mac68k-apple-machten${UNAME_RELEASE}
101
        exit 0 ;;
102
    concurrent*:*:*:*)
103
        if test "`(/bin/universe) 2>/dev/null`" = att ; then
104
                echo concurrent-concurrent-sysv3
105
        else
106
                echo concurrent-concurrent-bsd
107
        fi
108
        exit 0 ;;
109
    ppc*:SunOS:5.*:*)
110
        echo ppc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
111
        exit 0 ;;
112
    sparc:UNIX_SV:4.*:*)
113
        echo sparc-unknown-sysv${UNAME_RELEASE}
114
        exit 0 ;;
115
    mips:UNIX_SV:4.*:*)
116
        echo mips-mips-sysv${UNAME_RELEASE}
117
        exit 0 ;;
118
    mips:OSF*1:*:*)
119
        echo mips-mips-osf1
120
        exit 0 ;;
121
    mips:4.4BSD:*:*)
122
        echo mips-mips-bsd4.4
123
        exit 0 ;;
124
    MIServer-S:SMP_DC.OSx:*:dcosx)
125
        echo mips-pyramid-sysv4
126
        exit 0 ;;
127
    news*:NEWS*:*:*)
128
        echo mips-sony-newsos${UNAME_RELEASE}
129
        exit 0 ;;
130
    i?86:NEXTSTEP:*:*)
131
        echo i386-next-nextstep${RELEASE}
132
        exit 0 ;;
133
    *680?0:NEXTSTEP:*:*)
134
        echo m68k-next-nextstep${RELEASE}
135
        exit 0 ;;
136
    *370:AIX:*:*)
137
        echo ibm370-ibm-aix
138
        exit 0 ;;
139
    ksr1:OSF*1:*:*)
140
        echo ksr1-ksr-osf1
141
        exit 0 ;;
142
    esa:OSF*1:*:* | ESA:OSF*:*:*)
143
        echo esa-ibm-osf1
144
        exit 0 ;;
145
    DNP*:DNIX:*:*)
146
        echo m68k-dnix-sysv
147
        exit 0 ;;
148
    *3b2*:*:*:*)
149
        echo we32k-att-sysv3
150
        exit 0 ;;
151
    *:QNX:*:42*)
152
        echo i386-qssl-qnx`echo ${UNAME_VERSION}`
153
        exit 0 ;;
154
    BeBox:BeOS:*:*)
155
        echo powerpc-be-beos
156
        exit 0 ;;
157
    BeMac:BeOS:*:*)
158
        echo powerpc-apple-beos
159
        exit 0 ;;
160
    BePC:BeOS:*:*)
161
        echo i586-pc-beos
162
        exit 0 ;;
163
    SX-4:SUPER-UX:*:*)
164
        echo sx4-nec-superux${UNAME_RELEASE}
165
        exit 0 ;;
166
    # end cases added for Bash
167
    alpha:OSF1:*:*)
168
        if test $UNAME_RELEASE = "V4.0"; then
169
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
170
        fi
171
        # A Vn.n version is a released version.
172
        # A Tn.n version is a released field test version.
173
        # A Xn.n version is an unreleased experimental baselevel.
174
        # 1.2 uses "1.2" for uname -r.
175
        cat <dummy.s
176
        .globl main
177
        .ent main
178
main:
179
        .frame \$30,0,\$26,0
180
        .prologue 0
181
        .long 0x47e03d80 # implver $0
182
        lda \$2,259
183
        .long 0x47e20c21 # amask $2,$1
184
        srl \$1,8,\$2
185
        sll \$2,2,\$2
186
        sll \$0,3,\$0
187
        addl \$1,\$0,\$0
188
        addl \$2,\$0,\$0
189
        ret \$31,(\$26),1
190
        .end main
191
EOF
192
        ${CC-cc} dummy.s -o dummy 2>/dev/null
193
        if test "$?" = 0 ; then
194
                ./dummy
195
                case "$?" in
196
                        7)
197
                                UNAME_MACHINE="alpha"
198
                                ;;
199
                        15)
200
                                UNAME_MACHINE="alphaev5"
201
                                ;;
202
                        14)
203
                                UNAME_MACHINE="alphaev56"
204
                                ;;
205
                        10)
206
                                UNAME_MACHINE="alphapca56"
207
                                ;;
208
                        16)
209
                                UNAME_MACHINE="alphaev6"
210
                                ;;
211
                esac
212
        fi
213
        rm -f dummy.s dummy
214
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
215
        exit 0 ;;
216
    21064:Windows_NT:50:3)
217
        echo alpha-dec-winnt3.5
218
        exit 0 ;;
219
    Amiga*:UNIX_System_V:4.0:*)
220
        echo m68k-cbm-sysv4
221
        exit 0;;
222
    amiga:NetBSD:*:*)
223
        echo m68k-cbm-netbsd${UNAME_RELEASE}
224
        exit 0 ;;
225
    amiga:OpenBSD:*:*)
226
        echo m68k-cbm-openbsd${UNAME_RELEASE}
227
        exit 0 ;;
228
    *:[Aa]miga[Oo][Ss]:*:*)
229
        echo ${UNAME_MACHINE}-unknown-amigaos
230
        exit 0 ;;
231
    arc64:OpenBSD:*:*)
232
        echo mips64el-unknown-openbsd${UNAME_RELEASE}
233
        exit 0 ;;
234
    arc:OpenBSD:*:*)
235
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
236
        exit 0 ;;
237
    hkmips:OpenBSD:*:*)
238
        echo mips-unknown-openbsd${UNAME_RELEASE}
239
        exit 0 ;;
240
    pmax:OpenBSD:*:*)
241
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
242
        exit 0 ;;
243
    sgi:OpenBSD:*:*)
244
        echo mips-unknown-openbsd${UNAME_RELEASE}
245
        exit 0 ;;
246
    wgrisc:OpenBSD:*:*)
247
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
248
        exit 0 ;;
249
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
250
        echo arm-acorn-riscix${UNAME_RELEASE}
251
        exit 0;;
252
    arm32:NetBSD:*:*)
253
        echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
254
        exit 0 ;;
255
    SR2?01:HI-UX/MPP:*:*)
256
        echo hppa1.1-hitachi-hiuxmpp
257
        exit 0;;
258
    Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
259
        # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
260
        if test "`(/bin/universe) 2>/dev/null`" = att ; then
261
                echo pyramid-pyramid-sysv3
262
        else
263
                echo pyramid-pyramid-bsd
264
        fi
265
        exit 0 ;;
266
    NILE:*:*:dcosx)
267
        echo pyramid-pyramid-svr4
268
        exit 0 ;;
269
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
270
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
271
        exit 0 ;;
272
    i86pc:SunOS:5.*:*)
273
        echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
274
        exit 0 ;;
275
    sun4*:SunOS:6*:*)
276
        # According to config.sub, this is the proper way to canonicalize
277
        # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
278
        # it's likely to be more like Solaris than SunOS4.
279
        echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
280
        exit 0 ;;
281
    sun4*:SunOS:*:*)
282
        case "`/usr/bin/arch -k`" in
283
            Series*|S4*)
284
                UNAME_RELEASE=`uname -v`
285
                ;;
286
        esac
287
        # Japanese Language versions have a version number like `4.1.3-JL'.
288
        echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
289
        exit 0 ;;
290
    sun3*:SunOS:*:*|sun:SunOS:*:*)
291
        echo m68k-sun-sunos${UNAME_RELEASE}
292
        exit 0 ;;
293
    sun*:*:4.2BSD:*)
294
        UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
295
        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
296
        case "`/bin/arch`" in
297
            sun3)
298
                echo m68k-sun-sunos${UNAME_RELEASE}
299
                ;;
300
            sun4)
301
                echo sparc-sun-sunos${UNAME_RELEASE}
302
                ;;
303
        esac
304
        exit 0 ;;
305
    aushp:SunOS:*:*)
306
        echo sparc-auspex-sunos${UNAME_RELEASE}
307
        exit 0 ;;
308
    atari*:NetBSD:*:*)
309
        echo m68k-atari-netbsd${UNAME_RELEASE}
310
        exit 0 ;;
311
    atari*:OpenBSD:*:*)
312
        echo m68k-atari-openbsd${UNAME_RELEASE}
313
        exit 0 ;;
314
    sun3*:NetBSD:*:*)
315
        echo m68k-sun-netbsd${UNAME_RELEASE}
316
        exit 0 ;;
317
    sun3*:OpenBSD:*:*)
318
        echo m68k-sun-openbsd${UNAME_RELEASE}
319
        exit 0 ;;
320
    mac68k:NetBSD:*:*)
321
        echo m68k-apple-netbsd${UNAME_RELEASE}
322
        exit 0 ;;
323
    mac68k:OpenBSD:*:*)
324
        echo m68k-apple-openbsd${UNAME_RELEASE}
325
        exit 0 ;;
326
    mvme68k:OpenBSD:*:*)
327
        echo m68k-unknown-openbsd${UNAME_RELEASE}
328
        exit 0 ;;
329
    mvme88k:OpenBSD:*:*)
330
        echo m88k-unknown-openbsd${UNAME_RELEASE}
331
        exit 0 ;;
332
    Power?Macintosh:Rhapsody:*:*)
333
      echo powerpc-apple-rhapsody${UNAME_RELEASE}
334
      exit 0 ;;
335
    *:Rhapsody:*:*)
336
      echo ${UNAME_MACHINE}-unknown-rhapsody${UNAME_RELEASE}
337
      exit 0 ;;
338
    powerpc:machten:*:*)
339
        echo powerpc-apple-machten${UNAME_RELEASE}
340
        exit 0 ;;
341
    RISC*:Mach:*:*)
342
        echo mips-dec-mach_bsd4.3
343
        exit 0 ;;
344
    RISC*:ULTRIX:*:*)
345
        echo mips-dec-ultrix${UNAME_RELEASE}
346
        exit 0 ;;
347
    VAX*:ULTRIX*:*:*)
348
        echo vax-dec-ultrix${UNAME_RELEASE}
349
        exit 0 ;;
350
    2020:CLIX:*:*)
351
        echo clipper-intergraph-clix${UNAME_RELEASE}
352
        exit 0 ;;
353
    mips:*:*:UMIPS | mips:*:*:RISCos)
354
        sed 's/^        //' << EOF >dummy.c
355
        int main (argc, argv) int argc; char **argv; {
356
        #if defined (host_mips) && defined (MIPSEB)
357
        #if defined (SYSTYPE_SYSV)
358
          printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
359
        #endif
360
        #if defined (SYSTYPE_SVR4)
361
          printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
362
        #endif
363
        #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
364
          printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
365
        #endif
366
        #endif
367
          exit (-1);
368
        }
369
EOF
370
        ${CC-cc} dummy.c -o dummy \
371
          && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
372
          && rm dummy.c dummy && exit 0
373
        rm -f dummy.c dummy
374
        echo mips-mips-riscos${UNAME_RELEASE}
375
        exit 0 ;;
376
    Night_Hawk:Power_UNIX:*:*)
377
        echo powerpc-harris-powerunix
378
        exit 0 ;;
379
    m88k:CX/UX:7*:*)
380
        echo m88k-harris-cxux7
381
        exit 0 ;;
382
    m88k:*:4*:R4*)
383
        echo m88k-motorola-sysv4
384
        exit 0 ;;
385
    m88k:*:3*:R3*)
386
        echo m88k-motorola-sysv3
387
        exit 0 ;;
388
    AViiON:dgux:*:*)
389
        # DG/UX returns AViiON for all architectures
390
        UNAME_PROCESSOR=`/usr/bin/uname -p`
391
        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
392
        if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
393
             -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
394
                echo m88k-dg-dgux${UNAME_RELEASE}
395
        else
396
                echo m88k-dg-dguxbcs${UNAME_RELEASE}
397
        fi
398
        else echo i586-dg-dgux${UNAME_RELEASE}
399
        fi
400
        exit 0 ;;
401
    M88*:DolphinOS:*:*) # DolphinOS (SVR3)
402
        echo m88k-dolphin-sysv3
403
        exit 0 ;;
404
    M88*:*:R3*:*)
405
        # Delta 88k system running SVR3
406
        echo m88k-motorola-sysv3
407
        exit 0 ;;
408
    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
409
        echo m88k-tektronix-sysv3
410
        exit 0 ;;
411
    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
412
        echo m68k-tektronix-bsd
413
        exit 0 ;;
414
    *:IRIX*:*:*)
415
        echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
416
        exit 0 ;;
417
    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
418
        echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
419
        exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
420
    i?86:AIX:*:*)
421
        echo i386-ibm-aix
422
        exit 0 ;;
423
    *:AIX:2:3)
424
        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
425
                sed 's/^                //' << EOF >dummy.c
426
                #include 
427
 
428
                main()
429
                        {
430
                        if (!__power_pc())
431
                                exit(1);
432
                        puts("powerpc-ibm-aix3.2.5");
433
                        exit(0);
434
                        }
435
EOF
436
                ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
437
                rm -f dummy.c dummy
438
                echo rs6000-ibm-aix3.2.5
439
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
440
                echo rs6000-ibm-aix3.2.4
441
        else
442
                echo rs6000-ibm-aix3.2
443
        fi
444
        exit 0 ;;
445
    *:AIX:*:4)
446
        if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
447
                IBM_ARCH=rs6000
448
        else
449
                IBM_ARCH=powerpc
450
        fi
451
        if [ -x /usr/bin/oslevel ] ; then
452
                IBM_REV=`/usr/bin/oslevel`
453
        elif grep bos410 /usr/include/stdio.h >/dev/null 2>&1; then
454
                IBM_REV=4.1
455
        elif grep bos411 /usr/include/stdio.h >/dev/null 2>&1; then
456
                IBM_REV=4.1.1
457
        else
458
                IBM_REV=4.${UNAME_RELEASE}
459
        fi
460
        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
461
        exit 0 ;;
462
    *:AIX:*:*)
463
        echo rs6000-ibm-aix
464
        exit 0 ;;
465
    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
466
        echo romp-ibm-bsd4.4
467
        exit 0 ;;
468
    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
469
        echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
470
        exit 0 ;;                           # report: romp-ibm BSD 4.3
471
    *:BOSX:*:*)
472
        echo rs6000-bull-bosx
473
        exit 0 ;;
474
    DPX/2?00:B.O.S.:*:*)
475
        echo m68k-bull-sysv3
476
        exit 0 ;;
477
    9000/[34]??:4.3bsd:1.*:*)
478
        echo m68k-hp-bsd
479
        exit 0 ;;
480
    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
481
        echo m68k-hp-bsd4.4
482
        exit 0 ;;
483
    9000/[34678]??:HP-UX:*:*)
484
        case "${UNAME_MACHINE}" in
485
            9000/31? )          HP_ARCH=m68000 ;;
486
            9000/[34]?? )       HP_ARCH=m68k ;;
487
            9000/78? | 9000/80[24] | 9000/8[67]1 | 9000/8[78]9 | 9000/893 )
488
                                HP_ARCH=hppa2.0 ;;
489
            9000/7?? | 9000/8?[13679] | 9000/892 )
490
                                HP_ARCH=hppa1.1 ;;
491
            9000/[68]?? )       HP_ARCH=hppa1.0 ;;
492
        esac
493
        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
494
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
495
        exit 0 ;;
496
    3050*:HI-UX:*:*)
497
        sed 's/^        //' << EOF >dummy.c
498
        #include 
499
        int
500
        main ()
501
        {
502
          long cpu = sysconf (_SC_CPU_VERSION);
503
          /* The order matters, because CPU_IS_HP_MC68K erroneously returns
504
             true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
505
             results, however.  */
506
          if (CPU_IS_PA_RISC (cpu))
507
            {
508
              switch (cpu)
509
                {
510
                  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
511
                  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
512
                  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
513
                  default: puts ("hppa-hitachi-hiuxwe2"); break;
514
                }
515
            }
516
          else if (CPU_IS_HP_MC68K (cpu))
517
            puts ("m68k-hitachi-hiuxwe2");
518
          else puts ("unknown-hitachi-hiuxwe2");
519
          exit (0);
520
        }
521
EOF
522
        ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
523
        rm -f dummy.c dummy
524
        echo unknown-hitachi-hiuxwe2
525
        exit 0 ;;
526
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
527
        echo hppa1.1-hp-bsd
528
        exit 0 ;;
529
    9000/8??:4.3bsd:*:*)
530
        echo hppa1.0-hp-bsd
531
        exit 0 ;;
532
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
533
        echo hppa1.1-hp-osf
534
        exit 0 ;;
535
    hp8??:OSF1:*:*)
536
        echo hppa1.0-hp-osf
537
        exit 0 ;;
538
    i?86:OSF1:*:*)
539
        if [ -x /usr/sbin/sysversion ] ; then
540
            echo ${UNAME_MACHINE}-pc-osf1mk
541
        else
542
            echo ${UNAME_MACHINE}-pc-osf1
543
        fi
544
        exit 0 ;;
545
    parisc*:Lites*:*:*)
546
        echo hppa1.1-hp-lites
547
        exit 0 ;;
548
    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
549
        echo c1-convex-bsd
550
        exit 0 ;;
551
    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
552
        if getsysinfo -f scalar_acc
553
        then echo c32-convex-bsd
554
        else echo c2-convex-bsd
555
        fi
556
        exit 0 ;;
557
    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
558
        echo c34-convex-bsd
559
        exit 0 ;;
560
    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
561
        echo c38-convex-bsd
562
        exit 0 ;;
563
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
564
        echo c4-convex-bsd
565
        exit 0 ;;
566
    CRAY*X-MP:*:*:*)
567
        echo xmp-cray-unicos
568
        exit 0 ;;
569
    CRAY*Y-MP:*:*:*)
570
        echo ymp-cray-unicos${UNAME_RELEASE}
571
        exit 0 ;;
572
    CRAY*[A-Z]90:*:*:*)
573
        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
574
        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
575
              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
576
        exit 0 ;;
577
    CRAY*TS:*:*:*)
578
        echo t90-cray-unicos${UNAME_RELEASE}
579
        exit 0 ;;
580
    CRAY-2:*:*:*)
581
        echo cray2-cray-unicos
582
        exit 0 ;;
583
    F300:UNIX_System_V:*:*)
584
        FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
585
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
586
        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
587
        exit 0 ;;
588
    F301:UNIX_System_V:*:*)
589
        echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
590
        exit 0 ;;
591
    hp3[0-9][05]:NetBSD:*:*)
592
        echo m68k-hp-netbsd${UNAME_RELEASE}
593
        exit 0 ;;
594
    hp3[0-9][05]:OpenBSD:*:*)
595
        echo m68k-hp-openbsd${UNAME_RELEASE}
596
        exit 0 ;;
597
    i?86:BSD/386:*:* | *:BSD/OS:*:*)
598
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
599
        exit 0 ;;
600
    *:FreeBSD:*:*)
601
        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
602
        exit 0 ;;
603
    *:NetBSD:*:*)
604
        echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
605
        exit 0 ;;
606
    *:OpenBSD:*:*)
607
        echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
608
        exit 0 ;;
609
    i*:CYGWIN*:*)
610
        echo i386-pc-cygwin32
611
        exit 0 ;;
612
    i*:MINGW*:*)
613
        echo i386-pc-mingw32
614
        exit 0 ;;
615
    p*:CYGWIN*:*)
616
        echo powerpcle-unknown-cygwin32
617
        exit 0 ;;
618
    prep*:SunOS:5.*:*)
619
        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
620
        exit 0 ;;
621
    *:GNU:*:*)
622
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
623
        exit 0 ;;
624
    *:Linux:*:*)
625
        # The BFD linker knows what the default object file format is, so
626
        # first see if it will tell us.
627
        ld_help_string=`ld --help 2>&1`
628
        ld_supported_emulations=`echo $ld_help_string \
629
                         | sed -ne '/supported emulations:/!d
630
                                    s/[         ][      ]*/ /g
631
                                    s/.*supported emulations: *//
632
                                    s/ .*//
633
                                    p'`
634
        case "$ld_supported_emulations" in
635
          i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
636
          i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
637
          sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
638
          m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
639
          elf32ppc)   echo "powerpc-unknown-linux-gnu"              ; exit 0 ;;
640
        esac
641
 
642
        if test "${UNAME_MACHINE}" = "alpha" ; then
643
                sed 's/^        //'  <dummy.s
644
                .globl main
645
                .ent main
646
        main:
647
                .frame \$30,0,\$26,0
648
                .prologue 0
649
                .long 0x47e03d80 # implver $0
650
                lda \$2,259
651
                .long 0x47e20c21 # amask $2,$1
652
                srl \$1,8,\$2
653
                sll \$2,2,\$2
654
                sll \$0,3,\$0
655
                addl \$1,\$0,\$0
656
                addl \$2,\$0,\$0
657
                ret \$31,(\$26),1
658
                .end main
659
EOF
660
                LIBC=""
661
                ${CC-cc} dummy.s -o dummy 2>/dev/null
662
                if test "$?" = 0 ; then
663
                        ./dummy
664
                        case "$?" in
665
                        7)
666
                                UNAME_MACHINE="alpha"
667
                                ;;
668
                        15)
669
                                UNAME_MACHINE="alphaev5"
670
                                ;;
671
                        14)
672
                                UNAME_MACHINE="alphaev56"
673
                                ;;
674
                        10)
675
                                UNAME_MACHINE="alphapca56"
676
                                ;;
677
                        16)
678
                                UNAME_MACHINE="alphaev6"
679
                                ;;
680
                        esac
681
 
682
                        objdump --private-headers dummy | \
683
                          grep ld.so.1 > /dev/null
684
                        if test "$?" = 0 ; then
685
                                LIBC="libc1"
686
                        fi
687
                fi
688
                rm -f dummy.s dummy
689
                echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
690
        elif test "${UNAME_MACHINE}" = "mips" ; then
691
          cat >dummy.c <
692
main(argc, argv)
693
     int argc;
694
     char *argv[];
695
{
696
#ifdef __MIPSEB__
697
  printf ("%s-unknown-linux-gnu\n", argv[1]);
698
#endif
699
#ifdef __MIPSEL__
700
  printf ("%sel-unknown-linux-gnu\n", argv[1]);
701
#endif
702
  return 0;
703
}
704
EOF
705
          ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
706
          rm -f dummy.c dummy
707
        else
708
          # Either a pre-BFD a.out linker (linux-gnuoldld)
709
          # or one that does not give us useful --help.
710
          # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
711
          # If ld does not provide *any* "supported emulations:"
712
          # that means it is gnuoldld.
713
          echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
714
          test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
715
 
716
          case "${UNAME_MACHINE}" in
717
          i?86)
718
            VENDOR=pc;
719
            ;;
720
          *)
721
            VENDOR=unknown;
722
            ;;
723
          esac
724
          # Determine whether the default compiler is a.out or elf
725
          cat >dummy.c <
726
#include 
727
main(argc, argv)
728
     int argc;
729
     char *argv[];
730
{
731
#ifdef __ELF__
732
# ifdef __GLIBC__
733
#  if __GLIBC__ >= 2
734
    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
735
#  else
736
    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
737
#  endif
738
# else
739
   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
740
# endif
741
#else
742
  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
743
#endif
744
  return 0;
745
}
746
EOF
747
          ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
748
          rm -f dummy.c dummy
749
        fi ;;
750
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
751
# are messed up and put the nodename in both sysname and nodename.
752
    i?86:DYNIX/ptx:4*:*)
753
        echo i386-sequent-sysv4
754
        exit 0 ;;
755
# added by chet for bash based on usenet posting from  and
756
# documentation on SCO's web site -- UnixWare 7 (SVR5)
757
    i?86:UnixWare:5*:*)
758
        echo ${UNAME_MACHINE}-pc-sysv5uw${UNAME_VERSION}
759
        exit 0 ;;
760
    i?86:UNIX_SV:4.2MP:2.*)
761
        # Unixware is an offshoot of SVR4, but it has its own version
762
        # number series starting with 2...
763
        # I am not positive that other SVR4 systems won't match this,
764
        # I just have to hope.  -- rms.
765
        # Use sysv4.2uw... so that sysv4* matches it.
766
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
767
        exit 0 ;;
768
    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:* | i?86:UNIX_SV:4.*:*)
769
        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
770
                echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
771
        else
772
                echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
773
        fi
774
        exit 0 ;;
775
    i?86:*:3.2:*)
776
        if test -f /usr/options/cb.name; then
777
                UNAME_REL=`sed -n 's/.*Version //p' 
778
                echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
779
        elif /bin/uname -X 2>/dev/null >/dev/null ; then
780
                UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
781
                (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
782
                (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
783
                        && UNAME_MACHINE=i586
784
                echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
785
        else
786
                echo ${UNAME_MACHINE}-pc-sysv32
787
        fi
788
        exit 0 ;;
789
    pc:*:*:*)
790
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
791
        # the processor, so we play safe by assuming i386.
792
        echo i386-pc-msdosdjgpp
793
        exit 0 ;;
794
    Intel:Mach:3*:*)
795
        echo i386-pc-mach3
796
        exit 0 ;;
797
    paragon:*:*:*)
798
        echo i860-intel-osf1
799
        exit 0 ;;
800
    i860:*:4.*:*) # i860-SVR4
801
        if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
802
          echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
803
        else # Add other i860-SVR4 vendors below as they are discovered.
804
          echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
805
        fi
806
        exit 0 ;;
807
    mini*:CTIX:SYS*5:*)
808
        # "miniframe"
809
        echo m68010-convergent-sysv
810
        exit 0 ;;
811
    M68*:*:R3V[567]*:*)
812
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
813
    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
814
        OS_REL=''
815
        test -r /etc/.relid \
816
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
817
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
818
          && echo i486-ncr-sysv4.3${OS_REL} && exit 0
819
        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
820
          && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
821
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
822
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
823
          && echo i486-ncr-sysv4 && exit 0 ;;
824
    mc68030:UNIX_System_V:4.*:*)
825
        echo m68k-atari-sysv4
826
        exit 0 ;;
827
    m68*:LynxOS:2.*:*)
828
        echo m68k-unknown-lynxos${UNAME_RELEASE}
829
        exit 0 ;;
830
    i?86:LynxOS:2.*:*)
831
        echo i386-pc-lynxos${UNAME_RELEASE}
832
        exit 0 ;;
833
    TSUNAMI:LynxOS:2.*:*)
834
        echo sparc-unknown-lynxos${UNAME_RELEASE}
835
        exit 0 ;;
836
    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
837
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
838
        exit 0 ;;
839
    *:LynxOS:*:*)
840
        echo ${UNAME_MACHINE}-unknown-lynxos${UNAME_RELEASE}
841
        exit 0 ;;
842
    SM[BE]S:UNIX_SV:*:*)
843
        echo mips-dde-sysv${UNAME_RELEASE}
844
        exit 0 ;;
845
    RM*:SINIX-*:*:* | RM*:ReliantUNIX-*:*:*)
846
        echo mips-sni-sysv4
847
        exit 0 ;;
848
    *:SINIX-*:*:*)
849
        if uname -p 2>/dev/null >/dev/null ; then
850
                UNAME_MACHINE=`(uname -p) 2>/dev/null`
851
                echo ${UNAME_MACHINE}-sni-sysv4
852
        else
853
                echo ns32k-sni-sysv
854
        fi
855
        exit 0 ;;
856
    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
857
                           # says 
858
        echo i586-unisys-sysv4
859
        exit 0 ;;
860
    *:UNIX_System_V:4*:FTX*)
861
        # From Gerald Hewes .
862
        # How about differentiating between stratus architectures? -djm
863
        echo hppa1.1-stratus-sysv4
864
        exit 0 ;;
865
    *:*:*:FTX*)
866
        # From seanf@swdc.stratus.com.
867
        echo i860-stratus-sysv4
868
        exit 0 ;;
869
    mc68*:A/UX:*:*)
870
        echo m68k-apple-aux${UNAME_RELEASE}
871
        exit 0 ;;
872
    news*:NEWS-OS:*:6*)
873
        echo mips-sony-newsos6
874
        exit 0 ;;
875
    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
876
        if [ -d /usr/nec ]; then
877
                echo mips-nec-sysv${UNAME_RELEASE}
878
        else
879
                echo mips-unknown-sysv${UNAME_RELEASE}
880
        fi
881
        exit 0 ;;
882
    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
883
                           # says 
884
        echo i586-unisys-sysv4
885
        exit 0 ;;
886
esac
887
 
888
#echo '(No uname command or uname output not recognized.)' 1>&2
889
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
890
 
891
cat >dummy.c <
892
#ifdef _SEQUENT_
893
# include 
894
# include 
895
#endif
896
main ()
897
{
898
#if defined (sony)
899
#if defined (MIPSEB)
900
  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
901
     I don't know....  */
902
  printf ("mips-sony-bsd\n"); exit (0);
903
#else
904
#include 
905
  printf ("m68k-sony-newsos%s\n",
906
#ifdef NEWSOS4
907
          "4"
908
#else
909
          ""
910
#endif
911
         ); exit (0);
912
#endif
913
#endif
914
 
915
#if defined (__arm) && defined (__acorn) && defined (__unix)
916
  printf ("arm-acorn-riscix\n"); exit (0);
917
#endif
918
 
919
#if defined (hp9000) && !defined (hpux)
920
  printf ("m68k-hp-bsd\n"); exit (0);
921
#endif
922
 
923
#if defined (hp300) && !defined (hpux)
924
  printf ("m68k-hp-bsd\n"); exit (0);
925
#endif
926
 
927
#if defined (NeXT)
928
#if !defined (__ARCHITECTURE__)
929
#define __ARCHITECTURE__ "m68k"
930
#endif
931
  int version;
932
  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
933
  printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
934
  exit (0);
935
#endif
936
 
937
#if defined (MULTIMAX) || defined (n16)
938
#if defined (UMAXV)
939
  printf ("ns32k-encore-sysv\n"); exit (0);
940
#else
941
#if defined (CMU)
942
  printf ("ns32k-encore-mach\n"); exit (0);
943
#else
944
  printf ("ns32k-encore-bsd\n"); exit (0);
945
#endif
946
#endif
947
#endif
948
 
949
#if defined (__386BSD__)
950
  printf ("i386-pc-bsd\n"); exit (0);
951
#endif
952
 
953
#if defined (sequent)
954
#if defined (i386)
955
  printf ("i386-sequent-dynix\n"); exit (0);
956
#endif
957
#if defined (ns32000)
958
  printf ("ns32k-sequent-dynix\n"); exit (0);
959
#endif
960
#endif
961
 
962
#if defined (_SEQUENT_)
963
    struct utsname un;
964
 
965
    uname(&un);
966
 
967
    if (strncmp(un.version, "V2", 2) == 0) {
968
        printf ("i386-sequent-ptx2\n"); exit (0);
969
    }
970
    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
971
        printf ("i386-sequent-ptx1\n"); exit (0);
972
    }
973
    printf ("i386-sequent-ptx\n"); exit (0);
974
 
975
#endif
976
 
977
#if defined (vax)
978
#if !defined (ultrix)
979
  printf ("vax-dec-bsd\n"); exit (0);
980
#else
981
  printf ("vax-dec-ultrix\n"); exit (0);
982
#endif
983
#endif
984
 
985
#if defined (alliant) && defined (i860)
986
  printf ("i860-alliant-bsd\n"); exit (0);
987
#endif
988
 
989
/* Begin cases added for Bash */
990
#if defined (tahoe)
991
  printf ("tahoe-cci-bsd\n"); exit (0);
992
#endif
993
 
994
#if defined (nec_ews)
995
#  if defined (SYSTYPE_SYSV)
996
  printf ("ews4800-nec-sysv4\n"); exit 0;
997
#  else
998
  printf ("ews4800-nec-bsd\n"); exit (0);
999
#  endif
1000
#endif
1001
 
1002
#if defined (sony)
1003
#  if defined (SYSTYPE_SYSV)
1004
  printf ("mips-sony-sysv4\n"); exit 0;
1005
#  else
1006
  printf ("mips-sony-bsd\n"); exit (0);
1007
#  endif
1008
#endif
1009
 
1010
#if defined (ardent)
1011
  printf ("titan-ardent-bsd\n"); exit (0);
1012
#endif
1013
 
1014
#if defined (stardent)
1015
  printf ("stardent-stardent-sysv\n"); exit (0);
1016
#endif
1017
 
1018
#if defined (ibm032)
1019
  printf ("ibmrt-ibm-bsd4.3\n"); exit (0);
1020
#endif
1021
 
1022
#if defined (sequent) && defined (i386)
1023
  printf ("i386-sequent-bsd\n"); exit (0);
1024
#endif
1025
 
1026
#if defined (qnx) && defined (i386)
1027
  printf ("i386-pc-qnx\n"); exit (0);
1028
#endif
1029
 
1030
#if defined (gould)
1031
  printf ("gould-gould-bsd\n"); exit (0);
1032
#endif
1033
 
1034
#if defined (unixpc)
1035
  printf ("unixpc-att-sysv\n"); exit (0);
1036
#endif
1037
 
1038
#if defined (att386)
1039
  printf ("i386-att-sysv3\n"); exit (0);
1040
#endif
1041
 
1042
#if defined (__m88k) && defined (__UMAXV__)
1043
  printf ("m88k-encore-sysv3\n"); exit (0);
1044
#endif
1045
 
1046
#if defined (drs6000)
1047
  printf ("drs6000-icl-sysv4.2\n"); exit (0);
1048
#endif
1049
 
1050
#if defined (clipper)
1051
  printf ("clipper-orion-bsd\n"); exit (0);
1052
#endif
1053
 
1054
#if defined (is68k)
1055
  printf ("m68k-isi-bsd\n"); exit (0);
1056
#endif
1057
 
1058
#if defined (luna88k)
1059
  printf ("luna88k-omron-bsd\n"); exit (0);
1060
#endif
1061
 
1062
#if defined (butterfly) && defined (BFLY1)
1063
  printf ("butterfly-bbn-mach\n"); exit (0);
1064
#endif
1065
 
1066
#if defined (tower32)
1067
  printf ("tower32-ncr-sysv4\n"); exit (0);
1068
#endif
1069
 
1070
#if defined (MagicStation)
1071
  printf ("magicstation-unknown-bsd\n"); exit (0);
1072
#endif
1073
 
1074
#if defined (scs)
1075
  printf ("symmetric-scs-bsd4.2\n"); exit (0);
1076
#endif
1077
 
1078
#if defined (tandem)
1079
  printf ("tandem-tandem-sysv\n"); exit (0);
1080
#endif
1081
 
1082
#if defined (cadmus)
1083
  printf ("cadmus-pcs-sysv\n"); exit (0);
1084
#endif
1085
 
1086
#if defined (masscomp)
1087
  printf ("masscomp-masscomp-sysv3\n"); exit (0);
1088
#endif
1089
 
1090
#if defined (hbullx20)
1091
  printf ("hbullx20-bull-sysv3\n"); exit (0);
1092
#endif
1093
 
1094
/* End cases added for Bash */
1095
 
1096
  exit (1);
1097
}
1098
EOF
1099
 
1100
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
1101
rm -f dummy.c dummy
1102
 
1103
# Apollos put the system type in the environment.
1104
 
1105
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
1106
 
1107
# Convex versions that predate uname can use getsysinfo(1)
1108
 
1109
if [ -x /usr/convex/getsysinfo ]
1110
then
1111
    case `getsysinfo -f cpu_type` in
1112
    c1*)
1113
        echo c1-convex-bsd
1114
        exit 0 ;;
1115
    c2*)
1116
        if getsysinfo -f scalar_acc
1117
        then echo c32-convex-bsd
1118
        else echo c2-convex-bsd
1119
        fi
1120
        exit 0 ;;
1121
    c34*)
1122
        echo c34-convex-bsd
1123
        exit 0 ;;
1124
    c38*)
1125
        echo c38-convex-bsd
1126
        exit 0 ;;
1127
    c4*)
1128
        echo c4-convex-bsd
1129
        exit 0 ;;
1130
    esac
1131
fi
1132
 
1133
# Begin cases added for Bash
1134
case "$UNAME" in
1135
uts) echo uts-amdahl-sysv${UNAME_RELEASE}; exit 0 ;;
1136
esac
1137
 
1138
if [ -d /usr/amiga ]; then
1139
        echo m68k-cbm-sysv${UNAME_RELEASE}; exit 0;
1140
fi
1141
 
1142
if [ -f /bin/fxc.info ]; then
1143
        echo fxc-alliant-concentrix
1144
        exit 0
1145
fi
1146
# end cases added for Bash
1147
 
1148
#echo '(Unable to guess system type)' 1>&2
1149
 
1150
exit 1

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.