~ubuntu-branches/ubuntu/vivid/xemacs21/vivid

« back to all changes in this revision

Viewing changes to config.guess

  • Committer: Bazaar Package Importer
  • Author(s): Albin Tonnerre
  • Date: 2008-08-03 00:25:32 UTC
  • mfrom: (2.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20080803002532-jdmsqqf8wp7t0qmu
Tags: 21.4.21-4ubuntu1
* Merge from debian unstable. Remaining changes:
  - debian/patches/21_fix_maximation_bug.dpatch:
    + Fix maximation issue, where xemacs21 meant to stay in an infinite loop

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,
4
 
#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 
4
#   Free Software Foundation, Inc.
5
5
 
6
 
timestamp='2004-08-13'
 
6
timestamp='2004-08-12'
7
7
 
8
8
# This file is free software; you can redistribute it and/or modify it
9
9
# under the terms of the GNU General Public License as published by
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
 
# 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.
 
27
# Written by Per Bothner <bothner@cygnus.com>.
 
28
# Please send patches to <config-patches@gnu.org>.
30
29
#
31
30
# This script attempts to guess a canonical system name similar to
32
31
# config.sub.  If it succeeds, it prints the system name on stdout, and
34
33
#
35
34
# The plan is that this can be called by configure scripts if you
36
35
# don't specify an explicit build system type.
 
36
#
 
37
# Only a few systems have been added to this list; please add others
 
38
# (but try to keep the structure clean).
 
39
#
37
40
 
38
41
me=`echo "$0" | sed -e 's,.*/,,'`
39
42
 
53
56
GNU config.guess ($timestamp)
54
57
 
55
58
Originally written by Per Bothner.
56
 
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 
59
Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
57
60
Free Software Foundation, Inc.
58
61
 
59
62
This is free software; see the source for copying conditions.  There is NO
88
91
  exit 1
89
92
fi
90
93
 
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
 
 
 
94
 
 
95
dummy=dummy-$$
 
96
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
 
97
 
 
98
# CC_FOR_BUILD -- compiler used by this script.
98
99
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
99
100
# use `HOST_CC' if defined, but it is deprecated.
100
101
 
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
102
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
117
 
             CC_FOR_BUILD="$c"; break ;
118
 
          fi ;
119
 
        done ;
 
103
 ,,)    echo "int dummy(){}" > $dummy.c
 
104
        for c in cc gcc c89 ; do
 
105
          ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
 
106
          if test $? = 0 ; then
 
107
             CC_FOR_BUILD="$c"; break
 
108
          fi
 
109
        done
 
110
        rm -f $dummy.c $dummy.o $dummy.rel
120
111
        if test x"$CC_FOR_BUILD" = x ; then
121
 
          CC_FOR_BUILD=no_compiler_found ;
 
112
          CC_FOR_BUILD=no_compiler_found
122
113
        fi
123
114
        ;;
124
115
 ,,*)   CC_FOR_BUILD=$CC ;;
125
116
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
126
 
esac ;'
 
117
esac
127
118
 
128
119
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
129
 
# (ghazi@noc.rutgers.edu 1994-08-24)
 
120
# (ghazi@noc.rutgers.edu 8/24/94.)
130
121
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
131
122
        PATH=$PATH:/.attbin ; export PATH
132
123
fi
140
131
 
141
132
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
142
133
    *:NetBSD:*:*)
143
 
        # NetBSD (nbsd) targets should (where applicable) match one or
 
134
        # Netbsd (nbsd) targets should (where applicable) match one or
144
135
        # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
145
136
        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
146
137
        # switched to ELF, *-*-netbsd* would select the old
147
138
        # object file format.  This provides both forward
148
139
        # compatibility and a consistent mechanism for selecting the
149
140
        # object file format.
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 ;;
 
141
        # Determine the machine/vendor (is the vendor relevant).
 
142
        case "${UNAME_MACHINE}" in
 
143
            amiga) machine=m68k-unknown ;;
 
144
            arm32) machine=arm-unknown ;;
 
145
            atari*) machine=m68k-atari ;;
 
146
            sun3*) machine=m68k-sun ;;
 
147
            mac68k) machine=m68k-apple ;;
 
148
            macppc) machine=powerpc-apple ;;
 
149
            hp3[0-9][05]) machine=m68k-hp ;;
 
150
            ibmrt|romp-ibm) machine=romp-ibm ;;
 
151
            *) machine=${UNAME_MACHINE}-unknown ;;
162
152
        esac
163
153
        # The Operating System including object format, if it has switched
164
154
        # to ELF recently, or will in the future.
165
 
        case "${UNAME_MACHINE_ARCH}" in
166
 
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
167
 
                eval $set_cc_for_build
 
155
        case "${UNAME_MACHINE}" in
 
156
            i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
168
157
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
169
158
                        | grep __ELF__ >/dev/null
170
159
                then
180
169
                ;;
181
170
        esac
182
171
        # The OS release
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
 
172
        release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
195
173
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
196
174
        # contains redundant information, the shorter form:
197
175
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
198
176
        echo "${machine}-${os}${release}"
199
177
        exit 0 ;;
200
 
    amd64:OpenBSD:*:*)
201
 
        echo x86_64-unknown-openbsd${UNAME_RELEASE}
202
 
        exit 0 ;;
203
 
    amiga:OpenBSD:*:*)
204
 
        echo m68k-unknown-openbsd${UNAME_RELEASE}
205
 
        exit 0 ;;
206
 
    cats:OpenBSD:*:*)
207
 
        echo arm-unknown-openbsd${UNAME_RELEASE}
208
 
        exit 0 ;;
209
 
    hp300:OpenBSD:*:*)
210
 
        echo m68k-unknown-openbsd${UNAME_RELEASE}
211
 
        exit 0 ;;
212
 
    luna88k:OpenBSD:*:*)
213
 
        echo m88k-unknown-openbsd${UNAME_RELEASE}
214
 
        exit 0 ;;
215
 
    mac68k:OpenBSD:*:*)
216
 
        echo m68k-unknown-openbsd${UNAME_RELEASE}
217
 
        exit 0 ;;
218
 
    macppc:OpenBSD:*:*)
219
 
        echo powerpc-unknown-openbsd${UNAME_RELEASE}
220
 
        exit 0 ;;
221
 
    mvme68k:OpenBSD:*:*)
222
 
        echo m68k-unknown-openbsd${UNAME_RELEASE}
223
 
        exit 0 ;;
224
 
    mvme88k:OpenBSD:*:*)
225
 
        echo m88k-unknown-openbsd${UNAME_RELEASE}
226
 
        exit 0 ;;
227
 
    mvmeppc:OpenBSD:*:*)
