~ubuntu-branches/ubuntu/quantal/globus-gass-cache/quantal

« back to all changes in this revision

Viewing changes to config.guess

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2012-01-24 22:53:19 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20120124225319-o7jmdf1azowro30c
Tags: 8.1-2
Fix broken links in README file

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