config.guess revision 9586ba5a
176888252Smrg#! /bin/sh 276888252Smrg# Attempt to guess a canonical system name. 39586ba5aSmrg# Copyright 1992-2014 Free Software Foundation, Inc. 476888252Smrg 59586ba5aSmrgtimestamp='2014-03-23' 676888252Smrg 776888252Smrg# This file is free software; you can redistribute it and/or modify it 876888252Smrg# under the terms of the GNU General Public License as published by 99586ba5aSmrg# the Free Software Foundation; either version 3 of the License, or 1076888252Smrg# (at your option) any later version. 1176888252Smrg# 1276888252Smrg# This program is distributed in the hope that it will be useful, but 1376888252Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1476888252Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1576888252Smrg# General Public License for more details. 1676888252Smrg# 1776888252Smrg# You should have received a copy of the GNU General Public License 1863847c39Smrg# along with this program; if not, see <http://www.gnu.org/licenses/>. 1976888252Smrg# 2076888252Smrg# As a special exception to the GNU General Public License, if you 2176888252Smrg# distribute this file as part of a program that contains a 2276888252Smrg# configuration script generated by Autoconf, you may include it under 239586ba5aSmrg# the same distribution terms that you use for the rest of that 249586ba5aSmrg# program. This Exception is an additional permission under section 7 259586ba5aSmrg# of the GNU General Public License, version 3 ("GPLv3"). 2676888252Smrg# 279586ba5aSmrg# Originally written by Per Bothner. 2876888252Smrg# 2963847c39Smrg# You can get the latest version of this script from: 3063847c39Smrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 319586ba5aSmrg# 329586ba5aSmrg# Please send patches with a ChangeLog entry to config-patches@gnu.org. 339586ba5aSmrg 3476888252Smrg 3576888252Smrgme=`echo "$0" | sed -e 's,.*/,,'` 3676888252Smrg 3776888252Smrgusage="\ 3876888252SmrgUsage: $0 [OPTION] 3976888252Smrg 4076888252SmrgOutput the configuration name of the system \`$me' is run on. 4176888252Smrg 4276888252SmrgOperation modes: 4376888252Smrg -h, --help print this help, then exit 4476888252Smrg -t, --time-stamp print date of last modification, then exit 4576888252Smrg -v, --version print version number, then exit 4676888252Smrg 4776888252SmrgReport bugs and patches to <config-patches@gnu.org>." 4876888252Smrg 4976888252Smrgversion="\ 5076888252SmrgGNU config.guess ($timestamp) 5176888252Smrg 5276888252SmrgOriginally written by Per Bothner. 539586ba5aSmrgCopyright 1992-2014 Free Software Foundation, Inc. 5476888252Smrg 5576888252SmrgThis is free software; see the source for copying conditions. There is NO 5676888252Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 5776888252Smrg 5876888252Smrghelp=" 5976888252SmrgTry \`$me --help' for more information." 6076888252Smrg 6176888252Smrg# Parse command line 6276888252Smrgwhile test $# -gt 0 ; do 6376888252Smrg case $1 in 6476888252Smrg --time-stamp | --time* | -t ) 651ae1b5e8Smrg echo "$timestamp" ; exit ;; 6676888252Smrg --version | -v ) 671ae1b5e8Smrg echo "$version" ; exit ;; 6876888252Smrg --help | --h* | -h ) 691ae1b5e8Smrg echo "$usage"; exit ;; 7076888252Smrg -- ) # Stop option processing 7176888252Smrg shift; break ;; 7276888252Smrg - ) # Use stdin as input. 7376888252Smrg break ;; 7476888252Smrg -* ) 7576888252Smrg echo "$me: invalid option $1$help" >&2 7676888252Smrg exit 1 ;; 7776888252Smrg * ) 7876888252Smrg break ;; 7976888252Smrg esac 8076888252Smrgdone 8176888252Smrg 8276888252Smrgif test $# != 0; then 8376888252Smrg echo "$me: too many arguments$help" >&2 8476888252Smrg exit 1 8576888252Smrgfi 8676888252Smrg 8776888252Smrgtrap 'exit 1' 1 2 15 8876888252Smrg 8976888252Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 9076888252Smrg# compiler to aid in system detection is discouraged as it requires 9176888252Smrg# temporary files to be created and, as you can see below, it is a 9276888252Smrg# headache to deal with in a portable fashion. 9376888252Smrg 9476888252Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 9576888252Smrg# use `HOST_CC' if defined, but it is deprecated. 9676888252Smrg 9776888252Smrg# Portable tmp directory creation inspired by the Autoconf team. 9876888252Smrg 9976888252Smrgset_cc_for_build=' 10076888252Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 10176888252Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 10276888252Smrg: ${TMPDIR=/tmp} ; 1031ae1b5e8Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 10476888252Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 10576888252Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 10676888252Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 10776888252Smrgdummy=$tmp/dummy ; 10876888252Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 10976888252Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 11076888252Smrg ,,) echo "int x;" > $dummy.c ; 11176888252Smrg for c in cc gcc c89 c99 ; do 11276888252Smrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 11376888252Smrg CC_FOR_BUILD="$c"; break ; 11476888252Smrg fi ; 11576888252Smrg done ; 11676888252Smrg if test x"$CC_FOR_BUILD" = x ; then 11776888252Smrg CC_FOR_BUILD=no_compiler_found ; 11876888252Smrg fi 11976888252Smrg ;; 12076888252Smrg ,,*) CC_FOR_BUILD=$CC ;; 12176888252Smrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 1221ae1b5e8Smrgesac ; set_cc_for_build= ;' 12376888252Smrg 12476888252Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 12576888252Smrg# (ghazi@noc.rutgers.edu 1994-08-24) 12676888252Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 12776888252Smrg PATH=$PATH:/.attbin ; export PATH 12876888252Smrgfi 12976888252Smrg 13076888252SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 13176888252SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 13276888252SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 13376888252SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 13476888252Smrg 1359586ba5aSmrgcase "${UNAME_SYSTEM}" in 1369586ba5aSmrgLinux|GNU|GNU/*) 1379586ba5aSmrg # If the system lacks a compiler, then just pick glibc. 1389586ba5aSmrg # We could probably try harder. 1399586ba5aSmrg LIBC=gnu 1409586ba5aSmrg 1419586ba5aSmrg eval $set_cc_for_build 1429586ba5aSmrg cat <<-EOF > $dummy.c 1439586ba5aSmrg #include <features.h> 1449586ba5aSmrg #if defined(__UCLIBC__) 1459586ba5aSmrg LIBC=uclibc 1469586ba5aSmrg #elif defined(__dietlibc__) 1479586ba5aSmrg LIBC=dietlibc 1489586ba5aSmrg #else 1499586ba5aSmrg LIBC=gnu 1509586ba5aSmrg #endif 1519586ba5aSmrg EOF 1529586ba5aSmrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` 1539586ba5aSmrg ;; 1549586ba5aSmrgesac 1559586ba5aSmrg 15676888252Smrg# Note: order is significant - the case branches are not exclusive. 15776888252Smrg 15876888252Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 15976888252Smrg *:NetBSD:*:*) 16076888252Smrg # NetBSD (nbsd) targets should (where applicable) match one or 16163847c39Smrg # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 16276888252Smrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 16376888252Smrg # switched to ELF, *-*-netbsd* would select the old 16476888252Smrg # object file format. This provides both forward 16576888252Smrg # compatibility and a consistent mechanism for selecting the 16676888252Smrg # object file format. 16776888252Smrg # 16876888252Smrg # Note: NetBSD doesn't particularly care about the vendor 16976888252Smrg # portion of the name. We always set it to "unknown". 17076888252Smrg sysctl="sysctl -n hw.machine_arch" 17176888252Smrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 17276888252Smrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 17376888252Smrg case "${UNAME_MACHINE_ARCH}" in 17476888252Smrg armeb) machine=armeb-unknown ;; 17576888252Smrg arm*) machine=arm-unknown ;; 17676888252Smrg sh3el) machine=shl-unknown ;; 17776888252Smrg sh3eb) machine=sh-unknown ;; 1781ae1b5e8Smrg sh5el) machine=sh5le-unknown ;; 17976888252Smrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 18076888252Smrg esac 18176888252Smrg # The Operating System including object format, if it has switched 18276888252Smrg # to ELF recently, or will in the future. 18376888252Smrg case "${UNAME_MACHINE_ARCH}" in 18476888252Smrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 18576888252Smrg eval $set_cc_for_build 18676888252Smrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 18763847c39Smrg | grep -q __ELF__ 18876888252Smrg then 18976888252Smrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 19076888252Smrg # Return netbsd for either. FIX? 19176888252Smrg os=netbsd 19276888252Smrg else 19376888252Smrg os=netbsdelf 19476888252Smrg fi 19576888252Smrg ;; 19676888252Smrg *) 19763847c39Smrg os=netbsd 19876888252Smrg ;; 19976888252Smrg esac 20076888252Smrg # The OS release 20176888252Smrg # Debian GNU/NetBSD machines have a different userland, and 20276888252Smrg # thus, need a distinct triplet. However, they do not need 20376888252Smrg # kernel version information, so it can be replaced with a 20476888252Smrg # suitable tag, in the style of linux-gnu. 20576888252Smrg case "${UNAME_VERSION}" in 20676888252Smrg Debian*) 20776888252Smrg release='-gnu' 20876888252Smrg ;; 20976888252Smrg *) 21076888252Smrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 21176888252Smrg ;; 21276888252Smrg esac 21376888252Smrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 21476888252Smrg # contains redundant information, the shorter form: 21576888252Smrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 21676888252Smrg echo "${machine}-${os}${release}" 2171ae1b5e8Smrg exit ;; 2189586ba5aSmrg *:Bitrig:*:*) 2199586ba5aSmrg UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 2209586ba5aSmrg echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} 2219586ba5aSmrg exit ;; 22276888252Smrg *:OpenBSD:*:*) 2231ae1b5e8Smrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 2241ae1b5e8Smrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 2251ae1b5e8Smrg exit ;; 2261ae1b5e8Smrg *:ekkoBSD:*:*) 2271ae1b5e8Smrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 2281ae1b5e8Smrg exit ;; 2291ae1b5e8Smrg *:SolidBSD:*:*) 2301ae1b5e8Smrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 2311ae1b5e8Smrg exit ;; 2321ae1b5e8Smrg macppc:MirBSD:*:*) 2331ae1b5e8Smrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 2341ae1b5e8Smrg exit ;; 2351ae1b5e8Smrg *:MirBSD:*:*) 2361ae1b5e8Smrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 2371ae1b5e8Smrg exit ;; 23876888252Smrg alpha:OSF1:*:*) 2391ae1b5e8Smrg case $UNAME_RELEASE in 2401ae1b5e8Smrg *4.0) 24176888252Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 2421ae1b5e8Smrg ;; 2431ae1b5e8Smrg *5.*) 24463847c39Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 2451ae1b5e8Smrg ;; 2461ae1b5e8Smrg esac 24776888252Smrg # According to Compaq, /usr/sbin/psrinfo has been available on 24876888252Smrg # OSF/1 and Tru64 systems produced since 1995. I hope that 24976888252Smrg # covers most systems running today. This code pipes the CPU 25076888252Smrg # types through head -n 1, so we only detect the type of CPU 0. 25176888252Smrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 25276888252Smrg case "$ALPHA_CPU_TYPE" in 25376888252Smrg "EV4 (21064)") 25476888252Smrg UNAME_MACHINE="alpha" ;; 25576888252Smrg "EV4.5 (21064)") 25676888252Smrg UNAME_MACHINE="alpha" ;; 25776888252Smrg "LCA4 (21066/21068)") 25876888252Smrg UNAME_MACHINE="alpha" ;; 25976888252Smrg "EV5 (21164)") 26076888252Smrg UNAME_MACHINE="alphaev5" ;; 26176888252Smrg "EV5.6 (21164A)") 26276888252Smrg UNAME_MACHINE="alphaev56" ;; 26376888252Smrg "EV5.6 (21164PC)") 26476888252Smrg UNAME_MACHINE="alphapca56" ;; 26576888252Smrg "EV5.7 (21164PC)") 26676888252Smrg UNAME_MACHINE="alphapca57" ;; 26776888252Smrg "EV6 (21264)") 26876888252Smrg UNAME_MACHINE="alphaev6" ;; 26976888252Smrg "EV6.7 (21264A)") 27076888252Smrg UNAME_MACHINE="alphaev67" ;; 27176888252Smrg "EV6.8CB (21264C)") 27276888252Smrg UNAME_MACHINE="alphaev68" ;; 27376888252Smrg "EV6.8AL (21264B)") 27476888252Smrg UNAME_MACHINE="alphaev68" ;; 27576888252Smrg "EV6.8CX (21264D)") 27676888252Smrg UNAME_MACHINE="alphaev68" ;; 27776888252Smrg "EV6.9A (21264/EV69A)") 27876888252Smrg UNAME_MACHINE="alphaev69" ;; 27976888252Smrg "EV7 (21364)") 28076888252Smrg UNAME_MACHINE="alphaev7" ;; 28176888252Smrg "EV7.9 (21364A)") 28276888252Smrg UNAME_MACHINE="alphaev79" ;; 28376888252Smrg esac 2841ae1b5e8Smrg # A Pn.n version is a patched version. 28576888252Smrg # A Vn.n version is a released version. 28676888252Smrg # A Tn.n version is a released field test version. 28776888252Smrg # A Xn.n version is an unreleased experimental baselevel. 28876888252Smrg # 1.2 uses "1.2" for uname -r. 2891ae1b5e8Smrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 29063847c39Smrg # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 29163847c39Smrg exitcode=$? 29263847c39Smrg trap '' 0 29363847c39Smrg exit $exitcode ;; 29476888252Smrg Alpha\ *:Windows_NT*:*) 29576888252Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 29676888252Smrg # Should we change UNAME_MACHINE based on the output of uname instead 29776888252Smrg # of the specific Alpha model? 29876888252Smrg echo alpha-pc-interix 2991ae1b5e8Smrg exit ;; 30076888252Smrg 21064:Windows_NT:50:3) 30176888252Smrg echo alpha-dec-winnt3.5 3021ae1b5e8Smrg exit ;; 30376888252Smrg Amiga*:UNIX_System_V:4.0:*) 30476888252Smrg echo m68k-unknown-sysv4 3051ae1b5e8Smrg exit ;; 30676888252Smrg *:[Aa]miga[Oo][Ss]:*:*) 30776888252Smrg echo ${UNAME_MACHINE}-unknown-amigaos 3081ae1b5e8Smrg exit ;; 30976888252Smrg *:[Mm]orph[Oo][Ss]:*:*) 31076888252Smrg echo ${UNAME_MACHINE}-unknown-morphos 3111ae1b5e8Smrg exit ;; 31276888252Smrg *:OS/390:*:*) 31376888252Smrg echo i370-ibm-openedition 3141ae1b5e8Smrg exit ;; 3151ae1b5e8Smrg *:z/VM:*:*) 3161ae1b5e8Smrg echo s390-ibm-zvmoe 3171ae1b5e8Smrg exit ;; 3181ae1b5e8Smrg *:OS400:*:*) 31963847c39Smrg echo powerpc-ibm-os400 3201ae1b5e8Smrg exit ;; 32176888252Smrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 32276888252Smrg echo arm-acorn-riscix${UNAME_RELEASE} 3231ae1b5e8Smrg exit ;; 3249586ba5aSmrg arm*:riscos:*:*|arm*:RISCOS:*:*) 3251ae1b5e8Smrg echo arm-unknown-riscos 3261ae1b5e8Smrg exit ;; 32776888252Smrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 32876888252Smrg echo hppa1.1-hitachi-hiuxmpp 3291ae1b5e8Smrg exit ;; 33076888252Smrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 33176888252Smrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 33276888252Smrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 33376888252Smrg echo pyramid-pyramid-sysv3 33476888252Smrg else 33576888252Smrg echo pyramid-pyramid-bsd 33676888252Smrg fi 3371ae1b5e8Smrg exit ;; 33876888252Smrg NILE*:*:*:dcosx) 33976888252Smrg echo pyramid-pyramid-svr4 3401ae1b5e8Smrg exit ;; 34176888252Smrg DRS?6000:unix:4.0:6*) 34276888252Smrg echo sparc-icl-nx6 3431ae1b5e8Smrg exit ;; 3441ae1b5e8Smrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 34576888252Smrg case `/usr/bin/uname -p` in 3461ae1b5e8Smrg sparc) echo sparc-icl-nx7; exit ;; 34776888252Smrg esac ;; 34863847c39Smrg s390x:SunOS:*:*) 34963847c39Smrg echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 35063847c39Smrg exit ;; 35176888252Smrg sun4H:SunOS:5.*:*) 35276888252Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3531ae1b5e8Smrg exit ;; 35476888252Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 35576888252Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3561ae1b5e8Smrg exit ;; 35763847c39Smrg i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 35863847c39Smrg echo i386-pc-auroraux${UNAME_RELEASE} 35963847c39Smrg exit ;; 3601ae1b5e8Smrg i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 36163847c39Smrg eval $set_cc_for_build 36263847c39Smrg SUN_ARCH="i386" 36363847c39Smrg # If there is a compiler, see if it is configured for 64-bit objects. 36463847c39Smrg # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 36563847c39Smrg # This test works for both compilers. 36663847c39Smrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 36763847c39Smrg if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 36863847c39Smrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 36963847c39Smrg grep IS_64BIT_ARCH >/dev/null 37063847c39Smrg then 37163847c39Smrg SUN_ARCH="x86_64" 37263847c39Smrg fi 37363847c39Smrg fi 37463847c39Smrg echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3751ae1b5e8Smrg exit ;; 37676888252Smrg sun4*:SunOS:6*:*) 37776888252Smrg # According to config.sub, this is the proper way to canonicalize 37876888252Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 37976888252Smrg # it's likely to be more like Solaris than SunOS4. 38076888252Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3811ae1b5e8Smrg exit ;; 38276888252Smrg sun4*:SunOS:*:*) 38376888252Smrg case "`/usr/bin/arch -k`" in 38476888252Smrg Series*|S4*) 38576888252Smrg UNAME_RELEASE=`uname -v` 38676888252Smrg ;; 38776888252Smrg esac 38876888252Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 38976888252Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 3901ae1b5e8Smrg exit ;; 39176888252Smrg sun3*:SunOS:*:*) 39276888252Smrg echo m68k-sun-sunos${UNAME_RELEASE} 3931ae1b5e8Smrg exit ;; 39476888252Smrg sun*:*:4.2BSD:*) 39576888252Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 39676888252Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 39776888252Smrg case "`/bin/arch`" in 39876888252Smrg sun3) 39976888252Smrg echo m68k-sun-sunos${UNAME_RELEASE} 40076888252Smrg ;; 40176888252Smrg sun4) 40276888252Smrg echo sparc-sun-sunos${UNAME_RELEASE} 40376888252Smrg ;; 40476888252Smrg esac 4051ae1b5e8Smrg exit ;; 40676888252Smrg aushp:SunOS:*:*) 40776888252Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 4081ae1b5e8Smrg exit ;; 40976888252Smrg # The situation for MiNT is a little confusing. The machine name 41076888252Smrg # can be virtually everything (everything which is not 41176888252Smrg # "atarist" or "atariste" at least should have a processor 41276888252Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 41376888252Smrg # to the lowercase version "mint" (or "freemint"). Finally 41476888252Smrg # the system name "TOS" denotes a system which is actually not 41576888252Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 41676888252Smrg # be no problem. 41776888252Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 41863847c39Smrg echo m68k-atari-mint${UNAME_RELEASE} 4191ae1b5e8Smrg exit ;; 42076888252Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 42176888252Smrg echo m68k-atari-mint${UNAME_RELEASE} 42263847c39Smrg exit ;; 42376888252Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 42463847c39Smrg echo m68k-atari-mint${UNAME_RELEASE} 4251ae1b5e8Smrg exit ;; 42676888252Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 42763847c39Smrg echo m68k-milan-mint${UNAME_RELEASE} 42863847c39Smrg exit ;; 42976888252Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 43063847c39Smrg echo m68k-hades-mint${UNAME_RELEASE} 43163847c39Smrg exit ;; 43276888252Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 43363847c39Smrg echo m68k-unknown-mint${UNAME_RELEASE} 43463847c39Smrg exit ;; 4351ae1b5e8Smrg m68k:machten:*:*) 4361ae1b5e8Smrg echo m68k-apple-machten${UNAME_RELEASE} 4371ae1b5e8Smrg exit ;; 43876888252Smrg powerpc:machten:*:*) 43976888252Smrg echo powerpc-apple-machten${UNAME_RELEASE} 4401ae1b5e8Smrg exit ;; 44176888252Smrg RISC*:Mach:*:*) 44276888252Smrg echo mips-dec-mach_bsd4.3 4431ae1b5e8Smrg exit ;; 44476888252Smrg RISC*:ULTRIX:*:*) 44576888252Smrg echo mips-dec-ultrix${UNAME_RELEASE} 4461ae1b5e8Smrg exit ;; 44776888252Smrg VAX*:ULTRIX*:*:*) 44876888252Smrg echo vax-dec-ultrix${UNAME_RELEASE} 4491ae1b5e8Smrg exit ;; 45076888252Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 45176888252Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 4521ae1b5e8Smrg exit ;; 45376888252Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 45476888252Smrg eval $set_cc_for_build 45576888252Smrg sed 's/^ //' << EOF >$dummy.c 45676888252Smrg#ifdef __cplusplus 45776888252Smrg#include <stdio.h> /* for printf() prototype */ 45876888252Smrg int main (int argc, char *argv[]) { 45976888252Smrg#else 46076888252Smrg int main (argc, argv) int argc; char *argv[]; { 46176888252Smrg#endif 46276888252Smrg #if defined (host_mips) && defined (MIPSEB) 46376888252Smrg #if defined (SYSTYPE_SYSV) 46476888252Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 46576888252Smrg #endif 46676888252Smrg #if defined (SYSTYPE_SVR4) 46776888252Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 46876888252Smrg #endif 46976888252Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 47076888252Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 47176888252Smrg #endif 47276888252Smrg #endif 47376888252Smrg exit (-1); 47476888252Smrg } 47576888252SmrgEOF 4761ae1b5e8Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 4771ae1b5e8Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 4781ae1b5e8Smrg SYSTEM_NAME=`$dummy $dummyarg` && 4791ae1b5e8Smrg { echo "$SYSTEM_NAME"; exit; } 48076888252Smrg echo mips-mips-riscos${UNAME_RELEASE} 4811ae1b5e8Smrg exit ;; 48276888252Smrg Motorola:PowerMAX_OS:*:*) 48376888252Smrg echo powerpc-motorola-powermax 4841ae1b5e8Smrg exit ;; 48576888252Smrg Motorola:*:4.3:PL8-*) 48676888252Smrg echo powerpc-harris-powermax 4871ae1b5e8Smrg exit ;; 48876888252Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 48976888252Smrg echo powerpc-harris-powermax 4901ae1b5e8Smrg exit ;; 49176888252Smrg Night_Hawk:Power_UNIX:*:*) 49276888252Smrg echo powerpc-harris-powerunix 4931ae1b5e8Smrg exit ;; 49476888252Smrg m88k:CX/UX:7*:*) 49576888252Smrg echo m88k-harris-cxux7 4961ae1b5e8Smrg exit ;; 49776888252Smrg m88k:*:4*:R4*) 49876888252Smrg echo m88k-motorola-sysv4 4991ae1b5e8Smrg exit ;; 50076888252Smrg m88k:*:3*:R3*) 50176888252Smrg echo m88k-motorola-sysv3 5021ae1b5e8Smrg exit ;; 50376888252Smrg AViiON:dgux:*:*) 50463847c39Smrg # DG/UX returns AViiON for all architectures 50563847c39Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 50676888252Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 50776888252Smrg then 50876888252Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 50976888252Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 51076888252Smrg then 51176888252Smrg echo m88k-dg-dgux${UNAME_RELEASE} 51276888252Smrg else 51376888252Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 51476888252Smrg fi 51576888252Smrg else 51676888252Smrg echo i586-dg-dgux${UNAME_RELEASE} 51776888252Smrg fi 51863847c39Smrg exit ;; 51976888252Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 52076888252Smrg echo m88k-dolphin-sysv3 5211ae1b5e8Smrg exit ;; 52276888252Smrg M88*:*:R3*:*) 52376888252Smrg # Delta 88k system running SVR3 52476888252Smrg echo m88k-motorola-sysv3 5251ae1b5e8Smrg exit ;; 52676888252Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 52776888252Smrg echo m88k-tektronix-sysv3 5281ae1b5e8Smrg exit ;; 52976888252Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 53076888252Smrg echo m68k-tektronix-bsd 5311ae1b5e8Smrg exit ;; 53276888252Smrg *:IRIX*:*:*) 53376888252Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 5341ae1b5e8Smrg exit ;; 53576888252Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 5361ae1b5e8Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 5371ae1b5e8Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 53876888252Smrg i*86:AIX:*:*) 53976888252Smrg echo i386-ibm-aix 5401ae1b5e8Smrg exit ;; 54176888252Smrg ia64:AIX:*:*) 54276888252Smrg if [ -x /usr/bin/oslevel ] ; then 54376888252Smrg IBM_REV=`/usr/bin/oslevel` 54476888252Smrg else 54576888252Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 54676888252Smrg fi 54776888252Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 5481ae1b5e8Smrg exit ;; 54976888252Smrg *:AIX:2:3) 55076888252Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 55176888252Smrg eval $set_cc_for_build 55276888252Smrg sed 's/^ //' << EOF >$dummy.c 55376888252Smrg #include <sys/systemcfg.h> 55476888252Smrg 55576888252Smrg main() 55676888252Smrg { 55776888252Smrg if (!__power_pc()) 55876888252Smrg exit(1); 55976888252Smrg puts("powerpc-ibm-aix3.2.5"); 56076888252Smrg exit(0); 56176888252Smrg } 56276888252SmrgEOF 5631ae1b5e8Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 5641ae1b5e8Smrg then 5651ae1b5e8Smrg echo "$SYSTEM_NAME" 5661ae1b5e8Smrg else 5671ae1b5e8Smrg echo rs6000-ibm-aix3.2.5 5681ae1b5e8Smrg fi 56976888252Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 57076888252Smrg echo rs6000-ibm-aix3.2.4 57176888252Smrg else 57276888252Smrg echo rs6000-ibm-aix3.2 57376888252Smrg fi 5741ae1b5e8Smrg exit ;; 57563847c39Smrg *:AIX:*:[4567]) 57676888252Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 57776888252Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 57876888252Smrg IBM_ARCH=rs6000 57976888252Smrg else 58076888252Smrg IBM_ARCH=powerpc 58176888252Smrg fi 58276888252Smrg if [ -x /usr/bin/oslevel ] ; then 58376888252Smrg IBM_REV=`/usr/bin/oslevel` 58476888252Smrg else 58576888252Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 58676888252Smrg fi 58776888252Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 5881ae1b5e8Smrg exit ;; 58976888252Smrg *:AIX:*:*) 59076888252Smrg echo rs6000-ibm-aix 5911ae1b5e8Smrg exit ;; 59276888252Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 59376888252Smrg echo romp-ibm-bsd4.4 5941ae1b5e8Smrg exit ;; 59576888252Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 59676888252Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 5971ae1b5e8Smrg exit ;; # report: romp-ibm BSD 4.3 59876888252Smrg *:BOSX:*:*) 59976888252Smrg echo rs6000-bull-bosx 6001ae1b5e8Smrg exit ;; 60176888252Smrg DPX/2?00:B.O.S.:*:*) 60276888252Smrg echo m68k-bull-sysv3 6031ae1b5e8Smrg exit ;; 60476888252Smrg 9000/[34]??:4.3bsd:1.*:*) 60576888252Smrg echo m68k-hp-bsd 6061ae1b5e8Smrg exit ;; 60776888252Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 60876888252Smrg echo m68k-hp-bsd4.4 6091ae1b5e8Smrg exit ;; 61076888252Smrg 9000/[34678]??:HP-UX:*:*) 61176888252Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 61276888252Smrg case "${UNAME_MACHINE}" in 61376888252Smrg 9000/31? ) HP_ARCH=m68000 ;; 61476888252Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 61576888252Smrg 9000/[678][0-9][0-9]) 61676888252Smrg if [ -x /usr/bin/getconf ]; then 61776888252Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 61863847c39Smrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 61963847c39Smrg case "${sc_cpu_version}" in 62063847c39Smrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 62163847c39Smrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 62263847c39Smrg 532) # CPU_PA_RISC2_0 62363847c39Smrg case "${sc_kernel_bits}" in 62463847c39Smrg 32) HP_ARCH="hppa2.0n" ;; 62563847c39Smrg 64) HP_ARCH="hppa2.0w" ;; 62676888252Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 62763847c39Smrg esac ;; 62863847c39Smrg esac 62976888252Smrg fi 63076888252Smrg if [ "${HP_ARCH}" = "" ]; then 63176888252Smrg eval $set_cc_for_build 63263847c39Smrg sed 's/^ //' << EOF >$dummy.c 63376888252Smrg 63463847c39Smrg #define _HPUX_SOURCE 63563847c39Smrg #include <stdlib.h> 63663847c39Smrg #include <unistd.h> 63776888252Smrg 63863847c39Smrg int main () 63963847c39Smrg { 64063847c39Smrg #if defined(_SC_KERNEL_BITS) 64163847c39Smrg long bits = sysconf(_SC_KERNEL_BITS); 64263847c39Smrg #endif 64363847c39Smrg long cpu = sysconf (_SC_CPU_VERSION); 64476888252Smrg 64563847c39Smrg switch (cpu) 64663847c39Smrg { 64763847c39Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 64863847c39Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 64963847c39Smrg case CPU_PA_RISC2_0: 65063847c39Smrg #if defined(_SC_KERNEL_BITS) 65163847c39Smrg switch (bits) 65263847c39Smrg { 65363847c39Smrg case 64: puts ("hppa2.0w"); break; 65463847c39Smrg case 32: puts ("hppa2.0n"); break; 65563847c39Smrg default: puts ("hppa2.0"); break; 65663847c39Smrg } break; 65763847c39Smrg #else /* !defined(_SC_KERNEL_BITS) */ 65863847c39Smrg puts ("hppa2.0"); break; 65963847c39Smrg #endif 66063847c39Smrg default: puts ("hppa1.0"); break; 66163847c39Smrg } 66263847c39Smrg exit (0); 66363847c39Smrg } 66476888252SmrgEOF 66576888252Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 66676888252Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 66776888252Smrg fi ;; 66876888252Smrg esac 66976888252Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 67076888252Smrg then 6711ae1b5e8Smrg eval $set_cc_for_build 6721ae1b5e8Smrg 6731ae1b5e8Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 6741ae1b5e8Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 6751ae1b5e8Smrg # generating 64-bit code. GNU and HP use different nomenclature: 6761ae1b5e8Smrg # 6771ae1b5e8Smrg # $ CC_FOR_BUILD=cc ./config.guess 6781ae1b5e8Smrg # => hppa2.0w-hp-hpux11.23 6791ae1b5e8Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 6801ae1b5e8Smrg # => hppa64-hp-hpux11.23 6811ae1b5e8Smrg 6821ae1b5e8Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 68363847c39Smrg grep -q __LP64__ 68476888252Smrg then 68576888252Smrg HP_ARCH="hppa2.0w" 68676888252Smrg else 68776888252Smrg HP_ARCH="hppa64" 68876888252Smrg fi 68976888252Smrg fi 69076888252Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 6911ae1b5e8Smrg exit ;; 69276888252Smrg ia64:HP-UX:*:*) 69376888252Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 69476888252Smrg echo ia64-hp-hpux${HPUX_REV} 6951ae1b5e8Smrg exit ;; 69676888252Smrg 3050*:HI-UX:*:*) 69776888252Smrg eval $set_cc_for_build 69876888252Smrg sed 's/^ //' << EOF >$dummy.c 69976888252Smrg #include <unistd.h> 70076888252Smrg int 70176888252Smrg main () 70276888252Smrg { 70376888252Smrg long cpu = sysconf (_SC_CPU_VERSION); 70476888252Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 70576888252Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 70676888252Smrg results, however. */ 70776888252Smrg if (CPU_IS_PA_RISC (cpu)) 70876888252Smrg { 70976888252Smrg switch (cpu) 71076888252Smrg { 71176888252Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 71276888252Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 71376888252Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 71476888252Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 71576888252Smrg } 71676888252Smrg } 71776888252Smrg else if (CPU_IS_HP_MC68K (cpu)) 71876888252Smrg puts ("m68k-hitachi-hiuxwe2"); 71976888252Smrg else puts ("unknown-hitachi-hiuxwe2"); 72076888252Smrg exit (0); 72176888252Smrg } 72276888252SmrgEOF 7231ae1b5e8Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 7241ae1b5e8Smrg { echo "$SYSTEM_NAME"; exit; } 72576888252Smrg echo unknown-hitachi-hiuxwe2 7261ae1b5e8Smrg exit ;; 72776888252Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 72876888252Smrg echo hppa1.1-hp-bsd 7291ae1b5e8Smrg exit ;; 73076888252Smrg 9000/8??:4.3bsd:*:*) 73176888252Smrg echo hppa1.0-hp-bsd 7321ae1b5e8Smrg exit ;; 73376888252Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 73476888252Smrg echo hppa1.0-hp-mpeix 7351ae1b5e8Smrg exit ;; 73676888252Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 73776888252Smrg echo hppa1.1-hp-osf 7381ae1b5e8Smrg exit ;; 73976888252Smrg hp8??:OSF1:*:*) 74076888252Smrg echo hppa1.0-hp-osf 7411ae1b5e8Smrg exit ;; 74276888252Smrg i*86:OSF1:*:*) 74376888252Smrg if [ -x /usr/sbin/sysversion ] ; then 74476888252Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 74576888252Smrg else 74676888252Smrg echo ${UNAME_MACHINE}-unknown-osf1 74776888252Smrg fi 7481ae1b5e8Smrg exit ;; 74976888252Smrg parisc*:Lites*:*:*) 75076888252Smrg echo hppa1.1-hp-lites 7511ae1b5e8Smrg exit ;; 75276888252Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 75376888252Smrg echo c1-convex-bsd 75463847c39Smrg exit ;; 75576888252Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 75676888252Smrg if getsysinfo -f scalar_acc 75776888252Smrg then echo c32-convex-bsd 75876888252Smrg else echo c2-convex-bsd 75976888252Smrg fi 76063847c39Smrg exit ;; 76176888252Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 76276888252Smrg echo c34-convex-bsd 76363847c39Smrg exit ;; 76476888252Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 76576888252Smrg echo c38-convex-bsd 76663847c39Smrg exit ;; 76776888252Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 76876888252Smrg echo c4-convex-bsd 76963847c39Smrg exit ;; 77076888252Smrg CRAY*Y-MP:*:*:*) 77176888252Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7721ae1b5e8Smrg exit ;; 77376888252Smrg CRAY*[A-Z]90:*:*:*) 77476888252Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 77576888252Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 77676888252Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 77776888252Smrg -e 's/\.[^.]*$/.X/' 7781ae1b5e8Smrg exit ;; 77976888252Smrg CRAY*TS:*:*:*) 78076888252Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7811ae1b5e8Smrg exit ;; 78276888252Smrg CRAY*T3E:*:*:*) 78376888252Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7841ae1b5e8Smrg exit ;; 78576888252Smrg CRAY*SV1:*:*:*) 78676888252Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7871ae1b5e8Smrg exit ;; 78876888252Smrg *:UNICOS/mp:*:*) 7891ae1b5e8Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7901ae1b5e8Smrg exit ;; 79176888252Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 79276888252Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 79363847c39Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 79463847c39Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 79563847c39Smrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 79663847c39Smrg exit ;; 7971ae1b5e8Smrg 5000:UNIX_System_V:4.*:*) 79863847c39Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 79963847c39Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 80063847c39Smrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 8011ae1b5e8Smrg exit ;; 80276888252Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 80376888252Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 8041ae1b5e8Smrg exit ;; 80576888252Smrg sparc*:BSD/OS:*:*) 80676888252Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 8071ae1b5e8Smrg exit ;; 80876888252Smrg *:BSD/OS:*:*) 80976888252Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 8101ae1b5e8Smrg exit ;; 8111ae1b5e8Smrg *:FreeBSD:*:*) 81263847c39Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 81363847c39Smrg case ${UNAME_PROCESSOR} in 8141ae1b5e8Smrg amd64) 8151ae1b5e8Smrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 8161ae1b5e8Smrg *) 81763847c39Smrg echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 8181ae1b5e8Smrg esac 8191ae1b5e8Smrg exit ;; 82076888252Smrg i*:CYGWIN*:*) 82176888252Smrg echo ${UNAME_MACHINE}-pc-cygwin 8221ae1b5e8Smrg exit ;; 8239586ba5aSmrg *:MINGW64*:*) 8249586ba5aSmrg echo ${UNAME_MACHINE}-pc-mingw64 8259586ba5aSmrg exit ;; 8261ae1b5e8Smrg *:MINGW*:*) 82776888252Smrg echo ${UNAME_MACHINE}-pc-mingw32 8281ae1b5e8Smrg exit ;; 8299586ba5aSmrg *:MSYS*:*) 83063847c39Smrg echo ${UNAME_MACHINE}-pc-msys 83163847c39Smrg exit ;; 8321ae1b5e8Smrg i*:windows32*:*) 83363847c39Smrg # uname -m includes "-pc" on this system. 83463847c39Smrg echo ${UNAME_MACHINE}-mingw32 8351ae1b5e8Smrg exit ;; 83676888252Smrg i*:PW*:*) 83776888252Smrg echo ${UNAME_MACHINE}-pc-pw32 8381ae1b5e8Smrg exit ;; 83963847c39Smrg *:Interix*:*) 84063847c39Smrg case ${UNAME_MACHINE} in 8411ae1b5e8Smrg x86) 8421ae1b5e8Smrg echo i586-pc-interix${UNAME_RELEASE} 8431ae1b5e8Smrg exit ;; 84463847c39Smrg authenticamd | genuineintel | EM64T) 8451ae1b5e8Smrg echo x86_64-unknown-interix${UNAME_RELEASE} 8461ae1b5e8Smrg exit ;; 8471ae1b5e8Smrg IA64) 8481ae1b5e8Smrg echo ia64-unknown-interix${UNAME_RELEASE} 8491ae1b5e8Smrg exit ;; 8501ae1b5e8Smrg esac ;; 85176888252Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 85276888252Smrg echo i${UNAME_MACHINE}-pc-mks 8531ae1b5e8Smrg exit ;; 85463847c39Smrg 8664:Windows_NT:*) 85563847c39Smrg echo x86_64-pc-mks 85663847c39Smrg exit ;; 85776888252Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 85876888252Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 85976888252Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 86076888252Smrg # UNAME_MACHINE based on the output of uname instead of i386? 86176888252Smrg echo i586-pc-interix 8621ae1b5e8Smrg exit ;; 86376888252Smrg i*:UWIN*:*) 86476888252Smrg echo ${UNAME_MACHINE}-pc-uwin 8651ae1b5e8Smrg exit ;; 8661ae1b5e8Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 8671ae1b5e8Smrg echo x86_64-unknown-cygwin 8681ae1b5e8Smrg exit ;; 86976888252Smrg p*:CYGWIN*:*) 87076888252Smrg echo powerpcle-unknown-cygwin 8711ae1b5e8Smrg exit ;; 87276888252Smrg prep*:SunOS:5.*:*) 87376888252Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 8741ae1b5e8Smrg exit ;; 87576888252Smrg *:GNU:*:*) 8761ae1b5e8Smrg # the GNU system 8779586ba5aSmrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 8781ae1b5e8Smrg exit ;; 8791ae1b5e8Smrg *:GNU/*:*:*) 8801ae1b5e8Smrg # other systems with GNU libc and userland 8819586ba5aSmrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} 8821ae1b5e8Smrg exit ;; 88376888252Smrg i*86:Minix:*:*) 88476888252Smrg echo ${UNAME_MACHINE}-pc-minix 8851ae1b5e8Smrg exit ;; 88663847c39Smrg aarch64:Linux:*:*) 8879586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 88863847c39Smrg exit ;; 88963847c39Smrg aarch64_be:Linux:*:*) 89063847c39Smrg UNAME_MACHINE=aarch64_be 8919586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 89263847c39Smrg exit ;; 89363847c39Smrg alpha:Linux:*:*) 89463847c39Smrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 89563847c39Smrg EV5) UNAME_MACHINE=alphaev5 ;; 89663847c39Smrg EV56) UNAME_MACHINE=alphaev56 ;; 89763847c39Smrg PCA56) UNAME_MACHINE=alphapca56 ;; 89863847c39Smrg PCA57) UNAME_MACHINE=alphapca56 ;; 89963847c39Smrg EV6) UNAME_MACHINE=alphaev6 ;; 90063847c39Smrg EV67) UNAME_MACHINE=alphaev67 ;; 90163847c39Smrg EV68*) UNAME_MACHINE=alphaev68 ;; 90263847c39Smrg esac 90363847c39Smrg objdump --private-headers /bin/sh | grep -q ld.so.1 9049586ba5aSmrg if test "$?" = 0 ; then LIBC="gnulibc1" ; fi 9059586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9069586ba5aSmrg exit ;; 9079586ba5aSmrg arc:Linux:*:* | arceb:Linux:*:*) 9089586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 90963847c39Smrg exit ;; 91076888252Smrg arm*:Linux:*:*) 9111ae1b5e8Smrg eval $set_cc_for_build 9121ae1b5e8Smrg if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 9131ae1b5e8Smrg | grep -q __ARM_EABI__ 9141ae1b5e8Smrg then 9159586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9161ae1b5e8Smrg else 91763847c39Smrg if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 91863847c39Smrg | grep -q __ARM_PCS_VFP 91963847c39Smrg then 9209586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi 92163847c39Smrg else 9229586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf 92363847c39Smrg fi 9241ae1b5e8Smrg fi 9251ae1b5e8Smrg exit ;; 9261ae1b5e8Smrg avr32*:Linux:*:*) 9279586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9281ae1b5e8Smrg exit ;; 92976888252Smrg cris:Linux:*:*) 9309586ba5aSmrg echo ${UNAME_MACHINE}-axis-linux-${LIBC} 9311ae1b5e8Smrg exit ;; 9321ae1b5e8Smrg crisv32:Linux:*:*) 9339586ba5aSmrg echo ${UNAME_MACHINE}-axis-linux-${LIBC} 9341ae1b5e8Smrg exit ;; 9351ae1b5e8Smrg frv:Linux:*:*) 9369586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 93763847c39Smrg exit ;; 93863847c39Smrg hexagon:Linux:*:*) 9399586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 94063847c39Smrg exit ;; 94163847c39Smrg i*86:Linux:*:*) 9429586ba5aSmrg echo ${UNAME_MACHINE}-pc-linux-${LIBC} 9431ae1b5e8Smrg exit ;; 94476888252Smrg ia64:Linux:*:*) 9459586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9461ae1b5e8Smrg exit ;; 9471ae1b5e8Smrg m32r*:Linux:*:*) 9489586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9491ae1b5e8Smrg exit ;; 95076888252Smrg m68*:Linux:*:*) 9519586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9521ae1b5e8Smrg exit ;; 95363847c39Smrg mips:Linux:*:* | mips64:Linux:*:*) 95476888252Smrg eval $set_cc_for_build 95576888252Smrg sed 's/^ //' << EOF >$dummy.c 95676888252Smrg #undef CPU 95763847c39Smrg #undef ${UNAME_MACHINE} 95863847c39Smrg #undef ${UNAME_MACHINE}el 95976888252Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 96063847c39Smrg CPU=${UNAME_MACHINE}el 96176888252Smrg #else 96276888252Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 96363847c39Smrg CPU=${UNAME_MACHINE} 96476888252Smrg #else 96576888252Smrg CPU= 96676888252Smrg #endif 96776888252Smrg #endif 96876888252SmrgEOF 96963847c39Smrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 9709586ba5aSmrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } 97176888252Smrg ;; 9729586ba5aSmrg openrisc*:Linux:*:*) 9739586ba5aSmrg echo or1k-unknown-linux-${LIBC} 9749586ba5aSmrg exit ;; 9759586ba5aSmrg or32:Linux:*:* | or1k*:Linux:*:*) 9769586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9771ae1b5e8Smrg exit ;; 97863847c39Smrg padre:Linux:*:*) 9799586ba5aSmrg echo sparc-unknown-linux-${LIBC} 9801ae1b5e8Smrg exit ;; 98163847c39Smrg parisc64:Linux:*:* | hppa64:Linux:*:*) 9829586ba5aSmrg echo hppa64-unknown-linux-${LIBC} 9831ae1b5e8Smrg exit ;; 98476888252Smrg parisc:Linux:*:* | hppa:Linux:*:*) 98576888252Smrg # Look for CPU level 98676888252Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 9879586ba5aSmrg PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; 9889586ba5aSmrg PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; 9899586ba5aSmrg *) echo hppa-unknown-linux-${LIBC} ;; 99076888252Smrg esac 9911ae1b5e8Smrg exit ;; 99263847c39Smrg ppc64:Linux:*:*) 9939586ba5aSmrg echo powerpc64-unknown-linux-${LIBC} 99463847c39Smrg exit ;; 99563847c39Smrg ppc:Linux:*:*) 9969586ba5aSmrg echo powerpc-unknown-linux-${LIBC} 9979586ba5aSmrg exit ;; 9989586ba5aSmrg ppc64le:Linux:*:*) 9999586ba5aSmrg echo powerpc64le-unknown-linux-${LIBC} 10009586ba5aSmrg exit ;; 10019586ba5aSmrg ppcle:Linux:*:*) 10029586ba5aSmrg echo powerpcle-unknown-linux-${LIBC} 10031ae1b5e8Smrg exit ;; 100476888252Smrg s390:Linux:*:* | s390x:Linux:*:*) 10059586ba5aSmrg echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 10061ae1b5e8Smrg exit ;; 100776888252Smrg sh64*:Linux:*:*) 10089586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 10091ae1b5e8Smrg exit ;; 101076888252Smrg sh*:Linux:*:*) 10119586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 10121ae1b5e8Smrg exit ;; 101376888252Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 10149586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 10151ae1b5e8Smrg exit ;; 101663847c39Smrg tile*:Linux:*:*) 10179586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 101863847c39Smrg exit ;; 10191ae1b5e8Smrg vax:Linux:*:*) 10209586ba5aSmrg echo ${UNAME_MACHINE}-dec-linux-${LIBC} 10211ae1b5e8Smrg exit ;; 102276888252Smrg x86_64:Linux:*:*) 10239586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 10241ae1b5e8Smrg exit ;; 10251ae1b5e8Smrg xtensa*:Linux:*:*) 10269586ba5aSmrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 10271ae1b5e8Smrg exit ;; 102876888252Smrg i*86:DYNIX/ptx:4*:*) 102976888252Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 103076888252Smrg # earlier versions are messed up and put the nodename in both 103176888252Smrg # sysname and nodename. 103276888252Smrg echo i386-sequent-sysv4 10331ae1b5e8Smrg exit ;; 103476888252Smrg i*86:UNIX_SV:4.2MP:2.*) 103563847c39Smrg # Unixware is an offshoot of SVR4, but it has its own version 103663847c39Smrg # number series starting with 2... 103763847c39Smrg # I am not positive that other SVR4 systems won't match this, 103876888252Smrg # I just have to hope. -- rms. 103963847c39Smrg # Use sysv4.2uw... so that sysv4* matches it. 104076888252Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 10411ae1b5e8Smrg exit ;; 104276888252Smrg i*86:OS/2:*:*) 104376888252Smrg # If we were able to find `uname', then EMX Unix compatibility 104476888252Smrg # is probably installed. 104576888252Smrg echo ${UNAME_MACHINE}-pc-os2-emx 10461ae1b5e8Smrg exit ;; 104776888252Smrg i*86:XTS-300:*:STOP) 104876888252Smrg echo ${UNAME_MACHINE}-unknown-stop 10491ae1b5e8Smrg exit ;; 105076888252Smrg i*86:atheos:*:*) 105176888252Smrg echo ${UNAME_MACHINE}-unknown-atheos 10521ae1b5e8Smrg exit ;; 10531ae1b5e8Smrg i*86:syllable:*:*) 10541ae1b5e8Smrg echo ${UNAME_MACHINE}-pc-syllable 10551ae1b5e8Smrg exit ;; 105663847c39Smrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 105776888252Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 10581ae1b5e8Smrg exit ;; 105976888252Smrg i*86:*DOS:*:*) 106076888252Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 10611ae1b5e8Smrg exit ;; 106276888252Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 106376888252Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 106476888252Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 106576888252Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 106676888252Smrg else 106776888252Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 106876888252Smrg fi 10691ae1b5e8Smrg exit ;; 10701ae1b5e8Smrg i*86:*:5:[678]*) 107163847c39Smrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 107276888252Smrg case `/bin/uname -X | grep "^Machine"` in 107376888252Smrg *486*) UNAME_MACHINE=i486 ;; 107476888252Smrg *Pentium) UNAME_MACHINE=i586 ;; 107576888252Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 107676888252Smrg esac 107776888252Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 10781ae1b5e8Smrg exit ;; 107976888252Smrg i*86:*:3.2:*) 108076888252Smrg if test -f /usr/options/cb.name; then 108176888252Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 108276888252Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 108376888252Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 108476888252Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 108576888252Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 108676888252Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 108776888252Smrg && UNAME_MACHINE=i586 108876888252Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 108976888252Smrg && UNAME_MACHINE=i686 109076888252Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 109176888252Smrg && UNAME_MACHINE=i686 109276888252Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 109376888252Smrg else 109476888252Smrg echo ${UNAME_MACHINE}-pc-sysv32 109576888252Smrg fi 10961ae1b5e8Smrg exit ;; 109776888252Smrg pc:*:*:*) 109876888252Smrg # Left here for compatibility: 109963847c39Smrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 110063847c39Smrg # the processor, so we play safe by assuming i586. 110163847c39Smrg # Note: whatever this is, it MUST be the same as what config.sub 110263847c39Smrg # prints for the "djgpp" host, or else GDB configury will decide that 110363847c39Smrg # this is a cross-build. 110463847c39Smrg echo i586-pc-msdosdjgpp 110563847c39Smrg exit ;; 110676888252Smrg Intel:Mach:3*:*) 110776888252Smrg echo i386-pc-mach3 11081ae1b5e8Smrg exit ;; 110976888252Smrg paragon:*:*:*) 111076888252Smrg echo i860-intel-osf1 11111ae1b5e8Smrg exit ;; 111276888252Smrg i860:*:4.*:*) # i860-SVR4 111376888252Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 111476888252Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 111576888252Smrg else # Add other i860-SVR4 vendors below as they are discovered. 111676888252Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 111776888252Smrg fi 11181ae1b5e8Smrg exit ;; 111976888252Smrg mini*:CTIX:SYS*5:*) 112076888252Smrg # "miniframe" 112176888252Smrg echo m68010-convergent-sysv 11221ae1b5e8Smrg exit ;; 112376888252Smrg mc68k:UNIX:SYSTEM5:3.51m) 112476888252Smrg echo m68k-convergent-sysv 11251ae1b5e8Smrg exit ;; 112676888252Smrg M680?0:D-NIX:5.3:*) 112776888252Smrg echo m68k-diab-dnix 11281ae1b5e8Smrg exit ;; 11291ae1b5e8Smrg M68*:*:R3V[5678]*:*) 11301ae1b5e8Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 11311ae1b5e8Smrg 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) 113276888252Smrg OS_REL='' 113376888252Smrg test -r /etc/.relid \ 113476888252Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 113576888252Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 11361ae1b5e8Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 113776888252Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 11381ae1b5e8Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 113976888252Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 114063847c39Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 114163847c39Smrg && { echo i486-ncr-sysv4; exit; } ;; 114263847c39Smrg NCR*:*:4.2:* | MPRAS*:*:4.2:*) 114363847c39Smrg OS_REL='.3' 114463847c39Smrg test -r /etc/.relid \ 114563847c39Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 114663847c39Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 114763847c39Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 114863847c39Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 114963847c39Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 115063847c39Smrg /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 115163847c39Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 115276888252Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 115376888252Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 11541ae1b5e8Smrg exit ;; 115576888252Smrg mc68030:UNIX_System_V:4.*:*) 115676888252Smrg echo m68k-atari-sysv4 11571ae1b5e8Smrg exit ;; 115876888252Smrg TSUNAMI:LynxOS:2.*:*) 115976888252Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 11601ae1b5e8Smrg exit ;; 116176888252Smrg rs6000:LynxOS:2.*:*) 116276888252Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 11631ae1b5e8Smrg exit ;; 116463847c39Smrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 116576888252Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 11661ae1b5e8Smrg exit ;; 116776888252Smrg SM[BE]S:UNIX_SV:*:*) 116876888252Smrg echo mips-dde-sysv${UNAME_RELEASE} 11691ae1b5e8Smrg exit ;; 117076888252Smrg RM*:ReliantUNIX-*:*:*) 117176888252Smrg echo mips-sni-sysv4 11721ae1b5e8Smrg exit ;; 117376888252Smrg RM*:SINIX-*:*:*) 117476888252Smrg echo mips-sni-sysv4 11751ae1b5e8Smrg exit ;; 117676888252Smrg *:SINIX-*:*:*) 117776888252Smrg if uname -p 2>/dev/null >/dev/null ; then 117876888252Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 117976888252Smrg echo ${UNAME_MACHINE}-sni-sysv4 118076888252Smrg else 118176888252Smrg echo ns32k-sni-sysv 118276888252Smrg fi 11831ae1b5e8Smrg exit ;; 118463847c39Smrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 118563847c39Smrg # says <Richard.M.Bartel@ccMail.Census.GOV> 118663847c39Smrg echo i586-unisys-sysv4 118763847c39Smrg exit ;; 118876888252Smrg *:UNIX_System_V:4*:FTX*) 118976888252Smrg # From Gerald Hewes <hewes@openmarket.com>. 119076888252Smrg # How about differentiating between stratus architectures? -djm 119176888252Smrg echo hppa1.1-stratus-sysv4 11921ae1b5e8Smrg exit ;; 119376888252Smrg *:*:*:FTX*) 119476888252Smrg # From seanf@swdc.stratus.com. 119576888252Smrg echo i860-stratus-sysv4 11961ae1b5e8Smrg exit ;; 11971ae1b5e8Smrg i*86:VOS:*:*) 11981ae1b5e8Smrg # From Paul.Green@stratus.com. 11991ae1b5e8Smrg echo ${UNAME_MACHINE}-stratus-vos 12001ae1b5e8Smrg exit ;; 120176888252Smrg *:VOS:*:*) 120276888252Smrg # From Paul.Green@stratus.com. 120376888252Smrg echo hppa1.1-stratus-vos 12041ae1b5e8Smrg exit ;; 120576888252Smrg mc68*:A/UX:*:*) 120676888252Smrg echo m68k-apple-aux${UNAME_RELEASE} 12071ae1b5e8Smrg exit ;; 120876888252Smrg news*:NEWS-OS:6*:*) 120976888252Smrg echo mips-sony-newsos6 12101ae1b5e8Smrg exit ;; 121176888252Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 121276888252Smrg if [ -d /usr/nec ]; then 121363847c39Smrg echo mips-nec-sysv${UNAME_RELEASE} 121476888252Smrg else 121563847c39Smrg echo mips-unknown-sysv${UNAME_RELEASE} 121676888252Smrg fi 121763847c39Smrg exit ;; 121876888252Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 121976888252Smrg echo powerpc-be-beos 12201ae1b5e8Smrg exit ;; 122176888252Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 122276888252Smrg echo powerpc-apple-beos 12231ae1b5e8Smrg exit ;; 122476888252Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 122576888252Smrg echo i586-pc-beos 12261ae1b5e8Smrg exit ;; 122763847c39Smrg BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 122863847c39Smrg echo i586-pc-haiku 122963847c39Smrg exit ;; 12309586ba5aSmrg x86_64:Haiku:*:*) 12319586ba5aSmrg echo x86_64-unknown-haiku 12329586ba5aSmrg exit ;; 123376888252Smrg SX-4:SUPER-UX:*:*) 123476888252Smrg echo sx4-nec-superux${UNAME_RELEASE} 12351ae1b5e8Smrg exit ;; 123676888252Smrg SX-5:SUPER-UX:*:*) 123776888252Smrg echo sx5-nec-superux${UNAME_RELEASE} 12381ae1b5e8Smrg exit ;; 123976888252Smrg SX-6:SUPER-UX:*:*) 124076888252Smrg echo sx6-nec-superux${UNAME_RELEASE} 12411ae1b5e8Smrg exit ;; 12421ae1b5e8Smrg SX-7:SUPER-UX:*:*) 12431ae1b5e8Smrg echo sx7-nec-superux${UNAME_RELEASE} 12441ae1b5e8Smrg exit ;; 12451ae1b5e8Smrg SX-8:SUPER-UX:*:*) 12461ae1b5e8Smrg echo sx8-nec-superux${UNAME_RELEASE} 12471ae1b5e8Smrg exit ;; 12481ae1b5e8Smrg SX-8R:SUPER-UX:*:*) 12491ae1b5e8Smrg echo sx8r-nec-superux${UNAME_RELEASE} 12501ae1b5e8Smrg exit ;; 125176888252Smrg Power*:Rhapsody:*:*) 125276888252Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 12531ae1b5e8Smrg exit ;; 125476888252Smrg *:Rhapsody:*:*) 125576888252Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 12561ae1b5e8Smrg exit ;; 125776888252Smrg *:Darwin:*:*) 12581ae1b5e8Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 12599586ba5aSmrg eval $set_cc_for_build 12609586ba5aSmrg if test "$UNAME_PROCESSOR" = unknown ; then 12619586ba5aSmrg UNAME_PROCESSOR=powerpc 12629586ba5aSmrg fi 12639586ba5aSmrg if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then 12649586ba5aSmrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 12659586ba5aSmrg if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 12669586ba5aSmrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 12679586ba5aSmrg grep IS_64BIT_ARCH >/dev/null 12689586ba5aSmrg then 12699586ba5aSmrg case $UNAME_PROCESSOR in 12709586ba5aSmrg i386) UNAME_PROCESSOR=x86_64 ;; 12719586ba5aSmrg powerpc) UNAME_PROCESSOR=powerpc64 ;; 12729586ba5aSmrg esac 12739586ba5aSmrg fi 12749586ba5aSmrg fi 12759586ba5aSmrg elif test "$UNAME_PROCESSOR" = i386 ; then 12769586ba5aSmrg # Avoid executing cc on OS X 10.9, as it ships with a stub 12779586ba5aSmrg # that puts up a graphical alert prompting to install 12789586ba5aSmrg # developer tools. Any system running Mac OS X 10.7 or 12799586ba5aSmrg # later (Darwin 11 and later) is required to have a 64-bit 12809586ba5aSmrg # processor. This is not true of the ARM version of Darwin 12819586ba5aSmrg # that Apple uses in portable devices. 12829586ba5aSmrg UNAME_PROCESSOR=x86_64 12839586ba5aSmrg fi 128476888252Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 12851ae1b5e8Smrg exit ;; 128676888252Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 128776888252Smrg UNAME_PROCESSOR=`uname -p` 128876888252Smrg if test "$UNAME_PROCESSOR" = "x86"; then 128976888252Smrg UNAME_PROCESSOR=i386 129076888252Smrg UNAME_MACHINE=pc 129176888252Smrg fi 129276888252Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 12931ae1b5e8Smrg exit ;; 129476888252Smrg *:QNX:*:4*) 129576888252Smrg echo i386-pc-qnx 12961ae1b5e8Smrg exit ;; 129763847c39Smrg NEO-?:NONSTOP_KERNEL:*:*) 129863847c39Smrg echo neo-tandem-nsk${UNAME_RELEASE} 129963847c39Smrg exit ;; 13009586ba5aSmrg NSE-*:NONSTOP_KERNEL:*:*) 13011ae1b5e8Smrg echo nse-tandem-nsk${UNAME_RELEASE} 13021ae1b5e8Smrg exit ;; 13031ae1b5e8Smrg NSR-?:NONSTOP_KERNEL:*:*) 130476888252Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 13051ae1b5e8Smrg exit ;; 130676888252Smrg *:NonStop-UX:*:*) 130776888252Smrg echo mips-compaq-nonstopux 13081ae1b5e8Smrg exit ;; 130976888252Smrg BS2000:POSIX*:*:*) 131076888252Smrg echo bs2000-siemens-sysv 13111ae1b5e8Smrg exit ;; 131276888252Smrg DS/*:UNIX_System_V:*:*) 131376888252Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 13141ae1b5e8Smrg exit ;; 131576888252Smrg *:Plan9:*:*) 131676888252Smrg # "uname -m" is not consistent, so use $cputype instead. 386 131776888252Smrg # is converted to i386 for consistency with other x86 131876888252Smrg # operating systems. 131976888252Smrg if test "$cputype" = "386"; then 132076888252Smrg UNAME_MACHINE=i386 132176888252Smrg else 132276888252Smrg UNAME_MACHINE="$cputype" 132376888252Smrg fi 132476888252Smrg echo ${UNAME_MACHINE}-unknown-plan9 13251ae1b5e8Smrg exit ;; 132676888252Smrg *:TOPS-10:*:*) 132776888252Smrg echo pdp10-unknown-tops10 13281ae1b5e8Smrg exit ;; 132976888252Smrg *:TENEX:*:*) 133076888252Smrg echo pdp10-unknown-tenex 13311ae1b5e8Smrg exit ;; 133276888252Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 133376888252Smrg echo pdp10-dec-tops20 13341ae1b5e8Smrg exit ;; 133576888252Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 133676888252Smrg echo pdp10-xkl-tops20 13371ae1b5e8Smrg exit ;; 133876888252Smrg *:TOPS-20:*:*) 133976888252Smrg echo pdp10-unknown-tops20 13401ae1b5e8Smrg exit ;; 134176888252Smrg *:ITS:*:*) 134276888252Smrg echo pdp10-unknown-its 13431ae1b5e8Smrg exit ;; 134476888252Smrg SEI:*:*:SEIUX) 134563847c39Smrg echo mips-sei-seiux${UNAME_RELEASE} 13461ae1b5e8Smrg exit ;; 13471ae1b5e8Smrg *:DragonFly:*:*) 13481ae1b5e8Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 13491ae1b5e8Smrg exit ;; 13501ae1b5e8Smrg *:*VMS:*:*) 135163847c39Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 13521ae1b5e8Smrg case "${UNAME_MACHINE}" in 13531ae1b5e8Smrg A*) echo alpha-dec-vms ; exit ;; 13541ae1b5e8Smrg I*) echo ia64-dec-vms ; exit ;; 13551ae1b5e8Smrg V*) echo vax-dec-vms ; exit ;; 13561ae1b5e8Smrg esac ;; 13571ae1b5e8Smrg *:XENIX:*:SysV) 13581ae1b5e8Smrg echo i386-pc-xenix 13591ae1b5e8Smrg exit ;; 13601ae1b5e8Smrg i*86:skyos:*:*) 13611ae1b5e8Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 13621ae1b5e8Smrg exit ;; 13631ae1b5e8Smrg i*86:rdos:*:*) 13641ae1b5e8Smrg echo ${UNAME_MACHINE}-pc-rdos 13651ae1b5e8Smrg exit ;; 136663847c39Smrg i*86:AROS:*:*) 136763847c39Smrg echo ${UNAME_MACHINE}-pc-aros 136863847c39Smrg exit ;; 136963847c39Smrg x86_64:VMkernel:*:*) 137063847c39Smrg echo ${UNAME_MACHINE}-unknown-esx 137163847c39Smrg exit ;; 137276888252Smrgesac 137376888252Smrg 137476888252Smrgcat >&2 <<EOF 137576888252Smrg$0: unable to guess system type 137676888252Smrg 137776888252SmrgThis script, last modified $timestamp, has failed to recognize 137876888252Smrgthe operating system you are using. It is advised that you 137976888252Smrgdownload the most up to date version of the config scripts from 138076888252Smrg 13811ae1b5e8Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 13821ae1b5e8Smrgand 13831ae1b5e8Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 138476888252Smrg 138576888252SmrgIf the version you run ($0) is already up to date, please 138676888252Smrgsend the following data and any information you think might be 138776888252Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 138876888252Smrginformation to handle your system. 138976888252Smrg 139076888252Smrgconfig.guess timestamp = $timestamp 139176888252Smrg 139276888252Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 139376888252Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 139476888252Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 139576888252Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 139676888252Smrg 139776888252Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 139876888252Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 139976888252Smrg 140076888252Smrghostinfo = `(hostinfo) 2>/dev/null` 140176888252Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 140276888252Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 140376888252Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 140476888252Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 140576888252Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 140676888252Smrg 140776888252SmrgUNAME_MACHINE = ${UNAME_MACHINE} 140876888252SmrgUNAME_RELEASE = ${UNAME_RELEASE} 140976888252SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 141076888252SmrgUNAME_VERSION = ${UNAME_VERSION} 141176888252SmrgEOF 141276888252Smrg 141376888252Smrgexit 1 141476888252Smrg 141576888252Smrg# Local variables: 141676888252Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 141776888252Smrg# time-stamp-start: "timestamp='" 141876888252Smrg# time-stamp-format: "%:y-%02m-%02d" 141976888252Smrg# time-stamp-end: "'" 142076888252Smrg# End: 1421