1117610Sdes#! /bin/sh 2117610Sdes# Attempt to guess a canonical system name. 3348980Sdes# Copyright 1992-2015 Free Software Foundation, Inc. 4117610Sdes 5348980Sdestimestamp='2015-03-04' 6117610Sdes 7117610Sdes# This file is free software; you can redistribute it and/or modify it 8117610Sdes# under the terms of the GNU General Public License as published by 9255376Sdes# the Free Software Foundation; either version 3 of the License, or 10117610Sdes# (at your option) any later version. 11117610Sdes# 12117610Sdes# This program is distributed in the hope that it will be useful, but 13117610Sdes# WITHOUT ANY WARRANTY; without even the implied warranty of 14117610Sdes# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15117610Sdes# General Public License for more details. 16117610Sdes# 17117610Sdes# You should have received a copy of the GNU General Public License 18255376Sdes# along with this program; if not, see <http://www.gnu.org/licenses/>. 19117610Sdes# 20117610Sdes# As a special exception to the GNU General Public License, if you 21117610Sdes# distribute this file as part of a program that contains a 22117610Sdes# configuration script generated by Autoconf, you may include it under 23255376Sdes# the same distribution terms that you use for the rest of that 24255376Sdes# program. This Exception is an additional permission under section 7 25255376Sdes# of the GNU General Public License, version 3 ("GPLv3"). 26117610Sdes# 27348980Sdes# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. 28117610Sdes# 29255376Sdes# You can get the latest version of this script from: 30255376Sdes# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 31255376Sdes# 32348980Sdes# Please send patches to <config-patches@gnu.org>. 33117610Sdes 34255376Sdes 35117610Sdesme=`echo "$0" | sed -e 's,.*/,,'` 36117610Sdes 37117610Sdesusage="\ 38117610SdesUsage: $0 [OPTION] 39117610Sdes 40117610SdesOutput the configuration name of the system \`$me' is run on. 41117610Sdes 42117610SdesOperation modes: 43117610Sdes -h, --help print this help, then exit 44117610Sdes -t, --time-stamp print date of last modification, then exit 45117610Sdes -v, --version print version number, then exit 46117610Sdes 47117610SdesReport bugs and patches to <config-patches@gnu.org>." 48117610Sdes 49117610Sdesversion="\ 50117610SdesGNU config.guess ($timestamp) 51117610Sdes 52117610SdesOriginally written by Per Bothner. 53348980SdesCopyright 1992-2015 Free Software Foundation, Inc. 54117610Sdes 55117610SdesThis is free software; see the source for copying conditions. There is NO 56117610Sdeswarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 57117610Sdes 58117610Sdeshelp=" 59117610SdesTry \`$me --help' for more information." 60117610Sdes 61117610Sdes# Parse command line 62117610Sdeswhile test $# -gt 0 ; do 63117610Sdes case $1 in 64117610Sdes --time-stamp | --time* | -t ) 65255376Sdes echo "$timestamp" ; exit ;; 66117610Sdes --version | -v ) 67255376Sdes echo "$version" ; exit ;; 68117610Sdes --help | --h* | -h ) 69255376Sdes echo "$usage"; exit ;; 70117610Sdes -- ) # Stop option processing 71117610Sdes shift; break ;; 72117610Sdes - ) # Use stdin as input. 73117610Sdes break ;; 74117610Sdes -* ) 75117610Sdes echo "$me: invalid option $1$help" >&2 76117610Sdes exit 1 ;; 77117610Sdes * ) 78117610Sdes break ;; 79117610Sdes esac 80117610Sdesdone 81117610Sdes 82117610Sdesif test $# != 0; then 83117610Sdes echo "$me: too many arguments$help" >&2 84117610Sdes exit 1 85117610Sdesfi 86117610Sdes 87117610Sdestrap 'exit 1' 1 2 15 88117610Sdes 89117610Sdes# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 90117610Sdes# compiler to aid in system detection is discouraged as it requires 91117610Sdes# temporary files to be created and, as you can see below, it is a 92117610Sdes# headache to deal with in a portable fashion. 93117610Sdes 94117610Sdes# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 95117610Sdes# use `HOST_CC' if defined, but it is deprecated. 96117610Sdes 97117610Sdes# Portable tmp directory creation inspired by the Autoconf team. 98117610Sdes 99117610Sdesset_cc_for_build=' 100117610Sdestrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 101117610Sdestrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 102117610Sdes: ${TMPDIR=/tmp} ; 103255376Sdes { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 104117610Sdes { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 105117610Sdes { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 106117610Sdes { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 107117610Sdesdummy=$tmp/dummy ; 108117610Sdestmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 109117610Sdescase $CC_FOR_BUILD,$HOST_CC,$CC in 110117610Sdes ,,) echo "int x;" > $dummy.c ; 111117610Sdes for c in cc gcc c89 c99 ; do 112117610Sdes if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 113117610Sdes CC_FOR_BUILD="$c"; break ; 114117610Sdes fi ; 115117610Sdes done ; 116117610Sdes if test x"$CC_FOR_BUILD" = x ; then 117117610Sdes CC_FOR_BUILD=no_compiler_found ; 118117610Sdes fi 119117610Sdes ;; 120117610Sdes ,,*) CC_FOR_BUILD=$CC ;; 121117610Sdes ,*,*) CC_FOR_BUILD=$HOST_CC ;; 122255376Sdesesac ; set_cc_for_build= ;' 123117610Sdes 124117610Sdes# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 125117610Sdes# (ghazi@noc.rutgers.edu 1994-08-24) 126117610Sdesif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 127117610Sdes PATH=$PATH:/.attbin ; export PATH 128117610Sdesfi 129117610Sdes 130117610SdesUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 131117610SdesUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 132117610SdesUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 133117610SdesUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 134117610Sdes 135255376Sdescase "${UNAME_SYSTEM}" in 136255376SdesLinux|GNU|GNU/*) 137255376Sdes # If the system lacks a compiler, then just pick glibc. 138255376Sdes # We could probably try harder. 139255376Sdes LIBC=gnu 140255376Sdes 141255376Sdes eval $set_cc_for_build 142255376Sdes cat <<-EOF > $dummy.c 143255376Sdes #include <features.h> 144255376Sdes #if defined(__UCLIBC__) 145255376Sdes LIBC=uclibc 146255376Sdes #elif defined(__dietlibc__) 147255376Sdes LIBC=dietlibc 148255376Sdes #else 149255376Sdes LIBC=gnu 150255376Sdes #endif 151255376Sdes EOF 152348980Sdes eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` 153255376Sdes ;; 154255376Sdesesac 155255376Sdes 156117610Sdes# Note: order is significant - the case branches are not exclusive. 157117610Sdes 158117610Sdescase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 159117610Sdes *:NetBSD:*:*) 160117610Sdes # NetBSD (nbsd) targets should (where applicable) match one or 161255376Sdes # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 162117610Sdes # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 163117610Sdes # switched to ELF, *-*-netbsd* would select the old 164117610Sdes # object file format. This provides both forward 165117610Sdes # compatibility and a consistent mechanism for selecting the 166117610Sdes # object file format. 167117610Sdes # 168117610Sdes # Note: NetBSD doesn't particularly care about the vendor 169117610Sdes # portion of the name. We always set it to "unknown". 170117610Sdes sysctl="sysctl -n hw.machine_arch" 171348980Sdes UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ 172348980Sdes /sbin/$sysctl 2>/dev/null || \ 173348980Sdes /usr/sbin/$sysctl 2>/dev/null || \ 174348980Sdes echo unknown)` 175117610Sdes case "${UNAME_MACHINE_ARCH}" in 176117610Sdes armeb) machine=armeb-unknown ;; 177117610Sdes arm*) machine=arm-unknown ;; 178117610Sdes sh3el) machine=shl-unknown ;; 179117610Sdes sh3eb) machine=sh-unknown ;; 180255376Sdes sh5el) machine=sh5le-unknown ;; 181348980Sdes earmv*) 182348980Sdes arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` 183348980Sdes endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` 184348980Sdes machine=${arch}${endian}-unknown 185348980Sdes ;; 186117610Sdes *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 187117610Sdes esac 188117610Sdes # The Operating System including object format, if it has switched 189117610Sdes # to ELF recently, or will in the future. 190117610Sdes case "${UNAME_MACHINE_ARCH}" in 191348980Sdes arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) 192117610Sdes eval $set_cc_for_build 193117610Sdes if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 194255376Sdes | grep -q __ELF__ 195117610Sdes then 196117610Sdes # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 197117610Sdes # Return netbsd for either. FIX? 198117610Sdes os=netbsd 199117610Sdes else 200117610Sdes os=netbsdelf 201117610Sdes fi 202117610Sdes ;; 203117610Sdes *) 204255376Sdes os=netbsd 205117610Sdes ;; 206117610Sdes esac 207348980Sdes # Determine ABI tags. 208348980Sdes case "${UNAME_MACHINE_ARCH}" in 209348980Sdes earm*) 210348980Sdes expr='s/^earmv[0-9]/-eabi/;s/eb$//' 211348980Sdes abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` 212348980Sdes ;; 213348980Sdes esac 214117610Sdes # The OS release 215117610Sdes # Debian GNU/NetBSD machines have a different userland, and 216117610Sdes # thus, need a distinct triplet. However, they do not need 217117610Sdes # kernel version information, so it can be replaced with a 218117610Sdes # suitable tag, in the style of linux-gnu. 219117610Sdes case "${UNAME_VERSION}" in 220117610Sdes Debian*) 221117610Sdes release='-gnu' 222117610Sdes ;; 223117610Sdes *) 224117610Sdes release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 225117610Sdes ;; 226117610Sdes esac 227117610Sdes # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 228117610Sdes # contains redundant information, the shorter form: 229117610Sdes # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 230348980Sdes echo "${machine}-${os}${release}${abi}" 231255376Sdes exit ;; 232255376Sdes *:Bitrig:*:*) 233255376Sdes UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 234255376Sdes echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} 235255376Sdes exit ;; 236117610Sdes *:OpenBSD:*:*) 237255376Sdes UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 238255376Sdes echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 239255376Sdes exit ;; 240255376Sdes *:ekkoBSD:*:*) 241255376Sdes echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 242255376Sdes exit ;; 243255376Sdes *:SolidBSD:*:*) 244255376Sdes echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 245255376Sdes exit ;; 246255376Sdes macppc:MirBSD:*:*) 247255376Sdes echo powerpc-unknown-mirbsd${UNAME_RELEASE} 248255376Sdes exit ;; 249255376Sdes *:MirBSD:*:*) 250255376Sdes echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 251255376Sdes exit ;; 252117610Sdes alpha:OSF1:*:*) 253255376Sdes case $UNAME_RELEASE in 254255376Sdes *4.0) 255117610Sdes UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 256255376Sdes ;; 257255376Sdes *5.*) 258255376Sdes UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 259255376Sdes ;; 260255376Sdes esac 261117610Sdes # According to Compaq, /usr/sbin/psrinfo has been available on 262117610Sdes # OSF/1 and Tru64 systems produced since 1995. I hope that 263117610Sdes # covers most systems running today. This code pipes the CPU 264117610Sdes # types through head -n 1, so we only detect the type of CPU 0. 265117610Sdes ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 266117610Sdes case "$ALPHA_CPU_TYPE" in 267117610Sdes "EV4 (21064)") 268117610Sdes UNAME_MACHINE="alpha" ;; 269117610Sdes "EV4.5 (21064)") 270117610Sdes UNAME_MACHINE="alpha" ;; 271117610Sdes "LCA4 (21066/21068)") 272117610Sdes UNAME_MACHINE="alpha" ;; 273117610Sdes "EV5 (21164)") 274117610Sdes UNAME_MACHINE="alphaev5" ;; 275117610Sdes "EV5.6 (21164A)") 276117610Sdes UNAME_MACHINE="alphaev56" ;; 277117610Sdes "EV5.6 (21164PC)") 278117610Sdes UNAME_MACHINE="alphapca56" ;; 279117610Sdes "EV5.7 (21164PC)") 280117610Sdes UNAME_MACHINE="alphapca57" ;; 281117610Sdes "EV6 (21264)") 282117610Sdes UNAME_MACHINE="alphaev6" ;; 283117610Sdes "EV6.7 (21264A)") 284117610Sdes UNAME_MACHINE="alphaev67" ;; 285117610Sdes "EV6.8CB (21264C)") 286117610Sdes UNAME_MACHINE="alphaev68" ;; 287117610Sdes "EV6.8AL (21264B)") 288117610Sdes UNAME_MACHINE="alphaev68" ;; 289117610Sdes "EV6.8CX (21264D)") 290117610Sdes UNAME_MACHINE="alphaev68" ;; 291117610Sdes "EV6.9A (21264/EV69A)") 292117610Sdes UNAME_MACHINE="alphaev69" ;; 293117610Sdes "EV7 (21364)") 294117610Sdes UNAME_MACHINE="alphaev7" ;; 295117610Sdes "EV7.9 (21364A)") 296117610Sdes UNAME_MACHINE="alphaev79" ;; 297117610Sdes esac 298255376Sdes # A Pn.n version is a patched version. 299117610Sdes # A Vn.n version is a released version. 300117610Sdes # A Tn.n version is a released field test version. 301117610Sdes # A Xn.n version is an unreleased experimental baselevel. 302117610Sdes # 1.2 uses "1.2" for uname -r. 303255376Sdes echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 304255376Sdes # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 305255376Sdes exitcode=$? 306255376Sdes trap '' 0 307255376Sdes exit $exitcode ;; 308117610Sdes Alpha\ *:Windows_NT*:*) 309117610Sdes # How do we know it's Interix rather than the generic POSIX subsystem? 310117610Sdes # Should we change UNAME_MACHINE based on the output of uname instead 311117610Sdes # of the specific Alpha model? 312117610Sdes echo alpha-pc-interix 313255376Sdes exit ;; 314117610Sdes 21064:Windows_NT:50:3) 315117610Sdes echo alpha-dec-winnt3.5 316255376Sdes exit ;; 317117610Sdes Amiga*:UNIX_System_V:4.0:*) 318117610Sdes echo m68k-unknown-sysv4 319255376Sdes exit ;; 320117610Sdes *:[Aa]miga[Oo][Ss]:*:*) 321117610Sdes echo ${UNAME_MACHINE}-unknown-amigaos 322255376Sdes exit ;; 323117610Sdes *:[Mm]orph[Oo][Ss]:*:*) 324117610Sdes echo ${UNAME_MACHINE}-unknown-morphos 325255376Sdes exit ;; 326117610Sdes *:OS/390:*:*) 327117610Sdes echo i370-ibm-openedition 328255376Sdes exit ;; 329255376Sdes *:z/VM:*:*) 330255376Sdes echo s390-ibm-zvmoe 331255376Sdes exit ;; 332255376Sdes *:OS400:*:*) 333255376Sdes echo powerpc-ibm-os400 334255376Sdes exit ;; 335117610Sdes arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 336117610Sdes echo arm-acorn-riscix${UNAME_RELEASE} 337255376Sdes exit ;; 338255376Sdes arm*:riscos:*:*|arm*:RISCOS:*:*) 339255376Sdes echo arm-unknown-riscos 340255376Sdes exit ;; 341117610Sdes SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 342117610Sdes echo hppa1.1-hitachi-hiuxmpp 343255376Sdes exit ;; 344117610Sdes Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 345117610Sdes # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 346117610Sdes if test "`(/bin/universe) 2>/dev/null`" = att ; then 347117610Sdes echo pyramid-pyramid-sysv3 348117610Sdes else 349117610Sdes echo pyramid-pyramid-bsd 350117610Sdes fi 351255376Sdes exit ;; 352117610Sdes NILE*:*:*:dcosx) 353117610Sdes echo pyramid-pyramid-svr4 354255376Sdes exit ;; 355117610Sdes DRS?6000:unix:4.0:6*) 356117610Sdes echo sparc-icl-nx6 357255376Sdes exit ;; 358255376Sdes DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 359117610Sdes case `/usr/bin/uname -p` in 360255376Sdes sparc) echo sparc-icl-nx7; exit ;; 361117610Sdes esac ;; 362255376Sdes s390x:SunOS:*:*) 363255376Sdes echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 364255376Sdes exit ;; 365117610Sdes sun4H:SunOS:5.*:*) 366117610Sdes echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 367255376Sdes exit ;; 368117610Sdes sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 369117610Sdes echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 370255376Sdes exit ;; 371255376Sdes i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 372255376Sdes echo i386-pc-auroraux${UNAME_RELEASE} 373255376Sdes exit ;; 374255376Sdes i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 375255376Sdes eval $set_cc_for_build 376255376Sdes SUN_ARCH="i386" 377255376Sdes # If there is a compiler, see if it is configured for 64-bit objects. 378255376Sdes # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 379255376Sdes # This test works for both compilers. 380255376Sdes if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 381255376Sdes if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 382255376Sdes (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 383255376Sdes grep IS_64BIT_ARCH >/dev/null 384255376Sdes then 385255376Sdes SUN_ARCH="x86_64" 386255376Sdes fi 387255376Sdes fi 388255376Sdes echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 389255376Sdes exit ;; 390117610Sdes sun4*:SunOS:6*:*) 391117610Sdes # According to config.sub, this is the proper way to canonicalize 392117610Sdes # SunOS6. Hard to guess exactly what SunOS6 will be like, but 393117610Sdes # it's likely to be more like Solaris than SunOS4. 394117610Sdes echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 395255376Sdes exit ;; 396117610Sdes sun4*:SunOS:*:*) 397117610Sdes case "`/usr/bin/arch -k`" in 398117610Sdes Series*|S4*) 399117610Sdes UNAME_RELEASE=`uname -v` 400117610Sdes ;; 401117610Sdes esac 402117610Sdes # Japanese Language versions have a version number like `4.1.3-JL'. 403117610Sdes echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 404255376Sdes exit ;; 405117610Sdes sun3*:SunOS:*:*) 406117610Sdes echo m68k-sun-sunos${UNAME_RELEASE} 407255376Sdes exit ;; 408117610Sdes sun*:*:4.2BSD:*) 409117610Sdes UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 410117610Sdes test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 411117610Sdes case "`/bin/arch`" in 412117610Sdes sun3) 413117610Sdes echo m68k-sun-sunos${UNAME_RELEASE} 414117610Sdes ;; 415117610Sdes sun4) 416117610Sdes echo sparc-sun-sunos${UNAME_RELEASE} 417117610Sdes ;; 418117610Sdes esac 419255376Sdes exit ;; 420117610Sdes aushp:SunOS:*:*) 421117610Sdes echo sparc-auspex-sunos${UNAME_RELEASE} 422255376Sdes exit ;; 423117610Sdes # The situation for MiNT is a little confusing. The machine name 424117610Sdes # can be virtually everything (everything which is not 425117610Sdes # "atarist" or "atariste" at least should have a processor 426117610Sdes # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 427117610Sdes # to the lowercase version "mint" (or "freemint"). Finally 428117610Sdes # the system name "TOS" denotes a system which is actually not 429117610Sdes # MiNT. But MiNT is downward compatible to TOS, so this should 430117610Sdes # be no problem. 431117610Sdes atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 432255376Sdes echo m68k-atari-mint${UNAME_RELEASE} 433255376Sdes exit ;; 434117610Sdes atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 435117610Sdes echo m68k-atari-mint${UNAME_RELEASE} 436255376Sdes exit ;; 437117610Sdes *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 438255376Sdes echo m68k-atari-mint${UNAME_RELEASE} 439255376Sdes exit ;; 440117610Sdes milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 441255376Sdes echo m68k-milan-mint${UNAME_RELEASE} 442255376Sdes exit ;; 443117610Sdes hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 444255376Sdes echo m68k-hades-mint${UNAME_RELEASE} 445255376Sdes exit ;; 446117610Sdes *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 447255376Sdes echo m68k-unknown-mint${UNAME_RELEASE} 448255376Sdes exit ;; 449255376Sdes m68k:machten:*:*) 450255376Sdes echo m68k-apple-machten${UNAME_RELEASE} 451255376Sdes exit ;; 452117610Sdes powerpc:machten:*:*) 453117610Sdes echo powerpc-apple-machten${UNAME_RELEASE} 454255376Sdes exit ;; 455117610Sdes RISC*:Mach:*:*) 456117610Sdes echo mips-dec-mach_bsd4.3 457255376Sdes exit ;; 458117610Sdes RISC*:ULTRIX:*:*) 459117610Sdes echo mips-dec-ultrix${UNAME_RELEASE} 460255376Sdes exit ;; 461117610Sdes VAX*:ULTRIX*:*:*) 462117610Sdes echo vax-dec-ultrix${UNAME_RELEASE} 463255376Sdes exit ;; 464117610Sdes 2020:CLIX:*:* | 2430:CLIX:*:*) 465117610Sdes echo clipper-intergraph-clix${UNAME_RELEASE} 466255376Sdes exit ;; 467117610Sdes mips:*:*:UMIPS | mips:*:*:RISCos) 468117610Sdes eval $set_cc_for_build 469117610Sdes sed 's/^ //' << EOF >$dummy.c 470117610Sdes#ifdef __cplusplus 471117610Sdes#include <stdio.h> /* for printf() prototype */ 472117610Sdes int main (int argc, char *argv[]) { 473117610Sdes#else 474117610Sdes int main (argc, argv) int argc; char *argv[]; { 475117610Sdes#endif 476117610Sdes #if defined (host_mips) && defined (MIPSEB) 477117610Sdes #if defined (SYSTYPE_SYSV) 478117610Sdes printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 479117610Sdes #endif 480117610Sdes #if defined (SYSTYPE_SVR4) 481117610Sdes printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 482117610Sdes #endif 483117610Sdes #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 484117610Sdes printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 485117610Sdes #endif 486117610Sdes #endif 487117610Sdes exit (-1); 488117610Sdes } 489117610SdesEOF 490255376Sdes $CC_FOR_BUILD -o $dummy $dummy.c && 491255376Sdes dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 492255376Sdes SYSTEM_NAME=`$dummy $dummyarg` && 493255376Sdes { echo "$SYSTEM_NAME"; exit; } 494117610Sdes echo mips-mips-riscos${UNAME_RELEASE} 495255376Sdes exit ;; 496117610Sdes Motorola:PowerMAX_OS:*:*) 497117610Sdes echo powerpc-motorola-powermax 498255376Sdes exit ;; 499117610Sdes Motorola:*:4.3:PL8-*) 500117610Sdes echo powerpc-harris-powermax 501255376Sdes exit ;; 502117610Sdes Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 503117610Sdes echo powerpc-harris-powermax 504255376Sdes exit ;; 505117610Sdes Night_Hawk:Power_UNIX:*:*) 506117610Sdes echo powerpc-harris-powerunix 507255376Sdes exit ;; 508117610Sdes m88k:CX/UX:7*:*) 509117610Sdes echo m88k-harris-cxux7 510255376Sdes exit ;; 511117610Sdes m88k:*:4*:R4*) 512117610Sdes echo m88k-motorola-sysv4 513255376Sdes exit ;; 514117610Sdes m88k:*:3*:R3*) 515117610Sdes echo m88k-motorola-sysv3 516255376Sdes exit ;; 517117610Sdes AViiON:dgux:*:*) 518255376Sdes # DG/UX returns AViiON for all architectures 519255376Sdes UNAME_PROCESSOR=`/usr/bin/uname -p` 520117610Sdes if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 521117610Sdes then 522117610Sdes if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 523117610Sdes [ ${TARGET_BINARY_INTERFACE}x = x ] 524117610Sdes then 525117610Sdes echo m88k-dg-dgux${UNAME_RELEASE} 526117610Sdes else 527117610Sdes echo m88k-dg-dguxbcs${UNAME_RELEASE} 528117610Sdes fi 529117610Sdes else 530117610Sdes echo i586-dg-dgux${UNAME_RELEASE} 531117610Sdes fi 532255376Sdes exit ;; 533117610Sdes M88*:DolphinOS:*:*) # DolphinOS (SVR3) 534117610Sdes echo m88k-dolphin-sysv3 535255376Sdes exit ;; 536117610Sdes M88*:*:R3*:*) 537117610Sdes # Delta 88k system running SVR3 538117610Sdes echo m88k-motorola-sysv3 539255376Sdes exit ;; 540117610Sdes XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 541117610Sdes echo m88k-tektronix-sysv3 542255376Sdes exit ;; 543117610Sdes Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 544117610Sdes echo m68k-tektronix-bsd 545255376Sdes exit ;; 546117610Sdes *:IRIX*:*:*) 547117610Sdes echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 548255376Sdes exit ;; 549117610Sdes ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 550255376Sdes echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 551255376Sdes exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 552117610Sdes i*86:AIX:*:*) 553117610Sdes echo i386-ibm-aix 554255376Sdes exit ;; 555117610Sdes ia64:AIX:*:*) 556117610Sdes if [ -x /usr/bin/oslevel ] ; then 557117610Sdes IBM_REV=`/usr/bin/oslevel` 558117610Sdes else 559117610Sdes IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 560117610Sdes fi 561117610Sdes echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 562255376Sdes exit ;; 563117610Sdes *:AIX:2:3) 564117610Sdes if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 565117610Sdes eval $set_cc_for_build 566117610Sdes sed 's/^ //' << EOF >$dummy.c 567117610Sdes #include <sys/systemcfg.h> 568117610Sdes 569117610Sdes main() 570117610Sdes { 571117610Sdes if (!__power_pc()) 572117610Sdes exit(1); 573117610Sdes puts("powerpc-ibm-aix3.2.5"); 574117610Sdes exit(0); 575117610Sdes } 576117610SdesEOF 577255376Sdes if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 578255376Sdes then 579255376Sdes echo "$SYSTEM_NAME" 580255376Sdes else 581255376Sdes echo rs6000-ibm-aix3.2.5 582255376Sdes fi 583117610Sdes elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 584117610Sdes echo rs6000-ibm-aix3.2.4 585117610Sdes else 586117610Sdes echo rs6000-ibm-aix3.2 587117610Sdes fi 588255376Sdes exit ;; 589255376Sdes *:AIX:*:[4567]) 590117610Sdes IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 591117610Sdes if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 592117610Sdes IBM_ARCH=rs6000 593117610Sdes else 594117610Sdes IBM_ARCH=powerpc 595117610Sdes fi 596348980Sdes if [ -x /usr/bin/lslpp ] ; then 597348980Sdes IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | 598348980Sdes awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` 599117610Sdes else 600117610Sdes IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 601117610Sdes fi 602117610Sdes echo ${IBM_ARCH}-ibm-aix${IBM_REV} 603255376Sdes exit ;; 604117610Sdes *:AIX:*:*) 605117610Sdes echo rs6000-ibm-aix 606255376Sdes exit ;; 607117610Sdes ibmrt:4.4BSD:*|romp-ibm:BSD:*) 608117610Sdes echo romp-ibm-bsd4.4 609255376Sdes exit ;; 610117610Sdes ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 611117610Sdes echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 612255376Sdes exit ;; # report: romp-ibm BSD 4.3 613117610Sdes *:BOSX:*:*) 614117610Sdes echo rs6000-bull-bosx 615255376Sdes exit ;; 616117610Sdes DPX/2?00:B.O.S.:*:*) 617117610Sdes echo m68k-bull-sysv3 618255376Sdes exit ;; 619117610Sdes 9000/[34]??:4.3bsd:1.*:*) 620117610Sdes echo m68k-hp-bsd 621255376Sdes exit ;; 622117610Sdes hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 623117610Sdes echo m68k-hp-bsd4.4 624255376Sdes exit ;; 625117610Sdes 9000/[34678]??:HP-UX:*:*) 626117610Sdes HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 627117610Sdes case "${UNAME_MACHINE}" in 628117610Sdes 9000/31? ) HP_ARCH=m68000 ;; 629117610Sdes 9000/[34]?? ) HP_ARCH=m68k ;; 630117610Sdes 9000/[678][0-9][0-9]) 631117610Sdes if [ -x /usr/bin/getconf ]; then 632117610Sdes sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 633255376Sdes sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 634255376Sdes case "${sc_cpu_version}" in 635255376Sdes 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 636255376Sdes 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 637255376Sdes 532) # CPU_PA_RISC2_0 638255376Sdes case "${sc_kernel_bits}" in 639255376Sdes 32) HP_ARCH="hppa2.0n" ;; 640255376Sdes 64) HP_ARCH="hppa2.0w" ;; 641117610Sdes '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 642255376Sdes esac ;; 643255376Sdes esac 644117610Sdes fi 645117610Sdes if [ "${HP_ARCH}" = "" ]; then 646117610Sdes eval $set_cc_for_build 647255376Sdes sed 's/^ //' << EOF >$dummy.c 648117610Sdes 649255376Sdes #define _HPUX_SOURCE 650255376Sdes #include <stdlib.h> 651255376Sdes #include <unistd.h> 652117610Sdes 653255376Sdes int main () 654255376Sdes { 655255376Sdes #if defined(_SC_KERNEL_BITS) 656255376Sdes long bits = sysconf(_SC_KERNEL_BITS); 657255376Sdes #endif 658255376Sdes long cpu = sysconf (_SC_CPU_VERSION); 659117610Sdes 660255376Sdes switch (cpu) 661255376Sdes { 662255376Sdes case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 663255376Sdes case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 664255376Sdes case CPU_PA_RISC2_0: 665255376Sdes #if defined(_SC_KERNEL_BITS) 666255376Sdes switch (bits) 667255376Sdes { 668255376Sdes case 64: puts ("hppa2.0w"); break; 669255376Sdes case 32: puts ("hppa2.0n"); break; 670255376Sdes default: puts ("hppa2.0"); break; 671255376Sdes } break; 672255376Sdes #else /* !defined(_SC_KERNEL_BITS) */ 673255376Sdes puts ("hppa2.0"); break; 674255376Sdes #endif 675255376Sdes default: puts ("hppa1.0"); break; 676255376Sdes } 677255376Sdes exit (0); 678255376Sdes } 679117610SdesEOF 680117610Sdes (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 681117610Sdes test -z "$HP_ARCH" && HP_ARCH=hppa 682117610Sdes fi ;; 683117610Sdes esac 684117610Sdes if [ ${HP_ARCH} = "hppa2.0w" ] 685117610Sdes then 686255376Sdes eval $set_cc_for_build 687255376Sdes 688255376Sdes # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 689255376Sdes # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 690255376Sdes # generating 64-bit code. GNU and HP use different nomenclature: 691255376Sdes # 692255376Sdes # $ CC_FOR_BUILD=cc ./config.guess 693255376Sdes # => hppa2.0w-hp-hpux11.23 694255376Sdes # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 695255376Sdes # => hppa64-hp-hpux11.23 696255376Sdes 697255376Sdes if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 698255376Sdes grep -q __LP64__ 699117610Sdes then 700117610Sdes HP_ARCH="hppa2.0w" 701117610Sdes else 702117610Sdes HP_ARCH="hppa64" 703117610Sdes fi 704117610Sdes fi 705117610Sdes echo ${HP_ARCH}-hp-hpux${HPUX_REV} 706255376Sdes exit ;; 707117610Sdes ia64:HP-UX:*:*) 708117610Sdes HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 709117610Sdes echo ia64-hp-hpux${HPUX_REV} 710255376Sdes exit ;; 711117610Sdes 3050*:HI-UX:*:*) 712117610Sdes eval $set_cc_for_build 713117610Sdes sed 's/^ //' << EOF >$dummy.c 714117610Sdes #include <unistd.h> 715117610Sdes int 716117610Sdes main () 717117610Sdes { 718117610Sdes long cpu = sysconf (_SC_CPU_VERSION); 719117610Sdes /* The order matters, because CPU_IS_HP_MC68K erroneously returns 720117610Sdes true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 721117610Sdes results, however. */ 722117610Sdes if (CPU_IS_PA_RISC (cpu)) 723117610Sdes { 724117610Sdes switch (cpu) 725117610Sdes { 726117610Sdes case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 727117610Sdes case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 728117610Sdes case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 729117610Sdes default: puts ("hppa-hitachi-hiuxwe2"); break; 730117610Sdes } 731117610Sdes } 732117610Sdes else if (CPU_IS_HP_MC68K (cpu)) 733117610Sdes puts ("m68k-hitachi-hiuxwe2"); 734117610Sdes else puts ("unknown-hitachi-hiuxwe2"); 735117610Sdes exit (0); 736117610Sdes } 737117610SdesEOF 738255376Sdes $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 739255376Sdes { echo "$SYSTEM_NAME"; exit; } 740117610Sdes echo unknown-hitachi-hiuxwe2 741255376Sdes exit ;; 742117610Sdes 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 743117610Sdes echo hppa1.1-hp-bsd 744255376Sdes exit ;; 745117610Sdes 9000/8??:4.3bsd:*:*) 746117610Sdes echo hppa1.0-hp-bsd 747255376Sdes exit ;; 748117610Sdes *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 749117610Sdes echo hppa1.0-hp-mpeix 750255376Sdes exit ;; 751117610Sdes hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 752117610Sdes echo hppa1.1-hp-osf 753255376Sdes exit ;; 754117610Sdes hp8??:OSF1:*:*) 755117610Sdes echo hppa1.0-hp-osf 756255376Sdes exit ;; 757117610Sdes i*86:OSF1:*:*) 758117610Sdes if [ -x /usr/sbin/sysversion ] ; then 759117610Sdes echo ${UNAME_MACHINE}-unknown-osf1mk 760117610Sdes else 761117610Sdes echo ${UNAME_MACHINE}-unknown-osf1 762117610Sdes fi 763255376Sdes exit ;; 764117610Sdes parisc*:Lites*:*:*) 765117610Sdes echo hppa1.1-hp-lites 766255376Sdes exit ;; 767117610Sdes C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 768117610Sdes echo c1-convex-bsd 769255376Sdes exit ;; 770117610Sdes C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 771117610Sdes if getsysinfo -f scalar_acc 772117610Sdes then echo c32-convex-bsd 773117610Sdes else echo c2-convex-bsd 774117610Sdes fi 775255376Sdes exit ;; 776117610Sdes C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 777117610Sdes echo c34-convex-bsd 778255376Sdes exit ;; 779117610Sdes C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 780117610Sdes echo c38-convex-bsd 781255376Sdes exit ;; 782117610Sdes C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 783117610Sdes echo c4-convex-bsd 784255376Sdes exit ;; 785117610Sdes CRAY*Y-MP:*:*:*) 786117610Sdes echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 787255376Sdes exit ;; 788117610Sdes CRAY*[A-Z]90:*:*:*) 789117610Sdes echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 790117610Sdes | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 791117610Sdes -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 792117610Sdes -e 's/\.[^.]*$/.X/' 793255376Sdes exit ;; 794117610Sdes CRAY*TS:*:*:*) 795117610Sdes echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 796255376Sdes exit ;; 797117610Sdes CRAY*T3E:*:*:*) 798117610Sdes echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 799255376Sdes exit ;; 800117610Sdes CRAY*SV1:*:*:*) 801117610Sdes echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 802255376Sdes exit ;; 803117610Sdes *:UNICOS/mp:*:*) 804255376Sdes echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 805255376Sdes exit ;; 806117610Sdes F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 807117610Sdes FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 808255376Sdes FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 809255376Sdes FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 810255376Sdes echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 811255376Sdes exit ;; 812255376Sdes 5000:UNIX_System_V:4.*:*) 813255376Sdes FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 814255376Sdes FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 815255376Sdes echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 816255376Sdes exit ;; 817117610Sdes i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 818117610Sdes echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 819255376Sdes exit ;; 820117610Sdes sparc*:BSD/OS:*:*) 821117610Sdes echo sparc-unknown-bsdi${UNAME_RELEASE} 822255376Sdes exit ;; 823117610Sdes *:BSD/OS:*:*) 824117610Sdes echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 825255376Sdes exit ;; 826255376Sdes *:FreeBSD:*:*) 827255376Sdes UNAME_PROCESSOR=`/usr/bin/uname -p` 828255376Sdes echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 829255376Sdes exit ;; 830117610Sdes i*:CYGWIN*:*) 831117610Sdes echo ${UNAME_MACHINE}-pc-cygwin 832255376Sdes exit ;; 833255376Sdes *:MINGW64*:*) 834255376Sdes echo ${UNAME_MACHINE}-pc-mingw64 835255376Sdes exit ;; 836255376Sdes *:MINGW*:*) 837117610Sdes echo ${UNAME_MACHINE}-pc-mingw32 838255376Sdes exit ;; 839348980Sdes *:MSYS*:*) 840255376Sdes echo ${UNAME_MACHINE}-pc-msys 841255376Sdes exit ;; 842255376Sdes i*:windows32*:*) 843255376Sdes # uname -m includes "-pc" on this system. 844255376Sdes echo ${UNAME_MACHINE}-mingw32 845255376Sdes exit ;; 846117610Sdes i*:PW*:*) 847117610Sdes echo ${UNAME_MACHINE}-pc-pw32 848255376Sdes exit ;; 849255376Sdes *:Interix*:*) 850255376Sdes case ${UNAME_MACHINE} in 851255376Sdes x86) 852255376Sdes echo i586-pc-interix${UNAME_RELEASE} 853255376Sdes exit ;; 854255376Sdes authenticamd | genuineintel | EM64T) 855255376Sdes echo x86_64-unknown-interix${UNAME_RELEASE} 856255376Sdes exit ;; 857255376Sdes IA64) 858255376Sdes echo ia64-unknown-interix${UNAME_RELEASE} 859255376Sdes exit ;; 860255376Sdes esac ;; 861117610Sdes [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 862117610Sdes echo i${UNAME_MACHINE}-pc-mks 863255376Sdes exit ;; 864255376Sdes 8664:Windows_NT:*) 865255376Sdes echo x86_64-pc-mks 866255376Sdes exit ;; 867117610Sdes i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 868117610Sdes # How do we know it's Interix rather than the generic POSIX subsystem? 869117610Sdes # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 870117610Sdes # UNAME_MACHINE based on the output of uname instead of i386? 871117610Sdes echo i586-pc-interix 872255376Sdes exit ;; 873117610Sdes i*:UWIN*:*) 874117610Sdes echo ${UNAME_MACHINE}-pc-uwin 875255376Sdes exit ;; 876255376Sdes amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 877255376Sdes echo x86_64-unknown-cygwin 878255376Sdes exit ;; 879117610Sdes p*:CYGWIN*:*) 880117610Sdes echo powerpcle-unknown-cygwin 881255376Sdes exit ;; 882117610Sdes prep*:SunOS:5.*:*) 883117610Sdes echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 884255376Sdes exit ;; 885117610Sdes *:GNU:*:*) 886255376Sdes # the GNU system 887255376Sdes echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 888255376Sdes exit ;; 889255376Sdes *:GNU/*:*:*) 890255376Sdes # other systems with GNU libc and userland 891255376Sdes echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} 892255376Sdes exit ;; 893117610Sdes i*86:Minix:*:*) 894117610Sdes echo ${UNAME_MACHINE}-pc-minix 895255376Sdes exit ;; 896255376Sdes aarch64:Linux:*:*) 897255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 898255376Sdes exit ;; 899255376Sdes aarch64_be:Linux:*:*) 900255376Sdes UNAME_MACHINE=aarch64_be 901255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 902255376Sdes exit ;; 903255376Sdes alpha:Linux:*:*) 904255376Sdes case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 905255376Sdes EV5) UNAME_MACHINE=alphaev5 ;; 906255376Sdes EV56) UNAME_MACHINE=alphaev56 ;; 907255376Sdes PCA56) UNAME_MACHINE=alphapca56 ;; 908255376Sdes PCA57) UNAME_MACHINE=alphapca56 ;; 909255376Sdes EV6) UNAME_MACHINE=alphaev6 ;; 910255376Sdes EV67) UNAME_MACHINE=alphaev67 ;; 911255376Sdes EV68*) UNAME_MACHINE=alphaev68 ;; 912255376Sdes esac 913255376Sdes objdump --private-headers /bin/sh | grep -q ld.so.1 914255376Sdes if test "$?" = 0 ; then LIBC="gnulibc1" ; fi 915255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 916255376Sdes exit ;; 917255376Sdes arc:Linux:*:* | arceb:Linux:*:*) 918255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 919255376Sdes exit ;; 920117610Sdes arm*:Linux:*:*) 921255376Sdes eval $set_cc_for_build 922255376Sdes if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 923255376Sdes | grep -q __ARM_EABI__ 924255376Sdes then 925255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 926255376Sdes else 927255376Sdes if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 928255376Sdes | grep -q __ARM_PCS_VFP 929255376Sdes then 930255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi 931255376Sdes else 932255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf 933255376Sdes fi 934255376Sdes fi 935255376Sdes exit ;; 936255376Sdes avr32*:Linux:*:*) 937255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 938255376Sdes exit ;; 939117610Sdes cris:Linux:*:*) 940255376Sdes echo ${UNAME_MACHINE}-axis-linux-${LIBC} 941255376Sdes exit ;; 942255376Sdes crisv32:Linux:*:*) 943255376Sdes echo ${UNAME_MACHINE}-axis-linux-${LIBC} 944255376Sdes exit ;; 945348980Sdes e2k:Linux:*:*) 946348980Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 947348980Sdes exit ;; 948255376Sdes frv:Linux:*:*) 949255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 950255376Sdes exit ;; 951255376Sdes hexagon:Linux:*:*) 952255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 953255376Sdes exit ;; 954255376Sdes i*86:Linux:*:*) 955255376Sdes echo ${UNAME_MACHINE}-pc-linux-${LIBC} 956255376Sdes exit ;; 957117610Sdes ia64:Linux:*:*) 958255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 959255376Sdes exit ;; 960255376Sdes m32r*:Linux:*:*) 961255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 962255376Sdes exit ;; 963117610Sdes m68*:Linux:*:*) 964255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 965255376Sdes exit ;; 966255376Sdes mips:Linux:*:* | mips64:Linux:*:*) 967117610Sdes eval $set_cc_for_build 968117610Sdes sed 's/^ //' << EOF >$dummy.c 969117610Sdes #undef CPU 970255376Sdes #undef ${UNAME_MACHINE} 971255376Sdes #undef ${UNAME_MACHINE}el 972117610Sdes #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 973255376Sdes CPU=${UNAME_MACHINE}el 974117610Sdes #else 975117610Sdes #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 976255376Sdes CPU=${UNAME_MACHINE} 977117610Sdes #else 978117610Sdes CPU= 979117610Sdes #endif 980117610Sdes #endif 981117610SdesEOF 982255376Sdes eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 983255376Sdes test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } 984117610Sdes ;; 985348980Sdes openrisc*:Linux:*:*) 986348980Sdes echo or1k-unknown-linux-${LIBC} 987255376Sdes exit ;; 988348980Sdes or32:Linux:*:* | or1k*:Linux:*:*) 989255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 990255376Sdes exit ;; 991255376Sdes padre:Linux:*:*) 992255376Sdes echo sparc-unknown-linux-${LIBC} 993255376Sdes exit ;; 994255376Sdes parisc64:Linux:*:* | hppa64:Linux:*:*) 995255376Sdes echo hppa64-unknown-linux-${LIBC} 996255376Sdes exit ;; 997117610Sdes parisc:Linux:*:* | hppa:Linux:*:*) 998117610Sdes # Look for CPU level 999117610Sdes case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 1000255376Sdes PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; 1001255376Sdes PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; 1002255376Sdes *) echo hppa-unknown-linux-${LIBC} ;; 1003117610Sdes esac 1004255376Sdes exit ;; 1005255376Sdes ppc64:Linux:*:*) 1006255376Sdes echo powerpc64-unknown-linux-${LIBC} 1007255376Sdes exit ;; 1008255376Sdes ppc:Linux:*:*) 1009255376Sdes echo powerpc-unknown-linux-${LIBC} 1010255376Sdes exit ;; 1011348980Sdes ppc64le:Linux:*:*) 1012348980Sdes echo powerpc64le-unknown-linux-${LIBC} 1013348980Sdes exit ;; 1014348980Sdes ppcle:Linux:*:*) 1015348980Sdes echo powerpcle-unknown-linux-${LIBC} 1016348980Sdes exit ;; 1017117610Sdes s390:Linux:*:* | s390x:Linux:*:*) 1018255376Sdes echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 1019255376Sdes exit ;; 1020117610Sdes sh64*:Linux:*:*) 1021255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1022255376Sdes exit ;; 1023117610Sdes sh*:Linux:*:*) 1024255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1025255376Sdes exit ;; 1026117610Sdes sparc:Linux:*:* | sparc64:Linux:*:*) 1027255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1028255376Sdes exit ;; 1029255376Sdes tile*:Linux:*:*) 1030255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1031255376Sdes exit ;; 1032255376Sdes vax:Linux:*:*) 1033255376Sdes echo ${UNAME_MACHINE}-dec-linux-${LIBC} 1034255376Sdes exit ;; 1035117610Sdes x86_64:Linux:*:*) 1036255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1037255376Sdes exit ;; 1038255376Sdes xtensa*:Linux:*:*) 1039255376Sdes echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1040255376Sdes exit ;; 1041117610Sdes i*86:DYNIX/ptx:4*:*) 1042117610Sdes # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1043117610Sdes # earlier versions are messed up and put the nodename in both 1044117610Sdes # sysname and nodename. 1045117610Sdes echo i386-sequent-sysv4 1046255376Sdes exit ;; 1047117610Sdes i*86:UNIX_SV:4.2MP:2.*) 1048255376Sdes # Unixware is an offshoot of SVR4, but it has its own version 1049255376Sdes # number series starting with 2... 1050255376Sdes # I am not positive that other SVR4 systems won't match this, 1051117610Sdes # I just have to hope. -- rms. 1052255376Sdes # Use sysv4.2uw... so that sysv4* matches it. 1053117610Sdes echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1054255376Sdes exit ;; 1055117610Sdes i*86:OS/2:*:*) 1056117610Sdes # If we were able to find `uname', then EMX Unix compatibility 1057117610Sdes # is probably installed. 1058117610Sdes echo ${UNAME_MACHINE}-pc-os2-emx 1059255376Sdes exit ;; 1060117610Sdes i*86:XTS-300:*:STOP) 1061117610Sdes echo ${UNAME_MACHINE}-unknown-stop 1062255376Sdes exit ;; 1063117610Sdes i*86:atheos:*:*) 1064117610Sdes echo ${UNAME_MACHINE}-unknown-atheos 1065255376Sdes exit ;; 1066255376Sdes i*86:syllable:*:*) 1067255376Sdes echo ${UNAME_MACHINE}-pc-syllable 1068255376Sdes exit ;; 1069255376Sdes i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1070117610Sdes echo i386-unknown-lynxos${UNAME_RELEASE} 1071255376Sdes exit ;; 1072117610Sdes i*86:*DOS:*:*) 1073117610Sdes echo ${UNAME_MACHINE}-pc-msdosdjgpp 1074255376Sdes exit ;; 1075117610Sdes i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1076117610Sdes UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1077117610Sdes if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1078117610Sdes echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 1079117610Sdes else 1080117610Sdes echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1081117610Sdes fi 1082255376Sdes exit ;; 1083255376Sdes i*86:*:5:[678]*) 1084255376Sdes # UnixWare 7.x, OpenUNIX and OpenServer 6. 1085117610Sdes case `/bin/uname -X | grep "^Machine"` in 1086117610Sdes *486*) UNAME_MACHINE=i486 ;; 1087117610Sdes *Pentium) UNAME_MACHINE=i586 ;; 1088117610Sdes *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1089117610Sdes esac 1090117610Sdes echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1091255376Sdes exit ;; 1092117610Sdes i*86:*:3.2:*) 1093117610Sdes if test -f /usr/options/cb.name; then 1094117610Sdes UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1095117610Sdes echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 1096117610Sdes elif /bin/uname -X 2>/dev/null >/dev/null ; then 1097117610Sdes UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1098117610Sdes (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1099117610Sdes (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 1100117610Sdes && UNAME_MACHINE=i586 1101117610Sdes (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1102117610Sdes && UNAME_MACHINE=i686 1103117610Sdes (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1104117610Sdes && UNAME_MACHINE=i686 1105117610Sdes echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 1106117610Sdes else 1107117610Sdes echo ${UNAME_MACHINE}-pc-sysv32 1108117610Sdes fi 1109255376Sdes exit ;; 1110117610Sdes pc:*:*:*) 1111117610Sdes # Left here for compatibility: 1112255376Sdes # uname -m prints for DJGPP always 'pc', but it prints nothing about 1113255376Sdes # the processor, so we play safe by assuming i586. 1114255376Sdes # Note: whatever this is, it MUST be the same as what config.sub 1115255376Sdes # prints for the "djgpp" host, or else GDB configury will decide that 1116255376Sdes # this is a cross-build. 1117255376Sdes echo i586-pc-msdosdjgpp 1118255376Sdes exit ;; 1119117610Sdes Intel:Mach:3*:*) 1120117610Sdes echo i386-pc-mach3 1121255376Sdes exit ;; 1122117610Sdes paragon:*:*:*) 1123117610Sdes echo i860-intel-osf1 1124255376Sdes exit ;; 1125117610Sdes i860:*:4.*:*) # i860-SVR4 1126117610Sdes if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1127117610Sdes echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1128117610Sdes else # Add other i860-SVR4 vendors below as they are discovered. 1129117610Sdes echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1130117610Sdes fi 1131255376Sdes exit ;; 1132117610Sdes mini*:CTIX:SYS*5:*) 1133117610Sdes # "miniframe" 1134117610Sdes echo m68010-convergent-sysv 1135255376Sdes exit ;; 1136117610Sdes mc68k:UNIX:SYSTEM5:3.51m) 1137117610Sdes echo m68k-convergent-sysv 1138255376Sdes exit ;; 1139117610Sdes M680?0:D-NIX:5.3:*) 1140117610Sdes echo m68k-diab-dnix 1141255376Sdes exit ;; 1142255376Sdes M68*:*:R3V[5678]*:*) 1143255376Sdes test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1144255376Sdes 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) 1145117610Sdes OS_REL='' 1146117610Sdes test -r /etc/.relid \ 1147117610Sdes && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1148117610Sdes /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1149255376Sdes && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1150117610Sdes /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1151255376Sdes && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1152117610Sdes 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1153255376Sdes /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1154255376Sdes && { echo i486-ncr-sysv4; exit; } ;; 1155255376Sdes NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1156255376Sdes OS_REL='.3' 1157255376Sdes test -r /etc/.relid \ 1158255376Sdes && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1159255376Sdes /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1160255376Sdes && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1161255376Sdes /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1162255376Sdes && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1163255376Sdes /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1164255376Sdes && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1165117610Sdes m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1166117610Sdes echo m68k-unknown-lynxos${UNAME_RELEASE} 1167255376Sdes exit ;; 1168117610Sdes mc68030:UNIX_System_V:4.*:*) 1169117610Sdes echo m68k-atari-sysv4 1170255376Sdes exit ;; 1171117610Sdes TSUNAMI:LynxOS:2.*:*) 1172117610Sdes echo sparc-unknown-lynxos${UNAME_RELEASE} 1173255376Sdes exit ;; 1174117610Sdes rs6000:LynxOS:2.*:*) 1175117610Sdes echo rs6000-unknown-lynxos${UNAME_RELEASE} 1176255376Sdes exit ;; 1177255376Sdes PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1178117610Sdes echo powerpc-unknown-lynxos${UNAME_RELEASE} 1179255376Sdes exit ;; 1180117610Sdes SM[BE]S:UNIX_SV:*:*) 1181117610Sdes echo mips-dde-sysv${UNAME_RELEASE} 1182255376Sdes exit ;; 1183117610Sdes RM*:ReliantUNIX-*:*:*) 1184117610Sdes echo mips-sni-sysv4 1185255376Sdes exit ;; 1186117610Sdes RM*:SINIX-*:*:*) 1187117610Sdes echo mips-sni-sysv4 1188255376Sdes exit ;; 1189117610Sdes *:SINIX-*:*:*) 1190117610Sdes if uname -p 2>/dev/null >/dev/null ; then 1191117610Sdes UNAME_MACHINE=`(uname -p) 2>/dev/null` 1192117610Sdes echo ${UNAME_MACHINE}-sni-sysv4 1193117610Sdes else 1194117610Sdes echo ns32k-sni-sysv 1195117610Sdes fi 1196255376Sdes exit ;; 1197255376Sdes PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1198255376Sdes # says <Richard.M.Bartel@ccMail.Census.GOV> 1199255376Sdes echo i586-unisys-sysv4 1200255376Sdes exit ;; 1201117610Sdes *:UNIX_System_V:4*:FTX*) 1202117610Sdes # From Gerald Hewes <hewes@openmarket.com>. 1203117610Sdes # How about differentiating between stratus architectures? -djm 1204117610Sdes echo hppa1.1-stratus-sysv4 1205255376Sdes exit ;; 1206117610Sdes *:*:*:FTX*) 1207117610Sdes # From seanf@swdc.stratus.com. 1208117610Sdes echo i860-stratus-sysv4 1209255376Sdes exit ;; 1210255376Sdes i*86:VOS:*:*) 1211255376Sdes # From Paul.Green@stratus.com. 1212255376Sdes echo ${UNAME_MACHINE}-stratus-vos 1213255376Sdes exit ;; 1214117610Sdes *:VOS:*:*) 1215117610Sdes # From Paul.Green@stratus.com. 1216117610Sdes echo hppa1.1-stratus-vos 1217255376Sdes exit ;; 1218117610Sdes mc68*:A/UX:*:*) 1219117610Sdes echo m68k-apple-aux${UNAME_RELEASE} 1220255376Sdes exit ;; 1221117610Sdes news*:NEWS-OS:6*:*) 1222117610Sdes echo mips-sony-newsos6 1223255376Sdes exit ;; 1224117610Sdes R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1225117610Sdes if [ -d /usr/nec ]; then 1226255376Sdes echo mips-nec-sysv${UNAME_RELEASE} 1227117610Sdes else 1228255376Sdes echo mips-unknown-sysv${UNAME_RELEASE} 1229117610Sdes fi 1230255376Sdes exit ;; 1231117610Sdes BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1232117610Sdes echo powerpc-be-beos 1233255376Sdes exit ;; 1234117610Sdes BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1235117610Sdes echo powerpc-apple-beos 1236255376Sdes exit ;; 1237117610Sdes BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1238117610Sdes echo i586-pc-beos 1239255376Sdes exit ;; 1240255376Sdes BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1241255376Sdes echo i586-pc-haiku 1242255376Sdes exit ;; 1243255376Sdes x86_64:Haiku:*:*) 1244255376Sdes echo x86_64-unknown-haiku 1245255376Sdes exit ;; 1246117610Sdes SX-4:SUPER-UX:*:*) 1247117610Sdes echo sx4-nec-superux${UNAME_RELEASE} 1248255376Sdes exit ;; 1249117610Sdes SX-5:SUPER-UX:*:*) 1250117610Sdes echo sx5-nec-superux${UNAME_RELEASE} 1251255376Sdes exit ;; 1252117610Sdes SX-6:SUPER-UX:*:*) 1253117610Sdes echo sx6-nec-superux${UNAME_RELEASE} 1254255376Sdes exit ;; 1255255376Sdes SX-7:SUPER-UX:*:*) 1256255376Sdes echo sx7-nec-superux${UNAME_RELEASE} 1257255376Sdes exit ;; 1258255376Sdes SX-8:SUPER-UX:*:*) 1259255376Sdes echo sx8-nec-superux${UNAME_RELEASE} 1260255376Sdes exit ;; 1261255376Sdes SX-8R:SUPER-UX:*:*) 1262255376Sdes echo sx8r-nec-superux${UNAME_RELEASE} 1263255376Sdes exit ;; 1264117610Sdes Power*:Rhapsody:*:*) 1265117610Sdes echo powerpc-apple-rhapsody${UNAME_RELEASE} 1266255376Sdes exit ;; 1267117610Sdes *:Rhapsody:*:*) 1268117610Sdes echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1269255376Sdes exit ;; 1270117610Sdes *:Darwin:*:*) 1271255376Sdes UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1272255376Sdes eval $set_cc_for_build 1273255376Sdes if test "$UNAME_PROCESSOR" = unknown ; then 1274255376Sdes UNAME_PROCESSOR=powerpc 1275255376Sdes fi 1276348980Sdes if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then 1277348980Sdes if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1278348980Sdes if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1279348980Sdes (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1280348980Sdes grep IS_64BIT_ARCH >/dev/null 1281348980Sdes then 1282348980Sdes case $UNAME_PROCESSOR in 1283348980Sdes i386) UNAME_PROCESSOR=x86_64 ;; 1284348980Sdes powerpc) UNAME_PROCESSOR=powerpc64 ;; 1285348980Sdes esac 1286348980Sdes fi 1287255376Sdes fi 1288348980Sdes elif test "$UNAME_PROCESSOR" = i386 ; then 1289348980Sdes # Avoid executing cc on OS X 10.9, as it ships with a stub 1290348980Sdes # that puts up a graphical alert prompting to install 1291348980Sdes # developer tools. Any system running Mac OS X 10.7 or 1292348980Sdes # later (Darwin 11 and later) is required to have a 64-bit 1293348980Sdes # processor. This is not true of the ARM version of Darwin 1294348980Sdes # that Apple uses in portable devices. 1295348980Sdes UNAME_PROCESSOR=x86_64 1296255376Sdes fi 1297117610Sdes echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1298255376Sdes exit ;; 1299117610Sdes *:procnto*:*:* | *:QNX:[0123456789]*:*) 1300117610Sdes UNAME_PROCESSOR=`uname -p` 1301117610Sdes if test "$UNAME_PROCESSOR" = "x86"; then 1302117610Sdes UNAME_PROCESSOR=i386 1303117610Sdes UNAME_MACHINE=pc 1304117610Sdes fi 1305117610Sdes echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1306255376Sdes exit ;; 1307117610Sdes *:QNX:*:4*) 1308117610Sdes echo i386-pc-qnx 1309255376Sdes exit ;; 1310255376Sdes NEO-?:NONSTOP_KERNEL:*:*) 1311255376Sdes echo neo-tandem-nsk${UNAME_RELEASE} 1312255376Sdes exit ;; 1313255376Sdes NSE-*:NONSTOP_KERNEL:*:*) 1314255376Sdes echo nse-tandem-nsk${UNAME_RELEASE} 1315255376Sdes exit ;; 1316255376Sdes NSR-?:NONSTOP_KERNEL:*:*) 1317117610Sdes echo nsr-tandem-nsk${UNAME_RELEASE} 1318255376Sdes exit ;; 1319117610Sdes *:NonStop-UX:*:*) 1320117610Sdes echo mips-compaq-nonstopux 1321255376Sdes exit ;; 1322117610Sdes BS2000:POSIX*:*:*) 1323117610Sdes echo bs2000-siemens-sysv 1324255376Sdes exit ;; 1325117610Sdes DS/*:UNIX_System_V:*:*) 1326117610Sdes echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1327255376Sdes exit ;; 1328117610Sdes *:Plan9:*:*) 1329117610Sdes # "uname -m" is not consistent, so use $cputype instead. 386 1330117610Sdes # is converted to i386 for consistency with other x86 1331117610Sdes # operating systems. 1332117610Sdes if test "$cputype" = "386"; then 1333117610Sdes UNAME_MACHINE=i386 1334117610Sdes else 1335117610Sdes UNAME_MACHINE="$cputype" 1336117610Sdes fi 1337117610Sdes echo ${UNAME_MACHINE}-unknown-plan9 1338255376Sdes exit ;; 1339117610Sdes *:TOPS-10:*:*) 1340117610Sdes echo pdp10-unknown-tops10 1341255376Sdes exit ;; 1342117610Sdes *:TENEX:*:*) 1343117610Sdes echo pdp10-unknown-tenex 1344255376Sdes exit ;; 1345117610Sdes KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1346117610Sdes echo pdp10-dec-tops20 1347255376Sdes exit ;; 1348117610Sdes XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1349117610Sdes echo pdp10-xkl-tops20 1350255376Sdes exit ;; 1351117610Sdes *:TOPS-20:*:*) 1352117610Sdes echo pdp10-unknown-tops20 1353255376Sdes exit ;; 1354117610Sdes *:ITS:*:*) 1355117610Sdes echo pdp10-unknown-its 1356255376Sdes exit ;; 1357117610Sdes SEI:*:*:SEIUX) 1358255376Sdes echo mips-sei-seiux${UNAME_RELEASE} 1359255376Sdes exit ;; 1360255376Sdes *:DragonFly:*:*) 1361255376Sdes echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1362255376Sdes exit ;; 1363255376Sdes *:*VMS:*:*) 1364255376Sdes UNAME_MACHINE=`(uname -p) 2>/dev/null` 1365255376Sdes case "${UNAME_MACHINE}" in 1366255376Sdes A*) echo alpha-dec-vms ; exit ;; 1367255376Sdes I*) echo ia64-dec-vms ; exit ;; 1368255376Sdes V*) echo vax-dec-vms ; exit ;; 1369255376Sdes esac ;; 1370255376Sdes *:XENIX:*:SysV) 1371255376Sdes echo i386-pc-xenix 1372255376Sdes exit ;; 1373255376Sdes i*86:skyos:*:*) 1374255376Sdes echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1375255376Sdes exit ;; 1376255376Sdes i*86:rdos:*:*) 1377255376Sdes echo ${UNAME_MACHINE}-pc-rdos 1378255376Sdes exit ;; 1379255376Sdes i*86:AROS:*:*) 1380255376Sdes echo ${UNAME_MACHINE}-pc-aros 1381255376Sdes exit ;; 1382255376Sdes x86_64:VMkernel:*:*) 1383255376Sdes echo ${UNAME_MACHINE}-unknown-esx 1384255376Sdes exit ;; 1385117610Sdesesac 1386117610Sdes 1387117610Sdescat >&2 <<EOF 1388117610Sdes$0: unable to guess system type 1389117610Sdes 1390117610SdesThis script, last modified $timestamp, has failed to recognize 1391117610Sdesthe operating system you are using. It is advised that you 1392117610Sdesdownload the most up to date version of the config scripts from 1393117610Sdes 1394255376Sdes http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1395255376Sdesand 1396255376Sdes http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1397117610Sdes 1398117610SdesIf the version you run ($0) is already up to date, please 1399117610Sdessend the following data and any information you think might be 1400117610Sdespertinent to <config-patches@gnu.org> in order to provide the needed 1401117610Sdesinformation to handle your system. 1402117610Sdes 1403117610Sdesconfig.guess timestamp = $timestamp 1404117610Sdes 1405117610Sdesuname -m = `(uname -m) 2>/dev/null || echo unknown` 1406117610Sdesuname -r = `(uname -r) 2>/dev/null || echo unknown` 1407117610Sdesuname -s = `(uname -s) 2>/dev/null || echo unknown` 1408117610Sdesuname -v = `(uname -v) 2>/dev/null || echo unknown` 1409117610Sdes 1410117610Sdes/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1411117610Sdes/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1412117610Sdes 1413117610Sdeshostinfo = `(hostinfo) 2>/dev/null` 1414117610Sdes/bin/universe = `(/bin/universe) 2>/dev/null` 1415117610Sdes/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1416117610Sdes/bin/arch = `(/bin/arch) 2>/dev/null` 1417117610Sdes/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1418117610Sdes/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1419117610Sdes 1420117610SdesUNAME_MACHINE = ${UNAME_MACHINE} 1421117610SdesUNAME_RELEASE = ${UNAME_RELEASE} 1422117610SdesUNAME_SYSTEM = ${UNAME_SYSTEM} 1423117610SdesUNAME_VERSION = ${UNAME_VERSION} 1424117610SdesEOF 1425117610Sdes 1426117610Sdesexit 1 1427117610Sdes 1428117610Sdes# Local variables: 1429117610Sdes# eval: (add-hook 'write-file-hooks 'time-stamp) 1430117610Sdes# time-stamp-start: "timestamp='" 1431117610Sdes# time-stamp-format: "%:y-%02m-%02d" 1432117610Sdes# time-stamp-end: "'" 1433117610Sdes# End: 1434