~ubuntu-branches/ubuntu/breezy/kdemultimedia/breezy

« back to all changes in this revision

Viewing changes to admin/config.guess

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-03-24 04:48:58 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050324044858-8ff88o9jxej6ii3d
Tags: 4:3.4.0-0ubuntu3
Add kubuntu_02_hide_arts_menu_entries.diff to hide artsbuilder and artscontrol k-menu entries

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
 
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
4
 
#   Free Software Foundation, Inc.
 
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
 
4
#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
5
5
 
6
 
timestamp='2001-08-21'
 
6
timestamp='2004-06-24'
7
7
 
8
8
# This file is free software; you can redistribute it and/or modify it
9
9
# under the terms of the GNU General Public License as published by
24
24
# configuration script generated by Autoconf, you may include it under
25
25
# the same distribution terms that you use for the rest of that program.
26
26
 
27
 
# Written by Per Bothner <bothner@cygnus.com>.
28
 
# Please send patches to <config-patches@gnu.org>.
 
27
# Originally written by Per Bothner <per@bothner.com>.
 
28
# Please send patches to <config-patches@gnu.org>.  Submit a context
 
29
# diff and a properly formatted ChangeLog entry.
29
30
#
30
31
# This script attempts to guess a canonical system name similar to
31
32
# config.sub.  If it succeeds, it prints the system name on stdout, and
52
53
GNU config.guess ($timestamp)
53
54
 
54
55
Originally written by Per Bothner.
55
 
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 
56
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
56
57
Free Software Foundation, Inc.
57
58
 
58
59
This is free software; see the source for copying conditions.  There is NO
87
88
  exit 1
88
89
fi
89
90
 
90
 
 
91
 
dummy=dummy-$$
92
 
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
93
 
 
94
 
# CC_FOR_BUILD -- compiler used by this script.
 
91
trap 'exit 1' 1 2 15
 
92
 
 
93
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 
94
# compiler to aid in system detection is discouraged as it requires
 
95
# temporary files to be created and, as you can see below, it is a
 
96
# headache to deal with in a portable fashion.
 
97
 
95
98
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
96
99
# use `HOST_CC' if defined, but it is deprecated.
97
100
 
98
 
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
99
 
 ,,)    echo "int dummy(){}" > $dummy.c ;
100
 
        for c in cc gcc c89 ; do
101
 
          ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
102
 
          if test $? = 0 ; then
 
101
# Portable tmp directory creation inspired by the Autoconf team.
 
102
 
 
103
set_cc_for_build='
 
104
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
 
105
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
 
106
: ${TMPDIR=/tmp} ;
 
107
 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
 
108
 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
 
109
 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
 
110
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
 
111
dummy=$tmp/dummy ;
 
112
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
 
113
case $CC_FOR_BUILD,$HOST_CC,$CC in
 
114
 ,,)    echo "int x;" > $dummy.c ;
 
115
        for c in cc gcc c89 c99 ; do
 
116
          if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
103
117
             CC_FOR_BUILD="$c"; break ;
104
118
          fi ;
105
119
        done ;
106
 
        rm -f $dummy.c $dummy.o $dummy.rel ;
107
120
        if test x"$CC_FOR_BUILD" = x ; then
108
121
          CC_FOR_BUILD=no_compiler_found ;
109
122
        fi
110
123
        ;;
111
124
 ,,*)   CC_FOR_BUILD=$CC ;;
112
125
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
113
 
esac'
 
126
esac ;'
114
127
 
115
128
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
116
129
# (ghazi@noc.rutgers.edu 1994-08-24)
127
140
 
128
141
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
129
142
    *:NetBSD:*:*)
130
 
        # Netbsd (nbsd) targets should (where applicable) match one or
 
143
        # NetBSD (nbsd) targets should (where applicable) match one or
131
144
        # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
132
145
        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
133
146
        # switched to ELF, *-*-netbsd* would select the old
134
147
        # object file format.  This provides both forward
135
148
        # compatibility and a consistent mechanism for selecting the
136
149
        # object file format.
137
 
        # Determine the machine/vendor (is the vendor relevant).
138
 
        case "${UNAME_MACHINE}" in
139
 
            amiga) machine=m68k-unknown ;;
140
 
            arm32) machine=arm-unknown ;;
141
 
            atari*) machine=m68k-atari ;;
142
 
            sun3*) machine=m68k-sun ;;
143
 
            mac68k) machine=m68k-apple ;;
144
 
            macppc) machine=powerpc-apple ;;
145
 
            hp3[0-9][05]) machine=m68k-hp ;;
146
 
            ibmrt|romp-ibm) machine=romp-ibm ;;
147
 
            *) machine=${UNAME_MACHINE}-unknown ;;
 
150
        #
 
151
        # Note: NetBSD doesn't particularly care about the vendor
 
152
        # portion of the name.  We always set it to "unknown".
 
153
        sysctl="sysctl -n hw.machine_arch"
 
154
        UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
 
155
            /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
 
156
        case "${UNAME_MACHINE_ARCH}" in
 
