~ubuntu-branches/ubuntu/trusty/dejagnu/trusty-updates

« back to all changes in this revision

Viewing changes to config.guess

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Jacobowitz
  • Date: 2006-12-11 09:06:59 UTC
  • mfrom: (2.1.6 edgy)
  • Revision ID: james.westby@ubuntu.com-20061211090659-w586kgi3giz84053
Tags: 1.4.4.cvs20060709-3
* Acknowledge previous NMUs.
* Fix permissions on /usr/share/dejagnu when building without fakeroot
  (Closes: #392589, #379809).

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