config.guess revision 95903e71
1692f60a7Smrg#! /bin/sh 2692f60a7Smrg# Attempt to guess a canonical system name. 395903e71Smrg# Copyright 1992-2014 Free Software Foundation, Inc. 4692f60a7Smrg 595903e71Smrgtimestamp='2014-03-23' 6692f60a7Smrg 7692f60a7Smrg# This file is free software; you can redistribute it and/or modify it 8692f60a7Smrg# under the terms of the GNU General Public License as published by 9eaa3dbe0Smrg# the Free Software Foundation; either version 3 of the License, or 10692f60a7Smrg# (at your option) any later version. 11692f60a7Smrg# 12692f60a7Smrg# This program is distributed in the hope that it will be useful, but 13692f60a7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 14692f60a7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15692f60a7Smrg# General Public License for more details. 16692f60a7Smrg# 17692f60a7Smrg# You should have received a copy of the GNU General Public License 18eaa3dbe0Smrg# along with this program; if not, see <http://www.gnu.org/licenses/>. 19692f60a7Smrg# 20692f60a7Smrg# As a special exception to the GNU General Public License, if you 21692f60a7Smrg# distribute this file as part of a program that contains a 22692f60a7Smrg# configuration script generated by Autoconf, you may include it under 23eaa3dbe0Smrg# the same distribution terms that you use for the rest of that 24eaa3dbe0Smrg# program. This Exception is an additional permission under section 7 25eaa3dbe0Smrg# of the GNU General Public License, version 3 ("GPLv3"). 26692f60a7Smrg# 27eaa3dbe0Smrg# Originally written by Per Bothner. 28692f60a7Smrg# 293f6d0e1dSmrg# You can get the latest version of this script from: 303f6d0e1dSmrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 31eaa3dbe0Smrg# 32eaa3dbe0Smrg# Please send patches with a ChangeLog entry to config-patches@gnu.org. 33eaa3dbe0Smrg 34692f60a7Smrg 35692f60a7Smrgme=`echo "$0" | sed -e 's,.*/,,'` 36692f60a7Smrg 37692f60a7Smrgusage="\ 38692f60a7SmrgUsage: $0 [OPTION] 39692f60a7Smrg 40692f60a7SmrgOutput the configuration name of the system \`$me' is run on. 41692f60a7Smrg 42692f60a7SmrgOperation modes: 43692f60a7Smrg -h, --help print this help, then exit 44692f60a7Smrg -t, --time-stamp print date of last modification, then exit 45692f60a7Smrg -v, --version print version number, then exit 46692f60a7Smrg 47692f60a7SmrgReport bugs and patches to <config-patches@gnu.org>." 48692f60a7Smrg 49692f60a7Smrgversion="\ 50692f60a7SmrgGNU config.guess ($timestamp) 51692f60a7Smrg 52692f60a7SmrgOriginally written by Per Bothner. 5395903e71SmrgCopyright 1992-2014 Free Software Foundation, Inc. 54692f60a7Smrg 55692f60a7SmrgThis is free software; see the source for copying conditions. There is NO 56692f60a7Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 57692f60a7Smrg 58692f60a7Smrghelp=" 59692f60a7SmrgTry \`$me --help' for more information." 60692f60a7Smrg 61692f60a7Smrg# Parse command line 62692f60a7Smrgwhile test $# -gt 0 ; do 63692f60a7Smrg case $1 in 64692f60a7Smrg --time-stamp | --time* | -t ) 6554569438Smrg echo "$timestamp" ; exit ;; 66692f60a7Smrg --version | -v ) 6754569438Smrg echo "$version" ; exit ;; 68692f60a7Smrg --help | --h* | -h ) 6954569438Smrg echo "$usage"; exit ;; 70692f60a7Smrg -- ) # Stop option processing 71692f60a7Smrg shift; break ;; 72692f60a7Smrg - ) # Use stdin as input. 73692f60a7Smrg break ;; 74692f60a7Smrg -* ) 75692f60a7Smrg echo "$me: invalid option $1$help" >&2 76692f60a7Smrg exit 1 ;; 77692f60a7Smrg * ) 78692f60a7Smrg break ;; 79692f60a7Smrg esac 80692f60a7Smrgdone 81692f60a7Smrg 82692f60a7Smrgif test $# != 0; then 83692f60a7Smrg echo "$me: too many arguments$help" >&2 84692f60a7Smrg exit 1 85692f60a7Smrgfi 86692f60a7Smrg 87692f60a7Smrgtrap 'exit 1' 1 2 15 88692f60a7Smrg 89692f60a7Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 90692f60a7Smrg# compiler to aid in system detection is discouraged as it requires 91692f60a7Smrg# temporary files to be created and, as you can see below, it is a 92692f60a7Smrg# headache to deal with in a portable fashion. 93692f60a7Smrg 94692f60a7Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 95692f60a7Smrg# use `HOST_CC' if defined, but it is deprecated. 96692f60a7Smrg 97692f60a7Smrg# Portable tmp directory creation inspired by the Autoconf team. 98692f60a7Smrg 99692f60a7Smrgset_cc_for_build=' 100692f60a7Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 101692f60a7Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 102692f60a7Smrg: ${TMPDIR=/tmp} ; 10354569438Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 104692f60a7Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 105692f60a7Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 106692f60a7Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 107692f60a7Smrgdummy=$tmp/dummy ; 108692f60a7Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 109692f60a7Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 110692f60a7Smrg ,,) echo "int x;" > $dummy.c ; 111692f60a7Smrg for c in cc gcc c89 c99 ; do 112692f60a7Smrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 113692f60a7Smrg CC_FOR_BUILD="$c"; break ; 114692f60a7Smrg fi ; 115692f60a7Smrg done ; 116692f60a7Smrg if test x"$CC_FOR_BUILD" = x ; then 117692f60a7Smrg CC_FOR_BUILD=no_compiler_found ; 118692f60a7Smrg fi 119692f60a7Smrg ;; 120692f60a7Smrg ,,*) CC_FOR_BUILD=$CC ;; 121692f60a7Smrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 12254569438Smrgesac ; set_cc_for_build= ;' 123692f60a7Smrg 124692f60a7Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 125692f60a7Smrg# (ghazi@noc.rutgers.edu 1994-08-24) 126692f60a7Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 127692f60a7Smrg PATH=$PATH:/.attbin ; export PATH 128692f60a7Smrgfi 129692f60a7Smrg 130692f60a7SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 131692f60a7SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 132692f60a7SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 133692f60a7SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 134692f60a7Smrg 135eaa3dbe0Smrgcase "${UNAME_SYSTEM}" in 13695903e71SmrgLinux|GNU|GNU/*) 13795903e71Smrg # If the system lacks a compiler, then just pick glibc. 13895903e71Smrg # We could probably try harder. 13995903e71Smrg LIBC=gnu 14095903e71Smrg 141eaa3dbe0Smrg eval $set_cc_for_build 142eaa3dbe0Smrg cat <<-EOF > $dummy.c 143eaa3dbe0Smrg #include <features.h> 14495903e71Smrg #if defined(__UCLIBC__) 145eaa3dbe0Smrg LIBC=uclibc 14695903e71Smrg #elif defined(__dietlibc__) 147eaa3dbe0Smrg LIBC=dietlibc 14895903e71Smrg #else 149eaa3dbe0Smrg LIBC=gnu 150eaa3dbe0Smrg #endif 151eaa3dbe0Smrg EOF 15295903e71Smrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` 153eaa3dbe0Smrg ;; 154eaa3dbe0Smrgesac 155eaa3dbe0Smrg 156692f60a7Smrg# Note: order is significant - the case branches are not exclusive. 157692f60a7Smrg 158692f60a7Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 159692f60a7Smrg *:NetBSD:*:*) 160692f60a7Smrg # NetBSD (nbsd) targets should (where applicable) match one or 1613f6d0e1dSmrg # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 162692f60a7Smrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 163692f60a7Smrg # switched to ELF, *-*-netbsd* would select the old 164692f60a7Smrg # object file format. This provides both forward 165692f60a7Smrg # compatibility and a consistent mechanism for selecting the 166692f60a7Smrg # object file format. 167692f60a7Smrg # 168692f60a7Smrg # Note: NetBSD doesn't particularly care about the vendor 169692f60a7Smrg # portion of the name. We always set it to "unknown". 170692f60a7Smrg sysctl="sysctl -n hw.machine_arch" 171692f60a7Smrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 172692f60a7Smrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 173692f60a7Smrg case "${UNAME_MACHINE_ARCH}" in 174692f60a7Smrg armeb) machine=armeb-unknown ;; 175692f60a7Smrg arm*) machine=arm-unknown ;; 176692f60a7Smrg sh3el) machine=shl-unknown ;; 177692f60a7Smrg sh3eb) machine=sh-unknown ;; 17854569438Smrg sh5el) machine=sh5le-unknown ;; 179692f60a7Smrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 180692f60a7Smrg esac 181692f60a7Smrg # The Operating System including object format, if it has switched 182692f60a7Smrg # to ELF recently, or will in the future. 183692f60a7Smrg case "${UNAME_MACHINE_ARCH}" in 184692f60a7Smrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 185692f60a7Smrg eval $set_cc_for_build 186692f60a7Smrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 1873f6d0e1dSmrg | grep -q __ELF__ 188692f60a7Smrg then 189692f60a7Smrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 190692f60a7Smrg # Return netbsd for either. FIX? 191692f60a7Smrg os=netbsd 192692f60a7Smrg else 193692f60a7Smrg os=netbsdelf 194692f60a7Smrg fi 195692f60a7Smrg ;; 196692f60a7Smrg *) 1973f6d0e1dSmrg os=netbsd 198692f60a7Smrg ;; 199692f60a7Smrg esac 200692f60a7Smrg # The OS release 201692f60a7Smrg # Debian GNU/NetBSD machines have a different userland, and 202692f60a7Smrg # thus, need a distinct triplet. However, they do not need 203692f60a7Smrg # kernel version information, so it can be replaced with a 204692f60a7Smrg # suitable tag, in the style of linux-gnu. 205692f60a7Smrg case "${UNAME_VERSION}" in 206692f60a7Smrg Debian*) 207692f60a7Smrg release='-gnu' 208692f60a7Smrg ;; 209692f60a7Smrg *) 210692f60a7Smrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 211692f60a7Smrg ;; 212692f60a7Smrg esac 213692f60a7Smrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 214692f60a7Smrg # contains redundant information, the shorter form: 215692f60a7Smrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 216692f60a7Smrg echo "${machine}-${os}${release}" 21754569438Smrg exit ;; 218eaa3dbe0Smrg *:Bitrig:*:*) 219eaa3dbe0Smrg UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 220eaa3dbe0Smrg echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} 221eaa3dbe0Smrg exit ;; 222692f60a7Smrg *:OpenBSD:*:*) 22354569438Smrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 22454569438Smrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 22554569438Smrg exit ;; 22654569438Smrg *:ekkoBSD:*:*) 22754569438Smrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 22854569438Smrg exit ;; 22954569438Smrg *:SolidBSD:*:*) 23054569438Smrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 23154569438Smrg exit ;; 23254569438Smrg macppc:MirBSD:*:*) 23354569438Smrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 23454569438Smrg exit ;; 23554569438Smrg *:MirBSD:*:*) 23654569438Smrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 23754569438Smrg exit ;; 238692f60a7Smrg alpha:OSF1:*:*) 23954569438Smrg case $UNAME_RELEASE in 24054569438Smrg *4.0) 241692f60a7Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 24254569438Smrg ;; 24354569438Smrg *5.*) 2443f6d0e1dSmrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 24554569438Smrg ;; 24654569438Smrg esac 247692f60a7Smrg # According to Compaq, /usr/sbin/psrinfo has been available on 248692f60a7Smrg # OSF/1 and Tru64 systems produced since 1995. I hope that 249692f60a7Smrg # covers most systems running today. This code pipes the CPU 250692f60a7Smrg # types through head -n 1, so we only detect the type of CPU 0. 251692f60a7Smrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 252692f60a7Smrg case "$ALPHA_CPU_TYPE" in 253692f60a7Smrg "EV4 (21064)") 254692f60a7Smrg UNAME_MACHINE="alpha" ;; 255692f60a7Smrg "EV4.5 (21064)") 256692f60a7Smrg UNAME_MACHINE="alpha" ;; 257692f60a7Smrg "LCA4 (21066/21068)") 258692f60a7Smrg UNAME_MACHINE="alpha" ;; 259692f60a7Smrg "EV5 (21164)") 260692f60a7Smrg UNAME_MACHINE="alphaev5" ;; 261692f60a7Smrg "EV5.6 (21164A)") 262692f60a7Smrg UNAME_MACHINE="alphaev56" ;; 263692f60a7Smrg "EV5.6 (21164PC)") 264692f60a7Smrg UNAME_MACHINE="alphapca56" ;; 265692f60a7Smrg "EV5.7 (21164PC)") 266692f60a7Smrg UNAME_MACHINE="alphapca57" ;; 267692f60a7Smrg "EV6 (21264)") 268692f60a7Smrg UNAME_MACHINE="alphaev6" ;; 269692f60a7Smrg "EV6.7 (21264A)") 270692f60a7Smrg UNAME_MACHINE="alphaev67" ;; 271692f60a7Smrg "EV6.8CB (21264C)") 272692f60a7Smrg UNAME_MACHINE="alphaev68" ;; 273692f60a7Smrg "EV6.8AL (21264B)") 274692f60a7Smrg UNAME_MACHINE="alphaev68" ;; 275692f60a7Smrg "EV6.8CX (21264D)") 276692f60a7Smrg UNAME_MACHINE="alphaev68" ;; 277692f60a7Smrg "EV6.9A (21264/EV69A)") 278692f60a7Smrg UNAME_MACHINE="alphaev69" ;; 279692f60a7Smrg "EV7 (21364)") 280692f60a7Smrg UNAME_MACHINE="alphaev7" ;; 281692f60a7Smrg "EV7.9 (21364A)") 282692f60a7Smrg UNAME_MACHINE="alphaev79" ;; 283692f60a7Smrg esac 28454569438Smrg # A Pn.n version is a patched version. 285692f60a7Smrg # A Vn.n version is a released version. 286692f60a7Smrg # A Tn.n version is a released field test version. 287692f60a7Smrg # A Xn.n version is an unreleased experimental baselevel. 288692f60a7Smrg # 1.2 uses "1.2" for uname -r. 28954569438Smrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2903f6d0e1dSmrg # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 2913f6d0e1dSmrg exitcode=$? 2923f6d0e1dSmrg trap '' 0 2933f6d0e1dSmrg exit $exitcode ;; 294692f60a7Smrg Alpha\ *:Windows_NT*:*) 295692f60a7Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 296692f60a7Smrg # Should we change UNAME_MACHINE based on the output of uname instead 297692f60a7Smrg # of the specific Alpha model? 298692f60a7Smrg echo alpha-pc-interix 29954569438Smrg exit ;; 300692f60a7Smrg 21064:Windows_NT:50:3) 301692f60a7Smrg echo alpha-dec-winnt3.5 30254569438Smrg exit ;; 303692f60a7Smrg Amiga*:UNIX_System_V:4.0:*) 304692f60a7Smrg echo m68k-unknown-sysv4 30554569438Smrg exit ;; 306692f60a7Smrg *:[Aa]miga[Oo][Ss]:*:*) 307692f60a7Smrg echo ${UNAME_MACHINE}-unknown-amigaos 30854569438Smrg exit ;; 309692f60a7Smrg *:[Mm]orph[Oo][Ss]:*:*) 310692f60a7Smrg echo ${UNAME_MACHINE}-unknown-morphos 31154569438Smrg exit ;; 312692f60a7Smrg *:OS/390:*:*) 313692f60a7Smrg echo i370-ibm-openedition 31454569438Smrg exit ;; 31554569438Smrg *:z/VM:*:*) 31654569438Smrg echo s390-ibm-zvmoe 31754569438Smrg exit ;; 31854569438Smrg *:OS400:*:*) 3193f6d0e1dSmrg echo powerpc-ibm-os400 32054569438Smrg exit ;; 321692f60a7Smrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 322692f60a7Smrg echo arm-acorn-riscix${UNAME_RELEASE} 32354569438Smrg exit ;; 324eaa3dbe0Smrg arm*:riscos:*:*|arm*:RISCOS:*:*) 32554569438Smrg echo arm-unknown-riscos 32654569438Smrg exit ;; 327692f60a7Smrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 328692f60a7Smrg echo hppa1.1-hitachi-hiuxmpp 32954569438Smrg exit ;; 330692f60a7Smrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 331692f60a7Smrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 332692f60a7Smrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 333692f60a7Smrg echo pyramid-pyramid-sysv3 334692f60a7Smrg else 335692f60a7Smrg echo pyramid-pyramid-bsd 336692f60a7Smrg fi 33754569438Smrg exit ;; 338692f60a7Smrg NILE*:*:*:dcosx) 339692f60a7Smrg echo pyramid-pyramid-svr4 34054569438Smrg exit ;; 341692f60a7Smrg DRS?6000:unix:4.0:6*) 342692f60a7Smrg echo sparc-icl-nx6 34354569438Smrg exit ;; 34454569438Smrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 345692f60a7Smrg case `/usr/bin/uname -p` in 34654569438Smrg sparc) echo sparc-icl-nx7; exit ;; 347692f60a7Smrg esac ;; 3483f6d0e1dSmrg s390x:SunOS:*:*) 3493f6d0e1dSmrg echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3503f6d0e1dSmrg exit ;; 351692f60a7Smrg sun4H:SunOS:5.*:*) 352692f60a7Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 35354569438Smrg exit ;; 354692f60a7Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 355692f60a7Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 35654569438Smrg exit ;; 3573f6d0e1dSmrg i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 3583f6d0e1dSmrg echo i386-pc-auroraux${UNAME_RELEASE} 3593f6d0e1dSmrg exit ;; 36054569438Smrg i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 3613f6d0e1dSmrg eval $set_cc_for_build 3623f6d0e1dSmrg SUN_ARCH="i386" 3633f6d0e1dSmrg # If there is a compiler, see if it is configured for 64-bit objects. 3643f6d0e1dSmrg # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 3653f6d0e1dSmrg # This test works for both compilers. 3663f6d0e1dSmrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 3673f6d0e1dSmrg if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 3683f6d0e1dSmrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 3693f6d0e1dSmrg grep IS_64BIT_ARCH >/dev/null 3703f6d0e1dSmrg then 3713f6d0e1dSmrg SUN_ARCH="x86_64" 3723f6d0e1dSmrg fi 3733f6d0e1dSmrg fi 3743f6d0e1dSmrg echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 37554569438Smrg exit ;; 376692f60a7Smrg sun4*:SunOS:6*:*) 377692f60a7Smrg # According to config.sub, this is the proper way to canonicalize 378692f60a7Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 379692f60a7Smrg # it's likely to be more like Solaris than SunOS4. 380692f60a7Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 38154569438Smrg exit ;; 382692f60a7Smrg sun4*:SunOS:*:*) 383692f60a7Smrg case "`/usr/bin/arch -k`" in 384692f60a7Smrg Series*|S4*) 385692f60a7Smrg UNAME_RELEASE=`uname -v` 386692f60a7Smrg ;; 387692f60a7Smrg esac 388692f60a7Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 389692f60a7Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 39054569438Smrg exit ;; 391692f60a7Smrg sun3*:SunOS:*:*) 392692f60a7Smrg echo m68k-sun-sunos${UNAME_RELEASE} 39354569438Smrg exit ;; 394692f60a7Smrg sun*:*:4.2BSD:*) 395692f60a7Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 396692f60a7Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 397692f60a7Smrg case "`/bin/arch`" in 398692f60a7Smrg sun3) 399692f60a7Smrg echo m68k-sun-sunos${UNAME_RELEASE} 400692f60a7Smrg ;; 401692f60a7Smrg sun4) 402692f60a7Smrg echo sparc-sun-sunos${UNAME_RELEASE} 403692f60a7Smrg ;; 404692f60a7Smrg esac 40554569438Smrg exit ;; 406692f60a7Smrg aushp:SunOS:*:*) 407692f60a7Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 40854569438Smrg exit ;; 409692f60a7Smrg # The situation for MiNT is a little confusing. The machine name 410692f60a7Smrg # can be virtually everything (everything which is not 411692f60a7Smrg # "atarist" or "atariste" at least should have a processor 412692f60a7Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 413692f60a7Smrg # to the lowercase version "mint" (or "freemint"). Finally 414692f60a7Smrg # the system name "TOS" denotes a system which is actually not 415692f60a7Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 416692f60a7Smrg # be no problem. 417692f60a7Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 4183f6d0e1dSmrg echo m68k-atari-mint${UNAME_RELEASE} 41954569438Smrg exit ;; 420692f60a7Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 421692f60a7Smrg echo m68k-atari-mint${UNAME_RELEASE} 4223f6d0e1dSmrg exit ;; 423692f60a7Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 4243f6d0e1dSmrg echo m68k-atari-mint${UNAME_RELEASE} 42554569438Smrg exit ;; 426692f60a7Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 4273f6d0e1dSmrg echo m68k-milan-mint${UNAME_RELEASE} 4283f6d0e1dSmrg exit ;; 429692f60a7Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 4303f6d0e1dSmrg echo m68k-hades-mint${UNAME_RELEASE} 4313f6d0e1dSmrg exit ;; 432692f60a7Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 4333f6d0e1dSmrg echo m68k-unknown-mint${UNAME_RELEASE} 4343f6d0e1dSmrg exit ;; 43554569438Smrg m68k:machten:*:*) 43654569438Smrg echo m68k-apple-machten${UNAME_RELEASE} 43754569438Smrg exit ;; 438692f60a7Smrg powerpc:machten:*:*) 439692f60a7Smrg echo powerpc-apple-machten${UNAME_RELEASE} 44054569438Smrg exit ;; 441692f60a7Smrg RISC*:Mach:*:*) 442692f60a7Smrg echo mips-dec-mach_bsd4.3 44354569438Smrg exit ;; 444692f60a7Smrg RISC*:ULTRIX:*:*) 445692f60a7Smrg echo mips-dec-ultrix${UNAME_RELEASE} 44654569438Smrg exit ;; 447692f60a7Smrg VAX*:ULTRIX*:*:*) 448692f60a7Smrg echo vax-dec-ultrix${UNAME_RELEASE} 44954569438Smrg exit ;; 450692f60a7Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 451692f60a7Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 45254569438Smrg exit ;; 453692f60a7Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 454692f60a7Smrg eval $set_cc_for_build 455692f60a7Smrg sed 's/^ //' << EOF >$dummy.c 456692f60a7Smrg#ifdef __cplusplus 457692f60a7Smrg#include <stdio.h> /* for printf() prototype */ 458692f60a7Smrg int main (int argc, char *argv[]) { 459692f60a7Smrg#else 460692f60a7Smrg int main (argc, argv) int argc; char *argv[]; { 461692f60a7Smrg#endif 462692f60a7Smrg #if defined (host_mips) && defined (MIPSEB) 463692f60a7Smrg #if defined (SYSTYPE_SYSV) 464692f60a7Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 465692f60a7Smrg #endif 466692f60a7Smrg #if defined (SYSTYPE_SVR4) 467692f60a7Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 468692f60a7Smrg #endif 469692f60a7Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 470692f60a7Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 471692f60a7Smrg #endif 472692f60a7Smrg #endif 473692f60a7Smrg exit (-1); 474692f60a7Smrg } 475692f60a7SmrgEOF 47654569438Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 47754569438Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 47854569438Smrg SYSTEM_NAME=`$dummy $dummyarg` && 47954569438Smrg { echo "$SYSTEM_NAME"; exit; } 480692f60a7Smrg echo mips-mips-riscos${UNAME_RELEASE} 48154569438Smrg exit ;; 482692f60a7Smrg Motorola:PowerMAX_OS:*:*) 483692f60a7Smrg echo powerpc-motorola-powermax 48454569438Smrg exit ;; 485692f60a7Smrg Motorola:*:4.3:PL8-*) 486692f60a7Smrg echo powerpc-harris-powermax 48754569438Smrg exit ;; 488692f60a7Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 489692f60a7Smrg echo powerpc-harris-powermax 49054569438Smrg exit ;; 491692f60a7Smrg Night_Hawk:Power_UNIX:*:*) 492692f60a7Smrg echo powerpc-harris-powerunix 49354569438Smrg exit ;; 494692f60a7Smrg m88k:CX/UX:7*:*) 495692f60a7Smrg echo m88k-harris-cxux7 49654569438Smrg exit ;; 497692f60a7Smrg m88k:*:4*:R4*) 498692f60a7Smrg echo m88k-motorola-sysv4 49954569438Smrg exit ;; 500692f60a7Smrg m88k:*:3*:R3*) 501692f60a7Smrg echo m88k-motorola-sysv3 50254569438Smrg exit ;; 503692f60a7Smrg AViiON:dgux:*:*) 5043f6d0e1dSmrg # DG/UX returns AViiON for all architectures 5053f6d0e1dSmrg UNAME_PROCESSOR=`/usr/bin/uname -p` 506692f60a7Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 507692f60a7Smrg then 508692f60a7Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 509692f60a7Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 510692f60a7Smrg then 511692f60a7Smrg echo m88k-dg-dgux${UNAME_RELEASE} 512692f60a7Smrg else 513692f60a7Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 514692f60a7Smrg fi 515692f60a7Smrg else 516692f60a7Smrg echo i586-dg-dgux${UNAME_RELEASE} 517692f60a7Smrg fi 5183f6d0e1dSmrg exit ;; 519692f60a7Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 520692f60a7Smrg echo m88k-dolphin-sysv3 52154569438Smrg exit ;; 522692f60a7Smrg M88*:*:R3*:*) 523692f60a7Smrg # Delta 88k system running SVR3 524692f60a7Smrg echo m88k-motorola-sysv3 52554569438Smrg exit ;; 526692f60a7Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 527692f60a7Smrg echo m88k-tektronix-sysv3 52854569438Smrg exit ;; 529692f60a7Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 530692f60a7Smrg echo m68k-tektronix-bsd 53154569438Smrg exit ;; 532692f60a7Smrg *:IRIX*:*:*) 533692f60a7Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 53454569438Smrg exit ;; 535692f60a7Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 53654569438Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 53754569438Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 538692f60a7Smrg i*86:AIX:*:*) 539692f60a7Smrg echo i386-ibm-aix 54054569438Smrg exit ;; 541692f60a7Smrg ia64:AIX:*:*) 542692f60a7Smrg if [ -x /usr/bin/oslevel ] ; then 543692f60a7Smrg IBM_REV=`/usr/bin/oslevel` 544692f60a7Smrg else 545692f60a7Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 546692f60a7Smrg fi 547692f60a7Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 54854569438Smrg exit ;; 549692f60a7Smrg *:AIX:2:3) 550692f60a7Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 551692f60a7Smrg eval $set_cc_for_build 552692f60a7Smrg sed 's/^ //' << EOF >$dummy.c 553692f60a7Smrg #include <sys/systemcfg.h> 554692f60a7Smrg 555692f60a7Smrg main() 556692f60a7Smrg { 557692f60a7Smrg if (!__power_pc()) 558692f60a7Smrg exit(1); 559692f60a7Smrg puts("powerpc-ibm-aix3.2.5"); 560692f60a7Smrg exit(0); 561692f60a7Smrg } 562692f60a7SmrgEOF 56354569438Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 56454569438Smrg then 56554569438Smrg echo "$SYSTEM_NAME" 56654569438Smrg else 56754569438Smrg echo rs6000-ibm-aix3.2.5 56854569438Smrg fi 569692f60a7Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 570692f60a7Smrg echo rs6000-ibm-aix3.2.4 571692f60a7Smrg else 572692f60a7Smrg echo rs6000-ibm-aix3.2 573692f60a7Smrg fi 57454569438Smrg exit ;; 5753f6d0e1dSmrg *:AIX:*:[4567]) 576692f60a7Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 577692f60a7Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 578692f60a7Smrg IBM_ARCH=rs6000 579692f60a7Smrg else 580692f60a7Smrg IBM_ARCH=powerpc 581692f60a7Smrg fi 582692f60a7Smrg if [ -x /usr/bin/oslevel ] ; then 583692f60a7Smrg IBM_REV=`/usr/bin/oslevel` 584692f60a7Smrg else 585692f60a7Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 586692f60a7Smrg fi 587692f60a7Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 58854569438Smrg exit ;; 589692f60a7Smrg *:AIX:*:*) 590692f60a7Smrg echo rs6000-ibm-aix 59154569438Smrg exit ;; 592692f60a7Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 593692f60a7Smrg echo romp-ibm-bsd4.4 59454569438Smrg exit ;; 595692f60a7Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 596692f60a7Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 59754569438Smrg exit ;; # report: romp-ibm BSD 4.3 598692f60a7Smrg *:BOSX:*:*) 599692f60a7Smrg echo rs6000-bull-bosx 60054569438Smrg exit ;; 601692f60a7Smrg DPX/2?00:B.O.S.:*:*) 602692f60a7Smrg echo m68k-bull-sysv3 60354569438Smrg exit ;; 604692f60a7Smrg 9000/[34]??:4.3bsd:1.*:*) 605692f60a7Smrg echo m68k-hp-bsd 60654569438Smrg exit ;; 607692f60a7Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 608692f60a7Smrg echo m68k-hp-bsd4.4 60954569438Smrg exit ;; 610692f60a7Smrg 9000/[34678]??:HP-UX:*:*) 611692f60a7Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 612692f60a7Smrg case "${UNAME_MACHINE}" in 613692f60a7Smrg 9000/31? ) HP_ARCH=m68000 ;; 614692f60a7Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 615692f60a7Smrg 9000/[678][0-9][0-9]) 616692f60a7Smrg if [ -x /usr/bin/getconf ]; then 617692f60a7Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 6183f6d0e1dSmrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 6193f6d0e1dSmrg case "${sc_cpu_version}" in 6203f6d0e1dSmrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 6213f6d0e1dSmrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 6223f6d0e1dSmrg 532) # CPU_PA_RISC2_0 6233f6d0e1dSmrg case "${sc_kernel_bits}" in 6243f6d0e1dSmrg 32) HP_ARCH="hppa2.0n" ;; 6253f6d0e1dSmrg 64) HP_ARCH="hppa2.0w" ;; 626692f60a7Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 6273f6d0e1dSmrg esac ;; 6283f6d0e1dSmrg esac 629692f60a7Smrg fi 630692f60a7Smrg if [ "${HP_ARCH}" = "" ]; then 631692f60a7Smrg eval $set_cc_for_build 6323f6d0e1dSmrg sed 's/^ //' << EOF >$dummy.c 633692f60a7Smrg 6343f6d0e1dSmrg #define _HPUX_SOURCE 6353f6d0e1dSmrg #include <stdlib.h> 6363f6d0e1dSmrg #include <unistd.h> 637692f60a7Smrg 6383f6d0e1dSmrg int main () 6393f6d0e1dSmrg { 6403f6d0e1dSmrg #if defined(_SC_KERNEL_BITS) 6413f6d0e1dSmrg long bits = sysconf(_SC_KERNEL_BITS); 6423f6d0e1dSmrg #endif 6433f6d0e1dSmrg long cpu = sysconf (_SC_CPU_VERSION); 644692f60a7Smrg 6453f6d0e1dSmrg switch (cpu) 6463f6d0e1dSmrg { 6473f6d0e1dSmrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 6483f6d0e1dSmrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 6493f6d0e1dSmrg case CPU_PA_RISC2_0: 6503f6d0e1dSmrg #if defined(_SC_KERNEL_BITS) 6513f6d0e1dSmrg switch (bits) 6523f6d0e1dSmrg { 6533f6d0e1dSmrg case 64: puts ("hppa2.0w"); break; 6543f6d0e1dSmrg case 32: puts ("hppa2.0n"); break; 6553f6d0e1dSmrg default: puts ("hppa2.0"); break; 6563f6d0e1dSmrg } break; 6573f6d0e1dSmrg #else /* !defined(_SC_KERNEL_BITS) */ 6583f6d0e1dSmrg puts ("hppa2.0"); break; 6593f6d0e1dSmrg #endif 6603f6d0e1dSmrg default: puts ("hppa1.0"); break; 6613f6d0e1dSmrg } 6623f6d0e1dSmrg exit (0); 6633f6d0e1dSmrg } 664692f60a7SmrgEOF 665692f60a7Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 666692f60a7Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 667692f60a7Smrg fi ;; 668692f60a7Smrg esac 669692f60a7Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 670692f60a7Smrg then 67154569438Smrg eval $set_cc_for_build 67254569438Smrg 67354569438Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 67454569438Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 67554569438Smrg # generating 64-bit code. GNU and HP use different nomenclature: 67654569438Smrg # 67754569438Smrg # $ CC_FOR_BUILD=cc ./config.guess 67854569438Smrg # => hppa2.0w-hp-hpux11.23 67954569438Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 68054569438Smrg # => hppa64-hp-hpux11.23 68154569438Smrg 68254569438Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 6833f6d0e1dSmrg grep -q __LP64__ 684692f60a7Smrg then 685692f60a7Smrg HP_ARCH="hppa2.0w" 686692f60a7Smrg else 687692f60a7Smrg HP_ARCH="hppa64" 688692f60a7Smrg fi 689692f60a7Smrg fi 690692f60a7Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 69154569438Smrg exit ;; 692692f60a7Smrg ia64:HP-UX:*:*) 693692f60a7Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 694692f60a7Smrg echo ia64-hp-hpux${HPUX_REV} 69554569438Smrg exit ;; 696692f60a7Smrg 3050*:HI-UX:*:*) 697692f60a7Smrg eval $set_cc_for_build 698692f60a7Smrg sed 's/^ //' << EOF >$dummy.c 699692f60a7Smrg #include <unistd.h> 700692f60a7Smrg int 701692f60a7Smrg main () 702692f60a7Smrg { 703692f60a7Smrg long cpu = sysconf (_SC_CPU_VERSION); 704692f60a7Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 705692f60a7Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 706692f60a7Smrg results, however. */ 707692f60a7Smrg if (CPU_IS_PA_RISC (cpu)) 708692f60a7Smrg { 709692f60a7Smrg switch (cpu) 710692f60a7Smrg { 711692f60a7Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 712692f60a7Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 713692f60a7Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 714692f60a7Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 715692f60a7Smrg } 716692f60a7Smrg } 717692f60a7Smrg else if (CPU_IS_HP_MC68K (cpu)) 718692f60a7Smrg puts ("m68k-hitachi-hiuxwe2"); 719692f60a7Smrg else puts ("unknown-hitachi-hiuxwe2"); 720692f60a7Smrg exit (0); 721692f60a7Smrg } 722692f60a7SmrgEOF 72354569438Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 72454569438Smrg { echo "$SYSTEM_NAME"; exit; } 725692f60a7Smrg echo unknown-hitachi-hiuxwe2 72654569438Smrg exit ;; 727692f60a7Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 728692f60a7Smrg echo hppa1.1-hp-bsd 72954569438Smrg exit ;; 730692f60a7Smrg 9000/8??:4.3bsd:*:*) 731692f60a7Smrg echo hppa1.0-hp-bsd 73254569438Smrg exit ;; 733692f60a7Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 734692f60a7Smrg echo hppa1.0-hp-mpeix 73554569438Smrg exit ;; 736692f60a7Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 737692f60a7Smrg echo hppa1.1-hp-osf 73854569438Smrg exit ;; 739692f60a7Smrg hp8??:OSF1:*:*) 740692f60a7Smrg echo hppa1.0-hp-osf 74154569438Smrg exit ;; 742692f60a7Smrg i*86:OSF1:*:*) 743692f60a7Smrg if [ -x /usr/sbin/sysversion ] ; then 744692f60a7Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 745692f60a7Smrg else 746692f60a7Smrg echo ${UNAME_MACHINE}-unknown-osf1 747692f60a7Smrg fi 74854569438Smrg exit ;; 749692f60a7Smrg parisc*:Lites*:*:*) 750692f60a7Smrg echo hppa1.1-hp-lites 75154569438Smrg exit ;; 752692f60a7Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 753692f60a7Smrg echo c1-convex-bsd 7543f6d0e1dSmrg exit ;; 755692f60a7Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 756692f60a7Smrg if getsysinfo -f scalar_acc 757692f60a7Smrg then echo c32-convex-bsd 758692f60a7Smrg else echo c2-convex-bsd 759692f60a7Smrg fi 7603f6d0e1dSmrg exit ;; 761692f60a7Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 762692f60a7Smrg echo c34-convex-bsd 7633f6d0e1dSmrg exit ;; 764692f60a7Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 765692f60a7Smrg echo c38-convex-bsd 7663f6d0e1dSmrg exit ;; 767692f60a7Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 768692f60a7Smrg echo c4-convex-bsd 7693f6d0e1dSmrg exit ;; 770692f60a7Smrg CRAY*Y-MP:*:*:*) 771692f60a7Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 77254569438Smrg exit ;; 773692f60a7Smrg CRAY*[A-Z]90:*:*:*) 774692f60a7Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 775692f60a7Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 776692f60a7Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 777692f60a7Smrg -e 's/\.[^.]*$/.X/' 77854569438Smrg exit ;; 779692f60a7Smrg CRAY*TS:*:*:*) 780692f60a7Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 78154569438Smrg exit ;; 782692f60a7Smrg CRAY*T3E:*:*:*) 783692f60a7Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 78454569438Smrg exit ;; 785692f60a7Smrg CRAY*SV1:*:*:*) 786692f60a7Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 78754569438Smrg exit ;; 788692f60a7Smrg *:UNICOS/mp:*:*) 78954569438Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 79054569438Smrg exit ;; 791692f60a7Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 792692f60a7Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7933f6d0e1dSmrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 7943f6d0e1dSmrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 7953f6d0e1dSmrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 7963f6d0e1dSmrg exit ;; 79754569438Smrg 5000:UNIX_System_V:4.*:*) 7983f6d0e1dSmrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 7993f6d0e1dSmrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 8003f6d0e1dSmrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 80154569438Smrg exit ;; 802692f60a7Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 803692f60a7Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 80454569438Smrg exit ;; 805692f60a7Smrg sparc*:BSD/OS:*:*) 806692f60a7Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 80754569438Smrg exit ;; 808692f60a7Smrg *:BSD/OS:*:*) 809692f60a7Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 81054569438Smrg exit ;; 81154569438Smrg *:FreeBSD:*:*) 8123f6d0e1dSmrg UNAME_PROCESSOR=`/usr/bin/uname -p` 8133f6d0e1dSmrg case ${UNAME_PROCESSOR} in 81454569438Smrg amd64) 81554569438Smrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 81654569438Smrg *) 8173f6d0e1dSmrg echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 81854569438Smrg esac 81954569438Smrg exit ;; 820692f60a7Smrg i*:CYGWIN*:*) 821692f60a7Smrg echo ${UNAME_MACHINE}-pc-cygwin 82254569438Smrg exit ;; 823eaa3dbe0Smrg *:MINGW64*:*) 824eaa3dbe0Smrg echo ${UNAME_MACHINE}-pc-mingw64 825eaa3dbe0Smrg exit ;; 82654569438Smrg *:MINGW*:*) 827692f60a7Smrg echo ${UNAME_MACHINE}-pc-mingw32 82854569438Smrg exit ;; 82995903e71Smrg *:MSYS*:*) 8303f6d0e1dSmrg echo ${UNAME_MACHINE}-pc-msys 8313f6d0e1dSmrg exit ;; 83254569438Smrg i*:windows32*:*) 8333f6d0e1dSmrg # uname -m includes "-pc" on this system. 8343f6d0e1dSmrg echo ${UNAME_MACHINE}-mingw32 83554569438Smrg exit ;; 836692f60a7Smrg i*:PW*:*) 837692f60a7Smrg echo ${UNAME_MACHINE}-pc-pw32 83854569438Smrg exit ;; 8393f6d0e1dSmrg *:Interix*:*) 8403f6d0e1dSmrg case ${UNAME_MACHINE} in 84154569438Smrg x86) 84254569438Smrg echo i586-pc-interix${UNAME_RELEASE} 84354569438Smrg exit ;; 8443f6d0e1dSmrg authenticamd | genuineintel | EM64T) 84554569438Smrg echo x86_64-unknown-interix${UNAME_RELEASE} 84654569438Smrg exit ;; 84754569438Smrg IA64) 84854569438Smrg echo ia64-unknown-interix${UNAME_RELEASE} 84954569438Smrg exit ;; 85054569438Smrg esac ;; 851692f60a7Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 852692f60a7Smrg echo i${UNAME_MACHINE}-pc-mks 85354569438Smrg exit ;; 8543f6d0e1dSmrg 8664:Windows_NT:*) 8553f6d0e1dSmrg echo x86_64-pc-mks 8563f6d0e1dSmrg exit ;; 857692f60a7Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 858692f60a7Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 859692f60a7Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 860692f60a7Smrg # UNAME_MACHINE based on the output of uname instead of i386? 861692f60a7Smrg echo i586-pc-interix 86254569438Smrg exit ;; 863692f60a7Smrg i*:UWIN*:*) 864692f60a7Smrg echo ${UNAME_MACHINE}-pc-uwin 86554569438Smrg exit ;; 86654569438Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 86754569438Smrg echo x86_64-unknown-cygwin 86854569438Smrg exit ;; 869692f60a7Smrg p*:CYGWIN*:*) 870692f60a7Smrg echo powerpcle-unknown-cygwin 87154569438Smrg exit ;; 872692f60a7Smrg prep*:SunOS:5.*:*) 873692f60a7Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 87454569438Smrg exit ;; 875692f60a7Smrg *:GNU:*:*) 87654569438Smrg # the GNU system 877eaa3dbe0Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 87854569438Smrg exit ;; 87954569438Smrg *:GNU/*:*:*) 88054569438Smrg # other systems with GNU libc and userland 881eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} 88254569438Smrg exit ;; 883692f60a7Smrg i*86:Minix:*:*) 884692f60a7Smrg echo ${UNAME_MACHINE}-pc-minix 88554569438Smrg exit ;; 886eaa3dbe0Smrg aarch64:Linux:*:*) 887eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 888eaa3dbe0Smrg exit ;; 889eaa3dbe0Smrg aarch64_be:Linux:*:*) 890eaa3dbe0Smrg UNAME_MACHINE=aarch64_be 891eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 892eaa3dbe0Smrg exit ;; 8933f6d0e1dSmrg alpha:Linux:*:*) 8943f6d0e1dSmrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 8953f6d0e1dSmrg EV5) UNAME_MACHINE=alphaev5 ;; 8963f6d0e1dSmrg EV56) UNAME_MACHINE=alphaev56 ;; 8973f6d0e1dSmrg PCA56) UNAME_MACHINE=alphapca56 ;; 8983f6d0e1dSmrg PCA57) UNAME_MACHINE=alphapca56 ;; 8993f6d0e1dSmrg EV6) UNAME_MACHINE=alphaev6 ;; 9003f6d0e1dSmrg EV67) UNAME_MACHINE=alphaev67 ;; 9013f6d0e1dSmrg EV68*) UNAME_MACHINE=alphaev68 ;; 9023f6d0e1dSmrg esac 9033f6d0e1dSmrg objdump --private-headers /bin/sh | grep -q ld.so.1 904eaa3dbe0Smrg if test "$?" = 0 ; then LIBC="gnulibc1" ; fi 905eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9063f6d0e1dSmrg exit ;; 90795903e71Smrg arc:Linux:*:* | arceb:Linux:*:*) 90895903e71Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 90995903e71Smrg exit ;; 910692f60a7Smrg arm*:Linux:*:*) 91154569438Smrg eval $set_cc_for_build 91254569438Smrg if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 91354569438Smrg | grep -q __ARM_EABI__ 91454569438Smrg then 915eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 91654569438Smrg else 9173f6d0e1dSmrg if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 9183f6d0e1dSmrg | grep -q __ARM_PCS_VFP 9193f6d0e1dSmrg then 920eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi 9213f6d0e1dSmrg else 922eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf 9233f6d0e1dSmrg fi 92454569438Smrg fi 92554569438Smrg exit ;; 92654569438Smrg avr32*:Linux:*:*) 927eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 92854569438Smrg exit ;; 929692f60a7Smrg cris:Linux:*:*) 930eaa3dbe0Smrg echo ${UNAME_MACHINE}-axis-linux-${LIBC} 93154569438Smrg exit ;; 93254569438Smrg crisv32:Linux:*:*) 933eaa3dbe0Smrg echo ${UNAME_MACHINE}-axis-linux-${LIBC} 93454569438Smrg exit ;; 93554569438Smrg frv:Linux:*:*) 936eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9373f6d0e1dSmrg exit ;; 9383f6d0e1dSmrg hexagon:Linux:*:*) 939eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9403f6d0e1dSmrg exit ;; 9413f6d0e1dSmrg i*86:Linux:*:*) 942eaa3dbe0Smrg echo ${UNAME_MACHINE}-pc-linux-${LIBC} 94354569438Smrg exit ;; 944692f60a7Smrg ia64:Linux:*:*) 945eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 94654569438Smrg exit ;; 94754569438Smrg m32r*:Linux:*:*) 948eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 94954569438Smrg exit ;; 950692f60a7Smrg m68*:Linux:*:*) 951eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 95254569438Smrg exit ;; 9533f6d0e1dSmrg mips:Linux:*:* | mips64:Linux:*:*) 954692f60a7Smrg eval $set_cc_for_build 955692f60a7Smrg sed 's/^ //' << EOF >$dummy.c 956692f60a7Smrg #undef CPU 9573f6d0e1dSmrg #undef ${UNAME_MACHINE} 9583f6d0e1dSmrg #undef ${UNAME_MACHINE}el 959692f60a7Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 9603f6d0e1dSmrg CPU=${UNAME_MACHINE}el 961692f60a7Smrg #else 962692f60a7Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 9633f6d0e1dSmrg CPU=${UNAME_MACHINE} 964692f60a7Smrg #else 965692f60a7Smrg CPU= 966692f60a7Smrg #endif 967692f60a7Smrg #endif 968692f60a7SmrgEOF 9693f6d0e1dSmrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 970eaa3dbe0Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } 971692f60a7Smrg ;; 97295903e71Smrg openrisc*:Linux:*:*) 97395903e71Smrg echo or1k-unknown-linux-${LIBC} 97495903e71Smrg exit ;; 97595903e71Smrg or32:Linux:*:* | or1k*:Linux:*:*) 976eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 97754569438Smrg exit ;; 9783f6d0e1dSmrg padre:Linux:*:*) 979eaa3dbe0Smrg echo sparc-unknown-linux-${LIBC} 98054569438Smrg exit ;; 9813f6d0e1dSmrg parisc64:Linux:*:* | hppa64:Linux:*:*) 982eaa3dbe0Smrg echo hppa64-unknown-linux-${LIBC} 98354569438Smrg exit ;; 984692f60a7Smrg parisc:Linux:*:* | hppa:Linux:*:*) 985692f60a7Smrg # Look for CPU level 986692f60a7Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 987eaa3dbe0Smrg PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; 988eaa3dbe0Smrg PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; 989eaa3dbe0Smrg *) echo hppa-unknown-linux-${LIBC} ;; 990692f60a7Smrg esac 99154569438Smrg exit ;; 9923f6d0e1dSmrg ppc64:Linux:*:*) 993eaa3dbe0Smrg echo powerpc64-unknown-linux-${LIBC} 9943f6d0e1dSmrg exit ;; 9953f6d0e1dSmrg ppc:Linux:*:*) 996eaa3dbe0Smrg echo powerpc-unknown-linux-${LIBC} 99754569438Smrg exit ;; 99895903e71Smrg ppc64le:Linux:*:*) 99995903e71Smrg echo powerpc64le-unknown-linux-${LIBC} 100095903e71Smrg exit ;; 100195903e71Smrg ppcle:Linux:*:*) 100295903e71Smrg echo powerpcle-unknown-linux-${LIBC} 100395903e71Smrg exit ;; 1004692f60a7Smrg s390:Linux:*:* | s390x:Linux:*:*) 100595903e71Smrg echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 100654569438Smrg exit ;; 1007692f60a7Smrg sh64*:Linux:*:*) 1008eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 100954569438Smrg exit ;; 1010692f60a7Smrg sh*:Linux:*:*) 1011eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 101254569438Smrg exit ;; 1013692f60a7Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 1014eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 101554569438Smrg exit ;; 10163f6d0e1dSmrg tile*:Linux:*:*) 1017eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 10183f6d0e1dSmrg exit ;; 101954569438Smrg vax:Linux:*:*) 1020eaa3dbe0Smrg echo ${UNAME_MACHINE}-dec-linux-${LIBC} 102154569438Smrg exit ;; 1022692f60a7Smrg x86_64:Linux:*:*) 1023eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 102454569438Smrg exit ;; 102554569438Smrg xtensa*:Linux:*:*) 1026eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 102754569438Smrg exit ;; 1028692f60a7Smrg i*86:DYNIX/ptx:4*:*) 1029692f60a7Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1030692f60a7Smrg # earlier versions are messed up and put the nodename in both 1031692f60a7Smrg # sysname and nodename. 1032692f60a7Smrg echo i386-sequent-sysv4 103354569438Smrg exit ;; 1034692f60a7Smrg i*86:UNIX_SV:4.2MP:2.*) 10353f6d0e1dSmrg # Unixware is an offshoot of SVR4, but it has its own version 10363f6d0e1dSmrg # number series starting with 2... 10373f6d0e1dSmrg # I am not positive that other SVR4 systems won't match this, 1038692f60a7Smrg # I just have to hope. -- rms. 10393f6d0e1dSmrg # Use sysv4.2uw... so that sysv4* matches it. 1040692f60a7Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 104154569438Smrg exit ;; 1042692f60a7Smrg i*86:OS/2:*:*) 1043692f60a7Smrg # If we were able to find `uname', then EMX Unix compatibility 1044692f60a7Smrg # is probably installed. 1045692f60a7Smrg echo ${UNAME_MACHINE}-pc-os2-emx 104654569438Smrg exit ;; 1047692f60a7Smrg i*86:XTS-300:*:STOP) 1048692f60a7Smrg echo ${UNAME_MACHINE}-unknown-stop 104954569438Smrg exit ;; 1050692f60a7Smrg i*86:atheos:*:*) 1051692f60a7Smrg echo ${UNAME_MACHINE}-unknown-atheos 105254569438Smrg exit ;; 105354569438Smrg i*86:syllable:*:*) 105454569438Smrg echo ${UNAME_MACHINE}-pc-syllable 105554569438Smrg exit ;; 10563f6d0e1dSmrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1057692f60a7Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 105854569438Smrg exit ;; 1059692f60a7Smrg i*86:*DOS:*:*) 1060692f60a7Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 106154569438Smrg exit ;; 1062692f60a7Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1063692f60a7Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1064692f60a7Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1065692f60a7Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 1066692f60a7Smrg else 1067692f60a7Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1068692f60a7Smrg fi 106954569438Smrg exit ;; 107054569438Smrg i*86:*:5:[678]*) 10713f6d0e1dSmrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 1072692f60a7Smrg case `/bin/uname -X | grep "^Machine"` in 1073692f60a7Smrg *486*) UNAME_MACHINE=i486 ;; 1074692f60a7Smrg *Pentium) UNAME_MACHINE=i586 ;; 1075692f60a7Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1076692f60a7Smrg esac 1077692f60a7Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 107854569438Smrg exit ;; 1079692f60a7Smrg i*86:*:3.2:*) 1080692f60a7Smrg if test -f /usr/options/cb.name; then 1081692f60a7Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1082692f60a7Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 1083692f60a7Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 1084692f60a7Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1085692f60a7Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1086692f60a7Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 1087692f60a7Smrg && UNAME_MACHINE=i586 1088692f60a7Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1089692f60a7Smrg && UNAME_MACHINE=i686 1090692f60a7Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1091692f60a7Smrg && UNAME_MACHINE=i686 1092692f60a7Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 1093692f60a7Smrg else 1094692f60a7Smrg echo ${UNAME_MACHINE}-pc-sysv32 1095692f60a7Smrg fi 109654569438Smrg exit ;; 1097692f60a7Smrg pc:*:*:*) 1098692f60a7Smrg # Left here for compatibility: 10993f6d0e1dSmrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 11003f6d0e1dSmrg # the processor, so we play safe by assuming i586. 11013f6d0e1dSmrg # Note: whatever this is, it MUST be the same as what config.sub 11023f6d0e1dSmrg # prints for the "djgpp" host, or else GDB configury will decide that 11033f6d0e1dSmrg # this is a cross-build. 11043f6d0e1dSmrg echo i586-pc-msdosdjgpp 11053f6d0e1dSmrg exit ;; 1106692f60a7Smrg Intel:Mach:3*:*) 1107692f60a7Smrg echo i386-pc-mach3 110854569438Smrg exit ;; 1109692f60a7Smrg paragon:*:*:*) 1110692f60a7Smrg echo i860-intel-osf1 111154569438Smrg exit ;; 1112692f60a7Smrg i860:*:4.*:*) # i860-SVR4 1113692f60a7Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1114692f60a7Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1115692f60a7Smrg else # Add other i860-SVR4 vendors below as they are discovered. 1116692f60a7Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1117692f60a7Smrg fi 111854569438Smrg exit ;; 1119692f60a7Smrg mini*:CTIX:SYS*5:*) 1120692f60a7Smrg # "miniframe" 1121692f60a7Smrg echo m68010-convergent-sysv 112254569438Smrg exit ;; 1123692f60a7Smrg mc68k:UNIX:SYSTEM5:3.51m) 1124692f60a7Smrg echo m68k-convergent-sysv 112554569438Smrg exit ;; 1126692f60a7Smrg M680?0:D-NIX:5.3:*) 1127692f60a7Smrg echo m68k-diab-dnix 112854569438Smrg exit ;; 112954569438Smrg M68*:*:R3V[5678]*:*) 113054569438Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 113154569438Smrg 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) 1132692f60a7Smrg OS_REL='' 1133692f60a7Smrg test -r /etc/.relid \ 1134692f60a7Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1135692f60a7Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 113654569438Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1137692f60a7Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 113854569438Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1139692f60a7Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 11403f6d0e1dSmrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 11413f6d0e1dSmrg && { echo i486-ncr-sysv4; exit; } ;; 11423f6d0e1dSmrg NCR*:*:4.2:* | MPRAS*:*:4.2:*) 11433f6d0e1dSmrg OS_REL='.3' 11443f6d0e1dSmrg test -r /etc/.relid \ 11453f6d0e1dSmrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 11463f6d0e1dSmrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 11473f6d0e1dSmrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 11483f6d0e1dSmrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 11493f6d0e1dSmrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 11503f6d0e1dSmrg /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 11513f6d0e1dSmrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1152692f60a7Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1153692f60a7Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 115454569438Smrg exit ;; 1155692f60a7Smrg mc68030:UNIX_System_V:4.*:*) 1156692f60a7Smrg echo m68k-atari-sysv4 115754569438Smrg exit ;; 1158692f60a7Smrg TSUNAMI:LynxOS:2.*:*) 1159692f60a7Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 116054569438Smrg exit ;; 1161692f60a7Smrg rs6000:LynxOS:2.*:*) 1162692f60a7Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 116354569438Smrg exit ;; 11643f6d0e1dSmrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1165692f60a7Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 116654569438Smrg exit ;; 1167692f60a7Smrg SM[BE]S:UNIX_SV:*:*) 1168692f60a7Smrg echo mips-dde-sysv${UNAME_RELEASE} 116954569438Smrg exit ;; 1170692f60a7Smrg RM*:ReliantUNIX-*:*:*) 1171692f60a7Smrg echo mips-sni-sysv4 117254569438Smrg exit ;; 1173692f60a7Smrg RM*:SINIX-*:*:*) 1174692f60a7Smrg echo mips-sni-sysv4 117554569438Smrg exit ;; 1176692f60a7Smrg *:SINIX-*:*:*) 1177692f60a7Smrg if uname -p 2>/dev/null >/dev/null ; then 1178692f60a7Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 1179692f60a7Smrg echo ${UNAME_MACHINE}-sni-sysv4 1180692f60a7Smrg else 1181692f60a7Smrg echo ns32k-sni-sysv 1182692f60a7Smrg fi 118354569438Smrg exit ;; 11843f6d0e1dSmrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 11853f6d0e1dSmrg # says <Richard.M.Bartel@ccMail.Census.GOV> 11863f6d0e1dSmrg echo i586-unisys-sysv4 11873f6d0e1dSmrg exit ;; 1188692f60a7Smrg *:UNIX_System_V:4*:FTX*) 1189692f60a7Smrg # From Gerald Hewes <hewes@openmarket.com>. 1190692f60a7Smrg # How about differentiating between stratus architectures? -djm 1191692f60a7Smrg echo hppa1.1-stratus-sysv4 119254569438Smrg exit ;; 1193692f60a7Smrg *:*:*:FTX*) 1194692f60a7Smrg # From seanf@swdc.stratus.com. 1195692f60a7Smrg echo i860-stratus-sysv4 119654569438Smrg exit ;; 119754569438Smrg i*86:VOS:*:*) 119854569438Smrg # From Paul.Green@stratus.com. 119954569438Smrg echo ${UNAME_MACHINE}-stratus-vos 120054569438Smrg exit ;; 1201692f60a7Smrg *:VOS:*:*) 1202692f60a7Smrg # From Paul.Green@stratus.com. 1203692f60a7Smrg echo hppa1.1-stratus-vos 120454569438Smrg exit ;; 1205692f60a7Smrg mc68*:A/UX:*:*) 1206692f60a7Smrg echo m68k-apple-aux${UNAME_RELEASE} 120754569438Smrg exit ;; 1208692f60a7Smrg news*:NEWS-OS:6*:*) 1209692f60a7Smrg echo mips-sony-newsos6 121054569438Smrg exit ;; 1211692f60a7Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1212692f60a7Smrg if [ -d /usr/nec ]; then 12133f6d0e1dSmrg echo mips-nec-sysv${UNAME_RELEASE} 1214692f60a7Smrg else 12153f6d0e1dSmrg echo mips-unknown-sysv${UNAME_RELEASE} 1216692f60a7Smrg fi 12173f6d0e1dSmrg exit ;; 1218692f60a7Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1219692f60a7Smrg echo powerpc-be-beos 122054569438Smrg exit ;; 1221692f60a7Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1222692f60a7Smrg echo powerpc-apple-beos 122354569438Smrg exit ;; 1224692f60a7Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1225692f60a7Smrg echo i586-pc-beos 122654569438Smrg exit ;; 12273f6d0e1dSmrg BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 12283f6d0e1dSmrg echo i586-pc-haiku 12293f6d0e1dSmrg exit ;; 1230eaa3dbe0Smrg x86_64:Haiku:*:*) 1231eaa3dbe0Smrg echo x86_64-unknown-haiku 1232eaa3dbe0Smrg exit ;; 1233692f60a7Smrg SX-4:SUPER-UX:*:*) 1234692f60a7Smrg echo sx4-nec-superux${UNAME_RELEASE} 123554569438Smrg exit ;; 1236692f60a7Smrg SX-5:SUPER-UX:*:*) 1237692f60a7Smrg echo sx5-nec-superux${UNAME_RELEASE} 123854569438Smrg exit ;; 1239692f60a7Smrg SX-6:SUPER-UX:*:*) 1240692f60a7Smrg echo sx6-nec-superux${UNAME_RELEASE} 124154569438Smrg exit ;; 124254569438Smrg SX-7:SUPER-UX:*:*) 124354569438Smrg echo sx7-nec-superux${UNAME_RELEASE} 124454569438Smrg exit ;; 124554569438Smrg SX-8:SUPER-UX:*:*) 124654569438Smrg echo sx8-nec-superux${UNAME_RELEASE} 124754569438Smrg exit ;; 124854569438Smrg SX-8R:SUPER-UX:*:*) 124954569438Smrg echo sx8r-nec-superux${UNAME_RELEASE} 125054569438Smrg exit ;; 1251692f60a7Smrg Power*:Rhapsody:*:*) 1252692f60a7Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 125354569438Smrg exit ;; 1254692f60a7Smrg *:Rhapsody:*:*) 1255692f60a7Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 125654569438Smrg exit ;; 1257692f60a7Smrg *:Darwin:*:*) 125854569438Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 125995903e71Smrg eval $set_cc_for_build 126095903e71Smrg if test "$UNAME_PROCESSOR" = unknown ; then 126195903e71Smrg UNAME_PROCESSOR=powerpc 126295903e71Smrg fi 126395903e71Smrg if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then 126495903e71Smrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 126595903e71Smrg if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 126695903e71Smrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 126795903e71Smrg grep IS_64BIT_ARCH >/dev/null 126895903e71Smrg then 126995903e71Smrg case $UNAME_PROCESSOR in 127095903e71Smrg i386) UNAME_PROCESSOR=x86_64 ;; 127195903e71Smrg powerpc) UNAME_PROCESSOR=powerpc64 ;; 127295903e71Smrg esac 127395903e71Smrg fi 127495903e71Smrg fi 127595903e71Smrg elif test "$UNAME_PROCESSOR" = i386 ; then 127695903e71Smrg # Avoid executing cc on OS X 10.9, as it ships with a stub 127795903e71Smrg # that puts up a graphical alert prompting to install 127895903e71Smrg # developer tools. Any system running Mac OS X 10.7 or 127995903e71Smrg # later (Darwin 11 and later) is required to have a 64-bit 128095903e71Smrg # processor. This is not true of the ARM version of Darwin 128195903e71Smrg # that Apple uses in portable devices. 128295903e71Smrg UNAME_PROCESSOR=x86_64 128395903e71Smrg fi 1284692f60a7Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 128554569438Smrg exit ;; 1286692f60a7Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 1287692f60a7Smrg UNAME_PROCESSOR=`uname -p` 1288692f60a7Smrg if test "$UNAME_PROCESSOR" = "x86"; then 1289692f60a7Smrg UNAME_PROCESSOR=i386 1290692f60a7Smrg UNAME_MACHINE=pc 1291692f60a7Smrg fi 1292692f60a7Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 129354569438Smrg exit ;; 1294692f60a7Smrg *:QNX:*:4*) 1295692f60a7Smrg echo i386-pc-qnx 129654569438Smrg exit ;; 12973f6d0e1dSmrg NEO-?:NONSTOP_KERNEL:*:*) 12983f6d0e1dSmrg echo neo-tandem-nsk${UNAME_RELEASE} 12993f6d0e1dSmrg exit ;; 1300eaa3dbe0Smrg NSE-*:NONSTOP_KERNEL:*:*) 130154569438Smrg echo nse-tandem-nsk${UNAME_RELEASE} 130254569438Smrg exit ;; 130354569438Smrg NSR-?:NONSTOP_KERNEL:*:*) 1304692f60a7Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 130554569438Smrg exit ;; 1306692f60a7Smrg *:NonStop-UX:*:*) 1307692f60a7Smrg echo mips-compaq-nonstopux 130854569438Smrg exit ;; 1309692f60a7Smrg BS2000:POSIX*:*:*) 1310692f60a7Smrg echo bs2000-siemens-sysv 131154569438Smrg exit ;; 1312692f60a7Smrg DS/*:UNIX_System_V:*:*) 1313692f60a7Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 131454569438Smrg exit ;; 1315692f60a7Smrg *:Plan9:*:*) 1316692f60a7Smrg # "uname -m" is not consistent, so use $cputype instead. 386 1317692f60a7Smrg # is converted to i386 for consistency with other x86 1318692f60a7Smrg # operating systems. 1319692f60a7Smrg if test "$cputype" = "386"; then 1320692f60a7Smrg UNAME_MACHINE=i386 1321692f60a7Smrg else 1322692f60a7Smrg UNAME_MACHINE="$cputype" 1323692f60a7Smrg fi 1324692f60a7Smrg echo ${UNAME_MACHINE}-unknown-plan9 132554569438Smrg exit ;; 1326692f60a7Smrg *:TOPS-10:*:*) 1327692f60a7Smrg echo pdp10-unknown-tops10 132854569438Smrg exit ;; 1329692f60a7Smrg *:TENEX:*:*) 1330692f60a7Smrg echo pdp10-unknown-tenex 133154569438Smrg exit ;; 1332692f60a7Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1333692f60a7Smrg echo pdp10-dec-tops20 133454569438Smrg exit ;; 1335692f60a7Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1336692f60a7Smrg echo pdp10-xkl-tops20 133754569438Smrg exit ;; 1338692f60a7Smrg *:TOPS-20:*:*) 1339692f60a7Smrg echo pdp10-unknown-tops20 134054569438Smrg exit ;; 1341692f60a7Smrg *:ITS:*:*) 1342692f60a7Smrg echo pdp10-unknown-its 134354569438Smrg exit ;; 1344692f60a7Smrg SEI:*:*:SEIUX) 13453f6d0e1dSmrg echo mips-sei-seiux${UNAME_RELEASE} 134654569438Smrg exit ;; 134754569438Smrg *:DragonFly:*:*) 134854569438Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 134954569438Smrg exit ;; 135054569438Smrg *:*VMS:*:*) 13513f6d0e1dSmrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 135254569438Smrg case "${UNAME_MACHINE}" in 135354569438Smrg A*) echo alpha-dec-vms ; exit ;; 135454569438Smrg I*) echo ia64-dec-vms ; exit ;; 135554569438Smrg V*) echo vax-dec-vms ; exit ;; 135654569438Smrg esac ;; 135754569438Smrg *:XENIX:*:SysV) 135854569438Smrg echo i386-pc-xenix 135954569438Smrg exit ;; 136054569438Smrg i*86:skyos:*:*) 136154569438Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 136254569438Smrg exit ;; 136354569438Smrg i*86:rdos:*:*) 136454569438Smrg echo ${UNAME_MACHINE}-pc-rdos 136554569438Smrg exit ;; 13663f6d0e1dSmrg i*86:AROS:*:*) 13673f6d0e1dSmrg echo ${UNAME_MACHINE}-pc-aros 13683f6d0e1dSmrg exit ;; 1369eaa3dbe0Smrg x86_64:VMkernel:*:*) 1370eaa3dbe0Smrg echo ${UNAME_MACHINE}-unknown-esx 1371eaa3dbe0Smrg exit ;; 1372692f60a7Smrgesac 1373692f60a7Smrg 1374692f60a7Smrgcat >&2 <<EOF 1375692f60a7Smrg$0: unable to guess system type 1376692f60a7Smrg 1377692f60a7SmrgThis script, last modified $timestamp, has failed to recognize 1378692f60a7Smrgthe operating system you are using. It is advised that you 1379692f60a7Smrgdownload the most up to date version of the config scripts from 1380692f60a7Smrg 138154569438Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 138254569438Smrgand 138354569438Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1384692f60a7Smrg 1385692f60a7SmrgIf the version you run ($0) is already up to date, please 1386692f60a7Smrgsend the following data and any information you think might be 1387692f60a7Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 1388692f60a7Smrginformation to handle your system. 1389692f60a7Smrg 1390692f60a7Smrgconfig.guess timestamp = $timestamp 1391692f60a7Smrg 1392692f60a7Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 1393692f60a7Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 1394692f60a7Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 1395692f60a7Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 1396692f60a7Smrg 1397692f60a7Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1398692f60a7Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1399692f60a7Smrg 1400692f60a7Smrghostinfo = `(hostinfo) 2>/dev/null` 1401692f60a7Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 1402692f60a7Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1403692f60a7Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 1404692f60a7Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1405692f60a7Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1406692f60a7Smrg 1407692f60a7SmrgUNAME_MACHINE = ${UNAME_MACHINE} 1408692f60a7SmrgUNAME_RELEASE = ${UNAME_RELEASE} 1409692f60a7SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 1410692f60a7SmrgUNAME_VERSION = ${UNAME_VERSION} 1411692f60a7SmrgEOF 1412692f60a7Smrg 1413692f60a7Smrgexit 1 1414692f60a7Smrg 1415692f60a7Smrg# Local variables: 1416692f60a7Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 1417692f60a7Smrg# time-stamp-start: "timestamp='" 1418692f60a7Smrg# time-stamp-format: "%:y-%02m-%02d" 1419692f60a7Smrg# time-stamp-end: "'" 1420692f60a7Smrg# End: 1421