157
            armeb) machine=armeb-unknown ;;
 
158
            arm*) machine=arm-unknown ;;
 
159
            sh3el) machine=shl-unknown ;;
 
160
            sh3eb) machine=sh-unknown ;;
 
161
            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
148
162
        esac
149
163
        # The Operating System including object format, if it has switched
150
164
        # to ELF recently, or will in the future.
151
 
        case "${UNAME_MACHINE}" in
152
 
            i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
 
165
        case "${UNAME_MACHINE_ARCH}" in
 
166
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
153
167
                eval $set_cc_for_build
154
168
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
155
169
                        | grep __ELF__ >/dev/null
166
180
                ;;
167
181
        esac
168
182
        # The OS release
169
 
        release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 
183
        # Debian GNU/NetBSD machines have a different userland, and
 
184
        # thus, need a distinct triplet. However, they do not need
 
185
        # kernel version information, so it can be replaced with a
 
186
        # suitable tag, in the style of linux-gnu.
 
187
        case "${UNAME_VERSION}" in
 
188
            Debian*)
 
189
                release='-gnu'
 
190
                ;;
 
191
            *)
 
192
                release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 
193
                ;;
 
194
        esac
170
195
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
171
196
        # contains redundant information, the shorter form:
172
197
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
173
198
        echo "${machine}-${os}${release}"
174
199
        exit 0 ;;
 
200
    amd64:OpenBSD:*:*)
 
201
        echo x86_64-unknown-openbsd${UNAME_RELEASE}
 
202
        exit 0 ;;
 
203
    amiga:OpenBSD:*:*)
 
204
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
205
        exit 0 ;;
 
206
    arc:OpenBSD:*:*)
 
207
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
 
208
        exit 0 ;;
 
209
    cats:OpenBSD:*:*)
 
210
        echo arm-unknown-openbsd${UNAME_RELEASE}
 
211
        exit 0 ;;
 
212
    hp300:OpenBSD:*:*)
 
213
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
214
        exit 0 ;;
 
215
    luna88k:OpenBSD:*:*)
 
216
        echo m88k-unknown-openbsd${UNAME_RELEASE}
 
217
        exit 0 ;;
 
218
    mac68k:OpenBSD:*:*)
 
219
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
220
        exit 0 ;;
 
221
    macppc:OpenBSD:*:*)
 
222
        echo powerpc-unknown-openbsd${UNAME_RELEASE}
 
223
        exit 0 ;;
 
224
    mvme68k:OpenBSD:*:*)
 
225
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
226
        exit 0 ;;
 
227
    mvme88k:OpenBSD:*:*)
 
228
        echo m88k-unknown-openbsd${UNAME_RELEASE}
 
229
        exit 0 ;;
 
230
    mvmeppc:OpenBSD:*:*)
 
231
        echo powerpc-unknown-openbsd${UNAME_RELEASE}
 
232
        exit 0 ;;
 
233
    pmax:OpenBSD:*:*)
 
234
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
 
235
        exit 0 ;;
 
236
    sgi:OpenBSD:*:*)
 
237
        echo mipseb-unknown-openbsd${UNAME_RELEASE}
 
238
        exit 0 ;;
 
239
    sun3:OpenBSD:*:*)
 
240
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
241
        exit 0 ;;
 
242
    wgrisc:OpenBSD:*:*)
 
243
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
 
244
        exit 0 ;;
 
245
    *:OpenBSD:*:*)
 
246
        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
 
247
        exit 0 ;;
 
248
    *:ekkoBSD:*:*)
 
249
        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
 
250
        exit 0 ;;
 
251
    macppc:MirBSD:*:*)
 
252
        echo powerppc-unknown-mirbsd${UNAME_RELEASE}
 
253
        exit 0 ;;
 
254
    *:MirBSD:*:*)
 
255
        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
 
256
        exit 0 ;;
175
257
    alpha:OSF1:*:*)
176
 
        if test $UNAME_RELEASE = "V4.0"; then
 
258
        case $UNAME_RELEASE in
 
259
        *4.0)
177
260
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
178
 
        fi
 
261
                ;;
 
262
        *5.*)
 
263
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
 
264
                ;;
 
265
        esac
 
266
        # According to Compaq, /usr/sbin/psrinfo has been available on
 
267
        # OSF/1 and Tru64 systems produced since 1995.  I hope that
 
268
        # covers most systems running today.  This code pipes the CPU
 
269
        # types through head -n 1, so we only detect the type of CPU 0.
 
270
        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
 
271
        case "$ALPHA_CPU_TYPE" in
 
272
            "EV4 (21064)")
 
273
                UNAME_MACHINE="alpha" ;;
 
274
            "EV4.5 (21064)")
 
275
                UNAME_MACHINE="alpha" ;;
 
276
            "LCA4 (21066/21068)")
 
277
                UNAME_MACHINE="alpha" ;;
 
278
            "EV5 (21164)")
 
279
                UNAME_MACHINE="alphaev5" ;;
 
280
            "EV5.6 (21164A)")
 
281
                UNAME_MACHINE="alphaev56" ;;
 
