config.guess revision 09885543
109885543Smrg#! /bin/sh 209885543Smrg# Attempt to guess a canonical system name. 309885543Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 409885543Smrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, 509885543Smrg# Inc. 609885543Smrg 709885543Smrgtimestamp='2006-07-02' 809885543Smrg 909885543Smrg# This file is free software; you can redistribute it and/or modify it 1009885543Smrg# under the terms of the GNU General Public License as published by 1109885543Smrg# the Free Software Foundation; either version 2 of the License, or 1209885543Smrg# (at your option) any later version. 1309885543Smrg# 1409885543Smrg# This program is distributed in the hope that it will be useful, but 1509885543Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1609885543Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1709885543Smrg# General Public License for more details. 1809885543Smrg# 1909885543Smrg# You should have received a copy of the GNU General Public License 2009885543Smrg# along with this program; if not, write to the Free Software 2109885543Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 2209885543Smrg# 02110-1301, USA. 2309885543Smrg# 2409885543Smrg# As a special exception to the GNU General Public License, if you 2509885543Smrg# distribute this file as part of a program that contains a 2609885543Smrg# configuration script generated by Autoconf, you may include it under 2709885543Smrg# the same distribution terms that you use for the rest of that program. 2809885543Smrg 2909885543Smrg 3009885543Smrg# Originally written by Per Bothner <per@bothner.com>. 3109885543Smrg# Please send patches to <config-patches@gnu.org>. Submit a context 3209885543Smrg# diff and a properly formatted ChangeLog entry. 3309885543Smrg# 3409885543Smrg# This script attempts to guess a canonical system name similar to 3509885543Smrg# config.sub. If it succeeds, it prints the system name on stdout, and 3609885543Smrg# exits with 0. Otherwise, it exits with 1. 3709885543Smrg# 3809885543Smrg# The plan is that this can be called by configure scripts if you 3909885543Smrg# don't specify an explicit build system type. 4009885543Smrg 4109885543Smrgme=`echo "$0" | sed -e 's,.*/,,'` 4209885543Smrg 4309885543Smrgusage="\ 4409885543SmrgUsage: $0 [OPTION] 4509885543Smrg 4609885543SmrgOutput the configuration name of the system \`$me' is run on. 4709885543Smrg 4809885543SmrgOperation modes: 4909885543Smrg -h, --help print this help, then exit 5009885543Smrg -t, --time-stamp print date of last modification, then exit 5109885543Smrg -v, --version print version number, then exit 5209885543Smrg 5309885543SmrgReport bugs and patches to <config-patches@gnu.org>." 5409885543Smrg 5509885543Smrgversion="\ 5609885543SmrgGNU config.guess ($timestamp) 5709885543Smrg 5809885543SmrgOriginally written by Per Bothner. 5909885543SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 6009885543SmrgFree Software Foundation, Inc. 6109885543Smrg 6209885543SmrgThis is free software; see the source for copying conditions. There is NO 6309885543Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 6409885543Smrg 6509885543Smrghelp=" 6609885543SmrgTry \`$me --help' for more information." 6709885543Smrg 6809885543Smrg# Parse command line 6909885543Smrgwhile test $# -gt 0 ; do 7009885543Smrg case $1 in 7109885543Smrg --time-stamp | --time* | -t ) 7209885543Smrg echo "$timestamp" ; exit ;; 7309885543Smrg --version | -v ) 7409885543Smrg echo "$version" ; exit ;; 7509885543Smrg --help | --h* | -h ) 7609885543Smrg echo "$usage"; exit ;; 7709885543Smrg -- ) # Stop option processing 7809885543Smrg shift; break ;; 7909885543Smrg - ) # Use stdin as input. 8009885543Smrg break ;; 8109885543Smrg -* ) 8209885543Smrg echo "$me: invalid option $1$help" >&2 8309885543Smrg exit 1 ;; 8409885543Smrg * ) 8509885543Smrg break ;; 8609885543Smrg esac 8709885543Smrgdone 8809885543Smrg 8909885543Smrgif test $# != 0; then 9009885543Smrg echo "$me: too many arguments$help" >&2 9109885543Smrg exit 1 9209885543Smrgfi 9309885543Smrg 9409885543Smrgtrap 'exit 1' 1 2 15 9509885543Smrg 9609885543Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 9709885543Smrg# compiler to aid in system detection is discouraged as it requires 9809885543Smrg# temporary files to be created and, as you can see below, it is a 9909885543Smrg# headache to deal with in a portable fashion. 10009885543Smrg 10109885543Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 10209885543Smrg# use `HOST_CC' if defined, but it is deprecated. 10309885543Smrg 10409885543Smrg# Portable tmp directory creation inspired by the Autoconf team. 10509885543Smrg 10609885543Smrgset_cc_for_build=' 10709885543Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 10809885543Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 10909885543Smrg: ${TMPDIR=/tmp} ; 11009885543Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 11109885543Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 11209885543Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 11309885543Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 11409885543Smrgdummy=$tmp/dummy ; 11509885543Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 11609885543Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 11709885543Smrg ,,) echo "int x;" > $dummy.c ; 11809885543Smrg for c in cc gcc c89 c99 ; do 11909885543Smrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 12009885543Smrg CC_FOR_BUILD="$c"; break ; 12109885543Smrg fi ; 12209885543Smrg done ; 12309885543Smrg if test x"$CC_FOR_BUILD" = x ; then 12409885543Smrg CC_FOR_BUILD=no_compiler_found ; 12509885543Smrg fi 12609885543Smrg ;; 12709885543Smrg ,,*) CC_FOR_BUILD=$CC ;; 12809885543Smrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 12909885543Smrgesac ; set_cc_for_build= ;' 13009885543Smrg 13109885543Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 13209885543Smrg# (ghazi@noc.rutgers.edu 1994-08-24) 13309885543Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 13409885543Smrg PATH=$PATH:/.attbin ; export PATH 13509885543Smrgfi 13609885543Smrg 13709885543SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 13809885543SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 13909885543SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 14009885543SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 14109885543Smrg 14209885543Smrg# Note: order is significant - the case branches are not exclusive. 14309885543Smrg 14409885543Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 14509885543Smrg *:NetBSD:*:*) 14609885543Smrg # NetBSD (nbsd) targets should (where applicable) match one or 14709885543Smrg # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 14809885543Smrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 14909885543Smrg # switched to ELF, *-*-netbsd* would select the old 15009885543Smrg # object file format. This provides both forward 15109885543Smrg # compatibility and a consistent mechanism for selecting the 15209885543Smrg # object file format. 15309885543Smrg # 15409885543Smrg # Note: NetBSD doesn't particularly care about the vendor 15509885543Smrg # portion of the name. We always set it to "unknown". 15609885543Smrg sysctl="sysctl -n hw.machine_arch" 15709885543Smrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 15809885543Smrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 15909885543Smrg case "${UNAME_MACHINE_ARCH}" in 16009885543Smrg armeb) machine=armeb-unknown ;; 16109885543Smrg arm*) machine=arm-unknown ;; 16209885543Smrg sh3el) machine=shl-unknown ;; 16309885543Smrg sh3eb) machine=sh-unknown ;; 16409885543Smrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 16509885543Smrg esac 16609885543Smrg # The Operating System including object format, if it has switched 16709885543Smrg # to ELF recently, or will in the future. 16809885543Smrg case "${UNAME_MACHINE_ARCH}" in 16909885543Smrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 17009885543Smrg eval $set_cc_for_build 17109885543Smrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 17209885543Smrg | grep __ELF__ >/dev/null 17309885543Smrg then 17409885543Smrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 17509885543Smrg # Return netbsd for either. FIX? 17609885543Smrg os=netbsd 17709885543Smrg else 17809885543Smrg os=netbsdelf 17909885543Smrg fi 18009885543Smrg ;; 18109885543Smrg *) 18209885543Smrg os=netbsd 18309885543Smrg ;; 18409885543Smrg esac 18509885543Smrg # The OS release 18609885543Smrg # Debian GNU/NetBSD machines have a different userland, and 18709885543Smrg # thus, need a distinct triplet. However, they do not need 18809885543Smrg # kernel version information, so it can be replaced with a 18909885543Smrg # suitable tag, in the style of linux-gnu. 19009885543Smrg case "${UNAME_VERSION}" in 19109885543Smrg Debian*) 19209885543Smrg release='-gnu' 19309885543Smrg ;; 19409885543Smrg *) 19509885543Smrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 19609885543Smrg ;; 19709885543Smrg esac 19809885543Smrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 19909885543Smrg # contains redundant information, the shorter form: 20009885543Smrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 20109885543Smrg echo "${machine}-${os}${release}" 20209885543Smrg exit ;; 20309885543Smrg *:OpenBSD:*:*) 20409885543Smrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 20509885543Smrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 20609885543Smrg exit ;; 20709885543Smrg *:ekkoBSD:*:*) 20809885543Smrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 20909885543Smrg exit ;; 21009885543Smrg *:SolidBSD:*:*) 21109885543Smrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 21209885543Smrg exit ;; 21309885543Smrg macppc:MirBSD:*:*) 21409885543Smrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 21509885543Smrg exit ;; 21609885543Smrg *:MirBSD:*:*) 21709885543Smrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 21809885543Smrg exit ;; 21909885543Smrg alpha:OSF1:*:*) 22009885543Smrg case $UNAME_RELEASE in 22109885543Smrg *4.0) 22209885543Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 22309885543Smrg ;; 22409885543Smrg *5.*) 22509885543Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 22609885543Smrg ;; 22709885543Smrg esac 22809885543Smrg # According to Compaq, /usr/sbin/psrinfo has been available on 22909885543Smrg # OSF/1 and Tru64 systems produced since 1995. I hope that 23009885543Smrg # covers most systems running today. This code pipes the CPU 23109885543Smrg # types through head -n 1, so we only detect the type of CPU 0. 23209885543Smrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 23309885543Smrg case "$ALPHA_CPU_TYPE" in 23409885543Smrg "EV4 (21064)") 23509885543Smrg UNAME_MACHINE="alpha" ;; 23609885543Smrg "EV4.5 (21064)") 23709885543Smrg UNAME_MACHINE="alpha" ;; 23809885543Smrg "LCA4 (21066/21068)") 23909885543Smrg UNAME_MACHINE="alpha" ;; 24009885543Smrg "EV5 (21164)") 24109885543Smrg UNAME_MACHINE="alphaev5" ;; 24209885543Smrg "EV5.6 (21164A)") 24309885543Smrg UNAME_MACHINE="alphaev56" ;; 24409885543Smrg "EV5.6 (21164PC)") 24509885543Smrg UNAME_MACHINE="alphapca56" ;; 24609885543Smrg "EV5.7 (21164PC)") 24709885543Smrg UNAME_MACHINE="alphapca57" ;; 24809885543Smrg "EV6 (21264)") 24909885543Smrg UNAME_MACHINE="alphaev6" ;; 25009885543Smrg "EV6.7 (21264A)") 25109885543Smrg UNAME_MACHINE="alphaev67" ;; 25209885543Smrg "EV6.8CB (21264C)") 25309885543Smrg UNAME_MACHINE="alphaev68" ;; 25409885543Smrg "EV6.8AL (21264B)") 25509885543Smrg UNAME_MACHINE="alphaev68" ;; 25609885543Smrg "EV6.8CX (21264D)") 25709885543Smrg UNAME_MACHINE="alphaev68" ;; 25809885543Smrg "EV6.9A (21264/EV69A)") 25909885543Smrg UNAME_MACHINE="alphaev69" ;; 26009885543Smrg "EV7 (21364)") 26109885543Smrg UNAME_MACHINE="alphaev7" ;; 26209885543Smrg "EV7.9 (21364A)") 26309885543Smrg UNAME_MACHINE="alphaev79" ;; 26409885543Smrg esac 26509885543Smrg # A Pn.n version is a patched version. 26609885543Smrg # A Vn.n version is a released version. 26709885543Smrg # A Tn.n version is a released field test version. 26809885543Smrg # A Xn.n version is an unreleased experimental baselevel. 26909885543Smrg # 1.2 uses "1.2" for uname -r. 27009885543Smrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27109885543Smrg exit ;; 27209885543Smrg Alpha\ *:Windows_NT*:*) 27309885543Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 27409885543Smrg # Should we change UNAME_MACHINE based on the output of uname instead 27509885543Smrg # of the specific Alpha model? 27609885543Smrg echo alpha-pc-interix 27709885543Smrg exit ;; 27809885543Smrg 21064:Windows_NT:50:3) 27909885543Smrg echo alpha-dec-winnt3.5 28009885543Smrg exit ;; 28109885543Smrg Amiga*:UNIX_System_V:4.0:*) 28209885543Smrg echo m68k-unknown-sysv4 28309885543Smrg exit ;; 28409885543Smrg *:[Aa]miga[Oo][Ss]:*:*) 28509885543Smrg echo ${UNAME_MACHINE}-unknown-amigaos 28609885543Smrg exit ;; 28709885543Smrg *:[Mm]orph[Oo][Ss]:*:*) 28809885543Smrg echo ${UNAME_MACHINE}-unknown-morphos 28909885543Smrg exit ;; 29009885543Smrg *:OS/390:*:*) 29109885543Smrg echo i370-ibm-openedition 29209885543Smrg exit ;; 29309885543Smrg *:z/VM:*:*) 29409885543Smrg echo s390-ibm-zvmoe 29509885543Smrg exit ;; 29609885543Smrg *:OS400:*:*) 29709885543Smrg echo powerpc-ibm-os400 29809885543Smrg exit ;; 29909885543Smrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 30009885543Smrg echo arm-acorn-riscix${UNAME_RELEASE} 30109885543Smrg exit ;; 30209885543Smrg arm:riscos:*:*|arm:RISCOS:*:*) 30309885543Smrg echo arm-unknown-riscos 30409885543Smrg exit ;; 30509885543Smrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 30609885543Smrg echo hppa1.1-hitachi-hiuxmpp 30709885543Smrg exit ;; 30809885543Smrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 30909885543Smrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 31009885543Smrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 31109885543Smrg echo pyramid-pyramid-sysv3 31209885543Smrg else 31309885543Smrg echo pyramid-pyramid-bsd 31409885543Smrg fi 31509885543Smrg exit ;; 31609885543Smrg NILE*:*:*:dcosx) 31709885543Smrg echo pyramid-pyramid-svr4 31809885543Smrg exit ;; 31909885543Smrg DRS?6000:unix:4.0:6*) 32009885543Smrg echo sparc-icl-nx6 32109885543Smrg exit ;; 32209885543Smrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 32309885543Smrg case `/usr/bin/uname -p` in 32409885543Smrg sparc) echo sparc-icl-nx7; exit ;; 32509885543Smrg esac ;; 32609885543Smrg sun4H:SunOS:5.*:*) 32709885543Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 32809885543Smrg exit ;; 32909885543Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 33009885543Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 33109885543Smrg exit ;; 33209885543Smrg i86pc:SunOS:5.*:*) 33309885543Smrg echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 33409885543Smrg exit ;; 33509885543Smrg sun4*:SunOS:6*:*) 33609885543Smrg # According to config.sub, this is the proper way to canonicalize 33709885543Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 33809885543Smrg # it's likely to be more like Solaris than SunOS4. 33909885543Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 34009885543Smrg exit ;; 34109885543Smrg sun4*:SunOS:*:*) 34209885543Smrg case "`/usr/bin/arch -k`" in 34309885543Smrg Series*|S4*) 34409885543Smrg UNAME_RELEASE=`uname -v` 34509885543Smrg ;; 34609885543Smrg esac 34709885543Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 34809885543Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 34909885543Smrg exit ;; 35009885543Smrg sun3*:SunOS:*:*) 35109885543Smrg echo m68k-sun-sunos${UNAME_RELEASE} 35209885543Smrg exit ;; 35309885543Smrg sun*:*:4.2BSD:*) 35409885543Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 35509885543Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 35609885543Smrg case "`/bin/arch`" in 35709885543Smrg sun3) 35809885543Smrg echo m68k-sun-sunos${UNAME_RELEASE} 35909885543Smrg ;; 36009885543Smrg sun4) 36109885543Smrg echo sparc-sun-sunos${UNAME_RELEASE} 36209885543Smrg ;; 36309885543Smrg esac 36409885543Smrg exit ;; 36509885543Smrg aushp:SunOS:*:*) 36609885543Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 36709885543Smrg exit ;; 36809885543Smrg # The situation for MiNT is a little confusing. The machine name 36909885543Smrg # can be virtually everything (everything which is not 37009885543Smrg # "atarist" or "atariste" at least should have a processor 37109885543Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 37209885543Smrg # to the lowercase version "mint" (or "freemint"). Finally 37309885543Smrg # the system name "TOS" denotes a system which is actually not 37409885543Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 37509885543Smrg # be no problem. 37609885543Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 37709885543Smrg echo m68k-atari-mint${UNAME_RELEASE} 37809885543Smrg exit ;; 37909885543Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 38009885543Smrg echo m68k-atari-mint${UNAME_RELEASE} 38109885543Smrg exit ;; 38209885543Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 38309885543Smrg echo m68k-atari-mint${UNAME_RELEASE} 38409885543Smrg exit ;; 38509885543Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 38609885543Smrg echo m68k-milan-mint${UNAME_RELEASE} 38709885543Smrg exit ;; 38809885543Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 38909885543Smrg echo m68k-hades-mint${UNAME_RELEASE} 39009885543Smrg exit ;; 39109885543Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 39209885543Smrg echo m68k-unknown-mint${UNAME_RELEASE} 39309885543Smrg exit ;; 39409885543Smrg m68k:machten:*:*) 39509885543Smrg echo m68k-apple-machten${UNAME_RELEASE} 39609885543Smrg exit ;; 39709885543Smrg powerpc:machten:*:*) 39809885543Smrg echo powerpc-apple-machten${UNAME_RELEASE} 39909885543Smrg exit ;; 40009885543Smrg RISC*:Mach:*:*) 40109885543Smrg echo mips-dec-mach_bsd4.3 40209885543Smrg exit ;; 40309885543Smrg RISC*:ULTRIX:*:*) 40409885543Smrg echo mips-dec-ultrix${UNAME_RELEASE} 40509885543Smrg exit ;; 40609885543Smrg VAX*:ULTRIX*:*:*) 40709885543Smrg echo vax-dec-ultrix${UNAME_RELEASE} 40809885543Smrg exit ;; 40909885543Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 41009885543Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 41109885543Smrg exit ;; 41209885543Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 41309885543Smrg eval $set_cc_for_build 41409885543Smrg sed 's/^ //' << EOF >$dummy.c 41509885543Smrg#ifdef __cplusplus 41609885543Smrg#include <stdio.h> /* for printf() prototype */ 41709885543Smrg int main (int argc, char *argv[]) { 41809885543Smrg#else 41909885543Smrg int main (argc, argv) int argc; char *argv[]; { 42009885543Smrg#endif 42109885543Smrg #if defined (host_mips) && defined (MIPSEB) 42209885543Smrg #if defined (SYSTYPE_SYSV) 42309885543Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 42409885543Smrg #endif 42509885543Smrg #if defined (SYSTYPE_SVR4) 42609885543Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 42709885543Smrg #endif 42809885543Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 42909885543Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 43009885543Smrg #endif 43109885543Smrg #endif 43209885543Smrg exit (-1); 43309885543Smrg } 43409885543SmrgEOF 43509885543Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 43609885543Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 43709885543Smrg SYSTEM_NAME=`$dummy $dummyarg` && 43809885543Smrg { echo "$SYSTEM_NAME"; exit; } 43909885543Smrg echo mips-mips-riscos${UNAME_RELEASE} 44009885543Smrg exit ;; 44109885543Smrg Motorola:PowerMAX_OS:*:*) 44209885543Smrg echo powerpc-motorola-powermax 44309885543Smrg exit ;; 44409885543Smrg Motorola:*:4.3:PL8-*) 44509885543Smrg echo powerpc-harris-powermax 44609885543Smrg exit ;; 44709885543Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 44809885543Smrg echo powerpc-harris-powermax 44909885543Smrg exit ;; 45009885543Smrg Night_Hawk:Power_UNIX:*:*) 45109885543Smrg echo powerpc-harris-powerunix 45209885543Smrg exit ;; 45309885543Smrg m88k:CX/UX:7*:*) 45409885543Smrg echo m88k-harris-cxux7 45509885543Smrg exit ;; 45609885543Smrg m88k:*:4*:R4*) 45709885543Smrg echo m88k-motorola-sysv4 45809885543Smrg exit ;; 45909885543Smrg m88k:*:3*:R3*) 46009885543Smrg echo m88k-motorola-sysv3 46109885543Smrg exit ;; 46209885543Smrg AViiON:dgux:*:*) 46309885543Smrg # DG/UX returns AViiON for all architectures 46409885543Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 46509885543Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 46609885543Smrg then 46709885543Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 46809885543Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 46909885543Smrg then 47009885543Smrg echo m88k-dg-dgux${UNAME_RELEASE} 47109885543Smrg else 47209885543Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 47309885543Smrg fi 47409885543Smrg else 47509885543Smrg echo i586-dg-dgux${UNAME_RELEASE} 47609885543Smrg fi 47709885543Smrg exit ;; 47809885543Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 47909885543Smrg echo m88k-dolphin-sysv3 48009885543Smrg exit ;; 48109885543Smrg M88*:*:R3*:*) 48209885543Smrg # Delta 88k system running SVR3 48309885543Smrg echo m88k-motorola-sysv3 48409885543Smrg exit ;; 48509885543Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 48609885543Smrg echo m88k-tektronix-sysv3 48709885543Smrg exit ;; 48809885543Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 48909885543Smrg echo m68k-tektronix-bsd 49009885543Smrg exit ;; 49109885543Smrg *:IRIX*:*:*) 49209885543Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 49309885543Smrg exit ;; 49409885543Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 49509885543Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 49609885543Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 49709885543Smrg i*86:AIX:*:*) 49809885543Smrg echo i386-ibm-aix 49909885543Smrg exit ;; 50009885543Smrg ia64:AIX:*:*) 50109885543Smrg if [ -x /usr/bin/oslevel ] ; then 50209885543Smrg IBM_REV=`/usr/bin/oslevel` 50309885543Smrg else 50409885543Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 50509885543Smrg fi 50609885543Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 50709885543Smrg exit ;; 50809885543Smrg *:AIX:2:3) 50909885543Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 51009885543Smrg eval $set_cc_for_build 51109885543Smrg sed 's/^ //' << EOF >$dummy.c 51209885543Smrg #include <sys/systemcfg.h> 51309885543Smrg 51409885543Smrg main() 51509885543Smrg { 51609885543Smrg if (!__power_pc()) 51709885543Smrg exit(1); 51809885543Smrg puts("powerpc-ibm-aix3.2.5"); 51909885543Smrg exit(0); 52009885543Smrg } 52109885543SmrgEOF 52209885543Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 52309885543Smrg then 52409885543Smrg echo "$SYSTEM_NAME" 52509885543Smrg else 52609885543Smrg echo rs6000-ibm-aix3.2.5 52709885543Smrg fi 52809885543Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 52909885543Smrg echo rs6000-ibm-aix3.2.4 53009885543Smrg else 53109885543Smrg echo rs6000-ibm-aix3.2 53209885543Smrg fi 53309885543Smrg exit ;; 53409885543Smrg *:AIX:*:[45]) 53509885543Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 53609885543Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 53709885543Smrg IBM_ARCH=rs6000 53809885543Smrg else 53909885543Smrg IBM_ARCH=powerpc 54009885543Smrg fi 54109885543Smrg if [ -x /usr/bin/oslevel ] ; then 54209885543Smrg IBM_REV=`/usr/bin/oslevel` 54309885543Smrg else 54409885543Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 54509885543Smrg fi 54609885543Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 54709885543Smrg exit ;; 54809885543Smrg *:AIX:*:*) 54909885543Smrg echo rs6000-ibm-aix 55009885543Smrg exit ;; 55109885543Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 55209885543Smrg echo romp-ibm-bsd4.4 55309885543Smrg exit ;; 55409885543Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 55509885543Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 55609885543Smrg exit ;; # report: romp-ibm BSD 4.3 55709885543Smrg *:BOSX:*:*) 55809885543Smrg echo rs6000-bull-bosx 55909885543Smrg exit ;; 56009885543Smrg DPX/2?00:B.O.S.:*:*) 56109885543Smrg echo m68k-bull-sysv3 56209885543Smrg exit ;; 56309885543Smrg 9000/[34]??:4.3bsd:1.*:*) 56409885543Smrg echo m68k-hp-bsd 56509885543Smrg exit ;; 56609885543Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 56709885543Smrg echo m68k-hp-bsd4.4 56809885543Smrg exit ;; 56909885543Smrg 9000/[34678]??:HP-UX:*:*) 57009885543Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 57109885543Smrg case "${UNAME_MACHINE}" in 57209885543Smrg 9000/31? ) HP_ARCH=m68000 ;; 57309885543Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 57409885543Smrg 9000/[678][0-9][0-9]) 57509885543Smrg if [ -x /usr/bin/getconf ]; then 57609885543Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 57709885543Smrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 57809885543Smrg case "${sc_cpu_version}" in 57909885543Smrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 58009885543Smrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 58109885543Smrg 532) # CPU_PA_RISC2_0 58209885543Smrg case "${sc_kernel_bits}" in 58309885543Smrg 32) HP_ARCH="hppa2.0n" ;; 58409885543Smrg 64) HP_ARCH="hppa2.0w" ;; 58509885543Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 58609885543Smrg esac ;; 58709885543Smrg esac 58809885543Smrg fi 58909885543Smrg if [ "${HP_ARCH}" = "" ]; then 59009885543Smrg eval $set_cc_for_build 59109885543Smrg sed 's/^ //' << EOF >$dummy.c 59209885543Smrg 59309885543Smrg #define _HPUX_SOURCE 59409885543Smrg #include <stdlib.h> 59509885543Smrg #include <unistd.h> 59609885543Smrg 59709885543Smrg int main () 59809885543Smrg { 59909885543Smrg #if defined(_SC_KERNEL_BITS) 60009885543Smrg long bits = sysconf(_SC_KERNEL_BITS); 60109885543Smrg #endif 60209885543Smrg long cpu = sysconf (_SC_CPU_VERSION); 60309885543Smrg 60409885543Smrg switch (cpu) 60509885543Smrg { 60609885543Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 60709885543Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 60809885543Smrg case CPU_PA_RISC2_0: 60909885543Smrg #if defined(_SC_KERNEL_BITS) 61009885543Smrg switch (bits) 61109885543Smrg { 61209885543Smrg case 64: puts ("hppa2.0w"); break; 61309885543Smrg case 32: puts ("hppa2.0n"); break; 61409885543Smrg default: puts ("hppa2.0"); break; 61509885543Smrg } break; 61609885543Smrg #else /* !defined(_SC_KERNEL_BITS) */ 61709885543Smrg puts ("hppa2.0"); break; 61809885543Smrg #endif 61909885543Smrg default: puts ("hppa1.0"); break; 62009885543Smrg } 62109885543Smrg exit (0); 62209885543Smrg } 62309885543SmrgEOF 62409885543Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 62509885543Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 62609885543Smrg fi ;; 62709885543Smrg esac 62809885543Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 62909885543Smrg then 63009885543Smrg eval $set_cc_for_build 63109885543Smrg 63209885543Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 63309885543Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 63409885543Smrg # generating 64-bit code. GNU and HP use different nomenclature: 63509885543Smrg # 63609885543Smrg # $ CC_FOR_BUILD=cc ./config.guess 63709885543Smrg # => hppa2.0w-hp-hpux11.23 63809885543Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 63909885543Smrg # => hppa64-hp-hpux11.23 64009885543Smrg 64109885543Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 64209885543Smrg grep __LP64__ >/dev/null 64309885543Smrg then 64409885543Smrg HP_ARCH="hppa2.0w" 64509885543Smrg else 64609885543Smrg HP_ARCH="hppa64" 64709885543Smrg fi 64809885543Smrg fi 64909885543Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 65009885543Smrg exit ;; 65109885543Smrg ia64:HP-UX:*:*) 65209885543Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 65309885543Smrg echo ia64-hp-hpux${HPUX_REV} 65409885543Smrg exit ;; 65509885543Smrg 3050*:HI-UX:*:*) 65609885543Smrg eval $set_cc_for_build 65709885543Smrg sed 's/^ //' << EOF >$dummy.c 65809885543Smrg #include <unistd.h> 65909885543Smrg int 66009885543Smrg main () 66109885543Smrg { 66209885543Smrg long cpu = sysconf (_SC_CPU_VERSION); 66309885543Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 66409885543Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 66509885543Smrg results, however. */ 66609885543Smrg if (CPU_IS_PA_RISC (cpu)) 66709885543Smrg { 66809885543Smrg switch (cpu) 66909885543Smrg { 67009885543Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 67109885543Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 67209885543Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 67309885543Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 67409885543Smrg } 67509885543Smrg } 67609885543Smrg else if (CPU_IS_HP_MC68K (cpu)) 67709885543Smrg puts ("m68k-hitachi-hiuxwe2"); 67809885543Smrg else puts ("unknown-hitachi-hiuxwe2"); 67909885543Smrg exit (0); 68009885543Smrg } 68109885543SmrgEOF 68209885543Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 68309885543Smrg { echo "$SYSTEM_NAME"; exit; } 68409885543Smrg echo unknown-hitachi-hiuxwe2 68509885543Smrg exit ;; 68609885543Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 68709885543Smrg echo hppa1.1-hp-bsd 68809885543Smrg exit ;; 68909885543Smrg 9000/8??:4.3bsd:*:*) 69009885543Smrg echo hppa1.0-hp-bsd 69109885543Smrg exit ;; 69209885543Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 69309885543Smrg echo hppa1.0-hp-mpeix 69409885543Smrg exit ;; 69509885543Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 69609885543Smrg echo hppa1.1-hp-osf 69709885543Smrg exit ;; 69809885543Smrg hp8??:OSF1:*:*) 69909885543Smrg echo hppa1.0-hp-osf 70009885543Smrg exit ;; 70109885543Smrg i*86:OSF1:*:*) 70209885543Smrg if [ -x /usr/sbin/sysversion ] ; then 70309885543Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 70409885543Smrg else 70509885543Smrg echo ${UNAME_MACHINE}-unknown-osf1 70609885543Smrg fi 70709885543Smrg exit ;; 70809885543Smrg parisc*:Lites*:*:*) 70909885543Smrg echo hppa1.1-hp-lites 71009885543Smrg exit ;; 71109885543Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 71209885543Smrg echo c1-convex-bsd 71309885543Smrg exit ;; 71409885543Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 71509885543Smrg if getsysinfo -f scalar_acc 71609885543Smrg then echo c32-convex-bsd 71709885543Smrg else echo c2-convex-bsd 71809885543Smrg fi 71909885543Smrg exit ;; 72009885543Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 72109885543Smrg echo c34-convex-bsd 72209885543Smrg exit ;; 72309885543Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 72409885543Smrg echo c38-convex-bsd 72509885543Smrg exit ;; 72609885543Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 72709885543Smrg echo c4-convex-bsd 72809885543Smrg exit ;; 72909885543Smrg CRAY*Y-MP:*:*:*) 73009885543Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 73109885543Smrg exit ;; 73209885543Smrg CRAY*[A-Z]90:*:*:*) 73309885543Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 73409885543Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 73509885543Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 73609885543Smrg -e 's/\.[^.]*$/.X/' 73709885543Smrg exit ;; 73809885543Smrg CRAY*TS:*:*:*) 73909885543Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 74009885543Smrg exit ;; 74109885543Smrg CRAY*T3E:*:*:*) 74209885543Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 74309885543Smrg exit ;; 74409885543Smrg CRAY*SV1:*:*:*) 74509885543Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 74609885543Smrg exit ;; 74709885543Smrg *:UNICOS/mp:*:*) 74809885543Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 74909885543Smrg exit ;; 75009885543Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 75109885543Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 75209885543Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 75309885543Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 75409885543Smrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 75509885543Smrg exit ;; 75609885543Smrg 5000:UNIX_System_V:4.*:*) 75709885543Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 75809885543Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 75909885543Smrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 76009885543Smrg exit ;; 76109885543Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 76209885543Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 76309885543Smrg exit ;; 76409885543Smrg sparc*:BSD/OS:*:*) 76509885543Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 76609885543Smrg exit ;; 76709885543Smrg *:BSD/OS:*:*) 76809885543Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 76909885543Smrg exit ;; 77009885543Smrg *:FreeBSD:*:*) 77109885543Smrg case ${UNAME_MACHINE} in 77209885543Smrg pc98) 77309885543Smrg echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 77409885543Smrg amd64) 77509885543Smrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 77609885543Smrg *) 77709885543Smrg echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 77809885543Smrg esac 77909885543Smrg exit ;; 78009885543Smrg i*:CYGWIN*:*) 78109885543Smrg echo ${UNAME_MACHINE}-pc-cygwin 78209885543Smrg exit ;; 78309885543Smrg i*:MINGW*:*) 78409885543Smrg echo ${UNAME_MACHINE}-pc-mingw32 78509885543Smrg exit ;; 78609885543Smrg i*:windows32*:*) 78709885543Smrg # uname -m includes "-pc" on this system. 78809885543Smrg echo ${UNAME_MACHINE}-mingw32 78909885543Smrg exit ;; 79009885543Smrg i*:PW*:*) 79109885543Smrg echo ${UNAME_MACHINE}-pc-pw32 79209885543Smrg exit ;; 79309885543Smrg x86:Interix*:[3456]*) 79409885543Smrg echo i586-pc-interix${UNAME_RELEASE} 79509885543Smrg exit ;; 79609885543Smrg EM64T:Interix*:[3456]*) 79709885543Smrg echo x86_64-unknown-interix${UNAME_RELEASE} 79809885543Smrg exit ;; 79909885543Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 80009885543Smrg echo i${UNAME_MACHINE}-pc-mks 80109885543Smrg exit ;; 80209885543Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 80309885543Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 80409885543Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 80509885543Smrg # UNAME_MACHINE based on the output of uname instead of i386? 80609885543Smrg echo i586-pc-interix 80709885543Smrg exit ;; 80809885543Smrg i*:UWIN*:*) 80909885543Smrg echo ${UNAME_MACHINE}-pc-uwin 81009885543Smrg exit ;; 81109885543Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 81209885543Smrg echo x86_64-unknown-cygwin 81309885543Smrg exit ;; 81409885543Smrg p*:CYGWIN*:*) 81509885543Smrg echo powerpcle-unknown-cygwin 81609885543Smrg exit ;; 81709885543Smrg prep*:SunOS:5.*:*) 81809885543Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 81909885543Smrg exit ;; 82009885543Smrg *:GNU:*:*) 82109885543Smrg # the GNU system 82209885543Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 82309885543Smrg exit ;; 82409885543Smrg *:GNU/*:*:*) 82509885543Smrg # other systems with GNU libc and userland 82609885543Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 82709885543Smrg exit ;; 82809885543Smrg i*86:Minix:*:*) 82909885543Smrg echo ${UNAME_MACHINE}-pc-minix 83009885543Smrg exit ;; 83109885543Smrg arm*:Linux:*:*) 83209885543Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 83309885543Smrg exit ;; 83409885543Smrg avr32*:Linux:*:*) 83509885543Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 83609885543Smrg exit ;; 83709885543Smrg cris:Linux:*:*) 83809885543Smrg echo cris-axis-linux-gnu 83909885543Smrg exit ;; 84009885543Smrg crisv32:Linux:*:*) 84109885543Smrg echo crisv32-axis-linux-gnu 84209885543Smrg exit ;; 84309885543Smrg frv:Linux:*:*) 84409885543Smrg echo frv-unknown-linux-gnu 84509885543Smrg exit ;; 84609885543Smrg ia64:Linux:*:*) 84709885543Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 84809885543Smrg exit ;; 84909885543Smrg m32r*:Linux:*:*) 85009885543Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 85109885543Smrg exit ;; 85209885543Smrg m68*:Linux:*:*) 85309885543Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 85409885543Smrg exit ;; 85509885543Smrg mips:Linux:*:*) 85609885543Smrg eval $set_cc_for_build 85709885543Smrg sed 's/^ //' << EOF >$dummy.c 85809885543Smrg #undef CPU 85909885543Smrg #undef mips 86009885543Smrg #undef mipsel 86109885543Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 86209885543Smrg CPU=mipsel 86309885543Smrg #else 86409885543Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 86509885543Smrg CPU=mips 86609885543Smrg #else 86709885543Smrg CPU= 86809885543Smrg #endif 86909885543Smrg #endif 87009885543SmrgEOF 87109885543Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 87209885543Smrg /^CPU/{ 87309885543Smrg s: ::g 87409885543Smrg p 87509885543Smrg }'`" 87609885543Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 87709885543Smrg ;; 87809885543Smrg mips64:Linux:*:*) 87909885543Smrg eval $set_cc_for_build 88009885543Smrg sed 's/^ //' << EOF >$dummy.c 88109885543Smrg #undef CPU 88209885543Smrg #undef mips64 88309885543Smrg #undef mips64el 88409885543Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 88509885543Smrg CPU=mips64el 88609885543Smrg #else 88709885543Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 88809885543Smrg CPU=mips64 88909885543Smrg #else 89009885543Smrg CPU= 89109885543Smrg #endif 89209885543Smrg #endif 89309885543SmrgEOF 89409885543Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 89509885543Smrg /^CPU/{ 89609885543Smrg s: ::g 89709885543Smrg p 89809885543Smrg }'`" 89909885543Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 90009885543Smrg ;; 90109885543Smrg or32:Linux:*:*) 90209885543Smrg echo or32-unknown-linux-gnu 90309885543Smrg exit ;; 90409885543Smrg ppc:Linux:*:*) 90509885543Smrg echo powerpc-unknown-linux-gnu 90609885543Smrg exit ;; 90709885543Smrg ppc64:Linux:*:*) 90809885543Smrg echo powerpc64-unknown-linux-gnu 90909885543Smrg exit ;; 91009885543Smrg alpha:Linux:*:*) 91109885543Smrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 91209885543Smrg EV5) UNAME_MACHINE=alphaev5 ;; 91309885543Smrg EV56) UNAME_MACHINE=alphaev56 ;; 91409885543Smrg PCA56) UNAME_MACHINE=alphapca56 ;; 91509885543Smrg PCA57) UNAME_MACHINE=alphapca56 ;; 91609885543Smrg EV6) UNAME_MACHINE=alphaev6 ;; 91709885543Smrg EV67) UNAME_MACHINE=alphaev67 ;; 91809885543Smrg EV68*) UNAME_MACHINE=alphaev68 ;; 91909885543Smrg esac 92009885543Smrg objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 92109885543Smrg if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 92209885543Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 92309885543Smrg exit ;; 92409885543Smrg parisc:Linux:*:* | hppa:Linux:*:*) 92509885543Smrg # Look for CPU level 92609885543Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 92709885543Smrg PA7*) echo hppa1.1-unknown-linux-gnu ;; 92809885543Smrg PA8*) echo hppa2.0-unknown-linux-gnu ;; 92909885543Smrg *) echo hppa-unknown-linux-gnu ;; 93009885543Smrg esac 93109885543Smrg exit ;; 93209885543Smrg parisc64:Linux:*:* | hppa64:Linux:*:*) 93309885543Smrg echo hppa64-unknown-linux-gnu 93409885543Smrg exit ;; 93509885543Smrg s390:Linux:*:* | s390x:Linux:*:*) 93609885543Smrg echo ${UNAME_MACHINE}-ibm-linux 93709885543Smrg exit ;; 93809885543Smrg sh64*:Linux:*:*) 93909885543Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 94009885543Smrg exit ;; 94109885543Smrg sh*:Linux:*:*) 94209885543Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 94309885543Smrg exit ;; 94409885543Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 94509885543Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 94609885543Smrg exit ;; 94709885543Smrg vax:Linux:*:*) 94809885543Smrg echo ${UNAME_MACHINE}-dec-linux-gnu 94909885543Smrg exit ;; 95009885543Smrg x86_64:Linux:*:*) 95109885543Smrg echo x86_64-unknown-linux-gnu 95209885543Smrg exit ;; 95309885543Smrg i*86:Linux:*:*) 95409885543Smrg # The BFD linker knows what the default object file format is, so 95509885543Smrg # first see if it will tell us. cd to the root directory to prevent 95609885543Smrg # problems with other programs or directories called `ld' in the path. 95709885543Smrg # Set LC_ALL=C to ensure ld outputs messages in English. 95809885543Smrg ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ 95909885543Smrg | sed -ne '/supported targets:/!d 96009885543Smrg s/[ ][ ]*/ /g 96109885543Smrg s/.*supported targets: *// 96209885543Smrg s/ .*// 96309885543Smrg p'` 96409885543Smrg case "$ld_supported_targets" in 96509885543Smrg elf32-i386) 96609885543Smrg TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 96709885543Smrg ;; 96809885543Smrg a.out-i386-linux) 96909885543Smrg echo "${UNAME_MACHINE}-pc-linux-gnuaout" 97009885543Smrg exit ;; 97109885543Smrg coff-i386) 97209885543Smrg echo "${UNAME_MACHINE}-pc-linux-gnucoff" 97309885543Smrg exit ;; 97409885543Smrg "") 97509885543Smrg # Either a pre-BFD a.out linker (linux-gnuoldld) or 97609885543Smrg # one that does not give us useful --help. 97709885543Smrg echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 97809885543Smrg exit ;; 97909885543Smrg esac 98009885543Smrg # Determine whether the default compiler is a.out or elf 98109885543Smrg eval $set_cc_for_build 98209885543Smrg sed 's/^ //' << EOF >$dummy.c 98309885543Smrg #include <features.h> 98409885543Smrg #ifdef __ELF__ 98509885543Smrg # ifdef __GLIBC__ 98609885543Smrg # if __GLIBC__ >= 2 98709885543Smrg LIBC=gnu 98809885543Smrg # else 98909885543Smrg LIBC=gnulibc1 99009885543Smrg # endif 99109885543Smrg # else 99209885543Smrg LIBC=gnulibc1 99309885543Smrg # endif 99409885543Smrg #else 99509885543Smrg #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) 99609885543Smrg LIBC=gnu 99709885543Smrg #else 99809885543Smrg LIBC=gnuaout 99909885543Smrg #endif 100009885543Smrg #endif 100109885543Smrg #ifdef __dietlibc__ 100209885543Smrg LIBC=dietlibc 100309885543Smrg #endif 100409885543SmrgEOF 100509885543Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 100609885543Smrg /^LIBC/{ 100709885543Smrg s: ::g 100809885543Smrg p 100909885543Smrg }'`" 101009885543Smrg test x"${LIBC}" != x && { 101109885543Smrg echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 101209885543Smrg exit 101309885543Smrg } 101409885543Smrg test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } 101509885543Smrg ;; 101609885543Smrg i*86:DYNIX/ptx:4*:*) 101709885543Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 101809885543Smrg # earlier versions are messed up and put the nodename in both 101909885543Smrg # sysname and nodename. 102009885543Smrg echo i386-sequent-sysv4 102109885543Smrg exit ;; 102209885543Smrg i*86:UNIX_SV:4.2MP:2.*) 102309885543Smrg # Unixware is an offshoot of SVR4, but it has its own version 102409885543Smrg # number series starting with 2... 102509885543Smrg # I am not positive that other SVR4 systems won't match this, 102609885543Smrg # I just have to hope. -- rms. 102709885543Smrg # Use sysv4.2uw... so that sysv4* matches it. 102809885543Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 102909885543Smrg exit ;; 103009885543Smrg i*86:OS/2:*:*) 103109885543Smrg # If we were able to find `uname', then EMX Unix compatibility 103209885543Smrg # is probably installed. 103309885543Smrg echo ${UNAME_MACHINE}-pc-os2-emx 103409885543Smrg exit ;; 103509885543Smrg i*86:XTS-300:*:STOP) 103609885543Smrg echo ${UNAME_MACHINE}-unknown-stop 103709885543Smrg exit ;; 103809885543Smrg i*86:atheos:*:*) 103909885543Smrg echo ${UNAME_MACHINE}-unknown-atheos 104009885543Smrg exit ;; 104109885543Smrg i*86:syllable:*:*) 104209885543Smrg echo ${UNAME_MACHINE}-pc-syllable 104309885543Smrg exit ;; 104409885543Smrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 104509885543Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 104609885543Smrg exit ;; 104709885543Smrg i*86:*DOS:*:*) 104809885543Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 104909885543Smrg exit ;; 105009885543Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 105109885543Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 105209885543Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 105309885543Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 105409885543Smrg else 105509885543Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 105609885543Smrg fi 105709885543Smrg exit ;; 105809885543Smrg i*86:*:5:[678]*) 105909885543Smrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 106009885543Smrg case `/bin/uname -X | grep "^Machine"` in 106109885543Smrg *486*) UNAME_MACHINE=i486 ;; 106209885543Smrg *Pentium) UNAME_MACHINE=i586 ;; 106309885543Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 106409885543Smrg esac 106509885543Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 106609885543Smrg exit ;; 106709885543Smrg i*86:*:3.2:*) 106809885543Smrg if test -f /usr/options/cb.name; then 106909885543Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 107009885543Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 107109885543Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 107209885543Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 107309885543Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 107409885543Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 107509885543Smrg && UNAME_MACHINE=i586 107609885543Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 107709885543Smrg && UNAME_MACHINE=i686 107809885543Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 107909885543Smrg && UNAME_MACHINE=i686 108009885543Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 108109885543Smrg else 108209885543Smrg echo ${UNAME_MACHINE}-pc-sysv32 108309885543Smrg fi 108409885543Smrg exit ;; 108509885543Smrg pc:*:*:*) 108609885543Smrg # Left here for compatibility: 108709885543Smrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 108809885543Smrg # the processor, so we play safe by assuming i386. 108909885543Smrg echo i386-pc-msdosdjgpp 109009885543Smrg exit ;; 109109885543Smrg Intel:Mach:3*:*) 109209885543Smrg echo i386-pc-mach3 109309885543Smrg exit ;; 109409885543Smrg paragon:*:*:*) 109509885543Smrg echo i860-intel-osf1 109609885543Smrg exit ;; 109709885543Smrg i860:*:4.*:*) # i860-SVR4 109809885543Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 109909885543Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 110009885543Smrg else # Add other i860-SVR4 vendors below as they are discovered. 110109885543Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 110209885543Smrg fi 110309885543Smrg exit ;; 110409885543Smrg mini*:CTIX:SYS*5:*) 110509885543Smrg # "miniframe" 110609885543Smrg echo m68010-convergent-sysv 110709885543Smrg exit ;; 110809885543Smrg mc68k:UNIX:SYSTEM5:3.51m) 110909885543Smrg echo m68k-convergent-sysv 111009885543Smrg exit ;; 111109885543Smrg M680?0:D-NIX:5.3:*) 111209885543Smrg echo m68k-diab-dnix 111309885543Smrg exit ;; 111409885543Smrg M68*:*:R3V[5678]*:*) 111509885543Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 111609885543Smrg 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) 111709885543Smrg OS_REL='' 111809885543Smrg test -r /etc/.relid \ 111909885543Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 112009885543Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 112109885543Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 112209885543Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 112309885543Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 112409885543Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 112509885543Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 112609885543Smrg && { echo i486-ncr-sysv4; exit; } ;; 112709885543Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 112809885543Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 112909885543Smrg exit ;; 113009885543Smrg mc68030:UNIX_System_V:4.*:*) 113109885543Smrg echo m68k-atari-sysv4 113209885543Smrg exit ;; 113309885543Smrg TSUNAMI:LynxOS:2.*:*) 113409885543Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 113509885543Smrg exit ;; 113609885543Smrg rs6000:LynxOS:2.*:*) 113709885543Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 113809885543Smrg exit ;; 113909885543Smrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 114009885543Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 114109885543Smrg exit ;; 114209885543Smrg SM[BE]S:UNIX_SV:*:*) 114309885543Smrg echo mips-dde-sysv${UNAME_RELEASE} 114409885543Smrg exit ;; 114509885543Smrg RM*:ReliantUNIX-*:*:*) 114609885543Smrg echo mips-sni-sysv4 114709885543Smrg exit ;; 114809885543Smrg RM*:SINIX-*:*:*) 114909885543Smrg echo mips-sni-sysv4 115009885543Smrg exit ;; 115109885543Smrg *:SINIX-*:*:*) 115209885543Smrg if uname -p 2>/dev/null >/dev/null ; then 115309885543Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 115409885543Smrg echo ${UNAME_MACHINE}-sni-sysv4 115509885543Smrg else 115609885543Smrg echo ns32k-sni-sysv 115709885543Smrg fi 115809885543Smrg exit ;; 115909885543Smrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 116009885543Smrg # says <Richard.M.Bartel@ccMail.Census.GOV> 116109885543Smrg echo i586-unisys-sysv4 116209885543Smrg exit ;; 116309885543Smrg *:UNIX_System_V:4*:FTX*) 116409885543Smrg # From Gerald Hewes <hewes@openmarket.com>. 116509885543Smrg # How about differentiating between stratus architectures? -djm 116609885543Smrg echo hppa1.1-stratus-sysv4 116709885543Smrg exit ;; 116809885543Smrg *:*:*:FTX*) 116909885543Smrg # From seanf@swdc.stratus.com. 117009885543Smrg echo i860-stratus-sysv4 117109885543Smrg exit ;; 117209885543Smrg i*86:VOS:*:*) 117309885543Smrg # From Paul.Green@stratus.com. 117409885543Smrg echo ${UNAME_MACHINE}-stratus-vos 117509885543Smrg exit ;; 117609885543Smrg *:VOS:*:*) 117709885543Smrg # From Paul.Green@stratus.com. 117809885543Smrg echo hppa1.1-stratus-vos 117909885543Smrg exit ;; 118009885543Smrg mc68*:A/UX:*:*) 118109885543Smrg echo m68k-apple-aux${UNAME_RELEASE} 118209885543Smrg exit ;; 118309885543Smrg news*:NEWS-OS:6*:*) 118409885543Smrg echo mips-sony-newsos6 118509885543Smrg exit ;; 118609885543Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 118709885543Smrg if [ -d /usr/nec ]; then 118809885543Smrg echo mips-nec-sysv${UNAME_RELEASE} 118909885543Smrg else 119009885543Smrg echo mips-unknown-sysv${UNAME_RELEASE} 119109885543Smrg fi 119209885543Smrg exit ;; 119309885543Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 119409885543Smrg echo powerpc-be-beos 119509885543Smrg exit ;; 119609885543Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 119709885543Smrg echo powerpc-apple-beos 119809885543Smrg exit ;; 119909885543Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 120009885543Smrg echo i586-pc-beos 120109885543Smrg exit ;; 120209885543Smrg SX-4:SUPER-UX:*:*) 120309885543Smrg echo sx4-nec-superux${UNAME_RELEASE} 120409885543Smrg exit ;; 120509885543Smrg SX-5:SUPER-UX:*:*) 120609885543Smrg echo sx5-nec-superux${UNAME_RELEASE} 120709885543Smrg exit ;; 120809885543Smrg SX-6:SUPER-UX:*:*) 120909885543Smrg echo sx6-nec-superux${UNAME_RELEASE} 121009885543Smrg exit ;; 121109885543Smrg Power*:Rhapsody:*:*) 121209885543Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 121309885543Smrg exit ;; 121409885543Smrg *:Rhapsody:*:*) 121509885543Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 121609885543Smrg exit ;; 121709885543Smrg *:Darwin:*:*) 121809885543Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 121909885543Smrg case $UNAME_PROCESSOR in 122009885543Smrg unknown) UNAME_PROCESSOR=powerpc ;; 122109885543Smrg esac 122209885543Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 122309885543Smrg exit ;; 122409885543Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 122509885543Smrg UNAME_PROCESSOR=`uname -p` 122609885543Smrg if test "$UNAME_PROCESSOR" = "x86"; then 122709885543Smrg UNAME_PROCESSOR=i386 122809885543Smrg UNAME_MACHINE=pc 122909885543Smrg fi 123009885543Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 123109885543Smrg exit ;; 123209885543Smrg *:QNX:*:4*) 123309885543Smrg echo i386-pc-qnx 123409885543Smrg exit ;; 123509885543Smrg NSE-?:NONSTOP_KERNEL:*:*) 123609885543Smrg echo nse-tandem-nsk${UNAME_RELEASE} 123709885543Smrg exit ;; 123809885543Smrg NSR-?:NONSTOP_KERNEL:*:*) 123909885543Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 124009885543Smrg exit ;; 124109885543Smrg *:NonStop-UX:*:*) 124209885543Smrg echo mips-compaq-nonstopux 124309885543Smrg exit ;; 124409885543Smrg BS2000:POSIX*:*:*) 124509885543Smrg echo bs2000-siemens-sysv 124609885543Smrg exit ;; 124709885543Smrg DS/*:UNIX_System_V:*:*) 124809885543Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 124909885543Smrg exit ;; 125009885543Smrg *:Plan9:*:*) 125109885543Smrg # "uname -m" is not consistent, so use $cputype instead. 386 125209885543Smrg # is converted to i386 for consistency with other x86 125309885543Smrg # operating systems. 125409885543Smrg if test "$cputype" = "386"; then 125509885543Smrg UNAME_MACHINE=i386 125609885543Smrg else 125709885543Smrg UNAME_MACHINE="$cputype" 125809885543Smrg fi 125909885543Smrg echo ${UNAME_MACHINE}-unknown-plan9 126009885543Smrg exit ;; 126109885543Smrg *:TOPS-10:*:*) 126209885543Smrg echo pdp10-unknown-tops10 126309885543Smrg exit ;; 126409885543Smrg *:TENEX:*:*) 126509885543Smrg echo pdp10-unknown-tenex 126609885543Smrg exit ;; 126709885543Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 126809885543Smrg echo pdp10-dec-tops20 126909885543Smrg exit ;; 127009885543Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 127109885543Smrg echo pdp10-xkl-tops20 127209885543Smrg exit ;; 127309885543Smrg *:TOPS-20:*:*) 127409885543Smrg echo pdp10-unknown-tops20 127509885543Smrg exit ;; 127609885543Smrg *:ITS:*:*) 127709885543Smrg echo pdp10-unknown-its 127809885543Smrg exit ;; 127909885543Smrg SEI:*:*:SEIUX) 128009885543Smrg echo mips-sei-seiux${UNAME_RELEASE} 128109885543Smrg exit ;; 128209885543Smrg *:DragonFly:*:*) 128309885543Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 128409885543Smrg exit ;; 128509885543Smrg *:*VMS:*:*) 128609885543Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 128709885543Smrg case "${UNAME_MACHINE}" in 128809885543Smrg A*) echo alpha-dec-vms ; exit ;; 128909885543Smrg I*) echo ia64-dec-vms ; exit ;; 129009885543Smrg V*) echo vax-dec-vms ; exit ;; 129109885543Smrg esac ;; 129209885543Smrg *:XENIX:*:SysV) 129309885543Smrg echo i386-pc-xenix 129409885543Smrg exit ;; 129509885543Smrg i*86:skyos:*:*) 129609885543Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 129709885543Smrg exit ;; 129809885543Smrg i*86:rdos:*:*) 129909885543Smrg echo ${UNAME_MACHINE}-pc-rdos 130009885543Smrg exit ;; 130109885543Smrgesac 130209885543Smrg 130309885543Smrg#echo '(No uname command or uname output not recognized.)' 1>&2 130409885543Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 130509885543Smrg 130609885543Smrgeval $set_cc_for_build 130709885543Smrgcat >$dummy.c <<EOF 130809885543Smrg#ifdef _SEQUENT_ 130909885543Smrg# include <sys/types.h> 131009885543Smrg# include <sys/utsname.h> 131109885543Smrg#endif 131209885543Smrgmain () 131309885543Smrg{ 131409885543Smrg#if defined (sony) 131509885543Smrg#if defined (MIPSEB) 131609885543Smrg /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 131709885543Smrg I don't know.... */ 131809885543Smrg printf ("mips-sony-bsd\n"); exit (0); 131909885543Smrg#else 132009885543Smrg#include <sys/param.h> 132109885543Smrg printf ("m68k-sony-newsos%s\n", 132209885543Smrg#ifdef NEWSOS4 132309885543Smrg "4" 132409885543Smrg#else 132509885543Smrg "" 132609885543Smrg#endif 132709885543Smrg ); exit (0); 132809885543Smrg#endif 132909885543Smrg#endif 133009885543Smrg 133109885543Smrg#if defined (__arm) && defined (__acorn) && defined (__unix) 133209885543Smrg printf ("arm-acorn-riscix\n"); exit (0); 133309885543Smrg#endif 133409885543Smrg 133509885543Smrg#if defined (hp300) && !defined (hpux) 133609885543Smrg printf ("m68k-hp-bsd\n"); exit (0); 133709885543Smrg#endif 133809885543Smrg 133909885543Smrg#if defined (NeXT) 134009885543Smrg#if !defined (__ARCHITECTURE__) 134109885543Smrg#define __ARCHITECTURE__ "m68k" 134209885543Smrg#endif 134309885543Smrg int version; 134409885543Smrg version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 134509885543Smrg if (version < 4) 134609885543Smrg printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 134709885543Smrg else 134809885543Smrg printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 134909885543Smrg exit (0); 135009885543Smrg#endif 135109885543Smrg 135209885543Smrg#if defined (MULTIMAX) || defined (n16) 135309885543Smrg#if defined (UMAXV) 135409885543Smrg printf ("ns32k-encore-sysv\n"); exit (0); 135509885543Smrg#else 135609885543Smrg#if defined (CMU) 135709885543Smrg printf ("ns32k-encore-mach\n"); exit (0); 135809885543Smrg#else 135909885543Smrg printf ("ns32k-encore-bsd\n"); exit (0); 136009885543Smrg#endif 136109885543Smrg#endif 136209885543Smrg#endif 136309885543Smrg 136409885543Smrg#if defined (__386BSD__) 136509885543Smrg printf ("i386-pc-bsd\n"); exit (0); 136609885543Smrg#endif 136709885543Smrg 136809885543Smrg#if defined (sequent) 136909885543Smrg#if defined (i386) 137009885543Smrg printf ("i386-sequent-dynix\n"); exit (0); 137109885543Smrg#endif 137209885543Smrg#if defined (ns32000) 137309885543Smrg printf ("ns32k-sequent-dynix\n"); exit (0); 137409885543Smrg#endif 137509885543Smrg#endif 137609885543Smrg 137709885543Smrg#if defined (_SEQUENT_) 137809885543Smrg struct utsname un; 137909885543Smrg 138009885543Smrg uname(&un); 138109885543Smrg 138209885543Smrg if (strncmp(un.version, "V2", 2) == 0) { 138309885543Smrg printf ("i386-sequent-ptx2\n"); exit (0); 138409885543Smrg } 138509885543Smrg if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 138609885543Smrg printf ("i386-sequent-ptx1\n"); exit (0); 138709885543Smrg } 138809885543Smrg printf ("i386-sequent-ptx\n"); exit (0); 138909885543Smrg 139009885543Smrg#endif 139109885543Smrg 139209885543Smrg#if defined (vax) 139309885543Smrg# if !defined (ultrix) 139409885543Smrg# include <sys/param.h> 139509885543Smrg# if defined (BSD) 139609885543Smrg# if BSD == 43 139709885543Smrg printf ("vax-dec-bsd4.3\n"); exit (0); 139809885543Smrg# else 139909885543Smrg# if BSD == 199006 140009885543Smrg printf ("vax-dec-bsd4.3reno\n"); exit (0); 140109885543Smrg# else 140209885543Smrg printf ("vax-dec-bsd\n"); exit (0); 140309885543Smrg# endif 140409885543Smrg# endif 140509885543Smrg# else 140609885543Smrg printf ("vax-dec-bsd\n"); exit (0); 140709885543Smrg# endif 140809885543Smrg# else 140909885543Smrg printf ("vax-dec-ultrix\n"); exit (0); 141009885543Smrg# endif 141109885543Smrg#endif 141209885543Smrg 141309885543Smrg#if defined (alliant) && defined (i860) 141409885543Smrg printf ("i860-alliant-bsd\n"); exit (0); 141509885543Smrg#endif 141609885543Smrg 141709885543Smrg exit (1); 141809885543Smrg} 141909885543SmrgEOF 142009885543Smrg 142109885543Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 142209885543Smrg { echo "$SYSTEM_NAME"; exit; } 142309885543Smrg 142409885543Smrg# Apollos put the system type in the environment. 142509885543Smrg 142609885543Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 142709885543Smrg 142809885543Smrg# Convex versions that predate uname can use getsysinfo(1) 142909885543Smrg 143009885543Smrgif [ -x /usr/convex/getsysinfo ] 143109885543Smrgthen 143209885543Smrg case `getsysinfo -f cpu_type` in 143309885543Smrg c1*) 143409885543Smrg echo c1-convex-bsd 143509885543Smrg exit ;; 143609885543Smrg c2*) 143709885543Smrg if getsysinfo -f scalar_acc 143809885543Smrg then echo c32-convex-bsd 143909885543Smrg else echo c2-convex-bsd 144009885543Smrg fi 144109885543Smrg exit ;; 144209885543Smrg c34*) 144309885543Smrg echo c34-convex-bsd 144409885543Smrg exit ;; 144509885543Smrg c38*) 144609885543Smrg echo c38-convex-bsd 144709885543Smrg exit ;; 144809885543Smrg c4*) 144909885543Smrg echo c4-convex-bsd 145009885543Smrg exit ;; 145109885543Smrg esac 145209885543Smrgfi 145309885543Smrg 145409885543Smrgcat >&2 <<EOF 145509885543Smrg$0: unable to guess system type 145609885543Smrg 145709885543SmrgThis script, last modified $timestamp, has failed to recognize 145809885543Smrgthe operating system you are using. It is advised that you 145909885543Smrgdownload the most up to date version of the config scripts from 146009885543Smrg 146109885543Smrg http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess 146209885543Smrgand 146309885543Smrg http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub 146409885543Smrg 146509885543SmrgIf the version you run ($0) is already up to date, please 146609885543Smrgsend the following data and any information you think might be 146709885543Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 146809885543Smrginformation to handle your system. 146909885543Smrg 147009885543Smrgconfig.guess timestamp = $timestamp 147109885543Smrg 147209885543Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 147309885543Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 147409885543Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 147509885543Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 147609885543Smrg 147709885543Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 147809885543Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 147909885543Smrg 148009885543Smrghostinfo = `(hostinfo) 2>/dev/null` 148109885543Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 148209885543Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 148309885543Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 148409885543Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 148509885543Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 148609885543Smrg 148709885543SmrgUNAME_MACHINE = ${UNAME_MACHINE} 148809885543SmrgUNAME_RELEASE = ${UNAME_RELEASE} 148909885543SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 149009885543SmrgUNAME_VERSION = ${UNAME_VERSION} 149109885543SmrgEOF 149209885543Smrg 149309885543Smrgexit 1 149409885543Smrg 149509885543Smrg# Local variables: 149609885543Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 149709885543Smrg# time-stamp-start: "timestamp='" 149809885543Smrg# time-stamp-format: "%:y-%02m-%02d" 149909885543Smrg# time-stamp-end: "'" 150009885543Smrg# End: 1501