21
24
# configuration script generated by Autoconf, you may include it under
22
25
# the same distribution terms that you use for the rest of that program.
24
# Written by Per Bothner <bothner@cygnus.com>.
25
# The master version of this file is at the FSF in /home/gd/gnu/lib.
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
31
# This script attempts to guess a canonical system name similar to
28
32
# config.sub. If it succeeds, it prints the system name on stdout, and
29
33
# exits with 0. Otherwise, it exits with 1.
31
35
# The plan is that this can be called by configure scripts if you
32
# don't specify an explicit system type (host/target name).
34
# Only a few systems have been added to this list; please add others
35
# (but try to keep the structure clean).
36
# don't specify an explicit build system type.
38
me=`echo "$0" | sed -e 's,.*/,,'`
43
Output the configuration name of the system \`$me' is run on.
46
-h, --help print this help, then exit
47
-t, --time-stamp print date of last modification, then exit
48
-v, --version print version number, then exit
50
Report bugs and patches to <config-patches@gnu.org>."
53
GNU config.guess ($timestamp)
55
Originally written by Per Bothner.
56
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
57
Free Software Foundation, Inc.
59
This is free software; see the source for copying conditions. There is NO
60
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
63
Try \`$me --help' for more information."
66
while test $# -gt 0 ; do
68
--time-stamp | --time* | -t )
69
echo "$timestamp" ; exit 0 ;;
71
echo "$version" ; exit 0 ;;
73
echo "$usage"; exit 0 ;;
74
-- ) # Stop option processing
76
- ) # Use stdin as input.
79
echo "$me: invalid option $1$help" >&2
87
echo "$me: too many arguments$help" >&2
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.
98
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
99
# use `HOST_CC' if defined, but it is deprecated.
101
# This shell variable is my proudest work .. or something. --bje
103
set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
104
(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
105
|| (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
106
dummy=$tmpdir/dummy ;
107
files="$dummy.c $dummy.o $dummy.rel $dummy" ;
108
trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
109
case $CC_FOR_BUILD,$HOST_CC,$CC in
110
,,) echo "int x;" > $dummy.c ;
111
for c in cc gcc c89 c99 ; do
112
if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then
113
CC_FOR_BUILD="$c"; break ;
117
if test x"$CC_FOR_BUILD" = x ; then
118
CC_FOR_BUILD=no_compiler_found ;
121
,,*) CC_FOR_BUILD=$CC ;;
122
,*,*) CC_FOR_BUILD=$HOST_CC ;;
38
126
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
39
# (ghazi@noc.rutgers.edu 8/24/94.)
127
# (ghazi@noc.rutgers.edu 1994-08-24)
40
128
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
41
129
PATH=$PATH:/.attbin ; export PATH
44
132
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
45
133
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
46
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
134
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
47
135
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
49
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
51
137
# Note: order is significant - the case branches are not exclusive.
53
139
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
141
# NetBSD (nbsd) targets should (where applicable) match one or
142
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
143
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
144
# switched to ELF, *-*-netbsd* would select the old
145
# object file format. This provides both forward
146
# compatibility and a consistent mechanism for selecting the
147
# object file format.
149
# Note: NetBSD doesn't particularly care about the vendor
150
# portion of the name. We always set it to "unknown".
151
sysctl="sysctl -n hw.machine_arch"
152
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
153
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
154
case "${UNAME_MACHINE_ARCH}" in
155
armeb) machine=armeb-unknown ;;
156
arm*) machine=arm-unknown ;;
157
sh3el) machine=shl-unknown ;;
158
sh3eb) machine=sh-unknown ;;
159
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
161
# The Operating System including object format, if it has switched
162
# to ELF recently, or will in the future.
163
case "${UNAME_MACHINE_ARCH}" in
164
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
165
eval $set_cc_for_build
166
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
167
| grep __ELF__ >/dev/null
169
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
170
# Return netbsd for either. FIX?
181
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
182
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
183
# contains redundant information, the shorter form:
184
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
185
echo "${machine}-${os}${release}"
188
echo m68k-unknown-openbsd${UNAME_RELEASE}
191
echo mipsel-unknown-openbsd${UNAME_RELEASE}
194
echo m68k-unknown-openbsd${UNAME_RELEASE}
197
echo m68k-unknown-openbsd${UNAME_RELEASE}
200
echo powerpc-unknown-openbsd${UNAME_RELEASE}
203
echo m68k-unknown-openbsd${UNAME_RELEASE}
206
echo m88k-unknown-openbsd${UNAME_RELEASE}
209
echo powerpc-unknown-openbsd${UNAME_RELEASE}
212
echo mipsel-unknown-openbsd${UNAME_RELEASE}
215
echo mipseb-unknown-openbsd${UNAME_RELEASE}
218
echo m68k-unknown-openbsd${UNAME_RELEASE}
221
echo mipsel-unknown-openbsd${UNAME_RELEASE}
224
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
227
if test $UNAME_RELEASE = "V4.0"; then
228
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
55
230
# A Vn.n version is a released version.
56
231
# A Tn.n version is a released field test version.
57
232
# A Xn.n version is an unreleased experimental baselevel.
58
233
# 1.2 uses "1.2" for uname -r.
59
echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
234
eval $set_cc_for_build
238
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
245
.frame \$30,16,\$26,0
248
.long 0x47e03d80 # implver \$0
250
.long 0x47e20c21 # amask \$2,\$1
260
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
261
if test "$?" = 0 ; then
264
UNAME_MACHINE="alpha"
267
UNAME_MACHINE="alphaev5"
270
UNAME_MACHINE="alphaev56"
273
UNAME_MACHINE="alphapca56"
276
UNAME_MACHINE="alphaev6"
279
UNAME_MACHINE="alphaev67"
282
UNAME_MACHINE="alphaev68"
285
UNAME_MACHINE="alphaev7"
289
rm -f $dummy.s $dummy && rmdir $tmpdir
290
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
292
Alpha\ *:Windows_NT*:*)
293
# How do we know it's Interix rather than the generic POSIX subsystem?
294
# Should we change UNAME_MACHINE based on the output of uname instead
295
# of the specific Alpha model?
296
echo alpha-pc-interix
61
298
21064:Windows_NT:50:3)
62
299
echo alpha-dec-winnt3.5
64
301
Amiga*:UNIX_System_V:4.0:*)
302
echo m68k-unknown-sysv4
68
echo m68k-cbm-netbsd${UNAME_RELEASE}
71
echo m68k-cbm-openbsd${UNAME_RELEASE}
304
*:[Aa]miga[Oo][Ss]:*:*)
305
echo ${UNAME_MACHINE}-unknown-amigaos
307
*:[Mm]orph[Oo][Ss]:*:*)
308
echo ${UNAME_MACHINE}-unknown-morphos
311
echo i370-ibm-openedition
73
313
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
74
314
echo arm-acorn-riscix${UNAME_RELEASE}
76
Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
316
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
317
echo hppa1.1-hitachi-hiuxmpp
319
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
77
320
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
78
321
if test "`(/bin/universe) 2>/dev/null`" = att ; then
79
322
echo pyramid-pyramid-sysv3
267
568
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
268
569
echo m68k-hp-bsd4.4
270
9000/[3478]??:HP-UX:*:*)
571
9000/[34678]??:HP-UX:*:*)
572
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
271
573
case "${UNAME_MACHINE}" in
272
574
9000/31? ) HP_ARCH=m68000 ;;
273
575
9000/[34]?? ) HP_ARCH=m68k ;;
274
9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
275
9000/8?? ) HP_ARCH=hppa1.0 ;;
576
9000/[678][0-9][0-9])
577
if [ -x /usr/bin/getconf ]; then
578
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
579
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
580
case "${sc_cpu_version}" in
581
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
582
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
583
532) # CPU_PA_RISC2_0
584
case "${sc_kernel_bits}" in
585
32) HP_ARCH="hppa2.0n" ;;
586
64) HP_ARCH="hppa2.0w" ;;
587
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
591
if [ "${HP_ARCH}" = "" ]; then
592
eval $set_cc_for_build
593
sed 's/^ //' << EOF >$dummy.c
601
#if defined(_SC_KERNEL_BITS)
602
long bits = sysconf(_SC_KERNEL_BITS);
604
long cpu = sysconf (_SC_CPU_VERSION);
608
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
609
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
611
#if defined(_SC_KERNEL_BITS)
614
case 64: puts ("hppa2.0w"); break;
615
case 32: puts ("hppa2.0n"); break;
616
default: puts ("hppa2.0"); break;
618
#else /* !defined(_SC_KERNEL_BITS) */
619
puts ("hppa2.0"); break;
621
default: puts ("hppa1.0"); break;
626
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy`
627
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
628
rm -f $dummy.c $dummy && rmdir $tmpdir
277
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
278
631
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
634
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
635
echo ia64-hp-hpux${HPUX_REV}
281
sed 's/^ //' << EOF >dummy.c
638
eval $set_cc_for_build
639
sed 's/^ //' << EOF >$dummy.c
282
640
#include <unistd.h>
347
708
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
348
709
echo c4-convex-bsd
354
echo ymp-cray-unicos${UNAME_RELEASE}
712
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
356
714
CRAY*[A-Z]90:*:*:*)
357
715
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
358
716
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
359
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
717
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
362
echo t90-cray-unicos${UNAME_RELEASE}
365
echo cray2-cray-unicos
367
F300:UNIX_System_V:*:*)
368
FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
721
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
724
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
727
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
730
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
732
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
733
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
734
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
369
735
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
370
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
736
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
372
F301:UNIX_System_V:*:*)
373
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
375
hp3[0-9][05]:NetBSD:*:*)
376
echo m68k-hp-netbsd${UNAME_RELEASE}
378
hp3[0-9][05]:OpenBSD:*:*)
379
echo m68k-hp-openbsd${UNAME_RELEASE}
381
i?86:BSD/386:*:* | *:BSD/OS:*:*)
738
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
382
739
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
742
echo sparc-unknown-bsdi${UNAME_RELEASE}
745
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
385
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
388
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
391
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
748
# Determine whether the default compiler uses glibc.
749
eval $set_cc_for_build
750
sed 's/^ //' << EOF >$dummy.c
751
#include <features.h>
758
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
759
rm -f $dummy.c && rmdir $tmpdir
760
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
394
echo i386-pc-cygwin32
763
echo ${UNAME_MACHINE}-pc-cygwin
766
echo ${UNAME_MACHINE}-pc-mingw32
769
echo ${UNAME_MACHINE}-pc-pw32
772
echo i386-pc-interix3
774
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
775
# How do we know it's Interix rather than the generic POSIX subsystem?
776
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
777
# UNAME_MACHINE based on the output of uname instead of i386?
781
echo ${UNAME_MACHINE}-pc-uwin
397
echo powerpcle-unknown-cygwin32
784
echo powerpcle-unknown-cygwin
399
786
prep*:SunOS:5.*:*)
400
787
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
403
echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
790
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
793
echo ${UNAME_MACHINE}-pc-minix
796
echo ${UNAME_MACHINE}-unknown-linux-gnu
799
echo ${UNAME_MACHINE}-unknown-linux-gnu
802
echo ${UNAME_MACHINE}-unknown-linux-gnu
805
eval $set_cc_for_build
806
sed 's/^ //' << EOF >$dummy.c
810
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
813
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
820
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
821
rm -f $dummy.c && rmdir $tmpdir
822
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
825
echo powerpc-unknown-linux-gnu
828
echo powerpc64-unknown-linux-gnu
831
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
832
EV5) UNAME_MACHINE=alphaev5 ;;
833
EV56) UNAME_MACHINE=alphaev56 ;;
834
PCA56) UNAME_MACHINE=alphapca56 ;;
835
PCA57) UNAME_MACHINE=alphapca56 ;;
836
EV6) UNAME_MACHINE=alphaev6 ;;
837
EV67) UNAME_MACHINE=alphaev67 ;;
838
EV68*) UNAME_MACHINE=alphaev68 ;;
840
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
841
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
842
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
844
parisc:Linux:*:* | hppa:Linux:*:*)
846
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
847
PA7*) echo hppa1.1-unknown-linux-gnu ;;
848
PA8*) echo hppa2.0-unknown-linux-gnu ;;
849
*) echo hppa-unknown-linux-gnu ;;
852
parisc64:Linux:*:* | hppa64:Linux:*:*)
853
echo hppa64-unknown-linux-gnu
855
s390:Linux:*:* | s390x:Linux:*:*)
856
echo ${UNAME_MACHINE}-ibm-linux
859
echo ${UNAME_MACHINE}-unknown-linux-gnu
861
sparc:Linux:*:* | sparc64:Linux:*:*)
862
echo ${UNAME_MACHINE}-unknown-linux-gnu
865
echo x86_64-unknown-linux-gnu
406
868
# The BFD linker knows what the default object file format is, so
407
# first see if it will tell us.
408
ld_help_string=`ld --help 2>&1`
409
if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then
410
echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0
411
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then
412
echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
413
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then
414
echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0
415
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
416
echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0
417
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
418
echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0
419
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then
420
echo "powerpc-unknown-linux-gnu" ; exit 0
421
elif test "${UNAME_MACHINE}" = "alpha" ; then
422
echo alpha-unknown-linux-gnu ; exit 0
423
elif test "${UNAME_MACHINE}" = "sparc" ; then
424
echo sparc-unknown-linux-gnu ; exit 0
426
# Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us
427
# useful --help. Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout.
428
test ! -d /usr/lib/ldscripts/. \
429
&& echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
430
# Determine whether the default compiler is a.out or elf
437
printf ("%s-pc-linux-gnu\n", argv[1]);
439
printf ("%s-pc-linux-gnuaout\n", argv[1]);
869
# first see if it will tell us. cd to the root directory to prevent
870
# problems with other programs or directories called `ld' in the path.
871
# Set LC_ALL=C to ensure ld outputs messages in English.
872
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
873
| sed -ne '/supported targets:/!d
875
s/.*supported targets: *//
878
case "$ld_supported_targets" in
880
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
883
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
886
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
889
# Either a pre-BFD a.out linker (linux-gnuoldld) or
890
# one that does not give us useful --help.
891
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
894
# Determine whether the default compiler is a.out or elf
895
eval $set_cc_for_build
896
sed 's/^ //' << EOF >$dummy.c
897
#include <features.h>
909
#ifdef __INTEL_COMPILER
444
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
447
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
448
# are messed up and put the nodename in both sysname and nodename.
916
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
917
rm -f $dummy.c && rmdir $tmpdir
918
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
919
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
922
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
923
# earlier versions are messed up and put the nodename in both
924
# sysname and nodename.
450
925
echo i386-sequent-sysv4
452
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
927
i*86:UNIX_SV:4.2MP:2.*)
928
# Unixware is an offshoot of SVR4, but it has its own version
929
# number series starting with 2...
930
# I am not positive that other SVR4 systems won't match this,
931
# I just have to hope. -- rms.
932
# Use sysv4.2uw... so that sysv4* matches it.
933
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
935
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
936
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
453
937
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
454
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
938
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
456
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
940
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
944
case `/bin/uname -X | grep "^Machine"` in
945
*486*) UNAME_MACHINE=i486 ;;
946
*Pentium) UNAME_MACHINE=i586 ;;
947
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
949
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
460
952
if test -f /usr/options/cb.name; then
461
953
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
462
954
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
463
955
elif /bin/uname -X 2>/dev/null >/dev/null ; then
464
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
465
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
466
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
956
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
957
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
958
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
467
959
&& UNAME_MACHINE=i586
960
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
961
&& UNAME_MACHINE=i686
962
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
963
&& UNAME_MACHINE=i686
468
964
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
470
966
echo ${UNAME_MACHINE}-pc-sysv32
970
echo ${UNAME_MACHINE}-pc-msdosdjgpp
973
# Left here for compatibility:
974
# uname -m prints for DJGPP always 'pc', but it prints nothing about
975
# the processor, so we play safe by assuming i386.
976
echo i386-pc-msdosdjgpp
474
979
echo i386-pc-mach3
538
1056
# From seanf@swdc.stratus.com.
539
1057
echo i860-stratus-sysv4
1060
# From Paul.Green@stratus.com.
1061
echo hppa1.1-stratus-vos
542
1064
echo m68k-apple-aux${UNAME_RELEASE}
544
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
1067
echo mips-sony-newsos6
1069
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
545
1070
if [ -d /usr/nec ]; then
546
1071
echo mips-nec-sysv${UNAME_RELEASE}
548
1073
echo mips-unknown-sysv${UNAME_RELEASE}
551
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
552
# says <Richard.M.Bartel@ccMail.Census.GOV>
553
echo i586-unisys-sysv4
1076
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1077
echo powerpc-be-beos
1079
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1080
echo powerpc-apple-beos
1082
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1086
echo sx4-nec-superux${UNAME_RELEASE}
1089
echo sx5-nec-superux${UNAME_RELEASE}
1092
echo sx6-nec-superux${UNAME_RELEASE}
1094
Power*:Rhapsody:*:*)
1095
echo powerpc-apple-rhapsody${UNAME_RELEASE}
1098
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1101
echo `uname -p`-apple-darwin${UNAME_RELEASE}
1103
*:procnto*:*:* | *:QNX:[0123456789]*:*)
1104
UNAME_PROCESSOR=`uname -p`
1105
if test "$UNAME_PROCESSOR" = "x86"; then
1106
UNAME_PROCESSOR=i386
1109
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1114
NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
1115
echo nsr-tandem-nsk${UNAME_RELEASE}
1118
echo mips-compaq-nonstopux
1121
echo bs2000-siemens-sysv
1123
DS/*:UNIX_System_V:*:*)
1124
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1127
# "uname -m" is not consistent, so use $cputype instead. 386
1128
# is converted to i386 for consistency with other x86
1129
# operating systems.
1130
if test "$cputype" = "386"; then
1133
UNAME_MACHINE="$cputype"
1135
echo ${UNAME_MACHINE}-unknown-plan9
1138
# If we were able to find `uname', then EMX Unix compatibility
1139
# is probably installed.
1140
echo ${UNAME_MACHINE}-pc-os2-emx
1143
echo pdp10-unknown-tops10
1146
echo pdp10-unknown-tenex
1148
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1149
echo pdp10-dec-tops20
1151
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1152
echo pdp10-xkl-tops20
1155
echo pdp10-unknown-tops20
1158
echo pdp10-unknown-its
1160
i*86:XTS-300:*:STOP)
1161
echo ${UNAME_MACHINE}-unknown-stop
1164
echo ${UNAME_MACHINE}-unknown-atheos
557
1168
#echo '(No uname command or uname output not recognized.)' 1>&2
558
1169
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1171
eval $set_cc_for_build
561
1173
#ifdef _SEQUENT_
562
1174
# include <sys/types.h>
563
1175
# include <sys/utsname.h>