282
            "EV5.6 (21164PC)")
 
283
                UNAME_MACHINE="alphapca56" ;;
 
284
            "EV5.7 (21164PC)")
 
285
                UNAME_MACHINE="alphapca57" ;;
 
286
            "EV6 (21264)")
 
287
                UNAME_MACHINE="alphaev6" ;;
 
288
            "EV6.7 (21264A)")
 
289
                UNAME_MACHINE="alphaev67" ;;
 
290
            "EV6.8CB (21264C)")
 
291
                UNAME_MACHINE="alphaev68" ;;
 
292
            "EV6.8AL (21264B)")
 
293
                UNAME_MACHINE="alphaev68" ;;
 
294
            "EV6.8CX (21264D)")
 
295
                UNAME_MACHINE="alphaev68" ;;
 
296
            "EV6.9A (21264/EV69A)")
 
297
                UNAME_MACHINE="alphaev69" ;;
 
298
            "EV7 (21364)")
 
299
                UNAME_MACHINE="alphaev7" ;;
 
300
            "EV7.9 (21364A)")
 
301
                UNAME_MACHINE="alphaev79" ;;
 
302
        esac
 
303
        # A Pn.n version is a patched version.
179
304
        # A Vn.n version is a released version.
180
305
        # A Tn.n version is a released field test version.
181
306
        # A Xn.n version is an unreleased experimental baselevel.
182
307
        # 1.2 uses "1.2" for uname -r.
183
 
        cat <<EOF >$dummy.s
184
 
        .data
185
 
\$Lformat:
186
 
        .byte 37,100,45,37,120,10,0     # "%d-%x\n"
187
 
 
188
 
        .text
189
 
        .globl main
190
 
        .align 4
191
 
        .ent main
192
 
main:
193
 
        .frame \$30,16,\$26,0
194
 
        ldgp \$29,0(\$27)
195
 
        .prologue 1
196
 
        .long 0x47e03d80 # implver \$0
197
 
        lda \$2,-1
198
 
        .long 0x47e20c21 # amask \$2,\$1
199
 
        lda \$16,\$Lformat
200
 
        mov \$0,\$17
201
 
        not \$1,\$18
202
 
        jsr \$26,printf
203
 
        ldgp \$29,0(\$26)
204
 
        mov 0,\$16
205
 
        jsr \$26,exit
206
 
        .end main
207
 
EOF
208
 
        eval $set_cc_for_build
209
 
        $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
210
 
        if test "$?" = 0 ; then
211
 
                case `./$dummy` in
212
 
                        0-0)
213
 
                                UNAME_MACHINE="alpha"
214
 
                                ;;
215
 
                        1-0)
216
 
                                UNAME_MACHINE="alphaev5"
217
 
                                ;;
218
 
                        1-1)
219
 
                                UNAME_MACHINE="alphaev56"
220
 
                                ;;
221
 
                        1-101)
222
 
                                UNAME_MACHINE="alphapca56"
223
 
                                ;;
224
 
                        2-303)
225
 
                                UNAME_MACHINE="alphaev6"
226
 
                                ;;
227
 
                        2-307)
228
 
                                UNAME_MACHINE="alphaev67"
229
 
                                ;;
230
 
                        2-1307)
231
 
                                UNAME_MACHINE="alphaev68"
232
 
                                ;;
233
 
                esac
234
 
        fi
235
 
        rm -f $dummy.s $dummy
236
 
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 
308
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
237
309
        exit 0 ;;
238
310
    Alpha\ *:Windows_NT*:*)
239
311
        # How do we know it's Interix rather than the generic POSIX subsystem?
247
319
    Amiga*:UNIX_System_V:4.0:*)
248
320
        echo m68k-unknown-sysv4
249
321
        exit 0;;
250
 
    amiga:OpenBSD:*:*)
251
 
        echo m68k-unknown-openbsd${UNAME_RELEASE}
252
 
        exit 0 ;;
253
322
    *:[Aa]miga[Oo][Ss]:*:*)
254
323
        echo ${UNAME_MACHINE}-unknown-amigaos
255
324
        exit 0 ;;
256
 
    arc64:OpenBSD:*:*)
257
 
        echo mips64el-unknown-openbsd${UNAME_RELEASE}
258
 
        exit 0 ;;
259
 
    arc:OpenBSD:*:*)
260
 
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
261
 
        exit 0 ;;
262
 
    hkmips:OpenBSD:*:*)
263
 
        echo mips-unknown-openbsd${UNAME_RELEASE}
264
 
        exit 0 ;;
265
 
    pmax:OpenBSD:*:*)
266
 
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
267
 
        exit 0 ;;
268
 
    sgi:OpenBSD:*:*)
269
 
        echo mips-unknown-openbsd${UNAME_RELEASE}
270
 
        exit 0 ;;
271
 
    wgrisc:OpenBSD:*:*)
272
 
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
 
325
    *:[Mm]orph[Oo][Ss]:*:*)
 
326
        echo ${UNAME_MACHINE}-unknown-morphos
