~ubuntu-branches/ubuntu/wily/tora/wily-proposed

« back to all changes in this revision

Viewing changes to config.guess

  • Committer: Bazaar Package Importer
  • Author(s): Gauvain Pocentek
  • Date: 2006-06-30 19:49:57 UTC
  • mfrom: (1.2.3 upstream) (3.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20060630194957-cyt5gcqgl9095z2i
Tags: 1.3.21-3ubuntu1
Merge from debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
# Attempt to guess a canonical system name.
3
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
 
#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
4
#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
5
5
 
6
 
timestamp='2005-08-03'
 
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
17
17
#
18
18
# You should have received a copy of the GNU General Public License
19
19
# along with this program; if not, write to the Free Software
20
 
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
21
 
# 02110-1301, USA.
 
20
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
21
#
23
22
# As a special exception to the GNU General Public License, if you
24
23
# distribute this file as part of a program that contains a
25
24
# configuration script generated by Autoconf, you may include it under
26
25
# the same distribution terms that you use for the rest of that program.
27
26
 
28
 
 
29
27
# Originally written by Per Bothner <per@bothner.com>.
30
28
# Please send patches to <config-patches@gnu.org>.  Submit a context
31
29
# diff and a properly formatted ChangeLog entry.
55
53
GNU config.guess ($timestamp)
56
54
 
57
55
Originally written by Per Bothner.
58
 
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 
56
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
59
57
Free Software Foundation, Inc.
60
58
 
61
59
This is free software; see the source for copying conditions.  There is NO
68
66
while test $# -gt 0 ; do
69
67
  case $1 in
70
68
    --time-stamp | --time* | -t )
71
 
       echo "$timestamp" ; exit ;;
 
69
       echo "$timestamp" ; exit 0 ;;
72
70
    --version | -v )
73
 
       echo "$version" ; exit ;;
 
71
       echo "$version" ; exit 0 ;;
74
72
    --help | --h* | -h )
75
 
       echo "$usage"; exit ;;
 
73
       echo "$usage"; exit 0 ;;
76
74
    -- )     # Stop option processing
77
75
       shift; break ;;
78
76
    - ) # Use stdin as input.
125
123
        ;;
126
124
 ,,*)   CC_FOR_BUILD=$CC ;;
127
125
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
128
 
esac ; set_cc_for_build= ;'
 
126
esac ;'
129
127
 
130
128
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
131
129
# (ghazi@noc.rutgers.edu 1994-08-24)
198
196
        # contains redundant information, the shorter form:
199
197
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
200
198
        echo "${machine}-${os}${release}"
201
 
        exit ;;
 
199
        exit 0 ;;
 
200
    amd64:OpenBSD:*:*)
 
201
        echo x86_64-unknown-openbsd${UNAME_RELEASE}
 
202
        exit 0 ;;
 
203
    amiga:OpenBSD:*:*)
 
204
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
205
        exit 0 ;;
 
206
    cats:OpenBSD:*:*)
 
207
        echo arm-unknown-openbsd${UNAME_RELEASE}
 
208
        exit 0 ;;
 
209
    hp300:OpenBSD:*:*)
 
210
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
211
        exit 0 ;;
 
212
    luna88k:OpenBSD:*:*)
 
213
        echo m88k-unknown-openbsd${UNAME_RELEASE}
 
214
        exit 0 ;;
 
215
    mac68k:OpenBSD:*:*)
 
216
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
217
        exit 0 ;;
 
218
    macppc:OpenBSD:*:*)
 
219
        echo powerpc-unknown-openbsd${UNAME_RELEASE}
 
220
        exit 0 ;;
 
221
    mvme68k:OpenBSD:*:*)
 
222
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
223
        exit 0 ;;
 
224
    mvme88k:OpenBSD:*:*)
 
225
        echo m88k-unknown-openbsd${UNAME_RELEASE}
 
226
        exit 0 ;;
 
227
    mvmeppc:OpenBSD:*:*)
 
228
        echo powerpc-unknown-openbsd${UNAME_RELEASE}
 
229
        exit 0 ;;
 
230
    sgi:OpenBSD:*:*)
 
231
        echo mips64-unknown-openbsd${UNAME_RELEASE}
 
232
        exit 0 ;;
 
233
    sun3:OpenBSD:*:*)
 
234
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
235
        exit 0 ;;
202
236
    *:OpenBSD:*:*)
203
 
        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
204
 
        echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
205
 
        exit ;;
 
237
        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
 
238
        exit 0 ;;
206
239
    *:ekkoBSD:*:*)
207
240
        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
208
 
        exit ;;
 
241
        exit 0 ;;
209
242
    macppc:MirBSD:*:*)
210
243
        echo powerppc-unknown-mirbsd${UNAME_RELEASE}
211
 
        exit ;;
 
244
        exit 0 ;;
212
245
    *:MirBSD:*:*)
213
246
        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
214
 
        exit ;;
 
247
        exit 0 ;;
215
248
    alpha:OSF1:*:*)
216
249
        case $UNAME_RELEASE in
217
250
        *4.0)
264
297
        # A Xn.n version is an unreleased experimental baselevel.
265
298
        # 1.2 uses "1.2" for uname -r.
266
299
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
267
 
        exit ;;
 
300
        exit 0 ;;
268
301
    Alpha\ *:Windows_NT*:*)
269
302
        # How do we know it's Interix rather than the generic POSIX subsystem?
270
303
        # Should we change UNAME_MACHINE based on the output of uname instead
271
304
        # of the specific Alpha model?
272
305
        echo alpha-pc-interix
273
 
        exit ;;
 
306
        exit 0 ;;
274
307
    21064:Windows_NT:50:3)
275
308
        echo alpha-dec-winnt3.5
276
 
        exit ;;
 
309
        exit 0 ;;
277
310
    Amiga*:UNIX_System_V:4.0:*)
278
311
        echo m68k-unknown-sysv4