228
 
        echo powerpc-unknown-openbsd${UNAME_RELEASE}
229
 
        exit 0 ;;
230
 
    sgi:OpenBSD:*:*)
231
 
        echo mips64-unknown-openbsd${UNAME_RELEASE}
232
 
        exit 0 ;;
233
 
    sun3:OpenBSD:*:*)
234
 
        echo m68k-unknown-openbsd${UNAME_RELEASE}
235
 
        exit 0 ;;
236
 
    *:OpenBSD:*:*)
237
 
        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
238
 
        exit 0 ;;
239
 
    *:ekkoBSD:*:*)
240
 
        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
241
 
        exit 0 ;;
242
 
    macppc:MirBSD:*:*)
243
 
        echo powerppc-unknown-mirbsd${UNAME_RELEASE}
244
 
        exit 0 ;;
245
 
    *:MirBSD:*:*)
246
 
        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
247
 
        exit 0 ;;
248
178
    alpha:OSF1:*:*)
249
 
        case $UNAME_RELEASE in
250
 
        *4.0)
 
179
        if test $UNAME_RELEASE = "V4.0"; then
251
180
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
252
 
                ;;
253
 
        *5.*)
254
 
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
255
 
                ;;
256
 
        esac
257
 
        # According to Compaq, /usr/sbin/psrinfo has been available on
258
 
        # OSF/1 and Tru64 systems produced since 1995.  I hope that
259
 
        # covers most systems running today.  This code pipes the CPU
260
 
        # types through head -n 1, so we only detect the type of CPU 0.
261
 
        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
262
 
        case "$ALPHA_CPU_TYPE" in
263
 
            "EV4 (21064)")
264
 
                UNAME_MACHINE="alpha" ;;
265
 
            "EV4.5 (21064)")
266
 
                UNAME_MACHINE="alpha" ;;
267
 
            "LCA4 (21066/21068)")
268
 
                UNAME_MACHINE="alpha" ;;
269
 
            "EV5 (21164)")
270
 
                UNAME_MACHINE="alphaev5" ;;
271
 
            "EV5.6 (21164A)")
272
 
                UNAME_MACHINE="alphaev56" ;;
273
 
            "EV5.6 (21164PC)")
274
 
                UNAME_MACHINE="alphapca56" ;;
275
 
            "EV5.7 (21164PC)")
276
 
                UNAME_MACHINE="alphapca57" ;;
277
 
            "EV6 (21264)")
278
 
                UNAME_MACHINE="alphaev6" ;;
279
 
            "EV6.7 (21264A)")
280
 
                UNAME_MACHINE="alphaev67" ;;
281
 
            "EV6.8CB (21264C)")
282
 
                UNAME_MACHINE="alphaev68" ;;
283
 
            "EV6.8AL (21264B)")
284
 
                UNAME_MACHINE="alphaev68" ;;
285
 
            "EV6.8CX (21264D)")
286
 
                UNAME_MACHINE="alphaev68" ;;
287
 
            "EV6.9A (21264/EV69A)")
288
 
                UNAME_MACHINE="alphaev69" ;;
289
 
            "EV7 (21364)")
290
 
                UNAME_MACHINE="alphaev7" ;;
291
 
            "EV7.9 (21364A)")
292
 
                UNAME_MACHINE="alphaev79" ;;
293
 
        esac
294
 
        # A Pn.n version is a patched version.
 
181
        fi
295
182
        # A Vn.n version is a released version.
296
183
        # A Tn.n version is a released field test version.
297
184
        # A Xn.n version is an unreleased experimental baselevel.
298
185
        # 1.2 uses "1.2" for uname -r.
299
 
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 
186
        cat <<EOF >$dummy.s
 
187
        .data
 
188
\$Lformat:
 
189
        .byte 37,100,45,37,120,10,0     # "%d-%x\n"
 
190
 
 
191
        .text
 
192
        .globl main
 
193
        .align 4
 
194
        .ent main
 
195
main:
 
196
        .frame \$30,16,\$26,0
 
197
        ldgp \$29,0(\$27)
 
198
        .prologue 1
 
199
        .long 0x47e03d80 # implver \$0
 
200
        lda \$2,-1
 
201
        .long 0x47e20c21 # amask \$2,\$1
 
202
        lda \$16,\$Lformat
 
203
        mov \$0,\$17
 
204
        not \$1,\$18
 
205
        jsr \$26,printf
 
206
        ldgp \$29,0(\$26)
 
207
        mov 0,\$16
 
208
        jsr \$26,exit
 
209
        .end main
 
210
EOF
 
211
        $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
 
212
        if test "$?" = 0 ; then
 
213
                case `./$dummy` in
 
214
                        0-0)
 
215
                                UNAME_MACHINE="alpha"
 
216
                                ;;
 
217
                        1-0)
 
218
                                UNAME_MACHINE="alphaev5"
 
219
                                ;;
 
220
                        1-1)
 
221
                                UNAME_MACHINE="alphaev56"
 
222
                                ;;
 
223
                        1-101)
 
224
                                UNAME_MACHINE="alphapca56"
 
225
                                ;;
 
226
                        2-303)
 
227
                                UNAME_MACHINE="alphaev6"
 
228
                                ;;
 
229
                        2-307)
 
230
                                UNAME_MACHINE="alphaev67"
 
231
                                ;;
 
232
                esac
 
233
        fi
 
234
        rm -f $dummy.s $dummy
 
235
        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
300
236
        exit 0 ;;
301
237
    Alpha\ *:Windows_NT*:*)
302
238
        # How do we know it's Interix rather than the generic POSIX subsystem?
310
246
    Amiga*:UNIX_System_V:4.0:*)
311
247
        echo m68k-unknown-sysv4
312
248
        exit 0;;
 
249
    amiga:OpenBSD:*:*)
 
250
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
251
        exit 0 ;;
313
252
    *:[Aa]miga[Oo][Ss]:*:*)
314
253
        echo ${UNAME_MACHINE}-unknown-amigaos
315
254
        exit 0 ;;
316
 
    *:[Mm]orph[Oo][Ss]:*:*)
317
 
        echo ${UNAME_MACHINE}-unknown-morphos
 
255
    arc64:OpenBSD:*:*)
 
256
        echo mips64el-unknown-openbsd${UNAME_RELEASE}
 
257
        exit 0 ;;
 
258
    arc:OpenBSD:*:*)
 
259
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
 
260
        exit 0 ;;
 
261
    hkmips:OpenBSD:*:*)
 
262
        echo mips-unknown-openbsd${UNAME_RELEASE}
 
263
        exit 0 ;;
 
264
    pmax:OpenBSD:*:*)
 
265
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
 
