config.guess revision 44d8e951
150539131Smrg#! /bin/sh 250539131Smrg# Attempt to guess a canonical system name. 350539131Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 444d8e951Smrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 550539131Smrg# Free Software Foundation, Inc. 650539131Smrg 744d8e951Smrgtimestamp='2010-09-24' 850539131Smrg 950539131Smrg# This file is free software; you can redistribute it and/or modify it 1050539131Smrg# under the terms of the GNU General Public License as published by 1150539131Smrg# the Free Software Foundation; either version 2 of the License, or 1250539131Smrg# (at your option) any later version. 1350539131Smrg# 1450539131Smrg# This program is distributed in the hope that it will be useful, but 1550539131Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1650539131Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1750539131Smrg# General Public License for more details. 1850539131Smrg# 1950539131Smrg# You should have received a copy of the GNU General Public License 2050539131Smrg# along with this program; if not, write to the Free Software 2150539131Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 2250539131Smrg# 02110-1301, USA. 2350539131Smrg# 2450539131Smrg# As a special exception to the GNU General Public License, if you 2550539131Smrg# distribute this file as part of a program that contains a 2650539131Smrg# configuration script generated by Autoconf, you may include it under 2750539131Smrg# the same distribution terms that you use for the rest of that program. 2850539131Smrg 2950539131Smrg 3044d8e951Smrg# Originally written by Per Bothner. Please send patches (context 3144d8e951Smrg# diff format) to <config-patches@gnu.org> and include a ChangeLog 3244d8e951Smrg# entry. 3350539131Smrg# 3450539131Smrg# This script attempts to guess a canonical system name similar to 3550539131Smrg# config.sub. If it succeeds, it prints the system name on stdout, and 3650539131Smrg# exits with 0. Otherwise, it exits with 1. 3750539131Smrg# 3844d8e951Smrg# You can get the latest version of this script from: 3944d8e951Smrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 4050539131Smrg 4150539131Smrgme=`echo "$0" | sed -e 's,.*/,,'` 4250539131Smrg 4350539131Smrgusage="\ 4450539131SmrgUsage: $0 [OPTION] 4550539131Smrg 4650539131SmrgOutput the configuration name of the system \`$me' is run on. 4750539131Smrg 4850539131SmrgOperation modes: 4950539131Smrg -h, --help print this help, then exit 5050539131Smrg -t, --time-stamp print date of last modification, then exit 5150539131Smrg -v, --version print version number, then exit 5250539131Smrg 5350539131SmrgReport bugs and patches to <config-patches@gnu.org>." 5450539131Smrg 5550539131Smrgversion="\ 5650539131SmrgGNU config.guess ($timestamp) 5750539131Smrg 5850539131SmrgOriginally written by Per Bothner. 5944d8e951SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 6044d8e951Smrg2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 6144d8e951SmrgSoftware Foundation, Inc. 6250539131Smrg 6350539131SmrgThis is free software; see the source for copying conditions. There is NO 6450539131Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 6550539131Smrg 6650539131Smrghelp=" 6750539131SmrgTry \`$me --help' for more information." 6850539131Smrg 6950539131Smrg# Parse command line 7050539131Smrgwhile test $# -gt 0 ; do 7150539131Smrg case $1 in 7250539131Smrg --time-stamp | --time* | -t ) 7350539131Smrg echo "$timestamp" ; exit ;; 7450539131Smrg --version | -v ) 7550539131Smrg echo "$version" ; exit ;; 7650539131Smrg --help | --h* | -h ) 7750539131Smrg echo "$usage"; exit ;; 7850539131Smrg -- ) # Stop option processing 7950539131Smrg shift; break ;; 8050539131Smrg - ) # Use stdin as input. 8150539131Smrg break ;; 8250539131Smrg -* ) 8350539131Smrg echo "$me: invalid option $1$help" >&2 8450539131Smrg exit 1 ;; 8550539131Smrg * ) 8650539131Smrg break ;; 8750539131Smrg esac 8850539131Smrgdone 8950539131Smrg 9050539131Smrgif test $# != 0; then 9150539131Smrg echo "$me: too many arguments$help" >&2 9250539131Smrg exit 1 9350539131Smrgfi 9450539131Smrg 9544d8e951Smrgtrap 'exit 1' HUP INT TERM 9650539131Smrg 9750539131Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 9850539131Smrg# compiler to aid in system detection is discouraged as it requires 9950539131Smrg# temporary files to be created and, as you can see below, it is a 10050539131Smrg# headache to deal with in a portable fashion. 10150539131Smrg 10250539131Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 10350539131Smrg# use `HOST_CC' if defined, but it is deprecated. 10450539131Smrg 10550539131Smrg# Portable tmp directory creation inspired by the Autoconf team. 10650539131Smrg 10750539131Smrgset_cc_for_build=' 10850539131Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 10944d8e951Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ; 11050539131Smrg: ${TMPDIR=/tmp} ; 11150539131Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 11250539131Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 11350539131Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 11450539131Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 11550539131Smrgdummy=$tmp/dummy ; 11650539131Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 11750539131Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 11850539131Smrg ,,) echo "int x;" > $dummy.c ; 11950539131Smrg for c in cc gcc c89 c99 ; do 12050539131Smrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 12150539131Smrg CC_FOR_BUILD="$c"; break ; 12250539131Smrg fi ; 12350539131Smrg done ; 12450539131Smrg if test x"$CC_FOR_BUILD" = x ; then 12550539131Smrg CC_FOR_BUILD=no_compiler_found ; 12650539131Smrg fi 12750539131Smrg ;; 12850539131Smrg ,,*) CC_FOR_BUILD=$CC ;; 12950539131Smrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 13050539131Smrgesac ; set_cc_for_build= ;' 13150539131Smrg 13250539131Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 13350539131Smrg# (ghazi@noc.rutgers.edu 1994-08-24) 13450539131Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 13550539131Smrg PATH=$PATH:/.attbin ; export PATH 13650539131Smrgfi 13750539131Smrg 13850539131SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 13950539131SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 14050539131SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 14150539131SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 14250539131Smrg 14344d8e951Smrgcase "${UNAME_SYSTEM}" in 14444d8e951SmrgLinux|GNU/*) 14544d8e951Smrg eval $set_cc_for_build 14644d8e951Smrg cat <<-EOF > $dummy.c 14744d8e951Smrg #include <features.h> 14844d8e951Smrg #ifdef __UCLIBC__ 14944d8e951Smrg # ifdef __UCLIBC_CONFIG_VERSION__ 15044d8e951Smrg LIBC=uclibc __UCLIBC_CONFIG_VERSION__ 15144d8e951Smrg # else 15244d8e951Smrg LIBC=uclibc 15344d8e951Smrg # endif 15444d8e951Smrg #else 15544d8e951Smrg # ifdef __dietlibc__ 15644d8e951Smrg LIBC=dietlibc 15744d8e951Smrg # else 15844d8e951Smrg LIBC=gnu 15944d8e951Smrg # endif 16044d8e951Smrg #endif 16144d8e951Smrg EOF 16244d8e951Smrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` 16344d8e951Smrg ;; 16444d8e951Smrgesac 16544d8e951Smrg 16650539131Smrg# Note: order is significant - the case branches are not exclusive. 16750539131Smrg 16850539131Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 16950539131Smrg *:NetBSD:*:*) 17050539131Smrg # NetBSD (nbsd) targets should (where applicable) match one or 17150539131Smrg # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 17250539131Smrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 17350539131Smrg # switched to ELF, *-*-netbsd* would select the old 17450539131Smrg # object file format. This provides both forward 17550539131Smrg # compatibility and a consistent mechanism for selecting the 17650539131Smrg # object file format. 17750539131Smrg # 17850539131Smrg # Note: NetBSD doesn't particularly care about the vendor 17950539131Smrg # portion of the name. We always set it to "unknown". 18050539131Smrg sysctl="sysctl -n hw.machine_arch" 18150539131Smrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 18250539131Smrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 18350539131Smrg case "${UNAME_MACHINE_ARCH}" in 18450539131Smrg armeb) machine=armeb-unknown ;; 18550539131Smrg arm*) machine=arm-unknown ;; 18650539131Smrg sh3el) machine=shl-unknown ;; 18750539131Smrg sh3eb) machine=sh-unknown ;; 18850539131Smrg sh5el) machine=sh5le-unknown ;; 18950539131Smrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 19050539131Smrg esac 19150539131Smrg # The Operating System including object format, if it has switched 19250539131Smrg # to ELF recently, or will in the future. 19350539131Smrg case "${UNAME_MACHINE_ARCH}" in 19450539131Smrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 19550539131Smrg eval $set_cc_for_build 19650539131Smrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 19744d8e951Smrg | grep -q __ELF__ 19850539131Smrg then 19950539131Smrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 20050539131Smrg # Return netbsd for either. FIX? 20150539131Smrg os=netbsd 20250539131Smrg else 20350539131Smrg os=netbsdelf 20450539131Smrg fi 20550539131Smrg ;; 20650539131Smrg *) 20750539131Smrg os=netbsd 20850539131Smrg ;; 20950539131Smrg esac 21050539131Smrg # The OS release 21150539131Smrg # Debian GNU/NetBSD machines have a different userland, and 21250539131Smrg # thus, need a distinct triplet. However, they do not need 21350539131Smrg # kernel version information, so it can be replaced with a 21450539131Smrg # suitable tag, in the style of linux-gnu. 21550539131Smrg case "${UNAME_VERSION}" in 21650539131Smrg Debian*) 21750539131Smrg release='-gnu' 21850539131Smrg ;; 21950539131Smrg *) 22050539131Smrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 22150539131Smrg ;; 22250539131Smrg esac 22350539131Smrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 22450539131Smrg # contains redundant information, the shorter form: 22550539131Smrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 22650539131Smrg echo "${machine}-${os}${release}" 22750539131Smrg exit ;; 22850539131Smrg *:OpenBSD:*:*) 22950539131Smrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 23050539131Smrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 23150539131Smrg exit ;; 23250539131Smrg *:ekkoBSD:*:*) 23350539131Smrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 23450539131Smrg exit ;; 23550539131Smrg *:SolidBSD:*:*) 23650539131Smrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 23750539131Smrg exit ;; 23850539131Smrg macppc:MirBSD:*:*) 23950539131Smrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 24050539131Smrg exit ;; 24150539131Smrg *:MirBSD:*:*) 24250539131Smrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 24350539131Smrg exit ;; 24450539131Smrg alpha:OSF1:*:*) 24550539131Smrg case $UNAME_RELEASE in 24650539131Smrg *4.0) 24750539131Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 24850539131Smrg ;; 24950539131Smrg *5.*) 25050539131Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 25150539131Smrg ;; 25250539131Smrg esac 25350539131Smrg # According to Compaq, /usr/sbin/psrinfo has been available on 25450539131Smrg # OSF/1 and Tru64 systems produced since 1995. I hope that 25550539131Smrg # covers most systems running today. This code pipes the CPU 25650539131Smrg # types through head -n 1, so we only detect the type of CPU 0. 25750539131Smrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 25850539131Smrg case "$ALPHA_CPU_TYPE" in 25950539131Smrg "EV4 (21064)") 26050539131Smrg UNAME_MACHINE="alpha" ;; 26150539131Smrg "EV4.5 (21064)") 26250539131Smrg UNAME_MACHINE="alpha" ;; 26350539131Smrg "LCA4 (21066/21068)") 26450539131Smrg UNAME_MACHINE="alpha" ;; 26550539131Smrg "EV5 (21164)") 26650539131Smrg UNAME_MACHINE="alphaev5" ;; 26750539131Smrg "EV5.6 (21164A)") 26850539131Smrg UNAME_MACHINE="alphaev56" ;; 26950539131Smrg "EV5.6 (21164PC)") 27050539131Smrg UNAME_MACHINE="alphapca56" ;; 27150539131Smrg "EV5.7 (21164PC)") 27250539131Smrg UNAME_MACHINE="alphapca57" ;; 27350539131Smrg "EV6 (21264)") 27450539131Smrg UNAME_MACHINE="alphaev6" ;; 27550539131Smrg "EV6.7 (21264A)") 27650539131Smrg UNAME_MACHINE="alphaev67" ;; 27750539131Smrg "EV6.8CB (21264C)") 27850539131Smrg UNAME_MACHINE="alphaev68" ;; 27950539131Smrg "EV6.8AL (21264B)") 28050539131Smrg UNAME_MACHINE="alphaev68" ;; 28150539131Smrg "EV6.8CX (21264D)") 28250539131Smrg UNAME_MACHINE="alphaev68" ;; 28350539131Smrg "EV6.9A (21264/EV69A)") 28450539131Smrg UNAME_MACHINE="alphaev69" ;; 28550539131Smrg "EV7 (21364)") 28650539131Smrg UNAME_MACHINE="alphaev7" ;; 28750539131Smrg "EV7.9 (21364A)") 28850539131Smrg UNAME_MACHINE="alphaev79" ;; 28950539131Smrg esac 29050539131Smrg # A Pn.n version is a patched version. 29150539131Smrg # A Vn.n version is a released version. 29250539131Smrg # A Tn.n version is a released field test version. 29350539131Smrg # A Xn.n version is an unreleased experimental baselevel. 29450539131Smrg # 1.2 uses "1.2" for uname -r. 29550539131Smrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 29650539131Smrg exit ;; 29750539131Smrg Alpha\ *:Windows_NT*:*) 29850539131Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 29950539131Smrg # Should we change UNAME_MACHINE based on the output of uname instead 30050539131Smrg # of the specific Alpha model? 30150539131Smrg echo alpha-pc-interix 30250539131Smrg exit ;; 30350539131Smrg 21064:Windows_NT:50:3) 30450539131Smrg echo alpha-dec-winnt3.5 30550539131Smrg exit ;; 30650539131Smrg Amiga*:UNIX_System_V:4.0:*) 30750539131Smrg echo m68k-unknown-sysv4 30850539131Smrg exit ;; 30950539131Smrg *:[Aa]miga[Oo][Ss]:*:*) 31050539131Smrg echo ${UNAME_MACHINE}-unknown-amigaos 31150539131Smrg exit ;; 31250539131Smrg *:[Mm]orph[Oo][Ss]:*:*) 31350539131Smrg echo ${UNAME_MACHINE}-unknown-morphos 31450539131Smrg exit ;; 31550539131Smrg *:OS/390:*:*) 31650539131Smrg echo i370-ibm-openedition 31750539131Smrg exit ;; 31850539131Smrg *:z/VM:*:*) 31950539131Smrg echo s390-ibm-zvmoe 32050539131Smrg exit ;; 32150539131Smrg *:OS400:*:*) 32250539131Smrg echo powerpc-ibm-os400 32350539131Smrg exit ;; 32450539131Smrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 32550539131Smrg echo arm-acorn-riscix${UNAME_RELEASE} 32650539131Smrg exit ;; 32750539131Smrg arm:riscos:*:*|arm:RISCOS:*:*) 32850539131Smrg echo arm-unknown-riscos 32950539131Smrg exit ;; 33050539131Smrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 33150539131Smrg echo hppa1.1-hitachi-hiuxmpp 33250539131Smrg exit ;; 33350539131Smrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 33450539131Smrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 33550539131Smrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 33650539131Smrg echo pyramid-pyramid-sysv3 33750539131Smrg else 33850539131Smrg echo pyramid-pyramid-bsd 33950539131Smrg fi 34050539131Smrg exit ;; 34150539131Smrg NILE*:*:*:dcosx) 34250539131Smrg echo pyramid-pyramid-svr4 34350539131Smrg exit ;; 34450539131Smrg DRS?6000:unix:4.0:6*) 34550539131Smrg echo sparc-icl-nx6 34650539131Smrg exit ;; 34750539131Smrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 34850539131Smrg case `/usr/bin/uname -p` in 34950539131Smrg sparc) echo sparc-icl-nx7; exit ;; 35050539131Smrg esac ;; 35150539131Smrg s390x:SunOS:*:*) 35250539131Smrg echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 35350539131Smrg exit ;; 35450539131Smrg sun4H:SunOS:5.*:*) 35550539131Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 35650539131Smrg exit ;; 35750539131Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 35850539131Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 35950539131Smrg exit ;; 36044d8e951Smrg i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 36144d8e951Smrg echo i386-pc-auroraux${UNAME_RELEASE} 36244d8e951Smrg exit ;; 36350539131Smrg i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 36450539131Smrg eval $set_cc_for_build 36550539131Smrg SUN_ARCH="i386" 36650539131Smrg # If there is a compiler, see if it is configured for 64-bit objects. 36750539131Smrg # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 36850539131Smrg # This test works for both compilers. 36950539131Smrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 37050539131Smrg if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 37150539131Smrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 37250539131Smrg grep IS_64BIT_ARCH >/dev/null 37350539131Smrg then 37450539131Smrg SUN_ARCH="x86_64" 37550539131Smrg fi 37650539131Smrg fi 37750539131Smrg echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 37850539131Smrg exit ;; 37950539131Smrg sun4*:SunOS:6*:*) 38050539131Smrg # According to config.sub, this is the proper way to canonicalize 38150539131Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 38250539131Smrg # it's likely to be more like Solaris than SunOS4. 38350539131Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 38450539131Smrg exit ;; 38550539131Smrg sun4*:SunOS:*:*) 38650539131Smrg case "`/usr/bin/arch -k`" in 38750539131Smrg Series*|S4*) 38850539131Smrg UNAME_RELEASE=`uname -v` 38950539131Smrg ;; 39050539131Smrg esac 39150539131Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 39250539131Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 39350539131Smrg exit ;; 39450539131Smrg sun3*:SunOS:*:*) 39550539131Smrg echo m68k-sun-sunos${UNAME_RELEASE} 39650539131Smrg exit ;; 39750539131Smrg sun*:*:4.2BSD:*) 39850539131Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 39950539131Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 40050539131Smrg case "`/bin/arch`" in 40150539131Smrg sun3) 40250539131Smrg echo m68k-sun-sunos${UNAME_RELEASE} 40350539131Smrg ;; 40450539131Smrg sun4) 40550539131Smrg echo sparc-sun-sunos${UNAME_RELEASE} 40650539131Smrg ;; 40750539131Smrg esac 40850539131Smrg exit ;; 40950539131Smrg aushp:SunOS:*:*) 41050539131Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 41150539131Smrg exit ;; 41250539131Smrg # The situation for MiNT is a little confusing. The machine name 41350539131Smrg # can be virtually everything (everything which is not 41450539131Smrg # "atarist" or "atariste" at least should have a processor 41550539131Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 41650539131Smrg # to the lowercase version "mint" (or "freemint"). Finally 41750539131Smrg # the system name "TOS" denotes a system which is actually not 41850539131Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 41950539131Smrg # be no problem. 42050539131Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 42150539131Smrg echo m68k-atari-mint${UNAME_RELEASE} 42250539131Smrg exit ;; 42350539131Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 42450539131Smrg echo m68k-atari-mint${UNAME_RELEASE} 42550539131Smrg exit ;; 42650539131Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 42750539131Smrg echo m68k-atari-mint${UNAME_RELEASE} 42850539131Smrg exit ;; 42950539131Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 43050539131Smrg echo m68k-milan-mint${UNAME_RELEASE} 43150539131Smrg exit ;; 43250539131Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 43350539131Smrg echo m68k-hades-mint${UNAME_RELEASE} 43450539131Smrg exit ;; 43550539131Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 43650539131Smrg echo m68k-unknown-mint${UNAME_RELEASE} 43750539131Smrg exit ;; 43850539131Smrg m68k:machten:*:*) 43950539131Smrg echo m68k-apple-machten${UNAME_RELEASE} 44050539131Smrg exit ;; 44150539131Smrg powerpc:machten:*:*) 44250539131Smrg echo powerpc-apple-machten${UNAME_RELEASE} 44350539131Smrg exit ;; 44450539131Smrg RISC*:Mach:*:*) 44550539131Smrg echo mips-dec-mach_bsd4.3 44650539131Smrg exit ;; 44750539131Smrg RISC*:ULTRIX:*:*) 44850539131Smrg echo mips-dec-ultrix${UNAME_RELEASE} 44950539131Smrg exit ;; 45050539131Smrg VAX*:ULTRIX*:*:*) 45150539131Smrg echo vax-dec-ultrix${UNAME_RELEASE} 45250539131Smrg exit ;; 45350539131Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 45450539131Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 45550539131Smrg exit ;; 45650539131Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 45750539131Smrg eval $set_cc_for_build 45850539131Smrg sed 's/^ //' << EOF >$dummy.c 45950539131Smrg#ifdef __cplusplus 46050539131Smrg#include <stdio.h> /* for printf() prototype */ 46150539131Smrg int main (int argc, char *argv[]) { 46250539131Smrg#else 46350539131Smrg int main (argc, argv) int argc; char *argv[]; { 46450539131Smrg#endif 46550539131Smrg #if defined (host_mips) && defined (MIPSEB) 46650539131Smrg #if defined (SYSTYPE_SYSV) 46750539131Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 46850539131Smrg #endif 46950539131Smrg #if defined (SYSTYPE_SVR4) 47050539131Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 47150539131Smrg #endif 47250539131Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 47350539131Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 47450539131Smrg #endif 47550539131Smrg #endif 47650539131Smrg exit (-1); 47750539131Smrg } 47850539131SmrgEOF 47950539131Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 48050539131Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 48150539131Smrg SYSTEM_NAME=`$dummy $dummyarg` && 48250539131Smrg { echo "$SYSTEM_NAME"; exit; } 48350539131Smrg echo mips-mips-riscos${UNAME_RELEASE} 48450539131Smrg exit ;; 48550539131Smrg Motorola:PowerMAX_OS:*:*) 48650539131Smrg echo powerpc-motorola-powermax 48750539131Smrg exit ;; 48850539131Smrg Motorola:*:4.3:PL8-*) 48950539131Smrg echo powerpc-harris-powermax 49050539131Smrg exit ;; 49150539131Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 49250539131Smrg echo powerpc-harris-powermax 49350539131Smrg exit ;; 49450539131Smrg Night_Hawk:Power_UNIX:*:*) 49550539131Smrg echo powerpc-harris-powerunix 49650539131Smrg exit ;; 49750539131Smrg m88k:CX/UX:7*:*) 49850539131Smrg echo m88k-harris-cxux7 49950539131Smrg exit ;; 50050539131Smrg m88k:*:4*:R4*) 50150539131Smrg echo m88k-motorola-sysv4 50250539131Smrg exit ;; 50350539131Smrg m88k:*:3*:R3*) 50450539131Smrg echo m88k-motorola-sysv3 50550539131Smrg exit ;; 50650539131Smrg AViiON:dgux:*:*) 50750539131Smrg # DG/UX returns AViiON for all architectures 50850539131Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 50950539131Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 51050539131Smrg then 51150539131Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 51250539131Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 51350539131Smrg then 51450539131Smrg echo m88k-dg-dgux${UNAME_RELEASE} 51550539131Smrg else 51650539131Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 51750539131Smrg fi 51850539131Smrg else 51950539131Smrg echo i586-dg-dgux${UNAME_RELEASE} 52050539131Smrg fi 52150539131Smrg exit ;; 52250539131Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 52350539131Smrg echo m88k-dolphin-sysv3 52450539131Smrg exit ;; 52550539131Smrg M88*:*:R3*:*) 52650539131Smrg # Delta 88k system running SVR3 52750539131Smrg echo m88k-motorola-sysv3 52850539131Smrg exit ;; 52950539131Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 53050539131Smrg echo m88k-tektronix-sysv3 53150539131Smrg exit ;; 53250539131Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 53350539131Smrg echo m68k-tektronix-bsd 53450539131Smrg exit ;; 53550539131Smrg *:IRIX*:*:*) 53650539131Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 53750539131Smrg exit ;; 53850539131Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 53950539131Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 54050539131Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 54150539131Smrg i*86:AIX:*:*) 54250539131Smrg echo i386-ibm-aix 54350539131Smrg exit ;; 54450539131Smrg ia64:AIX:*:*) 54550539131Smrg if [ -x /usr/bin/oslevel ] ; then 54650539131Smrg IBM_REV=`/usr/bin/oslevel` 54750539131Smrg else 54850539131Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 54950539131Smrg fi 55050539131Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 55150539131Smrg exit ;; 55250539131Smrg *:AIX:2:3) 55350539131Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 55450539131Smrg eval $set_cc_for_build 55550539131Smrg sed 's/^ //' << EOF >$dummy.c 55650539131Smrg #include <sys/systemcfg.h> 55750539131Smrg 55850539131Smrg main() 55950539131Smrg { 56050539131Smrg if (!__power_pc()) 56150539131Smrg exit(1); 56250539131Smrg puts("powerpc-ibm-aix3.2.5"); 56350539131Smrg exit(0); 56450539131Smrg } 56550539131SmrgEOF 56650539131Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 56750539131Smrg then 56850539131Smrg echo "$SYSTEM_NAME" 56950539131Smrg else 57050539131Smrg echo rs6000-ibm-aix3.2.5 57150539131Smrg fi 57250539131Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 57350539131Smrg echo rs6000-ibm-aix3.2.4 57450539131Smrg else 57550539131Smrg echo rs6000-ibm-aix3.2 57650539131Smrg fi 57750539131Smrg exit ;; 57844d8e951Smrg *:AIX:*:[4567]) 57950539131Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 58050539131Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 58150539131Smrg IBM_ARCH=rs6000 58250539131Smrg else 58350539131Smrg IBM_ARCH=powerpc 58450539131Smrg fi 58550539131Smrg if [ -x /usr/bin/oslevel ] ; then 58650539131Smrg IBM_REV=`/usr/bin/oslevel` 58750539131Smrg else 58850539131Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 58950539131Smrg fi 59050539131Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 59150539131Smrg exit ;; 59250539131Smrg *:AIX:*:*) 59350539131Smrg echo rs6000-ibm-aix 59450539131Smrg exit ;; 59550539131Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 59650539131Smrg echo romp-ibm-bsd4.4 59750539131Smrg exit ;; 59850539131Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 59950539131Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 60050539131Smrg exit ;; # report: romp-ibm BSD 4.3 60150539131Smrg *:BOSX:*:*) 60250539131Smrg echo rs6000-bull-bosx 60350539131Smrg exit ;; 60450539131Smrg DPX/2?00:B.O.S.:*:*) 60550539131Smrg echo m68k-bull-sysv3 60650539131Smrg exit ;; 60750539131Smrg 9000/[34]??:4.3bsd:1.*:*) 60850539131Smrg echo m68k-hp-bsd 60950539131Smrg exit ;; 61050539131Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 61150539131Smrg echo m68k-hp-bsd4.4 61250539131Smrg exit ;; 61350539131Smrg 9000/[34678]??:HP-UX:*:*) 61450539131Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 61550539131Smrg case "${UNAME_MACHINE}" in 61650539131Smrg 9000/31? ) HP_ARCH=m68000 ;; 61750539131Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 61850539131Smrg 9000/[678][0-9][0-9]) 61950539131Smrg if [ -x /usr/bin/getconf ]; then 62050539131Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 62150539131Smrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 62250539131Smrg case "${sc_cpu_version}" in 62350539131Smrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 62450539131Smrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 62550539131Smrg 532) # CPU_PA_RISC2_0 62650539131Smrg case "${sc_kernel_bits}" in 62750539131Smrg 32) HP_ARCH="hppa2.0n" ;; 62850539131Smrg 64) HP_ARCH="hppa2.0w" ;; 62950539131Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 63050539131Smrg esac ;; 63150539131Smrg esac 63250539131Smrg fi 63350539131Smrg if [ "${HP_ARCH}" = "" ]; then 63450539131Smrg eval $set_cc_for_build 63550539131Smrg sed 's/^ //' << EOF >$dummy.c 63650539131Smrg 63750539131Smrg #define _HPUX_SOURCE 63850539131Smrg #include <stdlib.h> 63950539131Smrg #include <unistd.h> 64050539131Smrg 64150539131Smrg int main () 64250539131Smrg { 64350539131Smrg #if defined(_SC_KERNEL_BITS) 64450539131Smrg long bits = sysconf(_SC_KERNEL_BITS); 64550539131Smrg #endif 64650539131Smrg long cpu = sysconf (_SC_CPU_VERSION); 64750539131Smrg 64850539131Smrg switch (cpu) 64950539131Smrg { 65050539131Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 65150539131Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 65250539131Smrg case CPU_PA_RISC2_0: 65350539131Smrg #if defined(_SC_KERNEL_BITS) 65450539131Smrg switch (bits) 65550539131Smrg { 65650539131Smrg case 64: puts ("hppa2.0w"); break; 65750539131Smrg case 32: puts ("hppa2.0n"); break; 65850539131Smrg default: puts ("hppa2.0"); break; 65950539131Smrg } break; 66050539131Smrg #else /* !defined(_SC_KERNEL_BITS) */ 66150539131Smrg puts ("hppa2.0"); break; 66250539131Smrg #endif 66350539131Smrg default: puts ("hppa1.0"); break; 66450539131Smrg } 66550539131Smrg exit (0); 66650539131Smrg } 66750539131SmrgEOF 66850539131Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 66950539131Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 67050539131Smrg fi ;; 67150539131Smrg esac 67250539131Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 67350539131Smrg then 67450539131Smrg eval $set_cc_for_build 67550539131Smrg 67650539131Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 67750539131Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 67850539131Smrg # generating 64-bit code. GNU and HP use different nomenclature: 67950539131Smrg # 68050539131Smrg # $ CC_FOR_BUILD=cc ./config.guess 68150539131Smrg # => hppa2.0w-hp-hpux11.23 68250539131Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 68350539131Smrg # => hppa64-hp-hpux11.23 68450539131Smrg 68550539131Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 68644d8e951Smrg grep -q __LP64__ 68750539131Smrg then 68850539131Smrg HP_ARCH="hppa2.0w" 68950539131Smrg else 69050539131Smrg HP_ARCH="hppa64" 69150539131Smrg fi 69250539131Smrg fi 69350539131Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 69450539131Smrg exit ;; 69550539131Smrg ia64:HP-UX:*:*) 69650539131Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 69750539131Smrg echo ia64-hp-hpux${HPUX_REV} 69850539131Smrg exit ;; 69950539131Smrg 3050*:HI-UX:*:*) 70050539131Smrg eval $set_cc_for_build 70150539131Smrg sed 's/^ //' << EOF >$dummy.c 70250539131Smrg #include <unistd.h> 70350539131Smrg int 70450539131Smrg main () 70550539131Smrg { 70650539131Smrg long cpu = sysconf (_SC_CPU_VERSION); 70750539131Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 70850539131Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 70950539131Smrg results, however. */ 71050539131Smrg if (CPU_IS_PA_RISC (cpu)) 71150539131Smrg { 71250539131Smrg switch (cpu) 71350539131Smrg { 71450539131Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 71550539131Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 71650539131Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 71750539131Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 71850539131Smrg } 71950539131Smrg } 72050539131Smrg else if (CPU_IS_HP_MC68K (cpu)) 72150539131Smrg puts ("m68k-hitachi-hiuxwe2"); 72250539131Smrg else puts ("unknown-hitachi-hiuxwe2"); 72350539131Smrg exit (0); 72450539131Smrg } 72550539131SmrgEOF 72650539131Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 72750539131Smrg { echo "$SYSTEM_NAME"; exit; } 72850539131Smrg echo unknown-hitachi-hiuxwe2 72950539131Smrg exit ;; 73050539131Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 73150539131Smrg echo hppa1.1-hp-bsd 73250539131Smrg exit ;; 73350539131Smrg 9000/8??:4.3bsd:*:*) 73450539131Smrg echo hppa1.0-hp-bsd 73550539131Smrg exit ;; 73650539131Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 73750539131Smrg echo hppa1.0-hp-mpeix 73850539131Smrg exit ;; 73950539131Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 74050539131Smrg echo hppa1.1-hp-osf 74150539131Smrg exit ;; 74250539131Smrg hp8??:OSF1:*:*) 74350539131Smrg echo hppa1.0-hp-osf 74450539131Smrg exit ;; 74550539131Smrg i*86:OSF1:*:*) 74650539131Smrg if [ -x /usr/sbin/sysversion ] ; then 74750539131Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 74850539131Smrg else 74950539131Smrg echo ${UNAME_MACHINE}-unknown-osf1 75050539131Smrg fi 75150539131Smrg exit ;; 75250539131Smrg parisc*:Lites*:*:*) 75350539131Smrg echo hppa1.1-hp-lites 75450539131Smrg exit ;; 75550539131Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 75650539131Smrg echo c1-convex-bsd 75750539131Smrg exit ;; 75850539131Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 75950539131Smrg if getsysinfo -f scalar_acc 76050539131Smrg then echo c32-convex-bsd 76150539131Smrg else echo c2-convex-bsd 76250539131Smrg fi 76350539131Smrg exit ;; 76450539131Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 76550539131Smrg echo c34-convex-bsd 76650539131Smrg exit ;; 76750539131Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 76850539131Smrg echo c38-convex-bsd 76950539131Smrg exit ;; 77050539131Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 77150539131Smrg echo c4-convex-bsd 77250539131Smrg exit ;; 77350539131Smrg CRAY*Y-MP:*:*:*) 77450539131Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 77550539131Smrg exit ;; 77650539131Smrg CRAY*[A-Z]90:*:*:*) 77750539131Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 77850539131Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 77950539131Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 78050539131Smrg -e 's/\.[^.]*$/.X/' 78150539131Smrg exit ;; 78250539131Smrg CRAY*TS:*:*:*) 78350539131Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 78450539131Smrg exit ;; 78550539131Smrg CRAY*T3E:*:*:*) 78650539131Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 78750539131Smrg exit ;; 78850539131Smrg CRAY*SV1:*:*:*) 78950539131Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 79050539131Smrg exit ;; 79150539131Smrg *:UNICOS/mp:*:*) 79250539131Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 79350539131Smrg exit ;; 79450539131Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 79550539131Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 79650539131Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 79750539131Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 79850539131Smrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 79950539131Smrg exit ;; 80050539131Smrg 5000:UNIX_System_V:4.*:*) 80150539131Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 80250539131Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 80350539131Smrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 80450539131Smrg exit ;; 80550539131Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 80650539131Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 80750539131Smrg exit ;; 80850539131Smrg sparc*:BSD/OS:*:*) 80950539131Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 81050539131Smrg exit ;; 81150539131Smrg *:BSD/OS:*:*) 81250539131Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 81350539131Smrg exit ;; 81450539131Smrg *:FreeBSD:*:*) 81550539131Smrg case ${UNAME_MACHINE} in 81650539131Smrg pc98) 81750539131Smrg echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 81850539131Smrg amd64) 81950539131Smrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 82050539131Smrg *) 82150539131Smrg echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 82250539131Smrg esac 82350539131Smrg exit ;; 82450539131Smrg i*:CYGWIN*:*) 82550539131Smrg echo ${UNAME_MACHINE}-pc-cygwin 82650539131Smrg exit ;; 82750539131Smrg *:MINGW*:*) 82850539131Smrg echo ${UNAME_MACHINE}-pc-mingw32 82950539131Smrg exit ;; 83050539131Smrg i*:windows32*:*) 83150539131Smrg # uname -m includes "-pc" on this system. 83250539131Smrg echo ${UNAME_MACHINE}-mingw32 83350539131Smrg exit ;; 83450539131Smrg i*:PW*:*) 83550539131Smrg echo ${UNAME_MACHINE}-pc-pw32 83650539131Smrg exit ;; 83744d8e951Smrg *:Interix*:*) 83850539131Smrg case ${UNAME_MACHINE} in 83950539131Smrg x86) 84050539131Smrg echo i586-pc-interix${UNAME_RELEASE} 84150539131Smrg exit ;; 84244d8e951Smrg authenticamd | genuineintel | EM64T) 84350539131Smrg echo x86_64-unknown-interix${UNAME_RELEASE} 84450539131Smrg exit ;; 84550539131Smrg IA64) 84650539131Smrg echo ia64-unknown-interix${UNAME_RELEASE} 84750539131Smrg exit ;; 84850539131Smrg esac ;; 84950539131Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 85050539131Smrg echo i${UNAME_MACHINE}-pc-mks 85150539131Smrg exit ;; 85244d8e951Smrg 8664:Windows_NT:*) 85344d8e951Smrg echo x86_64-pc-mks 85444d8e951Smrg exit ;; 85550539131Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 85650539131Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 85750539131Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 85850539131Smrg # UNAME_MACHINE based on the output of uname instead of i386? 85950539131Smrg echo i586-pc-interix 86050539131Smrg exit ;; 86150539131Smrg i*:UWIN*:*) 86250539131Smrg echo ${UNAME_MACHINE}-pc-uwin 86350539131Smrg exit ;; 86450539131Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 86550539131Smrg echo x86_64-unknown-cygwin 86650539131Smrg exit ;; 86750539131Smrg p*:CYGWIN*:*) 86850539131Smrg echo powerpcle-unknown-cygwin 86950539131Smrg exit ;; 87050539131Smrg prep*:SunOS:5.*:*) 87150539131Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 87250539131Smrg exit ;; 87350539131Smrg *:GNU:*:*) 87450539131Smrg # the GNU system 87544d8e951Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 87650539131Smrg exit ;; 87750539131Smrg *:GNU/*:*:*) 87850539131Smrg # other systems with GNU libc and userland 87944d8e951Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} 88050539131Smrg exit ;; 88150539131Smrg i*86:Minix:*:*) 88250539131Smrg echo ${UNAME_MACHINE}-pc-minix 88350539131Smrg exit ;; 88444d8e951Smrg alpha:Linux:*:*) 88544d8e951Smrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 88644d8e951Smrg EV5) UNAME_MACHINE=alphaev5 ;; 88744d8e951Smrg EV56) UNAME_MACHINE=alphaev56 ;; 88844d8e951Smrg PCA56) UNAME_MACHINE=alphapca56 ;; 88944d8e951Smrg PCA57) UNAME_MACHINE=alphapca56 ;; 89044d8e951Smrg EV6) UNAME_MACHINE=alphaev6 ;; 89144d8e951Smrg EV67) UNAME_MACHINE=alphaev67 ;; 89244d8e951Smrg EV68*) UNAME_MACHINE=alphaev68 ;; 89344d8e951Smrg esac 89444d8e951Smrg objdump --private-headers /bin/sh | grep -q ld.so.1 89544d8e951Smrg if test "$?" = 0 ; then LIBC="gnulibc1" ; fi 89644d8e951Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 89744d8e951Smrg exit ;; 89850539131Smrg arm*:Linux:*:*) 89950539131Smrg eval $set_cc_for_build 90050539131Smrg if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 90150539131Smrg | grep -q __ARM_EABI__ 90250539131Smrg then 90344d8e951Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 90450539131Smrg else 90544d8e951Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi 90650539131Smrg fi 90750539131Smrg exit ;; 90850539131Smrg avr32*:Linux:*:*) 90944d8e951Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 91050539131Smrg exit ;; 91150539131Smrg cris:Linux:*:*) 91244d8e951Smrg echo cris-axis-linux-${LIBC} 91350539131Smrg exit ;; 91450539131Smrg crisv32:Linux:*:*) 91544d8e951Smrg echo crisv32-axis-linux-${LIBC} 91650539131Smrg exit ;; 91750539131Smrg frv:Linux:*:*) 91844d8e951Smrg echo frv-unknown-linux-${LIBC} 91944d8e951Smrg exit ;; 92044d8e951Smrg i*86:Linux:*:*) 92144d8e951Smrg echo ${UNAME_MACHINE}-pc-linux-${LIBC} 92250539131Smrg exit ;; 92350539131Smrg ia64:Linux:*:*) 92444d8e951Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 92550539131Smrg exit ;; 92650539131Smrg m32r*:Linux:*:*) 92744d8e951Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 92850539131Smrg exit ;; 92950539131Smrg m68*:Linux:*:*) 93044d8e951Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 93150539131Smrg exit ;; 93244d8e951Smrg mips:Linux:*:* | mips64:Linux:*:*) 93350539131Smrg eval $set_cc_for_build 93450539131Smrg sed 's/^ //' << EOF >$dummy.c 93550539131Smrg #undef CPU 93644d8e951Smrg #undef ${UNAME_MACHINE} 93744d8e951Smrg #undef ${UNAME_MACHINE}el 93850539131Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 93944d8e951Smrg CPU=${UNAME_MACHINE}el 94050539131Smrg #else 94150539131Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 94244d8e951Smrg CPU=${UNAME_MACHINE} 94350539131Smrg #else 94450539131Smrg CPU= 94550539131Smrg #endif 94650539131Smrg #endif 94750539131SmrgEOF 94844d8e951Smrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 94944d8e951Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } 95050539131Smrg ;; 95150539131Smrg or32:Linux:*:*) 95244d8e951Smrg echo or32-unknown-linux-${LIBC} 95350539131Smrg exit ;; 95450539131Smrg padre:Linux:*:*) 95544d8e951Smrg echo sparc-unknown-linux-${LIBC} 95644d8e951Smrg exit ;; 95744d8e951Smrg parisc64:Linux:*:* | hppa64:Linux:*:*) 95844d8e951Smrg echo hppa64-unknown-linux-${LIBC} 95950539131Smrg exit ;; 96050539131Smrg parisc:Linux:*:* | hppa:Linux:*:*) 96150539131Smrg # Look for CPU level 96250539131Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 96344d8e951Smrg PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; 96444d8e951Smrg PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; 96544d8e951Smrg *) echo hppa-unknown-linux-${LIBC} ;; 96650539131Smrg esac 96750539131Smrg exit ;; 96844d8e951Smrg ppc64:Linux:*:*) 96944d8e951Smrg echo powerpc64-unknown-linux-${LIBC} 97044d8e951Smrg exit ;; 97144d8e951Smrg ppc:Linux:*:*) 97244d8e951Smrg echo powerpc-unknown-linux-${LIBC} 97350539131Smrg exit ;; 97450539131Smrg s390:Linux:*:* | s390x:Linux:*:*) 97550539131Smrg echo ${UNAME_MACHINE}-ibm-linux 97650539131Smrg exit ;; 97750539131Smrg sh64*:Linux:*:*) 97844d8e951Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 97950539131Smrg exit ;; 98050539131Smrg sh*:Linux:*:*) 98144d8e951Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 98250539131Smrg exit ;; 98350539131Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 98444d8e951Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 98544d8e951Smrg exit ;; 98644d8e951Smrg tile*:Linux:*:*) 98744d8e951Smrg echo ${UNAME_MACHINE}-tilera-linux-gnu 98850539131Smrg exit ;; 98950539131Smrg vax:Linux:*:*) 99044d8e951Smrg echo ${UNAME_MACHINE}-dec-linux-${LIBC} 99150539131Smrg exit ;; 99250539131Smrg x86_64:Linux:*:*) 99344d8e951Smrg echo x86_64-unknown-linux-${LIBC} 99450539131Smrg exit ;; 99550539131Smrg xtensa*:Linux:*:*) 99644d8e951Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 99750539131Smrg exit ;; 99850539131Smrg i*86:DYNIX/ptx:4*:*) 99950539131Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 100050539131Smrg # earlier versions are messed up and put the nodename in both 100150539131Smrg # sysname and nodename. 100250539131Smrg echo i386-sequent-sysv4 100350539131Smrg exit ;; 100450539131Smrg i*86:UNIX_SV:4.2MP:2.*) 100550539131Smrg # Unixware is an offshoot of SVR4, but it has its own version 100650539131Smrg # number series starting with 2... 100750539131Smrg # I am not positive that other SVR4 systems won't match this, 100850539131Smrg # I just have to hope. -- rms. 100950539131Smrg # Use sysv4.2uw... so that sysv4* matches it. 101050539131Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 101150539131Smrg exit ;; 101250539131Smrg i*86:OS/2:*:*) 101350539131Smrg # If we were able to find `uname', then EMX Unix compatibility 101450539131Smrg # is probably installed. 101550539131Smrg echo ${UNAME_MACHINE}-pc-os2-emx 101650539131Smrg exit ;; 101750539131Smrg i*86:XTS-300:*:STOP) 101850539131Smrg echo ${UNAME_MACHINE}-unknown-stop 101950539131Smrg exit ;; 102050539131Smrg i*86:atheos:*:*) 102150539131Smrg echo ${UNAME_MACHINE}-unknown-atheos 102250539131Smrg exit ;; 102350539131Smrg i*86:syllable:*:*) 102450539131Smrg echo ${UNAME_MACHINE}-pc-syllable 102550539131Smrg exit ;; 102644d8e951Smrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 102750539131Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 102850539131Smrg exit ;; 102950539131Smrg i*86:*DOS:*:*) 103050539131Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 103150539131Smrg exit ;; 103250539131Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 103350539131Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 103450539131Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 103550539131Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 103650539131Smrg else 103750539131Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 103850539131Smrg fi 103950539131Smrg exit ;; 104050539131Smrg i*86:*:5:[678]*) 104150539131Smrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 104250539131Smrg case `/bin/uname -X | grep "^Machine"` in 104350539131Smrg *486*) UNAME_MACHINE=i486 ;; 104450539131Smrg *Pentium) UNAME_MACHINE=i586 ;; 104550539131Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 104650539131Smrg esac 104750539131Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 104850539131Smrg exit ;; 104950539131Smrg i*86:*:3.2:*) 105050539131Smrg if test -f /usr/options/cb.name; then 105150539131Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 105250539131Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 105350539131Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 105450539131Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 105550539131Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 105650539131Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 105750539131Smrg && UNAME_MACHINE=i586 105850539131Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 105950539131Smrg && UNAME_MACHINE=i686 106050539131Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 106150539131Smrg && UNAME_MACHINE=i686 106250539131Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 106350539131Smrg else 106450539131Smrg echo ${UNAME_MACHINE}-pc-sysv32 106550539131Smrg fi 106650539131Smrg exit ;; 106750539131Smrg pc:*:*:*) 106850539131Smrg # Left here for compatibility: 106950539131Smrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 107050539131Smrg # the processor, so we play safe by assuming i586. 107150539131Smrg # Note: whatever this is, it MUST be the same as what config.sub 107250539131Smrg # prints for the "djgpp" host, or else GDB configury will decide that 107350539131Smrg # this is a cross-build. 107450539131Smrg echo i586-pc-msdosdjgpp 107550539131Smrg exit ;; 107650539131Smrg Intel:Mach:3*:*) 107750539131Smrg echo i386-pc-mach3 107850539131Smrg exit ;; 107950539131Smrg paragon:*:*:*) 108050539131Smrg echo i860-intel-osf1 108150539131Smrg exit ;; 108250539131Smrg i860:*:4.*:*) # i860-SVR4 108350539131Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 108450539131Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 108550539131Smrg else # Add other i860-SVR4 vendors below as they are discovered. 108650539131Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 108750539131Smrg fi 108850539131Smrg exit ;; 108950539131Smrg mini*:CTIX:SYS*5:*) 109050539131Smrg # "miniframe" 109150539131Smrg echo m68010-convergent-sysv 109250539131Smrg exit ;; 109350539131Smrg mc68k:UNIX:SYSTEM5:3.51m) 109450539131Smrg echo m68k-convergent-sysv 109550539131Smrg exit ;; 109650539131Smrg M680?0:D-NIX:5.3:*) 109750539131Smrg echo m68k-diab-dnix 109850539131Smrg exit ;; 109950539131Smrg M68*:*:R3V[5678]*:*) 110050539131Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 110150539131Smrg 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) 110250539131Smrg OS_REL='' 110350539131Smrg test -r /etc/.relid \ 110450539131Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 110550539131Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 110650539131Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 110750539131Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 110850539131Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 110950539131Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 111050539131Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 111150539131Smrg && { echo i486-ncr-sysv4; exit; } ;; 111250539131Smrg NCR*:*:4.2:* | MPRAS*:*:4.2:*) 111350539131Smrg OS_REL='.3' 111450539131Smrg test -r /etc/.relid \ 111550539131Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 111650539131Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 111750539131Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 111850539131Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 111950539131Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 112050539131Smrg /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 112150539131Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 112250539131Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 112350539131Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 112450539131Smrg exit ;; 112550539131Smrg mc68030:UNIX_System_V:4.*:*) 112650539131Smrg echo m68k-atari-sysv4 112750539131Smrg exit ;; 112850539131Smrg TSUNAMI:LynxOS:2.*:*) 112950539131Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 113050539131Smrg exit ;; 113150539131Smrg rs6000:LynxOS:2.*:*) 113250539131Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 113350539131Smrg exit ;; 113444d8e951Smrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 113550539131Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 113650539131Smrg exit ;; 113750539131Smrg SM[BE]S:UNIX_SV:*:*) 113850539131Smrg echo mips-dde-sysv${UNAME_RELEASE} 113950539131Smrg exit ;; 114050539131Smrg RM*:ReliantUNIX-*:*:*) 114150539131Smrg echo mips-sni-sysv4 114250539131Smrg exit ;; 114350539131Smrg RM*:SINIX-*:*:*) 114450539131Smrg echo mips-sni-sysv4 114550539131Smrg exit ;; 114650539131Smrg *:SINIX-*:*:*) 114750539131Smrg if uname -p 2>/dev/null >/dev/null ; then 114850539131Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 114950539131Smrg echo ${UNAME_MACHINE}-sni-sysv4 115050539131Smrg else 115150539131Smrg echo ns32k-sni-sysv 115250539131Smrg fi 115350539131Smrg exit ;; 115450539131Smrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 115550539131Smrg # says <Richard.M.Bartel@ccMail.Census.GOV> 115650539131Smrg echo i586-unisys-sysv4 115750539131Smrg exit ;; 115850539131Smrg *:UNIX_System_V:4*:FTX*) 115950539131Smrg # From Gerald Hewes <hewes@openmarket.com>. 116050539131Smrg # How about differentiating between stratus architectures? -djm 116150539131Smrg echo hppa1.1-stratus-sysv4 116250539131Smrg exit ;; 116350539131Smrg *:*:*:FTX*) 116450539131Smrg # From seanf@swdc.stratus.com. 116550539131Smrg echo i860-stratus-sysv4 116650539131Smrg exit ;; 116750539131Smrg i*86:VOS:*:*) 116850539131Smrg # From Paul.Green@stratus.com. 116950539131Smrg echo ${UNAME_MACHINE}-stratus-vos 117050539131Smrg exit ;; 117150539131Smrg *:VOS:*:*) 117250539131Smrg # From Paul.Green@stratus.com. 117350539131Smrg echo hppa1.1-stratus-vos 117450539131Smrg exit ;; 117550539131Smrg mc68*:A/UX:*:*) 117650539131Smrg echo m68k-apple-aux${UNAME_RELEASE} 117750539131Smrg exit ;; 117850539131Smrg news*:NEWS-OS:6*:*) 117950539131Smrg echo mips-sony-newsos6 118050539131Smrg exit ;; 118150539131Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 118250539131Smrg if [ -d /usr/nec ]; then 118350539131Smrg echo mips-nec-sysv${UNAME_RELEASE} 118450539131Smrg else 118550539131Smrg echo mips-unknown-sysv${UNAME_RELEASE} 118650539131Smrg fi 118750539131Smrg exit ;; 118850539131Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 118950539131Smrg echo powerpc-be-beos 119050539131Smrg exit ;; 119150539131Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 119250539131Smrg echo powerpc-apple-beos 119350539131Smrg exit ;; 119450539131Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 119550539131Smrg echo i586-pc-beos 119650539131Smrg exit ;; 119750539131Smrg BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 119850539131Smrg echo i586-pc-haiku 119950539131Smrg exit ;; 120050539131Smrg SX-4:SUPER-UX:*:*) 120150539131Smrg echo sx4-nec-superux${UNAME_RELEASE} 120250539131Smrg exit ;; 120350539131Smrg SX-5:SUPER-UX:*:*) 120450539131Smrg echo sx5-nec-superux${UNAME_RELEASE} 120550539131Smrg exit ;; 120650539131Smrg SX-6:SUPER-UX:*:*) 120750539131Smrg echo sx6-nec-superux${UNAME_RELEASE} 120850539131Smrg exit ;; 120950539131Smrg SX-7:SUPER-UX:*:*) 121050539131Smrg echo sx7-nec-superux${UNAME_RELEASE} 121150539131Smrg exit ;; 121250539131Smrg SX-8:SUPER-UX:*:*) 121350539131Smrg echo sx8-nec-superux${UNAME_RELEASE} 121450539131Smrg exit ;; 121550539131Smrg SX-8R:SUPER-UX:*:*) 121650539131Smrg echo sx8r-nec-superux${UNAME_RELEASE} 121750539131Smrg exit ;; 121850539131Smrg Power*:Rhapsody:*:*) 121950539131Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 122050539131Smrg exit ;; 122150539131Smrg *:Rhapsody:*:*) 122250539131Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 122350539131Smrg exit ;; 122450539131Smrg *:Darwin:*:*) 122550539131Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 122650539131Smrg case $UNAME_PROCESSOR in 122744d8e951Smrg i386) 122844d8e951Smrg eval $set_cc_for_build 122944d8e951Smrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 123044d8e951Smrg if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 123144d8e951Smrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 123244d8e951Smrg grep IS_64BIT_ARCH >/dev/null 123344d8e951Smrg then 123444d8e951Smrg UNAME_PROCESSOR="x86_64" 123544d8e951Smrg fi 123644d8e951Smrg fi ;; 123750539131Smrg unknown) UNAME_PROCESSOR=powerpc ;; 123850539131Smrg esac 123950539131Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 124050539131Smrg exit ;; 124150539131Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 124250539131Smrg UNAME_PROCESSOR=`uname -p` 124350539131Smrg if test "$UNAME_PROCESSOR" = "x86"; then 124450539131Smrg UNAME_PROCESSOR=i386 124550539131Smrg UNAME_MACHINE=pc 124650539131Smrg fi 124750539131Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 124850539131Smrg exit ;; 124950539131Smrg *:QNX:*:4*) 125050539131Smrg echo i386-pc-qnx 125150539131Smrg exit ;; 125244d8e951Smrg NEO-?:NONSTOP_KERNEL:*:*) 125344d8e951Smrg echo neo-tandem-nsk${UNAME_RELEASE} 125444d8e951Smrg exit ;; 125550539131Smrg NSE-?:NONSTOP_KERNEL:*:*) 125650539131Smrg echo nse-tandem-nsk${UNAME_RELEASE} 125750539131Smrg exit ;; 125850539131Smrg NSR-?:NONSTOP_KERNEL:*:*) 125950539131Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 126050539131Smrg exit ;; 126150539131Smrg *:NonStop-UX:*:*) 126250539131Smrg echo mips-compaq-nonstopux 126350539131Smrg exit ;; 126450539131Smrg BS2000:POSIX*:*:*) 126550539131Smrg echo bs2000-siemens-sysv 126650539131Smrg exit ;; 126750539131Smrg DS/*:UNIX_System_V:*:*) 126850539131Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 126950539131Smrg exit ;; 127050539131Smrg *:Plan9:*:*) 127150539131Smrg # "uname -m" is not consistent, so use $cputype instead. 386 127250539131Smrg # is converted to i386 for consistency with other x86 127350539131Smrg # operating systems. 127450539131Smrg if test "$cputype" = "386"; then 127550539131Smrg UNAME_MACHINE=i386 127650539131Smrg else 127750539131Smrg UNAME_MACHINE="$cputype" 127850539131Smrg fi 127950539131Smrg echo ${UNAME_MACHINE}-unknown-plan9 128050539131Smrg exit ;; 128150539131Smrg *:TOPS-10:*:*) 128250539131Smrg echo pdp10-unknown-tops10 128350539131Smrg exit ;; 128450539131Smrg *:TENEX:*:*) 128550539131Smrg echo pdp10-unknown-tenex 128650539131Smrg exit ;; 128750539131Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 128850539131Smrg echo pdp10-dec-tops20 128950539131Smrg exit ;; 129050539131Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 129150539131Smrg echo pdp10-xkl-tops20 129250539131Smrg exit ;; 129350539131Smrg *:TOPS-20:*:*) 129450539131Smrg echo pdp10-unknown-tops20 129550539131Smrg exit ;; 129650539131Smrg *:ITS:*:*) 129750539131Smrg echo pdp10-unknown-its 129850539131Smrg exit ;; 129950539131Smrg SEI:*:*:SEIUX) 130050539131Smrg echo mips-sei-seiux${UNAME_RELEASE} 130150539131Smrg exit ;; 130250539131Smrg *:DragonFly:*:*) 130350539131Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 130450539131Smrg exit ;; 130550539131Smrg *:*VMS:*:*) 130650539131Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 130750539131Smrg case "${UNAME_MACHINE}" in 130850539131Smrg A*) echo alpha-dec-vms ; exit ;; 130950539131Smrg I*) echo ia64-dec-vms ; exit ;; 131050539131Smrg V*) echo vax-dec-vms ; exit ;; 131150539131Smrg esac ;; 131250539131Smrg *:XENIX:*:SysV) 131350539131Smrg echo i386-pc-xenix 131450539131Smrg exit ;; 131550539131Smrg i*86:skyos:*:*) 131650539131Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 131750539131Smrg exit ;; 131850539131Smrg i*86:rdos:*:*) 131950539131Smrg echo ${UNAME_MACHINE}-pc-rdos 132050539131Smrg exit ;; 132150539131Smrg i*86:AROS:*:*) 132250539131Smrg echo ${UNAME_MACHINE}-pc-aros 132350539131Smrg exit ;; 132450539131Smrgesac 132550539131Smrg 132650539131Smrg#echo '(No uname command or uname output not recognized.)' 1>&2 132750539131Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 132850539131Smrg 132950539131Smrgeval $set_cc_for_build 133050539131Smrgcat >$dummy.c <<EOF 133150539131Smrg#ifdef _SEQUENT_ 133250539131Smrg# include <sys/types.h> 133350539131Smrg# include <sys/utsname.h> 133450539131Smrg#endif 133550539131Smrgmain () 133650539131Smrg{ 133750539131Smrg#if defined (sony) 133850539131Smrg#if defined (MIPSEB) 133950539131Smrg /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 134050539131Smrg I don't know.... */ 134150539131Smrg printf ("mips-sony-bsd\n"); exit (0); 134250539131Smrg#else 134350539131Smrg#include <sys/param.h> 134450539131Smrg printf ("m68k-sony-newsos%s\n", 134550539131Smrg#ifdef NEWSOS4 134650539131Smrg "4" 134750539131Smrg#else 134850539131Smrg "" 134950539131Smrg#endif 135050539131Smrg ); exit (0); 135150539131Smrg#endif 135250539131Smrg#endif 135350539131Smrg 135450539131Smrg#if defined (__arm) && defined (__acorn) && defined (__unix) 135550539131Smrg printf ("arm-acorn-riscix\n"); exit (0); 135650539131Smrg#endif 135750539131Smrg 135850539131Smrg#if defined (hp300) && !defined (hpux) 135950539131Smrg printf ("m68k-hp-bsd\n"); exit (0); 136050539131Smrg#endif 136150539131Smrg 136250539131Smrg#if defined (NeXT) 136350539131Smrg#if !defined (__ARCHITECTURE__) 136450539131Smrg#define __ARCHITECTURE__ "m68k" 136550539131Smrg#endif 136650539131Smrg int version; 136750539131Smrg version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 136850539131Smrg if (version < 4) 136950539131Smrg printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 137050539131Smrg else 137150539131Smrg printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 137250539131Smrg exit (0); 137350539131Smrg#endif 137450539131Smrg 137550539131Smrg#if defined (MULTIMAX) || defined (n16) 137650539131Smrg#if defined (UMAXV) 137750539131Smrg printf ("ns32k-encore-sysv\n"); exit (0); 137850539131Smrg#else 137950539131Smrg#if defined (CMU) 138050539131Smrg printf ("ns32k-encore-mach\n"); exit (0); 138150539131Smrg#else 138250539131Smrg printf ("ns32k-encore-bsd\n"); exit (0); 138350539131Smrg#endif 138450539131Smrg#endif 138550539131Smrg#endif 138650539131Smrg 138750539131Smrg#if defined (__386BSD__) 138850539131Smrg printf ("i386-pc-bsd\n"); exit (0); 138950539131Smrg#endif 139050539131Smrg 139150539131Smrg#if defined (sequent) 139250539131Smrg#if defined (i386) 139350539131Smrg printf ("i386-sequent-dynix\n"); exit (0); 139450539131Smrg#endif 139550539131Smrg#if defined (ns32000) 139650539131Smrg printf ("ns32k-sequent-dynix\n"); exit (0); 139750539131Smrg#endif 139850539131Smrg#endif 139950539131Smrg 140050539131Smrg#if defined (_SEQUENT_) 140150539131Smrg struct utsname un; 140250539131Smrg 140350539131Smrg uname(&un); 140450539131Smrg 140550539131Smrg if (strncmp(un.version, "V2", 2) == 0) { 140650539131Smrg printf ("i386-sequent-ptx2\n"); exit (0); 140750539131Smrg } 140850539131Smrg if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 140950539131Smrg printf ("i386-sequent-ptx1\n"); exit (0); 141050539131Smrg } 141150539131Smrg printf ("i386-sequent-ptx\n"); exit (0); 141250539131Smrg 141350539131Smrg#endif 141450539131Smrg 141550539131Smrg#if defined (vax) 141650539131Smrg# if !defined (ultrix) 141750539131Smrg# include <sys/param.h> 141850539131Smrg# if defined (BSD) 141950539131Smrg# if BSD == 43 142050539131Smrg printf ("vax-dec-bsd4.3\n"); exit (0); 142150539131Smrg# else 142250539131Smrg# if BSD == 199006 142350539131Smrg printf ("vax-dec-bsd4.3reno\n"); exit (0); 142450539131Smrg# else 142550539131Smrg printf ("vax-dec-bsd\n"); exit (0); 142650539131Smrg# endif 142750539131Smrg# endif 142850539131Smrg# else 142950539131Smrg printf ("vax-dec-bsd\n"); exit (0); 143050539131Smrg# endif 143150539131Smrg# else 143250539131Smrg printf ("vax-dec-ultrix\n"); exit (0); 143350539131Smrg# endif 143450539131Smrg#endif 143550539131Smrg 143650539131Smrg#if defined (alliant) && defined (i860) 143750539131Smrg printf ("i860-alliant-bsd\n"); exit (0); 143850539131Smrg#endif 143950539131Smrg 144050539131Smrg exit (1); 144150539131Smrg} 144250539131SmrgEOF 144350539131Smrg 144450539131Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 144550539131Smrg { echo "$SYSTEM_NAME"; exit; } 144650539131Smrg 144750539131Smrg# Apollos put the system type in the environment. 144850539131Smrg 144950539131Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 145050539131Smrg 145150539131Smrg# Convex versions that predate uname can use getsysinfo(1) 145250539131Smrg 145350539131Smrgif [ -x /usr/convex/getsysinfo ] 145450539131Smrgthen 145550539131Smrg case `getsysinfo -f cpu_type` in 145650539131Smrg c1*) 145750539131Smrg echo c1-convex-bsd 145850539131Smrg exit ;; 145950539131Smrg c2*) 146050539131Smrg if getsysinfo -f scalar_acc 146150539131Smrg then echo c32-convex-bsd 146250539131Smrg else echo c2-convex-bsd 146350539131Smrg fi 146450539131Smrg exit ;; 146550539131Smrg c34*) 146650539131Smrg echo c34-convex-bsd 146750539131Smrg exit ;; 146850539131Smrg c38*) 146950539131Smrg echo c38-convex-bsd 147050539131Smrg exit ;; 147150539131Smrg c4*) 147250539131Smrg echo c4-convex-bsd 147350539131Smrg exit ;; 147450539131Smrg esac 147550539131Smrgfi 147650539131Smrg 147750539131Smrgcat >&2 <<EOF 147850539131Smrg$0: unable to guess system type 147950539131Smrg 148050539131SmrgThis script, last modified $timestamp, has failed to recognize 148150539131Smrgthe operating system you are using. It is advised that you 148250539131Smrgdownload the most up to date version of the config scripts from 148350539131Smrg 148450539131Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 148550539131Smrgand 148650539131Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 148750539131Smrg 148850539131SmrgIf the version you run ($0) is already up to date, please 148950539131Smrgsend the following data and any information you think might be 149050539131Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 149150539131Smrginformation to handle your system. 149250539131Smrg 149350539131Smrgconfig.guess timestamp = $timestamp 149450539131Smrg 149550539131Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 149650539131Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 149750539131Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 149850539131Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 149950539131Smrg 150050539131Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 150150539131Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 150250539131Smrg 150350539131Smrghostinfo = `(hostinfo) 2>/dev/null` 150450539131Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 150550539131Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 150650539131Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 150750539131Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 150850539131Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 150950539131Smrg 151050539131SmrgUNAME_MACHINE = ${UNAME_MACHINE} 151150539131SmrgUNAME_RELEASE = ${UNAME_RELEASE} 151250539131SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 151350539131SmrgUNAME_VERSION = ${UNAME_VERSION} 151450539131SmrgEOF 151550539131Smrg 151650539131Smrgexit 1 151750539131Smrg 151850539131Smrg# Local variables: 151950539131Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 152050539131Smrg# time-stamp-start: "timestamp='" 152150539131Smrg# time-stamp-format: "%:y-%02m-%02d" 152250539131Smrg# time-stamp-end: "'" 152350539131Smrg# End: 1524