279
 
        exit ;;
 
312
        exit 0;;
280
313
    *:[Aa]miga[Oo][Ss]:*:*)
281
314
        echo ${UNAME_MACHINE}-unknown-amigaos
282
 
        exit ;;
 
315
        exit 0 ;;
283
316
    *:[Mm]orph[Oo][Ss]:*:*)
284
317
        echo ${UNAME_MACHINE}-unknown-morphos
285
 
        exit ;;
 
318
        exit 0 ;;
286
319
    *:OS/390:*:*)
287
320
        echo i370-ibm-openedition
288
 
        exit ;;
 
321
        exit 0 ;;
289
322
    *:z/VM:*:*)
290
323
        echo s390-ibm-zvmoe
291
 
        exit ;;
 
324
        exit 0 ;;
292
325
    *:OS400:*:*)
293
326
        echo powerpc-ibm-os400
294
 
        exit ;;
 
327
        exit 0 ;;
295
328
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
296
329
        echo arm-acorn-riscix${UNAME_RELEASE}
297
 
        exit ;;
298
 
    arm:riscos:*:*|arm:RISCOS:*:*)
299
 
        echo arm-unknown-riscos
300
 
        exit ;;
 
330
        exit 0;;
301
331
    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
302
332
        echo hppa1.1-hitachi-hiuxmpp
303
 
        exit ;;
 
333
        exit 0;;
304
334
    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
305
335
        # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
306
336
        if test "`(/bin/universe) 2>/dev/null`" = att ; then
308
338
        else
309
339
                echo pyramid-pyramid-bsd
310
340
        fi
311
 
        exit ;;
 
341
        exit 0 ;;
312
342
    NILE*:*:*:dcosx)
313
343
        echo pyramid-pyramid-svr4
314
 
        exit ;;
 
344
        exit 0 ;;
315
345
    DRS?6000:unix:4.0:6*)
316
346
        echo sparc-icl-nx6
317
 
        exit ;;
 
347
        exit 0 ;;
318
348
    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
319
349
        case `/usr/bin/uname -p` in
320
 
            sparc) echo sparc-icl-nx7; exit ;;
 
350
            sparc) echo sparc-icl-nx7 && exit 0 ;;
321
351
        esac ;;
322
352
    sun4H:SunOS:5.*:*)
323
353
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
324
 
        exit ;;
 
354
        exit 0 ;;
325
355
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
326
356
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
327
 
        exit ;;
 
357
        exit 0 ;;
328
358
    i86pc:SunOS:5.*:*)
329
359
        echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
330
 
        exit ;;
 
360
        exit 0 ;;
331
361
    sun4*:SunOS:6*:*)
332
362
        # According to config.sub, this is the proper way to canonicalize
333
363
        # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
334
364
        # it's likely to be more like Solaris than SunOS4.
335
365
        echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
336
 
        exit ;;
 
366
        exit 0 ;;
337
367
    sun4*:SunOS:*:*)
338
368
        case "`/usr/bin/arch -k`" in
339
369
            Series*|S4*)
342
372
        esac
343
373
        # Japanese Language versions have a version number like `4.1.3-JL'.
344
374
        echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
345
 
        exit ;;
 
375
        exit 0 ;;
346
376
    sun3*:SunOS:*:*)
347
377
        echo m68k-sun-sunos${UNAME_RELEASE}
348
 
        exit ;;
 
378
        exit 0 ;;
349
379
    sun*:*:4.2BSD:*)
350
380
        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
351
381
        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
357
387
                echo sparc-sun-sunos${UNAME_RELEASE}
358
388
                ;;
359
389
        esac
360
 
        exit ;;
 
390
        exit 0 ;;
361
391
    aushp:SunOS:*:*)
362
392
        echo sparc-auspex-sunos${UNAME_RELEASE}
363
 
        exit ;;
 
393
        exit 0 ;;
364
394
    # The situation for MiNT is a little confusing.  The machine name
365
395
    # can be virtually everything (everything which is not
366
396
    # "atarist" or "atariste" at least should have a processor
371
401
    # be no problem.
372
402
    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
373
403
        echo m68k-atari-mint${UNAME_RELEASE}
374
 
        exit ;;
 
404
        exit 0 ;;
375
405
    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
376
406
        echo m68k-atari-mint${UNAME_RELEASE}
377
 
        exit ;;
 
407
        exit 0 ;;
378
408
    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
379
409
        echo m68k-atari-mint${UNAME_RELEASE}
380
 
        exit ;;
 
410
        exit 0 ;;
381
411
    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
382
412
        echo m68k-milan-mint${UNAME_RELEASE}
383
 
        exit ;;
 
413
        exit 0 ;;
384
414
    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
385
415
        echo m68k-hades-mint${UNAME_RELEASE}
386
 
        exit ;;
 
416
        exit 0 ;;
387
417
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
388
418
        echo m68k-unknown-mint${UNAME_RELEASE}
389
 
        exit ;;
 
419
        exit 0 ;;
390
420
    m68k:machten:*:*)
391
421
        echo m68k-apple-machten${UNAME_RELEASE}
392
 
        exit ;;
 
422
        exit 0 ;;
393
423
    powerpc:machten:*:*)
394
424
        echo powerpc-apple-machten${UNAME_RELEASE}
395
 
        exit ;;
 
425
        exit 0 ;;
396
426
    RISC*:Mach:*:*)
397
427
        echo mips-dec-mach_bsd4.3
398
 
        exit ;;
 
428
        exit 0 ;;
399
429
    RISC*:ULTRIX:*:*)
400
430
        echo mips-dec-ultrix${UNAME_RELEASE}
401
 
        exit ;;
 
431
        exit 0 ;;
402
432
    VAX*:ULTRIX*:*:*)
403
433
        echo vax-dec-ultrix${UNAME_RELEASE}
404
 
        exit ;;
 
434
        exit 0 ;;
