config.guess revision 225736
1250226Sjkim#! /bin/sh 295060Sjmallett# Attempt to guess a canonical system name. 395060Sjmallett# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 41590Srgrimes# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 51590Srgrimes# Free Software Foundation, Inc. 61590Srgrimes 71590Srgrimestimestamp='2009-12-30' 81590Srgrimes 91590Srgrimes# This file is free software; you can redistribute it and/or modify it 101590Srgrimes# under the terms of the GNU General Public License as published by 111590Srgrimes# the Free Software Foundation; either version 2 of the License, or 121590Srgrimes# (at your option) any later version. 131590Srgrimes# 141590Srgrimes# This program is distributed in the hope that it will be useful, but 151590Srgrimes# WITHOUT ANY WARRANTY; without even the implied warranty of 161590Srgrimes# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 171590Srgrimes# General Public License for more details. 181590Srgrimes# 19228063Sbapt# You should have received a copy of the GNU General Public License 201590Srgrimes# along with this program; if not, write to the Free Software 211590Srgrimes# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 221590Srgrimes# 02110-1301, USA. 231590Srgrimes# 241590Srgrimes# As a special exception to the GNU General Public License, if you 251590Srgrimes# distribute this file as part of a program that contains a 261590Srgrimes# configuration script generated by Autoconf, you may include it under 271590Srgrimes# the same distribution terms that you use for the rest of that program. 281590Srgrimes 291590Srgrimes 301590Srgrimes# Originally written by Per Bothner. Please send patches (context 311590Srgrimes# diff format) to <config-patches@gnu.org> and include a ChangeLog 321590Srgrimes# entry. 331590Srgrimes# 341590Srgrimes# This script attempts to guess a canonical system name similar to 351590Srgrimes# config.sub. If it succeeds, it prints the system name on stdout, and 3695060Sjmallett# exits with 0. Otherwise, it exits with 1. 3795060Sjmallett# 381590Srgrimes# You can get the latest version of this script from: 39228063Sbapt# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 401590Srgrimes 411590Srgrimesme=`echo "$0" | sed -e 's,.*/,,'` 421590Srgrimes 431590Srgrimesusage="\ 441590SrgrimesUsage: $0 [OPTION] 451590Srgrimes 461590SrgrimesOutput the configuration name of the system \`$me' is run on. 47228063Sbapt 4895060SjmallettOperation modes: 49228063Sbapt -h, --help print this help, then exit 5095060Sjmallett -t, --time-stamp print date of last modification, then exit 51228063Sbapt -v, --version print version number, then exit 521590Srgrimes 531590SrgrimesReport bugs and patches to <config-patches@gnu.org>." 5495060Sjmallett 551590Srgrimesversion="\ 5695060SjmallettGNU config.guess ($timestamp) 571590Srgrimes 581590SrgrimesOriginally written by Per Bothner. 591590SrgrimesCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 601590Srgrimes2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 611590SrgrimesSoftware Foundation, Inc. 6295060Sjmallett 6395060SjmallettThis is free software; see the source for copying conditions. There is NO 6495060Sjmallettwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 6595060Sjmallett 6695060Sjmalletthelp=" 6795060SjmallettTry \`$me --help' for more information." 6895060Sjmallett 6995060Sjmallett# Parse command line 7095060Sjmallettwhile test $# -gt 0 ; do 71228063Sbapt case $1 in 7295060Sjmallett --time-stamp | --time* | -t ) 7395060Sjmallett echo "$timestamp" ; exit ;; 7495060Sjmallett --version | -v ) 7595060Sjmallett echo "$version" ; exit ;; 7695060Sjmallett --help | --h* | -h ) 7795060Sjmallett echo "$usage"; exit ;; 7895060Sjmallett -- ) # Stop option processing 79228063Sbapt shift; break ;; 8095060Sjmallett - ) # Use stdin as input. 8195060Sjmallett break ;; 8295060Sjmallett -* ) 831590Srgrimes echo "$me: invalid option $1$help" >&2 8495060Sjmallett exit 1 ;; 851590Srgrimes * ) 861590Srgrimes break ;; 871590Srgrimes esac 88228063Sbaptdone 891590Srgrimes 901590Srgrimesif test $# != 0; then 911590Srgrimes echo "$me: too many arguments$help" >&2 921590Srgrimes exit 1 931590Srgrimesfi 941590Srgrimes 9595060Sjmalletttrap 'exit 1' 1 2 15 961590Srgrimes 971590Srgrimes# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 981590Srgrimes# compiler to aid in system detection is discouraged as it requires 9995060Sjmallett# temporary files to be created and, as you can see below, it is a 10095060Sjmallett# headache to deal with in a portable fashion. 1011590Srgrimes 1021590Srgrimes# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 103228063Sbapt# use `HOST_CC' if defined, but it is deprecated. 1041590Srgrimes 105228063Sbapt# Portable tmp directory creation inspired by the Autoconf team. 10695060Sjmallett 10795060Sjmallettset_cc_for_build=' 108100014Sjmalletttrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 109228063Sbapttrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 110228063Sbapt: ${TMPDIR=/tmp} ; 11195060Sjmallett { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 11295060Sjmallett { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 11395060Sjmallett { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 11495060Sjmallett { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 11595060Sjmallettdummy=$tmp/dummy ; 116228063Sbapttmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 11795060Sjmallettcase $CC_FOR_BUILD,$HOST_CC,$CC in 11895060Sjmallett ,,) echo "int x;" > $dummy.c ; 11995060Sjmallett for c in cc gcc c89 c99 ; do 12095060Sjmallett if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 12195060Sjmallett CC_FOR_BUILD="$c"; break ; 12295060Sjmallett fi ; 12395060Sjmallett done ; 12495887Sjmallett if test x"$CC_FOR_BUILD" = x ; then 12595060Sjmallett CC_FOR_BUILD=no_compiler_found ; 12695060Sjmallett fi 12795060Sjmallett ;; 1281590Srgrimes ,,*) CC_FOR_BUILD=$CC ;; 1291590Srgrimes ,*,*) CC_FOR_BUILD=$HOST_CC ;; 1301590Srgrimesesac ; set_cc_for_build= ;' 1311590Srgrimes 1321590Srgrimes# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 1331590Srgrimes# (ghazi@noc.rutgers.edu 1994-08-24) 13495060Sjmallettif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 1351590Srgrimes PATH=$PATH:/.attbin ; export PATH 13695060Sjmallettfi 1371590Srgrimes 1381590SrgrimesUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 1391590SrgrimesUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 1401590SrgrimesUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 1411590SrgrimesUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 142228063Sbapt 143228063Sbapt# Note: order is significant - the case branches are not exclusive. 144228063Sbapt 145228063Sbaptcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 14695060Sjmallett *:NetBSD:*:*) 147228063Sbapt # NetBSD (nbsd) targets should (where applicable) match one or 1481590Srgrimes # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 1491590Srgrimes # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 15095060Sjmallett # switched to ELF, *-*-netbsd* would select the old 1511590Srgrimes # object file format. This provides both forward 1521590Srgrimes # compatibility and a consistent mechanism for selecting the 1531590Srgrimes # object file format. 1541590Srgrimes # 1551590Srgrimes # Note: NetBSD doesn't particularly care about the vendor 1561590Srgrimes # portion of the name. We always set it to "unknown". 1571590Srgrimes sysctl="sysctl -n hw.machine_arch" 1581590Srgrimes UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 1591590Srgrimes /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 1601590Srgrimes case "${UNAME_MACHINE_ARCH}" in 1611590Srgrimes armeb) machine=armeb-unknown ;; 1621590Srgrimes arm*) machine=arm-unknown ;; 1631590Srgrimes sh3el) machine=shl-unknown ;; 1641590Srgrimes sh3eb) machine=sh-unknown ;; 1651590Srgrimes sh5el) machine=sh5le-unknown ;; 16695060Sjmallett *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 16795060Sjmallett esac 16895060Sjmallett # The Operating System including object format, if it has switched 16995060Sjmallett # to ELF recently, or will in the future. 17095060Sjmallett case "${UNAME_MACHINE_ARCH}" in 17195060Sjmallett arm*|i386|m68k|ns32k|sh3*|sparc|vax) 17295060Sjmallett eval $set_cc_for_build 17395060Sjmallett if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 1741590Srgrimes | grep -q __ELF__ 1751590Srgrimes then 1761590Srgrimes # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 1771590Srgrimes # Return netbsd for either. FIX? 1781590Srgrimes os=netbsd 179228063Sbapt else 180228063Sbapt os=netbsdelf 181228063Sbapt fi 182228063Sbapt ;; 183228063Sbapt *) 184228063Sbapt os=netbsd 185228063Sbapt ;; 186228063Sbapt esac 187228063Sbapt # The OS release 188228063Sbapt # Debian GNU/NetBSD machines have a different userland, and 189228063Sbapt # thus, need a distinct triplet. However, they do not need 190228063Sbapt # kernel version information, so it can be replaced with a 191228063Sbapt # suitable tag, in the style of linux-gnu. 192228063Sbapt case "${UNAME_VERSION}" in 193228063Sbapt Debian*) 194228063Sbapt release='-gnu' 195228063Sbapt ;; 1961590Srgrimes *) 197228063Sbapt release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 1981590Srgrimes ;; 199228063Sbapt esac 2001590Srgrimes # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 2011590Srgrimes # contains redundant information, the shorter form: 2021590Srgrimes # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 2031590Srgrimes echo "${machine}-${os}${release}" 2041590Srgrimes exit ;; 2051590Srgrimes *:OpenBSD:*:*) 2061590Srgrimes UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 2071590Srgrimes echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 2081590Srgrimes exit ;; 2091590Srgrimes *:ekkoBSD:*:*) 2101590Srgrimes echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 2111590Srgrimes exit ;; 2121590Srgrimes *:SolidBSD:*:*) 213228063Sbapt echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 2141590Srgrimes exit ;; 2151590Srgrimes macppc:MirBSD:*:*) 2161590Srgrimes echo powerpc-unknown-mirbsd${UNAME_RELEASE} 2171590Srgrimes exit ;; 2181590Srgrimes *:MirBSD:*:*) 2191590Srgrimes echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 2201590Srgrimes exit ;; 2211590Srgrimes alpha:OSF1:*:*) 2221590Srgrimes case $UNAME_RELEASE in 2231590Srgrimes *4.0) 2241590Srgrimes UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 22577378Sgshapiro ;; 2261590Srgrimes *5.*) 2271590Srgrimes UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 2281590Srgrimes ;; 2291590Srgrimes esac 2301590Srgrimes # According to Compaq, /usr/sbin/psrinfo has been available on 2311590Srgrimes # OSF/1 and Tru64 systems produced since 1995. I hope that 2321590Srgrimes # covers most systems running today. This code pipes the CPU 2331590Srgrimes # types through head -n 1, so we only detect the type of CPU 0. 2341590Srgrimes ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 2351590Srgrimes case "$ALPHA_CPU_TYPE" in 2361590Srgrimes "EV4 (21064)") 2371590Srgrimes UNAME_MACHINE="alpha" ;; 2381590Srgrimes "EV4.5 (21064)") 2391590Srgrimes UNAME_MACHINE="alpha" ;; 2401590Srgrimes "LCA4 (21066/21068)") 2411590Srgrimes UNAME_MACHINE="alpha" ;; 2421590Srgrimes "EV5 (21164)") 2431590Srgrimes UNAME_MACHINE="alphaev5" ;; 2441590Srgrimes "EV5.6 (21164A)") 2451590Srgrimes UNAME_MACHINE="alphaev56" ;; 2461590Srgrimes "EV5.6 (21164PC)") 2471590Srgrimes UNAME_MACHINE="alphapca56" ;; 2481590Srgrimes "EV5.7 (21164PC)") 2498874Srgrimes UNAME_MACHINE="alphapca57" ;; 250114368Stjr "EV6 (21264)") 251228063Sbapt UNAME_MACHINE="alphaev6" ;; 2521590Srgrimes "EV6.7 (21264A)") 253114368Stjr UNAME_MACHINE="alphaev67" ;; 2541590Srgrimes "EV6.8CB (21264C)") 2551590Srgrimes UNAME_MACHINE="alphaev68" ;; 2561590Srgrimes "EV6.8AL (21264B)") 2571590Srgrimes UNAME_MACHINE="alphaev68" ;; 2581590Srgrimes "EV6.8CX (21264D)") 2591590Srgrimes UNAME_MACHINE="alphaev68" ;; 260100014Sjmallett "EV6.9A (21264/EV69A)") 2611590Srgrimes UNAME_MACHINE="alphaev69" ;; 2621590Srgrimes "EV7 (21364)") 2631590Srgrimes UNAME_MACHINE="alphaev7" ;; 2641590Srgrimes "EV7.9 (21364A)") 26595060Sjmallett UNAME_MACHINE="alphaev79" ;; 26695060Sjmallett esac 26795060Sjmallett # A Pn.n version is a patched version. 268228063Sbapt # A Vn.n version is a released version. 2691590Srgrimes # A Tn.n version is a released field test version. 2701590Srgrimes # A Xn.n version is an unreleased experimental baselevel. 271228701Sbz # 1.2 uses "1.2" for uname -r. 272234310Sbapt echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 273228697Sbapt exit ;; 274228697Sbapt Alpha\ *:Windows_NT*:*) 275234310Sbapt # How do we know it's Interix rather than the generic POSIX subsystem? 276234310Sbapt # Should we change UNAME_MACHINE based on the output of uname instead 277228697Sbapt # of the specific Alpha model? 278228697Sbapt echo alpha-pc-interix 279228701Sbz exit ;; 2801590Srgrimes 21064:Windows_NT:50:3) 2811590Srgrimes echo alpha-dec-winnt3.5 2821590Srgrimes exit ;; 2831590Srgrimes Amiga*:UNIX_System_V:4.0:*) 2841590Srgrimes echo m68k-unknown-sysv4 2851590Srgrimes exit ;; 2861590Srgrimes *:[Aa]miga[Oo][Ss]:*:*) 2871590Srgrimes echo ${UNAME_MACHINE}-unknown-amigaos 2881590Srgrimes exit ;; 2891590Srgrimes *:[Mm]orph[Oo][Ss]:*:*) 290228063Sbapt echo ${UNAME_MACHINE}-unknown-morphos 29195060Sjmallett exit ;; 2921590Srgrimes *:OS/390:*:*) 2931590Srgrimes echo i370-ibm-openedition 2941590Srgrimes exit ;; 2951590Srgrimes *:z/VM:*:*) 2961590Srgrimes echo s390-ibm-zvmoe 2971590Srgrimes exit ;; 298228063Sbapt *:OS400:*:*) 299228063Sbapt echo powerpc-ibm-os400 300228063Sbapt exit ;; 3011590Srgrimes arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 3021590Srgrimes echo arm-acorn-riscix${UNAME_RELEASE} 303228063Sbapt exit ;; 3041590Srgrimes arm:riscos:*:*|arm:RISCOS:*:*) 3051590Srgrimes echo arm-unknown-riscos 3061590Srgrimes exit ;; 307228063Sbapt SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 3081590Srgrimes echo hppa1.1-hitachi-hiuxmpp 3091590Srgrimes exit ;; 3101590Srgrimes Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 3111590Srgrimes # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 3121590Srgrimes if test "`(/bin/universe) 2>/dev/null`" = att ; then 313100014Sjmallett echo pyramid-pyramid-sysv3 3141590Srgrimes else 3151590Srgrimes echo pyramid-pyramid-bsd 3161590Srgrimes fi 3171590Srgrimes exit ;; 3181590Srgrimes NILE*:*:*:dcosx) 3191590Srgrimes echo pyramid-pyramid-svr4 3201590Srgrimes exit ;; 3211590Srgrimes DRS?6000:unix:4.0:6*) 3221590Srgrimes echo sparc-icl-nx6 3231590Srgrimes exit ;; 3241590Srgrimes DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 3251590Srgrimes case `/usr/bin/uname -p` in 3261590Srgrimes sparc) echo sparc-icl-nx7; exit ;; 32795060Sjmallett esac ;; 3281590Srgrimes s390x:SunOS:*:*) 32995060Sjmallett echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 330228063Sbapt exit ;; 3311590Srgrimes sun4H:SunOS:5.*:*) 33295060Sjmallett echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3331590Srgrimes exit ;; 33495060Sjmallett sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 3351590Srgrimes echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3361590Srgrimes exit ;; 3371590Srgrimes i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 3381590Srgrimes echo i386-pc-auroraux${UNAME_RELEASE} 3391590Srgrimes exit ;; 3401590Srgrimes i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 3411590Srgrimes eval $set_cc_for_build 3421590Srgrimes SUN_ARCH="i386" 3431590Srgrimes # If there is a compiler, see if it is configured for 64-bit objects. 3441590Srgrimes # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 3451590Srgrimes # This test works for both compilers. 3461590Srgrimes if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 3471590Srgrimes if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 3481590Srgrimes (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 3491590Srgrimes grep IS_64BIT_ARCH >/dev/null 3501590Srgrimes then 3511590Srgrimes SUN_ARCH="x86_64" 3521590Srgrimes fi 3531590Srgrimes fi 3541590Srgrimes echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3551590Srgrimes exit ;; 3561590Srgrimes sun4*:SunOS:6*:*) 3571590Srgrimes # According to config.sub, this is the proper way to canonicalize 3581590Srgrimes # SunOS6. Hard to guess exactly what SunOS6 will be like, but 3591590Srgrimes # it's likely to be more like Solaris than SunOS4. 3601590Srgrimes echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3611590Srgrimes exit ;; 3621590Srgrimes sun4*:SunOS:*:*) 3631590Srgrimes case "`/usr/bin/arch -k`" in 3641590Srgrimes Series*|S4*) 3651590Srgrimes UNAME_RELEASE=`uname -v` 366228063Sbapt ;; 3671590Srgrimes esac 3681590Srgrimes # Japanese Language versions have a version number like `4.1.3-JL'. 3691590Srgrimes echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 3701590Srgrimes exit ;; 3711590Srgrimes sun3*:SunOS:*:*) 3721590Srgrimes echo m68k-sun-sunos${UNAME_RELEASE} 3731590Srgrimes exit ;; 3741590Srgrimes sun*:*:4.2BSD:*) 3751590Srgrimes UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 3761590Srgrimes test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 377228063Sbapt case "`/bin/arch`" in 3781590Srgrimes sun3) 3791590Srgrimes echo m68k-sun-sunos${UNAME_RELEASE} 3801590Srgrimes ;; 3811590Srgrimes sun4) 3821590Srgrimes echo sparc-sun-sunos${UNAME_RELEASE} 3831590Srgrimes ;; 38495060Sjmallett esac 38595060Sjmallett exit ;; 38695060Sjmallett aushp:SunOS:*:*) 38795060Sjmallett echo sparc-auspex-sunos${UNAME_RELEASE} 38895060Sjmallett exit ;; 389100014Sjmallett # The situation for MiNT is a little confusing. The machine name 39095060Sjmallett # can be virtually everything (everything which is not 39195060Sjmallett # "atarist" or "atariste" at least should have a processor 392100014Sjmallett # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 393100014Sjmallett # to the lowercase version "mint" (or "freemint"). Finally 39495060Sjmallett # the system name "TOS" denotes a system which is actually not 39595060Sjmallett # MiNT. But MiNT is downward compatible to TOS, so this should 39695060Sjmallett # be no problem. 39795060Sjmallett atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 39895060Sjmallett echo m68k-atari-mint${UNAME_RELEASE} 3991590Srgrimes exit ;; 4001590Srgrimes atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 4011590Srgrimes echo m68k-atari-mint${UNAME_RELEASE} 4021590Srgrimes exit ;; 4031590Srgrimes *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 4041590Srgrimes echo m68k-atari-mint${UNAME_RELEASE} 4051590Srgrimes exit ;; 4061590Srgrimes milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 4071590Srgrimes echo m68k-milan-mint${UNAME_RELEASE} 4081590Srgrimes exit ;; 40995060Sjmallett hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 41095060Sjmallett echo m68k-hades-mint${UNAME_RELEASE} 411228063Sbapt exit ;; 4121590Srgrimes *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 4131590Srgrimes echo m68k-unknown-mint${UNAME_RELEASE} 4141590Srgrimes exit ;; 4151590Srgrimes m68k:machten:*:*) 4161590Srgrimes echo m68k-apple-machten${UNAME_RELEASE} 41795060Sjmallett exit ;; 41895060Sjmallett powerpc:machten:*:*) 4191590Srgrimes echo powerpc-apple-machten${UNAME_RELEASE} 4201590Srgrimes exit ;; 4211590Srgrimes RISC*:Mach:*:*) 4221590Srgrimes echo mips-dec-mach_bsd4.3 4231590Srgrimes exit ;; 4241590Srgrimes RISC*:ULTRIX:*:*) 4251590Srgrimes echo mips-dec-ultrix${UNAME_RELEASE} 4261590Srgrimes exit ;; 4271590Srgrimes VAX*:ULTRIX*:*:*) 4281590Srgrimes echo vax-dec-ultrix${UNAME_RELEASE} 4291590Srgrimes exit ;; 4301590Srgrimes 2020:CLIX:*:* | 2430:CLIX:*:*) 4311590Srgrimes echo clipper-intergraph-clix${UNAME_RELEASE} 4321590Srgrimes exit ;; 4331590Srgrimes mips:*:*:UMIPS | mips:*:*:RISCos) 4341590Srgrimes eval $set_cc_for_build 4351590Srgrimes sed 's/^ //' << EOF >$dummy.c 4361590Srgrimes#ifdef __cplusplus 4371590Srgrimes#include <stdio.h> /* for printf() prototype */ 4381590Srgrimes int main (int argc, char *argv[]) { 4391590Srgrimes#else 4401590Srgrimes int main (argc, argv) int argc; char *argv[]; { 4411590Srgrimes#endif 4421590Srgrimes #if defined (host_mips) && defined (MIPSEB) 4431590Srgrimes #if defined (SYSTYPE_SYSV) 4441590Srgrimes printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 4451590Srgrimes #endif 4461590Srgrimes #if defined (SYSTYPE_SVR4) 4471590Srgrimes printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 4481590Srgrimes #endif 4491590Srgrimes #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 4501590Srgrimes printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 4511590Srgrimes #endif 4521590Srgrimes #endif 4531590Srgrimes exit (-1); 4541590Srgrimes } 4551590SrgrimesEOF 4561590Srgrimes $CC_FOR_BUILD -o $dummy $dummy.c && 457228063Sbapt dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 458228063Sbapt SYSTEM_NAME=`$dummy $dummyarg` && 4591590Srgrimes { echo "$SYSTEM_NAME"; exit; } 4601590Srgrimes echo mips-mips-riscos${UNAME_RELEASE} 4611590Srgrimes exit ;; 4621590Srgrimes Motorola:PowerMAX_OS:*:*) 4631590Srgrimes echo powerpc-motorola-powermax 4641590Srgrimes exit ;; 4657896Sache Motorola:*:4.3:PL8-*) 4661590Srgrimes echo powerpc-harris-powermax 4671590Srgrimes exit ;; 4681590Srgrimes Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 4691590Srgrimes echo powerpc-harris-powermax 4701590Srgrimes exit ;; 4711590Srgrimes Night_Hawk:Power_UNIX:*:*) 4721590Srgrimes echo powerpc-harris-powerunix 4731590Srgrimes exit ;; 4741590Srgrimes m88k:CX/UX:7*:*) 47595060Sjmallett echo m88k-harris-cxux7 47695060Sjmallett exit ;; 47795060Sjmallett m88k:*:4*:R4*) 47838926Ssteve echo m88k-motorola-sysv4 479100014Sjmallett exit ;; 48095060Sjmallett m88k:*:3*:R3*) 48195060Sjmallett echo m88k-motorola-sysv3 48295060Sjmallett exit ;; 48395060Sjmallett AViiON:dgux:*:*) 48438926Ssteve # DG/UX returns AViiON for all architectures 48595060Sjmallett UNAME_PROCESSOR=`/usr/bin/uname -p` 48695060Sjmallett if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 48795060Sjmallett then 48895060Sjmallett if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 48995060Sjmallett [ ${TARGET_BINARY_INTERFACE}x = x ] 49095060Sjmallett then 49195060Sjmallett echo m88k-dg-dgux${UNAME_RELEASE} 49295060Sjmallett else 49395060Sjmallett echo m88k-dg-dguxbcs${UNAME_RELEASE} 49495060Sjmallett fi 49595060Sjmallett else 49695060Sjmallett echo i586-dg-dgux${UNAME_RELEASE} 49795060Sjmallett fi 49895060Sjmallett exit ;; 49995060Sjmallett M88*:DolphinOS:*:*) # DolphinOS (SVR3) 50095060Sjmallett echo m88k-dolphin-sysv3 50195060Sjmallett exit ;; 50295060Sjmallett M88*:*:R3*:*) 50395060Sjmallett # Delta 88k system running SVR3 5041590Srgrimes echo m88k-motorola-sysv3 505228063Sbapt exit ;; 5061590Srgrimes XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 5071590Srgrimes echo m88k-tektronix-sysv3 5081590Srgrimes exit ;; 5091590Srgrimes Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 5101590Srgrimes echo m68k-tektronix-bsd 51195060Sjmallett exit ;; 5121590Srgrimes *:IRIX*:*:*) 5131590Srgrimes echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 51495887Sjmallett exit ;; 5151590Srgrimes ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 51695060Sjmallett echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 51795060Sjmallett exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 51895060Sjmallett i*86:AIX:*:*) 51995060Sjmallett echo i386-ibm-aix 5201590Srgrimes exit ;; 5211590Srgrimes ia64:AIX:*:*) 5221590Srgrimes if [ -x /usr/bin/oslevel ] ; then 5231590Srgrimes IBM_REV=`/usr/bin/oslevel` 5241590Srgrimes else 5251590Srgrimes IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 5261590Srgrimes fi 5271590Srgrimes echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 528228063Sbapt exit ;; 5291590Srgrimes *:AIX:2:3) 5301590Srgrimes if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 5311590Srgrimes eval $set_cc_for_build 5321590Srgrimes sed 's/^ //' << EOF >$dummy.c 5331590Srgrimes #include <sys/systemcfg.h> 5341590Srgrimes 5351590Srgrimes main() 5361590Srgrimes { 5371590Srgrimes if (!__power_pc()) 5381590Srgrimes exit(1); 5391590Srgrimes puts("powerpc-ibm-aix3.2.5"); 5401590Srgrimes exit(0); 5411590Srgrimes } 5421590SrgrimesEOF 5431590Srgrimes if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 5441590Srgrimes then 5451590Srgrimes echo "$SYSTEM_NAME" 5461590Srgrimes else 5471590Srgrimes echo rs6000-ibm-aix3.2.5 5481590Srgrimes fi 54995060Sjmallett elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 55095060Sjmallett echo rs6000-ibm-aix3.2.4 55195060Sjmallett else 552228063Sbapt echo rs6000-ibm-aix3.2 55395060Sjmallett fi 55495060Sjmallett exit ;; 555228063Sbapt *:AIX:*:[456]) 5561590Srgrimes IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 55795060Sjmallett if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 55895060Sjmallett IBM_ARCH=rs6000 55995060Sjmallett else 56095060Sjmallett IBM_ARCH=powerpc 56195060Sjmallett fi 56295060Sjmallett if [ -x /usr/bin/oslevel ] ; then 563228063Sbapt IBM_REV=`/usr/bin/oslevel` 56495060Sjmallett else 56595060Sjmallett IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 56695060Sjmallett fi 56795060Sjmallett echo ${IBM_ARCH}-ibm-aix${IBM_REV} 56824901Sjoerg exit ;; 56995060Sjmallett *:AIX:*:*) 5701590Srgrimes echo rs6000-ibm-aix 571228063Sbapt exit ;; 572228063Sbapt ibmrt:4.4BSD:*|romp-ibm:BSD:*) 5731590Srgrimes echo romp-ibm-bsd4.4 5741590Srgrimes exit ;; 5751590Srgrimes ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 5761590Srgrimes echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 5771590Srgrimes exit ;; # report: romp-ibm BSD 4.3 5781590Srgrimes *:BOSX:*:*) 5791590Srgrimes echo rs6000-bull-bosx 580228063Sbapt exit ;; 5811590Srgrimes DPX/2?00:B.O.S.:*:*) 5821590Srgrimes echo m68k-bull-sysv3 583228063Sbapt exit ;; 5841590Srgrimes 9000/[34]??:4.3bsd:1.*:*) 5851590Srgrimes echo m68k-hp-bsd 5861590Srgrimes exit ;; 5871590Srgrimes hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 58895887Sjmallett echo m68k-hp-bsd4.4 5891590Srgrimes exit ;; 590228063Sbapt 9000/[34678]??:HP-UX:*:*) 591228063Sbapt HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 5921590Srgrimes case "${UNAME_MACHINE}" in 593228063Sbapt 9000/31? ) HP_ARCH=m68000 ;; 5941590Srgrimes 9000/[34]?? ) HP_ARCH=m68k ;; 5951590Srgrimes 9000/[678][0-9][0-9]) 5961590Srgrimes if [ -x /usr/bin/getconf ]; then 5971590Srgrimes sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 5981590Srgrimes sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 5991590Srgrimes case "${sc_cpu_version}" in 60095060Sjmallett 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 60195887Sjmallett 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 6021590Srgrimes 532) # CPU_PA_RISC2_0 603228063Sbapt case "${sc_kernel_bits}" in 6041590Srgrimes 32) HP_ARCH="hppa2.0n" ;; 605228063Sbapt 64) HP_ARCH="hppa2.0w" ;; 606228063Sbapt '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 60795060Sjmallett esac ;; 60895060Sjmallett esac 60995060Sjmallett fi 610228063Sbapt if [ "${HP_ARCH}" = "" ]; then 611228063Sbapt eval $set_cc_for_build 61295060Sjmallett sed 's/^ //' << EOF >$dummy.c 61395060Sjmallett 6141590Srgrimes #define _HPUX_SOURCE 6151590Srgrimes #include <stdlib.h> 6161590Srgrimes #include <unistd.h> 6171590Srgrimes 6181590Srgrimes int main () 6191590Srgrimes { 6201590Srgrimes #if defined(_SC_KERNEL_BITS) 6211590Srgrimes long bits = sysconf(_SC_KERNEL_BITS); 6221590Srgrimes #endif 6231590Srgrimes long cpu = sysconf (_SC_CPU_VERSION); 62495060Sjmallett 62595887Sjmallett switch (cpu) 6261590Srgrimes { 627228063Sbapt case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 628228063Sbapt case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 6291590Srgrimes case CPU_PA_RISC2_0: 630228063Sbapt #if defined(_SC_KERNEL_BITS) 6311590Srgrimes switch (bits) 6321590Srgrimes { 6331590Srgrimes case 64: puts ("hppa2.0w"); break; 63495060Sjmallett case 32: puts ("hppa2.0n"); break; 63595060Sjmallett default: puts ("hppa2.0"); break; 63695060Sjmallett } break; 637228063Sbapt #else /* !defined(_SC_KERNEL_BITS) */ 63895060Sjmallett puts ("hppa2.0"); break; 639228063Sbapt #endif 640228063Sbapt default: puts ("hppa1.0"); break; 64195060Sjmallett } 64295060Sjmallett exit (0); 643228063Sbapt } 64495060SjmallettEOF 645228063Sbapt (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 646228063Sbapt test -z "$HP_ARCH" && HP_ARCH=hppa 64795060Sjmallett fi ;; 648228063Sbapt esac 64995060Sjmallett if [ ${HP_ARCH} = "hppa2.0w" ] 65095060Sjmallett then 65195060Sjmallett eval $set_cc_for_build 6521590Srgrimes 6531590Srgrimes # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 6541590Srgrimes # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 6551590Srgrimes # generating 64-bit code. GNU and HP use different nomenclature: 65695060Sjmallett # 65795887Sjmallett # $ CC_FOR_BUILD=cc ./config.guess 6581590Srgrimes # => hppa2.0w-hp-hpux11.23 65995060Sjmallett # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 660228063Sbapt # => hppa64-hp-hpux11.23 6611590Srgrimes 6621590Srgrimes if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 6631590Srgrimes grep -q __LP64__ 664228063Sbapt then 665228063Sbapt HP_ARCH="hppa2.0w" 666228063Sbapt else 667228063Sbapt HP_ARCH="hppa64" 6681590Srgrimes fi 6691590Srgrimes fi 6701590Srgrimes echo ${HP_ARCH}-hp-hpux${HPUX_REV} 67195060Sjmallett exit ;; 67295060Sjmallett ia64:HP-UX:*:*) 67395060Sjmallett HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 67495887Sjmallett echo ia64-hp-hpux${HPUX_REV} 67595060Sjmallett exit ;; 67695060Sjmallett 3050*:HI-UX:*:*) 67795060Sjmallett eval $set_cc_for_build 67895060Sjmallett sed 's/^ //' << EOF >$dummy.c 67995060Sjmallett #include <unistd.h> 68095060Sjmallett int 68195060Sjmallett main () 68295060Sjmallett { 68395060Sjmallett long cpu = sysconf (_SC_CPU_VERSION); 68495060Sjmallett /* The order matters, because CPU_IS_HP_MC68K erroneously returns 68595060Sjmallett true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 6861590Srgrimes results, however. */ 6871590Srgrimes if (CPU_IS_PA_RISC (cpu)) 68895060Sjmallett { 68995887Sjmallett switch (cpu) 6901590Srgrimes { 6911590Srgrimes case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 6921590Srgrimes case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 6931590Srgrimes case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 6941590Srgrimes default: puts ("hppa-hitachi-hiuxwe2"); break; 6951590Srgrimes } 6961590Srgrimes } 6971590Srgrimes else if (CPU_IS_HP_MC68K (cpu)) 6981590Srgrimes puts ("m68k-hitachi-hiuxwe2"); 6991590Srgrimes else puts ("unknown-hitachi-hiuxwe2"); 7001590Srgrimes exit (0); 7011590Srgrimes } 7021590SrgrimesEOF 7031590Srgrimes $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 7041590Srgrimes { echo "$SYSTEM_NAME"; exit; } 7051590Srgrimes echo unknown-hitachi-hiuxwe2 7061590Srgrimes exit ;; 7071590Srgrimes 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 70895060Sjmallett echo hppa1.1-hp-bsd 70995887Sjmallett exit ;; 7101590Srgrimes 9000/8??:4.3bsd:*:*) 7111590Srgrimes echo hppa1.0-hp-bsd 712228063Sbapt exit ;; 71395060Sjmallett *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 7141590Srgrimes echo hppa1.0-hp-mpeix 7151590Srgrimes exit ;; 7161590Srgrimes hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 71795060Sjmallett echo hppa1.1-hp-osf 7181590Srgrimes exit ;; 7191590Srgrimes hp8??:OSF1:*:*) 7201590Srgrimes echo hppa1.0-hp-osf 7211590Srgrimes exit ;; 7221590Srgrimes i*86:OSF1:*:*) 7231590Srgrimes if [ -x /usr/sbin/sysversion ] ; then 7241590Srgrimes echo ${UNAME_MACHINE}-unknown-osf1mk 7251590Srgrimes else 72695060Sjmallett echo ${UNAME_MACHINE}-unknown-osf1 72795887Sjmallett fi 7281590Srgrimes exit ;; 7291590Srgrimes parisc*:Lites*:*:*) 73095060Sjmallett echo hppa1.1-hp-lites 7311590Srgrimes exit ;; 7321590Srgrimes C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 733228063Sbapt echo c1-convex-bsd 734228063Sbapt exit ;; 7351590Srgrimes C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 7361590Srgrimes if getsysinfo -f scalar_acc 7371590Srgrimes then echo c32-convex-bsd 738228063Sbapt else echo c2-convex-bsd 7391590Srgrimes fi 74095060Sjmallett exit ;; 7411590Srgrimes C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 7421590Srgrimes echo c34-convex-bsd 7431590Srgrimes exit ;; 7441590Srgrimes C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 745228063Sbapt echo c38-convex-bsd 746228063Sbapt exit ;; 747228063Sbapt C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 74895060Sjmallett echo c4-convex-bsd 749228063Sbapt exit ;; 75095060Sjmallett CRAY*Y-MP:*:*:*) 75195060Sjmallett echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 752228063Sbapt exit ;; 753228063Sbapt CRAY*[A-Z]90:*:*:*) 75495060Sjmallett echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 75595060Sjmallett | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 756228063Sbapt -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 75795060Sjmallett -e 's/\.[^.]*$/.X/' 758228063Sbapt exit ;; 759228063Sbapt CRAY*TS:*:*:*) 760228063Sbapt echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 76195060Sjmallett exit ;; 76295060Sjmallett CRAY*T3E:*:*:*) 76395060Sjmallett echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7641590Srgrimes exit ;; 765228063Sbapt CRAY*SV1:*:*:*) 7661590Srgrimes echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 76795060Sjmallett exit ;; 768228063Sbapt *:UNICOS/mp:*:*) 7691590Srgrimes echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 770228063Sbapt exit ;; 771228063Sbapt F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 772228063Sbapt FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 773228063Sbapt FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 77495060Sjmallett FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 77595060Sjmallett echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 77695060Sjmallett exit ;; 777228063Sbapt 5000:UNIX_System_V:4.*:*) 778228063Sbapt FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 779228063Sbapt FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 780228063Sbapt echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 78195060Sjmallett exit ;; 782228063Sbapt i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 7831590Srgrimes echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 7841590Srgrimes exit ;; 785228063Sbapt sparc*:BSD/OS:*:*) 7861590Srgrimes echo sparc-unknown-bsdi${UNAME_RELEASE} 787228063Sbapt exit ;; 7881590Srgrimes *:BSD/OS:*:*) 78995060Sjmallett echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 790228063Sbapt exit ;; 7911590Srgrimes *:FreeBSD:*:*) 792228063Sbapt case ${UNAME_MACHINE} in 793228063Sbapt pc98) 794228063Sbapt echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 7951590Srgrimes amd64) 796228063Sbapt echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 797228063Sbapt *) 798228063Sbapt echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 7991590Srgrimes esac 800228063Sbapt exit ;; 8011590Srgrimes i*:CYGWIN*:*) 8021590Srgrimes echo ${UNAME_MACHINE}-pc-cygwin 8031590Srgrimes exit ;; 8041590Srgrimes *:MINGW*:*) 8051590Srgrimes echo ${UNAME_MACHINE}-pc-mingw32 80695060Sjmallett exit ;; 80795887Sjmallett i*:windows32*:*) 8081590Srgrimes # uname -m includes "-pc" on this system. 80995060Sjmallett echo ${UNAME_MACHINE}-mingw32 81095060Sjmallett exit ;; 81128386Sjlemon i*:PW*:*) 81295060Sjmallett echo ${UNAME_MACHINE}-pc-pw32 81395060Sjmallett exit ;; 81495060Sjmallett *:Interix*:*) 81595060Sjmallett case ${UNAME_MACHINE} in 81695060Sjmallett x86) 817228063Sbapt echo i586-pc-interix${UNAME_RELEASE} 81895060Sjmallett exit ;; 81995060Sjmallett authenticamd | genuineintel | EM64T) 8201590Srgrimes echo x86_64-unknown-interix${UNAME_RELEASE} 8211590Srgrimes exit ;; 82295060Sjmallett IA64) 82395060Sjmallett echo ia64-unknown-interix${UNAME_RELEASE} 824228063Sbapt exit ;; 82595060Sjmallett esac ;; 82695060Sjmallett [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 82795060Sjmallett echo i${UNAME_MACHINE}-pc-mks 82895060Sjmallett exit ;; 8291590Srgrimes 8664:Windows_NT:*) 8301590Srgrimes echo x86_64-pc-mks 8311590Srgrimes exit ;; 8321590Srgrimes i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 8331590Srgrimes # How do we know it's Interix rather than the generic POSIX subsystem? 8341590Srgrimes # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 8351590Srgrimes # UNAME_MACHINE based on the output of uname instead of i386? 8361590Srgrimes echo i586-pc-interix 83795060Sjmallett exit ;; 83895887Sjmallett i*:UWIN*:*) 8391590Srgrimes echo ${UNAME_MACHINE}-pc-uwin 84095060Sjmallett exit ;; 84195060Sjmallett amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 8421590Srgrimes echo x86_64-unknown-cygwin 8431590Srgrimes exit ;; 8441590Srgrimes p*:CYGWIN*:*) 845228063Sbapt echo powerpcle-unknown-cygwin 846228063Sbapt exit ;; 847228063Sbapt prep*:SunOS:5.*:*) 848228063Sbapt echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 849228063Sbapt exit ;; 850228063Sbapt *:GNU:*:*) 851228063Sbapt # the GNU system 852228063Sbapt echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 853228063Sbapt exit ;; 8541590Srgrimes *:GNU/*:*:*) 8551590Srgrimes # other systems with GNU libc and userland 8561590Srgrimes echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 85795060Sjmallett exit ;; 8581590Srgrimes i*86:Minix:*:*) 8591590Srgrimes echo ${UNAME_MACHINE}-pc-minix 8601590Srgrimes exit ;; 8611590Srgrimes alpha:Linux:*:*) 8621590Srgrimes case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 8631590Srgrimes EV5) UNAME_MACHINE=alphaev5 ;; 8641590Srgrimes EV56) UNAME_MACHINE=alphaev56 ;; 86595060Sjmallett PCA56) UNAME_MACHINE=alphapca56 ;; 86695887Sjmallett PCA57) UNAME_MACHINE=alphapca56 ;; 8671590Srgrimes EV6) UNAME_MACHINE=alphaev6 ;; 86895060Sjmallett EV67) UNAME_MACHINE=alphaev67 ;; 86995060Sjmallett EV68*) UNAME_MACHINE=alphaev68 ;; 8701590Srgrimes esac 87176822Sgshapiro objdump --private-headers /bin/sh | grep -q ld.so.1 87276822Sgshapiro if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 87376822Sgshapiro echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 87476822Sgshapiro exit ;; 87576822Sgshapiro arm*:Linux:*:*) 87676822Sgshapiro eval $set_cc_for_build 87795060Sjmallett if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 87895060Sjmallett | grep -q __ARM_EABI__ 8791590Srgrimes then 88095060Sjmallett echo ${UNAME_MACHINE}-unknown-linux-gnu 8811590Srgrimes else 88295060Sjmallett echo ${UNAME_MACHINE}-unknown-linux-gnueabi 8831590Srgrimes fi 8841590Srgrimes exit ;; 88576822Sgshapiro avr32*:Linux:*:*) 886228063Sbapt echo ${UNAME_MACHINE}-unknown-linux-gnu 8871590Srgrimes exit ;; 8881590Srgrimes cris:Linux:*:*) 8891590Srgrimes echo cris-axis-linux-gnu 8901590Srgrimes exit ;; 8911590Srgrimes crisv32:Linux:*:*) 8921590Srgrimes echo crisv32-axis-linux-gnu 8931590Srgrimes exit ;; 894228063Sbapt frv:Linux:*:*) 895228063Sbapt echo frv-unknown-linux-gnu 896228063Sbapt exit ;; 897228063Sbapt i*86:Linux:*:*) 898228063Sbapt LIBC=gnu 8991590Srgrimes eval $set_cc_for_build 90095060Sjmallett sed 's/^ //' << EOF >$dummy.c 90195887Sjmallett #ifdef __dietlibc__ 9021590Srgrimes LIBC=dietlibc 90395060Sjmallett #endif 90495060SjmallettEOF 90595060Sjmallett eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` 90695060Sjmallett echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 907228063Sbapt exit ;; 908228063Sbapt ia64:Linux:*:*) 90995060Sjmallett echo ${UNAME_MACHINE}-unknown-linux-gnu 91095060Sjmallett exit ;; 91195060Sjmallett m32r*:Linux:*:*) 91295060Sjmallett echo ${UNAME_MACHINE}-unknown-linux-gnu 91395060Sjmallett exit ;; 91495060Sjmallett m68*:Linux:*:*) 91595060Sjmallett echo ${UNAME_MACHINE}-unknown-linux-gnu 91695060Sjmallett exit ;; 91795060Sjmallett mips:Linux:*:* | mips64:Linux:*:*) 91895060Sjmallett eval $set_cc_for_build 91995060Sjmallett sed 's/^ //' << EOF >$dummy.c 92095060Sjmallett #undef CPU 92195060Sjmallett #undef ${UNAME_MACHINE} 92295060Sjmallett #undef ${UNAME_MACHINE}el 92395060Sjmallett #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 92495060Sjmallett CPU=${UNAME_MACHINE}el 92595060Sjmallett #else 92695060Sjmallett #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 92795060Sjmallett CPU=${UNAME_MACHINE} 9281590Srgrimes #else 9291590Srgrimes CPU= 9301590Srgrimes #endif 93195060Sjmallett #endif 93295060SjmallettEOF 93395060Sjmallett eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 93495060Sjmallett test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 93595060Sjmallett ;; 93695060Sjmallett or32:Linux:*:*) 93795060Sjmallett echo or32-unknown-linux-gnu 9381590Srgrimes exit ;; 9391590Srgrimes padre:Linux:*:*) 9401590Srgrimes echo sparc-unknown-linux-gnu 9411590Srgrimes exit ;; 9421590Srgrimes parisc64:Linux:*:* | hppa64:Linux:*:*) 943228063Sbapt echo hppa64-unknown-linux-gnu 944228063Sbapt exit ;; 945228063Sbapt parisc:Linux:*:* | hppa:Linux:*:*) 946228063Sbapt # Look for CPU level 947228063Sbapt case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 948228063Sbapt PA7*) echo hppa1.1-unknown-linux-gnu ;; 949228063Sbapt PA8*) echo hppa2.0-unknown-linux-gnu ;; 950228063Sbapt *) echo hppa-unknown-linux-gnu ;; 951228063Sbapt esac 952228063Sbapt exit ;; 953228063Sbapt ppc64:Linux:*:*) 9541590Srgrimes echo powerpc64-unknown-linux-gnu 9551590Srgrimes exit ;; 95695060Sjmallett ppc:Linux:*:*) 9571590Srgrimes echo powerpc-unknown-linux-gnu 95895060Sjmallett exit ;; 9591590Srgrimes s390:Linux:*:* | s390x:Linux:*:*) 9601590Srgrimes echo ${UNAME_MACHINE}-ibm-linux 9611590Srgrimes exit ;; 9621590Srgrimes sh64*:Linux:*:*) 9631590Srgrimes echo ${UNAME_MACHINE}-unknown-linux-gnu 9641590Srgrimes exit ;; 96595060Sjmallett sh*:Linux:*:*) 9661590Srgrimes echo ${UNAME_MACHINE}-unknown-linux-gnu 9671590Srgrimes exit ;; 9681590Srgrimes sparc:Linux:*:* | sparc64:Linux:*:*) 96995060Sjmallett echo ${UNAME_MACHINE}-unknown-linux-gnu 9701590Srgrimes exit ;; 97195060Sjmallett vax:Linux:*:*) 97295060Sjmallett echo ${UNAME_MACHINE}-dec-linux-gnu 97395060Sjmallett exit ;; 97495060Sjmallett x86_64:Linux:*:*) 97595060Sjmallett echo x86_64-unknown-linux-gnu 97695060Sjmallett exit ;; 97795060Sjmallett xtensa*:Linux:*:*) 97895060Sjmallett echo ${UNAME_MACHINE}-unknown-linux-gnu 97995887Sjmallett exit ;; 98095060Sjmallett i*86:DYNIX/ptx:4*:*) 98195060Sjmallett # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 982100014Sjmallett # earlier versions are messed up and put the nodename in both 98395060Sjmallett # sysname and nodename. 98495060Sjmallett echo i386-sequent-sysv4 98595060Sjmallett exit ;; 98695060Sjmallett i*86:UNIX_SV:4.2MP:2.*) 987228063Sbapt # Unixware is an offshoot of SVR4, but it has its own version 988228063Sbapt # number series starting with 2... 989228063Sbapt # I am not positive that other SVR4 systems won't match this, 990228063Sbapt # I just have to hope. -- rms. 991228063Sbapt # Use sysv4.2uw... so that sysv4* matches it. 992228063Sbapt echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 993228063Sbapt exit ;; 994228063Sbapt i*86:OS/2:*:*) 99595060Sjmallett # If we were able to find `uname', then EMX Unix compatibility 996228063Sbapt # is probably installed. 997228063Sbapt echo ${UNAME_MACHINE}-pc-os2-emx 998228063Sbapt exit ;; 999228063Sbapt i*86:XTS-300:*:STOP) 1000228063Sbapt echo ${UNAME_MACHINE}-unknown-stop 1001228063Sbapt exit ;; 1002228063Sbapt i*86:atheos:*:*) 1003228063Sbapt echo ${UNAME_MACHINE}-unknown-atheos 1004228063Sbapt exit ;; 100595060Sjmallett i*86:syllable:*:*) 100695060Sjmallett echo ${UNAME_MACHINE}-pc-syllable 100795060Sjmallett exit ;; 100895060Sjmallett i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 100995060Sjmallett echo i386-unknown-lynxos${UNAME_RELEASE} 101095060Sjmallett exit ;; 101195060Sjmallett i*86:*DOS:*:*) 101295060Sjmallett echo ${UNAME_MACHINE}-pc-msdosdjgpp 101395060Sjmallett exit ;; 101495060Sjmallett i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1015 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1016 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1017 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 1018 else 1019 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1020 fi 1021 exit ;; 1022 i*86:*:5:[678]*) 1023 # UnixWare 7.x, OpenUNIX and OpenServer 6. 1024 case `/bin/uname -X | grep "^Machine"` in 1025 *486*) UNAME_MACHINE=i486 ;; 1026 *Pentium) UNAME_MACHINE=i586 ;; 1027 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1028 esac 1029 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1030 exit ;; 1031 i*86:*:3.2:*) 1032 if test -f /usr/options/cb.name; then 1033 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1034 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 1035 elif /bin/uname -X 2>/dev/null >/dev/null ; then 1036 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1037 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1038 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 1039 && UNAME_MACHINE=i586 1040 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1041 && UNAME_MACHINE=i686 1042 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1043 && UNAME_MACHINE=i686 1044 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 1045 else 1046 echo ${UNAME_MACHINE}-pc-sysv32 1047 fi 1048 exit ;; 1049 pc:*:*:*) 1050 # Left here for compatibility: 1051 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1052 # the processor, so we play safe by assuming i586. 1053 # Note: whatever this is, it MUST be the same as what config.sub 1054 # prints for the "djgpp" host, or else GDB configury will decide that 1055 # this is a cross-build. 1056 echo i586-pc-msdosdjgpp 1057 exit ;; 1058 Intel:Mach:3*:*) 1059 echo i386-pc-mach3 1060 exit ;; 1061 paragon:*:*:*) 1062 echo i860-intel-osf1 1063 exit ;; 1064 i860:*:4.*:*) # i860-SVR4 1065 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1066 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1067 else # Add other i860-SVR4 vendors below as they are discovered. 1068 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1069 fi 1070 exit ;; 1071 mini*:CTIX:SYS*5:*) 1072 # "miniframe" 1073 echo m68010-convergent-sysv 1074 exit ;; 1075 mc68k:UNIX:SYSTEM5:3.51m) 1076 echo m68k-convergent-sysv 1077 exit ;; 1078 M680?0:D-NIX:5.3:*) 1079 echo m68k-diab-dnix 1080 exit ;; 1081 M68*:*:R3V[5678]*:*) 1082 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1083 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) 1084 OS_REL='' 1085 test -r /etc/.relid \ 1086 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1087 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1088 && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1089 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1090 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1091 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1092 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1093 && { echo i486-ncr-sysv4; exit; } ;; 1094 NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1095 OS_REL='.3' 1096 test -r /etc/.relid \ 1097 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1098 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1099 && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1100 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1101 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1102 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1103 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1104 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1105 echo m68k-unknown-lynxos${UNAME_RELEASE} 1106 exit ;; 1107 mc68030:UNIX_System_V:4.*:*) 1108 echo m68k-atari-sysv4 1109 exit ;; 1110 TSUNAMI:LynxOS:2.*:*) 1111 echo sparc-unknown-lynxos${UNAME_RELEASE} 1112 exit ;; 1113 rs6000:LynxOS:2.*:*) 1114 echo rs6000-unknown-lynxos${UNAME_RELEASE} 1115 exit ;; 1116 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1117 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1118 exit ;; 1119 SM[BE]S:UNIX_SV:*:*) 1120 echo mips-dde-sysv${UNAME_RELEASE} 1121 exit ;; 1122 RM*:ReliantUNIX-*:*:*) 1123 echo mips-sni-sysv4 1124 exit ;; 1125 RM*:SINIX-*:*:*) 1126 echo mips-sni-sysv4 1127 exit ;; 1128 *:SINIX-*:*:*) 1129 if uname -p 2>/dev/null >/dev/null ; then 1130 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1131 echo ${UNAME_MACHINE}-sni-sysv4 1132 else 1133 echo ns32k-sni-sysv 1134 fi 1135 exit ;; 1136 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1137 # says <Richard.M.Bartel@ccMail.Census.GOV> 1138 echo i586-unisys-sysv4 1139 exit ;; 1140 *:UNIX_System_V:4*:FTX*) 1141 # From Gerald Hewes <hewes@openmarket.com>. 1142 # How about differentiating between stratus architectures? -djm 1143 echo hppa1.1-stratus-sysv4 1144 exit ;; 1145 *:*:*:FTX*) 1146 # From seanf@swdc.stratus.com. 1147 echo i860-stratus-sysv4 1148 exit ;; 1149 i*86:VOS:*:*) 1150 # From Paul.Green@stratus.com. 1151 echo ${UNAME_MACHINE}-stratus-vos 1152 exit ;; 1153 *:VOS:*:*) 1154 # From Paul.Green@stratus.com. 1155 echo hppa1.1-stratus-vos 1156 exit ;; 1157 mc68*:A/UX:*:*) 1158 echo m68k-apple-aux${UNAME_RELEASE} 1159 exit ;; 1160 news*:NEWS-OS:6*:*) 1161 echo mips-sony-newsos6 1162 exit ;; 1163 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1164 if [ -d /usr/nec ]; then 1165 echo mips-nec-sysv${UNAME_RELEASE} 1166 else 1167 echo mips-unknown-sysv${UNAME_RELEASE} 1168 fi 1169 exit ;; 1170 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1171 echo powerpc-be-beos 1172 exit ;; 1173 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1174 echo powerpc-apple-beos 1175 exit ;; 1176 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1177 echo i586-pc-beos 1178 exit ;; 1179 BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1180 echo i586-pc-haiku 1181 exit ;; 1182 SX-4:SUPER-UX:*:*) 1183 echo sx4-nec-superux${UNAME_RELEASE} 1184 exit ;; 1185 SX-5:SUPER-UX:*:*) 1186 echo sx5-nec-superux${UNAME_RELEASE} 1187 exit ;; 1188 SX-6:SUPER-UX:*:*) 1189 echo sx6-nec-superux${UNAME_RELEASE} 1190 exit ;; 1191 SX-7:SUPER-UX:*:*) 1192 echo sx7-nec-superux${UNAME_RELEASE} 1193 exit ;; 1194 SX-8:SUPER-UX:*:*) 1195 echo sx8-nec-superux${UNAME_RELEASE} 1196 exit ;; 1197 SX-8R:SUPER-UX:*:*) 1198 echo sx8r-nec-superux${UNAME_RELEASE} 1199 exit ;; 1200 Power*:Rhapsody:*:*) 1201 echo powerpc-apple-rhapsody${UNAME_RELEASE} 1202 exit ;; 1203 *:Rhapsody:*:*) 1204 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1205 exit ;; 1206 *:Darwin:*:*) 1207 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1208 case $UNAME_PROCESSOR in 1209 i386) 1210 eval $set_cc_for_build 1211 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1212 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1213 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1214 grep IS_64BIT_ARCH >/dev/null 1215 then 1216 UNAME_PROCESSOR="x86_64" 1217 fi 1218 fi ;; 1219 unknown) UNAME_PROCESSOR=powerpc ;; 1220 esac 1221 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1222 exit ;; 1223 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1224 UNAME_PROCESSOR=`uname -p` 1225 if test "$UNAME_PROCESSOR" = "x86"; then 1226 UNAME_PROCESSOR=i386 1227 UNAME_MACHINE=pc 1228 fi 1229 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1230 exit ;; 1231 *:QNX:*:4*) 1232 echo i386-pc-qnx 1233 exit ;; 1234 NSE-?:NONSTOP_KERNEL:*:*) 1235 echo nse-tandem-nsk${UNAME_RELEASE} 1236 exit ;; 1237 NSR-?:NONSTOP_KERNEL:*:*) 1238 echo nsr-tandem-nsk${UNAME_RELEASE} 1239 exit ;; 1240 *:NonStop-UX:*:*) 1241 echo mips-compaq-nonstopux 1242 exit ;; 1243 BS2000:POSIX*:*:*) 1244 echo bs2000-siemens-sysv 1245 exit ;; 1246 DS/*:UNIX_System_V:*:*) 1247 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1248 exit ;; 1249 *:Plan9:*:*) 1250 # "uname -m" is not consistent, so use $cputype instead. 386 1251 # is converted to i386 for consistency with other x86 1252 # operating systems. 1253 if test "$cputype" = "386"; then 1254 UNAME_MACHINE=i386 1255 else 1256 UNAME_MACHINE="$cputype" 1257 fi 1258 echo ${UNAME_MACHINE}-unknown-plan9 1259 exit ;; 1260 *:TOPS-10:*:*) 1261 echo pdp10-unknown-tops10 1262 exit ;; 1263 *:TENEX:*:*) 1264 echo pdp10-unknown-tenex 1265 exit ;; 1266 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1267 echo pdp10-dec-tops20 1268 exit ;; 1269 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1270 echo pdp10-xkl-tops20 1271 exit ;; 1272 *:TOPS-20:*:*) 1273 echo pdp10-unknown-tops20 1274 exit ;; 1275 *:ITS:*:*) 1276 echo pdp10-unknown-its 1277 exit ;; 1278 SEI:*:*:SEIUX) 1279 echo mips-sei-seiux${UNAME_RELEASE} 1280 exit ;; 1281 *:DragonFly:*:*) 1282 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1283 exit ;; 1284 *:*VMS:*:*) 1285 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1286 case "${UNAME_MACHINE}" in 1287 A*) echo alpha-dec-vms ; exit ;; 1288 I*) echo ia64-dec-vms ; exit ;; 1289 V*) echo vax-dec-vms ; exit ;; 1290 esac ;; 1291 *:XENIX:*:SysV) 1292 echo i386-pc-xenix 1293 exit ;; 1294 i*86:skyos:*:*) 1295 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1296 exit ;; 1297 i*86:rdos:*:*) 1298 echo ${UNAME_MACHINE}-pc-rdos 1299 exit ;; 1300 i*86:AROS:*:*) 1301 echo ${UNAME_MACHINE}-pc-aros 1302 exit ;; 1303esac 1304 1305#echo '(No uname command or uname output not recognized.)' 1>&2 1306#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 1307 1308eval $set_cc_for_build 1309cat >$dummy.c <<EOF 1310#ifdef _SEQUENT_ 1311# include <sys/types.h> 1312# include <sys/utsname.h> 1313#endif 1314main () 1315{ 1316#if defined (sony) 1317#if defined (MIPSEB) 1318 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 1319 I don't know.... */ 1320 printf ("mips-sony-bsd\n"); exit (0); 1321#else 1322#include <sys/param.h> 1323 printf ("m68k-sony-newsos%s\n", 1324#ifdef NEWSOS4 1325 "4" 1326#else 1327 "" 1328#endif 1329 ); exit (0); 1330#endif 1331#endif 1332 1333#if defined (__arm) && defined (__acorn) && defined (__unix) 1334 printf ("arm-acorn-riscix\n"); exit (0); 1335#endif 1336 1337#if defined (hp300) && !defined (hpux) 1338 printf ("m68k-hp-bsd\n"); exit (0); 1339#endif 1340 1341#if defined (NeXT) 1342#if !defined (__ARCHITECTURE__) 1343#define __ARCHITECTURE__ "m68k" 1344#endif 1345 int version; 1346 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 1347 if (version < 4) 1348 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1349 else 1350 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 1351 exit (0); 1352#endif 1353 1354#if defined (MULTIMAX) || defined (n16) 1355#if defined (UMAXV) 1356 printf ("ns32k-encore-sysv\n"); exit (0); 1357#else 1358#if defined (CMU) 1359 printf ("ns32k-encore-mach\n"); exit (0); 1360#else 1361 printf ("ns32k-encore-bsd\n"); exit (0); 1362#endif 1363#endif 1364#endif 1365 1366#if defined (__386BSD__) 1367 printf ("i386-pc-bsd\n"); exit (0); 1368#endif 1369 1370#if defined (sequent) 1371#if defined (i386) 1372 printf ("i386-sequent-dynix\n"); exit (0); 1373#endif 1374#if defined (ns32000) 1375 printf ("ns32k-sequent-dynix\n"); exit (0); 1376#endif 1377#endif 1378 1379#if defined (_SEQUENT_) 1380 struct utsname un; 1381 1382 uname(&un); 1383 1384 if (strncmp(un.version, "V2", 2) == 0) { 1385 printf ("i386-sequent-ptx2\n"); exit (0); 1386 } 1387 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 1388 printf ("i386-sequent-ptx1\n"); exit (0); 1389 } 1390 printf ("i386-sequent-ptx\n"); exit (0); 1391 1392#endif 1393 1394#if defined (vax) 1395# if !defined (ultrix) 1396# include <sys/param.h> 1397# if defined (BSD) 1398# if BSD == 43 1399 printf ("vax-dec-bsd4.3\n"); exit (0); 1400# else 1401# if BSD == 199006 1402 printf ("vax-dec-bsd4.3reno\n"); exit (0); 1403# else 1404 printf ("vax-dec-bsd\n"); exit (0); 1405# endif 1406# endif 1407# else 1408 printf ("vax-dec-bsd\n"); exit (0); 1409# endif 1410# else 1411 printf ("vax-dec-ultrix\n"); exit (0); 1412# endif 1413#endif 1414 1415#if defined (alliant) && defined (i860) 1416 printf ("i860-alliant-bsd\n"); exit (0); 1417#endif 1418 1419 exit (1); 1420} 1421EOF 1422 1423$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 1424 { echo "$SYSTEM_NAME"; exit; } 1425 1426# Apollos put the system type in the environment. 1427 1428test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 1429 1430# Convex versions that predate uname can use getsysinfo(1) 1431 1432if [ -x /usr/convex/getsysinfo ] 1433then 1434 case `getsysinfo -f cpu_type` in 1435 c1*) 1436 echo c1-convex-bsd 1437 exit ;; 1438 c2*) 1439 if getsysinfo -f scalar_acc 1440 then echo c32-convex-bsd 1441 else echo c2-convex-bsd 1442 fi 1443 exit ;; 1444 c34*) 1445 echo c34-convex-bsd 1446 exit ;; 1447 c38*) 1448 echo c38-convex-bsd 1449 exit ;; 1450 c4*) 1451 echo c4-convex-bsd 1452 exit ;; 1453 esac 1454fi 1455 1456cat >&2 <<EOF 1457$0: unable to guess system type 1458 1459This script, last modified $timestamp, has failed to recognize 1460the operating system you are using. It is advised that you 1461download the most up to date version of the config scripts from 1462 1463 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1464and 1465 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1466 1467If the version you run ($0) is already up to date, please 1468send the following data and any information you think might be 1469pertinent to <config-patches@gnu.org> in order to provide the needed 1470information to handle your system. 1471 1472config.guess timestamp = $timestamp 1473 1474uname -m = `(uname -m) 2>/dev/null || echo unknown` 1475uname -r = `(uname -r) 2>/dev/null || echo unknown` 1476uname -s = `(uname -s) 2>/dev/null || echo unknown` 1477uname -v = `(uname -v) 2>/dev/null || echo unknown` 1478 1479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1480/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1481 1482hostinfo = `(hostinfo) 2>/dev/null` 1483/bin/universe = `(/bin/universe) 2>/dev/null` 1484/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1485/bin/arch = `(/bin/arch) 2>/dev/null` 1486/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1487/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1488 1489UNAME_MACHINE = ${UNAME_MACHINE} 1490UNAME_RELEASE = ${UNAME_RELEASE} 1491UNAME_SYSTEM = ${UNAME_SYSTEM} 1492UNAME_VERSION = ${UNAME_VERSION} 1493EOF 1494 1495exit 1 1496 1497# Local variables: 1498# eval: (add-hook 'write-file-hooks 'time-stamp) 1499# time-stamp-start: "timestamp='" 1500# time-stamp-format: "%:y-%02m-%02d" 1501# time-stamp-end: "'" 1502# End: 1503