169408Sache#! /bin/sh 269408Sache# Attempt to guess a canonical system name. 3316957Sdchagin# Copyright 1992-2015 Free Software Foundation, Inc. 4100616Smp 5316957Sdchagintimestamp='2015-03-04' 6100616Smp 769408Sache# This file is free software; you can redistribute it and/or modify it 869408Sache# under the terms of the GNU General Public License as published by 9316957Sdchagin# the Free Software Foundation; either version 3 of the License, or 1069408Sache# (at your option) any later version. 1169408Sache# 1269408Sache# This program is distributed in the hope that it will be useful, but 1369408Sache# WITHOUT ANY WARRANTY; without even the implied warranty of 1469408Sache# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1569408Sache# General Public License for more details. 1669408Sache# 1769408Sache# You should have received a copy of the GNU General Public License 18316957Sdchagin# along with this program; if not, see <http://www.gnu.org/licenses/>. 1969408Sache# 2069408Sache# As a special exception to the GNU General Public License, if you 2169408Sache# distribute this file as part of a program that contains a 2269408Sache# configuration script generated by Autoconf, you may include it under 23316957Sdchagin# the same distribution terms that you use for the rest of that 24316957Sdchagin# program. This Exception is an additional permission under section 7 25316957Sdchagin# of the GNU General Public License, version 3 ("GPLv3"). 2669408Sache# 27316957Sdchagin# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. 2869408Sache# 29231990Smp# You can get the latest version of this script from: 30231990Smp# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 31316957Sdchagin# 32316957Sdchagin# Please send patches to <config-patches@gnu.org>. 3369408Sache 34316957Sdchagin 35100616Smpme=`echo "$0" | sed -e 's,.*/,,'` 36100616Smp 37100616Smpusage="\ 38100616SmpUsage: $0 [OPTION] 39100616Smp 40100616SmpOutput the configuration name of the system \`$me' is run on. 41100616Smp 42100616SmpOperation modes: 43100616Smp -h, --help print this help, then exit 44100616Smp -t, --time-stamp print date of last modification, then exit 45100616Smp -v, --version print version number, then exit 46100616Smp 47100616SmpReport bugs and patches to <config-patches@gnu.org>." 48100616Smp 49100616Smpversion="\ 50100616SmpGNU config.guess ($timestamp) 51100616Smp 52100616SmpOriginally written by Per Bothner. 53316957SdchaginCopyright 1992-2015 Free Software Foundation, Inc. 54100616Smp 55100616SmpThis is free software; see the source for copying conditions. There is NO 56100616Smpwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 57100616Smp 58100616Smphelp=" 59100616SmpTry \`$me --help' for more information." 60100616Smp 61100616Smp# Parse command line 62100616Smpwhile test $# -gt 0 ; do 63100616Smp case $1 in 64100616Smp --time-stamp | --time* | -t ) 65195609Smp echo "$timestamp" ; exit ;; 66100616Smp --version | -v ) 67195609Smp echo "$version" ; exit ;; 68100616Smp --help | --h* | -h ) 69195609Smp echo "$usage"; exit ;; 70100616Smp -- ) # Stop option processing 71100616Smp shift; break ;; 72100616Smp - ) # Use stdin as input. 73100616Smp break ;; 74100616Smp -* ) 75100616Smp echo "$me: invalid option $1$help" >&2 76100616Smp exit 1 ;; 77100616Smp * ) 78100616Smp break ;; 79100616Smp esac 80100616Smpdone 81100616Smp 82100616Smpif test $# != 0; then 83100616Smp echo "$me: too many arguments$help" >&2 84100616Smp exit 1 8583098Smpfi 8683098Smp 87100616Smptrap 'exit 1' 1 2 15 8883098Smp 89100616Smp# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 90100616Smp# compiler to aid in system detection is discouraged as it requires 91100616Smp# temporary files to be created and, as you can see below, it is a 92100616Smp# headache to deal with in a portable fashion. 93100616Smp 94100616Smp# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 95100616Smp# use `HOST_CC' if defined, but it is deprecated. 96100616Smp 97195609Smp# Portable tmp directory creation inspired by the Autoconf team. 98100616Smp 99195609Smpset_cc_for_build=' 100195609Smptrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 101195609Smptrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 102195609Smp: ${TMPDIR=/tmp} ; 103195609Smp { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 104195609Smp { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 105195609Smp { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 106195609Smp { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 107195609Smpdummy=$tmp/dummy ; 108195609Smptmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 109100616Smpcase $CC_FOR_BUILD,$HOST_CC,$CC in 110100616Smp ,,) echo "int x;" > $dummy.c ; 111100616Smp for c in cc gcc c89 c99 ; do 112195609Smp if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 113100616Smp CC_FOR_BUILD="$c"; break ; 114100616Smp fi ; 115100616Smp done ; 116100616Smp if test x"$CC_FOR_BUILD" = x ; then 117100616Smp CC_FOR_BUILD=no_compiler_found ; 118100616Smp fi 119100616Smp ;; 120100616Smp ,,*) CC_FOR_BUILD=$CC ;; 121100616Smp ,*,*) CC_FOR_BUILD=$HOST_CC ;; 122195609Smpesac ; set_cc_for_build= ;' 123100616Smp 12469408Sache# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 125100616Smp# (ghazi@noc.rutgers.edu 1994-08-24) 12669408Sacheif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 12769408Sache PATH=$PATH:/.attbin ; export PATH 12869408Sachefi 12969408Sache 13069408SacheUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 13169408SacheUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 132100616SmpUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 13369408SacheUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 13469408Sache 135316957Sdchagincase "${UNAME_SYSTEM}" in 136316957SdchaginLinux|GNU|GNU/*) 137316957Sdchagin # If the system lacks a compiler, then just pick glibc. 138316957Sdchagin # We could probably try harder. 139316957Sdchagin LIBC=gnu 140316957Sdchagin 141316957Sdchagin eval $set_cc_for_build 142316957Sdchagin cat <<-EOF > $dummy.c 143316957Sdchagin #include <features.h> 144316957Sdchagin #if defined(__UCLIBC__) 145316957Sdchagin LIBC=uclibc 146316957Sdchagin #elif defined(__dietlibc__) 147316957Sdchagin LIBC=dietlibc 148316957Sdchagin #else 149316957Sdchagin LIBC=gnu 150316957Sdchagin #endif 151316957Sdchagin EOF 152316957Sdchagin eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` 153316957Sdchagin ;; 154316957Sdchaginesac 155316957Sdchagin 15669408Sache# Note: order is significant - the case branches are not exclusive. 15769408Sache 15869408Sachecase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 159100616Smp *:NetBSD:*:*) 160100616Smp # NetBSD (nbsd) targets should (where applicable) match one or 161316957Sdchagin # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 162100616Smp # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 163100616Smp # switched to ELF, *-*-netbsd* would select the old 164100616Smp # object file format. This provides both forward 165100616Smp # compatibility and a consistent mechanism for selecting the 166100616Smp # object file format. 167100616Smp # 168100616Smp # Note: NetBSD doesn't particularly care about the vendor 169100616Smp # portion of the name. We always set it to "unknown". 170100616Smp sysctl="sysctl -n hw.machine_arch" 171316957Sdchagin UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ 172316957Sdchagin /sbin/$sysctl 2>/dev/null || \ 173316957Sdchagin /usr/sbin/$sysctl 2>/dev/null || \ 174316957Sdchagin echo unknown)` 175100616Smp case "${UNAME_MACHINE_ARCH}" in 176100616Smp armeb) machine=armeb-unknown ;; 177100616Smp arm*) machine=arm-unknown ;; 178100616Smp sh3el) machine=shl-unknown ;; 179100616Smp sh3eb) machine=sh-unknown ;; 180195609Smp sh5el) machine=sh5le-unknown ;; 181316957Sdchagin earmv*) 182316957Sdchagin arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` 183316957Sdchagin endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` 184316957Sdchagin machine=${arch}${endian}-unknown 185316957Sdchagin ;; 186100616Smp *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 187100616Smp esac 188100616Smp # The Operating System including object format, if it has switched 189100616Smp # to ELF recently, or will in the future. 190100616Smp case "${UNAME_MACHINE_ARCH}" in 191316957Sdchagin arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) 192100616Smp eval $set_cc_for_build 193100616Smp if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 194195609Smp | grep -q __ELF__ 195100616Smp then 196100616Smp # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 197100616Smp # Return netbsd for either. FIX? 198100616Smp os=netbsd 199100616Smp else 200100616Smp os=netbsdelf 201100616Smp fi 202100616Smp ;; 203100616Smp *) 204316957Sdchagin os=netbsd 205100616Smp ;; 206100616Smp esac 207316957Sdchagin # Determine ABI tags. 208316957Sdchagin case "${UNAME_MACHINE_ARCH}" in 209316957Sdchagin earm*) 210316957Sdchagin expr='s/^earmv[0-9]/-eabi/;s/eb$//' 211316957Sdchagin abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` 212316957Sdchagin ;; 213316957Sdchagin esac 214100616Smp # The OS release 215195609Smp # Debian GNU/NetBSD machines have a different userland, and 216195609Smp # thus, need a distinct triplet. However, they do not need 217195609Smp # kernel version information, so it can be replaced with a 218195609Smp # suitable tag, in the style of linux-gnu. 219195609Smp case "${UNAME_VERSION}" in 220195609Smp Debian*) 221195609Smp release='-gnu' 222195609Smp ;; 223195609Smp *) 224195609Smp release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 225195609Smp ;; 226195609Smp esac 227100616Smp # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 228100616Smp # contains redundant information, the shorter form: 229100616Smp # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 230316957Sdchagin echo "${machine}-${os}${release}${abi}" 231195609Smp exit ;; 232316957Sdchagin *:Bitrig:*:*) 233316957Sdchagin UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 234316957Sdchagin echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} 235316957Sdchagin exit ;; 236100616Smp *:OpenBSD:*:*) 237195609Smp UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 238195609Smp echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 239195609Smp exit ;; 240195609Smp *:ekkoBSD:*:*) 241195609Smp echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 242195609Smp exit ;; 243195609Smp *:SolidBSD:*:*) 244195609Smp echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 245195609Smp exit ;; 246195609Smp macppc:MirBSD:*:*) 247195609Smp echo powerpc-unknown-mirbsd${UNAME_RELEASE} 248195609Smp exit ;; 249195609Smp *:MirBSD:*:*) 250195609Smp echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 251195609Smp exit ;; 25269408Sache alpha:OSF1:*:*) 253195609Smp case $UNAME_RELEASE in 254195609Smp *4.0) 25569408Sache UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 256195609Smp ;; 257195609Smp *5.*) 258316957Sdchagin UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 259195609Smp ;; 260195609Smp esac 261195609Smp # According to Compaq, /usr/sbin/psrinfo has been available on 262195609Smp # OSF/1 and Tru64 systems produced since 1995. I hope that 263195609Smp # covers most systems running today. This code pipes the CPU 264195609Smp # types through head -n 1, so we only detect the type of CPU 0. 265195609Smp ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 266195609Smp case "$ALPHA_CPU_TYPE" in 267195609Smp "EV4 (21064)") 268195609Smp UNAME_MACHINE="alpha" ;; 269195609Smp "EV4.5 (21064)") 270195609Smp UNAME_MACHINE="alpha" ;; 271195609Smp "LCA4 (21066/21068)") 272195609Smp UNAME_MACHINE="alpha" ;; 273195609Smp "EV5 (21164)") 274195609Smp UNAME_MACHINE="alphaev5" ;; 275195609Smp "EV5.6 (21164A)") 276195609Smp UNAME_MACHINE="alphaev56" ;; 277195609Smp "EV5.6 (21164PC)") 278195609Smp UNAME_MACHINE="alphapca56" ;; 279195609Smp "EV5.7 (21164PC)") 280195609Smp UNAME_MACHINE="alphapca57" ;; 281195609Smp "EV6 (21264)") 282195609Smp UNAME_MACHINE="alphaev6" ;; 283195609Smp "EV6.7 (21264A)") 284195609Smp UNAME_MACHINE="alphaev67" ;; 285195609Smp "EV6.8CB (21264C)") 286195609Smp UNAME_MACHINE="alphaev68" ;; 287195609Smp "EV6.8AL (21264B)") 288195609Smp UNAME_MACHINE="alphaev68" ;; 289195609Smp "EV6.8CX (21264D)") 290195609Smp UNAME_MACHINE="alphaev68" ;; 291195609Smp "EV6.9A (21264/EV69A)") 292195609Smp UNAME_MACHINE="alphaev69" ;; 293195609Smp "EV7 (21364)") 294195609Smp UNAME_MACHINE="alphaev7" ;; 295195609Smp "EV7.9 (21364A)") 296195609Smp UNAME_MACHINE="alphaev79" ;; 297195609Smp esac 298195609Smp # A Pn.n version is a patched version. 29969408Sache # A Vn.n version is a released version. 30069408Sache # A Tn.n version is a released field test version. 30169408Sache # A Xn.n version is an unreleased experimental baselevel. 30269408Sache # 1.2 uses "1.2" for uname -r. 303195609Smp echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 304316957Sdchagin # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 305316957Sdchagin exitcode=$? 306316957Sdchagin trap '' 0 307316957Sdchagin exit $exitcode ;; 30883098Smp Alpha\ *:Windows_NT*:*) 30983098Smp # How do we know it's Interix rather than the generic POSIX subsystem? 31083098Smp # Should we change UNAME_MACHINE based on the output of uname instead 31183098Smp # of the specific Alpha model? 31283098Smp echo alpha-pc-interix 313195609Smp exit ;; 31469408Sache 21064:Windows_NT:50:3) 31569408Sache echo alpha-dec-winnt3.5 316195609Smp exit ;; 31769408Sache Amiga*:UNIX_System_V:4.0:*) 318100616Smp echo m68k-unknown-sysv4 319195609Smp exit ;; 32069408Sache *:[Aa]miga[Oo][Ss]:*:*) 32169408Sache echo ${UNAME_MACHINE}-unknown-amigaos 322195609Smp exit ;; 323100616Smp *:[Mm]orph[Oo][Ss]:*:*) 324100616Smp echo ${UNAME_MACHINE}-unknown-morphos 325195609Smp exit ;; 32683098Smp *:OS/390:*:*) 32783098Smp echo i370-ibm-openedition 328195609Smp exit ;; 329195609Smp *:z/VM:*:*) 330195609Smp echo s390-ibm-zvmoe 331195609Smp exit ;; 332195609Smp *:OS400:*:*) 333316957Sdchagin echo powerpc-ibm-os400 334195609Smp exit ;; 33569408Sache arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 33669408Sache echo arm-acorn-riscix${UNAME_RELEASE} 337195609Smp exit ;; 338316957Sdchagin arm*:riscos:*:*|arm*:RISCOS:*:*) 339195609Smp echo arm-unknown-riscos 340195609Smp exit ;; 341100616Smp SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 34269408Sache echo hppa1.1-hitachi-hiuxmpp 343195609Smp exit ;; 34483098Smp Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 34569408Sache # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 34669408Sache if test "`(/bin/universe) 2>/dev/null`" = att ; then 34769408Sache echo pyramid-pyramid-sysv3 34869408Sache else 34969408Sache echo pyramid-pyramid-bsd 35069408Sache fi 351195609Smp exit ;; 35283098Smp NILE*:*:*:dcosx) 35369408Sache echo pyramid-pyramid-svr4 354195609Smp exit ;; 355195609Smp DRS?6000:unix:4.0:6*) 356195609Smp echo sparc-icl-nx6 357195609Smp exit ;; 358195609Smp DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 359100616Smp case `/usr/bin/uname -p` in 360195609Smp sparc) echo sparc-icl-nx7; exit ;; 361100616Smp esac ;; 362195609Smp s390x:SunOS:*:*) 363195609Smp echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 364195609Smp exit ;; 36569408Sache sun4H:SunOS:5.*:*) 36669408Sache echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 367195609Smp exit ;; 36869408Sache sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 36969408Sache echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 370195609Smp exit ;; 371231990Smp i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 372231990Smp echo i386-pc-auroraux${UNAME_RELEASE} 373231990Smp exit ;; 374195609Smp i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 375195609Smp eval $set_cc_for_build 376195609Smp SUN_ARCH="i386" 377195609Smp # If there is a compiler, see if it is configured for 64-bit objects. 378195609Smp # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 379195609Smp # This test works for both compilers. 380195609Smp if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 381195609Smp if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 382195609Smp (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 383195609Smp grep IS_64BIT_ARCH >/dev/null 384195609Smp then 385195609Smp SUN_ARCH="x86_64" 386195609Smp fi 387195609Smp fi 388195609Smp echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 389195609Smp exit ;; 39069408Sache sun4*:SunOS:6*:*) 39169408Sache # According to config.sub, this is the proper way to canonicalize 39269408Sache # SunOS6. Hard to guess exactly what SunOS6 will be like, but 39369408Sache # it's likely to be more like Solaris than SunOS4. 39469408Sache echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 395195609Smp exit ;; 39669408Sache sun4*:SunOS:*:*) 39769408Sache case "`/usr/bin/arch -k`" in 39869408Sache Series*|S4*) 39969408Sache UNAME_RELEASE=`uname -v` 40069408Sache ;; 40169408Sache esac 40269408Sache # Japanese Language versions have a version number like `4.1.3-JL'. 40369408Sache echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 404195609Smp exit ;; 40569408Sache sun3*:SunOS:*:*) 40669408Sache echo m68k-sun-sunos${UNAME_RELEASE} 407195609Smp exit ;; 40869408Sache sun*:*:4.2BSD:*) 409100616Smp UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 41069408Sache test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 41169408Sache case "`/bin/arch`" in 41269408Sache sun3) 41369408Sache echo m68k-sun-sunos${UNAME_RELEASE} 41469408Sache ;; 41569408Sache sun4) 41669408Sache echo sparc-sun-sunos${UNAME_RELEASE} 41769408Sache ;; 41869408Sache esac 419195609Smp exit ;; 42069408Sache aushp:SunOS:*:*) 42169408Sache echo sparc-auspex-sunos${UNAME_RELEASE} 422195609Smp exit ;; 42383098Smp # The situation for MiNT is a little confusing. The machine name 42483098Smp # can be virtually everything (everything which is not 425100616Smp # "atarist" or "atariste" at least should have a processor 42683098Smp # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 42783098Smp # to the lowercase version "mint" (or "freemint"). Finally 42883098Smp # the system name "TOS" denotes a system which is actually not 42983098Smp # MiNT. But MiNT is downward compatible to TOS, so this should 43083098Smp # be no problem. 43183098Smp atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 432316957Sdchagin echo m68k-atari-mint${UNAME_RELEASE} 433195609Smp exit ;; 43483098Smp atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 43583098Smp echo m68k-atari-mint${UNAME_RELEASE} 436316957Sdchagin exit ;; 43783098Smp *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 438316957Sdchagin echo m68k-atari-mint${UNAME_RELEASE} 439195609Smp exit ;; 44083098Smp milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 441316957Sdchagin echo m68k-milan-mint${UNAME_RELEASE} 442316957Sdchagin exit ;; 44383098Smp hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 444316957Sdchagin echo m68k-hades-mint${UNAME_RELEASE} 445316957Sdchagin exit ;; 44683098Smp *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 447316957Sdchagin echo m68k-unknown-mint${UNAME_RELEASE} 448316957Sdchagin exit ;; 449195609Smp m68k:machten:*:*) 450195609Smp echo m68k-apple-machten${UNAME_RELEASE} 451195609Smp exit ;; 45269408Sache powerpc:machten:*:*) 45369408Sache echo powerpc-apple-machten${UNAME_RELEASE} 454195609Smp exit ;; 45569408Sache RISC*:Mach:*:*) 45669408Sache echo mips-dec-mach_bsd4.3 457195609Smp exit ;; 45869408Sache RISC*:ULTRIX:*:*) 45969408Sache echo mips-dec-ultrix${UNAME_RELEASE} 460195609Smp exit ;; 46169408Sache VAX*:ULTRIX*:*:*) 46269408Sache echo vax-dec-ultrix${UNAME_RELEASE} 463195609Smp exit ;; 46483098Smp 2020:CLIX:*:* | 2430:CLIX:*:*) 46569408Sache echo clipper-intergraph-clix${UNAME_RELEASE} 466195609Smp exit ;; 46769408Sache mips:*:*:UMIPS | mips:*:*:RISCos) 468100616Smp eval $set_cc_for_build 46983098Smp sed 's/^ //' << EOF >$dummy.c 47083098Smp#ifdef __cplusplus 471100616Smp#include <stdio.h> /* for printf() prototype */ 47283098Smp int main (int argc, char *argv[]) { 47383098Smp#else 47483098Smp int main (argc, argv) int argc; char *argv[]; { 47583098Smp#endif 47669408Sache #if defined (host_mips) && defined (MIPSEB) 47769408Sache #if defined (SYSTYPE_SYSV) 47869408Sache printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 47969408Sache #endif 48069408Sache #if defined (SYSTYPE_SVR4) 48169408Sache printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 48269408Sache #endif 48369408Sache #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 48469408Sache printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 48569408Sache #endif 48669408Sache #endif 48769408Sache exit (-1); 48869408Sache } 48969408SacheEOF 490195609Smp $CC_FOR_BUILD -o $dummy $dummy.c && 491195609Smp dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 492195609Smp SYSTEM_NAME=`$dummy $dummyarg` && 493195609Smp { echo "$SYSTEM_NAME"; exit; } 49469408Sache echo mips-mips-riscos${UNAME_RELEASE} 495195609Smp exit ;; 496100616Smp Motorola:PowerMAX_OS:*:*) 497100616Smp echo powerpc-motorola-powermax 498195609Smp exit ;; 499195609Smp Motorola:*:4.3:PL8-*) 500100616Smp echo powerpc-harris-powermax 501195609Smp exit ;; 502195609Smp Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 503195609Smp echo powerpc-harris-powermax 504195609Smp exit ;; 50569408Sache Night_Hawk:Power_UNIX:*:*) 50669408Sache echo powerpc-harris-powerunix 507195609Smp exit ;; 50869408Sache m88k:CX/UX:7*:*) 50969408Sache echo m88k-harris-cxux7 510195609Smp exit ;; 51169408Sache m88k:*:4*:R4*) 51269408Sache echo m88k-motorola-sysv4 513195609Smp exit ;; 51469408Sache m88k:*:3*:R3*) 51569408Sache echo m88k-motorola-sysv3 516195609Smp exit ;; 51769408Sache AViiON:dgux:*:*) 518316957Sdchagin # DG/UX returns AViiON for all architectures 519316957Sdchagin UNAME_PROCESSOR=`/usr/bin/uname -p` 520100616Smp if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 52183098Smp then 52283098Smp if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 52383098Smp [ ${TARGET_BINARY_INTERFACE}x = x ] 52483098Smp then 52569408Sache echo m88k-dg-dgux${UNAME_RELEASE} 52683098Smp else 52783098Smp echo m88k-dg-dguxbcs${UNAME_RELEASE} 52883098Smp fi 52969408Sache else 53083098Smp echo i586-dg-dgux${UNAME_RELEASE} 53169408Sache fi 532316957Sdchagin exit ;; 53369408Sache M88*:DolphinOS:*:*) # DolphinOS (SVR3) 53469408Sache echo m88k-dolphin-sysv3 535195609Smp exit ;; 53669408Sache M88*:*:R3*:*) 53769408Sache # Delta 88k system running SVR3 53869408Sache echo m88k-motorola-sysv3 539195609Smp exit ;; 54069408Sache XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 54169408Sache echo m88k-tektronix-sysv3 542195609Smp exit ;; 54369408Sache Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 54469408Sache echo m68k-tektronix-bsd 545195609Smp exit ;; 54669408Sache *:IRIX*:*:*) 54769408Sache echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 548195609Smp exit ;; 54969408Sache ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 550195609Smp echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 551195609Smp exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 552100616Smp i*86:AIX:*:*) 55369408Sache echo i386-ibm-aix 554195609Smp exit ;; 555100616Smp ia64:AIX:*:*) 556100616Smp if [ -x /usr/bin/oslevel ] ; then 557100616Smp IBM_REV=`/usr/bin/oslevel` 558100616Smp else 559100616Smp IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 560100616Smp fi 561100616Smp echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 562195609Smp exit ;; 56369408Sache *:AIX:2:3) 56469408Sache if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 565100616Smp eval $set_cc_for_build 56683098Smp sed 's/^ //' << EOF >$dummy.c 56769408Sache #include <sys/systemcfg.h> 56869408Sache 56969408Sache main() 57069408Sache { 57169408Sache if (!__power_pc()) 57269408Sache exit(1); 57369408Sache puts("powerpc-ibm-aix3.2.5"); 57469408Sache exit(0); 57569408Sache } 57669408SacheEOF 577195609Smp if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 578195609Smp then 579195609Smp echo "$SYSTEM_NAME" 580195609Smp else 581195609Smp echo rs6000-ibm-aix3.2.5 582195609Smp fi 58369408Sache elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 58469408Sache echo rs6000-ibm-aix3.2.4 58569408Sache else 58669408Sache echo rs6000-ibm-aix3.2 58769408Sache fi 588195609Smp exit ;; 589316957Sdchagin *:AIX:*:[4567]) 590100616Smp IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 591100616Smp if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 59269408Sache IBM_ARCH=rs6000 59369408Sache else 59469408Sache IBM_ARCH=powerpc 59569408Sache fi 596316957Sdchagin if [ -x /usr/bin/lslpp ] ; then 597316957Sdchagin IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | 598316957Sdchagin awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` 59969408Sache else 600100616Smp IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 60169408Sache fi 60269408Sache echo ${IBM_ARCH}-ibm-aix${IBM_REV} 603195609Smp exit ;; 60469408Sache *:AIX:*:*) 60569408Sache echo rs6000-ibm-aix 606195609Smp exit ;; 60769408Sache ibmrt:4.4BSD:*|romp-ibm:BSD:*) 60869408Sache echo romp-ibm-bsd4.4 609195609Smp exit ;; 610100616Smp ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 61169408Sache echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 612195609Smp exit ;; # report: romp-ibm BSD 4.3 61369408Sache *:BOSX:*:*) 61469408Sache echo rs6000-bull-bosx 615195609Smp exit ;; 61669408Sache DPX/2?00:B.O.S.:*:*) 61769408Sache echo m68k-bull-sysv3 618195609Smp exit ;; 61969408Sache 9000/[34]??:4.3bsd:1.*:*) 62069408Sache echo m68k-hp-bsd 621195609Smp exit ;; 62269408Sache hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 62369408Sache echo m68k-hp-bsd4.4 624195609Smp exit ;; 62569408Sache 9000/[34678]??:HP-UX:*:*) 626100616Smp HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 62769408Sache case "${UNAME_MACHINE}" in 62869408Sache 9000/31? ) HP_ARCH=m68000 ;; 62969408Sache 9000/[34]?? ) HP_ARCH=m68k ;; 63083098Smp 9000/[678][0-9][0-9]) 631100616Smp if [ -x /usr/bin/getconf ]; then 632100616Smp sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 633316957Sdchagin sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 634316957Sdchagin case "${sc_cpu_version}" in 635316957Sdchagin 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 636316957Sdchagin 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 637316957Sdchagin 532) # CPU_PA_RISC2_0 638316957Sdchagin case "${sc_kernel_bits}" in 639316957Sdchagin 32) HP_ARCH="hppa2.0n" ;; 640316957Sdchagin 64) HP_ARCH="hppa2.0w" ;; 641100616Smp '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 642316957Sdchagin esac ;; 643316957Sdchagin esac 644100616Smp fi 645100616Smp if [ "${HP_ARCH}" = "" ]; then 646100616Smp eval $set_cc_for_build 647316957Sdchagin sed 's/^ //' << EOF >$dummy.c 648100616Smp 649316957Sdchagin #define _HPUX_SOURCE 650316957Sdchagin #include <stdlib.h> 651316957Sdchagin #include <unistd.h> 65283098Smp 653316957Sdchagin int main () 654316957Sdchagin { 655316957Sdchagin #if defined(_SC_KERNEL_BITS) 656316957Sdchagin long bits = sysconf(_SC_KERNEL_BITS); 657316957Sdchagin #endif 658316957Sdchagin long cpu = sysconf (_SC_CPU_VERSION); 65983098Smp 660316957Sdchagin switch (cpu) 661316957Sdchagin { 662316957Sdchagin case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 663316957Sdchagin case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 664316957Sdchagin case CPU_PA_RISC2_0: 665316957Sdchagin #if defined(_SC_KERNEL_BITS) 666316957Sdchagin switch (bits) 667316957Sdchagin { 668316957Sdchagin case 64: puts ("hppa2.0w"); break; 669316957Sdchagin case 32: puts ("hppa2.0n"); break; 670316957Sdchagin default: puts ("hppa2.0"); break; 671316957Sdchagin } break; 672316957Sdchagin #else /* !defined(_SC_KERNEL_BITS) */ 673316957Sdchagin puts ("hppa2.0"); break; 674316957Sdchagin #endif 675316957Sdchagin default: puts ("hppa1.0"); break; 676316957Sdchagin } 677316957Sdchagin exit (0); 678316957Sdchagin } 67969408SacheEOF 680195609Smp (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 681195609Smp test -z "$HP_ARCH" && HP_ARCH=hppa 682100616Smp fi ;; 68369408Sache esac 684195609Smp if [ ${HP_ARCH} = "hppa2.0w" ] 685195609Smp then 686195609Smp eval $set_cc_for_build 687195609Smp 688195609Smp # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 689195609Smp # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 690195609Smp # generating 64-bit code. GNU and HP use different nomenclature: 691195609Smp # 692195609Smp # $ CC_FOR_BUILD=cc ./config.guess 693195609Smp # => hppa2.0w-hp-hpux11.23 694195609Smp # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 695195609Smp # => hppa64-hp-hpux11.23 696195609Smp 697195609Smp if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 698195609Smp grep -q __LP64__ 699195609Smp then 700195609Smp HP_ARCH="hppa2.0w" 701195609Smp else 702195609Smp HP_ARCH="hppa64" 703195609Smp fi 704195609Smp fi 70569408Sache echo ${HP_ARCH}-hp-hpux${HPUX_REV} 706195609Smp exit ;; 707100616Smp ia64:HP-UX:*:*) 708100616Smp HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 709100616Smp echo ia64-hp-hpux${HPUX_REV} 710195609Smp exit ;; 71169408Sache 3050*:HI-UX:*:*) 712100616Smp eval $set_cc_for_build 71383098Smp sed 's/^ //' << EOF >$dummy.c 71469408Sache #include <unistd.h> 71569408Sache int 71669408Sache main () 71769408Sache { 71869408Sache long cpu = sysconf (_SC_CPU_VERSION); 71969408Sache /* The order matters, because CPU_IS_HP_MC68K erroneously returns 72069408Sache true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 72169408Sache results, however. */ 72269408Sache if (CPU_IS_PA_RISC (cpu)) 72369408Sache { 72469408Sache switch (cpu) 72569408Sache { 72669408Sache case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 72769408Sache case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 72869408Sache case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 72969408Sache default: puts ("hppa-hitachi-hiuxwe2"); break; 73069408Sache } 73169408Sache } 73269408Sache else if (CPU_IS_HP_MC68K (cpu)) 73369408Sache puts ("m68k-hitachi-hiuxwe2"); 73469408Sache else puts ("unknown-hitachi-hiuxwe2"); 73569408Sache exit (0); 73669408Sache } 73769408SacheEOF 738195609Smp $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 739195609Smp { echo "$SYSTEM_NAME"; exit; } 74069408Sache echo unknown-hitachi-hiuxwe2 741195609Smp exit ;; 74269408Sache 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 74369408Sache echo hppa1.1-hp-bsd 744195609Smp exit ;; 74569408Sache 9000/8??:4.3bsd:*:*) 74669408Sache echo hppa1.0-hp-bsd 747195609Smp exit ;; 748100616Smp *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 74983098Smp echo hppa1.0-hp-mpeix 750195609Smp exit ;; 75169408Sache hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 75269408Sache echo hppa1.1-hp-osf 753195609Smp exit ;; 75469408Sache hp8??:OSF1:*:*) 75569408Sache echo hppa1.0-hp-osf 756195609Smp exit ;; 757100616Smp i*86:OSF1:*:*) 75869408Sache if [ -x /usr/sbin/sysversion ] ; then 75969408Sache echo ${UNAME_MACHINE}-unknown-osf1mk 76069408Sache else 76169408Sache echo ${UNAME_MACHINE}-unknown-osf1 76269408Sache fi 763195609Smp exit ;; 76469408Sache parisc*:Lites*:*:*) 76569408Sache echo hppa1.1-hp-lites 766195609Smp exit ;; 76783098Smp C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 76869408Sache echo c1-convex-bsd 769316957Sdchagin exit ;; 77083098Smp C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 77183098Smp if getsysinfo -f scalar_acc 77269408Sache then echo c32-convex-bsd 77369408Sache else echo c2-convex-bsd 77469408Sache fi 775316957Sdchagin exit ;; 77683098Smp C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 77769408Sache echo c34-convex-bsd 778316957Sdchagin exit ;; 77983098Smp C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 78069408Sache echo c38-convex-bsd 781316957Sdchagin exit ;; 78283098Smp C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 78369408Sache echo c4-convex-bsd 784316957Sdchagin exit ;; 78569408Sache CRAY*Y-MP:*:*:*) 786100616Smp echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 787195609Smp exit ;; 78869408Sache CRAY*[A-Z]90:*:*:*) 78969408Sache echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 79069408Sache | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 791100616Smp -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 792100616Smp -e 's/\.[^.]*$/.X/' 793195609Smp exit ;; 79469408Sache CRAY*TS:*:*:*) 795100616Smp echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 796195609Smp exit ;; 79783098Smp CRAY*T3E:*:*:*) 798100616Smp echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 799195609Smp exit ;; 800100616Smp CRAY*SV1:*:*:*) 801100616Smp echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 802195609Smp exit ;; 803195609Smp *:UNICOS/mp:*:*) 804195609Smp echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 805195609Smp exit ;; 806100616Smp F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 807100616Smp FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 808316957Sdchagin FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 809316957Sdchagin FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 810316957Sdchagin echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 811316957Sdchagin exit ;; 812195609Smp 5000:UNIX_System_V:4.*:*) 813316957Sdchagin FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 814316957Sdchagin FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 815316957Sdchagin echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 816195609Smp exit ;; 817100616Smp i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 81883098Smp echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 819195609Smp exit ;; 82069408Sache sparc*:BSD/OS:*:*) 82169408Sache echo sparc-unknown-bsdi${UNAME_RELEASE} 822195609Smp exit ;; 82383098Smp *:BSD/OS:*:*) 82483098Smp echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 825195609Smp exit ;; 82669408Sache *:FreeBSD:*:*) 827316957Sdchagin UNAME_PROCESSOR=`/usr/bin/uname -p` 828316957Sdchagin case ${UNAME_PROCESSOR} in 829195609Smp amd64) 830195609Smp echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 831195609Smp *) 832316957Sdchagin echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 833195609Smp esac 834195609Smp exit ;; 83569408Sache i*:CYGWIN*:*) 83669408Sache echo ${UNAME_MACHINE}-pc-cygwin 837195609Smp exit ;; 838316957Sdchagin *:MINGW64*:*) 839316957Sdchagin echo ${UNAME_MACHINE}-pc-mingw64 840316957Sdchagin exit ;; 841195609Smp *:MINGW*:*) 84269408Sache echo ${UNAME_MACHINE}-pc-mingw32 843195609Smp exit ;; 844316957Sdchagin *:MSYS*:*) 845316957Sdchagin echo ${UNAME_MACHINE}-pc-msys 846316957Sdchagin exit ;; 847195609Smp i*:windows32*:*) 848316957Sdchagin # uname -m includes "-pc" on this system. 849316957Sdchagin echo ${UNAME_MACHINE}-mingw32 850195609Smp exit ;; 851100616Smp i*:PW*:*) 852100616Smp echo ${UNAME_MACHINE}-pc-pw32 853195609Smp exit ;; 854231990Smp *:Interix*:*) 855316957Sdchagin case ${UNAME_MACHINE} in 856195609Smp x86) 857195609Smp echo i586-pc-interix${UNAME_RELEASE} 858195609Smp exit ;; 859231990Smp authenticamd | genuineintel | EM64T) 860195609Smp echo x86_64-unknown-interix${UNAME_RELEASE} 861195609Smp exit ;; 862195609Smp IA64) 863195609Smp echo ia64-unknown-interix${UNAME_RELEASE} 864195609Smp exit ;; 865195609Smp esac ;; 866195609Smp [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 867195609Smp echo i${UNAME_MACHINE}-pc-mks 868195609Smp exit ;; 869195609Smp 8664:Windows_NT:*) 870195609Smp echo x86_64-pc-mks 871195609Smp exit ;; 87283098Smp i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 87383098Smp # How do we know it's Interix rather than the generic POSIX subsystem? 87483098Smp # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 87583098Smp # UNAME_MACHINE based on the output of uname instead of i386? 876195609Smp echo i586-pc-interix 877195609Smp exit ;; 87883098Smp i*:UWIN*:*) 87983098Smp echo ${UNAME_MACHINE}-pc-uwin 880195609Smp exit ;; 881195609Smp amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 882195609Smp echo x86_64-unknown-cygwin 883195609Smp exit ;; 88469408Sache p*:CYGWIN*:*) 88569408Sache echo powerpcle-unknown-cygwin 886195609Smp exit ;; 88769408Sache prep*:SunOS:5.*:*) 88869408Sache echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 889195609Smp exit ;; 89069408Sache *:GNU:*:*) 891195609Smp # the GNU system 892316957Sdchagin echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 893195609Smp exit ;; 894195609Smp *:GNU/*:*:*) 895195609Smp # other systems with GNU libc and userland 896316957Sdchagin echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} 897195609Smp exit ;; 898100616Smp i*86:Minix:*:*) 899100616Smp echo ${UNAME_MACHINE}-pc-minix 900195609Smp exit ;; 901316957Sdchagin aarch64:Linux:*:*) 902316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 903316957Sdchagin exit ;; 904316957Sdchagin aarch64_be:Linux:*:*) 905316957Sdchagin UNAME_MACHINE=aarch64_be 906316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 907316957Sdchagin exit ;; 908231990Smp alpha:Linux:*:*) 909231990Smp case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 910231990Smp EV5) UNAME_MACHINE=alphaev5 ;; 911231990Smp EV56) UNAME_MACHINE=alphaev56 ;; 912231990Smp PCA56) UNAME_MACHINE=alphapca56 ;; 913231990Smp PCA57) UNAME_MACHINE=alphapca56 ;; 914231990Smp EV6) UNAME_MACHINE=alphaev6 ;; 915231990Smp EV67) UNAME_MACHINE=alphaev67 ;; 916231990Smp EV68*) UNAME_MACHINE=alphaev68 ;; 917316957Sdchagin esac 918231990Smp objdump --private-headers /bin/sh | grep -q ld.so.1 919316957Sdchagin if test "$?" = 0 ; then LIBC="gnulibc1" ; fi 920316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 921231990Smp exit ;; 922316957Sdchagin arc:Linux:*:* | arceb:Linux:*:*) 923316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 924316957Sdchagin exit ;; 925100616Smp arm*:Linux:*:*) 926195609Smp eval $set_cc_for_build 927195609Smp if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 928195609Smp | grep -q __ARM_EABI__ 929195609Smp then 930316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 931195609Smp else 932316957Sdchagin if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 933316957Sdchagin | grep -q __ARM_PCS_VFP 934316957Sdchagin then 935316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi 936316957Sdchagin else 937316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf 938316957Sdchagin fi 939195609Smp fi 940195609Smp exit ;; 941195609Smp avr32*:Linux:*:*) 942316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 943195609Smp exit ;; 944195609Smp cris:Linux:*:*) 945316957Sdchagin echo ${UNAME_MACHINE}-axis-linux-${LIBC} 946195609Smp exit ;; 947195609Smp crisv32:Linux:*:*) 948316957Sdchagin echo ${UNAME_MACHINE}-axis-linux-${LIBC} 949195609Smp exit ;; 950316957Sdchagin e2k:Linux:*:*) 951316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 952316957Sdchagin exit ;; 953195609Smp frv:Linux:*:*) 954316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 955195609Smp exit ;; 956316957Sdchagin hexagon:Linux:*:*) 957316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 958316957Sdchagin exit ;; 959231990Smp i*86:Linux:*:*) 960316957Sdchagin echo ${UNAME_MACHINE}-pc-linux-${LIBC} 961231990Smp exit ;; 962100616Smp ia64:Linux:*:*) 963316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 964195609Smp exit ;; 965195609Smp m32r*:Linux:*:*) 966316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 967195609Smp exit ;; 968100616Smp m68*:Linux:*:*) 969316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 970195609Smp exit ;; 971195609Smp mips:Linux:*:* | mips64:Linux:*:*) 972100616Smp eval $set_cc_for_build 973100616Smp sed 's/^ //' << EOF >$dummy.c 974100616Smp #undef CPU 975195609Smp #undef ${UNAME_MACHINE} 976195609Smp #undef ${UNAME_MACHINE}el 977100616Smp #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 978195609Smp CPU=${UNAME_MACHINE}el 979100616Smp #else 980100616Smp #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 981195609Smp CPU=${UNAME_MACHINE} 982100616Smp #else 983100616Smp CPU= 984100616Smp #endif 985100616Smp #endif 986100616SmpEOF 987231990Smp eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 988316957Sdchagin test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } 989100616Smp ;; 990316957Sdchagin openrisc*:Linux:*:*) 991316957Sdchagin echo or1k-unknown-linux-${LIBC} 992195609Smp exit ;; 993316957Sdchagin or32:Linux:*:* | or1k*:Linux:*:*) 994316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 995316957Sdchagin exit ;; 996195609Smp padre:Linux:*:*) 997316957Sdchagin echo sparc-unknown-linux-${LIBC} 998195609Smp exit ;; 999231990Smp parisc64:Linux:*:* | hppa64:Linux:*:*) 1000316957Sdchagin echo hppa64-unknown-linux-${LIBC} 1001231990Smp exit ;; 1002100616Smp parisc:Linux:*:* | hppa:Linux:*:*) 1003100616Smp # Look for CPU level 1004100616Smp case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 1005316957Sdchagin PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; 1006316957Sdchagin PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; 1007316957Sdchagin *) echo hppa-unknown-linux-${LIBC} ;; 1008100616Smp esac 1009195609Smp exit ;; 1010231990Smp ppc64:Linux:*:*) 1011316957Sdchagin echo powerpc64-unknown-linux-${LIBC} 1012195609Smp exit ;; 1013231990Smp ppc:Linux:*:*) 1014316957Sdchagin echo powerpc-unknown-linux-${LIBC} 1015231990Smp exit ;; 1016316957Sdchagin ppc64le:Linux:*:*) 1017316957Sdchagin echo powerpc64le-unknown-linux-${LIBC} 1018316957Sdchagin exit ;; 1019316957Sdchagin ppcle:Linux:*:*) 1020316957Sdchagin echo powerpcle-unknown-linux-${LIBC} 1021316957Sdchagin exit ;; 1022100616Smp s390:Linux:*:* | s390x:Linux:*:*) 1023316957Sdchagin echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 1024195609Smp exit ;; 1025195609Smp sh64*:Linux:*:*) 1026316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1027195609Smp exit ;; 1028100616Smp sh*:Linux:*:*) 1029316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1030195609Smp exit ;; 1031100616Smp sparc:Linux:*:* | sparc64:Linux:*:*) 1032316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1033195609Smp exit ;; 1034316957Sdchagin tile*:Linux:*:*) 1035316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1036316957Sdchagin exit ;; 1037195609Smp vax:Linux:*:*) 1038316957Sdchagin echo ${UNAME_MACHINE}-dec-linux-${LIBC} 1039195609Smp exit ;; 1040100616Smp x86_64:Linux:*:*) 1041316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1042195609Smp exit ;; 1043195609Smp xtensa*:Linux:*:*) 1044316957Sdchagin echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1045195609Smp exit ;; 1046100616Smp i*86:DYNIX/ptx:4*:*) 1047100616Smp # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1048100616Smp # earlier versions are messed up and put the nodename in both 1049100616Smp # sysname and nodename. 105069408Sache echo i386-sequent-sysv4 1051195609Smp exit ;; 1052100616Smp i*86:UNIX_SV:4.2MP:2.*) 1053316957Sdchagin # Unixware is an offshoot of SVR4, but it has its own version 1054316957Sdchagin # number series starting with 2... 1055316957Sdchagin # I am not positive that other SVR4 systems won't match this, 105669408Sache # I just have to hope. -- rms. 1057316957Sdchagin # Use sysv4.2uw... so that sysv4* matches it. 105869408Sache echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1059195609Smp exit ;; 1060195609Smp i*86:OS/2:*:*) 1061195609Smp # If we were able to find `uname', then EMX Unix compatibility 1062195609Smp # is probably installed. 1063195609Smp echo ${UNAME_MACHINE}-pc-os2-emx 1064195609Smp exit ;; 1065195609Smp i*86:XTS-300:*:STOP) 1066195609Smp echo ${UNAME_MACHINE}-unknown-stop 1067195609Smp exit ;; 1068195609Smp i*86:atheos:*:*) 1069195609Smp echo ${UNAME_MACHINE}-unknown-atheos 1070195609Smp exit ;; 1071195609Smp i*86:syllable:*:*) 1072195609Smp echo ${UNAME_MACHINE}-pc-syllable 1073195609Smp exit ;; 1074195609Smp i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1075195609Smp echo i386-unknown-lynxos${UNAME_RELEASE} 1076195609Smp exit ;; 1077195609Smp i*86:*DOS:*:*) 1078195609Smp echo ${UNAME_MACHINE}-pc-msdosdjgpp 1079195609Smp exit ;; 1080100616Smp i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 108183098Smp UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 108269408Sache if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 108383098Smp echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 108469408Sache else 108583098Smp echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 108669408Sache fi 1087195609Smp exit ;; 1088195609Smp i*86:*:5:[678]*) 1089316957Sdchagin # UnixWare 7.x, OpenUNIX and OpenServer 6. 1090100616Smp case `/bin/uname -X | grep "^Machine"` in 1091100616Smp *486*) UNAME_MACHINE=i486 ;; 1092100616Smp *Pentium) UNAME_MACHINE=i586 ;; 1093100616Smp *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1094100616Smp esac 1095100616Smp echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1096195609Smp exit ;; 1097100616Smp i*86:*:3.2:*) 109869408Sache if test -f /usr/options/cb.name; then 109969408Sache UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 110069408Sache echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 110169408Sache elif /bin/uname -X 2>/dev/null >/dev/null ; then 1102100616Smp UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1103100616Smp (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1104100616Smp (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 110569408Sache && UNAME_MACHINE=i586 1106100616Smp (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 110783098Smp && UNAME_MACHINE=i686 1108100616Smp (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 110983098Smp && UNAME_MACHINE=i686 111069408Sache echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 111169408Sache else 111269408Sache echo ${UNAME_MACHINE}-pc-sysv32 111369408Sache fi 1114195609Smp exit ;; 111569408Sache pc:*:*:*) 1116100616Smp # Left here for compatibility: 1117316957Sdchagin # uname -m prints for DJGPP always 'pc', but it prints nothing about 1118316957Sdchagin # the processor, so we play safe by assuming i586. 1119195609Smp # Note: whatever this is, it MUST be the same as what config.sub 1120195609Smp # prints for the "djgpp" host, or else GDB configury will decide that 1121195609Smp # this is a cross-build. 1122195609Smp echo i586-pc-msdosdjgpp 1123316957Sdchagin exit ;; 112469408Sache Intel:Mach:3*:*) 112569408Sache echo i386-pc-mach3 1126195609Smp exit ;; 112769408Sache paragon:*:*:*) 112869408Sache echo i860-intel-osf1 1129195609Smp exit ;; 113069408Sache i860:*:4.*:*) # i860-SVR4 113169408Sache if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 113269408Sache echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 113369408Sache else # Add other i860-SVR4 vendors below as they are discovered. 113469408Sache echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 113569408Sache fi 1136195609Smp exit ;; 113769408Sache mini*:CTIX:SYS*5:*) 113869408Sache # "miniframe" 113969408Sache echo m68010-convergent-sysv 1140195609Smp exit ;; 1141195609Smp mc68k:UNIX:SYSTEM5:3.51m) 1142195609Smp echo m68k-convergent-sysv 1143195609Smp exit ;; 1144195609Smp M680?0:D-NIX:5.3:*) 1145195609Smp echo m68k-diab-dnix 1146195609Smp exit ;; 1147195609Smp M68*:*:R3V[5678]*:*) 1148195609Smp test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1149195609Smp 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) 115069408Sache OS_REL='' 115169408Sache test -r /etc/.relid \ 115269408Sache && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 115369408Sache /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1154195609Smp && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 115569408Sache /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1156195609Smp && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 115769408Sache 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1158316957Sdchagin /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1159316957Sdchagin && { echo i486-ncr-sysv4; exit; } ;; 1160195609Smp NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1161195609Smp OS_REL='.3' 1162195609Smp test -r /etc/.relid \ 1163195609Smp && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1164195609Smp /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1165195609Smp && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1166195609Smp /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1167195609Smp && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1168195609Smp /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1169195609Smp && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1170100616Smp m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 117169408Sache echo m68k-unknown-lynxos${UNAME_RELEASE} 1172195609Smp exit ;; 117369408Sache mc68030:UNIX_System_V:4.*:*) 117469408Sache echo m68k-atari-sysv4 1175195609Smp exit ;; 117669408Sache TSUNAMI:LynxOS:2.*:*) 117769408Sache echo sparc-unknown-lynxos${UNAME_RELEASE} 1178195609Smp exit ;; 1179100616Smp rs6000:LynxOS:2.*:*) 118069408Sache echo rs6000-unknown-lynxos${UNAME_RELEASE} 1181195609Smp exit ;; 1182195609Smp PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1183100616Smp echo powerpc-unknown-lynxos${UNAME_RELEASE} 1184195609Smp exit ;; 118569408Sache SM[BE]S:UNIX_SV:*:*) 118669408Sache echo mips-dde-sysv${UNAME_RELEASE} 1187195609Smp exit ;; 118883098Smp RM*:ReliantUNIX-*:*:*) 118983098Smp echo mips-sni-sysv4 1190195609Smp exit ;; 119169408Sache RM*:SINIX-*:*:*) 119269408Sache echo mips-sni-sysv4 1193195609Smp exit ;; 119469408Sache *:SINIX-*:*:*) 119569408Sache if uname -p 2>/dev/null >/dev/null ; then 119669408Sache UNAME_MACHINE=`(uname -p) 2>/dev/null` 119769408Sache echo ${UNAME_MACHINE}-sni-sysv4 119869408Sache else 119969408Sache echo ns32k-sni-sysv 120069408Sache fi 1201195609Smp exit ;; 1202316957Sdchagin PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1203316957Sdchagin # says <Richard.M.Bartel@ccMail.Census.GOV> 1204316957Sdchagin echo i586-unisys-sysv4 1205316957Sdchagin exit ;; 120669408Sache *:UNIX_System_V:4*:FTX*) 120769408Sache # From Gerald Hewes <hewes@openmarket.com>. 120869408Sache # How about differentiating between stratus architectures? -djm 120969408Sache echo hppa1.1-stratus-sysv4 1210195609Smp exit ;; 121169408Sache *:*:*:FTX*) 121269408Sache # From seanf@swdc.stratus.com. 121369408Sache echo i860-stratus-sysv4 1214195609Smp exit ;; 1215195609Smp i*86:VOS:*:*) 1216195609Smp # From Paul.Green@stratus.com. 1217195609Smp echo ${UNAME_MACHINE}-stratus-vos 1218195609Smp exit ;; 1219100616Smp *:VOS:*:*) 1220100616Smp # From Paul.Green@stratus.com. 1221100616Smp echo hppa1.1-stratus-vos 1222195609Smp exit ;; 122369408Sache mc68*:A/UX:*:*) 122469408Sache echo m68k-apple-aux${UNAME_RELEASE} 1225195609Smp exit ;; 1226100616Smp news*:NEWS-OS:6*:*) 122769408Sache echo mips-sony-newsos6 1228195609Smp exit ;; 122983098Smp R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 123069408Sache if [ -d /usr/nec ]; then 1231316957Sdchagin echo mips-nec-sysv${UNAME_RELEASE} 123269408Sache else 1233316957Sdchagin echo mips-unknown-sysv${UNAME_RELEASE} 123469408Sache fi 1235316957Sdchagin exit ;; 123669408Sache BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 123769408Sache echo powerpc-be-beos 1238195609Smp exit ;; 123969408Sache BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 124069408Sache echo powerpc-apple-beos 1241195609Smp exit ;; 124269408Sache BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 124369408Sache echo i586-pc-beos 1244195609Smp exit ;; 1245195609Smp BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1246195609Smp echo i586-pc-haiku 1247195609Smp exit ;; 1248316957Sdchagin x86_64:Haiku:*:*) 1249316957Sdchagin echo x86_64-unknown-haiku 1250316957Sdchagin exit ;; 125183098Smp SX-4:SUPER-UX:*:*) 125283098Smp echo sx4-nec-superux${UNAME_RELEASE} 1253195609Smp exit ;; 125483098Smp SX-5:SUPER-UX:*:*) 125583098Smp echo sx5-nec-superux${UNAME_RELEASE} 1256195609Smp exit ;; 1257195609Smp SX-6:SUPER-UX:*:*) 1258195609Smp echo sx6-nec-superux${UNAME_RELEASE} 1259195609Smp exit ;; 1260195609Smp SX-7:SUPER-UX:*:*) 1261195609Smp echo sx7-nec-superux${UNAME_RELEASE} 1262195609Smp exit ;; 1263195609Smp SX-8:SUPER-UX:*:*) 1264195609Smp echo sx8-nec-superux${UNAME_RELEASE} 1265195609Smp exit ;; 1266195609Smp SX-8R:SUPER-UX:*:*) 1267195609Smp echo sx8r-nec-superux${UNAME_RELEASE} 1268195609Smp exit ;; 126983098Smp Power*:Rhapsody:*:*) 127083098Smp echo powerpc-apple-rhapsody${UNAME_RELEASE} 1271195609Smp exit ;; 127283098Smp *:Rhapsody:*:*) 127383098Smp echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1274195609Smp exit ;; 1275100616Smp *:Darwin:*:*) 1276195609Smp UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1277316957Sdchagin eval $set_cc_for_build 1278316957Sdchagin if test "$UNAME_PROCESSOR" = unknown ; then 1279316957Sdchagin UNAME_PROCESSOR=powerpc 1280316957Sdchagin fi 1281316957Sdchagin if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then 1282316957Sdchagin if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1283316957Sdchagin if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1284316957Sdchagin (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1285316957Sdchagin grep IS_64BIT_ARCH >/dev/null 1286316957Sdchagin then 1287316957Sdchagin case $UNAME_PROCESSOR in 1288316957Sdchagin i386) UNAME_PROCESSOR=x86_64 ;; 1289316957Sdchagin powerpc) UNAME_PROCESSOR=powerpc64 ;; 1290316957Sdchagin esac 1291316957Sdchagin fi 1292316957Sdchagin fi 1293316957Sdchagin elif test "$UNAME_PROCESSOR" = i386 ; then 1294316957Sdchagin # Avoid executing cc on OS X 10.9, as it ships with a stub 1295316957Sdchagin # that puts up a graphical alert prompting to install 1296316957Sdchagin # developer tools. Any system running Mac OS X 10.7 or 1297316957Sdchagin # later (Darwin 11 and later) is required to have a 64-bit 1298316957Sdchagin # processor. This is not true of the ARM version of Darwin 1299316957Sdchagin # that Apple uses in portable devices. 1300316957Sdchagin UNAME_PROCESSOR=x86_64 1301316957Sdchagin fi 1302195609Smp echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1303195609Smp exit ;; 1304100616Smp *:procnto*:*:* | *:QNX:[0123456789]*:*) 1305100616Smp UNAME_PROCESSOR=`uname -p` 1306100616Smp if test "$UNAME_PROCESSOR" = "x86"; then 1307100616Smp UNAME_PROCESSOR=i386 1308100616Smp UNAME_MACHINE=pc 1309100616Smp fi 1310100616Smp echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1311195609Smp exit ;; 131283098Smp *:QNX:*:4*) 1313100616Smp echo i386-pc-qnx 1314195609Smp exit ;; 1315316957Sdchagin NEO-?:NONSTOP_KERNEL:*:*) 1316316957Sdchagin echo neo-tandem-nsk${UNAME_RELEASE} 1317316957Sdchagin exit ;; 1318316957Sdchagin NSE-*:NONSTOP_KERNEL:*:*) 1319195609Smp echo nse-tandem-nsk${UNAME_RELEASE} 1320195609Smp exit ;; 1321195609Smp NSR-?:NONSTOP_KERNEL:*:*) 1322100616Smp echo nsr-tandem-nsk${UNAME_RELEASE} 1323195609Smp exit ;; 1324100616Smp *:NonStop-UX:*:*) 1325100616Smp echo mips-compaq-nonstopux 1326195609Smp exit ;; 1327100616Smp BS2000:POSIX*:*:*) 1328100616Smp echo bs2000-siemens-sysv 1329195609Smp exit ;; 1330100616Smp DS/*:UNIX_System_V:*:*) 1331100616Smp echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1332195609Smp exit ;; 1333100616Smp *:Plan9:*:*) 1334100616Smp # "uname -m" is not consistent, so use $cputype instead. 386 1335100616Smp # is converted to i386 for consistency with other x86 1336100616Smp # operating systems. 1337100616Smp if test "$cputype" = "386"; then 1338100616Smp UNAME_MACHINE=i386 1339100616Smp else 1340100616Smp UNAME_MACHINE="$cputype" 1341100616Smp fi 1342100616Smp echo ${UNAME_MACHINE}-unknown-plan9 1343195609Smp exit ;; 1344100616Smp *:TOPS-10:*:*) 1345100616Smp echo pdp10-unknown-tops10 1346195609Smp exit ;; 1347100616Smp *:TENEX:*:*) 1348100616Smp echo pdp10-unknown-tenex 1349195609Smp exit ;; 1350100616Smp KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1351100616Smp echo pdp10-dec-tops20 1352195609Smp exit ;; 1353100616Smp XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1354100616Smp echo pdp10-xkl-tops20 1355195609Smp exit ;; 1356100616Smp *:TOPS-20:*:*) 1357100616Smp echo pdp10-unknown-tops20 1358195609Smp exit ;; 1359100616Smp *:ITS:*:*) 1360100616Smp echo pdp10-unknown-its 1361195609Smp exit ;; 1362195609Smp SEI:*:*:SEIUX) 1363316957Sdchagin echo mips-sei-seiux${UNAME_RELEASE} 1364195609Smp exit ;; 1365195609Smp *:DragonFly:*:*) 1366195609Smp echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1367195609Smp exit ;; 1368195609Smp *:*VMS:*:*) 1369316957Sdchagin UNAME_MACHINE=`(uname -p) 2>/dev/null` 1370195609Smp case "${UNAME_MACHINE}" in 1371195609Smp A*) echo alpha-dec-vms ; exit ;; 1372195609Smp I*) echo ia64-dec-vms ; exit ;; 1373195609Smp V*) echo vax-dec-vms ; exit ;; 1374195609Smp esac ;; 1375195609Smp *:XENIX:*:SysV) 1376195609Smp echo i386-pc-xenix 1377195609Smp exit ;; 1378195609Smp i*86:skyos:*:*) 1379195609Smp echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1380195609Smp exit ;; 1381195609Smp i*86:rdos:*:*) 1382195609Smp echo ${UNAME_MACHINE}-pc-rdos 1383195609Smp exit ;; 1384195609Smp i*86:AROS:*:*) 1385195609Smp echo ${UNAME_MACHINE}-pc-aros 1386195609Smp exit ;; 1387316957Sdchagin x86_64:VMkernel:*:*) 1388316957Sdchagin echo ${UNAME_MACHINE}-unknown-esx 1389316957Sdchagin exit ;; 139069408Sacheesac 139169408Sache 1392100616Smpcat >&2 <<EOF 1393100616Smp$0: unable to guess system type 139469408Sache 1395100616SmpThis script, last modified $timestamp, has failed to recognize 1396100616Smpthe operating system you are using. It is advised that you 1397100616Smpdownload the most up to date version of the config scripts from 1398100616Smp 1399195609Smp http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1400195609Smpand 1401195609Smp http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1402100616Smp 1403100616SmpIf the version you run ($0) is already up to date, please 1404100616Smpsend the following data and any information you think might be 1405100616Smppertinent to <config-patches@gnu.org> in order to provide the needed 1406100616Smpinformation to handle your system. 1407100616Smp 1408100616Smpconfig.guess timestamp = $timestamp 1409100616Smp 1410100616Smpuname -m = `(uname -m) 2>/dev/null || echo unknown` 1411100616Smpuname -r = `(uname -r) 2>/dev/null || echo unknown` 1412100616Smpuname -s = `(uname -s) 2>/dev/null || echo unknown` 1413100616Smpuname -v = `(uname -v) 2>/dev/null || echo unknown` 1414100616Smp 1415100616Smp/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1416100616Smp/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1417100616Smp 1418100616Smphostinfo = `(hostinfo) 2>/dev/null` 1419100616Smp/bin/universe = `(/bin/universe) 2>/dev/null` 1420100616Smp/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1421100616Smp/bin/arch = `(/bin/arch) 2>/dev/null` 1422100616Smp/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1423100616Smp/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1424100616Smp 1425100616SmpUNAME_MACHINE = ${UNAME_MACHINE} 1426100616SmpUNAME_RELEASE = ${UNAME_RELEASE} 1427100616SmpUNAME_SYSTEM = ${UNAME_SYSTEM} 1428100616SmpUNAME_VERSION = ${UNAME_VERSION} 1429100616SmpEOF 1430100616Smp 143169408Sacheexit 1 1432100616Smp 1433100616Smp# Local variables: 1434100616Smp# eval: (add-hook 'write-file-hooks 'time-stamp) 1435100616Smp# time-stamp-start: "timestamp='" 1436100616Smp# time-stamp-format: "%:y-%02m-%02d" 1437100616Smp# time-stamp-end: "'" 1438100616Smp# End: 1439