273
327
        exit 0 ;;
274
328
    *:OS/390:*:*)
275
329
        echo i370-ibm-openedition
276
330
        exit 0 ;;
 
331
    *:OS400:*:*)
 
332
        echo powerpc-ibm-os400
 
333
        exit 0 ;;
277
334
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
278
335
        echo arm-acorn-riscix${UNAME_RELEASE}
279
336
        exit 0;;
291
348
    NILE*:*:*:dcosx)
292
349
        echo pyramid-pyramid-svr4
293
350
        exit 0 ;;
 
351
    DRS?6000:unix:4.0:6*)
 
352
        echo sparc-icl-nx6
 
353
        exit 0 ;;
 
354
    DRS?6000:UNIX_SV:4.2*:7*)
 
355
        case `/usr/bin/uname -p` in
 
356
            sparc) echo sparc-icl-nx7 && exit 0 ;;
 
357
        esac ;;
294
358
    sun4H:SunOS:5.*:*)
295
359
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
296
360
        exit 0 ;;
319
383
        echo m68k-sun-sunos${UNAME_RELEASE}
320
384
        exit 0 ;;
321
385
    sun*:*:4.2BSD:*)
322
 
        UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
 
386
        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
323
387
        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
324
388
        case "`/bin/arch`" in
325
389
            sun3)
333
397
    aushp:SunOS:*:*)
334
398
        echo sparc-auspex-sunos${UNAME_RELEASE}
335
399
        exit 0 ;;
336
 
    sparc*:NetBSD:*)
337
 
        echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
338
 
        exit 0 ;;
339
 
    atari*:OpenBSD:*:*)
340
 
        echo m68k-unknown-openbsd${UNAME_RELEASE}
341
 
        exit 0 ;;
342
400
    # The situation for MiNT is a little confusing.  The machine name
343
401
    # can be virtually everything (everything which is not
344
402
    # "atarist" or "atariste" at least should have a processor
365
423
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
366
424
        echo m68k-unknown-mint${UNAME_RELEASE}
367
425
        exit 0 ;;
368
 
    sun3*:OpenBSD:*:*)
369
 
        echo m68k-unknown-openbsd${UNAME_RELEASE}
370
 
        exit 0 ;;
371
 
    mac68k:OpenBSD:*:*)
372
 
        echo m68k-unknown-openbsd${UNAME_RELEASE}
373
 
        exit 0 ;;
374
 
    mvme68k:OpenBSD:*:*)
375
 
        echo m68k-unknown-openbsd${UNAME_RELEASE}
376
 
        exit 0 ;;
377
 
    mvme88k:OpenBSD:*:*)
378
 
        echo m88k-unknown-openbsd${UNAME_RELEASE}
 
426
    m68k:machten:*:*)
 
427
        echo m68k-apple-machten${UNAME_RELEASE}
379
428
        exit 0 ;;
380
429
    powerpc:machten:*:*)
381
430
        echo powerpc-apple-machten${UNAME_RELEASE}
393
442
        echo clipper-intergraph-clix${UNAME_RELEASE}
394
443
        exit 0 ;;
395
444
    mips:*:*:UMIPS | mips:*:*:RISCos)
 
445
        eval $set_cc_for_build
396
446
        sed 's/^        //' << EOF >$dummy.c
397
447
#ifdef __cplusplus
398
448
#include <stdio.h>  /* for printf() prototype */
414
464
          exit (-1);
415
465
        }
416
466
EOF
417
 
        eval $set_cc_for_build
418
 
        $CC_FOR_BUILD $dummy.c -o $dummy \
419
 
          && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
420
 
          && rm -f $dummy.c $dummy && exit 0
421
 
        rm -f $dummy.c $dummy
 
467
        $CC_FOR_BUILD -o $dummy $dummy.c \
 
468
          && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
 
469
          && exit 0
422
470
        echo mips-mips-riscos${UNAME_RELEASE}
423
471
        exit 0 ;;
424
472
    Motorola:PowerMAX_OS:*:*)
425
473
        echo powerpc-motorola-powermax
426
474
        exit 0 ;;
 
475
    Motorola:*:4.3:PL8-*)
 
476
        echo powerpc-harris-powermax
 
477
        exit 0 ;;
 
478
    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
 
479
        echo powerpc-harris-powermax
 
480
        exit 0 ;;
427
481
    Night_Hawk:Power_UNIX:*:*)
428
482
        echo powerpc-harris-powerunix
429
483
        exit 0 ;;
484
538
        exit 0 ;;
485
539
    *:AIX:2:3)
486
540
        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
 
541
                eval $set_cc_for_build
487
542
                sed 's/^                //' << EOF >$dummy.c
488
543
                #include <sys/systemcfg.h>
489
544
 
495
550
                        exit(0);
496
551
                        }
497
552
EOF
498
 
                eval $set_cc_for_build
499
 
                $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
500
 
                rm -f $dummy.c $dummy
 
553
                $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
501
554
                echo rs6000-ibm-aix3.2.5
502
555
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
503
556
                echo rs6000-ibm-aix3.2.4