405
435
    2020:CLIX:*:* | 2430:CLIX:*:*)
406
436
        echo clipper-intergraph-clix${UNAME_RELEASE}
407
 
        exit ;;
 
437
        exit 0 ;;
408
438
    mips:*:*:UMIPS | mips:*:*:RISCos)
409
439
        eval $set_cc_for_build
410
440
        sed 's/^        //' << EOF >$dummy.c
428
458
          exit (-1);
429
459
        }
430
460
EOF
431
 
        $CC_FOR_BUILD -o $dummy $dummy.c &&
432
 
          dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
433
 
          SYSTEM_NAME=`$dummy $dummyarg` &&
434
 
            { echo "$SYSTEM_NAME"; exit; }
 
461
        $CC_FOR_BUILD -o $dummy $dummy.c \
 
462
          && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
 
463
          && exit 0
435
464
        echo mips-mips-riscos${UNAME_RELEASE}
436
 
        exit ;;
 
465
        exit 0 ;;
437
466
    Motorola:PowerMAX_OS:*:*)
438
467
        echo powerpc-motorola-powermax
439
 
        exit ;;
 
468
        exit 0 ;;
440
469
    Motorola:*:4.3:PL8-*)
441
470
        echo powerpc-harris-powermax
442
 
        exit ;;
 
471
        exit 0 ;;
443
472
    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
444
473
        echo powerpc-harris-powermax
445
 
        exit ;;
 
474
        exit 0 ;;
446
475
    Night_Hawk:Power_UNIX:*:*)
447
476
        echo powerpc-harris-powerunix
448
 
        exit ;;
 
477
        exit 0 ;;
449
478
    m88k:CX/UX:7*:*)
450
479
        echo m88k-harris-cxux7
451
 
        exit ;;
 
480
        exit 0 ;;
452
481
    m88k:*:4*:R4*)
453
482
        echo m88k-motorola-sysv4
454
 
        exit ;;
 
483
        exit 0 ;;
455
484
    m88k:*:3*:R3*)
456
485
        echo m88k-motorola-sysv3
457
 
        exit ;;
 
486
        exit 0 ;;
458
487
    AViiON:dgux:*:*)
459
488
        # DG/UX returns AViiON for all architectures
460
489
        UNAME_PROCESSOR=`/usr/bin/uname -p`
470
499
        else
471
500
            echo i586-dg-dgux${UNAME_RELEASE}
472
501
        fi
473
 
        exit ;;
 
502
        exit 0 ;;
474
503
    M88*:DolphinOS:*:*) # DolphinOS (SVR3)
475
504
        echo m88k-dolphin-sysv3
476
 
        exit ;;
 
505
        exit 0 ;;
477
506
    M88*:*:R3*:*)
478
507
        # Delta 88k system running SVR3
479
508
        echo m88k-motorola-sysv3
480
 
        exit ;;
 
509
        exit 0 ;;
481
510
    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
482
511
        echo m88k-tektronix-sysv3
483
 
        exit ;;
 
512
        exit 0 ;;
484
513
    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
485
514
        echo m68k-tektronix-bsd
486
 
        exit ;;
 
515
        exit 0 ;;
487
516
    *:IRIX*:*:*)
488
517
        echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
489
 
        exit ;;
 
518
        exit 0 ;;
490
519
    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
491
 
        echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
492
 
        exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
 
520
        echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
 
521
        exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
493
522
    i*86:AIX:*:*)
494
523
        echo i386-ibm-aix
495
 
        exit ;;
 
524
        exit 0 ;;
496
525
    ia64:AIX:*:*)
497
526
        if [ -x /usr/bin/oslevel ] ; then
498
527
                IBM_REV=`/usr/bin/oslevel`
500
529
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
501
530
        fi
502
531
        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
503
 
        exit ;;
 
532
        exit 0 ;;
504
533
    *:AIX:2:3)
505
534
        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
506
535
                eval $set_cc_for_build
515
544
                        exit(0);
516
545
                        }
517
546
EOF
518
 
                if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
519
 
                then
520
 
                        echo "$SYSTEM_NAME"
521
 
                else
522
 
                        echo rs6000-ibm-aix3.2.5
523
 
                fi
 
547
                $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
 
548
                echo rs6000-ibm-aix3.2.5
524
549
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
525
550
                echo rs6000-ibm-aix3.2.4
526
551
        else
527
552
                echo rs6000-ibm-aix3.2
528
553
        fi
529
 
        exit ;;
 
554
        exit 0 ;;
530
555
    *:AIX:*:[45])
531
556
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
532
557
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
540
565
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
541
566
        fi
542
567
        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
543
 
        exit ;;
 
568
        exit 0 ;;
544
569
    *:AIX:*:*)
545
570
        echo rs6000-ibm-aix
546
 
        exit ;;
 
571
        exit 0 ;;
547
572
    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
548
573
        echo romp-ibm-bsd4.4
549
 
        exit ;;
 
574
        exit 0 ;;
550
575
    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
551
576
        echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
552
 
        exit ;;                             # report: romp-ibm BSD 4.3
 
577
        exit 0 ;;                           # report: romp-ibm BSD 4.3
553
578
    *:BOSX:*:*)
554
579
        echo rs6000-bull-bosx
555
 
        exit ;;
 
580
        exit 0 ;;
556
581
    DPX/2?00:B.O.S.:*:*)
557
582
        echo m68k-bull-sysv3
558
 
        exit ;;
 
583
        exit 0 ;;
559
584
    9000/[34]??:4.3bsd:1.*:*)
560
585
        echo m68k-hp-bsd
561
 
        exit ;;
 
586
        exit 0 ;;
562
587
    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
563
588
        echo m68k-hp-bsd4.4
564
 
        exit ;;
 
589
        exit 0 ;;
565
590
    9000/[34678]??:HP-UX:*:*)
566
591
        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
567
592
        case "${UNAME_MACHINE}" in
623
648
        esac
