1275970Scy#! /bin/sh 2275970Scy# Attempt to guess a canonical system name. 3358659Scy# Copyright 1992-2014 Free Software Foundation, Inc. 4275970Scy 5358659Scytimestamp='2014-11-04' 6275970Scy 7275970Scy# This file is free software; you can redistribute it and/or modify it 8275970Scy# under the terms of the GNU General Public License as published by 9316068Sdelphij# the Free Software Foundation; either version 3 of the License, or 10275970Scy# (at your option) any later version. 11275970Scy# 12275970Scy# This program is distributed in the hope that it will be useful, but 13275970Scy# WITHOUT ANY WARRANTY; without even the implied warranty of 14275970Scy# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15275970Scy# General Public License for more details. 16275970Scy# 17275970Scy# You should have received a copy of the GNU General Public License 18316068Sdelphij# along with this program; if not, see <http://www.gnu.org/licenses/>. 19275970Scy# 20275970Scy# As a special exception to the GNU General Public License, if you 21275970Scy# distribute this file as part of a program that contains a 22275970Scy# configuration script generated by Autoconf, you may include it under 23316068Sdelphij# the same distribution terms that you use for the rest of that 24316068Sdelphij# program. This Exception is an additional permission under section 7 25316068Sdelphij# of the GNU General Public License, version 3 ("GPLv3"). 26275970Scy# 27316068Sdelphij# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. 28275970Scy# 29275970Scy# You can get the latest version of this script from: 30275970Scy# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 31316068Sdelphij# 32316068Sdelphij# Please send patches to <config-patches@gnu.org>. 33275970Scy 34316068Sdelphij 35275970Scyme=`echo "$0" | sed -e 's,.*/,,'` 36275970Scy 37275970Scyusage="\ 38275970ScyUsage: $0 [OPTION] 39275970Scy 40275970ScyOutput the configuration name of the system \`$me' is run on. 41275970Scy 42275970ScyOperation modes: 43275970Scy -h, --help print this help, then exit 44275970Scy -t, --time-stamp print date of last modification, then exit 45275970Scy -v, --version print version number, then exit 46275970Scy 47275970ScyReport bugs and patches to <config-patches@gnu.org>." 48275970Scy 49275970Scyversion="\ 50275970ScyGNU config.guess ($timestamp) 51275970Scy 52275970ScyOriginally written by Per Bothner. 53358659ScyCopyright 1992-2014 Free Software Foundation, Inc. 54275970Scy 55275970ScyThis is free software; see the source for copying conditions. There is NO 56275970Scywarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 57275970Scy 58275970Scyhelp=" 59275970ScyTry \`$me --help' for more information." 60275970Scy 61275970Scy# Parse command line 62275970Scywhile test $# -gt 0 ; do 63275970Scy case $1 in 64275970Scy --time-stamp | --time* | -t ) 65275970Scy echo "$timestamp" ; exit ;; 66275970Scy --version | -v ) 67275970Scy echo "$version" ; exit ;; 68275970Scy --help | --h* | -h ) 69275970Scy echo "$usage"; exit ;; 70275970Scy -- ) # Stop option processing 71275970Scy shift; break ;; 72275970Scy - ) # Use stdin as input. 73275970Scy break ;; 74275970Scy -* ) 75275970Scy echo "$me: invalid option $1$help" >&2 76275970Scy exit 1 ;; 77275970Scy * ) 78275970Scy break ;; 79275970Scy esac 80275970Scydone 81275970Scy 82275970Scyif test $# != 0; then 83275970Scy echo "$me: too many arguments$help" >&2 84275970Scy exit 1 85275970Scyfi 86275970Scy 87275970Scytrap 'exit 1' 1 2 15 88275970Scy 89275970Scy# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 90275970Scy# compiler to aid in system detection is discouraged as it requires 91275970Scy# temporary files to be created and, as you can see below, it is a 92275970Scy# headache to deal with in a portable fashion. 93275970Scy 94275970Scy# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 95275970Scy# use `HOST_CC' if defined, but it is deprecated. 96275970Scy 97275970Scy# Portable tmp directory creation inspired by the Autoconf team. 98275970Scy 99275970Scyset_cc_for_build=' 100275970Scytrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 101275970Scytrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 102275970Scy: ${TMPDIR=/tmp} ; 103275970Scy { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 104275970Scy { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 105275970Scy { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 106275970Scy { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 107275970Scydummy=$tmp/dummy ; 108275970Scytmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 109275970Scycase $CC_FOR_BUILD,$HOST_CC,$CC in 110275970Scy ,,) echo "int x;" > $dummy.c ; 111275970Scy for c in cc gcc c89 c99 ; do 112275970Scy if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 113275970Scy CC_FOR_BUILD="$c"; break ; 114275970Scy fi ; 115275970Scy done ; 116275970Scy if test x"$CC_FOR_BUILD" = x ; then 117275970Scy CC_FOR_BUILD=no_compiler_found ; 118275970Scy fi 119275970Scy ;; 120275970Scy ,,*) CC_FOR_BUILD=$CC ;; 121275970Scy ,*,*) CC_FOR_BUILD=$HOST_CC ;; 122275970Scyesac ; set_cc_for_build= ;' 123275970Scy 124275970Scy# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 125275970Scy# (ghazi@noc.rutgers.edu 1994-08-24) 126275970Scyif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 127275970Scy PATH=$PATH:/.attbin ; export PATH 128275970Scyfi 129275970Scy 130275970ScyUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 131275970ScyUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 132275970ScyUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 133275970ScyUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 134275970Scy 135316068Sdelphijcase "${UNAME_SYSTEM}" in 136316068SdelphijLinux|GNU|GNU/*) 137316068Sdelphij # If the system lacks a compiler, then just pick glibc. 138316068Sdelphij # We could probably try harder. 139316068Sdelphij LIBC=gnu 140316068Sdelphij 141316068Sdelphij eval $set_cc_for_build 142316068Sdelphij cat <<-EOF > $dummy.c 143316068Sdelphij #include <features.h> 144316068Sdelphij #if defined(__UCLIBC__) 145316068Sdelphij LIBC=uclibc 146316068Sdelphij #elif defined(__dietlibc__) 147316068Sdelphij LIBC=dietlibc 148316068Sdelphij #else 149316068Sdelphij LIBC=gnu 150316068Sdelphij #endif 151316068Sdelphij EOF 152316068Sdelphij eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` 153316068Sdelphij ;; 154316068Sdelphijesac 155316068Sdelphij 156275970Scy# Note: order is significant - the case branches are not exclusive. 157275970Scy 158275970Scycase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 159275970Scy *:NetBSD:*:*) 160275970Scy # NetBSD (nbsd) targets should (where applicable) match one or 161316068Sdelphij # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 162275970Scy # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 163275970Scy # switched to ELF, *-*-netbsd* would select the old 164275970Scy # object file format. This provides both forward 165275970Scy # compatibility and a consistent mechanism for selecting the 166275970Scy # object file format. 167275970Scy # 168275970Scy # Note: NetBSD doesn't particularly care about the vendor 169275970Scy # portion of the name. We always set it to "unknown". 170275970Scy sysctl="sysctl -n hw.machine_arch" 171358659Scy UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 172358659Scy /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 173275970Scy case "${UNAME_MACHINE_ARCH}" in 174275970Scy armeb) machine=armeb-unknown ;; 175275970Scy arm*) machine=arm-unknown ;; 176275970Scy sh3el) machine=shl-unknown ;; 177275970Scy sh3eb) machine=sh-unknown ;; 178275970Scy sh5el) machine=sh5le-unknown ;; 179275970Scy *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 180275970Scy esac 181275970Scy # The Operating System including object format, if it has switched 182275970Scy # to ELF recently, or will in the future. 183275970Scy case "${UNAME_MACHINE_ARCH}" in 184358659Scy arm*|i386|m68k|ns32k|sh3*|sparc|vax) 185275970Scy eval $set_cc_for_build 186275970Scy if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 187275970Scy | grep -q __ELF__ 188275970Scy then 189275970Scy # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 190275970Scy # Return netbsd for either. FIX? 191275970Scy os=netbsd 192275970Scy else 193275970Scy os=netbsdelf 194275970Scy fi 195275970Scy ;; 196275970Scy *) 197275970Scy os=netbsd 198275970Scy ;; 199275970Scy esac 200275970Scy # The OS release 201275970Scy # Debian GNU/NetBSD machines have a different userland, and 202275970Scy # thus, need a distinct triplet. However, they do not need 203275970Scy # kernel version information, so it can be replaced with a 204275970Scy # suitable tag, in the style of linux-gnu. 205275970Scy case "${UNAME_VERSION}" in 206275970Scy Debian*) 207275970Scy release='-gnu' 208275970Scy ;; 209275970Scy *) 210275970Scy release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 211275970Scy ;; 212275970Scy esac 213275970Scy # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 214275970Scy # contains redundant information, the shorter form: 215275970Scy # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 216358659Scy echo "${machine}-${os}${release}" 217275970Scy exit ;; 218316068Sdelphij *:Bitrig:*:*) 219316068Sdelphij UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 220316068Sdelphij echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} 221316068Sdelphij exit ;; 222275970Scy *:OpenBSD:*:*) 223275970Scy UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 224275970Scy echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 225275970Scy exit ;; 226275970Scy *:ekkoBSD:*:*) 227275970Scy echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 228275970Scy exit ;; 229275970Scy *:SolidBSD:*:*) 230275970Scy echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 231275970Scy exit ;; 232275970Scy macppc:MirBSD:*:*) 233275970Scy echo powerpc-unknown-mirbsd${UNAME_RELEASE} 234275970Scy exit ;; 235275970Scy *:MirBSD:*:*) 236275970Scy echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 237275970Scy exit ;; 238275970Scy alpha:OSF1:*:*) 239275970Scy case $UNAME_RELEASE in 240275970Scy *4.0) 241275970Scy UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 242275970Scy ;; 243275970Scy *5.*) 244275970Scy UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 245275970Scy ;; 246275970Scy esac 247275970Scy # According to Compaq, /usr/sbin/psrinfo has been available on 248275970Scy # OSF/1 and Tru64 systems produced since 1995. I hope that 249275970Scy # covers most systems running today. This code pipes the CPU 250275970Scy # types through head -n 1, so we only detect the type of CPU 0. 251275970Scy ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 252275970Scy case "$ALPHA_CPU_TYPE" in 253275970Scy "EV4 (21064)") 254275970Scy UNAME_MACHINE="alpha" ;; 255275970Scy "EV4.5 (21064)") 256275970Scy UNAME_MACHINE="alpha" ;; 257275970Scy "LCA4 (21066/21068)") 258275970Scy UNAME_MACHINE="alpha" ;; 259275970Scy "EV5 (21164)") 260275970Scy UNAME_MACHINE="alphaev5" ;; 261275970Scy "EV5.6 (21164A)") 262275970Scy UNAME_MACHINE="alphaev56" ;; 263275970Scy "EV5.6 (21164PC)") 264275970Scy UNAME_MACHINE="alphapca56" ;; 265275970Scy "EV5.7 (21164PC)") 266275970Scy UNAME_MACHINE="alphapca57" ;; 267275970Scy "EV6 (21264)") 268275970Scy UNAME_MACHINE="alphaev6" ;; 269275970Scy "EV6.7 (21264A)") 270275970Scy UNAME_MACHINE="alphaev67" ;; 271275970Scy "EV6.8CB (21264C)") 272275970Scy UNAME_MACHINE="alphaev68" ;; 273275970Scy "EV6.8AL (21264B)") 274275970Scy UNAME_MACHINE="alphaev68" ;; 275275970Scy "EV6.8CX (21264D)") 276275970Scy UNAME_MACHINE="alphaev68" ;; 277275970Scy "EV6.9A (21264/EV69A)") 278275970Scy UNAME_MACHINE="alphaev69" ;; 279275970Scy "EV7 (21364)") 280275970Scy UNAME_MACHINE="alphaev7" ;; 281275970Scy "EV7.9 (21364A)") 282275970Scy UNAME_MACHINE="alphaev79" ;; 283275970Scy esac 284275970Scy # A Pn.n version is a patched version. 285275970Scy # A Vn.n version is a released version. 286275970Scy # A Tn.n version is a released field test version. 287275970Scy # A Xn.n version is an unreleased experimental baselevel. 288275970Scy # 1.2 uses "1.2" for uname -r. 289275970Scy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 290275970Scy # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 291275970Scy exitcode=$? 292275970Scy trap '' 0 293275970Scy exit $exitcode ;; 294275970Scy Alpha\ *:Windows_NT*:*) 295275970Scy # How do we know it's Interix rather than the generic POSIX subsystem? 296275970Scy # Should we change UNAME_MACHINE based on the output of uname instead 297275970Scy # of the specific Alpha model? 298275970Scy echo alpha-pc-interix 299275970Scy exit ;; 300275970Scy 21064:Windows_NT:50:3) 301275970Scy echo alpha-dec-winnt3.5 302275970Scy exit ;; 303275970Scy Amiga*:UNIX_System_V:4.0:*) 304275970Scy echo m68k-unknown-sysv4 305275970Scy exit ;; 306275970Scy *:[Aa]miga[Oo][Ss]:*:*) 307275970Scy echo ${UNAME_MACHINE}-unknown-amigaos 308275970Scy exit ;; 309275970Scy *:[Mm]orph[Oo][Ss]:*:*) 310275970Scy echo ${UNAME_MACHINE}-unknown-morphos 311275970Scy exit ;; 312275970Scy *:OS/390:*:*) 313275970Scy echo i370-ibm-openedition 314275970Scy exit ;; 315275970Scy *:z/VM:*:*) 316275970Scy echo s390-ibm-zvmoe 317275970Scy exit ;; 318275970Scy *:OS400:*:*) 319275970Scy echo powerpc-ibm-os400 320275970Scy exit ;; 321275970Scy arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 322275970Scy echo arm-acorn-riscix${UNAME_RELEASE} 323275970Scy exit ;; 324316068Sdelphij arm*:riscos:*:*|arm*:RISCOS:*:*) 325275970Scy echo arm-unknown-riscos 326275970Scy exit ;; 327275970Scy SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 328275970Scy echo hppa1.1-hitachi-hiuxmpp 329275970Scy exit ;; 330275970Scy Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 331275970Scy # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 332275970Scy if test "`(/bin/universe) 2>/dev/null`" = att ; then 333275970Scy echo pyramid-pyramid-sysv3 334275970Scy else 335275970Scy echo pyramid-pyramid-bsd 336275970Scy fi 337275970Scy exit ;; 338275970Scy NILE*:*:*:dcosx) 339275970Scy echo pyramid-pyramid-svr4 340275970Scy exit ;; 341275970Scy DRS?6000:unix:4.0:6*) 342275970Scy echo sparc-icl-nx6 343275970Scy exit ;; 344275970Scy DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 345275970Scy case `/usr/bin/uname -p` in 346275970Scy sparc) echo sparc-icl-nx7; exit ;; 347275970Scy esac ;; 348275970Scy s390x:SunOS:*:*) 349275970Scy echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 350275970Scy exit ;; 351275970Scy sun4H:SunOS:5.*:*) 352275970Scy echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 353275970Scy exit ;; 354275970Scy sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 355275970Scy echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 356275970Scy exit ;; 357275970Scy i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 358275970Scy echo i386-pc-auroraux${UNAME_RELEASE} 359275970Scy exit ;; 360275970Scy i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 361275970Scy eval $set_cc_for_build 362275970Scy SUN_ARCH="i386" 363275970Scy # If there is a compiler, see if it is configured for 64-bit objects. 364275970Scy # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 365275970Scy # This test works for both compilers. 366275970Scy if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 367275970Scy if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 368275970Scy (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 369275970Scy grep IS_64BIT_ARCH >/dev/null 370275970Scy then 371275970Scy SUN_ARCH="x86_64" 372275970Scy fi 373275970Scy fi 374275970Scy echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 375275970Scy exit ;; 376275970Scy sun4*:SunOS:6*:*) 377275970Scy # According to config.sub, this is the proper way to canonicalize 378275970Scy # SunOS6. Hard to guess exactly what SunOS6 will be like, but 379275970Scy # it's likely to be more like Solaris than SunOS4. 380275970Scy echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 381275970Scy exit ;; 382275970Scy sun4*:SunOS:*:*) 383275970Scy case "`/usr/bin/arch -k`" in 384275970Scy Series*|S4*) 385275970Scy UNAME_RELEASE=`uname -v` 386275970Scy ;; 387275970Scy esac 388275970Scy # Japanese Language versions have a version number like `4.1.3-JL'. 389275970Scy echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 390275970Scy exit ;; 391275970Scy sun3*:SunOS:*:*) 392275970Scy echo m68k-sun-sunos${UNAME_RELEASE} 393275970Scy exit ;; 394275970Scy sun*:*:4.2BSD:*) 395275970Scy UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 396275970Scy test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 397275970Scy case "`/bin/arch`" in 398275970Scy sun3) 399275970Scy echo m68k-sun-sunos${UNAME_RELEASE} 400275970Scy ;; 401275970Scy sun4) 402275970Scy echo sparc-sun-sunos${UNAME_RELEASE} 403275970Scy ;; 404275970Scy esac 405275970Scy exit ;; 406275970Scy aushp:SunOS:*:*) 407275970Scy echo sparc-auspex-sunos${UNAME_RELEASE} 408275970Scy exit ;; 409275970Scy # The situation for MiNT is a little confusing. The machine name 410275970Scy # can be virtually everything (everything which is not 411275970Scy # "atarist" or "atariste" at least should have a processor 412275970Scy # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 413275970Scy # to the lowercase version "mint" (or "freemint"). Finally 414275970Scy # the system name "TOS" denotes a system which is actually not 415275970Scy # MiNT. But MiNT is downward compatible to TOS, so this should 416275970Scy # be no problem. 417275970Scy atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 418275970Scy echo m68k-atari-mint${UNAME_RELEASE} 419275970Scy exit ;; 420275970Scy atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 421275970Scy echo m68k-atari-mint${UNAME_RELEASE} 422275970Scy exit ;; 423275970Scy *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 424275970Scy echo m68k-atari-mint${UNAME_RELEASE} 425275970Scy exit ;; 426275970Scy milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 427275970Scy echo m68k-milan-mint${UNAME_RELEASE} 428275970Scy exit ;; 429275970Scy hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 430275970Scy echo m68k-hades-mint${UNAME_RELEASE} 431275970Scy exit ;; 432275970Scy *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 433275970Scy echo m68k-unknown-mint${UNAME_RELEASE} 434275970Scy exit ;; 435275970Scy m68k:machten:*:*) 436275970Scy echo m68k-apple-machten${UNAME_RELEASE} 437275970Scy exit ;; 438275970Scy powerpc:machten:*:*) 439275970Scy echo powerpc-apple-machten${UNAME_RELEASE} 440275970Scy exit ;; 441275970Scy RISC*:Mach:*:*) 442275970Scy echo mips-dec-mach_bsd4.3 443275970Scy exit ;; 444275970Scy RISC*:ULTRIX:*:*) 445275970Scy echo mips-dec-ultrix${UNAME_RELEASE} 446275970Scy exit ;; 447275970Scy VAX*:ULTRIX*:*:*) 448275970Scy echo vax-dec-ultrix${UNAME_RELEASE} 449275970Scy exit ;; 450275970Scy 2020:CLIX:*:* | 2430:CLIX:*:*) 451275970Scy echo clipper-intergraph-clix${UNAME_RELEASE} 452275970Scy exit ;; 453275970Scy mips:*:*:UMIPS | mips:*:*:RISCos) 454275970Scy eval $set_cc_for_build 455275970Scy sed 's/^ //' << EOF >$dummy.c 456275970Scy#ifdef __cplusplus 457275970Scy#include <stdio.h> /* for printf() prototype */ 458275970Scy int main (int argc, char *argv[]) { 459275970Scy#else 460275970Scy int main (argc, argv) int argc; char *argv[]; { 461275970Scy#endif 462275970Scy #if defined (host_mips) && defined (MIPSEB) 463275970Scy #if defined (SYSTYPE_SYSV) 464275970Scy printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 465275970Scy #endif 466275970Scy #if defined (SYSTYPE_SVR4) 467275970Scy printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 468275970Scy #endif 469275970Scy #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 470275970Scy printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 471275970Scy #endif 472275970Scy #endif 473275970Scy exit (-1); 474275970Scy } 475275970ScyEOF 476275970Scy $CC_FOR_BUILD -o $dummy $dummy.c && 477275970Scy dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 478275970Scy SYSTEM_NAME=`$dummy $dummyarg` && 479275970Scy { echo "$SYSTEM_NAME"; exit; } 480275970Scy echo mips-mips-riscos${UNAME_RELEASE} 481275970Scy exit ;; 482275970Scy Motorola:PowerMAX_OS:*:*) 483275970Scy echo powerpc-motorola-powermax 484275970Scy exit ;; 485275970Scy Motorola:*:4.3:PL8-*) 486275970Scy echo powerpc-harris-powermax 487275970Scy exit ;; 488275970Scy Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 489275970Scy echo powerpc-harris-powermax 490275970Scy exit ;; 491275970Scy Night_Hawk:Power_UNIX:*:*) 492275970Scy echo powerpc-harris-powerunix 493275970Scy exit ;; 494275970Scy m88k:CX/UX:7*:*) 495275970Scy echo m88k-harris-cxux7 496275970Scy exit ;; 497275970Scy m88k:*:4*:R4*) 498275970Scy echo m88k-motorola-sysv4 499275970Scy exit ;; 500275970Scy m88k:*:3*:R3*) 501275970Scy echo m88k-motorola-sysv3 502275970Scy exit ;; 503275970Scy AViiON:dgux:*:*) 504275970Scy # DG/UX returns AViiON for all architectures 505275970Scy UNAME_PROCESSOR=`/usr/bin/uname -p` 506275970Scy if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 507275970Scy then 508275970Scy if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 509275970Scy [ ${TARGET_BINARY_INTERFACE}x = x ] 510275970Scy then 511275970Scy echo m88k-dg-dgux${UNAME_RELEASE} 512275970Scy else 513275970Scy echo m88k-dg-dguxbcs${UNAME_RELEASE} 514275970Scy fi 515275970Scy else 516275970Scy echo i586-dg-dgux${UNAME_RELEASE} 517275970Scy fi 518275970Scy exit ;; 519275970Scy M88*:DolphinOS:*:*) # DolphinOS (SVR3) 520275970Scy echo m88k-dolphin-sysv3 521275970Scy exit ;; 522275970Scy M88*:*:R3*:*) 523275970Scy # Delta 88k system running SVR3 524275970Scy echo m88k-motorola-sysv3 525275970Scy exit ;; 526275970Scy XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 527275970Scy echo m88k-tektronix-sysv3 528275970Scy exit ;; 529275970Scy Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 530275970Scy echo m68k-tektronix-bsd 531275970Scy exit ;; 532275970Scy *:IRIX*:*:*) 533275970Scy echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 534275970Scy exit ;; 535275970Scy ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 536275970Scy echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 537275970Scy exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 538275970Scy i*86:AIX:*:*) 539275970Scy echo i386-ibm-aix 540275970Scy exit ;; 541275970Scy ia64:AIX:*:*) 542275970Scy if [ -x /usr/bin/oslevel ] ; then 543275970Scy IBM_REV=`/usr/bin/oslevel` 544275970Scy else 545275970Scy IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 546275970Scy fi 547275970Scy echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 548275970Scy exit ;; 549275970Scy *:AIX:2:3) 550275970Scy if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 551275970Scy eval $set_cc_for_build 552275970Scy sed 's/^ //' << EOF >$dummy.c 553275970Scy #include <sys/systemcfg.h> 554275970Scy 555275970Scy main() 556275970Scy { 557275970Scy if (!__power_pc()) 558275970Scy exit(1); 559275970Scy puts("powerpc-ibm-aix3.2.5"); 560275970Scy exit(0); 561275970Scy } 562275970ScyEOF 563275970Scy if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 564275970Scy then 565275970Scy echo "$SYSTEM_NAME" 566275970Scy else 567275970Scy echo rs6000-ibm-aix3.2.5 568275970Scy fi 569275970Scy elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 570275970Scy echo rs6000-ibm-aix3.2.4 571275970Scy else 572275970Scy echo rs6000-ibm-aix3.2 573275970Scy fi 574275970Scy exit ;; 575275970Scy *:AIX:*:[4567]) 576275970Scy IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 577275970Scy if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 578275970Scy IBM_ARCH=rs6000 579275970Scy else 580275970Scy IBM_ARCH=powerpc 581275970Scy fi 582316068Sdelphij if [ -x /usr/bin/lslpp ] ; then 583316068Sdelphij IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | 584316068Sdelphij awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` 585275970Scy else 586275970Scy IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 587275970Scy fi 588275970Scy echo ${IBM_ARCH}-ibm-aix${IBM_REV} 589275970Scy exit ;; 590275970Scy *:AIX:*:*) 591275970Scy echo rs6000-ibm-aix 592275970Scy exit ;; 593275970Scy ibmrt:4.4BSD:*|romp-ibm:BSD:*) 594275970Scy echo romp-ibm-bsd4.4 595275970Scy exit ;; 596275970Scy ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 597275970Scy echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 598275970Scy exit ;; # report: romp-ibm BSD 4.3 599275970Scy *:BOSX:*:*) 600275970Scy echo rs6000-bull-bosx 601275970Scy exit ;; 602275970Scy DPX/2?00:B.O.S.:*:*) 603275970Scy echo m68k-bull-sysv3 604275970Scy exit ;; 605275970Scy 9000/[34]??:4.3bsd:1.*:*) 606275970Scy echo m68k-hp-bsd 607275970Scy exit ;; 608275970Scy hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 609275970Scy echo m68k-hp-bsd4.4 610275970Scy exit ;; 611275970Scy 9000/[34678]??:HP-UX:*:*) 612275970Scy HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 613275970Scy case "${UNAME_MACHINE}" in 614275970Scy 9000/31? ) HP_ARCH=m68000 ;; 615275970Scy 9000/[34]?? ) HP_ARCH=m68k ;; 616275970Scy 9000/[678][0-9][0-9]) 617275970Scy if [ -x /usr/bin/getconf ]; then 618275970Scy sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 619275970Scy sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 620275970Scy case "${sc_cpu_version}" in 621275970Scy 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 622275970Scy 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 623275970Scy 532) # CPU_PA_RISC2_0 624275970Scy case "${sc_kernel_bits}" in 625275970Scy 32) HP_ARCH="hppa2.0n" ;; 626275970Scy 64) HP_ARCH="hppa2.0w" ;; 627275970Scy '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 628275970Scy esac ;; 629275970Scy esac 630275970Scy fi 631275970Scy if [ "${HP_ARCH}" = "" ]; then 632275970Scy eval $set_cc_for_build 633275970Scy sed 's/^ //' << EOF >$dummy.c 634275970Scy 635275970Scy #define _HPUX_SOURCE 636275970Scy #include <stdlib.h> 637275970Scy #include <unistd.h> 638275970Scy 639275970Scy int main () 640275970Scy { 641275970Scy #if defined(_SC_KERNEL_BITS) 642275970Scy long bits = sysconf(_SC_KERNEL_BITS); 643275970Scy #endif 644275970Scy long cpu = sysconf (_SC_CPU_VERSION); 645275970Scy 646275970Scy switch (cpu) 647275970Scy { 648275970Scy case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 649275970Scy case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 650275970Scy case CPU_PA_RISC2_0: 651275970Scy #if defined(_SC_KERNEL_BITS) 652275970Scy switch (bits) 653275970Scy { 654275970Scy case 64: puts ("hppa2.0w"); break; 655275970Scy case 32: puts ("hppa2.0n"); break; 656275970Scy default: puts ("hppa2.0"); break; 657275970Scy } break; 658275970Scy #else /* !defined(_SC_KERNEL_BITS) */ 659275970Scy puts ("hppa2.0"); break; 660275970Scy #endif 661275970Scy default: puts ("hppa1.0"); break; 662275970Scy } 663275970Scy exit (0); 664275970Scy } 665275970ScyEOF 666275970Scy (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 667275970Scy test -z "$HP_ARCH" && HP_ARCH=hppa 668275970Scy fi ;; 669275970Scy esac 670275970Scy if [ ${HP_ARCH} = "hppa2.0w" ] 671275970Scy then 672275970Scy eval $set_cc_for_build 673275970Scy 674275970Scy # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 675275970Scy # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 676275970Scy # generating 64-bit code. GNU and HP use different nomenclature: 677275970Scy # 678275970Scy # $ CC_FOR_BUILD=cc ./config.guess 679275970Scy # => hppa2.0w-hp-hpux11.23 680275970Scy # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 681275970Scy # => hppa64-hp-hpux11.23 682275970Scy 683275970Scy if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 684275970Scy grep -q __LP64__ 685275970Scy then 686275970Scy HP_ARCH="hppa2.0w" 687275970Scy else 688275970Scy HP_ARCH="hppa64" 689275970Scy fi 690275970Scy fi 691275970Scy echo ${HP_ARCH}-hp-hpux${HPUX_REV} 692275970Scy exit ;; 693275970Scy ia64:HP-UX:*:*) 694275970Scy HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 695275970Scy echo ia64-hp-hpux${HPUX_REV} 696275970Scy exit ;; 697275970Scy 3050*:HI-UX:*:*) 698275970Scy eval $set_cc_for_build 699275970Scy sed 's/^ //' << EOF >$dummy.c 700275970Scy #include <unistd.h> 701275970Scy int 702275970Scy main () 703275970Scy { 704275970Scy long cpu = sysconf (_SC_CPU_VERSION); 705275970Scy /* The order matters, because CPU_IS_HP_MC68K erroneously returns 706275970Scy true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 707275970Scy results, however. */ 708275970Scy if (CPU_IS_PA_RISC (cpu)) 709275970Scy { 710275970Scy switch (cpu) 711275970Scy { 712275970Scy case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 713275970Scy case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 714275970Scy case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 715275970Scy default: puts ("hppa-hitachi-hiuxwe2"); break; 716275970Scy } 717275970Scy } 718275970Scy else if (CPU_IS_HP_MC68K (cpu)) 719275970Scy puts ("m68k-hitachi-hiuxwe2"); 720275970Scy else puts ("unknown-hitachi-hiuxwe2"); 721275970Scy exit (0); 722275970Scy } 723275970ScyEOF 724275970Scy $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 725275970Scy { echo "$SYSTEM_NAME"; exit; } 726275970Scy echo unknown-hitachi-hiuxwe2 727275970Scy exit ;; 728275970Scy 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 729275970Scy echo hppa1.1-hp-bsd 730275970Scy exit ;; 731275970Scy 9000/8??:4.3bsd:*:*) 732275970Scy echo hppa1.0-hp-bsd 733275970Scy exit ;; 734275970Scy *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 735275970Scy echo hppa1.0-hp-mpeix 736275970Scy exit ;; 737275970Scy hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 738275970Scy echo hppa1.1-hp-osf 739275970Scy exit ;; 740275970Scy hp8??:OSF1:*:*) 741275970Scy echo hppa1.0-hp-osf 742275970Scy exit ;; 743275970Scy i*86:OSF1:*:*) 744275970Scy if [ -x /usr/sbin/sysversion ] ; then 745275970Scy echo ${UNAME_MACHINE}-unknown-osf1mk 746275970Scy else 747275970Scy echo ${UNAME_MACHINE}-unknown-osf1 748275970Scy fi 749275970Scy exit ;; 750275970Scy parisc*:Lites*:*:*) 751275970Scy echo hppa1.1-hp-lites 752275970Scy exit ;; 753275970Scy C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 754275970Scy echo c1-convex-bsd 755275970Scy exit ;; 756275970Scy C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 757275970Scy if getsysinfo -f scalar_acc 758275970Scy then echo c32-convex-bsd 759275970Scy else echo c2-convex-bsd 760275970Scy fi 761275970Scy exit ;; 762275970Scy C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 763275970Scy echo c34-convex-bsd 764275970Scy exit ;; 765275970Scy C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 766275970Scy echo c38-convex-bsd 767275970Scy exit ;; 768275970Scy C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 769275970Scy echo c4-convex-bsd 770275970Scy exit ;; 771275970Scy CRAY*Y-MP:*:*:*) 772275970Scy echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 773275970Scy exit ;; 774275970Scy CRAY*[A-Z]90:*:*:*) 775275970Scy echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 776275970Scy | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 777275970Scy -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 778275970Scy -e 's/\.[^.]*$/.X/' 779275970Scy exit ;; 780275970Scy CRAY*TS:*:*:*) 781275970Scy echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 782275970Scy exit ;; 783275970Scy CRAY*T3E:*:*:*) 784275970Scy echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 785275970Scy exit ;; 786275970Scy CRAY*SV1:*:*:*) 787275970Scy echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 788275970Scy exit ;; 789275970Scy *:UNICOS/mp:*:*) 790275970Scy echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 791275970Scy exit ;; 792275970Scy F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 793275970Scy FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 794275970Scy FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 795275970Scy FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 796275970Scy echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 797275970Scy exit ;; 798275970Scy 5000:UNIX_System_V:4.*:*) 799275970Scy FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 800275970Scy FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 801275970Scy echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 802275970Scy exit ;; 803275970Scy i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 804275970Scy echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 805275970Scy exit ;; 806275970Scy sparc*:BSD/OS:*:*) 807275970Scy echo sparc-unknown-bsdi${UNAME_RELEASE} 808275970Scy exit ;; 809275970Scy *:BSD/OS:*:*) 810275970Scy echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 811275970Scy exit ;; 812275970Scy *:FreeBSD:*:*) 813316068Sdelphij UNAME_PROCESSOR=`/usr/bin/uname -p` 814358659Scy case ${UNAME_PROCESSOR} in 815358659Scy amd64) 816358659Scy echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 817358659Scy *) 818358659Scy echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 819358659Scy esac 820275970Scy exit ;; 821275970Scy i*:CYGWIN*:*) 822275970Scy echo ${UNAME_MACHINE}-pc-cygwin 823275970Scy exit ;; 824316068Sdelphij *:MINGW64*:*) 825316068Sdelphij echo ${UNAME_MACHINE}-pc-mingw64 826316068Sdelphij exit ;; 827275970Scy *:MINGW*:*) 828275970Scy echo ${UNAME_MACHINE}-pc-mingw32 829275970Scy exit ;; 830316068Sdelphij *:MSYS*:*) 831316068Sdelphij echo ${UNAME_MACHINE}-pc-msys 832316068Sdelphij exit ;; 833275970Scy i*:windows32*:*) 834275970Scy # uname -m includes "-pc" on this system. 835275970Scy echo ${UNAME_MACHINE}-mingw32 836275970Scy exit ;; 837275970Scy i*:PW*:*) 838275970Scy echo ${UNAME_MACHINE}-pc-pw32 839275970Scy exit ;; 840275970Scy *:Interix*:*) 841275970Scy case ${UNAME_MACHINE} in 842275970Scy x86) 843275970Scy echo i586-pc-interix${UNAME_RELEASE} 844275970Scy exit ;; 845275970Scy authenticamd | genuineintel | EM64T) 846275970Scy echo x86_64-unknown-interix${UNAME_RELEASE} 847275970Scy exit ;; 848275970Scy IA64) 849275970Scy echo ia64-unknown-interix${UNAME_RELEASE} 850275970Scy exit ;; 851275970Scy esac ;; 852275970Scy [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 853275970Scy echo i${UNAME_MACHINE}-pc-mks 854275970Scy exit ;; 855275970Scy 8664:Windows_NT:*) 856275970Scy echo x86_64-pc-mks 857275970Scy exit ;; 858275970Scy i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 859275970Scy # How do we know it's Interix rather than the generic POSIX subsystem? 860275970Scy # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 861275970Scy # UNAME_MACHINE based on the output of uname instead of i386? 862275970Scy echo i586-pc-interix 863275970Scy exit ;; 864275970Scy i*:UWIN*:*) 865275970Scy echo ${UNAME_MACHINE}-pc-uwin 866275970Scy exit ;; 867275970Scy amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 868275970Scy echo x86_64-unknown-cygwin 869275970Scy exit ;; 870275970Scy p*:CYGWIN*:*) 871275970Scy echo powerpcle-unknown-cygwin 872275970Scy exit ;; 873275970Scy prep*:SunOS:5.*:*) 874275970Scy echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 875275970Scy exit ;; 876275970Scy *:GNU:*:*) 877275970Scy # the GNU system 878316068Sdelphij echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 879275970Scy exit ;; 880275970Scy *:GNU/*:*:*) 881275970Scy # other systems with GNU libc and userland 882316068Sdelphij echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} 883275970Scy exit ;; 884275970Scy i*86:Minix:*:*) 885275970Scy echo ${UNAME_MACHINE}-pc-minix 886275970Scy exit ;; 887316068Sdelphij aarch64:Linux:*:*) 888316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 889316068Sdelphij exit ;; 890316068Sdelphij aarch64_be:Linux:*:*) 891316068Sdelphij UNAME_MACHINE=aarch64_be 892316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 893316068Sdelphij exit ;; 894275970Scy alpha:Linux:*:*) 895275970Scy case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 896275970Scy EV5) UNAME_MACHINE=alphaev5 ;; 897275970Scy EV56) UNAME_MACHINE=alphaev56 ;; 898275970Scy PCA56) UNAME_MACHINE=alphapca56 ;; 899275970Scy PCA57) UNAME_MACHINE=alphapca56 ;; 900275970Scy EV6) UNAME_MACHINE=alphaev6 ;; 901275970Scy EV67) UNAME_MACHINE=alphaev67 ;; 902275970Scy EV68*) UNAME_MACHINE=alphaev68 ;; 903275970Scy esac 904275970Scy objdump --private-headers /bin/sh | grep -q ld.so.1 905316068Sdelphij if test "$?" = 0 ; then LIBC="gnulibc1" ; fi 906316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 907275970Scy exit ;; 908316068Sdelphij arc:Linux:*:* | arceb:Linux:*:*) 909316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 910316068Sdelphij exit ;; 911275970Scy arm*:Linux:*:*) 912275970Scy eval $set_cc_for_build 913275970Scy if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 914275970Scy | grep -q __ARM_EABI__ 915275970Scy then 916316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 917275970Scy else 918275970Scy if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 919275970Scy | grep -q __ARM_PCS_VFP 920275970Scy then 921316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi 922275970Scy else 923316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf 924275970Scy fi 925275970Scy fi 926275970Scy exit ;; 927275970Scy avr32*:Linux:*:*) 928316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 929275970Scy exit ;; 930275970Scy cris:Linux:*:*) 931316068Sdelphij echo ${UNAME_MACHINE}-axis-linux-${LIBC} 932275970Scy exit ;; 933275970Scy crisv32:Linux:*:*) 934316068Sdelphij echo ${UNAME_MACHINE}-axis-linux-${LIBC} 935275970Scy exit ;; 936275970Scy frv:Linux:*:*) 937316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 938275970Scy exit ;; 939316068Sdelphij hexagon:Linux:*:*) 940316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 941316068Sdelphij exit ;; 942275970Scy i*86:Linux:*:*) 943316068Sdelphij echo ${UNAME_MACHINE}-pc-linux-${LIBC} 944275970Scy exit ;; 945275970Scy ia64:Linux:*:*) 946316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 947275970Scy exit ;; 948275970Scy m32r*:Linux:*:*) 949316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 950275970Scy exit ;; 951275970Scy m68*:Linux:*:*) 952316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 953275970Scy exit ;; 954275970Scy mips:Linux:*:* | mips64:Linux:*:*) 955275970Scy eval $set_cc_for_build 956275970Scy sed 's/^ //' << EOF >$dummy.c 957275970Scy #undef CPU 958275970Scy #undef ${UNAME_MACHINE} 959275970Scy #undef ${UNAME_MACHINE}el 960275970Scy #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 961275970Scy CPU=${UNAME_MACHINE}el 962275970Scy #else 963275970Scy #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 964275970Scy CPU=${UNAME_MACHINE} 965275970Scy #else 966275970Scy CPU= 967275970Scy #endif 968275970Scy #endif 969275970ScyEOF 970275970Scy eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 971316068Sdelphij test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } 972275970Scy ;; 973316068Sdelphij openrisc*:Linux:*:*) 974316068Sdelphij echo or1k-unknown-linux-${LIBC} 975275970Scy exit ;; 976316068Sdelphij or32:Linux:*:* | or1k*:Linux:*:*) 977316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 978316068Sdelphij exit ;; 979275970Scy padre:Linux:*:*) 980316068Sdelphij echo sparc-unknown-linux-${LIBC} 981275970Scy exit ;; 982275970Scy parisc64:Linux:*:* | hppa64:Linux:*:*) 983316068Sdelphij echo hppa64-unknown-linux-${LIBC} 984275970Scy exit ;; 985275970Scy parisc:Linux:*:* | hppa:Linux:*:*) 986275970Scy # Look for CPU level 987275970Scy case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 988316068Sdelphij PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; 989316068Sdelphij PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; 990316068Sdelphij *) echo hppa-unknown-linux-${LIBC} ;; 991275970Scy esac 992275970Scy exit ;; 993275970Scy ppc64:Linux:*:*) 994316068Sdelphij echo powerpc64-unknown-linux-${LIBC} 995275970Scy exit ;; 996275970Scy ppc:Linux:*:*) 997316068Sdelphij echo powerpc-unknown-linux-${LIBC} 998275970Scy exit ;; 999316068Sdelphij ppc64le:Linux:*:*) 1000316068Sdelphij echo powerpc64le-unknown-linux-${LIBC} 1001316068Sdelphij exit ;; 1002316068Sdelphij ppcle:Linux:*:*) 1003316068Sdelphij echo powerpcle-unknown-linux-${LIBC} 1004316068Sdelphij exit ;; 1005275970Scy s390:Linux:*:* | s390x:Linux:*:*) 1006316068Sdelphij echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 1007275970Scy exit ;; 1008275970Scy sh64*:Linux:*:*) 1009316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1010275970Scy exit ;; 1011275970Scy sh*:Linux:*:*) 1012316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1013275970Scy exit ;; 1014275970Scy sparc:Linux:*:* | sparc64:Linux:*:*) 1015316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1016275970Scy exit ;; 1017275970Scy tile*:Linux:*:*) 1018316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1019275970Scy exit ;; 1020275970Scy vax:Linux:*:*) 1021316068Sdelphij echo ${UNAME_MACHINE}-dec-linux-${LIBC} 1022275970Scy exit ;; 1023275970Scy x86_64:Linux:*:*) 1024316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1025275970Scy exit ;; 1026275970Scy xtensa*:Linux:*:*) 1027316068Sdelphij echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1028275970Scy exit ;; 1029275970Scy i*86:DYNIX/ptx:4*:*) 1030275970Scy # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1031275970Scy # earlier versions are messed up and put the nodename in both 1032275970Scy # sysname and nodename. 1033275970Scy echo i386-sequent-sysv4 1034275970Scy exit ;; 1035275970Scy i*86:UNIX_SV:4.2MP:2.*) 1036275970Scy # Unixware is an offshoot of SVR4, but it has its own version 1037275970Scy # number series starting with 2... 1038275970Scy # I am not positive that other SVR4 systems won't match this, 1039275970Scy # I just have to hope. -- rms. 1040275970Scy # Use sysv4.2uw... so that sysv4* matches it. 1041275970Scy echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1042275970Scy exit ;; 1043275970Scy i*86:OS/2:*:*) 1044275970Scy # If we were able to find `uname', then EMX Unix compatibility 1045275970Scy # is probably installed. 1046275970Scy echo ${UNAME_MACHINE}-pc-os2-emx 1047275970Scy exit ;; 1048275970Scy i*86:XTS-300:*:STOP) 1049275970Scy echo ${UNAME_MACHINE}-unknown-stop 1050275970Scy exit ;; 1051275970Scy i*86:atheos:*:*) 1052275970Scy echo ${UNAME_MACHINE}-unknown-atheos 1053275970Scy exit ;; 1054275970Scy i*86:syllable:*:*) 1055275970Scy echo ${UNAME_MACHINE}-pc-syllable 1056275970Scy exit ;; 1057275970Scy i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1058275970Scy echo i386-unknown-lynxos${UNAME_RELEASE} 1059275970Scy exit ;; 1060275970Scy i*86:*DOS:*:*) 1061275970Scy echo ${UNAME_MACHINE}-pc-msdosdjgpp 1062275970Scy exit ;; 1063275970Scy i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1064275970Scy UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1065275970Scy if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1066275970Scy echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 1067275970Scy else 1068275970Scy echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1069275970Scy fi 1070275970Scy exit ;; 1071275970Scy i*86:*:5:[678]*) 1072275970Scy # UnixWare 7.x, OpenUNIX and OpenServer 6. 1073275970Scy case `/bin/uname -X | grep "^Machine"` in 1074275970Scy *486*) UNAME_MACHINE=i486 ;; 1075275970Scy *Pentium) UNAME_MACHINE=i586 ;; 1076275970Scy *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1077275970Scy esac 1078275970Scy echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1079275970Scy exit ;; 1080275970Scy i*86:*:3.2:*) 1081275970Scy if test -f /usr/options/cb.name; then 1082275970Scy UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1083275970Scy echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 1084275970Scy elif /bin/uname -X 2>/dev/null >/dev/null ; then 1085275970Scy UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1086275970Scy (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1087275970Scy (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 1088275970Scy && UNAME_MACHINE=i586 1089275970Scy (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1090275970Scy && UNAME_MACHINE=i686 1091275970Scy (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1092275970Scy && UNAME_MACHINE=i686 1093275970Scy echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 1094275970Scy else 1095275970Scy echo ${UNAME_MACHINE}-pc-sysv32 1096275970Scy fi 1097275970Scy exit ;; 1098275970Scy pc:*:*:*) 1099275970Scy # Left here for compatibility: 1100275970Scy # uname -m prints for DJGPP always 'pc', but it prints nothing about 1101275970Scy # the processor, so we play safe by assuming i586. 1102275970Scy # Note: whatever this is, it MUST be the same as what config.sub 1103275970Scy # prints for the "djgpp" host, or else GDB configury will decide that 1104275970Scy # this is a cross-build. 1105275970Scy echo i586-pc-msdosdjgpp 1106275970Scy exit ;; 1107275970Scy Intel:Mach:3*:*) 1108275970Scy echo i386-pc-mach3 1109275970Scy exit ;; 1110275970Scy paragon:*:*:*) 1111275970Scy echo i860-intel-osf1 1112275970Scy exit ;; 1113275970Scy i860:*:4.*:*) # i860-SVR4 1114275970Scy if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1115275970Scy echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1116275970Scy else # Add other i860-SVR4 vendors below as they are discovered. 1117275970Scy echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1118275970Scy fi 1119275970Scy exit ;; 1120275970Scy mini*:CTIX:SYS*5:*) 1121275970Scy # "miniframe" 1122275970Scy echo m68010-convergent-sysv 1123275970Scy exit ;; 1124275970Scy mc68k:UNIX:SYSTEM5:3.51m) 1125275970Scy echo m68k-convergent-sysv 1126275970Scy exit ;; 1127275970Scy M680?0:D-NIX:5.3:*) 1128275970Scy echo m68k-diab-dnix 1129275970Scy exit ;; 1130275970Scy M68*:*:R3V[5678]*:*) 1131275970Scy test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1132275970Scy 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) 1133275970Scy OS_REL='' 1134275970Scy test -r /etc/.relid \ 1135275970Scy && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1136275970Scy /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1137275970Scy && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1138275970Scy /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1139275970Scy && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1140275970Scy 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1141275970Scy /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1142275970Scy && { echo i486-ncr-sysv4; exit; } ;; 1143275970Scy NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1144275970Scy OS_REL='.3' 1145275970Scy test -r /etc/.relid \ 1146275970Scy && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1147275970Scy /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1148275970Scy && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1149275970Scy /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1150275970Scy && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1151275970Scy /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1152275970Scy && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1153275970Scy m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1154275970Scy echo m68k-unknown-lynxos${UNAME_RELEASE} 1155275970Scy exit ;; 1156275970Scy mc68030:UNIX_System_V:4.*:*) 1157275970Scy echo m68k-atari-sysv4 1158275970Scy exit ;; 1159275970Scy TSUNAMI:LynxOS:2.*:*) 1160275970Scy echo sparc-unknown-lynxos${UNAME_RELEASE} 1161275970Scy exit ;; 1162275970Scy rs6000:LynxOS:2.*:*) 1163275970Scy echo rs6000-unknown-lynxos${UNAME_RELEASE} 1164275970Scy exit ;; 1165275970Scy PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1166275970Scy echo powerpc-unknown-lynxos${UNAME_RELEASE} 1167275970Scy exit ;; 1168275970Scy SM[BE]S:UNIX_SV:*:*) 1169275970Scy echo mips-dde-sysv${UNAME_RELEASE} 1170275970Scy exit ;; 1171275970Scy RM*:ReliantUNIX-*:*:*) 1172275970Scy echo mips-sni-sysv4 1173275970Scy exit ;; 1174275970Scy RM*:SINIX-*:*:*) 1175275970Scy echo mips-sni-sysv4 1176275970Scy exit ;; 1177275970Scy *:SINIX-*:*:*) 1178275970Scy if uname -p 2>/dev/null >/dev/null ; then 1179275970Scy UNAME_MACHINE=`(uname -p) 2>/dev/null` 1180275970Scy echo ${UNAME_MACHINE}-sni-sysv4 1181275970Scy else 1182275970Scy echo ns32k-sni-sysv 1183275970Scy fi 1184275970Scy exit ;; 1185275970Scy PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1186275970Scy # says <Richard.M.Bartel@ccMail.Census.GOV> 1187275970Scy echo i586-unisys-sysv4 1188275970Scy exit ;; 1189275970Scy *:UNIX_System_V:4*:FTX*) 1190275970Scy # From Gerald Hewes <hewes@openmarket.com>. 1191275970Scy # How about differentiating between stratus architectures? -djm 1192275970Scy echo hppa1.1-stratus-sysv4 1193275970Scy exit ;; 1194275970Scy *:*:*:FTX*) 1195275970Scy # From seanf@swdc.stratus.com. 1196275970Scy echo i860-stratus-sysv4 1197275970Scy exit ;; 1198275970Scy i*86:VOS:*:*) 1199275970Scy # From Paul.Green@stratus.com. 1200275970Scy echo ${UNAME_MACHINE}-stratus-vos 1201275970Scy exit ;; 1202275970Scy *:VOS:*:*) 1203275970Scy # From Paul.Green@stratus.com. 1204275970Scy echo hppa1.1-stratus-vos 1205275970Scy exit ;; 1206275970Scy mc68*:A/UX:*:*) 1207275970Scy echo m68k-apple-aux${UNAME_RELEASE} 1208275970Scy exit ;; 1209275970Scy news*:NEWS-OS:6*:*) 1210275970Scy echo mips-sony-newsos6 1211275970Scy exit ;; 1212275970Scy R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1213275970Scy if [ -d /usr/nec ]; then 1214275970Scy echo mips-nec-sysv${UNAME_RELEASE} 1215275970Scy else 1216275970Scy echo mips-unknown-sysv${UNAME_RELEASE} 1217275970Scy fi 1218275970Scy exit ;; 1219275970Scy BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1220275970Scy echo powerpc-be-beos 1221275970Scy exit ;; 1222275970Scy BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1223275970Scy echo powerpc-apple-beos 1224275970Scy exit ;; 1225275970Scy BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1226275970Scy echo i586-pc-beos 1227275970Scy exit ;; 1228275970Scy BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1229275970Scy echo i586-pc-haiku 1230275970Scy exit ;; 1231316068Sdelphij x86_64:Haiku:*:*) 1232316068Sdelphij echo x86_64-unknown-haiku 1233316068Sdelphij exit ;; 1234275970Scy SX-4:SUPER-UX:*:*) 1235275970Scy echo sx4-nec-superux${UNAME_RELEASE} 1236275970Scy exit ;; 1237275970Scy SX-5:SUPER-UX:*:*) 1238275970Scy echo sx5-nec-superux${UNAME_RELEASE} 1239275970Scy exit ;; 1240275970Scy SX-6:SUPER-UX:*:*) 1241275970Scy echo sx6-nec-superux${UNAME_RELEASE} 1242275970Scy exit ;; 1243275970Scy SX-7:SUPER-UX:*:*) 1244275970Scy echo sx7-nec-superux${UNAME_RELEASE} 1245275970Scy exit ;; 1246275970Scy SX-8:SUPER-UX:*:*) 1247275970Scy echo sx8-nec-superux${UNAME_RELEASE} 1248275970Scy exit ;; 1249275970Scy SX-8R:SUPER-UX:*:*) 1250275970Scy echo sx8r-nec-superux${UNAME_RELEASE} 1251275970Scy exit ;; 1252275970Scy Power*:Rhapsody:*:*) 1253275970Scy echo powerpc-apple-rhapsody${UNAME_RELEASE} 1254275970Scy exit ;; 1255275970Scy *:Rhapsody:*:*) 1256275970Scy echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1257275970Scy exit ;; 1258275970Scy *:Darwin:*:*) 1259275970Scy UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1260316068Sdelphij eval $set_cc_for_build 1261316068Sdelphij if test "$UNAME_PROCESSOR" = unknown ; then 1262316068Sdelphij UNAME_PROCESSOR=powerpc 1263316068Sdelphij fi 1264316068Sdelphij if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then 1265316068Sdelphij if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1266316068Sdelphij if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1267316068Sdelphij (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1268316068Sdelphij grep IS_64BIT_ARCH >/dev/null 1269316068Sdelphij then 1270316068Sdelphij case $UNAME_PROCESSOR in 1271316068Sdelphij i386) UNAME_PROCESSOR=x86_64 ;; 1272316068Sdelphij powerpc) UNAME_PROCESSOR=powerpc64 ;; 1273316068Sdelphij esac 1274316068Sdelphij fi 1275316068Sdelphij fi 1276316068Sdelphij elif test "$UNAME_PROCESSOR" = i386 ; then 1277316068Sdelphij # Avoid executing cc on OS X 10.9, as it ships with a stub 1278316068Sdelphij # that puts up a graphical alert prompting to install 1279316068Sdelphij # developer tools. Any system running Mac OS X 10.7 or 1280316068Sdelphij # later (Darwin 11 and later) is required to have a 64-bit 1281316068Sdelphij # processor. This is not true of the ARM version of Darwin 1282316068Sdelphij # that Apple uses in portable devices. 1283316068Sdelphij UNAME_PROCESSOR=x86_64 1284316068Sdelphij fi 1285275970Scy echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1286275970Scy exit ;; 1287275970Scy *:procnto*:*:* | *:QNX:[0123456789]*:*) 1288275970Scy UNAME_PROCESSOR=`uname -p` 1289275970Scy if test "$UNAME_PROCESSOR" = "x86"; then 1290275970Scy UNAME_PROCESSOR=i386 1291275970Scy UNAME_MACHINE=pc 1292275970Scy fi 1293275970Scy echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1294275970Scy exit ;; 1295275970Scy *:QNX:*:4*) 1296275970Scy echo i386-pc-qnx 1297275970Scy exit ;; 1298275970Scy NEO-?:NONSTOP_KERNEL:*:*) 1299275970Scy echo neo-tandem-nsk${UNAME_RELEASE} 1300275970Scy exit ;; 1301316068Sdelphij NSE-*:NONSTOP_KERNEL:*:*) 1302275970Scy echo nse-tandem-nsk${UNAME_RELEASE} 1303275970Scy exit ;; 1304275970Scy NSR-?:NONSTOP_KERNEL:*:*) 1305275970Scy echo nsr-tandem-nsk${UNAME_RELEASE} 1306275970Scy exit ;; 1307275970Scy *:NonStop-UX:*:*) 1308275970Scy echo mips-compaq-nonstopux 1309275970Scy exit ;; 1310275970Scy BS2000:POSIX*:*:*) 1311275970Scy echo bs2000-siemens-sysv 1312275970Scy exit ;; 1313275970Scy DS/*:UNIX_System_V:*:*) 1314275970Scy echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1315275970Scy exit ;; 1316275970Scy *:Plan9:*:*) 1317275970Scy # "uname -m" is not consistent, so use $cputype instead. 386 1318275970Scy # is converted to i386 for consistency with other x86 1319275970Scy # operating systems. 1320275970Scy if test "$cputype" = "386"; then 1321275970Scy UNAME_MACHINE=i386 1322275970Scy else 1323275970Scy UNAME_MACHINE="$cputype" 1324275970Scy fi 1325275970Scy echo ${UNAME_MACHINE}-unknown-plan9 1326275970Scy exit ;; 1327275970Scy *:TOPS-10:*:*) 1328275970Scy echo pdp10-unknown-tops10 1329275970Scy exit ;; 1330275970Scy *:TENEX:*:*) 1331275970Scy echo pdp10-unknown-tenex 1332275970Scy exit ;; 1333275970Scy KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1334275970Scy echo pdp10-dec-tops20 1335275970Scy exit ;; 1336275970Scy XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1337275970Scy echo pdp10-xkl-tops20 1338275970Scy exit ;; 1339275970Scy *:TOPS-20:*:*) 1340275970Scy echo pdp10-unknown-tops20 1341275970Scy exit ;; 1342275970Scy *:ITS:*:*) 1343275970Scy echo pdp10-unknown-its 1344275970Scy exit ;; 1345275970Scy SEI:*:*:SEIUX) 1346275970Scy echo mips-sei-seiux${UNAME_RELEASE} 1347275970Scy exit ;; 1348275970Scy *:DragonFly:*:*) 1349275970Scy echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1350275970Scy exit ;; 1351275970Scy *:*VMS:*:*) 1352275970Scy UNAME_MACHINE=`(uname -p) 2>/dev/null` 1353275970Scy case "${UNAME_MACHINE}" in 1354275970Scy A*) echo alpha-dec-vms ; exit ;; 1355275970Scy I*) echo ia64-dec-vms ; exit ;; 1356275970Scy V*) echo vax-dec-vms ; exit ;; 1357275970Scy esac ;; 1358275970Scy *:XENIX:*:SysV) 1359275970Scy echo i386-pc-xenix 1360275970Scy exit ;; 1361275970Scy i*86:skyos:*:*) 1362275970Scy echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1363275970Scy exit ;; 1364275970Scy i*86:rdos:*:*) 1365275970Scy echo ${UNAME_MACHINE}-pc-rdos 1366275970Scy exit ;; 1367275970Scy i*86:AROS:*:*) 1368275970Scy echo ${UNAME_MACHINE}-pc-aros 1369275970Scy exit ;; 1370316068Sdelphij x86_64:VMkernel:*:*) 1371316068Sdelphij echo ${UNAME_MACHINE}-unknown-esx 1372316068Sdelphij exit ;; 1373275970Scyesac 1374275970Scy 1375275970Scycat >&2 <<EOF 1376275970Scy$0: unable to guess system type 1377275970Scy 1378275970ScyThis script, last modified $timestamp, has failed to recognize 1379275970Scythe operating system you are using. It is advised that you 1380275970Scydownload the most up to date version of the config scripts from 1381275970Scy 1382275970Scy http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1383275970Scyand 1384275970Scy http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1385275970Scy 1386275970ScyIf the version you run ($0) is already up to date, please 1387275970Scysend the following data and any information you think might be 1388275970Scypertinent to <config-patches@gnu.org> in order to provide the needed 1389275970Scyinformation to handle your system. 1390275970Scy 1391275970Scyconfig.guess timestamp = $timestamp 1392275970Scy 1393275970Scyuname -m = `(uname -m) 2>/dev/null || echo unknown` 1394275970Scyuname -r = `(uname -r) 2>/dev/null || echo unknown` 1395275970Scyuname -s = `(uname -s) 2>/dev/null || echo unknown` 1396275970Scyuname -v = `(uname -v) 2>/dev/null || echo unknown` 1397275970Scy 1398275970Scy/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1399275970Scy/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1400275970Scy 1401275970Scyhostinfo = `(hostinfo) 2>/dev/null` 1402275970Scy/bin/universe = `(/bin/universe) 2>/dev/null` 1403275970Scy/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1404275970Scy/bin/arch = `(/bin/arch) 2>/dev/null` 1405275970Scy/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1406275970Scy/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1407275970Scy 1408275970ScyUNAME_MACHINE = ${UNAME_MACHINE} 1409275970ScyUNAME_RELEASE = ${UNAME_RELEASE} 1410275970ScyUNAME_SYSTEM = ${UNAME_SYSTEM} 1411275970ScyUNAME_VERSION = ${UNAME_VERSION} 1412275970ScyEOF 1413275970Scy 1414275970Scyexit 1 1415275970Scy 1416275970Scy# Local variables: 1417275970Scy# eval: (add-hook 'write-file-hooks 'time-stamp) 1418275970Scy# time-stamp-start: "timestamp='" 1419275970Scy# time-stamp-format: "%:y-%02m-%02d" 1420275970Scy# time-stamp-end: "'" 1421275970Scy# End: 1422