506
559
        fi
507
560
        exit 0 ;;
508
561
    *:AIX:*:[45])
509
 
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
 
562
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
510
563
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
511
564
                IBM_ARCH=rs6000
512
565
        else
546
599
            9000/31? )            HP_ARCH=m68000 ;;
547
600
            9000/[34]?? )         HP_ARCH=m68k ;;
548
601
            9000/[678][0-9][0-9])
549
 
              case "${HPUX_REV}" in
550
 
                11.[0-9][0-9])
551
 
                  if [ -x /usr/bin/getconf ]; then
552
 
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 
602
                if [ -x /usr/bin/getconf ]; then
 
603
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
553
604
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
554
605
                    case "${sc_cpu_version}" in
555
606
                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
558
609
                        case "${sc_kernel_bits}" in
559
610
                          32) HP_ARCH="hppa2.0n" ;;
560
611
                          64) HP_ARCH="hppa2.0w" ;;
 
612
                          '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
561
613
                        esac ;;
562
614
                    esac
563
 
                  fi ;;
564
 
              esac
565
 
              if [ "${HP_ARCH}" = "" ]; then
566
 
              sed 's/^              //' << EOF >$dummy.c
 
615
                fi
 
616
                if [ "${HP_ARCH}" = "" ]; then
 
617
                    eval $set_cc_for_build
 
618
                    sed 's/^              //' << EOF >$dummy.c
567
619
 
568
620
              #define _HPUX_SOURCE
569
621
              #include <stdlib.h>
596
648
                  exit (0);
597
649
              }
598
650
EOF
599
 
        eval $set_cc_for_build
600
 
        (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
601
 
        if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
602
 
        rm -f $dummy.c $dummy
603
 
        fi ;;
 
651
                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 
652
                    test -z "$HP_ARCH" && HP_ARCH=hppa
 
653
                fi ;;
604
654
        esac
 
655
        if [ ${HP_ARCH} = "hppa2.0w" ]
 
656
        then
 
657
            # avoid double evaluation of $set_cc_for_build
 
658
            test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
 
659
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
 
660
            then
 
661
                HP_ARCH="hppa2.0w"
 
662
            else
 
663
                HP_ARCH="hppa64"
 
664
            fi
 
665
        fi
605
666
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
606
667
        exit 0 ;;
607
668
    ia64:HP-UX:*:*)
609
670
        echo ia64-hp-hpux${HPUX_REV}
610
671
        exit 0 ;;
611
672
    3050*:HI-UX:*:*)
 
673
        eval $set_cc_for_build
612
674
        sed 's/^        //' << EOF >$dummy.c
613
675
        #include <unistd.h>
614
676
        int
634
696
          exit (0);
635
697
        }
636
698
EOF
637
 
        eval $set_cc_for_build
638
 
        $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
639
 
        rm -f $dummy.c $dummy
 
699
        $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
640
700
        echo unknown-hitachi-hiuxwe2
641
701
        exit 0 ;;
642
702
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
664
724
    parisc*:Lites*:*:*)
665
725
        echo hppa1.1-hp-lites
666
726
        exit 0 ;;
667
 
    hppa*:OpenBSD:*:*)
668
 
        echo hppa-unknown-openbsd
669
 
        exit 0 ;;
670
727
    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
671
728
        echo c1-convex-bsd
672
729
        exit 0 ;;
685
742
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
686
743
        echo c4-convex-bsd
687
744
        exit 0 ;;
688
 
    CRAY*X-MP:*:*:*)
689
 
        echo xmp-cray-unicos
690
 
        exit 0 ;;
691
745
    CRAY*Y-MP:*:*:*)
692
746
        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
693
747
        exit 0 ;;
700
754
    CRAY*TS:*:*:*)
701
755
        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
702
756
        exit 0 ;;
703
 
    CRAY*T3D:*:*:*)
704
 
        echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
705
 
        exit 0 ;;
706
757
    CRAY*T3E:*:*:*)
707
758
        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
708
759
        exit 0 ;;
709
760
    CRAY*SV1:*:*:*)
710
761
        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
711
762
        exit 0 ;;
712
 
    CRAY-2:*:*:*)
713
 
        echo cray2-cray-unicos
714
 
        exit 0 ;;
 
763
    *:UNICOS/mp:*:*)
 
764
        echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 
765
        exit 0 ;;
715
766
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
716
767
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
717
768
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
718
769
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
719
770
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
720
771
        exit 0 ;;
721
 
    hp300:OpenBSD:*:*)
722
 
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
772
    5000:UNIX_System_V:4.*:*)
 
773
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
 
774
        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
 
775
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
723
776
        exit 0 ;;
724
777
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
725
778
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
733
786
    *:FreeBSD:*:*)
734
787
        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
735
788
        exit 0 ;;
736
 
    *:OpenBSD:*:*)
737
 
        echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
738
 
        exit 0 ;;
739
789
    i*:CYGWIN*:*)
740
790
        echo ${UNAME_MACHINE}-pc-cygwin
