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 <bothner@cygnus.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).
38
# Use $HOST_CC if defined. $CC may point to a cross-compiler
39
if test x"$CC_FOR_BUILD" = x; then
40
if test x"$HOST_CC" != x; then
41
CC_FOR_BUILD="$HOST_CC"
43
if test x"$CC" != x; then
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
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
95
# CC_FOR_BUILD -- compiler used by this script.
96
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
97
# use `HOST_CC' if defined, but it is deprecated.
99
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
100
,,) echo "int dummy(){}" > $dummy.c ;
101
for c in cc gcc c89 ; do
102
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
103
if test $? = 0 ; then
104
CC_FOR_BUILD="$c"; break ;
107
rm -f $dummy.c $dummy.o $dummy.rel ;
108
if test x"$CC_FOR_BUILD" = x ; then
109
CC_FOR_BUILD=no_compiler_found ;
112
,,*) CC_FOR_BUILD=$CC ;;
113
,*,*) CC_FOR_BUILD=$HOST_CC ;;
51
116
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
52
# (ghazi@noc.rutgers.edu 8/24/94.)
117
# (ghazi@noc.rutgers.edu 1994-08-24)
53
118
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
54
119
PATH=$PATH:/.attbin ; export PATH
55
elif (test -f /usr/5bin/uname) >/dev/null 2>&1 ; then
59
UNAME=`(uname) 2>/dev/null` || UNAME=unknown
60
122
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
61
123
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
62
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
124
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
63
125
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
65
RELEASE=`expr "$UNAME_RELEASE" : '[^0-9]*\([0-9]*\)'` # 4
68
*) RELEASE=`expr "$RELEASE" + 0` ;;
70
REL_LEVEL=`expr "$UNAME_RELEASE" : '[^0-9]*[0-9]*.\([0-9]*\)'` # 1
71
REL_SUBLEVEL=`expr "$UNAME_RELEASE" : '[^0-9]*[0-9]*.[0-9]*.\([0-9]*\)'` # 2
74
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
76
# Some versions of i386 SVR4.2 make `uname' equivalent to `uname -n', which
77
# is contrary to all other versions of uname
78
if [ -n "$UNAME" ] && [ "$UNAME_S" != "$UNAME" ] && [ "$UNAME_S" = UNIX_SV ]; then
82
127
# Note: order is significant - the case branches are not exclusive.
84
129
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
85
# Begin cases added for Bash
87
echo alpha-dec-netbsd${UNAME_RELEASE}
90
echo alpha-dec-openbsd${UNAME_RELEASE}
93
echo ${UNAME_MACHINE}-pc-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
96
echo ${UNAME_MACHINE}-pc-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
99
echo sparc-unknown-netbsd${UNAME_RELEASE}
102
echo sparc-unknown-openbsd${UNAME_RELEASE}
105
echo vax-dec-netbsd${UNAME_RELEASE}
108
echo vax-dec-openbsd${UNAME_RELEASE}
111
echo mac68k-apple-machten${UNAME_RELEASE}
114
if test "`(/bin/universe) 2>/dev/null`" = att ; then
115
echo concurrent-concurrent-sysv3
117
echo concurrent-concurrent-bsd
121
echo ppc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
124
echo sparc-unknown-sysv${UNAME_RELEASE}
127
echo mips-mips-sysv${UNAME_RELEASE}
133
echo mips-mips-bsd4.4
135
MIServer-S:SMP_DC.OSx:*:dcosx)
136
echo mips-pyramid-sysv4
139
echo mips-sony-newsos${UNAME_RELEASE}
142
echo i386-next-nextstep${RELEASE}
145
echo m68k-next-nextstep${RELEASE}
153
esa:OSF*1:*:* | ESA:OSF*:*:*)
163
echo i386-qssl-qnx`echo ${UNAME_VERSION}`
165
Alpha*:Windows:NT:*:SP*)
172
echo mips-compaq-nonstopux
174
# end cases added for Bash
131
# NetBSD (nbsd) targets should (where applicable) match one or
132
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
133
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
134
# switched to ELF, *-*-netbsd* would select the old
135
# object file format. This provides both forward
136
# compatibility and a consistent mechanism for selecting the
137
# object file format.
139
# Note: NetBSD doesn't particularly care about the vendor
140
# portion of the name. We always set it to "unknown".
141
UNAME_MACHINE_ARCH=`(uname -p) 2>/dev/null` || \
142
UNAME_MACHINE_ARCH=unknown
143
case "${UNAME_MACHINE_ARCH}" in
144
arm*) machine=arm-unknown ;;
145
sh3el) machine=shl-unknown ;;
146
sh3eb) machine=sh-unknown ;;
147
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
149
# The Operating System including object format, if it has switched
150
# to ELF recently, or will in the future.
151
case "${UNAME_MACHINE_ARCH}" in
152
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
153
eval $set_cc_for_build
154
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
155
| grep __ELF__ >/dev/null
157
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
158
# Return netbsd for either. FIX?
169
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
170
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
171
# contains redundant information, the shorter form:
172
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
173
echo "${machine}-${os}${release}"
176
echo m68k-unknown-openbsd${UNAME_RELEASE}
179
echo mipsel-unknown-openbsd${UNAME_RELEASE}
182
echo m68k-unknown-openbsd${UNAME_RELEASE}
185
echo m68k-unknown-openbsd${UNAME_RELEASE}
188
echo powerpc-unknown-openbsd${UNAME_RELEASE}
191
echo m68k-unknown-openbsd${UNAME_RELEASE}
194
echo m88k-unknown-openbsd${UNAME_RELEASE}
197
echo powerpc-unknown-openbsd${UNAME_RELEASE}
200
echo mipsel-unknown-openbsd${UNAME_RELEASE}
203
echo mipseb-unknown-openbsd${UNAME_RELEASE}
206
echo m68k-unknown-openbsd${UNAME_RELEASE}
209
echo mipsel-unknown-openbsd${UNAME_RELEASE}
212
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
176
# TEST CHANGED FOR BASH to handle `letter version' releases
177
UNAME_MAJOR=`echo "$UNAME_RELEASE" | sed -e 's/^.\([0-9]\).*/\1/'`
178
if test X"$UNAME_MAJOR" != X"" && test $UNAME_MAJOR = 4 ; then
215
if test $UNAME_RELEASE = "V4.0"; then
179
216
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
180
elif test X"$UNAME_MAJOR" != X"" && test $UNAME_MAJOR -gt 4 ; then
181
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
183
218
# A Vn.n version is a released version.
184
219
# A Tn.n version is a released field test version.
185
220
# A Xn.n version is an unreleased experimental baselevel.
186
221
# 1.2 uses "1.2" for uname -r.
187
222
cat <<EOF >$dummy.s
225
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
193
.long 0x47e03d80 # implver $0
195
.long 0x47e20c21 # amask $2,$1
232
.frame \$30,16,\$26,0
235
.long 0x47e03d80 # implver \$0
237
.long 0x47e20c21 # amask \$2,\$1
247
eval $set_cc_for_build
204
248
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
205
249
if test "$?" = 0 ; then
209
252
UNAME_MACHINE="alpha"
212
255
UNAME_MACHINE="alphaev5"
215
258
UNAME_MACHINE="alphaev56"
218
261
UNAME_MACHINE="alphapca56"
221
264
UNAME_MACHINE="alphaev6"
267
UNAME_MACHINE="alphaev67"
270
UNAME_MACHINE="alphaev68"
225
274
rm -f $dummy.s $dummy
226
275
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
228
277
Alpha\ *:Windows_NT*:*)
229
# How do we know it's Interix rather than the generic POSIX subsystem?
230
# Should we change UNAME_MACHINE based on the output of uname instead
231
# of the specific Alpha model?
232
echo alpha-pc-interix
278
# How do we know it's Interix rather than the generic POSIX subsystem?
279
# Should we change UNAME_MACHINE based on the output of uname instead
280
# of the specific Alpha model?
281
echo alpha-pc-interix
234
283
21064:Windows_NT:50:3)
235
284
echo alpha-dec-winnt3.5
237
286
Amiga*:UNIX_System_V:4.0:*)
287
echo m68k-unknown-sysv4
241
echo m68k-cbm-netbsd${UNAME_RELEASE}
244
echo m68k-cbm-openbsd${UNAME_RELEASE}
246
289
*:[Aa]miga[Oo][Ss]:*:*)
247
290
echo ${UNAME_MACHINE}-unknown-amigaos
250
echo mips64el-unknown-openbsd${UNAME_RELEASE}
253
echo mipsel-unknown-openbsd${UNAME_RELEASE}
256
echo mips-unknown-openbsd${UNAME_RELEASE}
259
echo mipsel-unknown-openbsd${UNAME_RELEASE}
262
echo mips-unknown-openbsd${UNAME_RELEASE}
265
echo mipsel-unknown-openbsd${UNAME_RELEASE}
292
*:[Mm]orph[Oo][Ss]:*:*)
293
echo ${UNAME_MACHINE}-unknown-morphos
296
echo i370-ibm-openedition
267
298
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
268
299
echo arm-acorn-riscix${UNAME_RELEASE}
271
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
273
SR2?01:HI-UX/MPP:*:*)
301
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
274
302
echo hppa1.1-hitachi-hiuxmpp
276
304
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
655
687
echo xmp-cray-unicos
658
echo ymp-cray-unicos${UNAME_RELEASE}
690
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
660
692
CRAY*[A-Z]90:*:*:*)
661
693
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
662
694
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
663
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
695
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
666
echo t90-cray-unicos${UNAME_RELEASE}
699
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
702
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
669
echo alpha-cray-unicosmk${UNAME_RELEASE}
705
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
708
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
672
711
echo cray2-cray-unicos
674
F300:UNIX_System_V:*:*)
675
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
676
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
677
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
679
F301:UNIX_System_V:*:*)
680
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
682
hp3[0-9][05]:NetBSD:*:*)
683
echo m68k-hp-netbsd${UNAME_RELEASE}
686
echo m68k-unknown-openbsd${UNAME_RELEASE}
713
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
714
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
715
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
716
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
717
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
688
i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
719
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
689
720
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
691
722
sparc*:BSD/OS:*:*)
692
echo sparc-unknown-bsdi${UNAME_RELEASE}
723
echo sparc-unknown-bsdi${UNAME_RELEASE}
695
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
726
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
698
# if test -x /usr/bin/objformat; then
699
# if test "elf" = "`/usr/bin/objformat`"; then
700
# echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
704
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-=(].*//'`
707
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
710
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
729
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
713
732
echo ${UNAME_MACHINE}-pc-cygwin
716
735
echo ${UNAME_MACHINE}-pc-mingw32
738
echo ${UNAME_MACHINE}-pc-pw32
741
echo i386-pc-interix3
718
743
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
719
# How do we know it's Interix rather than the generic POSIX subsystem?
720
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
721
# UNAME_MACHINE based on the output of uname instead of i386?
744
# How do we know it's Interix rather than the generic POSIX subsystem?
745
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
746
# UNAME_MACHINE based on the output of uname instead of i386?
725
echo ${UNAME_MACHINE}-pc-uwin
750
echo ${UNAME_MACHINE}-pc-uwin
728
753
echo powerpcle-unknown-cygwin
730
755
prep*:SunOS:5.*:*)
731
756
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
734
759
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
737
# uname on the ARM produces all sorts of strangeness, and we need to
739
case "$UNAME_MACHINE" in
740
armv*) UNAME_MACHINE=$UNAME_MACHINE ;;
741
arm* | sa110*) UNAME_MACHINE="arm" ;;
762
echo ${UNAME_MACHINE}-pc-minix
765
echo ${UNAME_MACHINE}-unknown-linux-gnu
768
echo ${UNAME_MACHINE}-unknown-linux
771
echo ${UNAME_MACHINE}-unknown-linux-gnu
774
eval $set_cc_for_build
775
sed 's/^ //' << EOF >$dummy.c
779
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
782
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
789
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
791
test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
794
echo powerpc-unknown-linux-gnu
797
echo powerpc64-unknown-linux-gnu
800
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
801
EV5) UNAME_MACHINE=alphaev5 ;;
802
EV56) UNAME_MACHINE=alphaev56 ;;
803
PCA56) UNAME_MACHINE=alphapca56 ;;
804
PCA57) UNAME_MACHINE=alphapca56 ;;
805
EV6) UNAME_MACHINE=alphaev6 ;;
806
EV67) UNAME_MACHINE=alphaev67 ;;
807
EV68*) UNAME_MACHINE=alphaev68 ;;
809
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
810
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
811
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
813
parisc:Linux:*:* | hppa:Linux:*:*)
815
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
816
PA7*) echo hppa1.1-unknown-linux-gnu ;;
817
PA8*) echo hppa2.0-unknown-linux-gnu ;;
818
*) echo hppa-unknown-linux-gnu ;;
821
parisc64:Linux:*:* | hppa64:Linux:*:*)
822
echo hppa64-unknown-linux-gnu
824
s390:Linux:*:* | s390x:Linux:*:*)
825
echo ${UNAME_MACHINE}-ibm-linux
828
echo ${UNAME_MACHINE}-unknown-linux-gnu
830
sparc:Linux:*:* | sparc64:Linux:*:*)
831
echo ${UNAME_MACHINE}-unknown-linux-gnu
834
echo x86_64-unknown-linux-gnu
744
837
# The BFD linker knows what the default object file format is, so
745
# first see if it will tell us. cd to the root directory to prevent
838
# first see if it will tell us. cd to the root directory to prevent
746
839
# problems with other programs or directories called `ld' in the path.
747
ld_help_string=`cd /; ld --help 2>&1`
748
ld_supported_emulations=`echo $ld_help_string \
749
| sed -ne '/supported emulations:/!d
840
ld_supported_targets=`cd /; ld --help 2>&1 \
841
| sed -ne '/supported targets:/!d
751
s/.*supported emulations: *//
843
s/.*supported targets: *//
754
case "$ld_supported_emulations" in
755
*ia64) echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 ;;
756
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
757
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
758
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
759
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
760
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
761
elf32ppc | elf32ppclinux)
762
# Determine Lib Version
764
#include <features.h>
765
#if defined(__GLIBC__)
766
extern char __libc_version[];
767
extern char __libc_release[];
773
#if defined(__GLIBC__)
774
printf("%s %s\n", __libc_version, __libc_release);
782
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
783
if test "$?" = 0 ; then
784
./$dummy | grep 1\.99 > /dev/null
785
if test "$?" = 0 ; then
789
rm -f $dummy.c $dummy
790
echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;;
793
if test "${UNAME_MACHINE}" = "alpha" ; then
794
sed 's/^ //' <<EOF >$dummy.s
800
.long 0x47e03d80 # implver $0
802
.long 0x47e20c21 # amask $2,$1
812
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
813
if test "$?" = 0 ; then
817
UNAME_MACHINE="alpha"
820
UNAME_MACHINE="alphaev5"
823
UNAME_MACHINE="alphaev56"
826
UNAME_MACHINE="alphapca56"
829
UNAME_MACHINE="alphaev6"
833
objdump --private-headers $dummy | \
834
grep ld.so.1 > /dev/null
835
if test "$?" = 0 ; then
839
rm -f $dummy.s $dummy
840
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
841
elif test "${UNAME_MACHINE}" = "mips" ; then
844
int main (int argc, char *argv[]) {
846
int main (argc, argv) int argc; char *argv[]; {
849
printf ("%s-unknown-linux-gnu\n", argv[1]);
852
printf ("%sel-unknown-linux-gnu\n", argv[1]);
857
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
858
rm -f $dummy.c $dummy
860
# Either a pre-BFD a.out linker (linux-gnuoldld)
861
# or one that does not give us useful --help.
862
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
863
# If ld does not provide *any* "supported emulations:"
864
# that means it is gnuoldld.
865
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
866
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
868
case "${UNAME_MACHINE}" in
876
# Determine whether the default compiler is a.out or elf
878
#include <features.h>
880
int main (int argc, char *argv[]) {
882
int main (argc, argv) int argc; char *argv[]; {
887
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
889
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
892
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
895
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
900
${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
901
rm -f $dummy.c $dummy
903
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
904
# are messed up and put the nodename in both sysname and nodename.
846
case "$ld_supported_targets" in
848
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
851
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
854
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
857
# Either a pre-BFD a.out linker (linux-gnuoldld) or
858
# one that does not give us useful --help.
859
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
862
# Determine whether the default compiler is a.out or elf
863
eval $set_cc_for_build
864
sed 's/^ //' << EOF >$dummy.c
865
#include <features.h>
880
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
882
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
883
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
886
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
887
# earlier versions are messed up and put the nodename in both
888
# sysname and nodename.
906
889
echo i386-sequent-sysv4
908
# added by chet for bash based on usenet posting from <hops@sco.com> and
909
# documentation on SCO's web site -- UnixWare 7 (SVR5)
910
# i?86:UnixWare:5*:*)
911
# echo ${UNAME_MACHINE}-pc-sysv5uw${UNAME_VERSION}
913
i?86:UNIX_SV:4.2MP:2.*)
914
# Unixware is an offshoot of SVR4, but it has its own version
915
# number series starting with 2...
916
# I am not positive that other SVR4 systems won't match this,
891
i*86:UNIX_SV:4.2MP:2.*)
892
# Unixware is an offshoot of SVR4, but it has its own version
893
# number series starting with 2...
894
# I am not positive that other SVR4 systems won't match this,
917
895
# I just have to hope. -- rms.
918
# Use sysv4.2uw... so that sysv4* matches it.
896
# Use sysv4.2uw... so that sysv4* matches it.
919
897
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
921
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:* | i?86:UNIX_SV:4.*:*)
899
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
900
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
922
901
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
923
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
902
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
925
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
904
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
929
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
930
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
931
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586
932
(/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686
933
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585
934
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE}
908
case `/bin/uname -X | grep "^Machine"` in
909
*486*) UNAME_MACHINE=i486 ;;
910
*Pentium) UNAME_MACHINE=i586 ;;
911
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
913
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
937
916
if test -f /usr/options/cb.name; then
938
917
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
939
918
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1168
1213
#if defined (vax)
1169
#if !defined (ultrix)
1170
printf ("vax-dec-bsd\n"); exit (0);
1172
printf ("vax-dec-ultrix\n"); exit (0);
1214
# if !defined (ultrix)
1215
# include <sys/param.h>
1218
printf ("vax-dec-bsd4.3\n"); exit (0);
1221
printf ("vax-dec-bsd4.3reno\n"); exit (0);
1223
printf ("vax-dec-bsd\n"); exit (0);
1227
printf ("vax-dec-bsd\n"); exit (0);
1230
printf ("vax-dec-ultrix\n"); exit (0);
1176
1234
#if defined (alliant) && defined (i860)
1177
1235
printf ("i860-alliant-bsd\n"); exit (0);
1180
/* Begin cases added for Bash */
1182
printf ("tahoe-cci-bsd\n"); exit (0);
1185
#if defined (nec_ews)
1186
# if defined (SYSTYPE_SYSV)
1187
printf ("ews4800-nec-sysv4\n"); exit 0;
1189
printf ("ews4800-nec-bsd\n"); exit (0);
1194
# if defined (SYSTYPE_SYSV)
1195
printf ("mips-sony-sysv4\n"); exit 0;
1197
printf ("mips-sony-bsd\n"); exit (0);
1201
#if defined (ardent)
1202
printf ("titan-ardent-bsd\n"); exit (0);
1205
#if defined (stardent)
1206
printf ("stardent-stardent-sysv\n"); exit (0);
1209
#if defined (ibm032)
1210
printf ("ibmrt-ibm-bsd4.3\n"); exit (0);
1213
#if defined (sequent) && defined (i386)
1214
printf ("i386-sequent-bsd\n"); exit (0);
1217
#if defined (qnx) && defined (i386)
1218
printf ("i386-pc-qnx\n"); exit (0);
1222
printf ("gould-gould-bsd\n"); exit (0);
1225
#if defined (unixpc)
1226
printf ("unixpc-att-sysv\n"); exit (0);
1229
#if defined (att386)
1230
printf ("i386-att-sysv3\n"); exit (0);
1233
#if defined (__m88k) && defined (__UMAXV__)
1234
printf ("m88k-encore-sysv3\n"); exit (0);
1237
#if defined (drs6000)
1238
printf ("drs6000-icl-sysv4.2\n"); exit (0);
1241
#if defined (clipper)
1242
printf ("clipper-orion-bsd\n"); exit (0);
1246
printf ("m68k-isi-bsd\n"); exit (0);
1249
#if defined (luna88k)
1250
printf ("luna88k-omron-bsd\n"); exit (0);
1253
#if defined (butterfly) && defined (BFLY1)
1254
printf ("butterfly-bbn-mach\n"); exit (0);
1257
#if defined (tower32)
1258
printf ("tower32-ncr-sysv4\n"); exit (0);
1261
#if defined (MagicStation)
1262
printf ("magicstation-unknown-bsd\n"); exit (0);
1266
printf ("symmetric-scs-bsd4.2\n"); exit (0);
1269
#if defined (tandem)
1270
printf ("tandem-tandem-sysv\n"); exit (0);
1273
#if defined (cadmus)
1274
printf ("cadmus-pcs-sysv\n"); exit (0);
1277
#if defined (masscomp)
1278
printf ("masscomp-masscomp-sysv3\n"); exit (0);
1281
#if defined (hbullx20)
1282
printf ("hbullx20-bull-sysv3\n"); exit (0);
1285
/* End cases added for Bash */
1291
${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
1242
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
1292
1243
rm -f $dummy.c $dummy
1294
1245
# Apollos put the system type in the environment.
1324
# Begin cases added for Bash
1326
uts) echo uts-amdahl-sysv${UNAME_RELEASE}; exit 0 ;;
1329
if [ -d /usr/amiga ]; then
1330
echo m68k-cbm-sysv${UNAME_RELEASE}; exit 0;
1333
if [ -f /bin/fxc.info ]; then
1334
echo fxc-alliant-concentrix
1337
# end cases added for Bash
1339
#echo '(Unable to guess system type)' 1>&2
1276
$0: unable to guess system type
1278
This script, last modified $timestamp, has failed to recognize
1279
the operating system you are using. It is advised that you
1280
download the most up to date version of the config scripts from
1282
ftp://ftp.gnu.org/pub/gnu/config/
1284
If the version you run ($0) is already up to date, please
1285
send the following data and any information you think might be
1286
pertinent to <config-patches@gnu.org> in order to provide the needed
1287
information to handle your system.
1289
config.guess timestamp = $timestamp
1291
uname -m = `(uname -m) 2>/dev/null || echo unknown`
1292
uname -r = `(uname -r) 2>/dev/null || echo unknown`
1293
uname -s = `(uname -s) 2>/dev/null || echo unknown`
1294
uname -v = `(uname -v) 2>/dev/null || echo unknown`
1296
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1297
/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1299
hostinfo = `(hostinfo) 2>/dev/null`
1300
/bin/universe = `(/bin/universe) 2>/dev/null`
1301
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1302
/bin/arch = `(/bin/arch) 2>/dev/null`
1303
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1304
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1306
UNAME_MACHINE = ${UNAME_MACHINE}
1307
UNAME_RELEASE = ${UNAME_RELEASE}
1308
UNAME_SYSTEM = ${UNAME_SYSTEM}
1309
UNAME_VERSION = ${UNAME_VERSION}
1315
# eval: (add-hook 'write-file-hooks 'time-stamp)
1316
# time-stamp-start: "timestamp='"
1317
# time-stamp-format: "%:y-%02m-%02d"
1318
# time-stamp-end: "'"