266
        exit 0 ;;
 
267
    sgi:OpenBSD:*:*)
 
268
        echo mips-unknown-openbsd${UNAME_RELEASE}
 
269
        exit 0 ;;
 
270
    wgrisc:OpenBSD:*:*)
 
271
        echo mipsel-unknown-openbsd${UNAME_RELEASE}
318
272
        exit 0 ;;
319
273
    *:OS/390:*:*)
320
274
        echo i370-ibm-openedition
321
275
        exit 0 ;;
322
 
    *:OS400:*:*)
323
 
        echo powerpc-ibm-os400
324
 
        exit 0 ;;
325
276
    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
326
277
        echo arm-acorn-riscix${UNAME_RELEASE}
327
278
        exit 0;;
339
290
    NILE*:*:*:dcosx)
340
291
        echo pyramid-pyramid-svr4
341
292
        exit 0 ;;
342
 
    DRS?6000:unix:4.0:6*)
343
 
        echo sparc-icl-nx6
344
 
        exit 0 ;;
345
 
    DRS?6000:UNIX_SV:4.2*:7*)
346
 
        case `/usr/bin/uname -p` in
347
 
            sparc) echo sparc-icl-nx7 && exit 0 ;;
348
 
        esac ;;
349
293
    sun4H:SunOS:5.*:*)
350
294
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
351
295
        exit 0 ;;
374
318
        echo m68k-sun-sunos${UNAME_RELEASE}
375
319
        exit 0 ;;
376
320
    sun*:*:4.2BSD:*)
377
 
        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
 
321
        UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
378
322
        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
379
323
        case "`/bin/arch`" in
380
324
            sun3)
388
332
    aushp:SunOS:*:*)
389
333
        echo sparc-auspex-sunos${UNAME_RELEASE}
390
334
        exit 0 ;;
 
335
    atari*:OpenBSD:*:*)
 
336
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
337
        exit 0 ;;
391
338
    # The situation for MiNT is a little confusing.  The machine name
392
339
    # can be virtually everything (everything which is not
393
340
    # "atarist" or "atariste" at least should have a processor
414
361
    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
415
362
        echo m68k-unknown-mint${UNAME_RELEASE}
416
363
        exit 0 ;;
417
 
    m68k:machten:*:*)
418
 
        echo m68k-apple-machten${UNAME_RELEASE}
 
364
    sun3*:OpenBSD:*:*)
 
365
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
366
        exit 0 ;;
 
367
    mac68k:OpenBSD:*:*)
 
368
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
369
        exit 0 ;;
 
370
    mvme68k:OpenBSD:*:*)
 
371
        echo m68k-unknown-openbsd${UNAME_RELEASE}
 
372
        exit 0 ;;
 
373
    mvme88k:OpenBSD:*:*)
 
374
        echo m88k-unknown-openbsd${UNAME_RELEASE}
419
375
        exit 0 ;;
420
376
    powerpc:machten:*:*)
421
377
        echo powerpc-apple-machten${UNAME_RELEASE}
433
389
        echo clipper-intergraph-clix${UNAME_RELEASE}
434
390
        exit 0 ;;
435
391
    mips:*:*:UMIPS | mips:*:*:RISCos)
436
 
        eval $set_cc_for_build
437
392
        sed 's/^        //' << EOF >$dummy.c
438
393
#ifdef __cplusplus
439
394
#include <stdio.h>  /* for printf() prototype */
455
410
          exit (-1);
456
411
        }
457
412
EOF
458
 
        $CC_FOR_BUILD -o $dummy $dummy.c \
459
 
          && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
460
 
          && exit 0
 
413
        $CC_FOR_BUILD $dummy.c -o $dummy \
 
414
          && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
 
415
          && rm $dummy.c $dummy && exit 0
 
416
        rm -f $dummy.c $dummy
461
417
        echo mips-mips-riscos${UNAME_RELEASE}
462
418
        exit 0 ;;
463
 
    Motorola:PowerMAX_OS:*:*)
464
 
        echo powerpc-motorola-powermax
465
 
        exit 0 ;;
466
 
    Motorola:*:4.3:PL8-*)
467
 
        echo powerpc-harris-powermax
468
 
        exit 0 ;;
469
 
    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
470
 
        echo powerpc-harris-powermax
471
 
        exit 0 ;;
472
419
    Night_Hawk:Power_UNIX:*:*)
473
420
        echo powerpc-harris-powerunix
474
421
        exit 0 ;;
516
463
    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
517
464
        echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
518
465
        exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
519
 
    i*86:AIX:*:*)
 
466
    i?86:AIX:*:*)
520
467
        echo i386-ibm-aix
521
468
        exit 0 ;;
522
 
    ia64:AIX:*:*)
523
 
        if [ -x /usr/bin/oslevel ] ; then
524
 
                IBM_REV=`/usr/bin/oslevel`
525
 
        else
526
 
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
527
 
        fi
528
 
        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
529
 
        exit 0 ;;
530
469
    *:AIX:2:3)
531
470
        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
532
 
                eval $set_cc_for_build
533
471
                sed 's/^                //' << EOF >$dummy.c
534
472
                #include <sys/systemcfg.h>
535
473
 
541
479
                        exit(0);
542
480
                        }
543
481
EOF
544
 
                $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
 
482
                $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
 
483
                rm -f $dummy.c $dummy
545
484
                echo rs6000-ibm-aix3.2.5
546
485
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
547
486
                echo rs6000-ibm-aix3.2.4
549
488
                echo rs6000-ibm-aix3.2
550
489
        fi
551
490
        exit 0 ;;
552
 
    *:AIX:*:[45])
553
 
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
554
 
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 
491
    *:AIX:*:4)
 
492
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
 
493
        if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
555
494
                IBM_ARCH=rs6000
556
495
        else
557
496
                IBM_ARCH=powerpc
559
498
        if [ -x /usr/bin/oslevel ] ; then
560
499
                IBM_REV=`/usr/bin/oslevel`
561
500
        else
562
 
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 
501
                IBM_REV=4.${UNAME_RELEASE}
563
502
        fi
564
503
        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
565
504
        exit 0 ;;
 
505
    *:AIX:*:5)
 
506
        case "`lsattr -El proc0 -a type -F value`" in
 
507
            PowerPC*) IBM_ARCH=powerpc
 
508
                      IBM_MANUF=ibm ;;
 
509
            Itanium)  IBM_ARCH=ia64
 
510
                      IBM_MANUF=unknown ;;
 
511
            POWER*)   IBM_ARCH=power
 
512
                      IBM_MANUF=ibm ;;
 
513
            *)        IBM_ARCH=powerpc
 