741
791
        exit 0 ;;
745
795
    i*:PW*:*)
746
796
        echo ${UNAME_MACHINE}-pc-pw32
747
797
        exit 0 ;;
 
798
    x86:Interix*:[34]*)
 
799
        echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
 
800
        exit 0 ;;
 
801
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 
802
        echo i${UNAME_MACHINE}-pc-mks
 
803
        exit 0 ;;
748
804
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
749
805
        # How do we know it's Interix rather than the generic POSIX subsystem?
750
806
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
751
807
        # UNAME_MACHINE based on the output of uname instead of i386?
752
 
        echo i386-pc-interix
 
808
        echo i586-pc-interix
753
809
        exit 0 ;;
754
810
    i*:UWIN*:*)
755
811
        echo ${UNAME_MACHINE}-pc-uwin
761
817
        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
762
818
        exit 0 ;;
763
819
    *:GNU:*:*)
 
820
        # the GNU system
764
821
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
765
822
        exit 0 ;;
 
823
    *:GNU/*:*:*)
 
824
        # other systems with GNU libc and userland
 
825
        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
 
826
        exit 0 ;;
766
827
    i*86:Minix:*:*)
767
828
        echo ${UNAME_MACHINE}-pc-minix
768
829
        exit 0 ;;
769
830
    arm*:Linux:*:*)
770
831
        echo ${UNAME_MACHINE}-unknown-linux-gnu
771
832
        exit 0 ;;
 
833
    cris:Linux:*:*)
 
834
        echo cris-axis-linux-gnu
 
835
        exit 0 ;;
772
836
    ia64:Linux:*:*)
773
 
        echo ${UNAME_MACHINE}-unknown-linux
 
837
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
838
        exit 0 ;;
 
839
    m32r*:Linux:*:*)
 
840
        echo ${UNAME_MACHINE}-unknown-linux-gnu
774
841
        exit 0 ;;
775
842
    m68*:Linux:*:*)
776
843
        echo ${UNAME_MACHINE}-unknown-linux-gnu
777
844
        exit 0 ;;
778
845
    mips:Linux:*:*)
779
 
        case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
780
 
          big)    echo mips-unknown-linux-gnu && exit 0 ;;
781
 
          little) echo mipsel-unknown-linux-gnu && exit 0 ;;
782
 
        esac
783
 
        # Since Linux 2.4.20-* there is no such line in /proc/cpuinfo anymore
784
 
        eval $set_cc_for_build
785
 
        sed 's/^        //' << EOF > $dummy.c
786
 
        #include <stdio.h>
787
 
        int
788
 
        main ()
789
 
        {
790
 
          exit (0);
791
 
        }
792
 
EOF
793
 
        $CC_FOR_BUILD $dummy.c -o $dummy
794
 
        case `file $dummy` in
795
 
          *MIPS\ *_BE*)    echo mips-unknown-linux-gnu && exit 0 ;;
796
 
          *MIPS\ *_LE*) echo mipsel-unknown-linux-gnu && exit 0 ;;
797
 
          *MSB\ MIPS-I\ executable*)    echo mips-unknown-linux-gnu && exit 0 ;;
798
 
          *LSB\ MIPS-I\ executable*) echo mipsel-unknown-linux-gnu && exit 0 ;;
799
 
        esac
800
 
        rm -f $dummy.c $dummy
 
846
        eval $set_cc_for_build
 
847
        sed 's/^        //' << EOF >$dummy.c
 
848
        #undef CPU
 
849
        #undef mips
 
850
        #undef mipsel
 
851
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
 
852
        CPU=mipsel
 
853
        #else
 
854
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
 
855
        CPU=mips
 
856
        #else
 
857
        CPU=
 
858
        #endif
 
859
        #endif
 
860
EOF
 
861
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
 
862
        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
 
863
        ;;
 
864
    mips64:Linux:*:*)
 
865
        eval $set_cc_for_build
 
866
        sed 's/^        //' << EOF >$dummy.c
 
867
        #undef CPU
 
868
        #undef mips64
 
869
        #undef mips64el
 
870
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
 
871
        CPU=mips64el
 
872
        #else
 
873
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
 
874
        CPU=mips64
 
875
        #else
 
876
        CPU=
 
877
        #endif
 
878
        #endif
 
879
EOF
 
880
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
 
881
        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
801
882
        ;;
802
883
    ppc:Linux:*:*)
803
884
        echo powerpc-unknown-linux-gnu
833
914
    s390:Linux:*:* | s390x:Linux:*:*)
834
915
        echo ${UNAME_MACHINE}-ibm-linux
835
916
        exit 0 ;;
 
917
    sh64*:Linux:*:*)
 
918
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
919
        exit 0 ;;
836
920
    sh*:Linux:*:*)
837
921
        echo ${UNAME_MACHINE}-unknown-linux-gnu
838
922
        exit 0 ;;
846
930
        # The BFD linker knows what the default object file format is, so
847
931
        # first see if it will tell us. cd to the root directory to prevent
848
932
        # problems with other programs or directories called `ld' in the path.
849
 
        ld_supported_targets=`cd /; ld --help 2>&1 \
 
933
        # Set LC_ALL=C to ensure ld outputs messages in English.
 
934
        ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
850
935
                         | sed -ne '/supported targets:/!d
851
936
                                    s/[         ][      ]*/ /g