624
649
        if [ ${HP_ARCH} = "hppa2.0w" ]
625
650
        then
626
 
            eval $set_cc_for_build
627
 
 
628
 
            # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
629
 
            # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
630
 
            # generating 64-bit code.  GNU and HP use different nomenclature:
631
 
            #
632
 
            # $ CC_FOR_BUILD=cc ./config.guess
633
 
            # => hppa2.0w-hp-hpux11.23
634
 
            # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
635
 
            # => hppa64-hp-hpux11.23
636
 
 
637
 
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
638
 
                grep __LP64__ >/dev/null
 
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
639
654
            then
640
655
                HP_ARCH="hppa2.0w"
641
656
            else
643
658
            fi
644
659
        fi
645
660
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
646
 
        exit ;;
 
661
        exit 0 ;;
647
662
    ia64:HP-UX:*:*)
648
663
        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
649
664
        echo ia64-hp-hpux${HPUX_REV}
650
 
        exit ;;
 
665
        exit 0 ;;
651
666
    3050*:HI-UX:*:*)
652
667
        eval $set_cc_for_build
653
668
        sed 's/^        //' << EOF >$dummy.c
675
690
          exit (0);
676
691
        }
677
692
EOF
678
 
        $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
679
 
                { echo "$SYSTEM_NAME"; exit; }
 
693
        $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
680
694
        echo unknown-hitachi-hiuxwe2
681
 
        exit ;;
 
695
        exit 0 ;;
682
696
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
683
697
        echo hppa1.1-hp-bsd
684
 
        exit ;;
 
698
        exit 0 ;;
685
699
    9000/8??:4.3bsd:*:*)
686
700
        echo hppa1.0-hp-bsd
687
 
        exit ;;
 
701
        exit 0 ;;
688
702
    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
689
703
        echo hppa1.0-hp-mpeix
690
 
        exit ;;
 
704
        exit 0 ;;
691
705
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
692
706
        echo hppa1.1-hp-osf
693
 
        exit ;;
 
707
        exit 0 ;;
694
708
    hp8??:OSF1:*:*)
695
709
        echo hppa1.0-hp-osf
696
 
        exit ;;
 
710
        exit 0 ;;
697
711
    i*86:OSF1:*:*)
698
712
        if [ -x /usr/sbin/sysversion ] ; then
699
713
            echo ${UNAME_MACHINE}-unknown-osf1mk
700
714
        else
701
715
            echo ${UNAME_MACHINE}-unknown-osf1
702
716
        fi
703
 
        exit ;;
 
717
        exit 0 ;;
704
718
    parisc*:Lites*:*:*)
705
719
        echo hppa1.1-hp-lites
706
 
        exit ;;
 
720
        exit 0 ;;
707
721
    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
708
722
        echo c1-convex-bsd
709
 
        exit ;;
 
723
        exit 0 ;;
710
724
    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
711
725
        if getsysinfo -f scalar_acc
712
726
        then echo c32-convex-bsd
713
727
        else echo c2-convex-bsd
714
728
        fi
715
 
        exit ;;
 
729
        exit 0 ;;
716
730
    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
717
731
        echo c34-convex-bsd
718
 
        exit ;;
 
732
        exit 0 ;;
719
733
    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
720
734
        echo c38-convex-bsd
721
 
        exit ;;
 
735
        exit 0 ;;
722
736
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
723
737
        echo c4-convex-bsd
724
 
        exit ;;
 
738
        exit 0 ;;
725
739
    CRAY*Y-MP:*:*:*)
726
740
        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
727
 
        exit ;;
 
741
        exit 0 ;;
728
742
    CRAY*[A-Z]90:*:*:*)
729
743
        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
730
744
        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
731
745
              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
732
746
              -e 's/\.[^.]*$/.X/'
733
 
        exit ;;
 
747
        exit 0 ;;
734
748
    CRAY*TS:*:*:*)
735
749
        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
736
 
        exit ;;
 
750
        exit 0 ;;
737
751
    CRAY*T3E:*:*:*)
738
752
        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
739
 
        exit ;;
 
753
        exit 0 ;;
740
754
    CRAY*SV1:*:*:*)
741
755
        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
742
 
        exit ;;
 
756
        exit 0 ;;
743
757
    *:UNICOS/mp:*:*)
744
758
        echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
745
 
        exit ;;
 
759
        exit 0 ;;
746
760
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
747
761
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
748
762
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
749
763
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
750
764
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
751
 
        exit ;;
 
765
        exit 0 ;;
752
766
    5000:UNIX_System_V:4.*:*)
753
767
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
754
768
        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
755
769
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
756
 
        exit ;;
 
770
        exit 0 ;;
757
771
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
758
772
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
759
 
        exit ;;
 
773
        exit 0 ;;
760
774
    sparc*:BSD/OS:*:*)
761
775
        echo sparc-unknown-bsdi${UNAME_RELEASE}
762
 
        exit ;;
 
776
        exit 0 ;;
763
777
    *:BSD/OS:*:*)
764
778
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
765
 
        exit ;;
 
779
        exit 0 ;;
766
780
    *:FreeBSD:*:*)
767
781
        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
768
 
        exit ;;
 
782
        exit 0 ;;
769
783
    i*:CYGWIN*:*)
770
784
        echo ${UNAME_MACHINE}-pc-cygwin
771
 
        exit ;;
 
785
        exit 0 ;;
772
786
    i*:MINGW*:*)
773
787
        echo ${UNAME_MACHINE}-pc-mingw32
774
 
        exit ;;
775
 
    i*:windows32*:*)
776
 
        # uname -m includes "-pc" on this system.
777
 
        echo ${UNAME_MACHINE}-mingw32
778
 
        exit ;;
 
788
        exit 0 ;;
779
789
    i*:PW*:*)
780
790
        echo ${UNAME_MACHINE}-pc-pw32
781
 
        exit ;;
 
791
        exit 0 ;;
