config.guess revision 63847c39
176888252Smrg#! /bin/sh 276888252Smrg# Attempt to guess a canonical system name. 376888252Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 463847c39Smrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 563847c39Smrg# 2011, 2012 Free Software Foundation, Inc. 676888252Smrg 763847c39Smrgtimestamp='2012-02-10' 876888252Smrg 976888252Smrg# This file is free software; you can redistribute it and/or modify it 1076888252Smrg# under the terms of the GNU General Public License as published by 1176888252Smrg# the Free Software Foundation; either version 2 of the License, or 1276888252Smrg# (at your option) any later version. 1376888252Smrg# 1476888252Smrg# This program is distributed in the hope that it will be useful, but 1576888252Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1676888252Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1776888252Smrg# General Public License for more details. 1876888252Smrg# 1976888252Smrg# You should have received a copy of the GNU General Public License 2063847c39Smrg# along with this program; if not, see <http://www.gnu.org/licenses/>. 2176888252Smrg# 2276888252Smrg# As a special exception to the GNU General Public License, if you 2376888252Smrg# distribute this file as part of a program that contains a 2476888252Smrg# configuration script generated by Autoconf, you may include it under 2576888252Smrg# the same distribution terms that you use for the rest of that program. 2676888252Smrg 271ae1b5e8Smrg 2863847c39Smrg# Originally written by Per Bothner. Please send patches (context 2963847c39Smrg# diff format) to <config-patches@gnu.org> and include a ChangeLog 3063847c39Smrg# entry. 3176888252Smrg# 3276888252Smrg# This script attempts to guess a canonical system name similar to 3376888252Smrg# config.sub. If it succeeds, it prints the system name on stdout, and 3476888252Smrg# exits with 0. Otherwise, it exits with 1. 3576888252Smrg# 3663847c39Smrg# You can get the latest version of this script from: 3763847c39Smrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 3876888252Smrg 3976888252Smrgme=`echo "$0" | sed -e 's,.*/,,'` 4076888252Smrg 4176888252Smrgusage="\ 4276888252SmrgUsage: $0 [OPTION] 4376888252Smrg 4476888252SmrgOutput the configuration name of the system \`$me' is run on. 4576888252Smrg 4676888252SmrgOperation modes: 4776888252Smrg -h, --help print this help, then exit 4876888252Smrg -t, --time-stamp print date of last modification, then exit 4976888252Smrg -v, --version print version number, then exit 5076888252Smrg 5176888252SmrgReport bugs and patches to <config-patches@gnu.org>." 5276888252Smrg 5376888252Smrgversion="\ 5476888252SmrgGNU config.guess ($timestamp) 5576888252Smrg 5676888252SmrgOriginally written by Per Bothner. 5763847c39SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 5863847c39Smrg2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 5963847c39SmrgFree Software Foundation, Inc. 6076888252Smrg 6176888252SmrgThis is free software; see the source for copying conditions. There is NO 6276888252Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 6376888252Smrg 6476888252Smrghelp=" 6576888252SmrgTry \`$me --help' for more information." 6676888252Smrg 6776888252Smrg# Parse command line 6876888252Smrgwhile test $# -gt 0 ; do 6976888252Smrg case $1 in 7076888252Smrg --time-stamp | --time* | -t ) 711ae1b5e8Smrg echo "$timestamp" ; exit ;; 7276888252Smrg --version | -v ) 731ae1b5e8Smrg echo "$version" ; exit ;; 7476888252Smrg --help | --h* | -h ) 751ae1b5e8Smrg echo "$usage"; exit ;; 7676888252Smrg -- ) # Stop option processing 7776888252Smrg shift; break ;; 7876888252Smrg - ) # Use stdin as input. 7976888252Smrg break ;; 8076888252Smrg -* ) 8176888252Smrg echo "$me: invalid option $1$help" >&2 8276888252Smrg exit 1 ;; 8376888252Smrg * ) 8476888252Smrg break ;; 8576888252Smrg esac 8676888252Smrgdone 8776888252Smrg 8876888252Smrgif test $# != 0; then 8976888252Smrg echo "$me: too many arguments$help" >&2 9076888252Smrg exit 1 9176888252Smrgfi 9276888252Smrg 9376888252Smrgtrap 'exit 1' 1 2 15 9476888252Smrg 9576888252Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 9676888252Smrg# compiler to aid in system detection is discouraged as it requires 9776888252Smrg# temporary files to be created and, as you can see below, it is a 9876888252Smrg# headache to deal with in a portable fashion. 9976888252Smrg 10076888252Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 10176888252Smrg# use `HOST_CC' if defined, but it is deprecated. 10276888252Smrg 10376888252Smrg# Portable tmp directory creation inspired by the Autoconf team. 10476888252Smrg 10576888252Smrgset_cc_for_build=' 10676888252Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 10776888252Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 10876888252Smrg: ${TMPDIR=/tmp} ; 1091ae1b5e8Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 11076888252Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 11176888252Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 11276888252Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 11376888252Smrgdummy=$tmp/dummy ; 11476888252Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 11576888252Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 11676888252Smrg ,,) echo "int x;" > $dummy.c ; 11776888252Smrg for c in cc gcc c89 c99 ; do 11876888252Smrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 11976888252Smrg CC_FOR_BUILD="$c"; break ; 12076888252Smrg fi ; 12176888252Smrg done ; 12276888252Smrg if test x"$CC_FOR_BUILD" = x ; then 12376888252Smrg CC_FOR_BUILD=no_compiler_found ; 12476888252Smrg fi 12576888252Smrg ;; 12676888252Smrg ,,*) CC_FOR_BUILD=$CC ;; 12776888252Smrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 1281ae1b5e8Smrgesac ; set_cc_for_build= ;' 12976888252Smrg 13076888252Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 13176888252Smrg# (ghazi@noc.rutgers.edu 1994-08-24) 13276888252Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 13376888252Smrg PATH=$PATH:/.attbin ; export PATH 13476888252Smrgfi 13576888252Smrg 13676888252SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 13776888252SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 13876888252SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 13976888252SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 14076888252Smrg 14176888252Smrg# Note: order is significant - the case branches are not exclusive. 14276888252Smrg 14376888252Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 14476888252Smrg *:NetBSD:*:*) 14576888252Smrg # NetBSD (nbsd) targets should (where applicable) match one or 14663847c39Smrg # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 14776888252Smrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 14876888252Smrg # switched to ELF, *-*-netbsd* would select the old 14976888252Smrg # object file format. This provides both forward 15076888252Smrg # compatibility and a consistent mechanism for selecting the 15176888252Smrg # object file format. 15276888252Smrg # 15376888252Smrg # Note: NetBSD doesn't particularly care about the vendor 15476888252Smrg # portion of the name. We always set it to "unknown". 15576888252Smrg sysctl="sysctl -n hw.machine_arch" 15676888252Smrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 15776888252Smrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 15876888252Smrg case "${UNAME_MACHINE_ARCH}" in 15976888252Smrg armeb) machine=armeb-unknown ;; 16076888252Smrg arm*) machine=arm-unknown ;; 16176888252Smrg sh3el) machine=shl-unknown ;; 16276888252Smrg sh3eb) machine=sh-unknown ;; 1631ae1b5e8Smrg sh5el) machine=sh5le-unknown ;; 16476888252Smrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 16576888252Smrg esac 16676888252Smrg # The Operating System including object format, if it has switched 16776888252Smrg # to ELF recently, or will in the future. 16876888252Smrg case "${UNAME_MACHINE_ARCH}" in 16976888252Smrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 17076888252Smrg eval $set_cc_for_build 17176888252Smrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 17263847c39Smrg | grep -q __ELF__ 17376888252Smrg then 17476888252Smrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 17576888252Smrg # Return netbsd for either. FIX? 17676888252Smrg os=netbsd 17776888252Smrg else 17876888252Smrg os=netbsdelf 17976888252Smrg fi 18076888252Smrg ;; 18176888252Smrg *) 18263847c39Smrg os=netbsd 18376888252Smrg ;; 18476888252Smrg esac 18576888252Smrg # The OS release 18676888252Smrg # Debian GNU/NetBSD machines have a different userland, and 18776888252Smrg # thus, need a distinct triplet. However, they do not need 18876888252Smrg # kernel version information, so it can be replaced with a 18976888252Smrg # suitable tag, in the style of linux-gnu. 19076888252Smrg case "${UNAME_VERSION}" in 19176888252Smrg Debian*) 19276888252Smrg release='-gnu' 19376888252Smrg ;; 19476888252Smrg *) 19576888252Smrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 19676888252Smrg ;; 19776888252Smrg esac 19876888252Smrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 19976888252Smrg # contains redundant information, the shorter form: 20076888252Smrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 20176888252Smrg echo "${machine}-${os}${release}" 2021ae1b5e8Smrg exit ;; 20376888252Smrg *:OpenBSD:*:*) 2041ae1b5e8Smrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 2051ae1b5e8Smrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 2061ae1b5e8Smrg exit ;; 2071ae1b5e8Smrg *:ekkoBSD:*:*) 2081ae1b5e8Smrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 2091ae1b5e8Smrg exit ;; 2101ae1b5e8Smrg *:SolidBSD:*:*) 2111ae1b5e8Smrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 2121ae1b5e8Smrg exit ;; 2131ae1b5e8Smrg macppc:MirBSD:*:*) 2141ae1b5e8Smrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 2151ae1b5e8Smrg exit ;; 2161ae1b5e8Smrg *:MirBSD:*:*) 2171ae1b5e8Smrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 2181ae1b5e8Smrg exit ;; 21976888252Smrg alpha:OSF1:*:*) 2201ae1b5e8Smrg case $UNAME_RELEASE in 2211ae1b5e8Smrg *4.0) 22276888252Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 2231ae1b5e8Smrg ;; 2241ae1b5e8Smrg *5.*) 22563847c39Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 2261ae1b5e8Smrg ;; 2271ae1b5e8Smrg esac 22876888252Smrg # According to Compaq, /usr/sbin/psrinfo has been available on 22976888252Smrg # OSF/1 and Tru64 systems produced since 1995. I hope that 23076888252Smrg # covers most systems running today. This code pipes the CPU 23176888252Smrg # types through head -n 1, so we only detect the type of CPU 0. 23276888252Smrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 23376888252Smrg case "$ALPHA_CPU_TYPE" in 23476888252Smrg "EV4 (21064)") 23576888252Smrg UNAME_MACHINE="alpha" ;; 23676888252Smrg "EV4.5 (21064)") 23776888252Smrg UNAME_MACHINE="alpha" ;; 23876888252Smrg "LCA4 (21066/21068)") 23976888252Smrg UNAME_MACHINE="alpha" ;; 24076888252Smrg "EV5 (21164)") 24176888252Smrg UNAME_MACHINE="alphaev5" ;; 24276888252Smrg "EV5.6 (21164A)") 24376888252Smrg UNAME_MACHINE="alphaev56" ;; 24476888252Smrg "EV5.6 (21164PC)") 24576888252Smrg UNAME_MACHINE="alphapca56" ;; 24676888252Smrg "EV5.7 (21164PC)") 24776888252Smrg UNAME_MACHINE="alphapca57" ;; 24876888252Smrg "EV6 (21264)") 24976888252Smrg UNAME_MACHINE="alphaev6" ;; 25076888252Smrg "EV6.7 (21264A)") 25176888252Smrg UNAME_MACHINE="alphaev67" ;; 25276888252Smrg "EV6.8CB (21264C)") 25376888252Smrg UNAME_MACHINE="alphaev68" ;; 25476888252Smrg "EV6.8AL (21264B)") 25576888252Smrg UNAME_MACHINE="alphaev68" ;; 25676888252Smrg "EV6.8CX (21264D)") 25776888252Smrg UNAME_MACHINE="alphaev68" ;; 25876888252Smrg "EV6.9A (21264/EV69A)") 25976888252Smrg UNAME_MACHINE="alphaev69" ;; 26076888252Smrg "EV7 (21364)") 26176888252Smrg UNAME_MACHINE="alphaev7" ;; 26276888252Smrg "EV7.9 (21364A)") 26376888252Smrg UNAME_MACHINE="alphaev79" ;; 26476888252Smrg esac 2651ae1b5e8Smrg # A Pn.n version is a patched version. 26676888252Smrg # A Vn.n version is a released version. 26776888252Smrg # A Tn.n version is a released field test version. 26876888252Smrg # A Xn.n version is an unreleased experimental baselevel. 26976888252Smrg # 1.2 uses "1.2" for uname -r. 2701ae1b5e8Smrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27163847c39Smrg # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 27263847c39Smrg exitcode=$? 27363847c39Smrg trap '' 0 27463847c39Smrg exit $exitcode ;; 27576888252Smrg Alpha\ *:Windows_NT*:*) 27676888252Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 27776888252Smrg # Should we change UNAME_MACHINE based on the output of uname instead 27876888252Smrg # of the specific Alpha model? 27976888252Smrg echo alpha-pc-interix 2801ae1b5e8Smrg exit ;; 28176888252Smrg 21064:Windows_NT:50:3) 28276888252Smrg echo alpha-dec-winnt3.5 2831ae1b5e8Smrg exit ;; 28476888252Smrg Amiga*:UNIX_System_V:4.0:*) 28576888252Smrg echo m68k-unknown-sysv4 2861ae1b5e8Smrg exit ;; 28776888252Smrg *:[Aa]miga[Oo][Ss]:*:*) 28876888252Smrg echo ${UNAME_MACHINE}-unknown-amigaos 2891ae1b5e8Smrg exit ;; 29076888252Smrg *:[Mm]orph[Oo][Ss]:*:*) 29176888252Smrg echo ${UNAME_MACHINE}-unknown-morphos 2921ae1b5e8Smrg exit ;; 29376888252Smrg *:OS/390:*:*) 29476888252Smrg echo i370-ibm-openedition 2951ae1b5e8Smrg exit ;; 2961ae1b5e8Smrg *:z/VM:*:*) 2971ae1b5e8Smrg echo s390-ibm-zvmoe 2981ae1b5e8Smrg exit ;; 2991ae1b5e8Smrg *:OS400:*:*) 30063847c39Smrg echo powerpc-ibm-os400 3011ae1b5e8Smrg exit ;; 30276888252Smrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 30376888252Smrg echo arm-acorn-riscix${UNAME_RELEASE} 3041ae1b5e8Smrg exit ;; 3051ae1b5e8Smrg arm:riscos:*:*|arm:RISCOS:*:*) 3061ae1b5e8Smrg echo arm-unknown-riscos 3071ae1b5e8Smrg exit ;; 30876888252Smrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 30976888252Smrg echo hppa1.1-hitachi-hiuxmpp 3101ae1b5e8Smrg exit ;; 31176888252Smrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 31276888252Smrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 31376888252Smrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 31476888252Smrg echo pyramid-pyramid-sysv3 31576888252Smrg else 31676888252Smrg echo pyramid-pyramid-bsd 31776888252Smrg fi 3181ae1b5e8Smrg exit ;; 31976888252Smrg NILE*:*:*:dcosx) 32076888252Smrg echo pyramid-pyramid-svr4 3211ae1b5e8Smrg exit ;; 32276888252Smrg DRS?6000:unix:4.0:6*) 32376888252Smrg echo sparc-icl-nx6 3241ae1b5e8Smrg exit ;; 3251ae1b5e8Smrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 32676888252Smrg case `/usr/bin/uname -p` in 3271ae1b5e8Smrg sparc) echo sparc-icl-nx7; exit ;; 32876888252Smrg esac ;; 32963847c39Smrg s390x:SunOS:*:*) 33063847c39Smrg echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 33163847c39Smrg exit ;; 33276888252Smrg sun4H:SunOS:5.*:*) 33376888252Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3341ae1b5e8Smrg exit ;; 33576888252Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 33676888252Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3371ae1b5e8Smrg exit ;; 33863847c39Smrg i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 33963847c39Smrg echo i386-pc-auroraux${UNAME_RELEASE} 34063847c39Smrg exit ;; 3411ae1b5e8Smrg i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 34263847c39Smrg eval $set_cc_for_build 34363847c39Smrg SUN_ARCH="i386" 34463847c39Smrg # If there is a compiler, see if it is configured for 64-bit objects. 34563847c39Smrg # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 34663847c39Smrg # This test works for both compilers. 34763847c39Smrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 34863847c39Smrg if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 34963847c39Smrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 35063847c39Smrg grep IS_64BIT_ARCH >/dev/null 35163847c39Smrg then 35263847c39Smrg SUN_ARCH="x86_64" 35363847c39Smrg fi 35463847c39Smrg fi 35563847c39Smrg echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3561ae1b5e8Smrg exit ;; 35776888252Smrg sun4*:SunOS:6*:*) 35876888252Smrg # According to config.sub, this is the proper way to canonicalize 35976888252Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 36076888252Smrg # it's likely to be more like Solaris than SunOS4. 36176888252Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3621ae1b5e8Smrg exit ;; 36376888252Smrg sun4*:SunOS:*:*) 36476888252Smrg case "`/usr/bin/arch -k`" in 36576888252Smrg Series*|S4*) 36676888252Smrg UNAME_RELEASE=`uname -v` 36776888252Smrg ;; 36876888252Smrg esac 36976888252Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 37076888252Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 3711ae1b5e8Smrg exit ;; 37276888252Smrg sun3*:SunOS:*:*) 37376888252Smrg echo m68k-sun-sunos${UNAME_RELEASE} 3741ae1b5e8Smrg exit ;; 37576888252Smrg sun*:*:4.2BSD:*) 37676888252Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 37776888252Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 37876888252Smrg case "`/bin/arch`" in 37976888252Smrg sun3) 38076888252Smrg echo m68k-sun-sunos${UNAME_RELEASE} 38176888252Smrg ;; 38276888252Smrg sun4) 38376888252Smrg echo sparc-sun-sunos${UNAME_RELEASE} 38476888252Smrg ;; 38576888252Smrg esac 3861ae1b5e8Smrg exit ;; 38776888252Smrg aushp:SunOS:*:*) 38876888252Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 3891ae1b5e8Smrg exit ;; 39076888252Smrg # The situation for MiNT is a little confusing. The machine name 39176888252Smrg # can be virtually everything (everything which is not 39276888252Smrg # "atarist" or "atariste" at least should have a processor 39376888252Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 39476888252Smrg # to the lowercase version "mint" (or "freemint"). Finally 39576888252Smrg # the system name "TOS" denotes a system which is actually not 39676888252Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 39776888252Smrg # be no problem. 39876888252Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 39963847c39Smrg echo m68k-atari-mint${UNAME_RELEASE} 4001ae1b5e8Smrg exit ;; 40176888252Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 40276888252Smrg echo m68k-atari-mint${UNAME_RELEASE} 40363847c39Smrg exit ;; 40476888252Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 40563847c39Smrg echo m68k-atari-mint${UNAME_RELEASE} 4061ae1b5e8Smrg exit ;; 40776888252Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 40863847c39Smrg echo m68k-milan-mint${UNAME_RELEASE} 40963847c39Smrg exit ;; 41076888252Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 41163847c39Smrg echo m68k-hades-mint${UNAME_RELEASE} 41263847c39Smrg exit ;; 41376888252Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 41463847c39Smrg echo m68k-unknown-mint${UNAME_RELEASE} 41563847c39Smrg exit ;; 4161ae1b5e8Smrg m68k:machten:*:*) 4171ae1b5e8Smrg echo m68k-apple-machten${UNAME_RELEASE} 4181ae1b5e8Smrg exit ;; 41976888252Smrg powerpc:machten:*:*) 42076888252Smrg echo powerpc-apple-machten${UNAME_RELEASE} 4211ae1b5e8Smrg exit ;; 42276888252Smrg RISC*:Mach:*:*) 42376888252Smrg echo mips-dec-mach_bsd4.3 4241ae1b5e8Smrg exit ;; 42576888252Smrg RISC*:ULTRIX:*:*) 42676888252Smrg echo mips-dec-ultrix${UNAME_RELEASE} 4271ae1b5e8Smrg exit ;; 42876888252Smrg VAX*:ULTRIX*:*:*) 42976888252Smrg echo vax-dec-ultrix${UNAME_RELEASE} 4301ae1b5e8Smrg exit ;; 43176888252Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 43276888252Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 4331ae1b5e8Smrg exit ;; 43476888252Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 43576888252Smrg eval $set_cc_for_build 43676888252Smrg sed 's/^ //' << EOF >$dummy.c 43776888252Smrg#ifdef __cplusplus 43876888252Smrg#include <stdio.h> /* for printf() prototype */ 43976888252Smrg int main (int argc, char *argv[]) { 44076888252Smrg#else 44176888252Smrg int main (argc, argv) int argc; char *argv[]; { 44276888252Smrg#endif 44376888252Smrg #if defined (host_mips) && defined (MIPSEB) 44476888252Smrg #if defined (SYSTYPE_SYSV) 44576888252Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 44676888252Smrg #endif 44776888252Smrg #if defined (SYSTYPE_SVR4) 44876888252Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 44976888252Smrg #endif 45076888252Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 45176888252Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 45276888252Smrg #endif 45376888252Smrg #endif 45476888252Smrg exit (-1); 45576888252Smrg } 45676888252SmrgEOF 4571ae1b5e8Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 4581ae1b5e8Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 4591ae1b5e8Smrg SYSTEM_NAME=`$dummy $dummyarg` && 4601ae1b5e8Smrg { echo "$SYSTEM_NAME"; exit; } 46176888252Smrg echo mips-mips-riscos${UNAME_RELEASE} 4621ae1b5e8Smrg exit ;; 46376888252Smrg Motorola:PowerMAX_OS:*:*) 46476888252Smrg echo powerpc-motorola-powermax 4651ae1b5e8Smrg exit ;; 46676888252Smrg Motorola:*:4.3:PL8-*) 46776888252Smrg echo powerpc-harris-powermax 4681ae1b5e8Smrg exit ;; 46976888252Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 47076888252Smrg echo powerpc-harris-powermax 4711ae1b5e8Smrg exit ;; 47276888252Smrg Night_Hawk:Power_UNIX:*:*) 47376888252Smrg echo powerpc-harris-powerunix 4741ae1b5e8Smrg exit ;; 47576888252Smrg m88k:CX/UX:7*:*) 47676888252Smrg echo m88k-harris-cxux7 4771ae1b5e8Smrg exit ;; 47876888252Smrg m88k:*:4*:R4*) 47976888252Smrg echo m88k-motorola-sysv4 4801ae1b5e8Smrg exit ;; 48176888252Smrg m88k:*:3*:R3*) 48276888252Smrg echo m88k-motorola-sysv3 4831ae1b5e8Smrg exit ;; 48476888252Smrg AViiON:dgux:*:*) 48563847c39Smrg # DG/UX returns AViiON for all architectures 48663847c39Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 48776888252Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 48876888252Smrg then 48976888252Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 49076888252Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 49176888252Smrg then 49276888252Smrg echo m88k-dg-dgux${UNAME_RELEASE} 49376888252Smrg else 49476888252Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 49576888252Smrg fi 49676888252Smrg else 49776888252Smrg echo i586-dg-dgux${UNAME_RELEASE} 49876888252Smrg fi 49963847c39Smrg exit ;; 50076888252Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 50176888252Smrg echo m88k-dolphin-sysv3 5021ae1b5e8Smrg exit ;; 50376888252Smrg M88*:*:R3*:*) 50476888252Smrg # Delta 88k system running SVR3 50576888252Smrg echo m88k-motorola-sysv3 5061ae1b5e8Smrg exit ;; 50776888252Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 50876888252Smrg echo m88k-tektronix-sysv3 5091ae1b5e8Smrg exit ;; 51076888252Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 51176888252Smrg echo m68k-tektronix-bsd 5121ae1b5e8Smrg exit ;; 51376888252Smrg *:IRIX*:*:*) 51476888252Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 5151ae1b5e8Smrg exit ;; 51676888252Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 5171ae1b5e8Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 5181ae1b5e8Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 51976888252Smrg i*86:AIX:*:*) 52076888252Smrg echo i386-ibm-aix 5211ae1b5e8Smrg exit ;; 52276888252Smrg ia64:AIX:*:*) 52376888252Smrg if [ -x /usr/bin/oslevel ] ; then 52476888252Smrg IBM_REV=`/usr/bin/oslevel` 52576888252Smrg else 52676888252Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 52776888252Smrg fi 52876888252Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 5291ae1b5e8Smrg exit ;; 53076888252Smrg *:AIX:2:3) 53176888252Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 53276888252Smrg eval $set_cc_for_build 53376888252Smrg sed 's/^ //' << EOF >$dummy.c 53476888252Smrg #include <sys/systemcfg.h> 53576888252Smrg 53676888252Smrg main() 53776888252Smrg { 53876888252Smrg if (!__power_pc()) 53976888252Smrg exit(1); 54076888252Smrg puts("powerpc-ibm-aix3.2.5"); 54176888252Smrg exit(0); 54276888252Smrg } 54376888252SmrgEOF 5441ae1b5e8Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 5451ae1b5e8Smrg then 5461ae1b5e8Smrg echo "$SYSTEM_NAME" 5471ae1b5e8Smrg else 5481ae1b5e8Smrg echo rs6000-ibm-aix3.2.5 5491ae1b5e8Smrg fi 55076888252Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 55176888252Smrg echo rs6000-ibm-aix3.2.4 55276888252Smrg else 55376888252Smrg echo rs6000-ibm-aix3.2 55476888252Smrg fi 5551ae1b5e8Smrg exit ;; 55663847c39Smrg *:AIX:*:[4567]) 55776888252Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 55876888252Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 55976888252Smrg IBM_ARCH=rs6000 56076888252Smrg else 56176888252Smrg IBM_ARCH=powerpc 56276888252Smrg fi 56376888252Smrg if [ -x /usr/bin/oslevel ] ; then 56476888252Smrg IBM_REV=`/usr/bin/oslevel` 56576888252Smrg else 56676888252Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 56776888252Smrg fi 56876888252Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 5691ae1b5e8Smrg exit ;; 57076888252Smrg *:AIX:*:*) 57176888252Smrg echo rs6000-ibm-aix 5721ae1b5e8Smrg exit ;; 57376888252Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 57476888252Smrg echo romp-ibm-bsd4.4 5751ae1b5e8Smrg exit ;; 57676888252Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 57776888252Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 5781ae1b5e8Smrg exit ;; # report: romp-ibm BSD 4.3 57976888252Smrg *:BOSX:*:*) 58076888252Smrg echo rs6000-bull-bosx 5811ae1b5e8Smrg exit ;; 58276888252Smrg DPX/2?00:B.O.S.:*:*) 58376888252Smrg echo m68k-bull-sysv3 5841ae1b5e8Smrg exit ;; 58576888252Smrg 9000/[34]??:4.3bsd:1.*:*) 58676888252Smrg echo m68k-hp-bsd 5871ae1b5e8Smrg exit ;; 58876888252Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 58976888252Smrg echo m68k-hp-bsd4.4 5901ae1b5e8Smrg exit ;; 59176888252Smrg 9000/[34678]??:HP-UX:*:*) 59276888252Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 59376888252Smrg case "${UNAME_MACHINE}" in 59476888252Smrg 9000/31? ) HP_ARCH=m68000 ;; 59576888252Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 59676888252Smrg 9000/[678][0-9][0-9]) 59776888252Smrg if [ -x /usr/bin/getconf ]; then 59876888252Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 59963847c39Smrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 60063847c39Smrg case "${sc_cpu_version}" in 60163847c39Smrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 60263847c39Smrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 60363847c39Smrg 532) # CPU_PA_RISC2_0 60463847c39Smrg case "${sc_kernel_bits}" in 60563847c39Smrg 32) HP_ARCH="hppa2.0n" ;; 60663847c39Smrg 64) HP_ARCH="hppa2.0w" ;; 60776888252Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 60863847c39Smrg esac ;; 60963847c39Smrg esac 61076888252Smrg fi 61176888252Smrg if [ "${HP_ARCH}" = "" ]; then 61276888252Smrg eval $set_cc_for_build 61363847c39Smrg sed 's/^ //' << EOF >$dummy.c 61476888252Smrg 61563847c39Smrg #define _HPUX_SOURCE 61663847c39Smrg #include <stdlib.h> 61763847c39Smrg #include <unistd.h> 61876888252Smrg 61963847c39Smrg int main () 62063847c39Smrg { 62163847c39Smrg #if defined(_SC_KERNEL_BITS) 62263847c39Smrg long bits = sysconf(_SC_KERNEL_BITS); 62363847c39Smrg #endif 62463847c39Smrg long cpu = sysconf (_SC_CPU_VERSION); 62576888252Smrg 62663847c39Smrg switch (cpu) 62763847c39Smrg { 62863847c39Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 62963847c39Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 63063847c39Smrg case CPU_PA_RISC2_0: 63163847c39Smrg #if defined(_SC_KERNEL_BITS) 63263847c39Smrg switch (bits) 63363847c39Smrg { 63463847c39Smrg case 64: puts ("hppa2.0w"); break; 63563847c39Smrg case 32: puts ("hppa2.0n"); break; 63663847c39Smrg default: puts ("hppa2.0"); break; 63763847c39Smrg } break; 63863847c39Smrg #else /* !defined(_SC_KERNEL_BITS) */ 63963847c39Smrg puts ("hppa2.0"); break; 64063847c39Smrg #endif 64163847c39Smrg default: puts ("hppa1.0"); break; 64263847c39Smrg } 64363847c39Smrg exit (0); 64463847c39Smrg } 64576888252SmrgEOF 64676888252Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 64776888252Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 64876888252Smrg fi ;; 64976888252Smrg esac 65076888252Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 65176888252Smrg then 6521ae1b5e8Smrg eval $set_cc_for_build 6531ae1b5e8Smrg 6541ae1b5e8Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 6551ae1b5e8Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 6561ae1b5e8Smrg # generating 64-bit code. GNU and HP use different nomenclature: 6571ae1b5e8Smrg # 6581ae1b5e8Smrg # $ CC_FOR_BUILD=cc ./config.guess 6591ae1b5e8Smrg # => hppa2.0w-hp-hpux11.23 6601ae1b5e8Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 6611ae1b5e8Smrg # => hppa64-hp-hpux11.23 6621ae1b5e8Smrg 6631ae1b5e8Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 66463847c39Smrg grep -q __LP64__ 66576888252Smrg then 66676888252Smrg HP_ARCH="hppa2.0w" 66776888252Smrg else 66876888252Smrg HP_ARCH="hppa64" 66976888252Smrg fi 67076888252Smrg fi 67176888252Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 6721ae1b5e8Smrg exit ;; 67376888252Smrg ia64:HP-UX:*:*) 67476888252Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 67576888252Smrg echo ia64-hp-hpux${HPUX_REV} 6761ae1b5e8Smrg exit ;; 67776888252Smrg 3050*:HI-UX:*:*) 67876888252Smrg eval $set_cc_for_build 67976888252Smrg sed 's/^ //' << EOF >$dummy.c 68076888252Smrg #include <unistd.h> 68176888252Smrg int 68276888252Smrg main () 68376888252Smrg { 68476888252Smrg long cpu = sysconf (_SC_CPU_VERSION); 68576888252Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 68676888252Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 68776888252Smrg results, however. */ 68876888252Smrg if (CPU_IS_PA_RISC (cpu)) 68976888252Smrg { 69076888252Smrg switch (cpu) 69176888252Smrg { 69276888252Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 69376888252Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 69476888252Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 69576888252Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 69676888252Smrg } 69776888252Smrg } 69876888252Smrg else if (CPU_IS_HP_MC68K (cpu)) 69976888252Smrg puts ("m68k-hitachi-hiuxwe2"); 70076888252Smrg else puts ("unknown-hitachi-hiuxwe2"); 70176888252Smrg exit (0); 70276888252Smrg } 70376888252SmrgEOF 7041ae1b5e8Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 7051ae1b5e8Smrg { echo "$SYSTEM_NAME"; exit; } 70676888252Smrg echo unknown-hitachi-hiuxwe2 7071ae1b5e8Smrg exit ;; 70876888252Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 70976888252Smrg echo hppa1.1-hp-bsd 7101ae1b5e8Smrg exit ;; 71176888252Smrg 9000/8??:4.3bsd:*:*) 71276888252Smrg echo hppa1.0-hp-bsd 7131ae1b5e8Smrg exit ;; 71476888252Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 71576888252Smrg echo hppa1.0-hp-mpeix 7161ae1b5e8Smrg exit ;; 71776888252Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 71876888252Smrg echo hppa1.1-hp-osf 7191ae1b5e8Smrg exit ;; 72076888252Smrg hp8??:OSF1:*:*) 72176888252Smrg echo hppa1.0-hp-osf 7221ae1b5e8Smrg exit ;; 72376888252Smrg i*86:OSF1:*:*) 72476888252Smrg if [ -x /usr/sbin/sysversion ] ; then 72576888252Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 72676888252Smrg else 72776888252Smrg echo ${UNAME_MACHINE}-unknown-osf1 72876888252Smrg fi 7291ae1b5e8Smrg exit ;; 73076888252Smrg parisc*:Lites*:*:*) 73176888252Smrg echo hppa1.1-hp-lites 7321ae1b5e8Smrg exit ;; 73376888252Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 73476888252Smrg echo c1-convex-bsd 73563847c39Smrg exit ;; 73676888252Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 73776888252Smrg if getsysinfo -f scalar_acc 73876888252Smrg then echo c32-convex-bsd 73976888252Smrg else echo c2-convex-bsd 74076888252Smrg fi 74163847c39Smrg exit ;; 74276888252Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 74376888252Smrg echo c34-convex-bsd 74463847c39Smrg exit ;; 74576888252Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 74676888252Smrg echo c38-convex-bsd 74763847c39Smrg exit ;; 74876888252Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 74976888252Smrg echo c4-convex-bsd 75063847c39Smrg exit ;; 75176888252Smrg CRAY*Y-MP:*:*:*) 75276888252Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7531ae1b5e8Smrg exit ;; 75476888252Smrg CRAY*[A-Z]90:*:*:*) 75576888252Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 75676888252Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 75776888252Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 75876888252Smrg -e 's/\.[^.]*$/.X/' 7591ae1b5e8Smrg exit ;; 76076888252Smrg CRAY*TS:*:*:*) 76176888252Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7621ae1b5e8Smrg exit ;; 76376888252Smrg CRAY*T3E:*:*:*) 76476888252Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7651ae1b5e8Smrg exit ;; 76676888252Smrg CRAY*SV1:*:*:*) 76776888252Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7681ae1b5e8Smrg exit ;; 76976888252Smrg *:UNICOS/mp:*:*) 7701ae1b5e8Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7711ae1b5e8Smrg exit ;; 77276888252Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 77376888252Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 77463847c39Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 77563847c39Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 77663847c39Smrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 77763847c39Smrg exit ;; 7781ae1b5e8Smrg 5000:UNIX_System_V:4.*:*) 77963847c39Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 78063847c39Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 78163847c39Smrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 7821ae1b5e8Smrg exit ;; 78376888252Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 78476888252Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 7851ae1b5e8Smrg exit ;; 78676888252Smrg sparc*:BSD/OS:*:*) 78776888252Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 7881ae1b5e8Smrg exit ;; 78976888252Smrg *:BSD/OS:*:*) 79076888252Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 7911ae1b5e8Smrg exit ;; 7921ae1b5e8Smrg *:FreeBSD:*:*) 79363847c39Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 79463847c39Smrg case ${UNAME_PROCESSOR} in 7951ae1b5e8Smrg amd64) 7961ae1b5e8Smrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 7971ae1b5e8Smrg *) 79863847c39Smrg echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 7991ae1b5e8Smrg esac 8001ae1b5e8Smrg exit ;; 80176888252Smrg i*:CYGWIN*:*) 80276888252Smrg echo ${UNAME_MACHINE}-pc-cygwin 8031ae1b5e8Smrg exit ;; 8041ae1b5e8Smrg *:MINGW*:*) 80576888252Smrg echo ${UNAME_MACHINE}-pc-mingw32 8061ae1b5e8Smrg exit ;; 80763847c39Smrg i*:MSYS*:*) 80863847c39Smrg echo ${UNAME_MACHINE}-pc-msys 80963847c39Smrg exit ;; 8101ae1b5e8Smrg i*:windows32*:*) 81163847c39Smrg # uname -m includes "-pc" on this system. 81263847c39Smrg echo ${UNAME_MACHINE}-mingw32 8131ae1b5e8Smrg exit ;; 81476888252Smrg i*:PW*:*) 81576888252Smrg echo ${UNAME_MACHINE}-pc-pw32 8161ae1b5e8Smrg exit ;; 81763847c39Smrg *:Interix*:*) 81863847c39Smrg case ${UNAME_MACHINE} in 8191ae1b5e8Smrg x86) 8201ae1b5e8Smrg echo i586-pc-interix${UNAME_RELEASE} 8211ae1b5e8Smrg exit ;; 82263847c39Smrg authenticamd | genuineintel | EM64T) 8231ae1b5e8Smrg echo x86_64-unknown-interix${UNAME_RELEASE} 8241ae1b5e8Smrg exit ;; 8251ae1b5e8Smrg IA64) 8261ae1b5e8Smrg echo ia64-unknown-interix${UNAME_RELEASE} 8271ae1b5e8Smrg exit ;; 8281ae1b5e8Smrg esac ;; 82976888252Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 83076888252Smrg echo i${UNAME_MACHINE}-pc-mks 8311ae1b5e8Smrg exit ;; 83263847c39Smrg 8664:Windows_NT:*) 83363847c39Smrg echo x86_64-pc-mks 83463847c39Smrg exit ;; 83576888252Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 83676888252Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 83776888252Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 83876888252Smrg # UNAME_MACHINE based on the output of uname instead of i386? 83976888252Smrg echo i586-pc-interix 8401ae1b5e8Smrg exit ;; 84176888252Smrg i*:UWIN*:*) 84276888252Smrg echo ${UNAME_MACHINE}-pc-uwin 8431ae1b5e8Smrg exit ;; 8441ae1b5e8Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 8451ae1b5e8Smrg echo x86_64-unknown-cygwin 8461ae1b5e8Smrg exit ;; 84776888252Smrg p*:CYGWIN*:*) 84876888252Smrg echo powerpcle-unknown-cygwin 8491ae1b5e8Smrg exit ;; 85076888252Smrg prep*:SunOS:5.*:*) 85176888252Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 8521ae1b5e8Smrg exit ;; 85376888252Smrg *:GNU:*:*) 8541ae1b5e8Smrg # the GNU system 85576888252Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 8561ae1b5e8Smrg exit ;; 8571ae1b5e8Smrg *:GNU/*:*:*) 8581ae1b5e8Smrg # other systems with GNU libc and userland 8591ae1b5e8Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 8601ae1b5e8Smrg exit ;; 86176888252Smrg i*86:Minix:*:*) 86276888252Smrg echo ${UNAME_MACHINE}-pc-minix 8631ae1b5e8Smrg exit ;; 86463847c39Smrg aarch64:Linux:*:*) 86563847c39Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 86663847c39Smrg exit ;; 86763847c39Smrg aarch64_be:Linux:*:*) 86863847c39Smrg UNAME_MACHINE=aarch64_be 86963847c39Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 87063847c39Smrg exit ;; 87163847c39Smrg alpha:Linux:*:*) 87263847c39Smrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 87363847c39Smrg EV5) UNAME_MACHINE=alphaev5 ;; 87463847c39Smrg EV56) UNAME_MACHINE=alphaev56 ;; 87563847c39Smrg PCA56) UNAME_MACHINE=alphapca56 ;; 87663847c39Smrg PCA57) UNAME_MACHINE=alphapca56 ;; 87763847c39Smrg EV6) UNAME_MACHINE=alphaev6 ;; 87863847c39Smrg EV67) UNAME_MACHINE=alphaev67 ;; 87963847c39Smrg EV68*) UNAME_MACHINE=alphaev68 ;; 88063847c39Smrg esac 88163847c39Smrg objdump --private-headers /bin/sh | grep -q ld.so.1 88263847c39Smrg if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 88363847c39Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 88463847c39Smrg exit ;; 88576888252Smrg arm*:Linux:*:*) 8861ae1b5e8Smrg eval $set_cc_for_build 8871ae1b5e8Smrg if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 8881ae1b5e8Smrg | grep -q __ARM_EABI__ 8891ae1b5e8Smrg then 8901ae1b5e8Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8911ae1b5e8Smrg else 89263847c39Smrg if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 89363847c39Smrg | grep -q __ARM_PCS_VFP 89463847c39Smrg then 89563847c39Smrg echo ${UNAME_MACHINE}-unknown-linux-gnueabi 89663847c39Smrg else 89763847c39Smrg echo ${UNAME_MACHINE}-unknown-linux-gnueabihf 89863847c39Smrg fi 8991ae1b5e8Smrg fi 9001ae1b5e8Smrg exit ;; 9011ae1b5e8Smrg avr32*:Linux:*:*) 90276888252Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9031ae1b5e8Smrg exit ;; 90476888252Smrg cris:Linux:*:*) 90563847c39Smrg echo ${UNAME_MACHINE}-axis-linux-gnu 9061ae1b5e8Smrg exit ;; 9071ae1b5e8Smrg crisv32:Linux:*:*) 90863847c39Smrg echo ${UNAME_MACHINE}-axis-linux-gnu 9091ae1b5e8Smrg exit ;; 9101ae1b5e8Smrg frv:Linux:*:*) 91163847c39Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 91263847c39Smrg exit ;; 91363847c39Smrg hexagon:Linux:*:*) 91463847c39Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 91563847c39Smrg exit ;; 91663847c39Smrg i*86:Linux:*:*) 91763847c39Smrg LIBC=gnu 91863847c39Smrg eval $set_cc_for_build 91963847c39Smrg sed 's/^ //' << EOF >$dummy.c 92063847c39Smrg #ifdef __dietlibc__ 92163847c39Smrg LIBC=dietlibc 92263847c39Smrg #endif 92363847c39SmrgEOF 92463847c39Smrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` 92563847c39Smrg echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 9261ae1b5e8Smrg exit ;; 92776888252Smrg ia64:Linux:*:*) 9281ae1b5e8Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9291ae1b5e8Smrg exit ;; 9301ae1b5e8Smrg m32r*:Linux:*:*) 9311ae1b5e8Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9321ae1b5e8Smrg exit ;; 93376888252Smrg m68*:Linux:*:*) 93476888252Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9351ae1b5e8Smrg exit ;; 93663847c39Smrg mips:Linux:*:* | mips64:Linux:*:*) 93776888252Smrg eval $set_cc_for_build 93876888252Smrg sed 's/^ //' << EOF >$dummy.c 93976888252Smrg #undef CPU 94063847c39Smrg #undef ${UNAME_MACHINE} 94163847c39Smrg #undef ${UNAME_MACHINE}el 94276888252Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 94363847c39Smrg CPU=${UNAME_MACHINE}el 94476888252Smrg #else 94576888252Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 94663847c39Smrg CPU=${UNAME_MACHINE} 94776888252Smrg #else 94876888252Smrg CPU= 94976888252Smrg #endif 95076888252Smrg #endif 95176888252SmrgEOF 95263847c39Smrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 9531ae1b5e8Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 95476888252Smrg ;; 9551ae1b5e8Smrg or32:Linux:*:*) 95663847c39Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9571ae1b5e8Smrg exit ;; 95863847c39Smrg padre:Linux:*:*) 95963847c39Smrg echo sparc-unknown-linux-gnu 9601ae1b5e8Smrg exit ;; 96163847c39Smrg parisc64:Linux:*:* | hppa64:Linux:*:*) 96263847c39Smrg echo hppa64-unknown-linux-gnu 9631ae1b5e8Smrg exit ;; 96476888252Smrg parisc:Linux:*:* | hppa:Linux:*:*) 96576888252Smrg # Look for CPU level 96676888252Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 96776888252Smrg PA7*) echo hppa1.1-unknown-linux-gnu ;; 96876888252Smrg PA8*) echo hppa2.0-unknown-linux-gnu ;; 96976888252Smrg *) echo hppa-unknown-linux-gnu ;; 97076888252Smrg esac 9711ae1b5e8Smrg exit ;; 97263847c39Smrg ppc64:Linux:*:*) 97363847c39Smrg echo powerpc64-unknown-linux-gnu 97463847c39Smrg exit ;; 97563847c39Smrg ppc:Linux:*:*) 97663847c39Smrg echo powerpc-unknown-linux-gnu 9771ae1b5e8Smrg exit ;; 97876888252Smrg s390:Linux:*:* | s390x:Linux:*:*) 9791ae1b5e8Smrg echo ${UNAME_MACHINE}-ibm-linux 9801ae1b5e8Smrg exit ;; 98176888252Smrg sh64*:Linux:*:*) 98263847c39Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9831ae1b5e8Smrg exit ;; 98476888252Smrg sh*:Linux:*:*) 98576888252Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9861ae1b5e8Smrg exit ;; 98776888252Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 98876888252Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9891ae1b5e8Smrg exit ;; 99063847c39Smrg tile*:Linux:*:*) 99163847c39Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 99263847c39Smrg exit ;; 9931ae1b5e8Smrg vax:Linux:*:*) 9941ae1b5e8Smrg echo ${UNAME_MACHINE}-dec-linux-gnu 9951ae1b5e8Smrg exit ;; 99676888252Smrg x86_64:Linux:*:*) 99763847c39Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9981ae1b5e8Smrg exit ;; 9991ae1b5e8Smrg xtensa*:Linux:*:*) 100063847c39Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 10011ae1b5e8Smrg exit ;; 100276888252Smrg i*86:DYNIX/ptx:4*:*) 100376888252Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 100476888252Smrg # earlier versions are messed up and put the nodename in both 100576888252Smrg # sysname and nodename. 100676888252Smrg echo i386-sequent-sysv4 10071ae1b5e8Smrg exit ;; 100876888252Smrg i*86:UNIX_SV:4.2MP:2.*) 100963847c39Smrg # Unixware is an offshoot of SVR4, but it has its own version 101063847c39Smrg # number series starting with 2... 101163847c39Smrg # I am not positive that other SVR4 systems won't match this, 101276888252Smrg # I just have to hope. -- rms. 101363847c39Smrg # Use sysv4.2uw... so that sysv4* matches it. 101476888252Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 10151ae1b5e8Smrg exit ;; 101676888252Smrg i*86:OS/2:*:*) 101776888252Smrg # If we were able to find `uname', then EMX Unix compatibility 101876888252Smrg # is probably installed. 101976888252Smrg echo ${UNAME_MACHINE}-pc-os2-emx 10201ae1b5e8Smrg exit ;; 102176888252Smrg i*86:XTS-300:*:STOP) 102276888252Smrg echo ${UNAME_MACHINE}-unknown-stop 10231ae1b5e8Smrg exit ;; 102476888252Smrg i*86:atheos:*:*) 102576888252Smrg echo ${UNAME_MACHINE}-unknown-atheos 10261ae1b5e8Smrg exit ;; 10271ae1b5e8Smrg i*86:syllable:*:*) 10281ae1b5e8Smrg echo ${UNAME_MACHINE}-pc-syllable 10291ae1b5e8Smrg exit ;; 103063847c39Smrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 103176888252Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 10321ae1b5e8Smrg exit ;; 103376888252Smrg i*86:*DOS:*:*) 103476888252Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 10351ae1b5e8Smrg exit ;; 103676888252Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 103776888252Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 103876888252Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 103976888252Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 104076888252Smrg else 104176888252Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 104276888252Smrg fi 10431ae1b5e8Smrg exit ;; 10441ae1b5e8Smrg i*86:*:5:[678]*) 104563847c39Smrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 104676888252Smrg case `/bin/uname -X | grep "^Machine"` in 104776888252Smrg *486*) UNAME_MACHINE=i486 ;; 104876888252Smrg *Pentium) UNAME_MACHINE=i586 ;; 104976888252Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 105076888252Smrg esac 105176888252Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 10521ae1b5e8Smrg exit ;; 105376888252Smrg i*86:*:3.2:*) 105476888252Smrg if test -f /usr/options/cb.name; then 105576888252Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 105676888252Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 105776888252Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 105876888252Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 105976888252Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 106076888252Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 106176888252Smrg && UNAME_MACHINE=i586 106276888252Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 106376888252Smrg && UNAME_MACHINE=i686 106476888252Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 106576888252Smrg && UNAME_MACHINE=i686 106676888252Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 106776888252Smrg else 106876888252Smrg echo ${UNAME_MACHINE}-pc-sysv32 106976888252Smrg fi 10701ae1b5e8Smrg exit ;; 107176888252Smrg pc:*:*:*) 107276888252Smrg # Left here for compatibility: 107363847c39Smrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 107463847c39Smrg # the processor, so we play safe by assuming i586. 107563847c39Smrg # Note: whatever this is, it MUST be the same as what config.sub 107663847c39Smrg # prints for the "djgpp" host, or else GDB configury will decide that 107763847c39Smrg # this is a cross-build. 107863847c39Smrg echo i586-pc-msdosdjgpp 107963847c39Smrg exit ;; 108076888252Smrg Intel:Mach:3*:*) 108176888252Smrg echo i386-pc-mach3 10821ae1b5e8Smrg exit ;; 108376888252Smrg paragon:*:*:*) 108476888252Smrg echo i860-intel-osf1 10851ae1b5e8Smrg exit ;; 108676888252Smrg i860:*:4.*:*) # i860-SVR4 108776888252Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 108876888252Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 108976888252Smrg else # Add other i860-SVR4 vendors below as they are discovered. 109076888252Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 109176888252Smrg fi 10921ae1b5e8Smrg exit ;; 109376888252Smrg mini*:CTIX:SYS*5:*) 109476888252Smrg # "miniframe" 109576888252Smrg echo m68010-convergent-sysv 10961ae1b5e8Smrg exit ;; 109776888252Smrg mc68k:UNIX:SYSTEM5:3.51m) 109876888252Smrg echo m68k-convergent-sysv 10991ae1b5e8Smrg exit ;; 110076888252Smrg M680?0:D-NIX:5.3:*) 110176888252Smrg echo m68k-diab-dnix 11021ae1b5e8Smrg exit ;; 11031ae1b5e8Smrg M68*:*:R3V[5678]*:*) 11041ae1b5e8Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 11051ae1b5e8Smrg 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) 110676888252Smrg OS_REL='' 110776888252Smrg test -r /etc/.relid \ 110876888252Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 110976888252Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 11101ae1b5e8Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 111176888252Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 11121ae1b5e8Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 111376888252Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 111463847c39Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 111563847c39Smrg && { echo i486-ncr-sysv4; exit; } ;; 111663847c39Smrg NCR*:*:4.2:* | MPRAS*:*:4.2:*) 111763847c39Smrg OS_REL='.3' 111863847c39Smrg test -r /etc/.relid \ 111963847c39Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 112063847c39Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 112163847c39Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 112263847c39Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 112363847c39Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 112463847c39Smrg /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 112563847c39Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 112676888252Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 112776888252Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 11281ae1b5e8Smrg exit ;; 112976888252Smrg mc68030:UNIX_System_V:4.*:*) 113076888252Smrg echo m68k-atari-sysv4 11311ae1b5e8Smrg exit ;; 113276888252Smrg TSUNAMI:LynxOS:2.*:*) 113376888252Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 11341ae1b5e8Smrg exit ;; 113576888252Smrg rs6000:LynxOS:2.*:*) 113676888252Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 11371ae1b5e8Smrg exit ;; 113863847c39Smrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 113976888252Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 11401ae1b5e8Smrg exit ;; 114176888252Smrg SM[BE]S:UNIX_SV:*:*) 114276888252Smrg echo mips-dde-sysv${UNAME_RELEASE} 11431ae1b5e8Smrg exit ;; 114476888252Smrg RM*:ReliantUNIX-*:*:*) 114576888252Smrg echo mips-sni-sysv4 11461ae1b5e8Smrg exit ;; 114776888252Smrg RM*:SINIX-*:*:*) 114876888252Smrg echo mips-sni-sysv4 11491ae1b5e8Smrg exit ;; 115076888252Smrg *:SINIX-*:*:*) 115176888252Smrg if uname -p 2>/dev/null >/dev/null ; then 115276888252Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 115376888252Smrg echo ${UNAME_MACHINE}-sni-sysv4 115476888252Smrg else 115576888252Smrg echo ns32k-sni-sysv 115676888252Smrg fi 11571ae1b5e8Smrg exit ;; 115863847c39Smrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 115963847c39Smrg # says <Richard.M.Bartel@ccMail.Census.GOV> 116063847c39Smrg echo i586-unisys-sysv4 116163847c39Smrg exit ;; 116276888252Smrg *:UNIX_System_V:4*:FTX*) 116376888252Smrg # From Gerald Hewes <hewes@openmarket.com>. 116476888252Smrg # How about differentiating between stratus architectures? -djm 116576888252Smrg echo hppa1.1-stratus-sysv4 11661ae1b5e8Smrg exit ;; 116776888252Smrg *:*:*:FTX*) 116876888252Smrg # From seanf@swdc.stratus.com. 116976888252Smrg echo i860-stratus-sysv4 11701ae1b5e8Smrg exit ;; 11711ae1b5e8Smrg i*86:VOS:*:*) 11721ae1b5e8Smrg # From Paul.Green@stratus.com. 11731ae1b5e8Smrg echo ${UNAME_MACHINE}-stratus-vos 11741ae1b5e8Smrg exit ;; 117576888252Smrg *:VOS:*:*) 117676888252Smrg # From Paul.Green@stratus.com. 117776888252Smrg echo hppa1.1-stratus-vos 11781ae1b5e8Smrg exit ;; 117976888252Smrg mc68*:A/UX:*:*) 118076888252Smrg echo m68k-apple-aux${UNAME_RELEASE} 11811ae1b5e8Smrg exit ;; 118276888252Smrg news*:NEWS-OS:6*:*) 118376888252Smrg echo mips-sony-newsos6 11841ae1b5e8Smrg exit ;; 118576888252Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 118676888252Smrg if [ -d /usr/nec ]; then 118763847c39Smrg echo mips-nec-sysv${UNAME_RELEASE} 118876888252Smrg else 118963847c39Smrg echo mips-unknown-sysv${UNAME_RELEASE} 119076888252Smrg fi 119163847c39Smrg exit ;; 119276888252Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 119376888252Smrg echo powerpc-be-beos 11941ae1b5e8Smrg exit ;; 119576888252Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 119676888252Smrg echo powerpc-apple-beos 11971ae1b5e8Smrg exit ;; 119876888252Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 119976888252Smrg echo i586-pc-beos 12001ae1b5e8Smrg exit ;; 120163847c39Smrg BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 120263847c39Smrg echo i586-pc-haiku 120363847c39Smrg exit ;; 120476888252Smrg SX-4:SUPER-UX:*:*) 120576888252Smrg echo sx4-nec-superux${UNAME_RELEASE} 12061ae1b5e8Smrg exit ;; 120776888252Smrg SX-5:SUPER-UX:*:*) 120876888252Smrg echo sx5-nec-superux${UNAME_RELEASE} 12091ae1b5e8Smrg exit ;; 121076888252Smrg SX-6:SUPER-UX:*:*) 121176888252Smrg echo sx6-nec-superux${UNAME_RELEASE} 12121ae1b5e8Smrg exit ;; 12131ae1b5e8Smrg SX-7:SUPER-UX:*:*) 12141ae1b5e8Smrg echo sx7-nec-superux${UNAME_RELEASE} 12151ae1b5e8Smrg exit ;; 12161ae1b5e8Smrg SX-8:SUPER-UX:*:*) 12171ae1b5e8Smrg echo sx8-nec-superux${UNAME_RELEASE} 12181ae1b5e8Smrg exit ;; 12191ae1b5e8Smrg SX-8R:SUPER-UX:*:*) 12201ae1b5e8Smrg echo sx8r-nec-superux${UNAME_RELEASE} 12211ae1b5e8Smrg exit ;; 122276888252Smrg Power*:Rhapsody:*:*) 122376888252Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 12241ae1b5e8Smrg exit ;; 122576888252Smrg *:Rhapsody:*:*) 122676888252Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 12271ae1b5e8Smrg exit ;; 122876888252Smrg *:Darwin:*:*) 12291ae1b5e8Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 12301ae1b5e8Smrg case $UNAME_PROCESSOR in 123163847c39Smrg i386) 123263847c39Smrg eval $set_cc_for_build 123363847c39Smrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 123463847c39Smrg if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 123563847c39Smrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 123663847c39Smrg grep IS_64BIT_ARCH >/dev/null 123763847c39Smrg then 123863847c39Smrg UNAME_PROCESSOR="x86_64" 123963847c39Smrg fi 124063847c39Smrg fi ;; 12411ae1b5e8Smrg unknown) UNAME_PROCESSOR=powerpc ;; 124276888252Smrg esac 124376888252Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 12441ae1b5e8Smrg exit ;; 124576888252Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 124676888252Smrg UNAME_PROCESSOR=`uname -p` 124776888252Smrg if test "$UNAME_PROCESSOR" = "x86"; then 124876888252Smrg UNAME_PROCESSOR=i386 124976888252Smrg UNAME_MACHINE=pc 125076888252Smrg fi 125176888252Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 12521ae1b5e8Smrg exit ;; 125376888252Smrg *:QNX:*:4*) 125476888252Smrg echo i386-pc-qnx 12551ae1b5e8Smrg exit ;; 125663847c39Smrg NEO-?:NONSTOP_KERNEL:*:*) 125763847c39Smrg echo neo-tandem-nsk${UNAME_RELEASE} 125863847c39Smrg exit ;; 12591ae1b5e8Smrg NSE-?:NONSTOP_KERNEL:*:*) 12601ae1b5e8Smrg echo nse-tandem-nsk${UNAME_RELEASE} 12611ae1b5e8Smrg exit ;; 12621ae1b5e8Smrg NSR-?:NONSTOP_KERNEL:*:*) 126376888252Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 12641ae1b5e8Smrg exit ;; 126576888252Smrg *:NonStop-UX:*:*) 126676888252Smrg echo mips-compaq-nonstopux 12671ae1b5e8Smrg exit ;; 126876888252Smrg BS2000:POSIX*:*:*) 126976888252Smrg echo bs2000-siemens-sysv 12701ae1b5e8Smrg exit ;; 127176888252Smrg DS/*:UNIX_System_V:*:*) 127276888252Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 12731ae1b5e8Smrg exit ;; 127476888252Smrg *:Plan9:*:*) 127576888252Smrg # "uname -m" is not consistent, so use $cputype instead. 386 127676888252Smrg # is converted to i386 for consistency with other x86 127776888252Smrg # operating systems. 127876888252Smrg if test "$cputype" = "386"; then 127976888252Smrg UNAME_MACHINE=i386 128076888252Smrg else 128176888252Smrg UNAME_MACHINE="$cputype" 128276888252Smrg fi 128376888252Smrg echo ${UNAME_MACHINE}-unknown-plan9 12841ae1b5e8Smrg exit ;; 128576888252Smrg *:TOPS-10:*:*) 128676888252Smrg echo pdp10-unknown-tops10 12871ae1b5e8Smrg exit ;; 128876888252Smrg *:TENEX:*:*) 128976888252Smrg echo pdp10-unknown-tenex 12901ae1b5e8Smrg exit ;; 129176888252Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 129276888252Smrg echo pdp10-dec-tops20 12931ae1b5e8Smrg exit ;; 129476888252Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 129576888252Smrg echo pdp10-xkl-tops20 12961ae1b5e8Smrg exit ;; 129776888252Smrg *:TOPS-20:*:*) 129876888252Smrg echo pdp10-unknown-tops20 12991ae1b5e8Smrg exit ;; 130076888252Smrg *:ITS:*:*) 130176888252Smrg echo pdp10-unknown-its 13021ae1b5e8Smrg exit ;; 130376888252Smrg SEI:*:*:SEIUX) 130463847c39Smrg echo mips-sei-seiux${UNAME_RELEASE} 13051ae1b5e8Smrg exit ;; 13061ae1b5e8Smrg *:DragonFly:*:*) 13071ae1b5e8Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 13081ae1b5e8Smrg exit ;; 13091ae1b5e8Smrg *:*VMS:*:*) 131063847c39Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 13111ae1b5e8Smrg case "${UNAME_MACHINE}" in 13121ae1b5e8Smrg A*) echo alpha-dec-vms ; exit ;; 13131ae1b5e8Smrg I*) echo ia64-dec-vms ; exit ;; 13141ae1b5e8Smrg V*) echo vax-dec-vms ; exit ;; 13151ae1b5e8Smrg esac ;; 13161ae1b5e8Smrg *:XENIX:*:SysV) 13171ae1b5e8Smrg echo i386-pc-xenix 13181ae1b5e8Smrg exit ;; 13191ae1b5e8Smrg i*86:skyos:*:*) 13201ae1b5e8Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 13211ae1b5e8Smrg exit ;; 13221ae1b5e8Smrg i*86:rdos:*:*) 13231ae1b5e8Smrg echo ${UNAME_MACHINE}-pc-rdos 13241ae1b5e8Smrg exit ;; 132563847c39Smrg i*86:AROS:*:*) 132663847c39Smrg echo ${UNAME_MACHINE}-pc-aros 132763847c39Smrg exit ;; 132863847c39Smrg x86_64:VMkernel:*:*) 132963847c39Smrg echo ${UNAME_MACHINE}-unknown-esx 133063847c39Smrg exit ;; 133176888252Smrgesac 133276888252Smrg 133376888252Smrg#echo '(No uname command or uname output not recognized.)' 1>&2 133476888252Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 133576888252Smrg 133676888252Smrgeval $set_cc_for_build 133776888252Smrgcat >$dummy.c <<EOF 133876888252Smrg#ifdef _SEQUENT_ 133976888252Smrg# include <sys/types.h> 134076888252Smrg# include <sys/utsname.h> 134176888252Smrg#endif 134276888252Smrgmain () 134376888252Smrg{ 134476888252Smrg#if defined (sony) 134576888252Smrg#if defined (MIPSEB) 134676888252Smrg /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 134776888252Smrg I don't know.... */ 134876888252Smrg printf ("mips-sony-bsd\n"); exit (0); 134976888252Smrg#else 135076888252Smrg#include <sys/param.h> 135176888252Smrg printf ("m68k-sony-newsos%s\n", 135276888252Smrg#ifdef NEWSOS4 135363847c39Smrg "4" 135476888252Smrg#else 135563847c39Smrg "" 135676888252Smrg#endif 135763847c39Smrg ); exit (0); 135876888252Smrg#endif 135976888252Smrg#endif 136076888252Smrg 136176888252Smrg#if defined (__arm) && defined (__acorn) && defined (__unix) 13621ae1b5e8Smrg printf ("arm-acorn-riscix\n"); exit (0); 136376888252Smrg#endif 136476888252Smrg 136576888252Smrg#if defined (hp300) && !defined (hpux) 136676888252Smrg printf ("m68k-hp-bsd\n"); exit (0); 136776888252Smrg#endif 136876888252Smrg 136976888252Smrg#if defined (NeXT) 137076888252Smrg#if !defined (__ARCHITECTURE__) 137176888252Smrg#define __ARCHITECTURE__ "m68k" 137276888252Smrg#endif 137376888252Smrg int version; 137476888252Smrg version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 137576888252Smrg if (version < 4) 137676888252Smrg printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 137776888252Smrg else 137876888252Smrg printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 137976888252Smrg exit (0); 138076888252Smrg#endif 138176888252Smrg 138276888252Smrg#if defined (MULTIMAX) || defined (n16) 138376888252Smrg#if defined (UMAXV) 138476888252Smrg printf ("ns32k-encore-sysv\n"); exit (0); 138576888252Smrg#else 138676888252Smrg#if defined (CMU) 138776888252Smrg printf ("ns32k-encore-mach\n"); exit (0); 138876888252Smrg#else 138976888252Smrg printf ("ns32k-encore-bsd\n"); exit (0); 139076888252Smrg#endif 139176888252Smrg#endif 139276888252Smrg#endif 139376888252Smrg 139476888252Smrg#if defined (__386BSD__) 139576888252Smrg printf ("i386-pc-bsd\n"); exit (0); 139676888252Smrg#endif 139776888252Smrg 139876888252Smrg#if defined (sequent) 139976888252Smrg#if defined (i386) 140076888252Smrg printf ("i386-sequent-dynix\n"); exit (0); 140176888252Smrg#endif 140276888252Smrg#if defined (ns32000) 140376888252Smrg printf ("ns32k-sequent-dynix\n"); exit (0); 140476888252Smrg#endif 140576888252Smrg#endif 140676888252Smrg 140776888252Smrg#if defined (_SEQUENT_) 140876888252Smrg struct utsname un; 140976888252Smrg 141076888252Smrg uname(&un); 141176888252Smrg 141276888252Smrg if (strncmp(un.version, "V2", 2) == 0) { 141376888252Smrg printf ("i386-sequent-ptx2\n"); exit (0); 141476888252Smrg } 141576888252Smrg if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 141676888252Smrg printf ("i386-sequent-ptx1\n"); exit (0); 141776888252Smrg } 141876888252Smrg printf ("i386-sequent-ptx\n"); exit (0); 141976888252Smrg 142076888252Smrg#endif 142176888252Smrg 142276888252Smrg#if defined (vax) 142376888252Smrg# if !defined (ultrix) 142476888252Smrg# include <sys/param.h> 142576888252Smrg# if defined (BSD) 142676888252Smrg# if BSD == 43 142776888252Smrg printf ("vax-dec-bsd4.3\n"); exit (0); 142876888252Smrg# else 142976888252Smrg# if BSD == 199006 143076888252Smrg printf ("vax-dec-bsd4.3reno\n"); exit (0); 143176888252Smrg# else 143276888252Smrg printf ("vax-dec-bsd\n"); exit (0); 143376888252Smrg# endif 143476888252Smrg# endif 143576888252Smrg# else 143676888252Smrg printf ("vax-dec-bsd\n"); exit (0); 143776888252Smrg# endif 143876888252Smrg# else 143976888252Smrg printf ("vax-dec-ultrix\n"); exit (0); 144076888252Smrg# endif 144176888252Smrg#endif 144276888252Smrg 144376888252Smrg#if defined (alliant) && defined (i860) 144476888252Smrg printf ("i860-alliant-bsd\n"); exit (0); 144576888252Smrg#endif 144676888252Smrg 144776888252Smrg exit (1); 144876888252Smrg} 144976888252SmrgEOF 145076888252Smrg 14511ae1b5e8Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 14521ae1b5e8Smrg { echo "$SYSTEM_NAME"; exit; } 145376888252Smrg 145476888252Smrg# Apollos put the system type in the environment. 145576888252Smrg 14561ae1b5e8Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 145776888252Smrg 145876888252Smrg# Convex versions that predate uname can use getsysinfo(1) 145976888252Smrg 146076888252Smrgif [ -x /usr/convex/getsysinfo ] 146176888252Smrgthen 146276888252Smrg case `getsysinfo -f cpu_type` in 146376888252Smrg c1*) 146476888252Smrg echo c1-convex-bsd 14651ae1b5e8Smrg exit ;; 146676888252Smrg c2*) 146776888252Smrg if getsysinfo -f scalar_acc 146876888252Smrg then echo c32-convex-bsd 146976888252Smrg else echo c2-convex-bsd 147076888252Smrg fi 14711ae1b5e8Smrg exit ;; 147276888252Smrg c34*) 147376888252Smrg echo c34-convex-bsd 14741ae1b5e8Smrg exit ;; 147576888252Smrg c38*) 147676888252Smrg echo c38-convex-bsd 14771ae1b5e8Smrg exit ;; 147876888252Smrg c4*) 147976888252Smrg echo c4-convex-bsd 14801ae1b5e8Smrg exit ;; 148176888252Smrg esac 148276888252Smrgfi 148376888252Smrg 148476888252Smrgcat >&2 <<EOF 148576888252Smrg$0: unable to guess system type 148676888252Smrg 148776888252SmrgThis script, last modified $timestamp, has failed to recognize 148876888252Smrgthe operating system you are using. It is advised that you 148976888252Smrgdownload the most up to date version of the config scripts from 149076888252Smrg 14911ae1b5e8Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 14921ae1b5e8Smrgand 14931ae1b5e8Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 149476888252Smrg 149576888252SmrgIf the version you run ($0) is already up to date, please 149676888252Smrgsend the following data and any information you think might be 149776888252Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 149876888252Smrginformation to handle your system. 149976888252Smrg 150076888252Smrgconfig.guess timestamp = $timestamp 150176888252Smrg 150276888252Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 150376888252Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 150476888252Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 150576888252Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 150676888252Smrg 150776888252Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 150876888252Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 150976888252Smrg 151076888252Smrghostinfo = `(hostinfo) 2>/dev/null` 151176888252Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 151276888252Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 151376888252Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 151476888252Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 151576888252Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 151676888252Smrg 151776888252SmrgUNAME_MACHINE = ${UNAME_MACHINE} 151876888252SmrgUNAME_RELEASE = ${UNAME_RELEASE} 151976888252SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 152076888252SmrgUNAME_VERSION = ${UNAME_VERSION} 152176888252SmrgEOF 152276888252Smrg 152376888252Smrgexit 1 152476888252Smrg 152576888252Smrg# Local variables: 152676888252Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 152776888252Smrg# time-stamp-start: "timestamp='" 152876888252Smrg# time-stamp-format: "%:y-%02m-%02d" 152976888252Smrg# time-stamp-end: "'" 153076888252Smrg# End: 1531