852
937
                                    s/.*supported targets: *//
858
943
                ;;
859
944
          a.out-i386-linux)
860
945
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
861
 
                exit 0 ;;               
 
946
                exit 0 ;;
862
947
          coff-i386)
863
948
                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
864
949
                exit 0 ;;
869
954
                exit 0 ;;
870
955
        esac
871
956
        # Determine whether the default compiler is a.out or elf
872
 
        cat >$dummy.c <<EOF
873
 
#include <features.h>
874
 
#ifdef __cplusplus
875
 
#include <stdio.h>  /* for printf() prototype */
876
 
        int main (int argc, char *argv[]) {
877
 
#else
878
 
        int main (argc, argv) int argc; char *argv[]; {
879
 
#endif
880
 
#ifdef __ELF__
881
 
# ifdef __GLIBC__
882
 
#  if __GLIBC__ >= 2
883
 
    printf ("%s-pc-linux-gnu\n", argv[1]);
884
 
#  else
885
 
    printf ("%s-pc-linux-gnulibc1\n", argv[1]);
886
 
#  endif
887
 
# else
888
 
   printf ("%s-pc-linux-gnulibc1\n", argv[1]);
889
 
# endif
890
 
#else
891
 
  printf ("%s-pc-linux-gnuaout\n", argv[1]);
892
 
#endif
893
 
  return 0;
894
 
}
 
957
        eval $set_cc_for_build
 
958
        sed 's/^        //' << EOF >$dummy.c
 
959
        #include <features.h>
 
960
        #ifdef __ELF__
 
961
        # ifdef __GLIBC__
 
962
        #  if __GLIBC__ >= 2
 
963
        LIBC=gnu
 
964
        #  else
 
965
        LIBC=gnulibc1
 
966
        #  endif
 
967
        # else
 
968
        LIBC=gnulibc1
 
969
        # endif
 
970
        #else
 
971
        #ifdef __INTEL_COMPILER
 
972
        LIBC=gnu
 
973
        #else
 
974
        LIBC=gnuaout
 
975
        #endif
 
976
        #endif
 
977
        #ifdef __dietlibc__
 
978
        LIBC=dietlibc
 
979
        #endif
895
980
EOF
896
 
        eval $set_cc_for_build
897
 
        $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
898
 
        rm -f $dummy.c $dummy
 
981
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
 
982
        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
899
983
        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
900
984
        ;;
901
985
    i*86:DYNIX/ptx:4*:*)
912
996
        # Use sysv4.2uw... so that sysv4* matches it.
913
997
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
914
998
        exit 0 ;;
 
999
    i*86:OS/2:*:*)
 
1000
        # If we were able to find `uname', then EMX Unix compatibility
 
1001
        # is probably installed.
 
1002
        echo ${UNAME_MACHINE}-pc-os2-emx
 
1003
        exit 0 ;;
 
1004
    i*86:XTS-300:*:STOP)
 
1005
        echo ${UNAME_MACHINE}-unknown-stop
 
1006
        exit 0 ;;
 
1007
    i*86:atheos:*:*)
 
1008
        echo ${UNAME_MACHINE}-unknown-atheos
 
1009
        exit 0 ;;
 
1010
        i*86:syllable:*:*)
 
1011
        echo ${UNAME_MACHINE}-pc-syllable
 
1012
        exit 0 ;;
 
1013
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
 
1014
        echo i386-unknown-lynxos${UNAME_RELEASE}
 
1015
        exit 0 ;;
 
1016
    i*86:*DOS:*:*)
 
1017
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
 
1018
        exit 0 ;;
915
1019
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
916
1020
        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
917
1021
        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
933
1037
                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
934
1038
                echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
935
1039
        elif /bin/uname -X 2>/dev/null >/dev/null ; then
936
 
                UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
937
 
                (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
938
 
                (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
 
1040
                UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
 
1041
                (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
 
1042
                (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
939
1043
                        && UNAME_MACHINE=i586
940
 
                (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
 
1044
                (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
941
1045
                        && UNAME_MACHINE=i686
942
 
                (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
 
1046
                (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
943
1047
                        && UNAME_MACHINE=i686
944
1048
                echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
945
1049
        else
946
1050
                echo ${UNAME_MACHINE}-pc-sysv32
947
1051
        fi
948
1052
        exit 0 ;;
949
 
    i*86:*DOS:*:*)
950
 
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
951
 
        exit 0 ;;
952
1053
    pc:*:*:*)
953
1054
        # Left here for compatibility:
954
1055
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
972
1073
        # "miniframe"
973
1074
        echo m68010-convergent-sysv
974
1075
        exit 0 ;;
975
 
    M68*:*:R3V[567]*:*)
 
1076
    mc68k:UNIX:SYSTEM5:3.51m)
 
1077
        echo m68k-convergent-sysv
 
1078
        exit 0 ;;
 
1079
    M680?0:D-NIX:5.3:*)
 
1080
        echo m68k-diab-dnix
 
1081
        exit 0 ;;
 
1082
    M68*:*:R3V[5678]*:*)
976
1083
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
977
 
    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
 
1084
    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
978
1085
        OS_REL=''
979
1086
        test -r /etc/.relid \
980
1087
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
991
1098
    mc68030:UNIX_System_V:4.*:*)
992
1099
        echo m68k-atari-sysv4
993
1100
        exit 0 ;;
994
 
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
995
 
        echo i386-unknown-lynxos${UNAME_RELEASE}
996
 
        exit 0 ;;
997
1101
    TSUNAMI:LynxOS:2.*:*)