514
                      IBM_MANUF=ibm ;;
 
515
        esac
 
516
        echo ${IBM_ARCH}-${IBM_MANUF}-aix${UNAME_VERSION}.${UNAME_RELEASE}
 
517
        exit 0 ;;
566
518
    *:AIX:*:*)
567
519
        echo rs6000-ibm-aix
568
520
        exit 0 ;;
590
542
            9000/31? )            HP_ARCH=m68000 ;;
591
543
            9000/[34]?? )         HP_ARCH=m68k ;;
592
544
            9000/[678][0-9][0-9])
593
 
                if [ -x /usr/bin/getconf ]; then
594
 
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 
545
              case "${HPUX_REV}" in
 
546
                11.[0-9][0-9])
 
547
                  if [ -x /usr/bin/getconf ]; then
 
548
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
595
549
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
596
550
                    case "${sc_cpu_version}" in
597
551
                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
600
554
                        case "${sc_kernel_bits}" in
601
555
                          32) HP_ARCH="hppa2.0n" ;;
602
556
                          64) HP_ARCH="hppa2.0w" ;;
603
 
                          '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
604
557
                        esac ;;
605
558
                    esac
606
 
                fi
607
 
                if [ "${HP_ARCH}" = "" ]; then
608
 
                    eval $set_cc_for_build
609
 
                    sed 's/^              //' << EOF >$dummy.c
 
559
                  fi ;;
 
560
              esac
 
561
              if [ "${HP_ARCH}" = "" ]; then
 
562
              sed 's/^              //' << EOF >$dummy.c
610
563
 
611
564
              #define _HPUX_SOURCE
612
565
              #include <stdlib.h>
639
592
                  exit (0);
640
593
              }
641
594
EOF
642
 
                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
643
 
                    test -z "$HP_ARCH" && HP_ARCH=hppa
644
 
                fi ;;
 
595
        (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
 
596
        if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
 
597
        rm -f $dummy.c $dummy
 
598
        fi ;;
645
599
        esac
646
 
        if [ ${HP_ARCH} = "hppa2.0w" ]
647
 
        then
648
 
            # avoid double evaluation of $set_cc_for_build
649
 
            test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
650
 
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
651
 
            then
652
 
                HP_ARCH="hppa2.0w"
653
 
            else
654
 
                HP_ARCH="hppa64"
655
 
            fi
656
 
        fi
657
600
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
658
601
        exit 0 ;;
659
602
    ia64:HP-UX:*:*)
661
604
        echo ia64-hp-hpux${HPUX_REV}
662
605
        exit 0 ;;
663
606
    3050*:HI-UX:*:*)
664
 
        eval $set_cc_for_build
665
607
        sed 's/^        //' << EOF >$dummy.c
666
608
        #include <unistd.h>
667
609
        int
687
629
          exit (0);
688
630
        }
689
631
EOF
690
 
        $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
 
632
        $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
 
633
        rm -f $dummy.c $dummy
691
634
        echo unknown-hitachi-hiuxwe2
692
635
        exit 0 ;;
693
636
    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
696
639
    9000/8??:4.3bsd:*:*)
697
640
        echo hppa1.0-hp-bsd
698
641
        exit 0 ;;
699
 
    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
 
642
    *9??*:MPE/iX:*:*)
700
643
        echo hppa1.0-hp-mpeix
701
644
        exit 0 ;;
702
645
    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
705
648
    hp8??:OSF1:*:*)
706
649
        echo hppa1.0-hp-osf
707
650
        exit 0 ;;
708
 
    i*86:OSF1:*:*)
 
651
    i?86:OSF1:*:*)
709
652
        if [ -x /usr/sbin/sysversion ] ; then
710
653
            echo ${UNAME_MACHINE}-unknown-osf1mk
711
654
        else
715
658
    parisc*:Lites*:*:*)
716
659
        echo hppa1.1-hp-lites
717
660
        exit 0 ;;
 
661
    hppa*:OpenBSD:*:*)
 
662
        echo hppa-unknown-openbsd
 
663
        exit 0 ;;
718
664
    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
719
665
        echo c1-convex-bsd
720
666
        exit 0 ;;
733
679
    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
734
680
        echo c4-convex-bsd
735
681
        exit 0 ;;
 
682
    CRAY*X-MP:*:*:*)
 
683
        echo xmp-cray-unicos
 
684
        exit 0 ;;
736
685
    CRAY*Y-MP:*:*:*)
737
 
        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 
686
        echo ymp-cray-unicos${UNAME_RELEASE}
738
687
        exit 0 ;;
739
688
    CRAY*[A-Z]90:*:*:*)
740
689
        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
741
690
        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
742
 
              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
743
 
              -e 's/\.[^.]*$/.X/'
 
691
              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
744
692
        exit 0 ;;
745
693
    CRAY*TS:*:*:*)
746
694
        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
747
695
        exit 0 ;;
 
696
    CRAY*T3D:*:*:*)
 
697
        echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 
698
        exit 0 ;;
748
699
    CRAY*T3E:*:*:*)
749
700
        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
750
701
        exit 0 ;;
751
702
    CRAY*SV1:*:*:*)
752
703
        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
753
704
        exit 0 ;;
754
 
    *:UNICOS/mp:*:*)
755
 
        echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
756
 
        exit 0 ;;
 
705
    CRAY-2:*:*:*)
 
706
        echo cray2-cray-unicos
 
707
        exit 0 ;;
757
708
    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
758
709
        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
759
710
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
760
711
        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
761
712
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
762
713
        exit 0 ;;
763
 
    5000:UNIX_System_V:4.*:*)
764
 
        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
765
 
        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
766
 
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 
714
    hp300:OpenBSD:*:*)
 
715
        echo m68k-unknown-openbsd${UNAME_RELEASE}
767
716
        exit 0 ;;
768
 
    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 
717
    i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
769
718
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
770
719
        exit 0 ;;
771
720
    sparc*:BSD/OS:*:*)
777
726
    *:FreeBSD:*:*)
778
727
        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
779
728
        exit 0 ;;
 
729
    *:OpenBSD:*:*)
 
730
        echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 
731
        exit 0 ;;
780
732
    i*:CYGWIN*:*)
781
733
        echo ${UNAME_MACHINE}-pc-cygwin
782
734
        exit 0 ;;
786
738
    i*:PW*:*)
787
739
        echo ${UNAME_MACHINE}-pc-pw32
788
740
        exit 0 ;;
789
 
    x86:Interix*:[34]*)
790
 
        echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
791
 
        exit 0 ;;
792
 
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
793
 
        echo i${UNAME_MACHINE}-pc-mks
794
 
        exit 0 ;;