782
792
    x86:Interix*:[34]*)
783
793
        echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
784
 
        exit ;;
 
794
        exit 0 ;;
785
795
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
786
796
        echo i${UNAME_MACHINE}-pc-mks
787
 
        exit ;;
 
797
        exit 0 ;;
788
798
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
789
799
        # How do we know it's Interix rather than the generic POSIX subsystem?
790
800
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
791
801
        # UNAME_MACHINE based on the output of uname instead of i386?
792
802
        echo i586-pc-interix
793
 
        exit ;;
 
803
        exit 0 ;;
794
804
    i*:UWIN*:*)
795
805
        echo ${UNAME_MACHINE}-pc-uwin
796
 
        exit ;;
797
 
    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
798
 
        echo x86_64-unknown-cygwin
799
 
        exit ;;
 
806
        exit 0 ;;
800
807
    p*:CYGWIN*:*)
801
808
        echo powerpcle-unknown-cygwin
802
 
        exit ;;
 
809
        exit 0 ;;
803
810
    prep*:SunOS:5.*:*)
804
811
        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
805
 
        exit ;;
 
812
        exit 0 ;;
806
813
    *:GNU:*:*)
807
814
        # the GNU system
808
815
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
809
 
        exit ;;
 
816
        exit 0 ;;
