1 |
#! /bin/sh |
#! /bin/sh |
2 |
# Attempt to guess a canonical system name. |
# Attempt to guess a canonical system name. |
3 |
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
4 |
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. |
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
5 |
|
|
6 |
timestamp='2004-03-12' |
timestamp='2005-02-10' |
7 |
|
|
8 |
# This file is free software; you can redistribute it and/or modify it |
# This file is free software; you can redistribute it and/or modify it |
9 |
# under the terms of the GNU General Public License as published by |
# under the terms of the GNU General Public License as published by |
53 |
GNU config.guess ($timestamp) |
GNU config.guess ($timestamp) |
54 |
|
|
55 |
Originally written by Per Bothner. |
Originally written by Per Bothner. |
56 |
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 |
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
57 |
Free Software Foundation, Inc. |
Free Software Foundation, Inc. |
58 |
|
|
59 |
This is free software; see the source for copying conditions. There is NO |
This is free software; see the source for copying conditions. There is NO |
203 |
amiga:OpenBSD:*:*) |
amiga:OpenBSD:*:*) |
204 |
echo m68k-unknown-openbsd${UNAME_RELEASE} |
echo m68k-unknown-openbsd${UNAME_RELEASE} |
205 |
exit 0 ;; |
exit 0 ;; |
|
arc:OpenBSD:*:*) |
|
|
echo mipsel-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
206 |
cats:OpenBSD:*:*) |
cats:OpenBSD:*:*) |
207 |
echo arm-unknown-openbsd${UNAME_RELEASE} |
echo arm-unknown-openbsd${UNAME_RELEASE} |
208 |
exit 0 ;; |
exit 0 ;; |
209 |
hp300:OpenBSD:*:*) |
hp300:OpenBSD:*:*) |
210 |
echo m68k-unknown-openbsd${UNAME_RELEASE} |
echo m68k-unknown-openbsd${UNAME_RELEASE} |
211 |
exit 0 ;; |
exit 0 ;; |
212 |
|
luna88k:OpenBSD:*:*) |
213 |
|
echo m88k-unknown-openbsd${UNAME_RELEASE} |
214 |
|
exit 0 ;; |
215 |
mac68k:OpenBSD:*:*) |
mac68k:OpenBSD:*:*) |
216 |
echo m68k-unknown-openbsd${UNAME_RELEASE} |
echo m68k-unknown-openbsd${UNAME_RELEASE} |
217 |
exit 0 ;; |
exit 0 ;; |
227 |
mvmeppc:OpenBSD:*:*) |
mvmeppc:OpenBSD:*:*) |
228 |
echo powerpc-unknown-openbsd${UNAME_RELEASE} |
echo powerpc-unknown-openbsd${UNAME_RELEASE} |
229 |
exit 0 ;; |
exit 0 ;; |
|
pegasos:OpenBSD:*:*) |
|
|
echo powerpc-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
|
pmax:OpenBSD:*:*) |
|
|
echo mipsel-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
230 |
sgi:OpenBSD:*:*) |
sgi:OpenBSD:*:*) |
231 |
echo mipseb-unknown-openbsd${UNAME_RELEASE} |
echo mips64-unknown-openbsd${UNAME_RELEASE} |
232 |
exit 0 ;; |
exit 0 ;; |
233 |
sun3:OpenBSD:*:*) |
sun3:OpenBSD:*:*) |
234 |
echo m68k-unknown-openbsd${UNAME_RELEASE} |
echo m68k-unknown-openbsd${UNAME_RELEASE} |
235 |
exit 0 ;; |
exit 0 ;; |
|
wgrisc:OpenBSD:*:*) |
|
|
echo mipsel-unknown-openbsd${UNAME_RELEASE} |
|
|
exit 0 ;; |
|
236 |
*:OpenBSD:*:*) |
*:OpenBSD:*:*) |
237 |
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} |
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} |
238 |
exit 0 ;; |
exit 0 ;; |
298 |
# 1.2 uses "1.2" for uname -r. |
# 1.2 uses "1.2" for uname -r. |
299 |
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
300 |
exit 0 ;; |
exit 0 ;; |
|
Alpha*:OpenVMS:*:*) |
|
|
echo alpha-hp-vms |
|
|
exit 0 ;; |
|
301 |
Alpha\ *:Windows_NT*:*) |
Alpha\ *:Windows_NT*:*) |
302 |
# How do we know it's Interix rather than the generic POSIX subsystem? |
# How do we know it's Interix rather than the generic POSIX subsystem? |
303 |
# Should we change UNAME_MACHINE based on the output of uname instead |
# Should we change UNAME_MACHINE based on the output of uname instead |
319 |
*:OS/390:*:*) |
*:OS/390:*:*) |
320 |
echo i370-ibm-openedition |
echo i370-ibm-openedition |
321 |
exit 0 ;; |
exit 0 ;; |
322 |
|
*:z/VM:*:*) |
323 |
|
echo s390-ibm-zvmoe |
324 |
|
exit 0 ;; |
325 |
*:OS400:*:*) |
*:OS400:*:*) |
326 |
echo powerpc-ibm-os400 |
echo powerpc-ibm-os400 |
327 |
exit 0 ;; |
exit 0 ;; |
345 |
DRS?6000:unix:4.0:6*) |
DRS?6000:unix:4.0:6*) |
346 |
echo sparc-icl-nx6 |
echo sparc-icl-nx6 |
347 |
exit 0 ;; |
exit 0 ;; |
348 |
DRS?6000:UNIX_SV:4.2*:7*) |
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) |
349 |
case `/usr/bin/uname -p` in |
case `/usr/bin/uname -p` in |
350 |
sparc) echo sparc-icl-nx7 && exit 0 ;; |
sparc) echo sparc-icl-nx7 && exit 0 ;; |
351 |
esac ;; |
esac ;; |
755 |
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
756 |
exit 0 ;; |
exit 0 ;; |
757 |
*:UNICOS/mp:*:*) |
*:UNICOS/mp:*:*) |
758 |
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
759 |
exit 0 ;; |
exit 0 ;; |
760 |
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
761 |
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
778 |
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} |
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} |
779 |
exit 0 ;; |
exit 0 ;; |
780 |
*:FreeBSD:*:*) |
*:FreeBSD:*:*) |
781 |
# Determine whether the default compiler uses glibc. |
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
|
eval $set_cc_for_build |
|
|
sed 's/^ //' << EOF >$dummy.c |
|
|
#include <features.h> |
|
|
#if __GLIBC__ >= 2 |
|
|
LIBC=gnu |
|
|
#else |
|
|
LIBC= |
|
|
#endif |
|
|
EOF |
|
|
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` |
|
|
# GNU/KFreeBSD systems have a "k" prefix to indicate we are using |
|
|
# FreeBSD's kernel, but not the complete OS. |
|
|
case ${LIBC} in gnu) kernel_only='k' ;; esac |
|
|
echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} |
|
782 |
exit 0 ;; |
exit 0 ;; |
783 |
i*:CYGWIN*:*) |
i*:CYGWIN*:*) |
784 |
echo ${UNAME_MACHINE}-pc-cygwin |
echo ${UNAME_MACHINE}-pc-cygwin |
804 |
i*:UWIN*:*) |
i*:UWIN*:*) |
805 |
echo ${UNAME_MACHINE}-pc-uwin |
echo ${UNAME_MACHINE}-pc-uwin |
806 |
exit 0 ;; |
exit 0 ;; |
807 |
|
amd64:CYGWIN*:*:*) |
808 |
|
echo x86_64-unknown-cygwin |
809 |
|
exit 0 ;; |
810 |
p*:CYGWIN*:*) |
p*:CYGWIN*:*) |
811 |
echo powerpcle-unknown-cygwin |
echo powerpcle-unknown-cygwin |
812 |
exit 0 ;; |
exit 0 ;; |
830 |
cris:Linux:*:*) |
cris:Linux:*:*) |
831 |
echo cris-axis-linux-gnu |
echo cris-axis-linux-gnu |
832 |
exit 0 ;; |
exit 0 ;; |
833 |
|
crisv32:Linux:*:*) |
834 |
|
echo crisv32-axis-linux-gnu |
835 |
|
exit 0 ;; |
836 |
|
frv:Linux:*:*) |
837 |
|
echo frv-unknown-linux-gnu |
838 |
|
exit 0 ;; |
839 |
ia64:Linux:*:*) |
ia64:Linux:*:*) |
840 |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
echo ${UNAME_MACHINE}-unknown-linux-gnu |
841 |
exit 0 ;; |
exit 0 ;; |
1082 |
M680?0:D-NIX:5.3:*) |
M680?0:D-NIX:5.3:*) |
1083 |
echo m68k-diab-dnix |
echo m68k-diab-dnix |
1084 |
exit 0 ;; |
exit 0 ;; |
1085 |
M68*:*:R3V[567]*:*) |
M68*:*:R3V[5678]*:*) |
1086 |
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; |
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; |
1087 |
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) |
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) |
1088 |
OS_REL='' |
OS_REL='' |
1089 |
test -r /etc/.relid \ |
test -r /etc/.relid \ |
1090 |
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` |
1182 |
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} |
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} |
1183 |
exit 0 ;; |
exit 0 ;; |
1184 |
*:Darwin:*:*) |
*:Darwin:*:*) |
1185 |
case `uname -p` in |
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown |
1186 |
|
case $UNAME_PROCESSOR in |
1187 |
*86) UNAME_PROCESSOR=i686 ;; |
*86) UNAME_PROCESSOR=i686 ;; |
1188 |
powerpc) UNAME_PROCESSOR=powerpc ;; |
unknown) UNAME_PROCESSOR=powerpc ;; |
1189 |
esac |
esac |
1190 |
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} |
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} |
1191 |
exit 0 ;; |
exit 0 ;; |
1200 |
*:QNX:*:4*) |
*:QNX:*:4*) |
1201 |
echo i386-pc-qnx |
echo i386-pc-qnx |
1202 |
exit 0 ;; |
exit 0 ;; |
1203 |
|
NSE-?:NONSTOP_KERNEL:*:*) |
1204 |
|
echo nse-tandem-nsk${UNAME_RELEASE} |
1205 |
|
exit 0 ;; |
1206 |
NSR-?:NONSTOP_KERNEL:*:*) |
NSR-?:NONSTOP_KERNEL:*:*) |
1207 |
echo nsr-tandem-nsk${UNAME_RELEASE} |
echo nsr-tandem-nsk${UNAME_RELEASE} |
1208 |
exit 0 ;; |
exit 0 ;; |
1250 |
*:DragonFly:*:*) |
*:DragonFly:*:*) |
1251 |
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
1252 |
exit 0 ;; |
exit 0 ;; |
1253 |
|
*:*VMS:*:*) |
1254 |
|
UNAME_MACHINE=`(uname -p) 2>/dev/null` |
1255 |
|
case "${UNAME_MACHINE}" in |
1256 |
|
A*) echo alpha-dec-vms && exit 0 ;; |
1257 |
|
I*) echo ia64-dec-vms && exit 0 ;; |
1258 |
|
V*) echo vax-dec-vms && exit 0 ;; |
1259 |
|
esac ;; |
1260 |
|
*:XENIX:*:SysV) |
1261 |
|
echo i386-pc-xenix |
1262 |
|
exit 0 ;; |
1263 |
esac |
esac |
1264 |
|
|
1265 |
#echo '(No uname command or uname output not recognized.)' 1>&2 |
#echo '(No uname command or uname output not recognized.)' 1>&2 |