795
741
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
796
742
        # How do we know it's Interix rather than the generic POSIX subsystem?
797
743
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
798
744
        # UNAME_MACHINE based on the output of uname instead of i386?
799
 
        echo i586-pc-interix
 
745
        echo i386-pc-interix
800
746
        exit 0 ;;
801
747
    i*:UWIN*:*)
802
748
        echo ${UNAME_MACHINE}-pc-uwin
808
754
        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
809
755
        exit 0 ;;
810
756
    *:GNU:*:*)
811
 
        # the GNU system
812
757
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
813
758
        exit 0 ;;
814
 
    *:GNU/*:*:*)
815
 
        # other systems with GNU libc and userland
816
 
        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
817
 
        exit 0 ;;
818
759
    i*86:Minix:*:*)
819
760
        echo ${UNAME_MACHINE}-pc-minix
820
761
        exit 0 ;;
821
 
    arm*:Linux:*:*)
822
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
823
 
        exit 0 ;;
824
 
    cris:Linux:*:*)
825
 
        echo cris-axis-linux-gnu
826
 
        exit 0 ;;
827
 
    ia64:Linux:*:*)
828
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
829
 
        exit 0 ;;
830
 
    m32r*:Linux:*:*)
831
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
832
 
        exit 0 ;;
833
 
    m68*:Linux:*:*)
834
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
835
 
        exit 0 ;;
836
 
    mips:Linux:*:*)
837
 
        eval $set_cc_for_build
838
 
        sed 's/^        //' << EOF >$dummy.c
839
 
        #undef CPU
840
 
        #undef mips
841
 
        #undef mipsel
842
 
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
843
 
        CPU=mipsel
844
 
        #else
845
 
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
846
 
        CPU=mips
847
 
        #else
848
 
        CPU=
849
 
        #endif
850
 
        #endif
851
 
EOF
852
 
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
853
 
        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
854
 
        ;;
855
 
    mips64:Linux:*:*)
856
 
        eval $set_cc_for_build
857
 
        sed 's/^        //' << EOF >$dummy.c
858
 
        #undef CPU
859
 
        #undef mips64
860
 
        #undef mips64el
861
 
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
862
 
        CPU=mips64el
863
 
        #else
864
 
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
865
 
        CPU=mips64
866
 
        #else
867
 
        CPU=
868
 
        #endif
869
 
        #endif
870
 
EOF
871
 
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
872
 
        test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
873
 
        ;;
874
 
    ppc:Linux:*:*)
875
 
        echo powerpc-unknown-linux-gnu
876
 
        exit 0 ;;
877
 
    ppc64:Linux:*:*)
878
 
        echo powerpc64-unknown-linux-gnu
879
 
        exit 0 ;;
880
 
    alpha:Linux:*:*)
881
 
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
882
 
          EV5)   UNAME_MACHINE=alphaev5 ;;
883
 
          EV56)  UNAME_MACHINE=alphaev56 ;;
884
 
          PCA56) UNAME_MACHINE=alphapca56 ;;
885
 
          PCA57) UNAME_MACHINE=alphapca56 ;;
886
 
          EV6)   UNAME_MACHINE=alphaev6 ;;
887
 
          EV67)  UNAME_MACHINE=alphaev67 ;;
888
 
          EV68*) UNAME_MACHINE=alphaev68 ;;
889
 
        esac
890
 
        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
891
 
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
892
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
893
 
        exit 0 ;;
894
 
    parisc:Linux:*:* | hppa:Linux:*:*)
895
 
        # Look for CPU level
896
 
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
897
 
          PA7*) echo hppa1.1-unknown-linux-gnu ;;
898
 
          PA8*) echo hppa2.0-unknown-linux-gnu ;;
899
 
          *)    echo hppa-unknown-linux-gnu ;;
900
 
        esac
901
 
        exit 0 ;;
902
 
    parisc64:Linux:*:* | hppa64:Linux:*:*)
903
 
        echo hppa64-unknown-linux-gnu
904
 
        exit 0 ;;
905
 
    s390:Linux:*:* | s390x:Linux:*:*)
906
 
        echo ${UNAME_MACHINE}-ibm-linux
907
 
        exit 0 ;;
908
 
    sh64*:Linux:*:*)
909
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
910
 
        exit 0 ;;
911
 
    sh*:Linux:*:*)
912
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
913
 
        exit 0 ;;
914
 
    sparc:Linux:*:* | sparc64:Linux:*:*)
915
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
916
 
        exit 0 ;;
917
 
    x86_64:Linux:*:*)
918
 
        echo x86_64-unknown-linux-gnu
919
 
        exit 0 ;;
920
 
    i*86:Linux:*:*)
 
762
    *:Linux:*:*)
 
763
 
921
764
        # The BFD linker knows what the default object file format is, so
922
765
        # first see if it will tell us. cd to the root directory to prevent
923
766
        # problems with other programs or directories called `ld' in the path.
924
 
        # Set LC_ALL=C to ensure ld outputs messages in English.
925
 
        ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
926
 
                         | sed -ne '/supported targets:/!d
 
767
        ld_supported_emulations=`cd /; ld --help 2>&1 \
 
768
                         | sed -ne '/supported emulations:/!d
927
769
                                    s/[         ][      ]*/ /g
928
 
                                    s/.*supported targets: *//
 
770
                                    s/.*supported emulations: *//
929
771
                                    s/ .*//
930
772
                                    p'`
931
 
        case "$ld_supported_targets" in
932
 
          elf32-i386)
 
773
        case "$ld_supported_emulations" in
 
774
          *ia64)
 
775
                echo "${UNAME_MACHINE}-unknown-linux"
 
776
                exit 0
 
777
                ;;
 
778
          i?86linux)
 
779
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
 
780
                exit 0
 
781
                ;;
 
782
          elf_i?86)
933
783
                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
934
784
                ;;
935
 
          a.out-i386-linux)
936
 
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
937
 
                exit 0 ;;
938
 
          coff-i386)
 
785
          i?86coff)
939
786
                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
940
 
                exit 0 ;;
941
 
          "")
942
 
                # Either a pre-BFD a.out linker (linux-gnuoldld) or
943
 
                # one that does not give us useful --help.
944
 
                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
945
 
                exit 0 ;;
 
787
                exit 0
 
788
                ;;
 
789
          sparclinux)
 
790
                echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
 
791
                exit 0
 
792
                ;;
 
793
          elf32_sparc)
 
794
                echo "${UNAME_MACHINE}-unknown-linux-gnu"
 
795
                exit 0
 
796
                ;;
 
797
          armlinux)
 
798
                echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
 
799
                exit 0
 
800
                ;;
 
801
          elf32arm*)
 
