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