810
817
    *:GNU/*:*:*)
811
818
        # other systems with GNU libc and userland
812
819
        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
813
 
        exit ;;
 
820
        exit 0 ;;
814
821
    i*86:Minix:*:*)
815
822
        echo ${UNAME_MACHINE}-pc-minix
816
 
        exit ;;
 
823
        exit 0 ;;
817
824
    arm*:Linux:*:*)
818
825
        echo ${UNAME_MACHINE}-unknown-linux-gnu
819
 
        exit ;;
 
826
        exit 0 ;;
820
827
    cris:Linux:*:*)
821
828
        echo cris-axis-linux-gnu
822
 
        exit ;;
 
829
        exit 0 ;;
823
830
    crisv32:Linux:*:*)
824
831
        echo crisv32-axis-linux-gnu
825
 
        exit ;;
 
832
        exit 0 ;;
826
833
    frv:Linux:*:*)
827
834
        echo frv-unknown-linux-gnu
828
 
        exit ;;
 
835
        exit 0 ;;
829
836
    ia64:Linux:*:*)
830
837
        echo ${UNAME_MACHINE}-unknown-linux-gnu
831
 
        exit ;;
 
838
        exit 0 ;;
832
839
    m32r*:Linux:*:*)
833
840
        echo ${UNAME_MACHINE}-unknown-linux-gnu
834
 
        exit ;;
 
841
        exit 0 ;;
835
842
    m68*:Linux:*:*)
836
843
        echo ${UNAME_MACHINE}-unknown-linux-gnu
837
 
        exit ;;
 
844
        exit 0 ;;
838
845
    mips:Linux:*:*)
839
846
        eval $set_cc_for_build
840
847
        sed 's/^        //' << EOF >$dummy.c
852
859
        #endif
853
860
EOF
854
861
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
855
 
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 
862
        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
856
863
        ;;
857
864
    mips64:Linux:*:*)
858
865
        eval $set_cc_for_build
871
878
        #endif
872
879
EOF
873
880
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
874
 
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 
881
        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
875
882
        ;;
876
 
    or32:Linux:*:*)
877
 
        echo or32-unknown-linux-gnu
878
 
        exit ;;
879
883
    ppc:Linux:*:*)
880
884
        echo powerpc-unknown-linux-gnu
881
 
        exit ;;
 
885
        exit 0 ;;
882
886
    ppc64:Linux:*:*)
883
887
        echo powerpc64-unknown-linux-gnu
884
 
        exit ;;
 
888
        exit 0 ;;
885
889
    alpha:Linux:*:*)
886
890
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
887
891
          EV5)   UNAME_MACHINE=alphaev5 ;;
895
899
        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
896
900
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
897
901
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
898
 
        exit ;;
 
902
        exit 0 ;;
899
903
    parisc:Linux:*:* | hppa:Linux:*:*)
900
904
        # Look for CPU level
901
905
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
903
907
          PA8*) echo hppa2.0-unknown-linux-gnu ;;
904
908
          *)    echo hppa-unknown-linux-gnu ;;
905
909
        esac
906
 
        exit ;;
 
910
        exit 0 ;;
907
911
    parisc64:Linux:*:* | hppa64:Linux:*:*)
908
912
        echo hppa64-unknown-linux-gnu
909
 
        exit ;;
 
913
        exit 0 ;;
910
914
    s390:Linux:*:* | s390x:Linux:*:*)
911
915
        echo ${UNAME_MACHINE}-ibm-linux
912
 
        exit ;;
 
916
        exit 0 ;;
913
917
    sh64*:Linux:*:*)
914
918
        echo ${UNAME_MACHINE}-unknown-linux-gnu
915
 
        exit ;;
 
919
        exit 0 ;;
916
920
    sh*:Linux:*:*)
917
921
        echo ${UNAME_MACHINE}-unknown-linux-gnu
918
 
        exit ;;
 
922
        exit 0 ;;
919
923
    sparc:Linux:*:* | sparc64:Linux:*:*)
920
924
        echo ${UNAME_MACHINE}-unknown-linux-gnu
921
 
        exit ;;
 
925
        exit 0 ;;
922
926
    x86_64:Linux:*:*)
923
927
        echo x86_64-unknown-linux-gnu
924
 
        exit ;;
 
928
        exit 0 ;;
925
929
    i*86:Linux:*:*)
926
930
        # The BFD linker knows what the default object file format is, so
927
931
        # first see if it will tell us. cd to the root directory to prevent
939
943
                ;;
940
944
          a.out-i386-linux)
941
945
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
942
 
                exit ;;
 
946
                exit 0 ;;
943
947
          coff-i386)
944
948
                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
945
 
                exit ;;
 
949
                exit 0 ;;
946
950
          "")
947
951
                # Either a pre-BFD a.out linker (linux-gnuoldld) or
948
952
                # one that does not give us useful --help.
949
953
                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
950
 
                exit ;;
 
954
                exit 0 ;;
951
955
        esac
952
956
        # Determine whether the default compiler is a.out or elf
953
957
        eval $set_cc_for_build
975
979
        #endif
976
980
EOF
977
981
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
978
 
        test x"${LIBC}" != x && {
979
 
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
980
 
                exit
981
 
        }
982
 
        test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
 
982
        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
 
983
        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
983
984
        ;;
984
985
    i*86:DYNIX/ptx:4*:*)
985
986
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
986
987
        # earlier versions are messed up and put the nodename in both
987
988
        # sysname and nodename.
988
989
        echo i386-sequent-sysv4
989
 
        exit ;;
 
990
        exit 0 ;;
990
991
    i*86:UNIX_SV:4.2MP:2.*)
991
992
        # Unixware is an offshoot of SVR4, but it has its own version
992
993
        # number series starting with 2...
994
995
        # I just have to hope.  -- rms.
995
996
        # Use sysv4.2uw... so that sysv4* matches it.
996
997
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
997
 
        exit ;;
 
998
        exit 0 ;;
998
999
    i*86:OS/2:*:*)
999
1000
        # If we were able to find `uname', then EMX Unix compatibility
1000
1001
        # is probably installed.
1001
1002
        echo ${UNAME_MACHINE}-pc-os2-emx
1002
 
        exit ;;
 
1003
        exit 0 ;;
1003
1004
    i*86:XTS-300:*:STOP)
1004
1005
        echo ${UNAME_MACHINE}-unknown-stop
1005
 
        exit ;;
 
1006
        exit 0 ;;
1006
1007
    i*86:atheos:*:*)
1007
1008
        echo ${UNAME_MACHINE}-unknown-atheos
1008
 
        exit ;;
1009
 
    i*86:syllable:*:*)
 
1009
        exit 0 ;;
 
1010
        i*86:syllable:*:*)
1010
1011
        echo ${UNAME_MACHINE}-pc-syllable
1011
 
        exit ;;
 
1012
        exit 0 ;;
1012
1013
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1013
1014
        echo i386-unknown-lynxos${UNAME_RELEASE}
1014
 
        exit ;;
 
1015
        exit 0 ;;
1015
1016
    i*86:*DOS:*:*)
1016
1017
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
1017
 
        exit ;;
 
1018
        exit 0 ;;
1018
1019
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1019
1020
        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1020
1021
        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1022
1023
        else
1023
1024
                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1024
1025
        fi
1025
 
        exit ;;
1026
 
    i*86:*:5:[678]*)
1027
 
        # UnixWare 7.x, OpenUNIX and OpenServer 6.
 
1026
        exit 0 ;;
 
1027
    i*86:*:5:[78]*)
1028
1028
        case `/bin/uname -X | grep "^Machine"` in
1029
1029
            *486*)           UNAME_MACHINE=i486 ;;
1030
1030
            *Pentium)        UNAME_MACHINE=i586 ;;
1031
1031
            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1032
1032
        esac
1033
1033
        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1034
 
        exit ;;
 
1034
        exit 0 ;;
1035
1035
    i*86:*:3.2:*)
1036
1036
        if test -f /usr/options/cb.name; then
1037
1037
                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1049
1049
        else
1050
1050
                echo ${UNAME_MACHINE}-pc-sysv32
1051
1051
        fi
1052
 
        exit ;;
 
1052
        exit 0 ;;
1053
1053
    pc:*:*:*)
1054
1054
        # Left here for compatibility:
1055
1055
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
1056
1056
        # the processor, so we play safe by assuming i386.
1057
1057
        echo i386-pc-msdosdjgpp
1058
 
        exit ;;
 
1058
        exit 0 ;;
1059
1059
    Intel:Mach:3*:*)
1060
1060
        echo i386-pc-mach3
1061
 
        exit ;;
 
1061
        exit 0 ;;
1062
1062
    paragon:*:*:*)
1063
1063
        echo i860-intel-osf1
1064
 
        exit ;;
 
1064
        exit 0 ;;
1065
1065
    i860:*:4.*:*) # i860-SVR4
1066
1066
        if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1067
1067
          echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1068
1068
        else # Add other i860-SVR4 vendors below as they are discovered.
1069
1069
          echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
1070
1070
        fi
1071
 
        exit ;;
 
1071
        exit 0 ;;
1072
1072
    mini*:CTIX:SYS*5:*)
1073
1073
        # "miniframe"
1074
1074
        echo m68010-convergent-sysv
1075
 
        exit ;;
 
1075
        exit 0 ;;
1076
1076
    mc68k:UNIX:SYSTEM5:3.51m)
1077
1077
        echo m68k-convergent-sysv
1078
 
        exit ;;
 
1078
        exit 0 ;;
1079
1079
    M680?0:D-NIX:5.3:*)
1080
1080
        echo m68k-diab-dnix
1081
 
        exit ;;
 
1081
        exit 0 ;;
1082
1082
    M68*:*:R3V[5678]*:*)
1083
 
        test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
 
1083
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
1084
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)
1085
1085
        OS_REL=''
1086
1086
        test -r /etc/.relid \
1087
1087
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1088
1088
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1089
 
          && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
 
1089
          && echo i486-ncr-sysv4.3${OS_REL} && exit 0
1090
1090
        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1091
 
          && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
 
1091
          && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
1092
1092
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1093
1093
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1094
 
          && { echo i486-ncr-sysv4; exit; } ;;
 
1094
          && echo i486-ncr-sysv4 && exit 0 ;;
1095
1095
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1096
1096
        echo m68k-unknown-lynxos${UNAME_RELEASE}
1097
 
        exit ;;
 
1097
        exit 0 ;;
1098
1098
    mc68030:UNIX_System_V:4.*:*)
1099
1099
        echo m68k-atari-sysv4
1100
 
        exit ;;
 
1100
        exit 0 ;;
1101
1101
    TSUNAMI:LynxOS:2.*:*)
1102
1102
        echo sparc-unknown-lynxos${UNAME_RELEASE}
1103
 
        exit ;;
 
1103
        exit 0 ;;
1104
1104
    rs6000:LynxOS:2.*:*)
1105
1105
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
1106
 
        exit ;;
 
1106
        exit 0 ;;
1107
1107
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1108
1108
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
1109
 
        exit ;;
 
1109
        exit 0 ;;
1110
1110
    SM[BE]S:UNIX_SV:*:*)
1111
1111
        echo mips-dde-sysv${UNAME_RELEASE}
1112
 
        exit ;;
 
1112
        exit 0 ;;
1113
1113
    RM*:ReliantUNIX-*:*:*)
1114
1114
        echo mips-sni-sysv4
1115
 
        exit ;;
 
1115
        exit 0 ;;
1116
1116
    RM*:SINIX-*:*:*)
1117
1117
        echo mips-sni-sysv4
1118
 
        exit ;;
 
1118
        exit 0 ;;
1119
1119
    *:SINIX-*:*:*)
1120
1120
        if uname -p 2>/dev/null >/dev/null ; then
1121
1121
                UNAME_MACHINE=`(uname -p) 2>/dev/null`
1123
1123
        else
1124
1124
                echo ns32k-sni-sysv
1125
1125
        fi
1126
 
        exit ;;
 
1126
        exit 0 ;;
1127
1127
    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1128
1128
                      # says <Richard.M.Bartel@ccMail.Census.GOV>
1129
1129
        echo i586-unisys-sysv4
1130
 
        exit ;;
 
1130
        exit 0 ;;
1131
1131
    *:UNIX_System_V:4*:FTX*)
1132
1132
        # From Gerald Hewes <hewes@openmarket.com>.
1133
1133
        # How about differentiating between stratus architectures? -djm
1134
1134
        echo hppa1.1-stratus-sysv4
1135
 
        exit ;;
 
1135
        exit 0 ;;
1136
1136
    *:*:*:FTX*)
1137
1137
        # From seanf@swdc.stratus.com.
1138
1138
        echo i860-stratus-sysv4
1139
 
        exit ;;
1140
 
    i*86:VOS:*:*)
1141
 
        # From Paul.Green@stratus.com.
1142
 
        echo ${UNAME_MACHINE}-stratus-vos
1143
 
        exit ;;
 
1139
        exit 0 ;;
1144
1140
    *:VOS:*:*)
1145
1141
        # From Paul.Green@stratus.com.
1146
1142
        echo hppa1.1-stratus-vos
1147
 
        exit ;;
 
1143
        exit 0 ;;
1148
1144
    mc68*:A/UX:*:*)
1149
1145
        echo m68k-apple-aux${UNAME_RELEASE}
1150
 
        exit ;;
 
1146
        exit 0 ;;
1151
1147
    news*:NEWS-OS:6*:*)
1152
1148
        echo mips-sony-newsos6
1153
 
        exit ;;
 
1149
        exit 0 ;;
1154
1150
    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1155
1151
        if [ -d /usr/nec ]; then
1156
1152
                echo mips-nec-sysv${UNAME_RELEASE}
1157
1153
        else
1158
1154
                echo mips-unknown-sysv${UNAME_RELEASE}
1159
1155
        fi
1160
 
        exit ;;
 
1156
        exit 0 ;;
1161
1157
    BeBox:BeOS:*:*)     # BeOS running on hardware made by Be, PPC only.
1162
1158
        echo powerpc-be-beos
1163
 
        exit ;;
 
1159
        exit 0 ;;
1164
1160
    BeMac:BeOS:*:*)     # BeOS running on Mac or Mac clone, PPC only.
1165
1161
        echo powerpc-apple-beos
1166
 
        exit ;;
 
1162
        exit 0 ;;
1167
1163
    BePC:BeOS:*:*)      # BeOS running on Intel PC compatible.
1168
1164
        echo i586-pc-beos
1169
 
        exit ;;
 
1165
        exit 0 ;;
1170
1166
    SX-4:SUPER-UX:*:*)
1171
1167
        echo sx4-nec-superux${UNAME_RELEASE}
1172
 
        exit ;;
 
1168
        exit 0 ;;
1173
1169
    SX-5:SUPER-UX:*:*)
1174
1170
        echo sx5-nec-superux${UNAME_RELEASE}
1175
 
        exit ;;
 
1171
        exit 0 ;;
1176
1172
    SX-6:SUPER-UX:*:*)
1177
1173
        echo sx6-nec-superux${UNAME_RELEASE}
1178
 
        exit ;;
 
1174
        exit 0 ;;
1179
1175
    Power*:Rhapsody:*:*)
1180
1176
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
1181
 
        exit ;;
 
1177
        exit 0 ;;
1182
1178
    *:Rhapsody:*:*)
1183
1179
        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1184
 
        exit ;;
 
1180
        exit 0 ;;
1185
1181
    *:Darwin:*:*)
1186
1182
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1187
1183
        case $UNAME_PROCESSOR in
1189
1185
            unknown) UNAME_PROCESSOR=powerpc ;;
1190
1186
        esac
1191
1187
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1192
 
        exit ;;
 
1188
        exit 0 ;;
1193
1189
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1194
1190
        UNAME_PROCESSOR=`uname -p`
1195
1191
        if test "$UNAME_PROCESSOR" = "x86"; then
1197
1193
                UNAME_MACHINE=pc
1198
1194
        fi
1199
1195
        echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1200
 
        exit ;;
 
1196
        exit 0 ;;
1201
1197
    *:QNX:*:4*)
1202
1198
        echo i386-pc-qnx
1203
 
        exit ;;
1204
 
    NSE-?:NONSTOP_KERNEL:*:*)
1205
 
        echo nse-tandem-nsk${UNAME_RELEASE}
1206
 
        exit ;;
 
1199
        exit 0 ;;
1207
1200
    NSR-?:NONSTOP_KERNEL:*:*)
1208
1201
        echo nsr-tandem-nsk${UNAME_RELEASE}
1209
 
        exit ;;
 
1202
        exit 0 ;;
1210
1203
    *:NonStop-UX:*:*)
1211
1204
        echo mips-compaq-nonstopux
1212
 
        exit ;;
 
1205
        exit 0 ;;
1213
1206
    BS2000:POSIX*:*:*)
1214
1207
        echo bs2000-siemens-sysv
1215
 
        exit ;;
 
1208
        exit 0 ;;
1216
1209
    DS/*:UNIX_System_V:*:*)
1217
1210
        echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1218
 
        exit ;;
 
1211
        exit 0 ;;
1219
1212
    *:Plan9:*:*)
1220
1213
        # "uname -m" is not consistent, so use $cputype instead. 386
1221
1214
        # is converted to i386 for consistency with other x86
1226
1219
            UNAME_MACHINE="$cputype"
1227
1220
        fi
1228
1221
        echo ${UNAME_MACHINE}-unknown-plan9
1229
 
        exit ;;
 
1222
        exit 0 ;;
1230
1223
    *:TOPS-10:*:*)
1231
1224
        echo pdp10-unknown-tops10
1232
 
        exit ;;
 
1225
        exit 0 ;;
1233
1226
    *:TENEX:*:*)
1234
1227
        echo pdp10-unknown-tenex
1235
 
        exit ;;
 
1228
        exit 0 ;;
1236
1229
    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1237
1230
        echo pdp10-dec-tops20
1238
 
        exit ;;
 
1231
        exit 0 ;;
1239
1232
    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1240
1233
        echo pdp10-xkl-tops20
1241
 
        exit ;;
 
1234
        exit 0 ;;
1242
1235
    *:TOPS-20:*:*)
1243
1236
        echo pdp10-unknown-tops20
1244
 
        exit ;;
 
1237
        exit 0 ;;
1245
1238
    *:ITS:*:*)
1246
1239
        echo pdp10-unknown-its
1247
 
        exit ;;
 
1240
        exit 0 ;;
1248
1241
    SEI:*:*:SEIUX)
1249
1242
        echo mips-sei-seiux${UNAME_RELEASE}
1250
 
        exit ;;
 
1243
        exit 0 ;;
1251
1244
    *:DragonFly:*:*)
1252
1245
        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1253
 
        exit ;;
 
1246
        exit 0 ;;
1254
1247
    *:*VMS:*:*)
1255
1248
        UNAME_MACHINE=`(uname -p) 2>/dev/null`
1256
1249
        case "${UNAME_MACHINE}" in
1257
 
            A*) echo alpha-dec-vms ; exit ;;
1258
 
            I*) echo ia64-dec-vms ; exit ;;
1259
 
            V*) echo vax-dec-vms ; exit ;;
 
1250
            A*) echo alpha-dec-vms && exit 0 ;;
 
1251
            I*) echo ia64-dec-vms && exit 0 ;;
 
1252
            V*) echo vax-dec-vms && exit 0 ;;
1260
1253
        esac ;;
1261
1254
    *:XENIX:*:SysV)
1262
1255
        echo i386-pc-xenix
1263
 
        exit ;;
1264
 
    i*86:skyos:*:*)
1265
 
        echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1266
 
        exit ;;
 
1256
        exit 0 ;;
1267
1257
esac
1268
1258
 
1269
1259
#echo '(No uname command or uname output not recognized.)' 1>&2
1295
1285
#endif
1296
1286
 
1297
1287
#if defined (__arm) && defined (__acorn) && defined (__unix)
1298
 
  printf ("arm-acorn-riscix\n"); exit (0);
 
1288
  printf ("arm-acorn-riscix"); exit (0);
1299
1289
#endif
1300
1290
 
1301
1291
#if defined (hp300) && !defined (hpux)
1384
1374
}
1385
1375
EOF
1386
1376
 
1387
 
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1388
 
        { echo "$SYSTEM_NAME"; exit; }
 
1377
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
1389
1378
 
1390
1379
# Apollos put the system type in the environment.
1391
1380
 
1392
 
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
 
1381
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
1393
1382
 
1394
1383
# Convex versions that predate uname can use getsysinfo(1)
1395
1384
 
1398
1387
    case `getsysinfo -f cpu_type` in
1399
1388
    c1*)
1400
1389
        echo c1-convex-bsd
1401
 
        exit ;;
 
1390
        exit 0 ;;
1402
1391
    c2*)
1403
1392
        if getsysinfo -f scalar_acc
1404
1393
        then echo c32-convex-bsd
1405
1394
        else echo c2-convex-bsd
1406
1395
        fi
1407
 
        exit ;;
 
1396
        exit 0 ;;
1408
1397
    c34*)
1409
1398
        echo c34-convex-bsd
1410
 
        exit ;;
 
1399
        exit 0 ;;
1411
1400
    c38*)
1412
1401
        echo c38-convex-bsd
1413
 
        exit ;;
 
1402
        exit 0 ;;
1414
1403
    c4*)
1415
1404
        echo c4-convex-bsd
1416
 
        exit ;;
 
1405
        exit 0 ;;
1417
1406
    esac
1418
1407
fi
1419
1408
 
1424
1413
the operating system you are using. It is advised that you
1425
1414
download the most up to date version of the config scripts from
1426
1415
 
1427
 
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1428
 
and
1429
 
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
 
1416
    ftp://ftp.gnu.org/pub/gnu/config/
1430
1417
 
1431
1418
If the version you run ($0) is already up to date, please
1432
1419
send the following data and any information you think might be