802
                echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
 
803
                exit 0
 
804
                ;;
 
805
          armelf_linux*)
 
806
                echo "${UNAME_MACHINE}-unknown-linux-gnu"
 
807
                exit 0
 
808
                ;;
 
809
          m68klinux)
 
810
                echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
 
811
                exit 0
 
812
                ;;
 
813
          elf32ppc | elf32ppclinux)
 
814
                # Determine Lib Version
 
815
                cat >$dummy.c <<EOF
 
816
#include <features.h>
 
817
#if defined(__GLIBC__)
 
818
extern char __libc_version[];
 
819
extern char __libc_release[];
 
820
#endif
 
821
main(argc, argv)
 
822
     int argc;
 
823
     char *argv[];
 
824
{
 
825
#if defined(__GLIBC__)
 
826
  printf("%s %s\n", __libc_version, __libc_release);
 
827
#else
 
828
  printf("unkown\n");
 
829
#endif
 
830
  return 0;
 
831
}
 
832
EOF
 
833
                LIBC=""
 
834
                $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
 
835
                if test "$?" = 0 ; then
 
836
                        ./$dummy | grep 1\.99 > /dev/null
 
837
                        if test "$?" = 0 ; then
 
838
                                LIBC="libc1"
 
839
                        fi
 
840
                fi
 
841
                rm -f $dummy.c $dummy
 
842
                echo powerpc-unknown-linux-gnu${LIBC}
 
843
                exit 0
 
844
                ;;
 
845
          shelf_linux)
 
846
                echo "${UNAME_MACHINE}-unknown-linux-gnu"
 
847
                exit 0
 
848
                ;;
946
849
        esac
947
 
        # Determine whether the default compiler is a.out or elf
948
 
        eval $set_cc_for_build
949
 
        sed 's/^        //' << EOF >$dummy.c
950
 
        #include <features.h>
951
 
        #ifdef __ELF__
952
 
        # ifdef __GLIBC__
953
 
        #  if __GLIBC__ >= 2
954
 
        LIBC=gnu
955
 
        #  else
956
 
        LIBC=gnulibc1
957
 
        #  endif
958
 
        # else
959
 
        LIBC=gnulibc1
960
 
        # endif
961
 
        #else
962
 
        #ifdef __INTEL_COMPILER
963
 
        LIBC=gnu
964
 
        #else
965
 
        LIBC=gnuaout
966
 
        #endif
967
 
        #endif
968
 
        #ifdef __dietlibc__
969
 
        LIBC=dietlibc
970
 
        #endif
971
 
EOF
972
 
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
973
 
        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
974
 
        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
975
 
        ;;
976
 
    i*86:DYNIX/ptx:4*:*)
977
 
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
978
 
        # earlier versions are messed up and put the nodename in both
979
 
        # sysname and nodename.
 
850
 
 
851
        if test "${UNAME_MACHINE}" = "alpha" ; then
 
852
                cat <<EOF >$dummy.s
 
853
                        .data
 
854
                \$Lformat:
 
855
                        .byte 37,100,45,37,120,10,0     # "%d-%x\n"
 
856
 
 
857
                        .text
 
858
                        .globl main
 
859
                        .align 4
 
860
                        .ent main
 
861
                main:
 
862
                        .frame \$30,16,\$26,0
 
863
                        ldgp \$29,0(\$27)
 
864
                        .prologue 1
 
865
                        .long 0x47e03d80 # implver \$0
 
866
                        lda \$2,-1
 
867
                        .long 0x47e20c21 # amask \$2,\$1
 
868
                        lda \$16,\$Lformat
 
869
                        mov \$0,\$17
 
870
                        not \$1,\$18
 
871
                        jsr \$26,printf
 
872
                        ldgp \$29,0(\$26)
 
873
                        mov 0,\$16
 
874
                        jsr \$26,exit
 
875
                        .end main
 
876
EOF
 
877
                LIBC=""
 
878
                $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
 
879
                if test "$?" = 0 ; then
 
880
                        case `./$dummy` in
 
881
                        0-0)
 
882
                                UNAME_MACHINE="alpha"
 
883
                                ;;
 
884
                        1-0)
 
885
                                UNAME_MACHINE="alphaev5"
 
886
                                ;;
 
887
                        1-1)
 
888
                                UNAME_MACHINE="alphaev56"
 
889
                                ;;
 
890
                        1-101)
 
891
                                UNAME_MACHINE="alphapca56"
 
892
                                ;;
 
893
                        2-303)
 
894
                                UNAME_MACHINE="alphaev6"
 
895
                                ;;
 
896
                        2-307)
 
897
                                UNAME_MACHINE="alphaev67"
 
898
                                ;;
 
899
                        esac
 
900
 
 
901
                        objdump --private-headers $dummy | \
 
902
                          grep ld.so.1 > /dev/null
 
903
                        if test "$?" = 0 ; then
 
904
                                LIBC="libc1"
 
905
                        fi
 
906
                fi
 
907
                rm -f $dummy.s $dummy
 
908
                echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
 
909
        elif test "${UNAME_MACHINE}" = "mips" ; then
 
910
          cat >$dummy.c <<EOF
 
911
#ifdef __cplusplus
 
912
#include <stdio.h>  /* for printf() prototype */
 
913
        int main (int argc, char *argv[]) {
 
914
#else
 
915
        int main (argc, argv) int argc; char *argv[]; {
 
916
#endif
 
917
#ifdef __MIPSEB__
 
918
  printf ("%s-unknown-linux-gnu\n", argv[1]);
 
919
#endif
 
920
#ifdef __MIPSEL__
 
921
#ifdef __R5900
 
922
/* Little Endian R5900 running Linux,
 
923
   this *must* be Sony PlayStation 2 */
 
924
  printf ("%sel-PlayStation2-linux-gnu\n", argv[1]);
 
925
#else
 
926
  printf ("%sel-unknown-linux-gnu\n", argv[1]);
 
927
#endif
 
928
#endif
 
929
  return 0;
 
930
}
 
931
EOF
 
932
          $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
 
933
          rm -f $dummy.c $dummy
 
934
        elif test "${UNAME_MACHINE}" = "s390"; then
 
935
          echo s390-ibm-linux && exit 0
 
936
        elif test "${UNAME_MACHINE}" = "x86_64"; then
 
937
          echo x86_64-unknown-linux-gnu && exit 0
 
938
        elif test "${UNAME_MACHINE}" = "parisc" -o "${UNAME_MACHINE}" = "hppa"; then
 
939
          # Look for CPU level
 
940
          case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
 
941
            PA7*)
 
942
                echo hppa1.1-unknown-linux-gnu
 
943
                ;;
 