998
1102
        echo sparc-unknown-lynxos${UNAME_RELEASE}
999
1103
        exit 0 ;;
1065
1169
    SX-5:SUPER-UX:*:*)
1066
1170
        echo sx5-nec-superux${UNAME_RELEASE}
1067
1171
        exit 0 ;;
 
1172
    SX-6:SUPER-UX:*:*)
 
1173
        echo sx6-nec-superux${UNAME_RELEASE}
 
1174
        exit 0 ;;
1068
1175
    Power*:Rhapsody:*:*)
1069
1176
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
1070
1177
        exit 0 ;;
1072
1179
        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1073
1180
        exit 0 ;;
1074
1181
    *:Darwin:*:*)
1075
 
        echo `uname -p`-apple-darwin${UNAME_RELEASE}
 
1182
        case `uname -p` in
 
1183
            *86) UNAME_PROCESSOR=i686 ;;
 
1184
            powerpc) UNAME_PROCESSOR=powerpc ;;
 
1185
        esac
 
1186
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1076
1187
        exit 0 ;;
1077
1188
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1078
 
        if test "${UNAME_MACHINE}" = "x86pc"; then
 
1189
        UNAME_PROCESSOR=`uname -p`
 
1190
        if test "$UNAME_PROCESSOR" = "x86"; then
 
1191
                UNAME_PROCESSOR=i386
1079
1192
                UNAME_MACHINE=pc
1080
1193
        fi
1081
 
        echo `uname -p`-${UNAME_MACHINE}-nto-qnx
 
1194
        echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1082
1195
        exit 0 ;;
1083
1196
    *:QNX:*:4*)
1084
1197
        echo i386-pc-qnx
1085
1198
        exit 0 ;;
1086
 
    NSR-[KW]:NONSTOP_KERNEL:*:*)
 
1199
    NSR-?:NONSTOP_KERNEL:*:*)
1087
1200
        echo nsr-tandem-nsk${UNAME_RELEASE}
1088
1201
        exit 0 ;;
1089
1202
    *:NonStop-UX:*:*)
1106
1219
        fi
1107
1220
        echo ${UNAME_MACHINE}-unknown-plan9
1108
1221
        exit 0 ;;
1109
 
    i*86:OS/2:*:*)
1110
 
        # If we were able to find `uname', then EMX Unix compatibility
1111
 
        # is probably installed.
1112
 
        echo ${UNAME_MACHINE}-pc-os2-emx
1113
 
        exit 0 ;;
1114
1222
    *:TOPS-10:*:*)
1115
1223
        echo pdp10-unknown-tops10
1116
1224
        exit 0 ;;
1129
1237
    *:ITS:*:*)
1130
1238
        echo pdp10-unknown-its
1131
1239
        exit 0 ;;
1132
 
    i*86:XTS-300:*:STOP)
1133
 
        echo ${UNAME_MACHINE}-unknown-stop
1134
 
        exit 0 ;;
 
1240
    SEI:*:*:SEIUX)
 
1241
        echo mips-sei-seiux${UNAME_RELEASE}
 
1242
        exit 0 ;;
 
1243
    *:DragonFly:*:*)
 
1244
        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 
1245
        exit 0 ;;
 
1246
    *:*VMS:*:*)
 
1247
        UNAME_MACHINE=`(uname -p) 2>/dev/null`
 
1248
        case "${UNAME_MACHINE}" in
 
1249
            A*) echo alpha-dec-vms && exit 0 ;;
 
1250
            I*) echo ia64-dec-vms && exit 0 ;;
 
1251
            V*) echo vax-dec-vms && exit 0 ;;
 
1252
        esac
1135
1253
esac
1136
1254
 
1137
1255
#echo '(No uname command or uname output not recognized.)' 1>&2
1138
1256
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1139
1257
 
 
1258
eval $set_cc_for_build
1140
1259
cat >$dummy.c <<EOF
1141
1260
#ifdef _SEQUENT_
1142
1261
# include <sys/types.h>
1251
1370
}
1252
1371
EOF
1253
1372
 
1254
 
eval $set_cc_for_build
1255
 
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
1256
 
rm -f $dummy.c $dummy
 
1373
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
1257
1374
 
1258
1375
# Apollos put the system type in the environment.
1259
1376