config.guess revision 24047306
114c0a534Smrg#! /bin/sh 214c0a534Smrg# Attempt to guess a canonical system name. 324047306Smrg# Copyright 1992-2014 Free Software Foundation, Inc. 414c0a534Smrg 524047306Smrgtimestamp='2014-11-04' 614c0a534Smrg 714c0a534Smrg# This file is free software; you can redistribute it and/or modify it 814c0a534Smrg# under the terms of the GNU General Public License as published by 924047306Smrg# the Free Software Foundation; either version 3 of the License, or 1014c0a534Smrg# (at your option) any later version. 1114c0a534Smrg# 1214c0a534Smrg# This program is distributed in the hope that it will be useful, but 1314c0a534Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1414c0a534Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1514c0a534Smrg# General Public License for more details. 1614c0a534Smrg# 1714c0a534Smrg# You should have received a copy of the GNU General Public License 1824047306Smrg# along with this program; if not, see <http://www.gnu.org/licenses/>. 1914c0a534Smrg# 2014c0a534Smrg# As a special exception to the GNU General Public License, if you 2114c0a534Smrg# distribute this file as part of a program that contains a 2214c0a534Smrg# configuration script generated by Autoconf, you may include it under 2324047306Smrg# the same distribution terms that you use for the rest of that 2424047306Smrg# program. This Exception is an additional permission under section 7 2524047306Smrg# of the GNU General Public License, version 3 ("GPLv3"). 2614c0a534Smrg# 2724047306Smrg# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. 2814c0a534Smrg# 29576bae58Smrg# You can get the latest version of this script from: 30576bae58Smrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 3124047306Smrg# 3224047306Smrg# Please send patches to <config-patches@gnu.org>. 3324047306Smrg 3414c0a534Smrg 3514c0a534Smrgme=`echo "$0" | sed -e 's,.*/,,'` 3614c0a534Smrg 3714c0a534Smrgusage="\ 3814c0a534SmrgUsage: $0 [OPTION] 3914c0a534Smrg 4014c0a534SmrgOutput the configuration name of the system \`$me' is run on. 4114c0a534Smrg 4214c0a534SmrgOperation modes: 4314c0a534Smrg -h, --help print this help, then exit 4414c0a534Smrg -t, --time-stamp print date of last modification, then exit 4514c0a534Smrg -v, --version print version number, then exit 4614c0a534Smrg 4714c0a534SmrgReport bugs and patches to <config-patches@gnu.org>." 4814c0a534Smrg 4914c0a534Smrgversion="\ 5014c0a534SmrgGNU config.guess ($timestamp) 5114c0a534Smrg 5214c0a534SmrgOriginally written by Per Bothner. 5324047306SmrgCopyright 1992-2014 Free Software Foundation, Inc. 5414c0a534Smrg 5514c0a534SmrgThis is free software; see the source for copying conditions. There is NO 5614c0a534Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 5714c0a534Smrg 5814c0a534Smrghelp=" 5914c0a534SmrgTry \`$me --help' for more information." 6014c0a534Smrg 6114c0a534Smrg# Parse command line 6214c0a534Smrgwhile test $# -gt 0 ; do 6314c0a534Smrg case $1 in 6414c0a534Smrg --time-stamp | --time* | -t ) 6514c0a534Smrg echo "$timestamp" ; exit ;; 6614c0a534Smrg --version | -v ) 6714c0a534Smrg echo "$version" ; exit ;; 6814c0a534Smrg --help | --h* | -h ) 6914c0a534Smrg echo "$usage"; exit ;; 7014c0a534Smrg -- ) # Stop option processing 7114c0a534Smrg shift; break ;; 7214c0a534Smrg - ) # Use stdin as input. 7314c0a534Smrg break ;; 7414c0a534Smrg -* ) 7514c0a534Smrg echo "$me: invalid option $1$help" >&2 7614c0a534Smrg exit 1 ;; 7714c0a534Smrg * ) 7814c0a534Smrg break ;; 7914c0a534Smrg esac 8014c0a534Smrgdone 8114c0a534Smrg 8214c0a534Smrgif test $# != 0; then 8314c0a534Smrg echo "$me: too many arguments$help" >&2 8414c0a534Smrg exit 1 8514c0a534Smrgfi 8614c0a534Smrg 8724047306Smrgtrap 'exit 1' 1 2 15 8814c0a534Smrg 8914c0a534Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 9014c0a534Smrg# compiler to aid in system detection is discouraged as it requires 9114c0a534Smrg# temporary files to be created and, as you can see below, it is a 9214c0a534Smrg# headache to deal with in a portable fashion. 9314c0a534Smrg 9414c0a534Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 9514c0a534Smrg# use `HOST_CC' if defined, but it is deprecated. 9614c0a534Smrg 9714c0a534Smrg# Portable tmp directory creation inspired by the Autoconf team. 9814c0a534Smrg 9914c0a534Smrgset_cc_for_build=' 10014c0a534Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 10124047306Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 10214c0a534Smrg: ${TMPDIR=/tmp} ; 103bf2eeab3Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 10414c0a534Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 10514c0a534Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 10614c0a534Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 10714c0a534Smrgdummy=$tmp/dummy ; 10814c0a534Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 10914c0a534Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 11014c0a534Smrg ,,) echo "int x;" > $dummy.c ; 11114c0a534Smrg for c in cc gcc c89 c99 ; do 11214c0a534Smrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 11314c0a534Smrg CC_FOR_BUILD="$c"; break ; 11414c0a534Smrg fi ; 11514c0a534Smrg done ; 11614c0a534Smrg if test x"$CC_FOR_BUILD" = x ; then 11714c0a534Smrg CC_FOR_BUILD=no_compiler_found ; 11814c0a534Smrg fi 11914c0a534Smrg ;; 12014c0a534Smrg ,,*) CC_FOR_BUILD=$CC ;; 12114c0a534Smrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 12214c0a534Smrgesac ; set_cc_for_build= ;' 12314c0a534Smrg 12414c0a534Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 12514c0a534Smrg# (ghazi@noc.rutgers.edu 1994-08-24) 12614c0a534Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 12714c0a534Smrg PATH=$PATH:/.attbin ; export PATH 12814c0a534Smrgfi 12914c0a534Smrg 13014c0a534SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 13114c0a534SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 13214c0a534SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 13314c0a534SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 13414c0a534Smrg 13524047306Smrgcase "${UNAME_SYSTEM}" in 13624047306SmrgLinux|GNU|GNU/*) 13724047306Smrg # If the system lacks a compiler, then just pick glibc. 13824047306Smrg # We could probably try harder. 13924047306Smrg LIBC=gnu 14024047306Smrg 14124047306Smrg eval $set_cc_for_build 14224047306Smrg cat <<-EOF > $dummy.c 14324047306Smrg #include <features.h> 14424047306Smrg #if defined(__UCLIBC__) 14524047306Smrg LIBC=uclibc 14624047306Smrg #elif defined(__dietlibc__) 14724047306Smrg LIBC=dietlibc 14824047306Smrg #else 14924047306Smrg LIBC=gnu 15024047306Smrg #endif 15124047306Smrg EOF 15224047306Smrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` 15324047306Smrg ;; 15424047306Smrgesac 15524047306Smrg 15614c0a534Smrg# Note: order is significant - the case branches are not exclusive. 15714c0a534Smrg 15814c0a534Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 15914c0a534Smrg *:NetBSD:*:*) 16014c0a534Smrg # NetBSD (nbsd) targets should (where applicable) match one or 16124047306Smrg # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 16214c0a534Smrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 16314c0a534Smrg # switched to ELF, *-*-netbsd* would select the old 16414c0a534Smrg # object file format. This provides both forward 16514c0a534Smrg # compatibility and a consistent mechanism for selecting the 16614c0a534Smrg # object file format. 16714c0a534Smrg # 16814c0a534Smrg # Note: NetBSD doesn't particularly care about the vendor 16914c0a534Smrg # portion of the name. We always set it to "unknown". 17014c0a534Smrg sysctl="sysctl -n hw.machine_arch" 17114c0a534Smrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 17214c0a534Smrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 17314c0a534Smrg case "${UNAME_MACHINE_ARCH}" in 17414c0a534Smrg armeb) machine=armeb-unknown ;; 17514c0a534Smrg arm*) machine=arm-unknown ;; 17614c0a534Smrg sh3el) machine=shl-unknown ;; 17714c0a534Smrg sh3eb) machine=sh-unknown ;; 178bf2eeab3Smrg sh5el) machine=sh5le-unknown ;; 17914c0a534Smrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 18014c0a534Smrg esac 18114c0a534Smrg # The Operating System including object format, if it has switched 18214c0a534Smrg # to ELF recently, or will in the future. 18314c0a534Smrg case "${UNAME_MACHINE_ARCH}" in 18414c0a534Smrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 18514c0a534Smrg eval $set_cc_for_build 18614c0a534Smrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 187576bae58Smrg | grep -q __ELF__ 18814c0a534Smrg then 18914c0a534Smrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 19014c0a534Smrg # Return netbsd for either. FIX? 19114c0a534Smrg os=netbsd 19214c0a534Smrg else 19314c0a534Smrg os=netbsdelf 19414c0a534Smrg fi 19514c0a534Smrg ;; 19614c0a534Smrg *) 19724047306Smrg os=netbsd 19814c0a534Smrg ;; 19914c0a534Smrg esac 20014c0a534Smrg # The OS release 20114c0a534Smrg # Debian GNU/NetBSD machines have a different userland, and 20214c0a534Smrg # thus, need a distinct triplet. However, they do not need 20314c0a534Smrg # kernel version information, so it can be replaced with a 20414c0a534Smrg # suitable tag, in the style of linux-gnu. 20514c0a534Smrg case "${UNAME_VERSION}" in 20614c0a534Smrg Debian*) 20714c0a534Smrg release='-gnu' 20814c0a534Smrg ;; 20914c0a534Smrg *) 21014c0a534Smrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 21114c0a534Smrg ;; 21214c0a534Smrg esac 21314c0a534Smrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 21414c0a534Smrg # contains redundant information, the shorter form: 21514c0a534Smrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 21614c0a534Smrg echo "${machine}-${os}${release}" 21714c0a534Smrg exit ;; 21824047306Smrg *:Bitrig:*:*) 21924047306Smrg UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 22024047306Smrg echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} 22124047306Smrg exit ;; 22214c0a534Smrg *:OpenBSD:*:*) 22314c0a534Smrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 22414c0a534Smrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 22514c0a534Smrg exit ;; 22614c0a534Smrg *:ekkoBSD:*:*) 22714c0a534Smrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 22814c0a534Smrg exit ;; 229bf2eeab3Smrg *:SolidBSD:*:*) 230bf2eeab3Smrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 231bf2eeab3Smrg exit ;; 23214c0a534Smrg macppc:MirBSD:*:*) 233bf2eeab3Smrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 23414c0a534Smrg exit ;; 23514c0a534Smrg *:MirBSD:*:*) 23614c0a534Smrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 23714c0a534Smrg exit ;; 23814c0a534Smrg alpha:OSF1:*:*) 23914c0a534Smrg case $UNAME_RELEASE in 24014c0a534Smrg *4.0) 24114c0a534Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 24214c0a534Smrg ;; 24314c0a534Smrg *5.*) 24424047306Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 24514c0a534Smrg ;; 24614c0a534Smrg esac 24714c0a534Smrg # According to Compaq, /usr/sbin/psrinfo has been available on 24814c0a534Smrg # OSF/1 and Tru64 systems produced since 1995. I hope that 24914c0a534Smrg # covers most systems running today. This code pipes the CPU 25014c0a534Smrg # types through head -n 1, so we only detect the type of CPU 0. 25114c0a534Smrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 25214c0a534Smrg case "$ALPHA_CPU_TYPE" in 25314c0a534Smrg "EV4 (21064)") 25414c0a534Smrg UNAME_MACHINE="alpha" ;; 25514c0a534Smrg "EV4.5 (21064)") 25614c0a534Smrg UNAME_MACHINE="alpha" ;; 25714c0a534Smrg "LCA4 (21066/21068)") 25814c0a534Smrg UNAME_MACHINE="alpha" ;; 25914c0a534Smrg "EV5 (21164)") 26014c0a534Smrg UNAME_MACHINE="alphaev5" ;; 26114c0a534Smrg "EV5.6 (21164A)") 26214c0a534Smrg UNAME_MACHINE="alphaev56" ;; 26314c0a534Smrg "EV5.6 (21164PC)") 26414c0a534Smrg UNAME_MACHINE="alphapca56" ;; 26514c0a534Smrg "EV5.7 (21164PC)") 26614c0a534Smrg UNAME_MACHINE="alphapca57" ;; 26714c0a534Smrg "EV6 (21264)") 26814c0a534Smrg UNAME_MACHINE="alphaev6" ;; 26914c0a534Smrg "EV6.7 (21264A)") 27014c0a534Smrg UNAME_MACHINE="alphaev67" ;; 27114c0a534Smrg "EV6.8CB (21264C)") 27214c0a534Smrg UNAME_MACHINE="alphaev68" ;; 27314c0a534Smrg "EV6.8AL (21264B)") 27414c0a534Smrg UNAME_MACHINE="alphaev68" ;; 27514c0a534Smrg "EV6.8CX (21264D)") 27614c0a534Smrg UNAME_MACHINE="alphaev68" ;; 27714c0a534Smrg "EV6.9A (21264/EV69A)") 27814c0a534Smrg UNAME_MACHINE="alphaev69" ;; 27914c0a534Smrg "EV7 (21364)") 28014c0a534Smrg UNAME_MACHINE="alphaev7" ;; 28114c0a534Smrg "EV7.9 (21364A)") 28214c0a534Smrg UNAME_MACHINE="alphaev79" ;; 28314c0a534Smrg esac 28414c0a534Smrg # A Pn.n version is a patched version. 28514c0a534Smrg # A Vn.n version is a released version. 28614c0a534Smrg # A Tn.n version is a released field test version. 28714c0a534Smrg # A Xn.n version is an unreleased experimental baselevel. 28814c0a534Smrg # 1.2 uses "1.2" for uname -r. 28914c0a534Smrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 29024047306Smrg # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 29124047306Smrg exitcode=$? 29224047306Smrg trap '' 0 29324047306Smrg exit $exitcode ;; 29414c0a534Smrg Alpha\ *:Windows_NT*:*) 29514c0a534Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 29614c0a534Smrg # Should we change UNAME_MACHINE based on the output of uname instead 29714c0a534Smrg # of the specific Alpha model? 29814c0a534Smrg echo alpha-pc-interix 29914c0a534Smrg exit ;; 30014c0a534Smrg 21064:Windows_NT:50:3) 30114c0a534Smrg echo alpha-dec-winnt3.5 30214c0a534Smrg exit ;; 30314c0a534Smrg Amiga*:UNIX_System_V:4.0:*) 30414c0a534Smrg echo m68k-unknown-sysv4 30514c0a534Smrg exit ;; 30614c0a534Smrg *:[Aa]miga[Oo][Ss]:*:*) 30714c0a534Smrg echo ${UNAME_MACHINE}-unknown-amigaos 30814c0a534Smrg exit ;; 30914c0a534Smrg *:[Mm]orph[Oo][Ss]:*:*) 31014c0a534Smrg echo ${UNAME_MACHINE}-unknown-morphos 31114c0a534Smrg exit ;; 31214c0a534Smrg *:OS/390:*:*) 31314c0a534Smrg echo i370-ibm-openedition 31414c0a534Smrg exit ;; 31514c0a534Smrg *:z/VM:*:*) 31614c0a534Smrg echo s390-ibm-zvmoe 31714c0a534Smrg exit ;; 31814c0a534Smrg *:OS400:*:*) 31924047306Smrg echo powerpc-ibm-os400 32014c0a534Smrg exit ;; 32114c0a534Smrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 32214c0a534Smrg echo arm-acorn-riscix${UNAME_RELEASE} 32314c0a534Smrg exit ;; 32424047306Smrg arm*:riscos:*:*|arm*:RISCOS:*:*) 32514c0a534Smrg echo arm-unknown-riscos 32614c0a534Smrg exit ;; 32714c0a534Smrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 32814c0a534Smrg echo hppa1.1-hitachi-hiuxmpp 32914c0a534Smrg exit ;; 33014c0a534Smrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 33114c0a534Smrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 33214c0a534Smrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 33314c0a534Smrg echo pyramid-pyramid-sysv3 33414c0a534Smrg else 33514c0a534Smrg echo pyramid-pyramid-bsd 33614c0a534Smrg fi 33714c0a534Smrg exit ;; 33814c0a534Smrg NILE*:*:*:dcosx) 33914c0a534Smrg echo pyramid-pyramid-svr4 34014c0a534Smrg exit ;; 34114c0a534Smrg DRS?6000:unix:4.0:6*) 34214c0a534Smrg echo sparc-icl-nx6 34314c0a534Smrg exit ;; 34414c0a534Smrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 34514c0a534Smrg case `/usr/bin/uname -p` in 34614c0a534Smrg sparc) echo sparc-icl-nx7; exit ;; 34714c0a534Smrg esac ;; 348bf2eeab3Smrg s390x:SunOS:*:*) 349bf2eeab3Smrg echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 350bf2eeab3Smrg exit ;; 35114c0a534Smrg sun4H:SunOS:5.*:*) 35214c0a534Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 35314c0a534Smrg exit ;; 35414c0a534Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 35514c0a534Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 35614c0a534Smrg exit ;; 357576bae58Smrg i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 358576bae58Smrg echo i386-pc-auroraux${UNAME_RELEASE} 359576bae58Smrg exit ;; 360bf2eeab3Smrg i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 361bf2eeab3Smrg eval $set_cc_for_build 362bf2eeab3Smrg SUN_ARCH="i386" 363bf2eeab3Smrg # If there is a compiler, see if it is configured for 64-bit objects. 364bf2eeab3Smrg # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 365bf2eeab3Smrg # This test works for both compilers. 366bf2eeab3Smrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 367bf2eeab3Smrg if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 368bf2eeab3Smrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 369bf2eeab3Smrg grep IS_64BIT_ARCH >/dev/null 370bf2eeab3Smrg then 371bf2eeab3Smrg SUN_ARCH="x86_64" 372bf2eeab3Smrg fi 373bf2eeab3Smrg fi 374bf2eeab3Smrg echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 37514c0a534Smrg exit ;; 37614c0a534Smrg sun4*:SunOS:6*:*) 37714c0a534Smrg # According to config.sub, this is the proper way to canonicalize 37814c0a534Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 37914c0a534Smrg # it's likely to be more like Solaris than SunOS4. 38014c0a534Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 38114c0a534Smrg exit ;; 38214c0a534Smrg sun4*:SunOS:*:*) 38314c0a534Smrg case "`/usr/bin/arch -k`" in 38414c0a534Smrg Series*|S4*) 38514c0a534Smrg UNAME_RELEASE=`uname -v` 38614c0a534Smrg ;; 38714c0a534Smrg esac 38814c0a534Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 38914c0a534Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 39014c0a534Smrg exit ;; 39114c0a534Smrg sun3*:SunOS:*:*) 39214c0a534Smrg echo m68k-sun-sunos${UNAME_RELEASE} 39314c0a534Smrg exit ;; 39414c0a534Smrg sun*:*:4.2BSD:*) 39514c0a534Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 39614c0a534Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 39714c0a534Smrg case "`/bin/arch`" in 39814c0a534Smrg sun3) 39914c0a534Smrg echo m68k-sun-sunos${UNAME_RELEASE} 40014c0a534Smrg ;; 40114c0a534Smrg sun4) 40214c0a534Smrg echo sparc-sun-sunos${UNAME_RELEASE} 40314c0a534Smrg ;; 40414c0a534Smrg esac 40514c0a534Smrg exit ;; 40614c0a534Smrg aushp:SunOS:*:*) 40714c0a534Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 40814c0a534Smrg exit ;; 40914c0a534Smrg # The situation for MiNT is a little confusing. The machine name 41014c0a534Smrg # can be virtually everything (everything which is not 41114c0a534Smrg # "atarist" or "atariste" at least should have a processor 41214c0a534Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 41314c0a534Smrg # to the lowercase version "mint" (or "freemint"). Finally 41414c0a534Smrg # the system name "TOS" denotes a system which is actually not 41514c0a534Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 41614c0a534Smrg # be no problem. 41714c0a534Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 41824047306Smrg echo m68k-atari-mint${UNAME_RELEASE} 41914c0a534Smrg exit ;; 42014c0a534Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 42114c0a534Smrg echo m68k-atari-mint${UNAME_RELEASE} 42224047306Smrg exit ;; 42314c0a534Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 42424047306Smrg echo m68k-atari-mint${UNAME_RELEASE} 42514c0a534Smrg exit ;; 42614c0a534Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 42724047306Smrg echo m68k-milan-mint${UNAME_RELEASE} 42824047306Smrg exit ;; 42914c0a534Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 43024047306Smrg echo m68k-hades-mint${UNAME_RELEASE} 43124047306Smrg exit ;; 43214c0a534Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 43324047306Smrg echo m68k-unknown-mint${UNAME_RELEASE} 43424047306Smrg exit ;; 43514c0a534Smrg m68k:machten:*:*) 43614c0a534Smrg echo m68k-apple-machten${UNAME_RELEASE} 43714c0a534Smrg exit ;; 43814c0a534Smrg powerpc:machten:*:*) 43914c0a534Smrg echo powerpc-apple-machten${UNAME_RELEASE} 44014c0a534Smrg exit ;; 44114c0a534Smrg RISC*:Mach:*:*) 44214c0a534Smrg echo mips-dec-mach_bsd4.3 44314c0a534Smrg exit ;; 44414c0a534Smrg RISC*:ULTRIX:*:*) 44514c0a534Smrg echo mips-dec-ultrix${UNAME_RELEASE} 44614c0a534Smrg exit ;; 44714c0a534Smrg VAX*:ULTRIX*:*:*) 44814c0a534Smrg echo vax-dec-ultrix${UNAME_RELEASE} 44914c0a534Smrg exit ;; 45014c0a534Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 45114c0a534Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 45214c0a534Smrg exit ;; 45314c0a534Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 45414c0a534Smrg eval $set_cc_for_build 45514c0a534Smrg sed 's/^ //' << EOF >$dummy.c 45614c0a534Smrg#ifdef __cplusplus 45714c0a534Smrg#include <stdio.h> /* for printf() prototype */ 45814c0a534Smrg int main (int argc, char *argv[]) { 45914c0a534Smrg#else 46014c0a534Smrg int main (argc, argv) int argc; char *argv[]; { 46114c0a534Smrg#endif 46214c0a534Smrg #if defined (host_mips) && defined (MIPSEB) 46314c0a534Smrg #if defined (SYSTYPE_SYSV) 46414c0a534Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 46514c0a534Smrg #endif 46614c0a534Smrg #if defined (SYSTYPE_SVR4) 46714c0a534Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 46814c0a534Smrg #endif 46914c0a534Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 47014c0a534Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 47114c0a534Smrg #endif 47214c0a534Smrg #endif 47314c0a534Smrg exit (-1); 47414c0a534Smrg } 47514c0a534SmrgEOF 47614c0a534Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 47714c0a534Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 47814c0a534Smrg SYSTEM_NAME=`$dummy $dummyarg` && 47914c0a534Smrg { echo "$SYSTEM_NAME"; exit; } 48014c0a534Smrg echo mips-mips-riscos${UNAME_RELEASE} 48114c0a534Smrg exit ;; 48214c0a534Smrg Motorola:PowerMAX_OS:*:*) 48314c0a534Smrg echo powerpc-motorola-powermax 48414c0a534Smrg exit ;; 48514c0a534Smrg Motorola:*:4.3:PL8-*) 48614c0a534Smrg echo powerpc-harris-powermax 48714c0a534Smrg exit ;; 48814c0a534Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 48914c0a534Smrg echo powerpc-harris-powermax 49014c0a534Smrg exit ;; 49114c0a534Smrg Night_Hawk:Power_UNIX:*:*) 49214c0a534Smrg echo powerpc-harris-powerunix 49314c0a534Smrg exit ;; 49414c0a534Smrg m88k:CX/UX:7*:*) 49514c0a534Smrg echo m88k-harris-cxux7 49614c0a534Smrg exit ;; 49714c0a534Smrg m88k:*:4*:R4*) 49814c0a534Smrg echo m88k-motorola-sysv4 49914c0a534Smrg exit ;; 50014c0a534Smrg m88k:*:3*:R3*) 50114c0a534Smrg echo m88k-motorola-sysv3 50214c0a534Smrg exit ;; 50314c0a534Smrg AViiON:dgux:*:*) 50424047306Smrg # DG/UX returns AViiON for all architectures 50524047306Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 50614c0a534Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 50714c0a534Smrg then 50814c0a534Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 50914c0a534Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 51014c0a534Smrg then 51114c0a534Smrg echo m88k-dg-dgux${UNAME_RELEASE} 51214c0a534Smrg else 51314c0a534Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 51414c0a534Smrg fi 51514c0a534Smrg else 51614c0a534Smrg echo i586-dg-dgux${UNAME_RELEASE} 51714c0a534Smrg fi 51824047306Smrg exit ;; 51914c0a534Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 52014c0a534Smrg echo m88k-dolphin-sysv3 52114c0a534Smrg exit ;; 52214c0a534Smrg M88*:*:R3*:*) 52314c0a534Smrg # Delta 88k system running SVR3 52414c0a534Smrg echo m88k-motorola-sysv3 52514c0a534Smrg exit ;; 52614c0a534Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 52714c0a534Smrg echo m88k-tektronix-sysv3 52814c0a534Smrg exit ;; 52914c0a534Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 53014c0a534Smrg echo m68k-tektronix-bsd 53114c0a534Smrg exit ;; 53214c0a534Smrg *:IRIX*:*:*) 53314c0a534Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 53414c0a534Smrg exit ;; 53514c0a534Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 53614c0a534Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 53714c0a534Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 53814c0a534Smrg i*86:AIX:*:*) 53914c0a534Smrg echo i386-ibm-aix 54014c0a534Smrg exit ;; 54114c0a534Smrg ia64:AIX:*:*) 54214c0a534Smrg if [ -x /usr/bin/oslevel ] ; then 54314c0a534Smrg IBM_REV=`/usr/bin/oslevel` 54414c0a534Smrg else 54514c0a534Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 54614c0a534Smrg fi 54714c0a534Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 54814c0a534Smrg exit ;; 54914c0a534Smrg *:AIX:2:3) 55014c0a534Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 55114c0a534Smrg eval $set_cc_for_build 55214c0a534Smrg sed 's/^ //' << EOF >$dummy.c 55314c0a534Smrg #include <sys/systemcfg.h> 55414c0a534Smrg 55514c0a534Smrg main() 55614c0a534Smrg { 55714c0a534Smrg if (!__power_pc()) 55814c0a534Smrg exit(1); 55914c0a534Smrg puts("powerpc-ibm-aix3.2.5"); 56014c0a534Smrg exit(0); 56114c0a534Smrg } 56214c0a534SmrgEOF 56314c0a534Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 56414c0a534Smrg then 56514c0a534Smrg echo "$SYSTEM_NAME" 56614c0a534Smrg else 56714c0a534Smrg echo rs6000-ibm-aix3.2.5 56814c0a534Smrg fi 56914c0a534Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 57014c0a534Smrg echo rs6000-ibm-aix3.2.4 57114c0a534Smrg else 57214c0a534Smrg echo rs6000-ibm-aix3.2 57314c0a534Smrg fi 57414c0a534Smrg exit ;; 575576bae58Smrg *:AIX:*:[4567]) 57614c0a534Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 57714c0a534Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 57814c0a534Smrg IBM_ARCH=rs6000 57914c0a534Smrg else 58014c0a534Smrg IBM_ARCH=powerpc 58114c0a534Smrg fi 58224047306Smrg if [ -x /usr/bin/lslpp ] ; then 58324047306Smrg IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | 58424047306Smrg awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` 58514c0a534Smrg else 58614c0a534Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 58714c0a534Smrg fi 58814c0a534Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 58914c0a534Smrg exit ;; 59014c0a534Smrg *:AIX:*:*) 59114c0a534Smrg echo rs6000-ibm-aix 59214c0a534Smrg exit ;; 59314c0a534Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 59414c0a534Smrg echo romp-ibm-bsd4.4 59514c0a534Smrg exit ;; 59614c0a534Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 59714c0a534Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 59814c0a534Smrg exit ;; # report: romp-ibm BSD 4.3 59914c0a534Smrg *:BOSX:*:*) 60014c0a534Smrg echo rs6000-bull-bosx 60114c0a534Smrg exit ;; 60214c0a534Smrg DPX/2?00:B.O.S.:*:*) 60314c0a534Smrg echo m68k-bull-sysv3 60414c0a534Smrg exit ;; 60514c0a534Smrg 9000/[34]??:4.3bsd:1.*:*) 60614c0a534Smrg echo m68k-hp-bsd 60714c0a534Smrg exit ;; 60814c0a534Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 60914c0a534Smrg echo m68k-hp-bsd4.4 61014c0a534Smrg exit ;; 61114c0a534Smrg 9000/[34678]??:HP-UX:*:*) 61214c0a534Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 61314c0a534Smrg case "${UNAME_MACHINE}" in 61414c0a534Smrg 9000/31? ) HP_ARCH=m68000 ;; 61514c0a534Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 61614c0a534Smrg 9000/[678][0-9][0-9]) 61714c0a534Smrg if [ -x /usr/bin/getconf ]; then 61814c0a534Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 61924047306Smrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 62024047306Smrg case "${sc_cpu_version}" in 62124047306Smrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 62224047306Smrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 62324047306Smrg 532) # CPU_PA_RISC2_0 62424047306Smrg case "${sc_kernel_bits}" in 62524047306Smrg 32) HP_ARCH="hppa2.0n" ;; 62624047306Smrg 64) HP_ARCH="hppa2.0w" ;; 62714c0a534Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 62824047306Smrg esac ;; 62924047306Smrg esac 63014c0a534Smrg fi 63114c0a534Smrg if [ "${HP_ARCH}" = "" ]; then 63214c0a534Smrg eval $set_cc_for_build 63324047306Smrg sed 's/^ //' << EOF >$dummy.c 63414c0a534Smrg 63524047306Smrg #define _HPUX_SOURCE 63624047306Smrg #include <stdlib.h> 63724047306Smrg #include <unistd.h> 63814c0a534Smrg 63924047306Smrg int main () 64024047306Smrg { 64124047306Smrg #if defined(_SC_KERNEL_BITS) 64224047306Smrg long bits = sysconf(_SC_KERNEL_BITS); 64324047306Smrg #endif 64424047306Smrg long cpu = sysconf (_SC_CPU_VERSION); 64514c0a534Smrg 64624047306Smrg switch (cpu) 64724047306Smrg { 64824047306Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 64924047306Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 65024047306Smrg case CPU_PA_RISC2_0: 65124047306Smrg #if defined(_SC_KERNEL_BITS) 65224047306Smrg switch (bits) 65324047306Smrg { 65424047306Smrg case 64: puts ("hppa2.0w"); break; 65524047306Smrg case 32: puts ("hppa2.0n"); break; 65624047306Smrg default: puts ("hppa2.0"); break; 65724047306Smrg } break; 65824047306Smrg #else /* !defined(_SC_KERNEL_BITS) */ 65924047306Smrg puts ("hppa2.0"); break; 66024047306Smrg #endif 66124047306Smrg default: puts ("hppa1.0"); break; 66224047306Smrg } 66324047306Smrg exit (0); 66424047306Smrg } 66514c0a534SmrgEOF 66614c0a534Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 66714c0a534Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 66814c0a534Smrg fi ;; 66914c0a534Smrg esac 67014c0a534Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 67114c0a534Smrg then 67214c0a534Smrg eval $set_cc_for_build 67314c0a534Smrg 67414c0a534Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 67514c0a534Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 67614c0a534Smrg # generating 64-bit code. GNU and HP use different nomenclature: 67714c0a534Smrg # 67814c0a534Smrg # $ CC_FOR_BUILD=cc ./config.guess 67914c0a534Smrg # => hppa2.0w-hp-hpux11.23 68014c0a534Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 68114c0a534Smrg # => hppa64-hp-hpux11.23 68214c0a534Smrg 68314c0a534Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 684576bae58Smrg grep -q __LP64__ 68514c0a534Smrg then 68614c0a534Smrg HP_ARCH="hppa2.0w" 68714c0a534Smrg else 68814c0a534Smrg HP_ARCH="hppa64" 68914c0a534Smrg fi 69014c0a534Smrg fi 69114c0a534Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 69214c0a534Smrg exit ;; 69314c0a534Smrg ia64:HP-UX:*:*) 69414c0a534Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 69514c0a534Smrg echo ia64-hp-hpux${HPUX_REV} 69614c0a534Smrg exit ;; 69714c0a534Smrg 3050*:HI-UX:*:*) 69814c0a534Smrg eval $set_cc_for_build 69914c0a534Smrg sed 's/^ //' << EOF >$dummy.c 70014c0a534Smrg #include <unistd.h> 70114c0a534Smrg int 70214c0a534Smrg main () 70314c0a534Smrg { 70414c0a534Smrg long cpu = sysconf (_SC_CPU_VERSION); 70514c0a534Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 70614c0a534Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 70714c0a534Smrg results, however. */ 70814c0a534Smrg if (CPU_IS_PA_RISC (cpu)) 70914c0a534Smrg { 71014c0a534Smrg switch (cpu) 71114c0a534Smrg { 71214c0a534Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 71314c0a534Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 71414c0a534Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 71514c0a534Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 71614c0a534Smrg } 71714c0a534Smrg } 71814c0a534Smrg else if (CPU_IS_HP_MC68K (cpu)) 71914c0a534Smrg puts ("m68k-hitachi-hiuxwe2"); 72014c0a534Smrg else puts ("unknown-hitachi-hiuxwe2"); 72114c0a534Smrg exit (0); 72214c0a534Smrg } 72314c0a534SmrgEOF 72414c0a534Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 72514c0a534Smrg { echo "$SYSTEM_NAME"; exit; } 72614c0a534Smrg echo unknown-hitachi-hiuxwe2 72714c0a534Smrg exit ;; 72814c0a534Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 72914c0a534Smrg echo hppa1.1-hp-bsd 73014c0a534Smrg exit ;; 73114c0a534Smrg 9000/8??:4.3bsd:*:*) 73214c0a534Smrg echo hppa1.0-hp-bsd 73314c0a534Smrg exit ;; 73414c0a534Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 73514c0a534Smrg echo hppa1.0-hp-mpeix 73614c0a534Smrg exit ;; 73714c0a534Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 73814c0a534Smrg echo hppa1.1-hp-osf 73914c0a534Smrg exit ;; 74014c0a534Smrg hp8??:OSF1:*:*) 74114c0a534Smrg echo hppa1.0-hp-osf 74214c0a534Smrg exit ;; 74314c0a534Smrg i*86:OSF1:*:*) 74414c0a534Smrg if [ -x /usr/sbin/sysversion ] ; then 74514c0a534Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 74614c0a534Smrg else 74714c0a534Smrg echo ${UNAME_MACHINE}-unknown-osf1 74814c0a534Smrg fi 74914c0a534Smrg exit ;; 75014c0a534Smrg parisc*:Lites*:*:*) 75114c0a534Smrg echo hppa1.1-hp-lites 75214c0a534Smrg exit ;; 75314c0a534Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 75414c0a534Smrg echo c1-convex-bsd 75524047306Smrg exit ;; 75614c0a534Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 75714c0a534Smrg if getsysinfo -f scalar_acc 75814c0a534Smrg then echo c32-convex-bsd 75914c0a534Smrg else echo c2-convex-bsd 76014c0a534Smrg fi 76124047306Smrg exit ;; 76214c0a534Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 76314c0a534Smrg echo c34-convex-bsd 76424047306Smrg exit ;; 76514c0a534Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 76614c0a534Smrg echo c38-convex-bsd 76724047306Smrg exit ;; 76814c0a534Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 76914c0a534Smrg echo c4-convex-bsd 77024047306Smrg exit ;; 77114c0a534Smrg CRAY*Y-MP:*:*:*) 77214c0a534Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 77314c0a534Smrg exit ;; 77414c0a534Smrg CRAY*[A-Z]90:*:*:*) 77514c0a534Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 77614c0a534Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 77714c0a534Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 77814c0a534Smrg -e 's/\.[^.]*$/.X/' 77914c0a534Smrg exit ;; 78014c0a534Smrg CRAY*TS:*:*:*) 78114c0a534Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 78214c0a534Smrg exit ;; 78314c0a534Smrg CRAY*T3E:*:*:*) 78414c0a534Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 78514c0a534Smrg exit ;; 78614c0a534Smrg CRAY*SV1:*:*:*) 78714c0a534Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 78814c0a534Smrg exit ;; 78914c0a534Smrg *:UNICOS/mp:*:*) 79014c0a534Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 79114c0a534Smrg exit ;; 79214c0a534Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 79314c0a534Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 79424047306Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 79524047306Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 79624047306Smrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 79724047306Smrg exit ;; 79814c0a534Smrg 5000:UNIX_System_V:4.*:*) 79924047306Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 80024047306Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 80124047306Smrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 80214c0a534Smrg exit ;; 80314c0a534Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 80414c0a534Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 80514c0a534Smrg exit ;; 80614c0a534Smrg sparc*:BSD/OS:*:*) 80714c0a534Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 80814c0a534Smrg exit ;; 80914c0a534Smrg *:BSD/OS:*:*) 81014c0a534Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 81114c0a534Smrg exit ;; 81214c0a534Smrg *:FreeBSD:*:*) 81324047306Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 81424047306Smrg case ${UNAME_PROCESSOR} in 815bf2eeab3Smrg amd64) 816bf2eeab3Smrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 817bf2eeab3Smrg *) 81824047306Smrg echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 819bf2eeab3Smrg esac 82014c0a534Smrg exit ;; 82114c0a534Smrg i*:CYGWIN*:*) 82214c0a534Smrg echo ${UNAME_MACHINE}-pc-cygwin 82314c0a534Smrg exit ;; 82424047306Smrg *:MINGW64*:*) 82524047306Smrg echo ${UNAME_MACHINE}-pc-mingw64 82624047306Smrg exit ;; 827bf2eeab3Smrg *:MINGW*:*) 82814c0a534Smrg echo ${UNAME_MACHINE}-pc-mingw32 82914c0a534Smrg exit ;; 83024047306Smrg *:MSYS*:*) 83124047306Smrg echo ${UNAME_MACHINE}-pc-msys 83224047306Smrg exit ;; 83314c0a534Smrg i*:windows32*:*) 83424047306Smrg # uname -m includes "-pc" on this system. 83524047306Smrg echo ${UNAME_MACHINE}-mingw32 83614c0a534Smrg exit ;; 83714c0a534Smrg i*:PW*:*) 83814c0a534Smrg echo ${UNAME_MACHINE}-pc-pw32 83914c0a534Smrg exit ;; 840576bae58Smrg *:Interix*:*) 84124047306Smrg case ${UNAME_MACHINE} in 842bf2eeab3Smrg x86) 843bf2eeab3Smrg echo i586-pc-interix${UNAME_RELEASE} 844bf2eeab3Smrg exit ;; 845576bae58Smrg authenticamd | genuineintel | EM64T) 846bf2eeab3Smrg echo x86_64-unknown-interix${UNAME_RELEASE} 847bf2eeab3Smrg exit ;; 848bf2eeab3Smrg IA64) 849bf2eeab3Smrg echo ia64-unknown-interix${UNAME_RELEASE} 850bf2eeab3Smrg exit ;; 851bf2eeab3Smrg esac ;; 85214c0a534Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 85314c0a534Smrg echo i${UNAME_MACHINE}-pc-mks 85414c0a534Smrg exit ;; 855576bae58Smrg 8664:Windows_NT:*) 856576bae58Smrg echo x86_64-pc-mks 857576bae58Smrg exit ;; 85814c0a534Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 85914c0a534Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 86014c0a534Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 86114c0a534Smrg # UNAME_MACHINE based on the output of uname instead of i386? 86214c0a534Smrg echo i586-pc-interix 86314c0a534Smrg exit ;; 86414c0a534Smrg i*:UWIN*:*) 86514c0a534Smrg echo ${UNAME_MACHINE}-pc-uwin 86614c0a534Smrg exit ;; 867bf2eeab3Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 86814c0a534Smrg echo x86_64-unknown-cygwin 86914c0a534Smrg exit ;; 87014c0a534Smrg p*:CYGWIN*:*) 87114c0a534Smrg echo powerpcle-unknown-cygwin 87214c0a534Smrg exit ;; 87314c0a534Smrg prep*:SunOS:5.*:*) 87414c0a534Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 87514c0a534Smrg exit ;; 87614c0a534Smrg *:GNU:*:*) 87714c0a534Smrg # the GNU system 87824047306Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 87914c0a534Smrg exit ;; 88014c0a534Smrg *:GNU/*:*:*) 88114c0a534Smrg # other systems with GNU libc and userland 88224047306Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} 88314c0a534Smrg exit ;; 88414c0a534Smrg i*86:Minix:*:*) 88514c0a534Smrg echo ${UNAME_MACHINE}-pc-minix 88614c0a534Smrg exit ;; 88724047306Smrg aarch64:Linux:*:*) 88824047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 88924047306Smrg exit ;; 89024047306Smrg aarch64_be:Linux:*:*) 89124047306Smrg UNAME_MACHINE=aarch64_be 89224047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 89324047306Smrg exit ;; 894576bae58Smrg alpha:Linux:*:*) 895576bae58Smrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 896576bae58Smrg EV5) UNAME_MACHINE=alphaev5 ;; 897576bae58Smrg EV56) UNAME_MACHINE=alphaev56 ;; 898576bae58Smrg PCA56) UNAME_MACHINE=alphapca56 ;; 899576bae58Smrg PCA57) UNAME_MACHINE=alphapca56 ;; 900576bae58Smrg EV6) UNAME_MACHINE=alphaev6 ;; 901576bae58Smrg EV67) UNAME_MACHINE=alphaev67 ;; 902576bae58Smrg EV68*) UNAME_MACHINE=alphaev68 ;; 90324047306Smrg esac 904576bae58Smrg objdump --private-headers /bin/sh | grep -q ld.so.1 90524047306Smrg if test "$?" = 0 ; then LIBC="gnulibc1" ; fi 90624047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 90724047306Smrg exit ;; 90824047306Smrg arc:Linux:*:* | arceb:Linux:*:*) 90924047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 910576bae58Smrg exit ;; 91114c0a534Smrg arm*:Linux:*:*) 912bf2eeab3Smrg eval $set_cc_for_build 913bf2eeab3Smrg if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 914bf2eeab3Smrg | grep -q __ARM_EABI__ 915bf2eeab3Smrg then 91624047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 917bf2eeab3Smrg else 91824047306Smrg if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 91924047306Smrg | grep -q __ARM_PCS_VFP 92024047306Smrg then 92124047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi 92224047306Smrg else 92324047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf 92424047306Smrg fi 925bf2eeab3Smrg fi 926bf2eeab3Smrg exit ;; 927bf2eeab3Smrg avr32*:Linux:*:*) 92824047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 92914c0a534Smrg exit ;; 93014c0a534Smrg cris:Linux:*:*) 93124047306Smrg echo ${UNAME_MACHINE}-axis-linux-${LIBC} 93214c0a534Smrg exit ;; 93314c0a534Smrg crisv32:Linux:*:*) 93424047306Smrg echo ${UNAME_MACHINE}-axis-linux-${LIBC} 93514c0a534Smrg exit ;; 93614c0a534Smrg frv:Linux:*:*) 93724047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 93824047306Smrg exit ;; 93924047306Smrg hexagon:Linux:*:*) 94024047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 94114c0a534Smrg exit ;; 942576bae58Smrg i*86:Linux:*:*) 94324047306Smrg echo ${UNAME_MACHINE}-pc-linux-${LIBC} 944576bae58Smrg exit ;; 94514c0a534Smrg ia64:Linux:*:*) 94624047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 94714c0a534Smrg exit ;; 94814c0a534Smrg m32r*:Linux:*:*) 94924047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 95014c0a534Smrg exit ;; 95114c0a534Smrg m68*:Linux:*:*) 95224047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 95314c0a534Smrg exit ;; 954576bae58Smrg mips:Linux:*:* | mips64:Linux:*:*) 95514c0a534Smrg eval $set_cc_for_build 95614c0a534Smrg sed 's/^ //' << EOF >$dummy.c 95714c0a534Smrg #undef CPU 958576bae58Smrg #undef ${UNAME_MACHINE} 959576bae58Smrg #undef ${UNAME_MACHINE}el 96014c0a534Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 961576bae58Smrg CPU=${UNAME_MACHINE}el 96214c0a534Smrg #else 96314c0a534Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 964576bae58Smrg CPU=${UNAME_MACHINE} 96514c0a534Smrg #else 96614c0a534Smrg CPU= 96714c0a534Smrg #endif 96814c0a534Smrg #endif 96914c0a534SmrgEOF 970576bae58Smrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 97124047306Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } 97214c0a534Smrg ;; 97324047306Smrg openrisc*:Linux:*:*) 97424047306Smrg echo or1k-unknown-linux-${LIBC} 97524047306Smrg exit ;; 97624047306Smrg or32:Linux:*:* | or1k*:Linux:*:*) 97724047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 978bf2eeab3Smrg exit ;; 979bf2eeab3Smrg padre:Linux:*:*) 98024047306Smrg echo sparc-unknown-linux-${LIBC} 981bf2eeab3Smrg exit ;; 982576bae58Smrg parisc64:Linux:*:* | hppa64:Linux:*:*) 98324047306Smrg echo hppa64-unknown-linux-${LIBC} 984576bae58Smrg exit ;; 98514c0a534Smrg parisc:Linux:*:* | hppa:Linux:*:*) 98614c0a534Smrg # Look for CPU level 98714c0a534Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 98824047306Smrg PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; 98924047306Smrg PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; 99024047306Smrg *) echo hppa-unknown-linux-${LIBC} ;; 99114c0a534Smrg esac 99214c0a534Smrg exit ;; 993576bae58Smrg ppc64:Linux:*:*) 99424047306Smrg echo powerpc64-unknown-linux-${LIBC} 995576bae58Smrg exit ;; 996576bae58Smrg ppc:Linux:*:*) 99724047306Smrg echo powerpc-unknown-linux-${LIBC} 99824047306Smrg exit ;; 99924047306Smrg ppc64le:Linux:*:*) 100024047306Smrg echo powerpc64le-unknown-linux-${LIBC} 100124047306Smrg exit ;; 100224047306Smrg ppcle:Linux:*:*) 100324047306Smrg echo powerpcle-unknown-linux-${LIBC} 100414c0a534Smrg exit ;; 100514c0a534Smrg s390:Linux:*:* | s390x:Linux:*:*) 100624047306Smrg echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 100714c0a534Smrg exit ;; 100814c0a534Smrg sh64*:Linux:*:*) 100924047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 101014c0a534Smrg exit ;; 101114c0a534Smrg sh*:Linux:*:*) 101224047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 101314c0a534Smrg exit ;; 101414c0a534Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 101524047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 101614c0a534Smrg exit ;; 1017576bae58Smrg tile*:Linux:*:*) 101824047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1019576bae58Smrg exit ;; 1020bf2eeab3Smrg vax:Linux:*:*) 102124047306Smrg echo ${UNAME_MACHINE}-dec-linux-${LIBC} 1022bf2eeab3Smrg exit ;; 102314c0a534Smrg x86_64:Linux:*:*) 102424047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 102514c0a534Smrg exit ;; 1026bf2eeab3Smrg xtensa*:Linux:*:*) 102724047306Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1028bf2eeab3Smrg exit ;; 102914c0a534Smrg i*86:DYNIX/ptx:4*:*) 103014c0a534Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 103114c0a534Smrg # earlier versions are messed up and put the nodename in both 103214c0a534Smrg # sysname and nodename. 103314c0a534Smrg echo i386-sequent-sysv4 103414c0a534Smrg exit ;; 103514c0a534Smrg i*86:UNIX_SV:4.2MP:2.*) 103624047306Smrg # Unixware is an offshoot of SVR4, but it has its own version 103724047306Smrg # number series starting with 2... 103824047306Smrg # I am not positive that other SVR4 systems won't match this, 103914c0a534Smrg # I just have to hope. -- rms. 104024047306Smrg # Use sysv4.2uw... so that sysv4* matches it. 104114c0a534Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 104214c0a534Smrg exit ;; 104314c0a534Smrg i*86:OS/2:*:*) 104414c0a534Smrg # If we were able to find `uname', then EMX Unix compatibility 104514c0a534Smrg # is probably installed. 104614c0a534Smrg echo ${UNAME_MACHINE}-pc-os2-emx 104714c0a534Smrg exit ;; 104814c0a534Smrg i*86:XTS-300:*:STOP) 104914c0a534Smrg echo ${UNAME_MACHINE}-unknown-stop 105014c0a534Smrg exit ;; 105114c0a534Smrg i*86:atheos:*:*) 105214c0a534Smrg echo ${UNAME_MACHINE}-unknown-atheos 105314c0a534Smrg exit ;; 105414c0a534Smrg i*86:syllable:*:*) 105514c0a534Smrg echo ${UNAME_MACHINE}-pc-syllable 105614c0a534Smrg exit ;; 1057576bae58Smrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 105814c0a534Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 105914c0a534Smrg exit ;; 106014c0a534Smrg i*86:*DOS:*:*) 106114c0a534Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 106214c0a534Smrg exit ;; 106314c0a534Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 106414c0a534Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 106514c0a534Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 106614c0a534Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 106714c0a534Smrg else 106814c0a534Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 106914c0a534Smrg fi 107014c0a534Smrg exit ;; 107114c0a534Smrg i*86:*:5:[678]*) 107224047306Smrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 107314c0a534Smrg case `/bin/uname -X | grep "^Machine"` in 107414c0a534Smrg *486*) UNAME_MACHINE=i486 ;; 107514c0a534Smrg *Pentium) UNAME_MACHINE=i586 ;; 107614c0a534Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 107714c0a534Smrg esac 107814c0a534Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 107914c0a534Smrg exit ;; 108014c0a534Smrg i*86:*:3.2:*) 108114c0a534Smrg if test -f /usr/options/cb.name; then 108214c0a534Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 108314c0a534Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 108414c0a534Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 108514c0a534Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 108614c0a534Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 108714c0a534Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 108814c0a534Smrg && UNAME_MACHINE=i586 108914c0a534Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 109014c0a534Smrg && UNAME_MACHINE=i686 109114c0a534Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 109214c0a534Smrg && UNAME_MACHINE=i686 109314c0a534Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 109414c0a534Smrg else 109514c0a534Smrg echo ${UNAME_MACHINE}-pc-sysv32 109614c0a534Smrg fi 109714c0a534Smrg exit ;; 109814c0a534Smrg pc:*:*:*) 109914c0a534Smrg # Left here for compatibility: 110024047306Smrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 110124047306Smrg # the processor, so we play safe by assuming i586. 1102bf2eeab3Smrg # Note: whatever this is, it MUST be the same as what config.sub 1103bf2eeab3Smrg # prints for the "djgpp" host, or else GDB configury will decide that 1104bf2eeab3Smrg # this is a cross-build. 1105bf2eeab3Smrg echo i586-pc-msdosdjgpp 110624047306Smrg exit ;; 110714c0a534Smrg Intel:Mach:3*:*) 110814c0a534Smrg echo i386-pc-mach3 110914c0a534Smrg exit ;; 111014c0a534Smrg paragon:*:*:*) 111114c0a534Smrg echo i860-intel-osf1 111214c0a534Smrg exit ;; 111314c0a534Smrg i860:*:4.*:*) # i860-SVR4 111414c0a534Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 111514c0a534Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 111614c0a534Smrg else # Add other i860-SVR4 vendors below as they are discovered. 111714c0a534Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 111814c0a534Smrg fi 111914c0a534Smrg exit ;; 112014c0a534Smrg mini*:CTIX:SYS*5:*) 112114c0a534Smrg # "miniframe" 112214c0a534Smrg echo m68010-convergent-sysv 112314c0a534Smrg exit ;; 112414c0a534Smrg mc68k:UNIX:SYSTEM5:3.51m) 112514c0a534Smrg echo m68k-convergent-sysv 112614c0a534Smrg exit ;; 112714c0a534Smrg M680?0:D-NIX:5.3:*) 112814c0a534Smrg echo m68k-diab-dnix 112914c0a534Smrg exit ;; 113014c0a534Smrg M68*:*:R3V[5678]*:*) 113114c0a534Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 113214c0a534Smrg 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) 113314c0a534Smrg OS_REL='' 113414c0a534Smrg test -r /etc/.relid \ 113514c0a534Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 113614c0a534Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 113714c0a534Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 113814c0a534Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 113914c0a534Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 114014c0a534Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 114124047306Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 114224047306Smrg && { echo i486-ncr-sysv4; exit; } ;; 1143bf2eeab3Smrg NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1144bf2eeab3Smrg OS_REL='.3' 1145bf2eeab3Smrg test -r /etc/.relid \ 1146bf2eeab3Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1147bf2eeab3Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1148bf2eeab3Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1149bf2eeab3Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1150bf2eeab3Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1151bf2eeab3Smrg /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1152bf2eeab3Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 115314c0a534Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 115414c0a534Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 115514c0a534Smrg exit ;; 115614c0a534Smrg mc68030:UNIX_System_V:4.*:*) 115714c0a534Smrg echo m68k-atari-sysv4 115814c0a534Smrg exit ;; 115914c0a534Smrg TSUNAMI:LynxOS:2.*:*) 116014c0a534Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 116114c0a534Smrg exit ;; 116214c0a534Smrg rs6000:LynxOS:2.*:*) 116314c0a534Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 116414c0a534Smrg exit ;; 1165576bae58Smrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 116614c0a534Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 116714c0a534Smrg exit ;; 116814c0a534Smrg SM[BE]S:UNIX_SV:*:*) 116914c0a534Smrg echo mips-dde-sysv${UNAME_RELEASE} 117014c0a534Smrg exit ;; 117114c0a534Smrg RM*:ReliantUNIX-*:*:*) 117214c0a534Smrg echo mips-sni-sysv4 117314c0a534Smrg exit ;; 117414c0a534Smrg RM*:SINIX-*:*:*) 117514c0a534Smrg echo mips-sni-sysv4 117614c0a534Smrg exit ;; 117714c0a534Smrg *:SINIX-*:*:*) 117814c0a534Smrg if uname -p 2>/dev/null >/dev/null ; then 117914c0a534Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 118014c0a534Smrg echo ${UNAME_MACHINE}-sni-sysv4 118114c0a534Smrg else 118214c0a534Smrg echo ns32k-sni-sysv 118314c0a534Smrg fi 118414c0a534Smrg exit ;; 118524047306Smrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 118624047306Smrg # says <Richard.M.Bartel@ccMail.Census.GOV> 118724047306Smrg echo i586-unisys-sysv4 118824047306Smrg exit ;; 118914c0a534Smrg *:UNIX_System_V:4*:FTX*) 119014c0a534Smrg # From Gerald Hewes <hewes@openmarket.com>. 119114c0a534Smrg # How about differentiating between stratus architectures? -djm 119214c0a534Smrg echo hppa1.1-stratus-sysv4 119314c0a534Smrg exit ;; 119414c0a534Smrg *:*:*:FTX*) 119514c0a534Smrg # From seanf@swdc.stratus.com. 119614c0a534Smrg echo i860-stratus-sysv4 119714c0a534Smrg exit ;; 119814c0a534Smrg i*86:VOS:*:*) 119914c0a534Smrg # From Paul.Green@stratus.com. 120014c0a534Smrg echo ${UNAME_MACHINE}-stratus-vos 120114c0a534Smrg exit ;; 120214c0a534Smrg *:VOS:*:*) 120314c0a534Smrg # From Paul.Green@stratus.com. 120414c0a534Smrg echo hppa1.1-stratus-vos 120514c0a534Smrg exit ;; 120614c0a534Smrg mc68*:A/UX:*:*) 120714c0a534Smrg echo m68k-apple-aux${UNAME_RELEASE} 120814c0a534Smrg exit ;; 120914c0a534Smrg news*:NEWS-OS:6*:*) 121014c0a534Smrg echo mips-sony-newsos6 121114c0a534Smrg exit ;; 121214c0a534Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 121314c0a534Smrg if [ -d /usr/nec ]; then 121424047306Smrg echo mips-nec-sysv${UNAME_RELEASE} 121514c0a534Smrg else 121624047306Smrg echo mips-unknown-sysv${UNAME_RELEASE} 121714c0a534Smrg fi 121824047306Smrg exit ;; 121914c0a534Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 122014c0a534Smrg echo powerpc-be-beos 122114c0a534Smrg exit ;; 122214c0a534Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 122314c0a534Smrg echo powerpc-apple-beos 122414c0a534Smrg exit ;; 122514c0a534Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 122614c0a534Smrg echo i586-pc-beos 122714c0a534Smrg exit ;; 1228bf2eeab3Smrg BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1229bf2eeab3Smrg echo i586-pc-haiku 1230bf2eeab3Smrg exit ;; 123124047306Smrg x86_64:Haiku:*:*) 123224047306Smrg echo x86_64-unknown-haiku 123324047306Smrg exit ;; 123414c0a534Smrg SX-4:SUPER-UX:*:*) 123514c0a534Smrg echo sx4-nec-superux${UNAME_RELEASE} 123614c0a534Smrg exit ;; 123714c0a534Smrg SX-5:SUPER-UX:*:*) 123814c0a534Smrg echo sx5-nec-superux${UNAME_RELEASE} 123914c0a534Smrg exit ;; 124014c0a534Smrg SX-6:SUPER-UX:*:*) 124114c0a534Smrg echo sx6-nec-superux${UNAME_RELEASE} 124214c0a534Smrg exit ;; 1243bf2eeab3Smrg SX-7:SUPER-UX:*:*) 1244bf2eeab3Smrg echo sx7-nec-superux${UNAME_RELEASE} 1245bf2eeab3Smrg exit ;; 1246bf2eeab3Smrg SX-8:SUPER-UX:*:*) 1247bf2eeab3Smrg echo sx8-nec-superux${UNAME_RELEASE} 1248bf2eeab3Smrg exit ;; 1249bf2eeab3Smrg SX-8R:SUPER-UX:*:*) 1250bf2eeab3Smrg echo sx8r-nec-superux${UNAME_RELEASE} 1251bf2eeab3Smrg exit ;; 125214c0a534Smrg Power*:Rhapsody:*:*) 125314c0a534Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 125414c0a534Smrg exit ;; 125514c0a534Smrg *:Rhapsody:*:*) 125614c0a534Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 125714c0a534Smrg exit ;; 125814c0a534Smrg *:Darwin:*:*) 125914c0a534Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 126024047306Smrg eval $set_cc_for_build 126124047306Smrg if test "$UNAME_PROCESSOR" = unknown ; then 126224047306Smrg UNAME_PROCESSOR=powerpc 126324047306Smrg fi 126424047306Smrg if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then 126524047306Smrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 126624047306Smrg if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 126724047306Smrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 126824047306Smrg grep IS_64BIT_ARCH >/dev/null 126924047306Smrg then 127024047306Smrg case $UNAME_PROCESSOR in 127124047306Smrg i386) UNAME_PROCESSOR=x86_64 ;; 127224047306Smrg powerpc) UNAME_PROCESSOR=powerpc64 ;; 127324047306Smrg esac 127424047306Smrg fi 127524047306Smrg fi 127624047306Smrg elif test "$UNAME_PROCESSOR" = i386 ; then 127724047306Smrg # Avoid executing cc on OS X 10.9, as it ships with a stub 127824047306Smrg # that puts up a graphical alert prompting to install 127924047306Smrg # developer tools. Any system running Mac OS X 10.7 or 128024047306Smrg # later (Darwin 11 and later) is required to have a 64-bit 128124047306Smrg # processor. This is not true of the ARM version of Darwin 128224047306Smrg # that Apple uses in portable devices. 128324047306Smrg UNAME_PROCESSOR=x86_64 128424047306Smrg fi 128514c0a534Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 128614c0a534Smrg exit ;; 128714c0a534Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 128814c0a534Smrg UNAME_PROCESSOR=`uname -p` 128914c0a534Smrg if test "$UNAME_PROCESSOR" = "x86"; then 129014c0a534Smrg UNAME_PROCESSOR=i386 129114c0a534Smrg UNAME_MACHINE=pc 129214c0a534Smrg fi 129314c0a534Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 129414c0a534Smrg exit ;; 129514c0a534Smrg *:QNX:*:4*) 129614c0a534Smrg echo i386-pc-qnx 129714c0a534Smrg exit ;; 129824047306Smrg NEO-?:NONSTOP_KERNEL:*:*) 129924047306Smrg echo neo-tandem-nsk${UNAME_RELEASE} 130024047306Smrg exit ;; 130124047306Smrg NSE-*:NONSTOP_KERNEL:*:*) 130214c0a534Smrg echo nse-tandem-nsk${UNAME_RELEASE} 130314c0a534Smrg exit ;; 130414c0a534Smrg NSR-?:NONSTOP_KERNEL:*:*) 130514c0a534Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 130614c0a534Smrg exit ;; 130714c0a534Smrg *:NonStop-UX:*:*) 130814c0a534Smrg echo mips-compaq-nonstopux 130914c0a534Smrg exit ;; 131014c0a534Smrg BS2000:POSIX*:*:*) 131114c0a534Smrg echo bs2000-siemens-sysv 131214c0a534Smrg exit ;; 131314c0a534Smrg DS/*:UNIX_System_V:*:*) 131414c0a534Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 131514c0a534Smrg exit ;; 131614c0a534Smrg *:Plan9:*:*) 131714c0a534Smrg # "uname -m" is not consistent, so use $cputype instead. 386 131814c0a534Smrg # is converted to i386 for consistency with other x86 131914c0a534Smrg # operating systems. 132014c0a534Smrg if test "$cputype" = "386"; then 132114c0a534Smrg UNAME_MACHINE=i386 132214c0a534Smrg else 132314c0a534Smrg UNAME_MACHINE="$cputype" 132414c0a534Smrg fi 132514c0a534Smrg echo ${UNAME_MACHINE}-unknown-plan9 132614c0a534Smrg exit ;; 132714c0a534Smrg *:TOPS-10:*:*) 132814c0a534Smrg echo pdp10-unknown-tops10 132914c0a534Smrg exit ;; 133014c0a534Smrg *:TENEX:*:*) 133114c0a534Smrg echo pdp10-unknown-tenex 133214c0a534Smrg exit ;; 133314c0a534Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 133414c0a534Smrg echo pdp10-dec-tops20 133514c0a534Smrg exit ;; 133614c0a534Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 133714c0a534Smrg echo pdp10-xkl-tops20 133814c0a534Smrg exit ;; 133914c0a534Smrg *:TOPS-20:*:*) 134014c0a534Smrg echo pdp10-unknown-tops20 134114c0a534Smrg exit ;; 134214c0a534Smrg *:ITS:*:*) 134314c0a534Smrg echo pdp10-unknown-its 134414c0a534Smrg exit ;; 134514c0a534Smrg SEI:*:*:SEIUX) 134624047306Smrg echo mips-sei-seiux${UNAME_RELEASE} 134714c0a534Smrg exit ;; 134814c0a534Smrg *:DragonFly:*:*) 134914c0a534Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 135014c0a534Smrg exit ;; 135114c0a534Smrg *:*VMS:*:*) 135224047306Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 135314c0a534Smrg case "${UNAME_MACHINE}" in 135414c0a534Smrg A*) echo alpha-dec-vms ; exit ;; 135514c0a534Smrg I*) echo ia64-dec-vms ; exit ;; 135614c0a534Smrg V*) echo vax-dec-vms ; exit ;; 135714c0a534Smrg esac ;; 135814c0a534Smrg *:XENIX:*:SysV) 135914c0a534Smrg echo i386-pc-xenix 136014c0a534Smrg exit ;; 136114c0a534Smrg i*86:skyos:*:*) 136214c0a534Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 136314c0a534Smrg exit ;; 1364bf2eeab3Smrg i*86:rdos:*:*) 1365bf2eeab3Smrg echo ${UNAME_MACHINE}-pc-rdos 1366bf2eeab3Smrg exit ;; 1367bf2eeab3Smrg i*86:AROS:*:*) 1368bf2eeab3Smrg echo ${UNAME_MACHINE}-pc-aros 1369bf2eeab3Smrg exit ;; 137024047306Smrg x86_64:VMkernel:*:*) 137124047306Smrg echo ${UNAME_MACHINE}-unknown-esx 137214c0a534Smrg exit ;; 137324047306Smrgesac 137414c0a534Smrg 137514c0a534Smrgcat >&2 <<EOF 137614c0a534Smrg$0: unable to guess system type 137714c0a534Smrg 137814c0a534SmrgThis script, last modified $timestamp, has failed to recognize 137914c0a534Smrgthe operating system you are using. It is advised that you 138014c0a534Smrgdownload the most up to date version of the config scripts from 138114c0a534Smrg 1382bf2eeab3Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 138314c0a534Smrgand 1384bf2eeab3Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 138514c0a534Smrg 138614c0a534SmrgIf the version you run ($0) is already up to date, please 138714c0a534Smrgsend the following data and any information you think might be 138814c0a534Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 138914c0a534Smrginformation to handle your system. 139014c0a534Smrg 139114c0a534Smrgconfig.guess timestamp = $timestamp 139214c0a534Smrg 139314c0a534Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 139414c0a534Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 139514c0a534Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 139614c0a534Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 139714c0a534Smrg 139814c0a534Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 139914c0a534Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 140014c0a534Smrg 140114c0a534Smrghostinfo = `(hostinfo) 2>/dev/null` 140214c0a534Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 140314c0a534Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 140414c0a534Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 140514c0a534Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 140614c0a534Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 140714c0a534Smrg 140814c0a534SmrgUNAME_MACHINE = ${UNAME_MACHINE} 140914c0a534SmrgUNAME_RELEASE = ${UNAME_RELEASE} 141014c0a534SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 141114c0a534SmrgUNAME_VERSION = ${UNAME_VERSION} 141214c0a534SmrgEOF 141314c0a534Smrg 141414c0a534Smrgexit 1 141514c0a534Smrg 141614c0a534Smrg# Local variables: 141714c0a534Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 141814c0a534Smrg# time-stamp-start: "timestamp='" 141914c0a534Smrg# time-stamp-format: "%:y-%02m-%02d" 142014c0a534Smrg# time-stamp-end: "'" 142114c0a534Smrg# End: 1422