944
            PA8*)
 
945
                echo hppa2.0-unknown-linux-gnu
 
946
                ;;
 
947
            *)
 
948
                echo hppa-unknown-linux-gnu
 
949
                ;;
 
950
          esac
 
951
          exit 0
 
952
        else
 
953
          # Either a pre-BFD a.out linker (linux-gnuoldld)
 
954
          # or one that does not give us useful --help.
 
955
          # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
 
956
          # If ld does not provide *any* "supported emulations:"
 
957
          # that means it is gnuoldld.
 
958
          test -z "$ld_supported_emulations" \
 
959
            && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
 
960
 
 
961
          case "${UNAME_MACHINE}" in
 
962
          i?86)
 
963
            VENDOR=pc;
 
964
            ;;
 
965
          *)
 
966
            VENDOR=unknown;
 
967
            ;;
 
968
          esac
 
969
          # Determine whether the default compiler is a.out or elf
 
970
          cat >$dummy.c <<EOF
 
971
#include <features.h>
 
972
#ifdef __cplusplus
 
973
#include <stdio.h>  /* for printf() prototype */
 
974
        int main (int argc, char *argv[]) {
 
975
#else
 
976
        int main (argc, argv) int argc; char *argv[]; {
 
977
#endif
 
978
#ifdef __ELF__
 
979
# ifdef __GLIBC__
 
980
#  if __GLIBC__ >= 2
 
981
    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
 
982
#  else
 
983
    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
 
984
#  endif
 
985
# else
 
986
   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
 
987
# endif
 
988
#else
 
989
  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
 
990
#endif
 
991
  return 0;
 
992
}
 
993
EOF
 
994
          $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
 
995
          rm -f $dummy.c $dummy
 
996
          test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
 
997
        fi ;;
 
998
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
 
999
# are messed up and put the nodename in both sysname and nodename.
 
1000
    i?86:DYNIX/ptx:4*:*)
980
1001
        echo i386-sequent-sysv4
981
1002
        exit 0 ;;
982
 
    i*86:UNIX_SV:4.2MP:2.*)
 
1003
    i?86:UNIX_SV:4.2MP:2.*)
983
1004
        # Unixware is an offshoot of SVR4, but it has its own version
984
1005
        # number series starting with 2...
985
1006
        # I am not positive that other SVR4 systems won't match this,
987
1008
        # Use sysv4.2uw... so that sysv4* matches it.
988
1009
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
989
1010
        exit 0 ;;
990
 
    i*86:OS/2:*:*)
991
 
        # If we were able to find `uname', then EMX Unix compatibility
992
 
        # is probably installed.
993
 
        echo ${UNAME_MACHINE}-pc-os2-emx
994
 
        exit 0 ;;
995
 
    i*86:XTS-300:*:STOP)
996
 
        echo ${UNAME_MACHINE}-unknown-stop
997
 
        exit 0 ;;
998
 
    i*86:atheos:*:*)
999
 
        echo ${UNAME_MACHINE}-unknown-atheos
1000
 
        exit 0 ;;
1001
 
        i*86:syllable:*:*)
1002
 
        echo ${UNAME_MACHINE}-pc-syllable
1003
 
        exit 0 ;;
1004
 
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1005
 
        echo i386-unknown-lynxos${UNAME_RELEASE}
1006
 
        exit 0 ;;
1007
 
    i*86:*DOS:*:*)
1008
 
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
1009
 
        exit 0 ;;
1010
 
    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
 
1011
    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
1011
1012
        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1012
1013
        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1013
1014
                echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1015
1016
                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1016
1017
        fi
1017
1018
        exit 0 ;;
1018
 
    i*86:*:5:[78]*)
1019
 
        case `/bin/uname -X | grep "^Machine"` in
1020
 
            *486*)           UNAME_MACHINE=i486 ;;
1021
 
            *Pentium)        UNAME_MACHINE=i586 ;;
1022
 
            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1023
 
        esac
1024
 
        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
 
1019
    i?86:*:5:7*)
 
1020
        # Fixed at (any) Pentium or better
 
1021
        UNAME_MACHINE=i586
 
1022
        if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
 
1023
            echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
 
1024
        else
 
1025
            echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
 
1026
        fi
1025
1027
        exit 0 ;;
1026
 
    i*86:*:3.2:*)
 
1028
    i?86:*:3.2:*)
1027
1029
        if test -f /usr/options/cb.name; then
1028
1030
                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1029
1031
                echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1030
1032
        elif /bin/uname -X 2>/dev/null >/dev/null ; then
1031
 
                UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1032
 
                (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1033
 
                (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
 
1033
                UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
 
1034
                (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
 
1035
                (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
1034
1036
                        && UNAME_MACHINE=i586
1035
 
                (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
 
1037
                (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
1036
1038
                        && UNAME_MACHINE=i686
1037
 
                (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
 
1039
                (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
1038
1040
                        && UNAME_MACHINE=i686
1039
1041
                echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1040
1042
        else
1041
1043
                echo ${UNAME_MACHINE}-pc-sysv32
1042
1044
        fi
1043
1045
        exit 0 ;;
 
1046
    i?86:*DOS:*:*)
 
1047
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
 
1048
        exit 0 ;;
1044
1049
    pc:*:*:*)
1045
1050
        # Left here for compatibility:
1046
1051
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
1064
1069
        # "miniframe"
1065
1070
        echo m68010-convergent-sysv
1066
1071
        exit 0 ;;
1067
 
    mc68k:UNIX:SYSTEM5:3.51m)
1068
 
        echo m68k-convergent-sysv
1069
 
        exit 0 ;;
1070
 
    M680?0:D-NIX:5.3:*)
1071
 
        echo m68k-diab-dnix
1072
 
        exit 0 ;;
1073
 
    M68*:*:R3V[5678]*:*)
 
1072
    M68*:*:R3V[567]*:*)
1074
1073
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
1075
 
    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)
 
1074
    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
1076
1075
        OS_REL=''
1077
1076
        test -r /etc/.relid \
1078
1077
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1083
1082
    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1084
1083
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1085
1084
          && echo i486-ncr-sysv4 && exit 0 ;;
1086
 
    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
 
1085
    m68*:LynxOS:2.*:*)
1087
1086
        echo m68k-unknown-lynxos${UNAME_RELEASE}
1088
1087
        exit 0 ;;
1089
1088
    mc68030:UNIX_System_V:4.*:*)
1090
1089
        echo m68k-atari-sysv4
1091
1090
        exit 0 ;;
 
1091
    i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
 
1092
        echo i386-unknown-lynxos${UNAME_RELEASE}
 
1093
        exit 0 ;;
