config.guess revision 00084f2c
127702724Smrg#! /bin/sh 227702724Smrg# Attempt to guess a canonical system name. 327702724Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 400084f2cSmrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 5e19dfac4Smrg# Free Software Foundation, Inc. 627702724Smrg 700084f2cSmrgtimestamp='2009-12-30' 827702724Smrg 927702724Smrg# This file is free software; you can redistribute it and/or modify it 1027702724Smrg# under the terms of the GNU General Public License as published by 1127702724Smrg# the Free Software Foundation; either version 2 of the License, or 1227702724Smrg# (at your option) any later version. 1327702724Smrg# 1427702724Smrg# This program is distributed in the hope that it will be useful, but 1527702724Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1627702724Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1727702724Smrg# General Public License for more details. 1827702724Smrg# 1927702724Smrg# You should have received a copy of the GNU General Public License 2027702724Smrg# along with this program; if not, write to the Free Software 2127702724Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 2227702724Smrg# 02110-1301, USA. 2327702724Smrg# 2427702724Smrg# As a special exception to the GNU General Public License, if you 2527702724Smrg# distribute this file as part of a program that contains a 2627702724Smrg# configuration script generated by Autoconf, you may include it under 2727702724Smrg# the same distribution terms that you use for the rest of that program. 2827702724Smrg 2927702724Smrg 3000084f2cSmrg# Originally written by Per Bothner. Please send patches (context 3100084f2cSmrg# diff format) to <config-patches@gnu.org> and include a ChangeLog 3200084f2cSmrg# entry. 3327702724Smrg# 3427702724Smrg# This script attempts to guess a canonical system name similar to 3527702724Smrg# config.sub. If it succeeds, it prints the system name on stdout, and 3627702724Smrg# exits with 0. Otherwise, it exits with 1. 3727702724Smrg# 3800084f2cSmrg# You can get the latest version of this script from: 3900084f2cSmrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 4027702724Smrg 4127702724Smrgme=`echo "$0" | sed -e 's,.*/,,'` 4227702724Smrg 4327702724Smrgusage="\ 4427702724SmrgUsage: $0 [OPTION] 4527702724Smrg 4627702724SmrgOutput the configuration name of the system \`$me' is run on. 4727702724Smrg 4827702724SmrgOperation modes: 4927702724Smrg -h, --help print this help, then exit 5027702724Smrg -t, --time-stamp print date of last modification, then exit 5127702724Smrg -v, --version print version number, then exit 5227702724Smrg 5327702724SmrgReport bugs and patches to <config-patches@gnu.org>." 5427702724Smrg 5527702724Smrgversion="\ 5627702724SmrgGNU config.guess ($timestamp) 5727702724Smrg 5827702724SmrgOriginally written by Per Bothner. 5900084f2cSmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 6000084f2cSmrg2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 6100084f2cSmrgSoftware Foundation, Inc. 6227702724Smrg 6327702724SmrgThis is free software; see the source for copying conditions. There is NO 6427702724Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 6527702724Smrg 6627702724Smrghelp=" 6727702724SmrgTry \`$me --help' for more information." 6827702724Smrg 6927702724Smrg# Parse command line 7027702724Smrgwhile test $# -gt 0 ; do 7127702724Smrg case $1 in 7227702724Smrg --time-stamp | --time* | -t ) 7327702724Smrg echo "$timestamp" ; exit ;; 7427702724Smrg --version | -v ) 7527702724Smrg echo "$version" ; exit ;; 7627702724Smrg --help | --h* | -h ) 7727702724Smrg echo "$usage"; exit ;; 7827702724Smrg -- ) # Stop option processing 7927702724Smrg shift; break ;; 8027702724Smrg - ) # Use stdin as input. 8127702724Smrg break ;; 8227702724Smrg -* ) 8327702724Smrg echo "$me: invalid option $1$help" >&2 8427702724Smrg exit 1 ;; 8527702724Smrg * ) 8627702724Smrg break ;; 8727702724Smrg esac 8827702724Smrgdone 8927702724Smrg 9027702724Smrgif test $# != 0; then 9127702724Smrg echo "$me: too many arguments$help" >&2 9227702724Smrg exit 1 9327702724Smrgfi 9427702724Smrg 9527702724Smrgtrap 'exit 1' 1 2 15 9627702724Smrg 9727702724Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 9827702724Smrg# compiler to aid in system detection is discouraged as it requires 9927702724Smrg# temporary files to be created and, as you can see below, it is a 10027702724Smrg# headache to deal with in a portable fashion. 10127702724Smrg 10227702724Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 10327702724Smrg# use `HOST_CC' if defined, but it is deprecated. 10427702724Smrg 10527702724Smrg# Portable tmp directory creation inspired by the Autoconf team. 10627702724Smrg 10727702724Smrgset_cc_for_build=' 10827702724Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 10927702724Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 11027702724Smrg: ${TMPDIR=/tmp} ; 11127702724Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 11227702724Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 11327702724Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 11427702724Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 11527702724Smrgdummy=$tmp/dummy ; 11627702724Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 11727702724Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 11827702724Smrg ,,) echo "int x;" > $dummy.c ; 11927702724Smrg for c in cc gcc c89 c99 ; do 12027702724Smrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 12127702724Smrg CC_FOR_BUILD="$c"; break ; 12227702724Smrg fi ; 12327702724Smrg done ; 12427702724Smrg if test x"$CC_FOR_BUILD" = x ; then 12527702724Smrg CC_FOR_BUILD=no_compiler_found ; 12627702724Smrg fi 12727702724Smrg ;; 12827702724Smrg ,,*) CC_FOR_BUILD=$CC ;; 12927702724Smrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 13027702724Smrgesac ; set_cc_for_build= ;' 13127702724Smrg 13227702724Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 13327702724Smrg# (ghazi@noc.rutgers.edu 1994-08-24) 13427702724Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 13527702724Smrg PATH=$PATH:/.attbin ; export PATH 13627702724Smrgfi 13727702724Smrg 13827702724SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 13927702724SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 14027702724SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 14127702724SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 14227702724Smrg 14327702724Smrg# Note: order is significant - the case branches are not exclusive. 14427702724Smrg 14527702724Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 14627702724Smrg *:NetBSD:*:*) 14727702724Smrg # NetBSD (nbsd) targets should (where applicable) match one or 14827702724Smrg # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 14927702724Smrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 15027702724Smrg # switched to ELF, *-*-netbsd* would select the old 15127702724Smrg # object file format. This provides both forward 15227702724Smrg # compatibility and a consistent mechanism for selecting the 15327702724Smrg # object file format. 15427702724Smrg # 15527702724Smrg # Note: NetBSD doesn't particularly care about the vendor 15627702724Smrg # portion of the name. We always set it to "unknown". 15727702724Smrg sysctl="sysctl -n hw.machine_arch" 15827702724Smrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 15927702724Smrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 16027702724Smrg case "${UNAME_MACHINE_ARCH}" in 16127702724Smrg armeb) machine=armeb-unknown ;; 16227702724Smrg arm*) machine=arm-unknown ;; 16327702724Smrg sh3el) machine=shl-unknown ;; 16427702724Smrg sh3eb) machine=sh-unknown ;; 165e19dfac4Smrg sh5el) machine=sh5le-unknown ;; 16627702724Smrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 16727702724Smrg esac 16827702724Smrg # The Operating System including object format, if it has switched 16927702724Smrg # to ELF recently, or will in the future. 17027702724Smrg case "${UNAME_MACHINE_ARCH}" in 17127702724Smrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 17227702724Smrg eval $set_cc_for_build 17327702724Smrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 17400084f2cSmrg | grep -q __ELF__ 17527702724Smrg then 17627702724Smrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 17727702724Smrg # Return netbsd for either. FIX? 17827702724Smrg os=netbsd 17927702724Smrg else 18027702724Smrg os=netbsdelf 18127702724Smrg fi 18227702724Smrg ;; 18327702724Smrg *) 18427702724Smrg os=netbsd 18527702724Smrg ;; 18627702724Smrg esac 18727702724Smrg # The OS release 18827702724Smrg # Debian GNU/NetBSD machines have a different userland, and 18927702724Smrg # thus, need a distinct triplet. However, they do not need 19027702724Smrg # kernel version information, so it can be replaced with a 19127702724Smrg # suitable tag, in the style of linux-gnu. 19227702724Smrg case "${UNAME_VERSION}" in 19327702724Smrg Debian*) 19427702724Smrg release='-gnu' 19527702724Smrg ;; 19627702724Smrg *) 19727702724Smrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 19827702724Smrg ;; 19927702724Smrg esac 20027702724Smrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 20127702724Smrg # contains redundant information, the shorter form: 20227702724Smrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 20327702724Smrg echo "${machine}-${os}${release}" 20427702724Smrg exit ;; 20527702724Smrg *:OpenBSD:*:*) 20627702724Smrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 20727702724Smrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 20827702724Smrg exit ;; 20927702724Smrg *:ekkoBSD:*:*) 21027702724Smrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 21127702724Smrg exit ;; 21227702724Smrg *:SolidBSD:*:*) 21327702724Smrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 21427702724Smrg exit ;; 21527702724Smrg macppc:MirBSD:*:*) 216e19dfac4Smrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 21727702724Smrg exit ;; 21827702724Smrg *:MirBSD:*:*) 21927702724Smrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 22027702724Smrg exit ;; 22127702724Smrg alpha:OSF1:*:*) 22227702724Smrg case $UNAME_RELEASE in 22327702724Smrg *4.0) 22427702724Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 22527702724Smrg ;; 22627702724Smrg *5.*) 22727702724Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 22827702724Smrg ;; 22927702724Smrg esac 23027702724Smrg # According to Compaq, /usr/sbin/psrinfo has been available on 23127702724Smrg # OSF/1 and Tru64 systems produced since 1995. I hope that 23227702724Smrg # covers most systems running today. This code pipes the CPU 23327702724Smrg # types through head -n 1, so we only detect the type of CPU 0. 23427702724Smrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 23527702724Smrg case "$ALPHA_CPU_TYPE" in 23627702724Smrg "EV4 (21064)") 23727702724Smrg UNAME_MACHINE="alpha" ;; 23827702724Smrg "EV4.5 (21064)") 23927702724Smrg UNAME_MACHINE="alpha" ;; 24027702724Smrg "LCA4 (21066/21068)") 24127702724Smrg UNAME_MACHINE="alpha" ;; 24227702724Smrg "EV5 (21164)") 24327702724Smrg UNAME_MACHINE="alphaev5" ;; 24427702724Smrg "EV5.6 (21164A)") 24527702724Smrg UNAME_MACHINE="alphaev56" ;; 24627702724Smrg "EV5.6 (21164PC)") 24727702724Smrg UNAME_MACHINE="alphapca56" ;; 24827702724Smrg "EV5.7 (21164PC)") 24927702724Smrg UNAME_MACHINE="alphapca57" ;; 25027702724Smrg "EV6 (21264)") 25127702724Smrg UNAME_MACHINE="alphaev6" ;; 25227702724Smrg "EV6.7 (21264A)") 25327702724Smrg UNAME_MACHINE="alphaev67" ;; 25427702724Smrg "EV6.8CB (21264C)") 25527702724Smrg UNAME_MACHINE="alphaev68" ;; 25627702724Smrg "EV6.8AL (21264B)") 25727702724Smrg UNAME_MACHINE="alphaev68" ;; 25827702724Smrg "EV6.8CX (21264D)") 25927702724Smrg UNAME_MACHINE="alphaev68" ;; 26027702724Smrg "EV6.9A (21264/EV69A)") 26127702724Smrg UNAME_MACHINE="alphaev69" ;; 26227702724Smrg "EV7 (21364)") 26327702724Smrg UNAME_MACHINE="alphaev7" ;; 26427702724Smrg "EV7.9 (21364A)") 26527702724Smrg UNAME_MACHINE="alphaev79" ;; 26627702724Smrg esac 26727702724Smrg # A Pn.n version is a patched version. 26827702724Smrg # A Vn.n version is a released version. 26927702724Smrg # A Tn.n version is a released field test version. 27027702724Smrg # A Xn.n version is an unreleased experimental baselevel. 27127702724Smrg # 1.2 uses "1.2" for uname -r. 27227702724Smrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27327702724Smrg exit ;; 27427702724Smrg Alpha\ *:Windows_NT*:*) 27527702724Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 27627702724Smrg # Should we change UNAME_MACHINE based on the output of uname instead 27727702724Smrg # of the specific Alpha model? 27827702724Smrg echo alpha-pc-interix 27927702724Smrg exit ;; 28027702724Smrg 21064:Windows_NT:50:3) 28127702724Smrg echo alpha-dec-winnt3.5 28227702724Smrg exit ;; 28327702724Smrg Amiga*:UNIX_System_V:4.0:*) 28427702724Smrg echo m68k-unknown-sysv4 28527702724Smrg exit ;; 28627702724Smrg *:[Aa]miga[Oo][Ss]:*:*) 28727702724Smrg echo ${UNAME_MACHINE}-unknown-amigaos 28827702724Smrg exit ;; 28927702724Smrg *:[Mm]orph[Oo][Ss]:*:*) 29027702724Smrg echo ${UNAME_MACHINE}-unknown-morphos 29127702724Smrg exit ;; 29227702724Smrg *:OS/390:*:*) 29327702724Smrg echo i370-ibm-openedition 29427702724Smrg exit ;; 29527702724Smrg *:z/VM:*:*) 29627702724Smrg echo s390-ibm-zvmoe 29727702724Smrg exit ;; 29827702724Smrg *:OS400:*:*) 29927702724Smrg echo powerpc-ibm-os400 30027702724Smrg exit ;; 30127702724Smrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 30227702724Smrg echo arm-acorn-riscix${UNAME_RELEASE} 30327702724Smrg exit ;; 30427702724Smrg arm:riscos:*:*|arm:RISCOS:*:*) 30527702724Smrg echo arm-unknown-riscos 30627702724Smrg exit ;; 30727702724Smrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 30827702724Smrg echo hppa1.1-hitachi-hiuxmpp 30927702724Smrg exit ;; 31027702724Smrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 31127702724Smrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 31227702724Smrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 31327702724Smrg echo pyramid-pyramid-sysv3 31427702724Smrg else 31527702724Smrg echo pyramid-pyramid-bsd 31627702724Smrg fi 31727702724Smrg exit ;; 31827702724Smrg NILE*:*:*:dcosx) 31927702724Smrg echo pyramid-pyramid-svr4 32027702724Smrg exit ;; 32127702724Smrg DRS?6000:unix:4.0:6*) 32227702724Smrg echo sparc-icl-nx6 32327702724Smrg exit ;; 32427702724Smrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 32527702724Smrg case `/usr/bin/uname -p` in 32627702724Smrg sparc) echo sparc-icl-nx7; exit ;; 32727702724Smrg esac ;; 32800084f2cSmrg s390x:SunOS:*:*) 32900084f2cSmrg echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 33000084f2cSmrg exit ;; 33127702724Smrg sun4H:SunOS:5.*:*) 33227702724Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 33327702724Smrg exit ;; 33427702724Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 33527702724Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 33627702724Smrg exit ;; 33700084f2cSmrg i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 33800084f2cSmrg echo i386-pc-auroraux${UNAME_RELEASE} 33900084f2cSmrg exit ;; 340e19dfac4Smrg i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 34100084f2cSmrg eval $set_cc_for_build 34200084f2cSmrg SUN_ARCH="i386" 34300084f2cSmrg # If there is a compiler, see if it is configured for 64-bit objects. 34400084f2cSmrg # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 34500084f2cSmrg # This test works for both compilers. 34600084f2cSmrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 34700084f2cSmrg if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 34800084f2cSmrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 34900084f2cSmrg grep IS_64BIT_ARCH >/dev/null 35000084f2cSmrg then 35100084f2cSmrg SUN_ARCH="x86_64" 35200084f2cSmrg fi 35300084f2cSmrg fi 35400084f2cSmrg echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 35527702724Smrg exit ;; 35627702724Smrg sun4*:SunOS:6*:*) 35727702724Smrg # According to config.sub, this is the proper way to canonicalize 35827702724Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 35927702724Smrg # it's likely to be more like Solaris than SunOS4. 36027702724Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 36127702724Smrg exit ;; 36227702724Smrg sun4*:SunOS:*:*) 36327702724Smrg case "`/usr/bin/arch -k`" in 36427702724Smrg Series*|S4*) 36527702724Smrg UNAME_RELEASE=`uname -v` 36627702724Smrg ;; 36727702724Smrg esac 36827702724Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 36927702724Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 37027702724Smrg exit ;; 37127702724Smrg sun3*:SunOS:*:*) 37227702724Smrg echo m68k-sun-sunos${UNAME_RELEASE} 37327702724Smrg exit ;; 37427702724Smrg sun*:*:4.2BSD:*) 37527702724Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 37627702724Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 37727702724Smrg case "`/bin/arch`" in 37827702724Smrg sun3) 37927702724Smrg echo m68k-sun-sunos${UNAME_RELEASE} 38027702724Smrg ;; 38127702724Smrg sun4) 38227702724Smrg echo sparc-sun-sunos${UNAME_RELEASE} 38327702724Smrg ;; 38427702724Smrg esac 38527702724Smrg exit ;; 38627702724Smrg aushp:SunOS:*:*) 38727702724Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 38827702724Smrg exit ;; 38927702724Smrg # The situation for MiNT is a little confusing. The machine name 39027702724Smrg # can be virtually everything (everything which is not 39127702724Smrg # "atarist" or "atariste" at least should have a processor 39227702724Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 39327702724Smrg # to the lowercase version "mint" (or "freemint"). Finally 39427702724Smrg # the system name "TOS" denotes a system which is actually not 39527702724Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 39627702724Smrg # be no problem. 39727702724Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 39827702724Smrg echo m68k-atari-mint${UNAME_RELEASE} 39927702724Smrg exit ;; 40027702724Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 40127702724Smrg echo m68k-atari-mint${UNAME_RELEASE} 40227702724Smrg exit ;; 40327702724Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 40427702724Smrg echo m68k-atari-mint${UNAME_RELEASE} 40527702724Smrg exit ;; 40627702724Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 40727702724Smrg echo m68k-milan-mint${UNAME_RELEASE} 40827702724Smrg exit ;; 40927702724Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 41027702724Smrg echo m68k-hades-mint${UNAME_RELEASE} 41127702724Smrg exit ;; 41227702724Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 41327702724Smrg echo m68k-unknown-mint${UNAME_RELEASE} 41427702724Smrg exit ;; 41527702724Smrg m68k:machten:*:*) 41627702724Smrg echo m68k-apple-machten${UNAME_RELEASE} 41727702724Smrg exit ;; 41827702724Smrg powerpc:machten:*:*) 41927702724Smrg echo powerpc-apple-machten${UNAME_RELEASE} 42027702724Smrg exit ;; 42127702724Smrg RISC*:Mach:*:*) 42227702724Smrg echo mips-dec-mach_bsd4.3 42327702724Smrg exit ;; 42427702724Smrg RISC*:ULTRIX:*:*) 42527702724Smrg echo mips-dec-ultrix${UNAME_RELEASE} 42627702724Smrg exit ;; 42727702724Smrg VAX*:ULTRIX*:*:*) 42827702724Smrg echo vax-dec-ultrix${UNAME_RELEASE} 42927702724Smrg exit ;; 43027702724Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 43127702724Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 43227702724Smrg exit ;; 43327702724Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 43427702724Smrg eval $set_cc_for_build 43527702724Smrg sed 's/^ //' << EOF >$dummy.c 43627702724Smrg#ifdef __cplusplus 43727702724Smrg#include <stdio.h> /* for printf() prototype */ 43827702724Smrg int main (int argc, char *argv[]) { 43927702724Smrg#else 44027702724Smrg int main (argc, argv) int argc; char *argv[]; { 44127702724Smrg#endif 44227702724Smrg #if defined (host_mips) && defined (MIPSEB) 44327702724Smrg #if defined (SYSTYPE_SYSV) 44427702724Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 44527702724Smrg #endif 44627702724Smrg #if defined (SYSTYPE_SVR4) 44727702724Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 44827702724Smrg #endif 44927702724Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 45027702724Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 45127702724Smrg #endif 45227702724Smrg #endif 45327702724Smrg exit (-1); 45427702724Smrg } 45527702724SmrgEOF 45627702724Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 45727702724Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 45827702724Smrg SYSTEM_NAME=`$dummy $dummyarg` && 45927702724Smrg { echo "$SYSTEM_NAME"; exit; } 46027702724Smrg echo mips-mips-riscos${UNAME_RELEASE} 46127702724Smrg exit ;; 46227702724Smrg Motorola:PowerMAX_OS:*:*) 46327702724Smrg echo powerpc-motorola-powermax 46427702724Smrg exit ;; 46527702724Smrg Motorola:*:4.3:PL8-*) 46627702724Smrg echo powerpc-harris-powermax 46727702724Smrg exit ;; 46827702724Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 46927702724Smrg echo powerpc-harris-powermax 47027702724Smrg exit ;; 47127702724Smrg Night_Hawk:Power_UNIX:*:*) 47227702724Smrg echo powerpc-harris-powerunix 47327702724Smrg exit ;; 47427702724Smrg m88k:CX/UX:7*:*) 47527702724Smrg echo m88k-harris-cxux7 47627702724Smrg exit ;; 47727702724Smrg m88k:*:4*:R4*) 47827702724Smrg echo m88k-motorola-sysv4 47927702724Smrg exit ;; 48027702724Smrg m88k:*:3*:R3*) 48127702724Smrg echo m88k-motorola-sysv3 48227702724Smrg exit ;; 48327702724Smrg AViiON:dgux:*:*) 48427702724Smrg # DG/UX returns AViiON for all architectures 48527702724Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 48627702724Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 48727702724Smrg then 48827702724Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 48927702724Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 49027702724Smrg then 49127702724Smrg echo m88k-dg-dgux${UNAME_RELEASE} 49227702724Smrg else 49327702724Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 49427702724Smrg fi 49527702724Smrg else 49627702724Smrg echo i586-dg-dgux${UNAME_RELEASE} 49727702724Smrg fi 49827702724Smrg exit ;; 49927702724Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 50027702724Smrg echo m88k-dolphin-sysv3 50127702724Smrg exit ;; 50227702724Smrg M88*:*:R3*:*) 50327702724Smrg # Delta 88k system running SVR3 50427702724Smrg echo m88k-motorola-sysv3 50527702724Smrg exit ;; 50627702724Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 50727702724Smrg echo m88k-tektronix-sysv3 50827702724Smrg exit ;; 50927702724Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 51027702724Smrg echo m68k-tektronix-bsd 51127702724Smrg exit ;; 51227702724Smrg *:IRIX*:*:*) 51327702724Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 51427702724Smrg exit ;; 51527702724Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 51627702724Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 51727702724Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 51827702724Smrg i*86:AIX:*:*) 51927702724Smrg echo i386-ibm-aix 52027702724Smrg exit ;; 52127702724Smrg ia64:AIX:*:*) 52227702724Smrg if [ -x /usr/bin/oslevel ] ; then 52327702724Smrg IBM_REV=`/usr/bin/oslevel` 52427702724Smrg else 52527702724Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 52627702724Smrg fi 52727702724Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 52827702724Smrg exit ;; 52927702724Smrg *:AIX:2:3) 53027702724Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 53127702724Smrg eval $set_cc_for_build 53227702724Smrg sed 's/^ //' << EOF >$dummy.c 53327702724Smrg #include <sys/systemcfg.h> 53427702724Smrg 53527702724Smrg main() 53627702724Smrg { 53727702724Smrg if (!__power_pc()) 53827702724Smrg exit(1); 53927702724Smrg puts("powerpc-ibm-aix3.2.5"); 54027702724Smrg exit(0); 54127702724Smrg } 54227702724SmrgEOF 54327702724Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 54427702724Smrg then 54527702724Smrg echo "$SYSTEM_NAME" 54627702724Smrg else 54727702724Smrg echo rs6000-ibm-aix3.2.5 54827702724Smrg fi 54927702724Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 55027702724Smrg echo rs6000-ibm-aix3.2.4 55127702724Smrg else 55227702724Smrg echo rs6000-ibm-aix3.2 55327702724Smrg fi 55427702724Smrg exit ;; 555e19dfac4Smrg *:AIX:*:[456]) 55627702724Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 55727702724Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 55827702724Smrg IBM_ARCH=rs6000 55927702724Smrg else 56027702724Smrg IBM_ARCH=powerpc 56127702724Smrg fi 56227702724Smrg if [ -x /usr/bin/oslevel ] ; then 56327702724Smrg IBM_REV=`/usr/bin/oslevel` 56427702724Smrg else 56527702724Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 56627702724Smrg fi 56727702724Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 56827702724Smrg exit ;; 56927702724Smrg *:AIX:*:*) 57027702724Smrg echo rs6000-ibm-aix 57127702724Smrg exit ;; 57227702724Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 57327702724Smrg echo romp-ibm-bsd4.4 57427702724Smrg exit ;; 57527702724Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 57627702724Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 57727702724Smrg exit ;; # report: romp-ibm BSD 4.3 57827702724Smrg *:BOSX:*:*) 57927702724Smrg echo rs6000-bull-bosx 58027702724Smrg exit ;; 58127702724Smrg DPX/2?00:B.O.S.:*:*) 58227702724Smrg echo m68k-bull-sysv3 58327702724Smrg exit ;; 58427702724Smrg 9000/[34]??:4.3bsd:1.*:*) 58527702724Smrg echo m68k-hp-bsd 58627702724Smrg exit ;; 58727702724Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 58827702724Smrg echo m68k-hp-bsd4.4 58927702724Smrg exit ;; 59027702724Smrg 9000/[34678]??:HP-UX:*:*) 59127702724Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 59227702724Smrg case "${UNAME_MACHINE}" in 59327702724Smrg 9000/31? ) HP_ARCH=m68000 ;; 59427702724Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 59527702724Smrg 9000/[678][0-9][0-9]) 59627702724Smrg if [ -x /usr/bin/getconf ]; then 59727702724Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 59827702724Smrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 59927702724Smrg case "${sc_cpu_version}" in 60027702724Smrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 60127702724Smrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 60227702724Smrg 532) # CPU_PA_RISC2_0 60327702724Smrg case "${sc_kernel_bits}" in 60427702724Smrg 32) HP_ARCH="hppa2.0n" ;; 60527702724Smrg 64) HP_ARCH="hppa2.0w" ;; 60627702724Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 60727702724Smrg esac ;; 60827702724Smrg esac 60927702724Smrg fi 61027702724Smrg if [ "${HP_ARCH}" = "" ]; then 61127702724Smrg eval $set_cc_for_build 61227702724Smrg sed 's/^ //' << EOF >$dummy.c 61327702724Smrg 61427702724Smrg #define _HPUX_SOURCE 61527702724Smrg #include <stdlib.h> 61627702724Smrg #include <unistd.h> 61727702724Smrg 61827702724Smrg int main () 61927702724Smrg { 62027702724Smrg #if defined(_SC_KERNEL_BITS) 62127702724Smrg long bits = sysconf(_SC_KERNEL_BITS); 62227702724Smrg #endif 62327702724Smrg long cpu = sysconf (_SC_CPU_VERSION); 62427702724Smrg 62527702724Smrg switch (cpu) 62627702724Smrg { 62727702724Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 62827702724Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 62927702724Smrg case CPU_PA_RISC2_0: 63027702724Smrg #if defined(_SC_KERNEL_BITS) 63127702724Smrg switch (bits) 63227702724Smrg { 63327702724Smrg case 64: puts ("hppa2.0w"); break; 63427702724Smrg case 32: puts ("hppa2.0n"); break; 63527702724Smrg default: puts ("hppa2.0"); break; 63627702724Smrg } break; 63727702724Smrg #else /* !defined(_SC_KERNEL_BITS) */ 63827702724Smrg puts ("hppa2.0"); break; 63927702724Smrg #endif 64027702724Smrg default: puts ("hppa1.0"); break; 64127702724Smrg } 64227702724Smrg exit (0); 64327702724Smrg } 64427702724SmrgEOF 64527702724Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 64627702724Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 64727702724Smrg fi ;; 64827702724Smrg esac 64927702724Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 65027702724Smrg then 65127702724Smrg eval $set_cc_for_build 65227702724Smrg 65327702724Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 65427702724Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 65527702724Smrg # generating 64-bit code. GNU and HP use different nomenclature: 65627702724Smrg # 65727702724Smrg # $ CC_FOR_BUILD=cc ./config.guess 65827702724Smrg # => hppa2.0w-hp-hpux11.23 65927702724Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 66027702724Smrg # => hppa64-hp-hpux11.23 66127702724Smrg 66227702724Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 66300084f2cSmrg grep -q __LP64__ 66427702724Smrg then 66527702724Smrg HP_ARCH="hppa2.0w" 66627702724Smrg else 66727702724Smrg HP_ARCH="hppa64" 66827702724Smrg fi 66927702724Smrg fi 67027702724Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 67127702724Smrg exit ;; 67227702724Smrg ia64:HP-UX:*:*) 67327702724Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 67427702724Smrg echo ia64-hp-hpux${HPUX_REV} 67527702724Smrg exit ;; 67627702724Smrg 3050*:HI-UX:*:*) 67727702724Smrg eval $set_cc_for_build 67827702724Smrg sed 's/^ //' << EOF >$dummy.c 67927702724Smrg #include <unistd.h> 68027702724Smrg int 68127702724Smrg main () 68227702724Smrg { 68327702724Smrg long cpu = sysconf (_SC_CPU_VERSION); 68427702724Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 68527702724Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 68627702724Smrg results, however. */ 68727702724Smrg if (CPU_IS_PA_RISC (cpu)) 68827702724Smrg { 68927702724Smrg switch (cpu) 69027702724Smrg { 69127702724Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 69227702724Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 69327702724Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 69427702724Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 69527702724Smrg } 69627702724Smrg } 69727702724Smrg else if (CPU_IS_HP_MC68K (cpu)) 69827702724Smrg puts ("m68k-hitachi-hiuxwe2"); 69927702724Smrg else puts ("unknown-hitachi-hiuxwe2"); 70027702724Smrg exit (0); 70127702724Smrg } 70227702724SmrgEOF 70327702724Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 70427702724Smrg { echo "$SYSTEM_NAME"; exit; } 70527702724Smrg echo unknown-hitachi-hiuxwe2 70627702724Smrg exit ;; 70727702724Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 70827702724Smrg echo hppa1.1-hp-bsd 70927702724Smrg exit ;; 71027702724Smrg 9000/8??:4.3bsd:*:*) 71127702724Smrg echo hppa1.0-hp-bsd 71227702724Smrg exit ;; 71327702724Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 71427702724Smrg echo hppa1.0-hp-mpeix 71527702724Smrg exit ;; 71627702724Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 71727702724Smrg echo hppa1.1-hp-osf 71827702724Smrg exit ;; 71927702724Smrg hp8??:OSF1:*:*) 72027702724Smrg echo hppa1.0-hp-osf 72127702724Smrg exit ;; 72227702724Smrg i*86:OSF1:*:*) 72327702724Smrg if [ -x /usr/sbin/sysversion ] ; then 72427702724Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 72527702724Smrg else 72627702724Smrg echo ${UNAME_MACHINE}-unknown-osf1 72727702724Smrg fi 72827702724Smrg exit ;; 72927702724Smrg parisc*:Lites*:*:*) 73027702724Smrg echo hppa1.1-hp-lites 73127702724Smrg exit ;; 73227702724Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 73327702724Smrg echo c1-convex-bsd 73427702724Smrg exit ;; 73527702724Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 73627702724Smrg if getsysinfo -f scalar_acc 73727702724Smrg then echo c32-convex-bsd 73827702724Smrg else echo c2-convex-bsd 73927702724Smrg fi 74027702724Smrg exit ;; 74127702724Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 74227702724Smrg echo c34-convex-bsd 74327702724Smrg exit ;; 74427702724Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 74527702724Smrg echo c38-convex-bsd 74627702724Smrg exit ;; 74727702724Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 74827702724Smrg echo c4-convex-bsd 74927702724Smrg exit ;; 75027702724Smrg CRAY*Y-MP:*:*:*) 75127702724Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 75227702724Smrg exit ;; 75327702724Smrg CRAY*[A-Z]90:*:*:*) 75427702724Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 75527702724Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 75627702724Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 75727702724Smrg -e 's/\.[^.]*$/.X/' 75827702724Smrg exit ;; 75927702724Smrg CRAY*TS:*:*:*) 76027702724Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 76127702724Smrg exit ;; 76227702724Smrg CRAY*T3E:*:*:*) 76327702724Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 76427702724Smrg exit ;; 76527702724Smrg CRAY*SV1:*:*:*) 76627702724Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 76727702724Smrg exit ;; 76827702724Smrg *:UNICOS/mp:*:*) 76927702724Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 77027702724Smrg exit ;; 77127702724Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 77227702724Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 77327702724Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 77427702724Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 77527702724Smrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 77627702724Smrg exit ;; 77727702724Smrg 5000:UNIX_System_V:4.*:*) 77827702724Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 77927702724Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 78027702724Smrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 78127702724Smrg exit ;; 78227702724Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 78327702724Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 78427702724Smrg exit ;; 78527702724Smrg sparc*:BSD/OS:*:*) 78627702724Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 78727702724Smrg exit ;; 78827702724Smrg *:BSD/OS:*:*) 78927702724Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 79027702724Smrg exit ;; 79127702724Smrg *:FreeBSD:*:*) 79227702724Smrg case ${UNAME_MACHINE} in 79327702724Smrg pc98) 79427702724Smrg echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 795e19dfac4Smrg amd64) 796e19dfac4Smrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 79727702724Smrg *) 79827702724Smrg echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 79927702724Smrg esac 80027702724Smrg exit ;; 80127702724Smrg i*:CYGWIN*:*) 80227702724Smrg echo ${UNAME_MACHINE}-pc-cygwin 80327702724Smrg exit ;; 804e19dfac4Smrg *:MINGW*:*) 80527702724Smrg echo ${UNAME_MACHINE}-pc-mingw32 80627702724Smrg exit ;; 80727702724Smrg i*:windows32*:*) 80827702724Smrg # uname -m includes "-pc" on this system. 80927702724Smrg echo ${UNAME_MACHINE}-mingw32 81027702724Smrg exit ;; 81127702724Smrg i*:PW*:*) 81227702724Smrg echo ${UNAME_MACHINE}-pc-pw32 81327702724Smrg exit ;; 81400084f2cSmrg *:Interix*:*) 815e19dfac4Smrg case ${UNAME_MACHINE} in 816e19dfac4Smrg x86) 817e19dfac4Smrg echo i586-pc-interix${UNAME_RELEASE} 818e19dfac4Smrg exit ;; 81900084f2cSmrg authenticamd | genuineintel | EM64T) 820e19dfac4Smrg echo x86_64-unknown-interix${UNAME_RELEASE} 821e19dfac4Smrg exit ;; 822e19dfac4Smrg IA64) 823e19dfac4Smrg echo ia64-unknown-interix${UNAME_RELEASE} 824e19dfac4Smrg exit ;; 825e19dfac4Smrg esac ;; 82627702724Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 82727702724Smrg echo i${UNAME_MACHINE}-pc-mks 82827702724Smrg exit ;; 82900084f2cSmrg 8664:Windows_NT:*) 83000084f2cSmrg echo x86_64-pc-mks 83100084f2cSmrg exit ;; 83227702724Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 83327702724Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 83427702724Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 83527702724Smrg # UNAME_MACHINE based on the output of uname instead of i386? 83627702724Smrg echo i586-pc-interix 83727702724Smrg exit ;; 83827702724Smrg i*:UWIN*:*) 83927702724Smrg echo ${UNAME_MACHINE}-pc-uwin 84027702724Smrg exit ;; 84127702724Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 84227702724Smrg echo x86_64-unknown-cygwin 84327702724Smrg exit ;; 84427702724Smrg p*:CYGWIN*:*) 84527702724Smrg echo powerpcle-unknown-cygwin 84627702724Smrg exit ;; 84727702724Smrg prep*:SunOS:5.*:*) 84827702724Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 84927702724Smrg exit ;; 85027702724Smrg *:GNU:*:*) 85127702724Smrg # the GNU system 85227702724Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 85327702724Smrg exit ;; 85427702724Smrg *:GNU/*:*:*) 85527702724Smrg # other systems with GNU libc and userland 85627702724Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 85727702724Smrg exit ;; 85827702724Smrg i*86:Minix:*:*) 85927702724Smrg echo ${UNAME_MACHINE}-pc-minix 86027702724Smrg exit ;; 86100084f2cSmrg alpha:Linux:*:*) 86200084f2cSmrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 86300084f2cSmrg EV5) UNAME_MACHINE=alphaev5 ;; 86400084f2cSmrg EV56) UNAME_MACHINE=alphaev56 ;; 86500084f2cSmrg PCA56) UNAME_MACHINE=alphapca56 ;; 86600084f2cSmrg PCA57) UNAME_MACHINE=alphapca56 ;; 86700084f2cSmrg EV6) UNAME_MACHINE=alphaev6 ;; 86800084f2cSmrg EV67) UNAME_MACHINE=alphaev67 ;; 86900084f2cSmrg EV68*) UNAME_MACHINE=alphaev68 ;; 87000084f2cSmrg esac 87100084f2cSmrg objdump --private-headers /bin/sh | grep -q ld.so.1 87200084f2cSmrg if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 87300084f2cSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 87400084f2cSmrg exit ;; 87527702724Smrg arm*:Linux:*:*) 876e19dfac4Smrg eval $set_cc_for_build 877e19dfac4Smrg if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 878e19dfac4Smrg | grep -q __ARM_EABI__ 879e19dfac4Smrg then 880e19dfac4Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 881e19dfac4Smrg else 882e19dfac4Smrg echo ${UNAME_MACHINE}-unknown-linux-gnueabi 883e19dfac4Smrg fi 884e19dfac4Smrg exit ;; 885e19dfac4Smrg avr32*:Linux:*:*) 88627702724Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 88727702724Smrg exit ;; 88827702724Smrg cris:Linux:*:*) 88927702724Smrg echo cris-axis-linux-gnu 89027702724Smrg exit ;; 89127702724Smrg crisv32:Linux:*:*) 89227702724Smrg echo crisv32-axis-linux-gnu 89327702724Smrg exit ;; 89427702724Smrg frv:Linux:*:*) 89527702724Smrg echo frv-unknown-linux-gnu 89627702724Smrg exit ;; 89700084f2cSmrg i*86:Linux:*:*) 89800084f2cSmrg LIBC=gnu 89900084f2cSmrg eval $set_cc_for_build 90000084f2cSmrg sed 's/^ //' << EOF >$dummy.c 90100084f2cSmrg #ifdef __dietlibc__ 90200084f2cSmrg LIBC=dietlibc 90300084f2cSmrg #endif 90400084f2cSmrgEOF 90500084f2cSmrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` 90600084f2cSmrg echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 90700084f2cSmrg exit ;; 90827702724Smrg ia64:Linux:*:*) 90927702724Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 91027702724Smrg exit ;; 91127702724Smrg m32r*:Linux:*:*) 91227702724Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 91327702724Smrg exit ;; 91427702724Smrg m68*:Linux:*:*) 91527702724Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 91627702724Smrg exit ;; 91700084f2cSmrg mips:Linux:*:* | mips64:Linux:*:*) 91827702724Smrg eval $set_cc_for_build 91927702724Smrg sed 's/^ //' << EOF >$dummy.c 92027702724Smrg #undef CPU 92100084f2cSmrg #undef ${UNAME_MACHINE} 92200084f2cSmrg #undef ${UNAME_MACHINE}el 92327702724Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 92400084f2cSmrg CPU=${UNAME_MACHINE}el 92527702724Smrg #else 92627702724Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 92700084f2cSmrg CPU=${UNAME_MACHINE} 92827702724Smrg #else 92927702724Smrg CPU= 93027702724Smrg #endif 93127702724Smrg #endif 93227702724SmrgEOF 93300084f2cSmrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 93427702724Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 93527702724Smrg ;; 93627702724Smrg or32:Linux:*:*) 93727702724Smrg echo or32-unknown-linux-gnu 93827702724Smrg exit ;; 93900084f2cSmrg padre:Linux:*:*) 94000084f2cSmrg echo sparc-unknown-linux-gnu 94127702724Smrg exit ;; 94200084f2cSmrg parisc64:Linux:*:* | hppa64:Linux:*:*) 94300084f2cSmrg echo hppa64-unknown-linux-gnu 94427702724Smrg exit ;; 94527702724Smrg parisc:Linux:*:* | hppa:Linux:*:*) 94627702724Smrg # Look for CPU level 94727702724Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 94827702724Smrg PA7*) echo hppa1.1-unknown-linux-gnu ;; 94927702724Smrg PA8*) echo hppa2.0-unknown-linux-gnu ;; 95027702724Smrg *) echo hppa-unknown-linux-gnu ;; 95127702724Smrg esac 95227702724Smrg exit ;; 95300084f2cSmrg ppc64:Linux:*:*) 95400084f2cSmrg echo powerpc64-unknown-linux-gnu 95500084f2cSmrg exit ;; 95600084f2cSmrg ppc:Linux:*:*) 95700084f2cSmrg echo powerpc-unknown-linux-gnu 95827702724Smrg exit ;; 95927702724Smrg s390:Linux:*:* | s390x:Linux:*:*) 96027702724Smrg echo ${UNAME_MACHINE}-ibm-linux 96127702724Smrg exit ;; 96227702724Smrg sh64*:Linux:*:*) 96327702724Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 96427702724Smrg exit ;; 96527702724Smrg sh*:Linux:*:*) 96627702724Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 96727702724Smrg exit ;; 96827702724Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 96927702724Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 97027702724Smrg exit ;; 97127702724Smrg vax:Linux:*:*) 97227702724Smrg echo ${UNAME_MACHINE}-dec-linux-gnu 97327702724Smrg exit ;; 97427702724Smrg x86_64:Linux:*:*) 97527702724Smrg echo x86_64-unknown-linux-gnu 97627702724Smrg exit ;; 977e19dfac4Smrg xtensa*:Linux:*:*) 978e19dfac4Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 979e19dfac4Smrg exit ;; 98027702724Smrg i*86:DYNIX/ptx:4*:*) 98127702724Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 98227702724Smrg # earlier versions are messed up and put the nodename in both 98327702724Smrg # sysname and nodename. 98427702724Smrg echo i386-sequent-sysv4 98527702724Smrg exit ;; 98627702724Smrg i*86:UNIX_SV:4.2MP:2.*) 98727702724Smrg # Unixware is an offshoot of SVR4, but it has its own version 98827702724Smrg # number series starting with 2... 98927702724Smrg # I am not positive that other SVR4 systems won't match this, 99027702724Smrg # I just have to hope. -- rms. 99127702724Smrg # Use sysv4.2uw... so that sysv4* matches it. 99227702724Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 99327702724Smrg exit ;; 99427702724Smrg i*86:OS/2:*:*) 99527702724Smrg # If we were able to find `uname', then EMX Unix compatibility 99627702724Smrg # is probably installed. 99727702724Smrg echo ${UNAME_MACHINE}-pc-os2-emx 99827702724Smrg exit ;; 99927702724Smrg i*86:XTS-300:*:STOP) 100027702724Smrg echo ${UNAME_MACHINE}-unknown-stop 100127702724Smrg exit ;; 100227702724Smrg i*86:atheos:*:*) 100327702724Smrg echo ${UNAME_MACHINE}-unknown-atheos 100427702724Smrg exit ;; 100527702724Smrg i*86:syllable:*:*) 100627702724Smrg echo ${UNAME_MACHINE}-pc-syllable 100727702724Smrg exit ;; 100800084f2cSmrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 100927702724Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 101027702724Smrg exit ;; 101127702724Smrg i*86:*DOS:*:*) 101227702724Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 101327702724Smrg exit ;; 101427702724Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 101527702724Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 101627702724Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 101727702724Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 101827702724Smrg else 101927702724Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 102027702724Smrg fi 102127702724Smrg exit ;; 102227702724Smrg i*86:*:5:[678]*) 102327702724Smrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 102427702724Smrg case `/bin/uname -X | grep "^Machine"` in 102527702724Smrg *486*) UNAME_MACHINE=i486 ;; 102627702724Smrg *Pentium) UNAME_MACHINE=i586 ;; 102727702724Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 102827702724Smrg esac 102927702724Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 103027702724Smrg exit ;; 103127702724Smrg i*86:*:3.2:*) 103227702724Smrg if test -f /usr/options/cb.name; then 103327702724Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 103427702724Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 103527702724Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 103627702724Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 103727702724Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 103827702724Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 103927702724Smrg && UNAME_MACHINE=i586 104027702724Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 104127702724Smrg && UNAME_MACHINE=i686 104227702724Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 104327702724Smrg && UNAME_MACHINE=i686 104427702724Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 104527702724Smrg else 104627702724Smrg echo ${UNAME_MACHINE}-pc-sysv32 104727702724Smrg fi 104827702724Smrg exit ;; 104927702724Smrg pc:*:*:*) 105027702724Smrg # Left here for compatibility: 105127702724Smrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 105200084f2cSmrg # the processor, so we play safe by assuming i586. 105300084f2cSmrg # Note: whatever this is, it MUST be the same as what config.sub 105400084f2cSmrg # prints for the "djgpp" host, or else GDB configury will decide that 105500084f2cSmrg # this is a cross-build. 105600084f2cSmrg echo i586-pc-msdosdjgpp 105727702724Smrg exit ;; 105827702724Smrg Intel:Mach:3*:*) 105927702724Smrg echo i386-pc-mach3 106027702724Smrg exit ;; 106127702724Smrg paragon:*:*:*) 106227702724Smrg echo i860-intel-osf1 106327702724Smrg exit ;; 106427702724Smrg i860:*:4.*:*) # i860-SVR4 106527702724Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 106627702724Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 106727702724Smrg else # Add other i860-SVR4 vendors below as they are discovered. 106827702724Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 106927702724Smrg fi 107027702724Smrg exit ;; 107127702724Smrg mini*:CTIX:SYS*5:*) 107227702724Smrg # "miniframe" 107327702724Smrg echo m68010-convergent-sysv 107427702724Smrg exit ;; 107527702724Smrg mc68k:UNIX:SYSTEM5:3.51m) 107627702724Smrg echo m68k-convergent-sysv 107727702724Smrg exit ;; 107827702724Smrg M680?0:D-NIX:5.3:*) 107927702724Smrg echo m68k-diab-dnix 108027702724Smrg exit ;; 108127702724Smrg M68*:*:R3V[5678]*:*) 108227702724Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 108327702724Smrg 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) 108427702724Smrg OS_REL='' 108527702724Smrg test -r /etc/.relid \ 108627702724Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 108727702724Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 108827702724Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 108927702724Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 109027702724Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 109127702724Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 109227702724Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 109327702724Smrg && { echo i486-ncr-sysv4; exit; } ;; 109400084f2cSmrg NCR*:*:4.2:* | MPRAS*:*:4.2:*) 109500084f2cSmrg OS_REL='.3' 109600084f2cSmrg test -r /etc/.relid \ 109700084f2cSmrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 109800084f2cSmrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 109900084f2cSmrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 110000084f2cSmrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 110100084f2cSmrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 110200084f2cSmrg /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 110300084f2cSmrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 110427702724Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 110527702724Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 110627702724Smrg exit ;; 110727702724Smrg mc68030:UNIX_System_V:4.*:*) 110827702724Smrg echo m68k-atari-sysv4 110927702724Smrg exit ;; 111027702724Smrg TSUNAMI:LynxOS:2.*:*) 111127702724Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 111227702724Smrg exit ;; 111327702724Smrg rs6000:LynxOS:2.*:*) 111427702724Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 111527702724Smrg exit ;; 111600084f2cSmrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 111727702724Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 111827702724Smrg exit ;; 111927702724Smrg SM[BE]S:UNIX_SV:*:*) 112027702724Smrg echo mips-dde-sysv${UNAME_RELEASE} 112127702724Smrg exit ;; 112227702724Smrg RM*:ReliantUNIX-*:*:*) 112327702724Smrg echo mips-sni-sysv4 112427702724Smrg exit ;; 112527702724Smrg RM*:SINIX-*:*:*) 112627702724Smrg echo mips-sni-sysv4 112727702724Smrg exit ;; 112827702724Smrg *:SINIX-*:*:*) 112927702724Smrg if uname -p 2>/dev/null >/dev/null ; then 113027702724Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 113127702724Smrg echo ${UNAME_MACHINE}-sni-sysv4 113227702724Smrg else 113327702724Smrg echo ns32k-sni-sysv 113427702724Smrg fi 113527702724Smrg exit ;; 113627702724Smrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 113727702724Smrg # says <Richard.M.Bartel@ccMail.Census.GOV> 113827702724Smrg echo i586-unisys-sysv4 113927702724Smrg exit ;; 114027702724Smrg *:UNIX_System_V:4*:FTX*) 114127702724Smrg # From Gerald Hewes <hewes@openmarket.com>. 114227702724Smrg # How about differentiating between stratus architectures? -djm 114327702724Smrg echo hppa1.1-stratus-sysv4 114427702724Smrg exit ;; 114527702724Smrg *:*:*:FTX*) 114627702724Smrg # From seanf@swdc.stratus.com. 114727702724Smrg echo i860-stratus-sysv4 114827702724Smrg exit ;; 114927702724Smrg i*86:VOS:*:*) 115027702724Smrg # From Paul.Green@stratus.com. 115127702724Smrg echo ${UNAME_MACHINE}-stratus-vos 115227702724Smrg exit ;; 115327702724Smrg *:VOS:*:*) 115427702724Smrg # From Paul.Green@stratus.com. 115527702724Smrg echo hppa1.1-stratus-vos 115627702724Smrg exit ;; 115727702724Smrg mc68*:A/UX:*:*) 115827702724Smrg echo m68k-apple-aux${UNAME_RELEASE} 115927702724Smrg exit ;; 116027702724Smrg news*:NEWS-OS:6*:*) 116127702724Smrg echo mips-sony-newsos6 116227702724Smrg exit ;; 116327702724Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 116427702724Smrg if [ -d /usr/nec ]; then 116527702724Smrg echo mips-nec-sysv${UNAME_RELEASE} 116627702724Smrg else 116727702724Smrg echo mips-unknown-sysv${UNAME_RELEASE} 116827702724Smrg fi 116927702724Smrg exit ;; 117027702724Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 117127702724Smrg echo powerpc-be-beos 117227702724Smrg exit ;; 117327702724Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 117427702724Smrg echo powerpc-apple-beos 117527702724Smrg exit ;; 117627702724Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 117727702724Smrg echo i586-pc-beos 117827702724Smrg exit ;; 117900084f2cSmrg BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 118000084f2cSmrg echo i586-pc-haiku 118100084f2cSmrg exit ;; 118227702724Smrg SX-4:SUPER-UX:*:*) 118327702724Smrg echo sx4-nec-superux${UNAME_RELEASE} 118427702724Smrg exit ;; 118527702724Smrg SX-5:SUPER-UX:*:*) 118627702724Smrg echo sx5-nec-superux${UNAME_RELEASE} 118727702724Smrg exit ;; 118827702724Smrg SX-6:SUPER-UX:*:*) 118927702724Smrg echo sx6-nec-superux${UNAME_RELEASE} 119027702724Smrg exit ;; 1191e19dfac4Smrg SX-7:SUPER-UX:*:*) 1192e19dfac4Smrg echo sx7-nec-superux${UNAME_RELEASE} 1193e19dfac4Smrg exit ;; 1194e19dfac4Smrg SX-8:SUPER-UX:*:*) 1195e19dfac4Smrg echo sx8-nec-superux${UNAME_RELEASE} 1196e19dfac4Smrg exit ;; 1197e19dfac4Smrg SX-8R:SUPER-UX:*:*) 1198e19dfac4Smrg echo sx8r-nec-superux${UNAME_RELEASE} 1199e19dfac4Smrg exit ;; 120027702724Smrg Power*:Rhapsody:*:*) 120127702724Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 120227702724Smrg exit ;; 120327702724Smrg *:Rhapsody:*:*) 120427702724Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 120527702724Smrg exit ;; 120627702724Smrg *:Darwin:*:*) 120727702724Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 120827702724Smrg case $UNAME_PROCESSOR in 120900084f2cSmrg i386) 121000084f2cSmrg eval $set_cc_for_build 121100084f2cSmrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 121200084f2cSmrg if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 121300084f2cSmrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 121400084f2cSmrg grep IS_64BIT_ARCH >/dev/null 121500084f2cSmrg then 121600084f2cSmrg UNAME_PROCESSOR="x86_64" 121700084f2cSmrg fi 121800084f2cSmrg fi ;; 121927702724Smrg unknown) UNAME_PROCESSOR=powerpc ;; 122027702724Smrg esac 122127702724Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 122227702724Smrg exit ;; 122327702724Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 122427702724Smrg UNAME_PROCESSOR=`uname -p` 122527702724Smrg if test "$UNAME_PROCESSOR" = "x86"; then 122627702724Smrg UNAME_PROCESSOR=i386 122727702724Smrg UNAME_MACHINE=pc 122827702724Smrg fi 122927702724Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 123027702724Smrg exit ;; 123127702724Smrg *:QNX:*:4*) 123227702724Smrg echo i386-pc-qnx 123327702724Smrg exit ;; 123427702724Smrg NSE-?:NONSTOP_KERNEL:*:*) 123527702724Smrg echo nse-tandem-nsk${UNAME_RELEASE} 123627702724Smrg exit ;; 123727702724Smrg NSR-?:NONSTOP_KERNEL:*:*) 123827702724Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 123927702724Smrg exit ;; 124027702724Smrg *:NonStop-UX:*:*) 124127702724Smrg echo mips-compaq-nonstopux 124227702724Smrg exit ;; 124327702724Smrg BS2000:POSIX*:*:*) 124427702724Smrg echo bs2000-siemens-sysv 124527702724Smrg exit ;; 124627702724Smrg DS/*:UNIX_System_V:*:*) 124727702724Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 124827702724Smrg exit ;; 124927702724Smrg *:Plan9:*:*) 125027702724Smrg # "uname -m" is not consistent, so use $cputype instead. 386 125127702724Smrg # is converted to i386 for consistency with other x86 125227702724Smrg # operating systems. 125327702724Smrg if test "$cputype" = "386"; then 125427702724Smrg UNAME_MACHINE=i386 125527702724Smrg else 125627702724Smrg UNAME_MACHINE="$cputype" 125727702724Smrg fi 125827702724Smrg echo ${UNAME_MACHINE}-unknown-plan9 125927702724Smrg exit ;; 126027702724Smrg *:TOPS-10:*:*) 126127702724Smrg echo pdp10-unknown-tops10 126227702724Smrg exit ;; 126327702724Smrg *:TENEX:*:*) 126427702724Smrg echo pdp10-unknown-tenex 126527702724Smrg exit ;; 126627702724Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 126727702724Smrg echo pdp10-dec-tops20 126827702724Smrg exit ;; 126927702724Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 127027702724Smrg echo pdp10-xkl-tops20 127127702724Smrg exit ;; 127227702724Smrg *:TOPS-20:*:*) 127327702724Smrg echo pdp10-unknown-tops20 127427702724Smrg exit ;; 127527702724Smrg *:ITS:*:*) 127627702724Smrg echo pdp10-unknown-its 127727702724Smrg exit ;; 127827702724Smrg SEI:*:*:SEIUX) 127927702724Smrg echo mips-sei-seiux${UNAME_RELEASE} 128027702724Smrg exit ;; 128127702724Smrg *:DragonFly:*:*) 128227702724Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 128327702724Smrg exit ;; 128427702724Smrg *:*VMS:*:*) 128527702724Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 128627702724Smrg case "${UNAME_MACHINE}" in 128727702724Smrg A*) echo alpha-dec-vms ; exit ;; 128827702724Smrg I*) echo ia64-dec-vms ; exit ;; 128927702724Smrg V*) echo vax-dec-vms ; exit ;; 129027702724Smrg esac ;; 129127702724Smrg *:XENIX:*:SysV) 129227702724Smrg echo i386-pc-xenix 129327702724Smrg exit ;; 129427702724Smrg i*86:skyos:*:*) 129527702724Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 129627702724Smrg exit ;; 129727702724Smrg i*86:rdos:*:*) 129827702724Smrg echo ${UNAME_MACHINE}-pc-rdos 129927702724Smrg exit ;; 130000084f2cSmrg i*86:AROS:*:*) 130100084f2cSmrg echo ${UNAME_MACHINE}-pc-aros 130200084f2cSmrg exit ;; 130327702724Smrgesac 130427702724Smrg 130527702724Smrg#echo '(No uname command or uname output not recognized.)' 1>&2 130627702724Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 130727702724Smrg 130827702724Smrgeval $set_cc_for_build 130927702724Smrgcat >$dummy.c <<EOF 131027702724Smrg#ifdef _SEQUENT_ 131127702724Smrg# include <sys/types.h> 131227702724Smrg# include <sys/utsname.h> 131327702724Smrg#endif 131427702724Smrgmain () 131527702724Smrg{ 131627702724Smrg#if defined (sony) 131727702724Smrg#if defined (MIPSEB) 131827702724Smrg /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 131927702724Smrg I don't know.... */ 132027702724Smrg printf ("mips-sony-bsd\n"); exit (0); 132127702724Smrg#else 132227702724Smrg#include <sys/param.h> 132327702724Smrg printf ("m68k-sony-newsos%s\n", 132427702724Smrg#ifdef NEWSOS4 132527702724Smrg "4" 132627702724Smrg#else 132727702724Smrg "" 132827702724Smrg#endif 132927702724Smrg ); exit (0); 133027702724Smrg#endif 133127702724Smrg#endif 133227702724Smrg 133327702724Smrg#if defined (__arm) && defined (__acorn) && defined (__unix) 133427702724Smrg printf ("arm-acorn-riscix\n"); exit (0); 133527702724Smrg#endif 133627702724Smrg 133727702724Smrg#if defined (hp300) && !defined (hpux) 133827702724Smrg printf ("m68k-hp-bsd\n"); exit (0); 133927702724Smrg#endif 134027702724Smrg 134127702724Smrg#if defined (NeXT) 134227702724Smrg#if !defined (__ARCHITECTURE__) 134327702724Smrg#define __ARCHITECTURE__ "m68k" 134427702724Smrg#endif 134527702724Smrg int version; 134627702724Smrg version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 134727702724Smrg if (version < 4) 134827702724Smrg printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 134927702724Smrg else 135027702724Smrg printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 135127702724Smrg exit (0); 135227702724Smrg#endif 135327702724Smrg 135427702724Smrg#if defined (MULTIMAX) || defined (n16) 135527702724Smrg#if defined (UMAXV) 135627702724Smrg printf ("ns32k-encore-sysv\n"); exit (0); 135727702724Smrg#else 135827702724Smrg#if defined (CMU) 135927702724Smrg printf ("ns32k-encore-mach\n"); exit (0); 136027702724Smrg#else 136127702724Smrg printf ("ns32k-encore-bsd\n"); exit (0); 136227702724Smrg#endif 136327702724Smrg#endif 136427702724Smrg#endif 136527702724Smrg 136627702724Smrg#if defined (__386BSD__) 136727702724Smrg printf ("i386-pc-bsd\n"); exit (0); 136827702724Smrg#endif 136927702724Smrg 137027702724Smrg#if defined (sequent) 137127702724Smrg#if defined (i386) 137227702724Smrg printf ("i386-sequent-dynix\n"); exit (0); 137327702724Smrg#endif 137427702724Smrg#if defined (ns32000) 137527702724Smrg printf ("ns32k-sequent-dynix\n"); exit (0); 137627702724Smrg#endif 137727702724Smrg#endif 137827702724Smrg 137927702724Smrg#if defined (_SEQUENT_) 138027702724Smrg struct utsname un; 138127702724Smrg 138227702724Smrg uname(&un); 138327702724Smrg 138427702724Smrg if (strncmp(un.version, "V2", 2) == 0) { 138527702724Smrg printf ("i386-sequent-ptx2\n"); exit (0); 138627702724Smrg } 138727702724Smrg if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 138827702724Smrg printf ("i386-sequent-ptx1\n"); exit (0); 138927702724Smrg } 139027702724Smrg printf ("i386-sequent-ptx\n"); exit (0); 139127702724Smrg 139227702724Smrg#endif 139327702724Smrg 139427702724Smrg#if defined (vax) 139527702724Smrg# if !defined (ultrix) 139627702724Smrg# include <sys/param.h> 139727702724Smrg# if defined (BSD) 139827702724Smrg# if BSD == 43 139927702724Smrg printf ("vax-dec-bsd4.3\n"); exit (0); 140027702724Smrg# else 140127702724Smrg# if BSD == 199006 140227702724Smrg printf ("vax-dec-bsd4.3reno\n"); exit (0); 140327702724Smrg# else 140427702724Smrg printf ("vax-dec-bsd\n"); exit (0); 140527702724Smrg# endif 140627702724Smrg# endif 140727702724Smrg# else 140827702724Smrg printf ("vax-dec-bsd\n"); exit (0); 140927702724Smrg# endif 141027702724Smrg# else 141127702724Smrg printf ("vax-dec-ultrix\n"); exit (0); 141227702724Smrg# endif 141327702724Smrg#endif 141427702724Smrg 141527702724Smrg#if defined (alliant) && defined (i860) 141627702724Smrg printf ("i860-alliant-bsd\n"); exit (0); 141727702724Smrg#endif 141827702724Smrg 141927702724Smrg exit (1); 142027702724Smrg} 142127702724SmrgEOF 142227702724Smrg 142327702724Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 142427702724Smrg { echo "$SYSTEM_NAME"; exit; } 142527702724Smrg 142627702724Smrg# Apollos put the system type in the environment. 142727702724Smrg 142827702724Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 142927702724Smrg 143027702724Smrg# Convex versions that predate uname can use getsysinfo(1) 143127702724Smrg 143227702724Smrgif [ -x /usr/convex/getsysinfo ] 143327702724Smrgthen 143427702724Smrg case `getsysinfo -f cpu_type` in 143527702724Smrg c1*) 143627702724Smrg echo c1-convex-bsd 143727702724Smrg exit ;; 143827702724Smrg c2*) 143927702724Smrg if getsysinfo -f scalar_acc 144027702724Smrg then echo c32-convex-bsd 144127702724Smrg else echo c2-convex-bsd 144227702724Smrg fi 144327702724Smrg exit ;; 144427702724Smrg c34*) 144527702724Smrg echo c34-convex-bsd 144627702724Smrg exit ;; 144727702724Smrg c38*) 144827702724Smrg echo c38-convex-bsd 144927702724Smrg exit ;; 145027702724Smrg c4*) 145127702724Smrg echo c4-convex-bsd 145227702724Smrg exit ;; 145327702724Smrg esac 145427702724Smrgfi 145527702724Smrg 145627702724Smrgcat >&2 <<EOF 145727702724Smrg$0: unable to guess system type 145827702724Smrg 145927702724SmrgThis script, last modified $timestamp, has failed to recognize 146027702724Smrgthe operating system you are using. It is advised that you 146127702724Smrgdownload the most up to date version of the config scripts from 146227702724Smrg 1463e19dfac4Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 146427702724Smrgand 1465e19dfac4Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 146627702724Smrg 146727702724SmrgIf the version you run ($0) is already up to date, please 146827702724Smrgsend the following data and any information you think might be 146927702724Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 147027702724Smrginformation to handle your system. 147127702724Smrg 147227702724Smrgconfig.guess timestamp = $timestamp 147327702724Smrg 147427702724Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 147527702724Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 147627702724Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 147727702724Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 147827702724Smrg 147927702724Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 148027702724Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 148127702724Smrg 148227702724Smrghostinfo = `(hostinfo) 2>/dev/null` 148327702724Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 148427702724Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 148527702724Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 148627702724Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 148727702724Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 148827702724Smrg 148927702724SmrgUNAME_MACHINE = ${UNAME_MACHINE} 149027702724SmrgUNAME_RELEASE = ${UNAME_RELEASE} 149127702724SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 149227702724SmrgUNAME_VERSION = ${UNAME_VERSION} 149327702724SmrgEOF 149427702724Smrg 149527702724Smrgexit 1 149627702724Smrg 149727702724Smrg# Local variables: 149827702724Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 149927702724Smrg# time-stamp-start: "timestamp='" 150027702724Smrg# time-stamp-format: "%:y-%02m-%02d" 150127702724Smrg# time-stamp-end: "'" 150227702724Smrg# End: 1503