1092
1094
    TSUNAMI:LynxOS:2.*:*)
1093
1095
        echo sparc-unknown-lynxos${UNAME_RELEASE}
1094
1096
        exit 0 ;;
1095
1097
    rs6000:LynxOS:2.*:*)
1096
1098
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
1097
1099
        exit 0 ;;
1098
 
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
 
1100
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*)
1099
1101
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
1100
1102
        exit 0 ;;
1101
1103
    SM[BE]S:UNIX_SV:*:*)
1115
1117
                echo ns32k-sni-sysv
1116
1118
        fi
1117
1119
        exit 0 ;;
1118
 
    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1119
 
                      # says <Richard.M.Bartel@ccMail.Census.GOV>
 
1120
    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
 
1121
                           # says <Richard.M.Bartel@ccMail.Census.GOV>
1120
1122
        echo i586-unisys-sysv4
1121
1123
        exit 0 ;;
1122
1124
    *:UNIX_System_V:4*:FTX*)
1128
1130
        # From seanf@swdc.stratus.com.
1129
1131
        echo i860-stratus-sysv4
1130
1132
        exit 0 ;;
1131
 
    *:VOS:*:*)
1132
 
        # From Paul.Green@stratus.com.
1133
 
        echo hppa1.1-stratus-vos
1134
 
        exit 0 ;;
1135
1133
    mc68*:A/UX:*:*)
1136
1134
        echo m68k-apple-aux${UNAME_RELEASE}
1137
1135
        exit 0 ;;
1160
1158
    SX-5:SUPER-UX:*:*)
1161
1159
        echo sx5-nec-superux${UNAME_RELEASE}
1162
1160
        exit 0 ;;
1163
 
    SX-6:SUPER-UX:*:*)
1164
 
        echo sx6-nec-superux${UNAME_RELEASE}
1165
 
        exit 0 ;;
1166
1161
    Power*:Rhapsody:*:*)
1167
1162
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
1168
1163
        exit 0 ;;
1170
1165
        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1171
1166
        exit 0 ;;
1172
1167
    *:Darwin:*:*)
1173
 
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1174
 
        case $UNAME_PROCESSOR in
1175
 
            *86) UNAME_PROCESSOR=i686 ;;
1176
 
            unknown) UNAME_PROCESSOR=powerpc ;;
1177
 
        esac
1178
 
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 
1168
        echo `uname -p`-apple-darwin${UNAME_RELEASE}
1179
1169
        exit 0 ;;
1180
1170
    *:procnto*:*:* | *:QNX:[0123456789]*:*)
1181
 
        UNAME_PROCESSOR=`uname -p`
1182
 
        if test "$UNAME_PROCESSOR" = "x86"; then
1183
 
                UNAME_PROCESSOR=i386
 
1171
        if test "${UNAME_MACHINE}" = "x86pc"; then
1184
1172
                UNAME_MACHINE=pc
1185
1173
        fi
1186
 
        echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
 
1174
        echo `uname -p`-${UNAME_MACHINE}-nto-qnx
1187
1175
        exit 0 ;;
1188
1176
    *:QNX:*:4*)
1189
1177
        echo i386-pc-qnx
1190
1178
        exit 0 ;;
1191
 
    NSR-?:NONSTOP_KERNEL:*:*)
 
1179
    NSR-[KW]:NONSTOP_KERNEL:*:*)
1192
1180
        echo nsr-tandem-nsk${UNAME_RELEASE}
1193
1181
        exit 0 ;;
1194
1182
    *:NonStop-UX:*:*)
1211
1199
        fi
1212
1200
        echo ${UNAME_MACHINE}-unknown-plan9
1213
1201
        exit 0 ;;
 
1202
    i?86:OS/2:*:*)
 
1203
        # If we were able to find `uname', then EMX Unix compatibility
 
1204
        # is probably installed.
 
1205
        echo ${UNAME_MACHINE}-pc-os2-emx
 
1206
        exit 0 ;;
1214
1207
    *:TOPS-10:*:*)
1215
1208
        echo pdp10-unknown-tops10
1216
1209
        exit 0 ;;
1229
1222
    *:ITS:*:*)
1230
1223
        echo pdp10-unknown-its
1231
1224
        exit 0 ;;
1232
 
    SEI:*:*:SEIUX)
1233
 
        echo mips-sei-seiux${UNAME_RELEASE}
1234
 
        exit 0 ;;
1235
 
    *:DragonFly:*:*)
1236
 
        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1237
 
        exit 0 ;;
1238
 
    *:*VMS:*:*)
1239
 
        UNAME_MACHINE=`(uname -p) 2>/dev/null`
1240
 
        case "${UNAME_MACHINE}" in
1241
 
            A*) echo alpha-dec-vms && exit 0 ;;
1242
 
            I*) echo ia64-dec-vms && exit 0 ;;
1243
 
            V*) echo vax-dec-vms && exit 0 ;;
1244
 
        esac
1245
1225
esac
1246
1226
 
1247
1227
#echo '(No uname command or uname output not recognized.)' 1>&2
1248
1228
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1249
1229
 
1250
 
eval $set_cc_for_build
1251
1230
cat >$dummy.c <<EOF
1252
1231
#ifdef _SEQUENT_
1253
1232
# include <sys/types.h>
1334
1313
#endif
1335
1314
 
1336
1315
#if defined (vax)
1337
 
# if !defined (ultrix)
1338
 
#  include <sys/param.h>
1339
 
#  if defined (BSD)
1340
 
#   if BSD == 43
1341
 
      printf ("vax-dec-bsd4.3\n"); exit (0);
1342
 
#   else
1343
 
#    if BSD == 199006
1344
 
      printf ("vax-dec-bsd4.3reno\n"); exit (0);
1345
 
#    else
1346
 
      printf ("vax-dec-bsd\n"); exit (0);
1347
 
#    endif
1348
 
#   endif
1349
 
#  else
1350
 
    printf ("vax-dec-bsd\n"); exit (0);
1351
 
#  endif
1352
 
# else
1353
 
    printf ("vax-dec-ultrix\n"); exit (0);
1354
 
# endif
 
1316
#if !defined (ultrix)
 
1317
  printf ("vax-dec-bsd\n"); exit (0);
 
1318
#else
 
1319
  printf ("vax-dec-ultrix\n"); exit (0);
 
1320
#endif
1355
1321
#endif
1356
1322
 
1357
1323
#if defined (alliant) && defined (i860)
1362
1328
}
1363
1329
EOF
1364
1330
 
1365
 
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
 
1331
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
 
1332
rm -f $dummy.c $dummy
1366
1333
 
1367
1334
# Apollos put the system type in the environment.
1368
1335