1a53f50b9Schristos#! /bin/sh 2a53f50b9Schristos# Attempt to guess a canonical system name. 3cc576e1dSsevan# Copyright 1992-2017 Free Software Foundation, Inc. 4a53f50b9Schristos 5cc576e1dSsevantimestamp='2017-01-01' 6a53f50b9Schristos 7a53f50b9Schristos# This file is free software; you can redistribute it and/or modify it 8a53f50b9Schristos# under the terms of the GNU General Public License as published by 98bae5d40Schristos# the Free Software Foundation; either version 3 of the License, or 10a53f50b9Schristos# (at your option) any later version. 11a53f50b9Schristos# 12a53f50b9Schristos# This program is distributed in the hope that it will be useful, but 13a53f50b9Schristos# WITHOUT ANY WARRANTY; without even the implied warranty of 14a53f50b9Schristos# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15a53f50b9Schristos# General Public License for more details. 16a53f50b9Schristos# 17a53f50b9Schristos# You should have received a copy of the GNU General Public License 188bae5d40Schristos# along with this program; if not, see <http://www.gnu.org/licenses/>. 19a53f50b9Schristos# 20a53f50b9Schristos# As a special exception to the GNU General Public License, if you 21a53f50b9Schristos# distribute this file as part of a program that contains a 22a53f50b9Schristos# configuration script generated by Autoconf, you may include it under 238bae5d40Schristos# the same distribution terms that you use for the rest of that 248bae5d40Schristos# program. This Exception is an additional permission under section 7 258bae5d40Schristos# of the GNU General Public License, version 3 ("GPLv3"). 26a53f50b9Schristos# 27cc576e1dSsevan# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. 28a53f50b9Schristos# 298bae5d40Schristos# You can get the latest version of this script from: 30cc576e1dSsevan# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess 318bae5d40Schristos# 32cc576e1dSsevan# Please send patches to <config-patches@gnu.org>. 338bae5d40Schristos 34a53f50b9Schristos 35a53f50b9Schristosme=`echo "$0" | sed -e 's,.*/,,'` 36a53f50b9Schristos 37a53f50b9Schristosusage="\ 38a53f50b9SchristosUsage: $0 [OPTION] 39a53f50b9Schristos 40a53f50b9SchristosOutput the configuration name of the system \`$me' is run on. 41a53f50b9Schristos 42a53f50b9SchristosOperation modes: 43a53f50b9Schristos -h, --help print this help, then exit 44a53f50b9Schristos -t, --time-stamp print date of last modification, then exit 45a53f50b9Schristos -v, --version print version number, then exit 46a53f50b9Schristos 47a53f50b9SchristosReport bugs and patches to <config-patches@gnu.org>." 48a53f50b9Schristos 49a53f50b9Schristosversion="\ 50a53f50b9SchristosGNU config.guess ($timestamp) 51a53f50b9Schristos 52a53f50b9SchristosOriginally written by Per Bothner. 53cc576e1dSsevanCopyright 1992-2017 Free Software Foundation, Inc. 54a53f50b9Schristos 55a53f50b9SchristosThis is free software; see the source for copying conditions. There is NO 56a53f50b9Schristoswarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 57a53f50b9Schristos 58a53f50b9Schristoshelp=" 59a53f50b9SchristosTry \`$me --help' for more information." 60a53f50b9Schristos 61a53f50b9Schristos# Parse command line 62a53f50b9Schristoswhile test $# -gt 0 ; do 63a53f50b9Schristos case $1 in 64a53f50b9Schristos --time-stamp | --time* | -t ) 65a53f50b9Schristos echo "$timestamp" ; exit ;; 66a53f50b9Schristos --version | -v ) 67a53f50b9Schristos echo "$version" ; exit ;; 68a53f50b9Schristos --help | --h* | -h ) 69a53f50b9Schristos echo "$usage"; exit ;; 70a53f50b9Schristos -- ) # Stop option processing 71a53f50b9Schristos shift; break ;; 72a53f50b9Schristos - ) # Use stdin as input. 73a53f50b9Schristos break ;; 74a53f50b9Schristos -* ) 75a53f50b9Schristos echo "$me: invalid option $1$help" >&2 76a53f50b9Schristos exit 1 ;; 77a53f50b9Schristos * ) 78a53f50b9Schristos break ;; 79a53f50b9Schristos esac 80a53f50b9Schristosdone 81a53f50b9Schristos 82a53f50b9Schristosif test $# != 0; then 83a53f50b9Schristos echo "$me: too many arguments$help" >&2 84a53f50b9Schristos exit 1 85a53f50b9Schristosfi 86a53f50b9Schristos 87a53f50b9Schristostrap 'exit 1' 1 2 15 88a53f50b9Schristos 89a53f50b9Schristos# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 90a53f50b9Schristos# compiler to aid in system detection is discouraged as it requires 91a53f50b9Schristos# temporary files to be created and, as you can see below, it is a 92a53f50b9Schristos# headache to deal with in a portable fashion. 93a53f50b9Schristos 94a53f50b9Schristos# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 95a53f50b9Schristos# use `HOST_CC' if defined, but it is deprecated. 96a53f50b9Schristos 97a53f50b9Schristos# Portable tmp directory creation inspired by the Autoconf team. 98a53f50b9Schristos 99a53f50b9Schristosset_cc_for_build=' 100a53f50b9Schristostrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 101a53f50b9Schristostrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 102a53f50b9Schristos: ${TMPDIR=/tmp} ; 103a53f50b9Schristos { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 104a53f50b9Schristos { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 105a53f50b9Schristos { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 106a53f50b9Schristos { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 107a53f50b9Schristosdummy=$tmp/dummy ; 108a53f50b9Schristostmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 109a53f50b9Schristoscase $CC_FOR_BUILD,$HOST_CC,$CC in 110a53f50b9Schristos ,,) echo "int x;" > $dummy.c ; 111a53f50b9Schristos for c in cc gcc c89 c99 ; do 112a53f50b9Schristos if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 113a53f50b9Schristos CC_FOR_BUILD="$c"; break ; 114a53f50b9Schristos fi ; 115a53f50b9Schristos done ; 116a53f50b9Schristos if test x"$CC_FOR_BUILD" = x ; then 117a53f50b9Schristos CC_FOR_BUILD=no_compiler_found ; 118a53f50b9Schristos fi 119a53f50b9Schristos ;; 120a53f50b9Schristos ,,*) CC_FOR_BUILD=$CC ;; 121a53f50b9Schristos ,*,*) CC_FOR_BUILD=$HOST_CC ;; 122a53f50b9Schristosesac ; set_cc_for_build= ;' 123a53f50b9Schristos 124a53f50b9Schristos# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 125a53f50b9Schristos# (ghazi@noc.rutgers.edu 1994-08-24) 126a53f50b9Schristosif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 127a53f50b9Schristos PATH=$PATH:/.attbin ; export PATH 128a53f50b9Schristosfi 129a53f50b9Schristos 130a53f50b9SchristosUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 131a53f50b9SchristosUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 132a53f50b9SchristosUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 133a53f50b9SchristosUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 134a53f50b9Schristos 1358bae5d40Schristoscase "${UNAME_SYSTEM}" in 1368bae5d40SchristosLinux|GNU|GNU/*) 1378bae5d40Schristos # If the system lacks a compiler, then just pick glibc. 1388bae5d40Schristos # We could probably try harder. 1398bae5d40Schristos LIBC=gnu 1408bae5d40Schristos 1418bae5d40Schristos eval $set_cc_for_build 1428bae5d40Schristos cat <<-EOF > $dummy.c 1438bae5d40Schristos #include <features.h> 1448bae5d40Schristos #if defined(__UCLIBC__) 1458bae5d40Schristos LIBC=uclibc 1468bae5d40Schristos #elif defined(__dietlibc__) 1478bae5d40Schristos LIBC=dietlibc 1488bae5d40Schristos #else 1498bae5d40Schristos LIBC=gnu 1508bae5d40Schristos #endif 1518bae5d40Schristos EOF 152cc576e1dSsevan eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` 1538bae5d40Schristos ;; 1548bae5d40Schristosesac 1558bae5d40Schristos 156a53f50b9Schristos# Note: order is significant - the case branches are not exclusive. 157a53f50b9Schristos 158a53f50b9Schristoscase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 159a53f50b9Schristos *:NetBSD:*:*) 160a53f50b9Schristos # NetBSD (nbsd) targets should (where applicable) match one or 1618bae5d40Schristos # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 162a53f50b9Schristos # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 163a53f50b9Schristos # switched to ELF, *-*-netbsd* would select the old 164a53f50b9Schristos # object file format. This provides both forward 165a53f50b9Schristos # compatibility and a consistent mechanism for selecting the 166a53f50b9Schristos # object file format. 167a53f50b9Schristos # 168a53f50b9Schristos # Note: NetBSD doesn't particularly care about the vendor 169a53f50b9Schristos # portion of the name. We always set it to "unknown". 170a53f50b9Schristos sysctl="sysctl -n hw.machine_arch" 171cc576e1dSsevan UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ 172cc576e1dSsevan /sbin/$sysctl 2>/dev/null || \ 173cc576e1dSsevan /usr/sbin/$sysctl 2>/dev/null || \ 174cc576e1dSsevan echo unknown)` 175a53f50b9Schristos case "${UNAME_MACHINE_ARCH}" in 176*a8c74629Srin aarch64eb) machine=aarch64_be-unknown ;; 177a53f50b9Schristos armeb) machine=armeb-unknown ;; 178a53f50b9Schristos arm*) machine=arm-unknown ;; 179a53f50b9Schristos sh3el) machine=shl-unknown ;; 180a53f50b9Schristos sh3eb) machine=sh-unknown ;; 1814bcd344eSchristos sh5el) machine=sh5le-unknown ;; 182cc576e1dSsevan earmv*) 183cc576e1dSsevan arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` 184cc576e1dSsevan endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` 185cc576e1dSsevan machine=${arch}${endian}-unknown 186cc576e1dSsevan ;; 187a53f50b9Schristos *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 188a53f50b9Schristos esac 189a53f50b9Schristos # The Operating System including object format, if it has switched 190cc576e1dSsevan # to ELF recently (or will in the future) and ABI. 191a53f50b9Schristos case "${UNAME_MACHINE_ARCH}" in 192cc576e1dSsevan earm*) 193cc576e1dSsevan os=netbsdelf 194cc576e1dSsevan ;; 195a53f50b9Schristos arm*|i386|m68k|ns32k|sh3*|sparc|vax) 196a53f50b9Schristos eval $set_cc_for_build 197a53f50b9Schristos if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 1988bae5d40Schristos | grep -q __ELF__ 199a53f50b9Schristos then 200a53f50b9Schristos # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 201a53f50b9Schristos # Return netbsd for either. FIX? 202a53f50b9Schristos os=netbsd 203a53f50b9Schristos else 204a53f50b9Schristos os=netbsdelf 205a53f50b9Schristos fi 206a53f50b9Schristos ;; 207a53f50b9Schristos *) 208a53f50b9Schristos os=netbsd 209a53f50b9Schristos ;; 210a53f50b9Schristos esac 211cc576e1dSsevan # Determine ABI tags. 212cc576e1dSsevan case "${UNAME_MACHINE_ARCH}" in 213cc576e1dSsevan earm*) 214cc576e1dSsevan expr='s/^earmv[0-9]/-eabi/;s/eb$//' 215cc576e1dSsevan abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` 216cc576e1dSsevan ;; 217cc576e1dSsevan esac 218a53f50b9Schristos # The OS release 219a53f50b9Schristos # Debian GNU/NetBSD machines have a different userland, and 220a53f50b9Schristos # thus, need a distinct triplet. However, they do not need 221a53f50b9Schristos # kernel version information, so it can be replaced with a 222a53f50b9Schristos # suitable tag, in the style of linux-gnu. 223a53f50b9Schristos case "${UNAME_VERSION}" in 224a53f50b9Schristos Debian*) 225a53f50b9Schristos release='-gnu' 226a53f50b9Schristos ;; 227a53f50b9Schristos *) 228cc576e1dSsevan release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` 229a53f50b9Schristos ;; 230a53f50b9Schristos esac 231a53f50b9Schristos # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 232a53f50b9Schristos # contains redundant information, the shorter form: 233a53f50b9Schristos # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 234cc576e1dSsevan echo "${machine}-${os}${release}${abi}" 235a53f50b9Schristos exit ;; 2368bae5d40Schristos *:Bitrig:*:*) 2378bae5d40Schristos UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 2388bae5d40Schristos echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} 2398bae5d40Schristos exit ;; 240a53f50b9Schristos *:OpenBSD:*:*) 241a53f50b9Schristos UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 242a53f50b9Schristos echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 243a53f50b9Schristos exit ;; 244cc576e1dSsevan *:LibertyBSD:*:*) 245cc576e1dSsevan UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` 246cc576e1dSsevan echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} 247cc576e1dSsevan exit ;; 248a53f50b9Schristos *:ekkoBSD:*:*) 249a53f50b9Schristos echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 250a53f50b9Schristos exit ;; 251a53f50b9Schristos *:SolidBSD:*:*) 252a53f50b9Schristos echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 253a53f50b9Schristos exit ;; 254a53f50b9Schristos macppc:MirBSD:*:*) 2554bcd344eSchristos echo powerpc-unknown-mirbsd${UNAME_RELEASE} 256a53f50b9Schristos exit ;; 257a53f50b9Schristos *:MirBSD:*:*) 258a53f50b9Schristos echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 259a53f50b9Schristos exit ;; 260cc576e1dSsevan *:Sortix:*:*) 261cc576e1dSsevan echo ${UNAME_MACHINE}-unknown-sortix 262cc576e1dSsevan exit ;; 263a53f50b9Schristos alpha:OSF1:*:*) 264a53f50b9Schristos case $UNAME_RELEASE in 265a53f50b9Schristos *4.0) 266a53f50b9Schristos UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 267a53f50b9Schristos ;; 268a53f50b9Schristos *5.*) 269a53f50b9Schristos UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 270a53f50b9Schristos ;; 271a53f50b9Schristos esac 272a53f50b9Schristos # According to Compaq, /usr/sbin/psrinfo has been available on 273a53f50b9Schristos # OSF/1 and Tru64 systems produced since 1995. I hope that 274a53f50b9Schristos # covers most systems running today. This code pipes the CPU 275a53f50b9Schristos # types through head -n 1, so we only detect the type of CPU 0. 276a53f50b9Schristos ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 277a53f50b9Schristos case "$ALPHA_CPU_TYPE" in 278a53f50b9Schristos "EV4 (21064)") 279cc576e1dSsevan UNAME_MACHINE=alpha ;; 280a53f50b9Schristos "EV4.5 (21064)") 281cc576e1dSsevan UNAME_MACHINE=alpha ;; 282a53f50b9Schristos "LCA4 (21066/21068)") 283cc576e1dSsevan UNAME_MACHINE=alpha ;; 284a53f50b9Schristos "EV5 (21164)") 285cc576e1dSsevan UNAME_MACHINE=alphaev5 ;; 286a53f50b9Schristos "EV5.6 (21164A)") 287cc576e1dSsevan UNAME_MACHINE=alphaev56 ;; 288a53f50b9Schristos "EV5.6 (21164PC)") 289cc576e1dSsevan UNAME_MACHINE=alphapca56 ;; 290a53f50b9Schristos "EV5.7 (21164PC)") 291cc576e1dSsevan UNAME_MACHINE=alphapca57 ;; 292a53f50b9Schristos "EV6 (21264)") 293cc576e1dSsevan UNAME_MACHINE=alphaev6 ;; 294a53f50b9Schristos "EV6.7 (21264A)") 295cc576e1dSsevan UNAME_MACHINE=alphaev67 ;; 296a53f50b9Schristos "EV6.8CB (21264C)") 297cc576e1dSsevan UNAME_MACHINE=alphaev68 ;; 298a53f50b9Schristos "EV6.8AL (21264B)") 299cc576e1dSsevan UNAME_MACHINE=alphaev68 ;; 300a53f50b9Schristos "EV6.8CX (21264D)") 301cc576e1dSsevan UNAME_MACHINE=alphaev68 ;; 302a53f50b9Schristos "EV6.9A (21264/EV69A)") 303cc576e1dSsevan UNAME_MACHINE=alphaev69 ;; 304a53f50b9Schristos "EV7 (21364)") 305cc576e1dSsevan UNAME_MACHINE=alphaev7 ;; 306a53f50b9Schristos "EV7.9 (21364A)") 307cc576e1dSsevan UNAME_MACHINE=alphaev79 ;; 308a53f50b9Schristos esac 309a53f50b9Schristos # A Pn.n version is a patched version. 310a53f50b9Schristos # A Vn.n version is a released version. 311a53f50b9Schristos # A Tn.n version is a released field test version. 312a53f50b9Schristos # A Xn.n version is an unreleased experimental baselevel. 313a53f50b9Schristos # 1.2 uses "1.2" for uname -r. 314cc576e1dSsevan echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` 3158bae5d40Schristos # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 3168bae5d40Schristos exitcode=$? 3178bae5d40Schristos trap '' 0 3188bae5d40Schristos exit $exitcode ;; 319a53f50b9Schristos Alpha\ *:Windows_NT*:*) 320a53f50b9Schristos # How do we know it's Interix rather than the generic POSIX subsystem? 321a53f50b9Schristos # Should we change UNAME_MACHINE based on the output of uname instead 322a53f50b9Schristos # of the specific Alpha model? 323a53f50b9Schristos echo alpha-pc-interix 324a53f50b9Schristos exit ;; 325a53f50b9Schristos 21064:Windows_NT:50:3) 326a53f50b9Schristos echo alpha-dec-winnt3.5 327a53f50b9Schristos exit ;; 328a53f50b9Schristos Amiga*:UNIX_System_V:4.0:*) 329a53f50b9Schristos echo m68k-unknown-sysv4 330a53f50b9Schristos exit ;; 331a53f50b9Schristos *:[Aa]miga[Oo][Ss]:*:*) 332a53f50b9Schristos echo ${UNAME_MACHINE}-unknown-amigaos 333a53f50b9Schristos exit ;; 334a53f50b9Schristos *:[Mm]orph[Oo][Ss]:*:*) 335a53f50b9Schristos echo ${UNAME_MACHINE}-unknown-morphos 336a53f50b9Schristos exit ;; 337a53f50b9Schristos *:OS/390:*:*) 338a53f50b9Schristos echo i370-ibm-openedition 339a53f50b9Schristos exit ;; 340a53f50b9Schristos *:z/VM:*:*) 341a53f50b9Schristos echo s390-ibm-zvmoe 342a53f50b9Schristos exit ;; 343a53f50b9Schristos *:OS400:*:*) 344a53f50b9Schristos echo powerpc-ibm-os400 345a53f50b9Schristos exit ;; 346a53f50b9Schristos arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 347a53f50b9Schristos echo arm-acorn-riscix${UNAME_RELEASE} 348a53f50b9Schristos exit ;; 3498bae5d40Schristos arm*:riscos:*:*|arm*:RISCOS:*:*) 350a53f50b9Schristos echo arm-unknown-riscos 351a53f50b9Schristos exit ;; 352a53f50b9Schristos SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 353a53f50b9Schristos echo hppa1.1-hitachi-hiuxmpp 354a53f50b9Schristos exit ;; 355a53f50b9Schristos Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 356a53f50b9Schristos # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 357a53f50b9Schristos if test "`(/bin/universe) 2>/dev/null`" = att ; then 358a53f50b9Schristos echo pyramid-pyramid-sysv3 359a53f50b9Schristos else 360a53f50b9Schristos echo pyramid-pyramid-bsd 361a53f50b9Schristos fi 362a53f50b9Schristos exit ;; 363a53f50b9Schristos NILE*:*:*:dcosx) 364a53f50b9Schristos echo pyramid-pyramid-svr4 365a53f50b9Schristos exit ;; 366a53f50b9Schristos DRS?6000:unix:4.0:6*) 367a53f50b9Schristos echo sparc-icl-nx6 368a53f50b9Schristos exit ;; 369a53f50b9Schristos DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 370a53f50b9Schristos case `/usr/bin/uname -p` in 371a53f50b9Schristos sparc) echo sparc-icl-nx7; exit ;; 372a53f50b9Schristos esac ;; 3738bae5d40Schristos s390x:SunOS:*:*) 3748bae5d40Schristos echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3758bae5d40Schristos exit ;; 376a53f50b9Schristos sun4H:SunOS:5.*:*) 377a53f50b9Schristos echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 378a53f50b9Schristos exit ;; 379a53f50b9Schristos sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 380a53f50b9Schristos echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 381a53f50b9Schristos exit ;; 3828bae5d40Schristos i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 3838bae5d40Schristos echo i386-pc-auroraux${UNAME_RELEASE} 3848bae5d40Schristos exit ;; 3858bae5d40Schristos i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 3868bae5d40Schristos eval $set_cc_for_build 387cc576e1dSsevan SUN_ARCH=i386 3888bae5d40Schristos # If there is a compiler, see if it is configured for 64-bit objects. 3898bae5d40Schristos # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 3908bae5d40Schristos # This test works for both compilers. 391cc576e1dSsevan if [ "$CC_FOR_BUILD" != no_compiler_found ]; then 3928bae5d40Schristos if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 393cc576e1dSsevan (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 3948bae5d40Schristos grep IS_64BIT_ARCH >/dev/null 3958bae5d40Schristos then 396cc576e1dSsevan SUN_ARCH=x86_64 3978bae5d40Schristos fi 3988bae5d40Schristos fi 3998bae5d40Schristos echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 400a53f50b9Schristos exit ;; 401a53f50b9Schristos sun4*:SunOS:6*:*) 402a53f50b9Schristos # According to config.sub, this is the proper way to canonicalize 403a53f50b9Schristos # SunOS6. Hard to guess exactly what SunOS6 will be like, but 404a53f50b9Schristos # it's likely to be more like Solaris than SunOS4. 405a53f50b9Schristos echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 406a53f50b9Schristos exit ;; 407a53f50b9Schristos sun4*:SunOS:*:*) 408a53f50b9Schristos case "`/usr/bin/arch -k`" in 409a53f50b9Schristos Series*|S4*) 410a53f50b9Schristos UNAME_RELEASE=`uname -v` 411a53f50b9Schristos ;; 412a53f50b9Schristos esac 413a53f50b9Schristos # Japanese Language versions have a version number like `4.1.3-JL'. 414a53f50b9Schristos echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 415a53f50b9Schristos exit ;; 416a53f50b9Schristos sun3*:SunOS:*:*) 417a53f50b9Schristos echo m68k-sun-sunos${UNAME_RELEASE} 418a53f50b9Schristos exit ;; 419a53f50b9Schristos sun*:*:4.2BSD:*) 420a53f50b9Schristos UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 421cc576e1dSsevan test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 422a53f50b9Schristos case "`/bin/arch`" in 423a53f50b9Schristos sun3) 424a53f50b9Schristos echo m68k-sun-sunos${UNAME_RELEASE} 425a53f50b9Schristos ;; 426a53f50b9Schristos sun4) 427a53f50b9Schristos echo sparc-sun-sunos${UNAME_RELEASE} 428a53f50b9Schristos ;; 429a53f50b9Schristos esac 430a53f50b9Schristos exit ;; 431a53f50b9Schristos aushp:SunOS:*:*) 432a53f50b9Schristos echo sparc-auspex-sunos${UNAME_RELEASE} 433a53f50b9Schristos exit ;; 434a53f50b9Schristos # The situation for MiNT is a little confusing. The machine name 435a53f50b9Schristos # can be virtually everything (everything which is not 436a53f50b9Schristos # "atarist" or "atariste" at least should have a processor 437a53f50b9Schristos # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 438a53f50b9Schristos # to the lowercase version "mint" (or "freemint"). Finally 439a53f50b9Schristos # the system name "TOS" denotes a system which is actually not 440a53f50b9Schristos # MiNT. But MiNT is downward compatible to TOS, so this should 441a53f50b9Schristos # be no problem. 442a53f50b9Schristos atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 443a53f50b9Schristos echo m68k-atari-mint${UNAME_RELEASE} 444a53f50b9Schristos exit ;; 445a53f50b9Schristos atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 446a53f50b9Schristos echo m68k-atari-mint${UNAME_RELEASE} 447a53f50b9Schristos exit ;; 448a53f50b9Schristos *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 449a53f50b9Schristos echo m68k-atari-mint${UNAME_RELEASE} 450a53f50b9Schristos exit ;; 451a53f50b9Schristos milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 452a53f50b9Schristos echo m68k-milan-mint${UNAME_RELEASE} 453a53f50b9Schristos exit ;; 454a53f50b9Schristos hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 455a53f50b9Schristos echo m68k-hades-mint${UNAME_RELEASE} 456a53f50b9Schristos exit ;; 457a53f50b9Schristos *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 458a53f50b9Schristos echo m68k-unknown-mint${UNAME_RELEASE} 459a53f50b9Schristos exit ;; 460a53f50b9Schristos m68k:machten:*:*) 461a53f50b9Schristos echo m68k-apple-machten${UNAME_RELEASE} 462a53f50b9Schristos exit ;; 463a53f50b9Schristos powerpc:machten:*:*) 464a53f50b9Schristos echo powerpc-apple-machten${UNAME_RELEASE} 465a53f50b9Schristos exit ;; 466a53f50b9Schristos RISC*:Mach:*:*) 467a53f50b9Schristos echo mips-dec-mach_bsd4.3 468a53f50b9Schristos exit ;; 469a53f50b9Schristos RISC*:ULTRIX:*:*) 470a53f50b9Schristos echo mips-dec-ultrix${UNAME_RELEASE} 471a53f50b9Schristos exit ;; 472a53f50b9Schristos VAX*:ULTRIX*:*:*) 473a53f50b9Schristos echo vax-dec-ultrix${UNAME_RELEASE} 474a53f50b9Schristos exit ;; 475a53f50b9Schristos 2020:CLIX:*:* | 2430:CLIX:*:*) 476a53f50b9Schristos echo clipper-intergraph-clix${UNAME_RELEASE} 477a53f50b9Schristos exit ;; 478a53f50b9Schristos mips:*:*:UMIPS | mips:*:*:RISCos) 479a53f50b9Schristos eval $set_cc_for_build 480a53f50b9Schristos sed 's/^ //' << EOF >$dummy.c 481a53f50b9Schristos#ifdef __cplusplus 482a53f50b9Schristos#include <stdio.h> /* for printf() prototype */ 483a53f50b9Schristos int main (int argc, char *argv[]) { 484a53f50b9Schristos#else 485a53f50b9Schristos int main (argc, argv) int argc; char *argv[]; { 486a53f50b9Schristos#endif 487a53f50b9Schristos #if defined (host_mips) && defined (MIPSEB) 488a53f50b9Schristos #if defined (SYSTYPE_SYSV) 489a53f50b9Schristos printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 490a53f50b9Schristos #endif 491a53f50b9Schristos #if defined (SYSTYPE_SVR4) 492a53f50b9Schristos printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 493a53f50b9Schristos #endif 494a53f50b9Schristos #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 495a53f50b9Schristos printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 496a53f50b9Schristos #endif 497a53f50b9Schristos #endif 498a53f50b9Schristos exit (-1); 499a53f50b9Schristos } 500a53f50b9SchristosEOF 501a53f50b9Schristos $CC_FOR_BUILD -o $dummy $dummy.c && 502a53f50b9Schristos dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 503a53f50b9Schristos SYSTEM_NAME=`$dummy $dummyarg` && 504a53f50b9Schristos { echo "$SYSTEM_NAME"; exit; } 505a53f50b9Schristos echo mips-mips-riscos${UNAME_RELEASE} 506a53f50b9Schristos exit ;; 507a53f50b9Schristos Motorola:PowerMAX_OS:*:*) 508a53f50b9Schristos echo powerpc-motorola-powermax 509a53f50b9Schristos exit ;; 510a53f50b9Schristos Motorola:*:4.3:PL8-*) 511a53f50b9Schristos echo powerpc-harris-powermax 512a53f50b9Schristos exit ;; 513a53f50b9Schristos Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 514a53f50b9Schristos echo powerpc-harris-powermax 515a53f50b9Schristos exit ;; 516a53f50b9Schristos Night_Hawk:Power_UNIX:*:*) 517a53f50b9Schristos echo powerpc-harris-powerunix 518a53f50b9Schristos exit ;; 519a53f50b9Schristos m88k:CX/UX:7*:*) 520a53f50b9Schristos echo m88k-harris-cxux7 521a53f50b9Schristos exit ;; 522a53f50b9Schristos m88k:*:4*:R4*) 523a53f50b9Schristos echo m88k-motorola-sysv4 524a53f50b9Schristos exit ;; 525a53f50b9Schristos m88k:*:3*:R3*) 526a53f50b9Schristos echo m88k-motorola-sysv3 527a53f50b9Schristos exit ;; 528a53f50b9Schristos AViiON:dgux:*:*) 529a53f50b9Schristos # DG/UX returns AViiON for all architectures 530a53f50b9Schristos UNAME_PROCESSOR=`/usr/bin/uname -p` 531a53f50b9Schristos if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 532a53f50b9Schristos then 533a53f50b9Schristos if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 534a53f50b9Schristos [ ${TARGET_BINARY_INTERFACE}x = x ] 535a53f50b9Schristos then 536a53f50b9Schristos echo m88k-dg-dgux${UNAME_RELEASE} 537a53f50b9Schristos else 538a53f50b9Schristos echo m88k-dg-dguxbcs${UNAME_RELEASE} 539a53f50b9Schristos fi 540a53f50b9Schristos else 541a53f50b9Schristos echo i586-dg-dgux${UNAME_RELEASE} 542a53f50b9Schristos fi 543a53f50b9Schristos exit ;; 544a53f50b9Schristos M88*:DolphinOS:*:*) # DolphinOS (SVR3) 545a53f50b9Schristos echo m88k-dolphin-sysv3 546a53f50b9Schristos exit ;; 547a53f50b9Schristos M88*:*:R3*:*) 548a53f50b9Schristos # Delta 88k system running SVR3 549a53f50b9Schristos echo m88k-motorola-sysv3 550a53f50b9Schristos exit ;; 551a53f50b9Schristos XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 552a53f50b9Schristos echo m88k-tektronix-sysv3 553a53f50b9Schristos exit ;; 554a53f50b9Schristos Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 555a53f50b9Schristos echo m68k-tektronix-bsd 556a53f50b9Schristos exit ;; 557a53f50b9Schristos *:IRIX*:*:*) 558a53f50b9Schristos echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 559a53f50b9Schristos exit ;; 560a53f50b9Schristos ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 561a53f50b9Schristos echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 562a53f50b9Schristos exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 563a53f50b9Schristos i*86:AIX:*:*) 564a53f50b9Schristos echo i386-ibm-aix 565a53f50b9Schristos exit ;; 566a53f50b9Schristos ia64:AIX:*:*) 567a53f50b9Schristos if [ -x /usr/bin/oslevel ] ; then 568a53f50b9Schristos IBM_REV=`/usr/bin/oslevel` 569a53f50b9Schristos else 570a53f50b9Schristos IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 571a53f50b9Schristos fi 572a53f50b9Schristos echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 573a53f50b9Schristos exit ;; 574a53f50b9Schristos *:AIX:2:3) 575a53f50b9Schristos if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 576a53f50b9Schristos eval $set_cc_for_build 577a53f50b9Schristos sed 's/^ //' << EOF >$dummy.c 578a53f50b9Schristos #include <sys/systemcfg.h> 579a53f50b9Schristos 580a53f50b9Schristos main() 581a53f50b9Schristos { 582a53f50b9Schristos if (!__power_pc()) 583a53f50b9Schristos exit(1); 584a53f50b9Schristos puts("powerpc-ibm-aix3.2.5"); 585a53f50b9Schristos exit(0); 586a53f50b9Schristos } 587a53f50b9SchristosEOF 588a53f50b9Schristos if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 589a53f50b9Schristos then 590a53f50b9Schristos echo "$SYSTEM_NAME" 591a53f50b9Schristos else 592a53f50b9Schristos echo rs6000-ibm-aix3.2.5 593a53f50b9Schristos fi 594a53f50b9Schristos elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 595a53f50b9Schristos echo rs6000-ibm-aix3.2.4 596a53f50b9Schristos else 597a53f50b9Schristos echo rs6000-ibm-aix3.2 598a53f50b9Schristos fi 599a53f50b9Schristos exit ;; 6008bae5d40Schristos *:AIX:*:[4567]) 601a53f50b9Schristos IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 602a53f50b9Schristos if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 603a53f50b9Schristos IBM_ARCH=rs6000 604a53f50b9Schristos else 605a53f50b9Schristos IBM_ARCH=powerpc 606a53f50b9Schristos fi 607cc576e1dSsevan if [ -x /usr/bin/lslpp ] ; then 608cc576e1dSsevan IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | 609cc576e1dSsevan awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` 610a53f50b9Schristos else 611a53f50b9Schristos IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 612a53f50b9Schristos fi 613a53f50b9Schristos echo ${IBM_ARCH}-ibm-aix${IBM_REV} 614a53f50b9Schristos exit ;; 615a53f50b9Schristos *:AIX:*:*) 616a53f50b9Schristos echo rs6000-ibm-aix 617a53f50b9Schristos exit ;; 618a53f50b9Schristos ibmrt:4.4BSD:*|romp-ibm:BSD:*) 619a53f50b9Schristos echo romp-ibm-bsd4.4 620a53f50b9Schristos exit ;; 621a53f50b9Schristos ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 622a53f50b9Schristos echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 623a53f50b9Schristos exit ;; # report: romp-ibm BSD 4.3 624a53f50b9Schristos *:BOSX:*:*) 625a53f50b9Schristos echo rs6000-bull-bosx 626a53f50b9Schristos exit ;; 627a53f50b9Schristos DPX/2?00:B.O.S.:*:*) 628a53f50b9Schristos echo m68k-bull-sysv3 629a53f50b9Schristos exit ;; 630a53f50b9Schristos 9000/[34]??:4.3bsd:1.*:*) 631a53f50b9Schristos echo m68k-hp-bsd 632a53f50b9Schristos exit ;; 633a53f50b9Schristos hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 634a53f50b9Schristos echo m68k-hp-bsd4.4 635a53f50b9Schristos exit ;; 636a53f50b9Schristos 9000/[34678]??:HP-UX:*:*) 637a53f50b9Schristos HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 638a53f50b9Schristos case "${UNAME_MACHINE}" in 639a53f50b9Schristos 9000/31? ) HP_ARCH=m68000 ;; 640a53f50b9Schristos 9000/[34]?? ) HP_ARCH=m68k ;; 641a53f50b9Schristos 9000/[678][0-9][0-9]) 642a53f50b9Schristos if [ -x /usr/bin/getconf ]; then 643a53f50b9Schristos sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 644a53f50b9Schristos sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 645a53f50b9Schristos case "${sc_cpu_version}" in 646cc576e1dSsevan 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 647cc576e1dSsevan 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 648a53f50b9Schristos 532) # CPU_PA_RISC2_0 649a53f50b9Schristos case "${sc_kernel_bits}" in 650cc576e1dSsevan 32) HP_ARCH=hppa2.0n ;; 651cc576e1dSsevan 64) HP_ARCH=hppa2.0w ;; 652cc576e1dSsevan '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 653a53f50b9Schristos esac ;; 654a53f50b9Schristos esac 655a53f50b9Schristos fi 656a53f50b9Schristos if [ "${HP_ARCH}" = "" ]; then 657a53f50b9Schristos eval $set_cc_for_build 658a53f50b9Schristos sed 's/^ //' << EOF >$dummy.c 659a53f50b9Schristos 660a53f50b9Schristos #define _HPUX_SOURCE 661a53f50b9Schristos #include <stdlib.h> 662a53f50b9Schristos #include <unistd.h> 663a53f50b9Schristos 664a53f50b9Schristos int main () 665a53f50b9Schristos { 666a53f50b9Schristos #if defined(_SC_KERNEL_BITS) 667a53f50b9Schristos long bits = sysconf(_SC_KERNEL_BITS); 668a53f50b9Schristos #endif 669a53f50b9Schristos long cpu = sysconf (_SC_CPU_VERSION); 670a53f50b9Schristos 671a53f50b9Schristos switch (cpu) 672a53f50b9Schristos { 673a53f50b9Schristos case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 674a53f50b9Schristos case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 675a53f50b9Schristos case CPU_PA_RISC2_0: 676a53f50b9Schristos #if defined(_SC_KERNEL_BITS) 677a53f50b9Schristos switch (bits) 678a53f50b9Schristos { 679a53f50b9Schristos case 64: puts ("hppa2.0w"); break; 680a53f50b9Schristos case 32: puts ("hppa2.0n"); break; 681a53f50b9Schristos default: puts ("hppa2.0"); break; 682a53f50b9Schristos } break; 683a53f50b9Schristos #else /* !defined(_SC_KERNEL_BITS) */ 684a53f50b9Schristos puts ("hppa2.0"); break; 685a53f50b9Schristos #endif 686a53f50b9Schristos default: puts ("hppa1.0"); break; 687a53f50b9Schristos } 688a53f50b9Schristos exit (0); 689a53f50b9Schristos } 690a53f50b9SchristosEOF 691cc576e1dSsevan (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 692a53f50b9Schristos test -z "$HP_ARCH" && HP_ARCH=hppa 693a53f50b9Schristos fi ;; 694a53f50b9Schristos esac 695cc576e1dSsevan if [ ${HP_ARCH} = hppa2.0w ] 696a53f50b9Schristos then 697a53f50b9Schristos eval $set_cc_for_build 698a53f50b9Schristos 699a53f50b9Schristos # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 700a53f50b9Schristos # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 701a53f50b9Schristos # generating 64-bit code. GNU and HP use different nomenclature: 702a53f50b9Schristos # 703a53f50b9Schristos # $ CC_FOR_BUILD=cc ./config.guess 704a53f50b9Schristos # => hppa2.0w-hp-hpux11.23 705a53f50b9Schristos # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 706a53f50b9Schristos # => hppa64-hp-hpux11.23 707a53f50b9Schristos 708cc576e1dSsevan if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | 7098bae5d40Schristos grep -q __LP64__ 710a53f50b9Schristos then 711cc576e1dSsevan HP_ARCH=hppa2.0w 712a53f50b9Schristos else 713cc576e1dSsevan HP_ARCH=hppa64 714a53f50b9Schristos fi 715a53f50b9Schristos fi 716a53f50b9Schristos echo ${HP_ARCH}-hp-hpux${HPUX_REV} 717a53f50b9Schristos exit ;; 718a53f50b9Schristos ia64:HP-UX:*:*) 719a53f50b9Schristos HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 720a53f50b9Schristos echo ia64-hp-hpux${HPUX_REV} 721a53f50b9Schristos exit ;; 722a53f50b9Schristos 3050*:HI-UX:*:*) 723a53f50b9Schristos eval $set_cc_for_build 724a53f50b9Schristos sed 's/^ //' << EOF >$dummy.c 725a53f50b9Schristos #include <unistd.h> 726a53f50b9Schristos int 727a53f50b9Schristos main () 728a53f50b9Schristos { 729a53f50b9Schristos long cpu = sysconf (_SC_CPU_VERSION); 730a53f50b9Schristos /* The order matters, because CPU_IS_HP_MC68K erroneously returns 731a53f50b9Schristos true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 732a53f50b9Schristos results, however. */ 733a53f50b9Schristos if (CPU_IS_PA_RISC (cpu)) 734a53f50b9Schristos { 735a53f50b9Schristos switch (cpu) 736a53f50b9Schristos { 737a53f50b9Schristos case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 738a53f50b9Schristos case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 739a53f50b9Schristos case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 740a53f50b9Schristos default: puts ("hppa-hitachi-hiuxwe2"); break; 741a53f50b9Schristos } 742a53f50b9Schristos } 743a53f50b9Schristos else if (CPU_IS_HP_MC68K (cpu)) 744a53f50b9Schristos puts ("m68k-hitachi-hiuxwe2"); 745a53f50b9Schristos else puts ("unknown-hitachi-hiuxwe2"); 746a53f50b9Schristos exit (0); 747a53f50b9Schristos } 748a53f50b9SchristosEOF 749a53f50b9Schristos $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 750a53f50b9Schristos { echo "$SYSTEM_NAME"; exit; } 751a53f50b9Schristos echo unknown-hitachi-hiuxwe2 752a53f50b9Schristos exit ;; 753a53f50b9Schristos 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 754a53f50b9Schristos echo hppa1.1-hp-bsd 755a53f50b9Schristos exit ;; 756a53f50b9Schristos 9000/8??:4.3bsd:*:*) 757a53f50b9Schristos echo hppa1.0-hp-bsd 758a53f50b9Schristos exit ;; 759a53f50b9Schristos *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 760a53f50b9Schristos echo hppa1.0-hp-mpeix 761a53f50b9Schristos exit ;; 762a53f50b9Schristos hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 763a53f50b9Schristos echo hppa1.1-hp-osf 764a53f50b9Schristos exit ;; 765a53f50b9Schristos hp8??:OSF1:*:*) 766a53f50b9Schristos echo hppa1.0-hp-osf 767a53f50b9Schristos exit ;; 768a53f50b9Schristos i*86:OSF1:*:*) 769a53f50b9Schristos if [ -x /usr/sbin/sysversion ] ; then 770a53f50b9Schristos echo ${UNAME_MACHINE}-unknown-osf1mk 771a53f50b9Schristos else 772a53f50b9Schristos echo ${UNAME_MACHINE}-unknown-osf1 773a53f50b9Schristos fi 774a53f50b9Schristos exit ;; 775a53f50b9Schristos parisc*:Lites*:*:*) 776a53f50b9Schristos echo hppa1.1-hp-lites 777a53f50b9Schristos exit ;; 778a53f50b9Schristos C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 779a53f50b9Schristos echo c1-convex-bsd 780a53f50b9Schristos exit ;; 781a53f50b9Schristos C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 782a53f50b9Schristos if getsysinfo -f scalar_acc 783a53f50b9Schristos then echo c32-convex-bsd 784a53f50b9Schristos else echo c2-convex-bsd 785a53f50b9Schristos fi 786a53f50b9Schristos exit ;; 787a53f50b9Schristos C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 788a53f50b9Schristos echo c34-convex-bsd 789a53f50b9Schristos exit ;; 790a53f50b9Schristos C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 791a53f50b9Schristos echo c38-convex-bsd 792a53f50b9Schristos exit ;; 793a53f50b9Schristos C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 794a53f50b9Schristos echo c4-convex-bsd 795a53f50b9Schristos exit ;; 796a53f50b9Schristos CRAY*Y-MP:*:*:*) 797a53f50b9Schristos echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 798a53f50b9Schristos exit ;; 799a53f50b9Schristos CRAY*[A-Z]90:*:*:*) 800a53f50b9Schristos echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 801a53f50b9Schristos | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 802a53f50b9Schristos -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 803a53f50b9Schristos -e 's/\.[^.]*$/.X/' 804a53f50b9Schristos exit ;; 805a53f50b9Schristos CRAY*TS:*:*:*) 806a53f50b9Schristos echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 807a53f50b9Schristos exit ;; 808a53f50b9Schristos CRAY*T3E:*:*:*) 809a53f50b9Schristos echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 810a53f50b9Schristos exit ;; 811a53f50b9Schristos CRAY*SV1:*:*:*) 812a53f50b9Schristos echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 813a53f50b9Schristos exit ;; 814a53f50b9Schristos *:UNICOS/mp:*:*) 815a53f50b9Schristos echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 816a53f50b9Schristos exit ;; 817a53f50b9Schristos F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 818cc576e1dSsevan FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` 819cc576e1dSsevan FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` 820a53f50b9Schristos FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 821a53f50b9Schristos echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 822a53f50b9Schristos exit ;; 823a53f50b9Schristos 5000:UNIX_System_V:4.*:*) 824cc576e1dSsevan FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` 825cc576e1dSsevan FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` 826a53f50b9Schristos echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 827a53f50b9Schristos exit ;; 828a53f50b9Schristos i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 829a53f50b9Schristos echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 830a53f50b9Schristos exit ;; 831a53f50b9Schristos sparc*:BSD/OS:*:*) 832a53f50b9Schristos echo sparc-unknown-bsdi${UNAME_RELEASE} 833a53f50b9Schristos exit ;; 834a53f50b9Schristos *:BSD/OS:*:*) 835a53f50b9Schristos echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 836a53f50b9Schristos exit ;; 837a53f50b9Schristos *:FreeBSD:*:*) 8388bae5d40Schristos UNAME_PROCESSOR=`/usr/bin/uname -p` 8398bae5d40Schristos case ${UNAME_PROCESSOR} in 840a53f50b9Schristos amd64) 841a53f50b9Schristos echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 842a53f50b9Schristos *) 8438bae5d40Schristos echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 844a53f50b9Schristos esac 845a53f50b9Schristos exit ;; 846a53f50b9Schristos i*:CYGWIN*:*) 847a53f50b9Schristos echo ${UNAME_MACHINE}-pc-cygwin 848a53f50b9Schristos exit ;; 8498bae5d40Schristos *:MINGW64*:*) 8508bae5d40Schristos echo ${UNAME_MACHINE}-pc-mingw64 8518bae5d40Schristos exit ;; 8524bcd344eSchristos *:MINGW*:*) 853a53f50b9Schristos echo ${UNAME_MACHINE}-pc-mingw32 854a53f50b9Schristos exit ;; 855cc576e1dSsevan *:MSYS*:*) 8568bae5d40Schristos echo ${UNAME_MACHINE}-pc-msys 8578bae5d40Schristos exit ;; 858a53f50b9Schristos i*:windows32*:*) 859a53f50b9Schristos # uname -m includes "-pc" on this system. 860a53f50b9Schristos echo ${UNAME_MACHINE}-mingw32 861a53f50b9Schristos exit ;; 862a53f50b9Schristos i*:PW*:*) 863a53f50b9Schristos echo ${UNAME_MACHINE}-pc-pw32 864a53f50b9Schristos exit ;; 8658bae5d40Schristos *:Interix*:*) 8664bcd344eSchristos case ${UNAME_MACHINE} in 8674bcd344eSchristos x86) 868a53f50b9Schristos echo i586-pc-interix${UNAME_RELEASE} 869a53f50b9Schristos exit ;; 8708bae5d40Schristos authenticamd | genuineintel | EM64T) 871a53f50b9Schristos echo x86_64-unknown-interix${UNAME_RELEASE} 872a53f50b9Schristos exit ;; 8738bae5d40Schristos IA64) 8748bae5d40Schristos echo ia64-unknown-interix${UNAME_RELEASE} 8758bae5d40Schristos exit ;; 8764bcd344eSchristos esac ;; 877a53f50b9Schristos [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 878a53f50b9Schristos echo i${UNAME_MACHINE}-pc-mks 879a53f50b9Schristos exit ;; 8808bae5d40Schristos 8664:Windows_NT:*) 8818bae5d40Schristos echo x86_64-pc-mks 8828bae5d40Schristos exit ;; 883a53f50b9Schristos i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 884a53f50b9Schristos # How do we know it's Interix rather than the generic POSIX subsystem? 885a53f50b9Schristos # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 886a53f50b9Schristos # UNAME_MACHINE based on the output of uname instead of i386? 887a53f50b9Schristos echo i586-pc-interix 888a53f50b9Schristos exit ;; 889a53f50b9Schristos i*:UWIN*:*) 890a53f50b9Schristos echo ${UNAME_MACHINE}-pc-uwin 891a53f50b9Schristos exit ;; 892a53f50b9Schristos amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 893a53f50b9Schristos echo x86_64-unknown-cygwin 894a53f50b9Schristos exit ;; 895a53f50b9Schristos p*:CYGWIN*:*) 896a53f50b9Schristos echo powerpcle-unknown-cygwin 897a53f50b9Schristos exit ;; 898a53f50b9Schristos prep*:SunOS:5.*:*) 899a53f50b9Schristos echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 900a53f50b9Schristos exit ;; 901a53f50b9Schristos *:GNU:*:*) 902a53f50b9Schristos # the GNU system 9038bae5d40Schristos echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 904a53f50b9Schristos exit ;; 905a53f50b9Schristos *:GNU/*:*:*) 906a53f50b9Schristos # other systems with GNU libc and userland 907cc576e1dSsevan echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} 908a53f50b9Schristos exit ;; 909a53f50b9Schristos i*86:Minix:*:*) 910a53f50b9Schristos echo ${UNAME_MACHINE}-pc-minix 911a53f50b9Schristos exit ;; 9128bae5d40Schristos aarch64:Linux:*:*) 9138bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 914a53f50b9Schristos exit ;; 9158bae5d40Schristos aarch64_be:Linux:*:*) 9168bae5d40Schristos UNAME_MACHINE=aarch64_be 9178bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 918a53f50b9Schristos exit ;; 919a53f50b9Schristos alpha:Linux:*:*) 920a53f50b9Schristos case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 921a53f50b9Schristos EV5) UNAME_MACHINE=alphaev5 ;; 922a53f50b9Schristos EV56) UNAME_MACHINE=alphaev56 ;; 923a53f50b9Schristos PCA56) UNAME_MACHINE=alphapca56 ;; 924a53f50b9Schristos PCA57) UNAME_MACHINE=alphapca56 ;; 925a53f50b9Schristos EV6) UNAME_MACHINE=alphaev6 ;; 926a53f50b9Schristos EV67) UNAME_MACHINE=alphaev67 ;; 927a53f50b9Schristos EV68*) UNAME_MACHINE=alphaev68 ;; 928a53f50b9Schristos esac 9298bae5d40Schristos objdump --private-headers /bin/sh | grep -q ld.so.1 930cc576e1dSsevan if test "$?" = 0 ; then LIBC=gnulibc1 ; fi 9318bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9328bae5d40Schristos exit ;; 9338bae5d40Schristos arc:Linux:*:* | arceb:Linux:*:*) 9348bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9358bae5d40Schristos exit ;; 9368bae5d40Schristos arm*:Linux:*:*) 9378bae5d40Schristos eval $set_cc_for_build 9388bae5d40Schristos if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 9398bae5d40Schristos | grep -q __ARM_EABI__ 9408bae5d40Schristos then 9418bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9428bae5d40Schristos else 9438bae5d40Schristos if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 9448bae5d40Schristos | grep -q __ARM_PCS_VFP 9458bae5d40Schristos then 9468bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi 9478bae5d40Schristos else 9488bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf 9498bae5d40Schristos fi 9508bae5d40Schristos fi 9518bae5d40Schristos exit ;; 9528bae5d40Schristos avr32*:Linux:*:*) 9538bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9548bae5d40Schristos exit ;; 9558bae5d40Schristos cris:Linux:*:*) 9568bae5d40Schristos echo ${UNAME_MACHINE}-axis-linux-${LIBC} 9578bae5d40Schristos exit ;; 9588bae5d40Schristos crisv32:Linux:*:*) 9598bae5d40Schristos echo ${UNAME_MACHINE}-axis-linux-${LIBC} 9608bae5d40Schristos exit ;; 961cc576e1dSsevan e2k:Linux:*:*) 962cc576e1dSsevan echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 963cc576e1dSsevan exit ;; 9648bae5d40Schristos frv:Linux:*:*) 9658bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9668bae5d40Schristos exit ;; 9678bae5d40Schristos hexagon:Linux:*:*) 9688bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9698bae5d40Schristos exit ;; 9708bae5d40Schristos i*86:Linux:*:*) 9718bae5d40Schristos echo ${UNAME_MACHINE}-pc-linux-${LIBC} 9728bae5d40Schristos exit ;; 9738bae5d40Schristos ia64:Linux:*:*) 9748bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9758bae5d40Schristos exit ;; 976cc576e1dSsevan k1om:Linux:*:*) 977cc576e1dSsevan echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 978cc576e1dSsevan exit ;; 9798bae5d40Schristos m32r*:Linux:*:*) 9808bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9818bae5d40Schristos exit ;; 9828bae5d40Schristos m68*:Linux:*:*) 9838bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9848bae5d40Schristos exit ;; 9858bae5d40Schristos mips:Linux:*:* | mips64:Linux:*:*) 9868bae5d40Schristos eval $set_cc_for_build 9878bae5d40Schristos sed 's/^ //' << EOF >$dummy.c 9888bae5d40Schristos #undef CPU 9898bae5d40Schristos #undef ${UNAME_MACHINE} 9908bae5d40Schristos #undef ${UNAME_MACHINE}el 9918bae5d40Schristos #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 9928bae5d40Schristos CPU=${UNAME_MACHINE}el 9938bae5d40Schristos #else 9948bae5d40Schristos #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 9958bae5d40Schristos CPU=${UNAME_MACHINE} 9968bae5d40Schristos #else 9978bae5d40Schristos CPU= 9988bae5d40Schristos #endif 9998bae5d40Schristos #endif 10008bae5d40SchristosEOF 10018bae5d40Schristos eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 10028bae5d40Schristos test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } 10038bae5d40Schristos ;; 1004cc576e1dSsevan mips64el:Linux:*:*) 10058bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 10068bae5d40Schristos exit ;; 1007cc576e1dSsevan openrisc*:Linux:*:*) 1008cc576e1dSsevan echo or1k-unknown-linux-${LIBC} 1009cc576e1dSsevan exit ;; 1010cc576e1dSsevan or32:Linux:*:* | or1k*:Linux:*:*) 10118bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 10128bae5d40Schristos exit ;; 10138bae5d40Schristos padre:Linux:*:*) 10148bae5d40Schristos echo sparc-unknown-linux-${LIBC} 10158bae5d40Schristos exit ;; 10168bae5d40Schristos parisc64:Linux:*:* | hppa64:Linux:*:*) 10178bae5d40Schristos echo hppa64-unknown-linux-${LIBC} 1018a53f50b9Schristos exit ;; 1019a53f50b9Schristos parisc:Linux:*:* | hppa:Linux:*:*) 1020a53f50b9Schristos # Look for CPU level 1021a53f50b9Schristos case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 10228bae5d40Schristos PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; 10238bae5d40Schristos PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; 10248bae5d40Schristos *) echo hppa-unknown-linux-${LIBC} ;; 1025a53f50b9Schristos esac 1026a53f50b9Schristos exit ;; 10278bae5d40Schristos ppc64:Linux:*:*) 10288bae5d40Schristos echo powerpc64-unknown-linux-${LIBC} 10298bae5d40Schristos exit ;; 10308bae5d40Schristos ppc:Linux:*:*) 10318bae5d40Schristos echo powerpc-unknown-linux-${LIBC} 10328bae5d40Schristos exit ;; 10338bae5d40Schristos ppc64le:Linux:*:*) 10348bae5d40Schristos echo powerpc64le-unknown-linux-${LIBC} 10358bae5d40Schristos exit ;; 10368bae5d40Schristos ppcle:Linux:*:*) 10378bae5d40Schristos echo powerpcle-unknown-linux-${LIBC} 1038a53f50b9Schristos exit ;; 1039cc576e1dSsevan riscv32:Linux:*:* | riscv64:Linux:*:*) 1040cc576e1dSsevan echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1041cc576e1dSsevan exit ;; 1042a53f50b9Schristos s390:Linux:*:* | s390x:Linux:*:*) 10438bae5d40Schristos echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 1044a53f50b9Schristos exit ;; 1045a53f50b9Schristos sh64*:Linux:*:*) 10468bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1047a53f50b9Schristos exit ;; 1048a53f50b9Schristos sh*:Linux:*:*) 10498bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1050a53f50b9Schristos exit ;; 1051a53f50b9Schristos sparc:Linux:*:* | sparc64:Linux:*:*) 10528bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 10538bae5d40Schristos exit ;; 10548bae5d40Schristos tile*:Linux:*:*) 10558bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1056a53f50b9Schristos exit ;; 1057a53f50b9Schristos vax:Linux:*:*) 10588bae5d40Schristos echo ${UNAME_MACHINE}-dec-linux-${LIBC} 1059a53f50b9Schristos exit ;; 1060a53f50b9Schristos x86_64:Linux:*:*) 1061cc576e1dSsevan echo ${UNAME_MACHINE}-pc-linux-${LIBC} 1062a53f50b9Schristos exit ;; 10638bae5d40Schristos xtensa*:Linux:*:*) 10648bae5d40Schristos echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 10654bcd344eSchristos exit ;; 1066a53f50b9Schristos i*86:DYNIX/ptx:4*:*) 1067a53f50b9Schristos # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1068a53f50b9Schristos # earlier versions are messed up and put the nodename in both 1069a53f50b9Schristos # sysname and nodename. 1070a53f50b9Schristos echo i386-sequent-sysv4 1071a53f50b9Schristos exit ;; 1072a53f50b9Schristos i*86:UNIX_SV:4.2MP:2.*) 1073a53f50b9Schristos # Unixware is an offshoot of SVR4, but it has its own version 1074a53f50b9Schristos # number series starting with 2... 1075a53f50b9Schristos # I am not positive that other SVR4 systems won't match this, 1076a53f50b9Schristos # I just have to hope. -- rms. 1077a53f50b9Schristos # Use sysv4.2uw... so that sysv4* matches it. 1078a53f50b9Schristos echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1079a53f50b9Schristos exit ;; 1080a53f50b9Schristos i*86:OS/2:*:*) 1081a53f50b9Schristos # If we were able to find `uname', then EMX Unix compatibility 1082a53f50b9Schristos # is probably installed. 1083a53f50b9Schristos echo ${UNAME_MACHINE}-pc-os2-emx 1084a53f50b9Schristos exit ;; 1085a53f50b9Schristos i*86:XTS-300:*:STOP) 1086a53f50b9Schristos echo ${UNAME_MACHINE}-unknown-stop 1087a53f50b9Schristos exit ;; 1088a53f50b9Schristos i*86:atheos:*:*) 1089a53f50b9Schristos echo ${UNAME_MACHINE}-unknown-atheos 1090a53f50b9Schristos exit ;; 1091a53f50b9Schristos i*86:syllable:*:*) 1092a53f50b9Schristos echo ${UNAME_MACHINE}-pc-syllable 1093a53f50b9Schristos exit ;; 10948bae5d40Schristos i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1095a53f50b9Schristos echo i386-unknown-lynxos${UNAME_RELEASE} 1096a53f50b9Schristos exit ;; 1097a53f50b9Schristos i*86:*DOS:*:*) 1098a53f50b9Schristos echo ${UNAME_MACHINE}-pc-msdosdjgpp 1099a53f50b9Schristos exit ;; 1100a53f50b9Schristos i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1101a53f50b9Schristos UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1102a53f50b9Schristos if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1103a53f50b9Schristos echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 1104a53f50b9Schristos else 1105a53f50b9Schristos echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1106a53f50b9Schristos fi 1107a53f50b9Schristos exit ;; 1108a53f50b9Schristos i*86:*:5:[678]*) 1109a53f50b9Schristos # UnixWare 7.x, OpenUNIX and OpenServer 6. 1110a53f50b9Schristos case `/bin/uname -X | grep "^Machine"` in 1111a53f50b9Schristos *486*) UNAME_MACHINE=i486 ;; 1112a53f50b9Schristos *Pentium) UNAME_MACHINE=i586 ;; 1113a53f50b9Schristos *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1114a53f50b9Schristos esac 1115a53f50b9Schristos echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1116a53f50b9Schristos exit ;; 1117a53f50b9Schristos i*86:*:3.2:*) 1118a53f50b9Schristos if test -f /usr/options/cb.name; then 1119a53f50b9Schristos UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1120a53f50b9Schristos echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 1121a53f50b9Schristos elif /bin/uname -X 2>/dev/null >/dev/null ; then 1122a53f50b9Schristos UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1123a53f50b9Schristos (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1124a53f50b9Schristos (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 1125a53f50b9Schristos && UNAME_MACHINE=i586 1126a53f50b9Schristos (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1127a53f50b9Schristos && UNAME_MACHINE=i686 1128a53f50b9Schristos (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1129a53f50b9Schristos && UNAME_MACHINE=i686 1130a53f50b9Schristos echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 1131a53f50b9Schristos else 1132a53f50b9Schristos echo ${UNAME_MACHINE}-pc-sysv32 1133a53f50b9Schristos fi 1134a53f50b9Schristos exit ;; 1135a53f50b9Schristos pc:*:*:*) 1136a53f50b9Schristos # Left here for compatibility: 1137a53f50b9Schristos # uname -m prints for DJGPP always 'pc', but it prints nothing about 11388bae5d40Schristos # the processor, so we play safe by assuming i586. 11398bae5d40Schristos # Note: whatever this is, it MUST be the same as what config.sub 1140cc576e1dSsevan # prints for the "djgpp" host, or else GDB configure will decide that 11418bae5d40Schristos # this is a cross-build. 11428bae5d40Schristos echo i586-pc-msdosdjgpp 1143a53f50b9Schristos exit ;; 1144a53f50b9Schristos Intel:Mach:3*:*) 1145a53f50b9Schristos echo i386-pc-mach3 1146a53f50b9Schristos exit ;; 1147a53f50b9Schristos paragon:*:*:*) 1148a53f50b9Schristos echo i860-intel-osf1 1149a53f50b9Schristos exit ;; 1150a53f50b9Schristos i860:*:4.*:*) # i860-SVR4 1151a53f50b9Schristos if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1152a53f50b9Schristos echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1153a53f50b9Schristos else # Add other i860-SVR4 vendors below as they are discovered. 1154a53f50b9Schristos echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1155a53f50b9Schristos fi 1156a53f50b9Schristos exit ;; 1157a53f50b9Schristos mini*:CTIX:SYS*5:*) 1158a53f50b9Schristos # "miniframe" 1159a53f50b9Schristos echo m68010-convergent-sysv 1160a53f50b9Schristos exit ;; 1161a53f50b9Schristos mc68k:UNIX:SYSTEM5:3.51m) 1162a53f50b9Schristos echo m68k-convergent-sysv 1163a53f50b9Schristos exit ;; 1164a53f50b9Schristos M680?0:D-NIX:5.3:*) 1165a53f50b9Schristos echo m68k-diab-dnix 1166a53f50b9Schristos exit ;; 1167a53f50b9Schristos M68*:*:R3V[5678]*:*) 1168a53f50b9Schristos test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1169a53f50b9Schristos 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) 1170a53f50b9Schristos OS_REL='' 1171a53f50b9Schristos test -r /etc/.relid \ 1172a53f50b9Schristos && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1173a53f50b9Schristos /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1174a53f50b9Schristos && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1175a53f50b9Schristos /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1176a53f50b9Schristos && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1177a53f50b9Schristos 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1178a53f50b9Schristos /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1179a53f50b9Schristos && { echo i486-ncr-sysv4; exit; } ;; 11808bae5d40Schristos NCR*:*:4.2:* | MPRAS*:*:4.2:*) 11818bae5d40Schristos OS_REL='.3' 11828bae5d40Schristos test -r /etc/.relid \ 11838bae5d40Schristos && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 11848bae5d40Schristos /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 11858bae5d40Schristos && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 11868bae5d40Schristos /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 11878bae5d40Schristos && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 11888bae5d40Schristos /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 11898bae5d40Schristos && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1190a53f50b9Schristos m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1191a53f50b9Schristos echo m68k-unknown-lynxos${UNAME_RELEASE} 1192a53f50b9Schristos exit ;; 1193a53f50b9Schristos mc68030:UNIX_System_V:4.*:*) 1194a53f50b9Schristos echo m68k-atari-sysv4 1195a53f50b9Schristos exit ;; 1196a53f50b9Schristos TSUNAMI:LynxOS:2.*:*) 1197a53f50b9Schristos echo sparc-unknown-lynxos${UNAME_RELEASE} 1198a53f50b9Schristos exit ;; 1199a53f50b9Schristos rs6000:LynxOS:2.*:*) 1200a53f50b9Schristos echo rs6000-unknown-lynxos${UNAME_RELEASE} 1201a53f50b9Schristos exit ;; 12028bae5d40Schristos PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1203a53f50b9Schristos echo powerpc-unknown-lynxos${UNAME_RELEASE} 1204a53f50b9Schristos exit ;; 1205a53f50b9Schristos SM[BE]S:UNIX_SV:*:*) 1206a53f50b9Schristos echo mips-dde-sysv${UNAME_RELEASE} 1207a53f50b9Schristos exit ;; 1208a53f50b9Schristos RM*:ReliantUNIX-*:*:*) 1209a53f50b9Schristos echo mips-sni-sysv4 1210a53f50b9Schristos exit ;; 1211a53f50b9Schristos RM*:SINIX-*:*:*) 1212a53f50b9Schristos echo mips-sni-sysv4 1213a53f50b9Schristos exit ;; 1214a53f50b9Schristos *:SINIX-*:*:*) 1215a53f50b9Schristos if uname -p 2>/dev/null >/dev/null ; then 1216a53f50b9Schristos UNAME_MACHINE=`(uname -p) 2>/dev/null` 1217a53f50b9Schristos echo ${UNAME_MACHINE}-sni-sysv4 1218a53f50b9Schristos else 1219a53f50b9Schristos echo ns32k-sni-sysv 1220a53f50b9Schristos fi 1221a53f50b9Schristos exit ;; 1222a53f50b9Schristos PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1223a53f50b9Schristos # says <Richard.M.Bartel@ccMail.Census.GOV> 1224a53f50b9Schristos echo i586-unisys-sysv4 1225a53f50b9Schristos exit ;; 1226a53f50b9Schristos *:UNIX_System_V:4*:FTX*) 1227a53f50b9Schristos # From Gerald Hewes <hewes@openmarket.com>. 1228a53f50b9Schristos # How about differentiating between stratus architectures? -djm 1229a53f50b9Schristos echo hppa1.1-stratus-sysv4 1230a53f50b9Schristos exit ;; 1231a53f50b9Schristos *:*:*:FTX*) 1232a53f50b9Schristos # From seanf@swdc.stratus.com. 1233a53f50b9Schristos echo i860-stratus-sysv4 1234a53f50b9Schristos exit ;; 1235a53f50b9Schristos i*86:VOS:*:*) 1236a53f50b9Schristos # From Paul.Green@stratus.com. 1237a53f50b9Schristos echo ${UNAME_MACHINE}-stratus-vos 1238a53f50b9Schristos exit ;; 1239a53f50b9Schristos *:VOS:*:*) 1240a53f50b9Schristos # From Paul.Green@stratus.com. 1241a53f50b9Schristos echo hppa1.1-stratus-vos 1242a53f50b9Schristos exit ;; 1243a53f50b9Schristos mc68*:A/UX:*:*) 1244a53f50b9Schristos echo m68k-apple-aux${UNAME_RELEASE} 1245a53f50b9Schristos exit ;; 1246a53f50b9Schristos news*:NEWS-OS:6*:*) 1247a53f50b9Schristos echo mips-sony-newsos6 1248a53f50b9Schristos exit ;; 1249a53f50b9Schristos R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1250a53f50b9Schristos if [ -d /usr/nec ]; then 1251a53f50b9Schristos echo mips-nec-sysv${UNAME_RELEASE} 1252a53f50b9Schristos else 1253a53f50b9Schristos echo mips-unknown-sysv${UNAME_RELEASE} 1254a53f50b9Schristos fi 1255a53f50b9Schristos exit ;; 1256a53f50b9Schristos BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1257a53f50b9Schristos echo powerpc-be-beos 1258a53f50b9Schristos exit ;; 1259a53f50b9Schristos BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1260a53f50b9Schristos echo powerpc-apple-beos 1261a53f50b9Schristos exit ;; 1262a53f50b9Schristos BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1263a53f50b9Schristos echo i586-pc-beos 1264a53f50b9Schristos exit ;; 12658bae5d40Schristos BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 12668bae5d40Schristos echo i586-pc-haiku 12678bae5d40Schristos exit ;; 12688bae5d40Schristos x86_64:Haiku:*:*) 12698bae5d40Schristos echo x86_64-unknown-haiku 12708bae5d40Schristos exit ;; 1271a53f50b9Schristos SX-4:SUPER-UX:*:*) 1272a53f50b9Schristos echo sx4-nec-superux${UNAME_RELEASE} 1273a53f50b9Schristos exit ;; 1274a53f50b9Schristos SX-5:SUPER-UX:*:*) 1275a53f50b9Schristos echo sx5-nec-superux${UNAME_RELEASE} 1276a53f50b9Schristos exit ;; 1277a53f50b9Schristos SX-6:SUPER-UX:*:*) 1278a53f50b9Schristos echo sx6-nec-superux${UNAME_RELEASE} 1279a53f50b9Schristos exit ;; 12804bcd344eSchristos SX-7:SUPER-UX:*:*) 12814bcd344eSchristos echo sx7-nec-superux${UNAME_RELEASE} 12824bcd344eSchristos exit ;; 12834bcd344eSchristos SX-8:SUPER-UX:*:*) 12844bcd344eSchristos echo sx8-nec-superux${UNAME_RELEASE} 12854bcd344eSchristos exit ;; 12864bcd344eSchristos SX-8R:SUPER-UX:*:*) 12874bcd344eSchristos echo sx8r-nec-superux${UNAME_RELEASE} 12884bcd344eSchristos exit ;; 1289cc576e1dSsevan SX-ACE:SUPER-UX:*:*) 1290cc576e1dSsevan echo sxace-nec-superux${UNAME_RELEASE} 1291cc576e1dSsevan exit ;; 1292a53f50b9Schristos Power*:Rhapsody:*:*) 1293a53f50b9Schristos echo powerpc-apple-rhapsody${UNAME_RELEASE} 1294a53f50b9Schristos exit ;; 1295a53f50b9Schristos *:Rhapsody:*:*) 1296a53f50b9Schristos echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1297a53f50b9Schristos exit ;; 1298a53f50b9Schristos *:Darwin:*:*) 1299a53f50b9Schristos UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 13008bae5d40Schristos eval $set_cc_for_build 13018bae5d40Schristos if test "$UNAME_PROCESSOR" = unknown ; then 13028bae5d40Schristos UNAME_PROCESSOR=powerpc 13038bae5d40Schristos fi 1304cc576e1dSsevan if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then 1305cc576e1dSsevan if [ "$CC_FOR_BUILD" != no_compiler_found ]; then 13068bae5d40Schristos if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1307cc576e1dSsevan (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ 13088bae5d40Schristos grep IS_64BIT_ARCH >/dev/null 13098bae5d40Schristos then 1310a53f50b9Schristos case $UNAME_PROCESSOR in 13118bae5d40Schristos i386) UNAME_PROCESSOR=x86_64 ;; 13128bae5d40Schristos powerpc) UNAME_PROCESSOR=powerpc64 ;; 1313a53f50b9Schristos esac 13148bae5d40Schristos fi 13158bae5d40Schristos fi 1316cc576e1dSsevan elif test "$UNAME_PROCESSOR" = i386 ; then 1317cc576e1dSsevan # Avoid executing cc on OS X 10.9, as it ships with a stub 1318cc576e1dSsevan # that puts up a graphical alert prompting to install 1319cc576e1dSsevan # developer tools. Any system running Mac OS X 10.7 or 1320cc576e1dSsevan # later (Darwin 11 and later) is required to have a 64-bit 1321cc576e1dSsevan # processor. This is not true of the ARM version of Darwin 1322cc576e1dSsevan # that Apple uses in portable devices. 1323cc576e1dSsevan UNAME_PROCESSOR=x86_64 1324cc576e1dSsevan fi 1325a53f50b9Schristos echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1326a53f50b9Schristos exit ;; 1327a53f50b9Schristos *:procnto*:*:* | *:QNX:[0123456789]*:*) 1328a53f50b9Schristos UNAME_PROCESSOR=`uname -p` 1329cc576e1dSsevan if test "$UNAME_PROCESSOR" = x86; then 1330a53f50b9Schristos UNAME_PROCESSOR=i386 1331a53f50b9Schristos UNAME_MACHINE=pc 1332a53f50b9Schristos fi 1333a53f50b9Schristos echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1334a53f50b9Schristos exit ;; 1335a53f50b9Schristos *:QNX:*:4*) 1336a53f50b9Schristos echo i386-pc-qnx 1337a53f50b9Schristos exit ;; 13388bae5d40Schristos NEO-?:NONSTOP_KERNEL:*:*) 13398bae5d40Schristos echo neo-tandem-nsk${UNAME_RELEASE} 13408bae5d40Schristos exit ;; 13418bae5d40Schristos NSE-*:NONSTOP_KERNEL:*:*) 1342a53f50b9Schristos echo nse-tandem-nsk${UNAME_RELEASE} 1343a53f50b9Schristos exit ;; 1344a53f50b9Schristos NSR-?:NONSTOP_KERNEL:*:*) 1345a53f50b9Schristos echo nsr-tandem-nsk${UNAME_RELEASE} 1346a53f50b9Schristos exit ;; 1347a53f50b9Schristos *:NonStop-UX:*:*) 1348a53f50b9Schristos echo mips-compaq-nonstopux 1349a53f50b9Schristos exit ;; 1350a53f50b9Schristos BS2000:POSIX*:*:*) 1351a53f50b9Schristos echo bs2000-siemens-sysv 1352a53f50b9Schristos exit ;; 1353a53f50b9Schristos DS/*:UNIX_System_V:*:*) 1354a53f50b9Schristos echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1355a53f50b9Schristos exit ;; 1356a53f50b9Schristos *:Plan9:*:*) 1357a53f50b9Schristos # "uname -m" is not consistent, so use $cputype instead. 386 1358a53f50b9Schristos # is converted to i386 for consistency with other x86 1359a53f50b9Schristos # operating systems. 1360cc576e1dSsevan if test "$cputype" = 386; then 1361a53f50b9Schristos UNAME_MACHINE=i386 1362a53f50b9Schristos else 1363a53f50b9Schristos UNAME_MACHINE="$cputype" 1364a53f50b9Schristos fi 1365a53f50b9Schristos echo ${UNAME_MACHINE}-unknown-plan9 1366a53f50b9Schristos exit ;; 1367a53f50b9Schristos *:TOPS-10:*:*) 1368a53f50b9Schristos echo pdp10-unknown-tops10 1369a53f50b9Schristos exit ;; 1370a53f50b9Schristos *:TENEX:*:*) 1371a53f50b9Schristos echo pdp10-unknown-tenex 1372a53f50b9Schristos exit ;; 1373a53f50b9Schristos KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1374a53f50b9Schristos echo pdp10-dec-tops20 1375a53f50b9Schristos exit ;; 1376a53f50b9Schristos XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1377a53f50b9Schristos echo pdp10-xkl-tops20 1378a53f50b9Schristos exit ;; 1379a53f50b9Schristos *:TOPS-20:*:*) 1380a53f50b9Schristos echo pdp10-unknown-tops20 1381a53f50b9Schristos exit ;; 1382a53f50b9Schristos *:ITS:*:*) 1383a53f50b9Schristos echo pdp10-unknown-its 1384a53f50b9Schristos exit ;; 1385a53f50b9Schristos SEI:*:*:SEIUX) 1386a53f50b9Schristos echo mips-sei-seiux${UNAME_RELEASE} 1387a53f50b9Schristos exit ;; 1388a53f50b9Schristos *:DragonFly:*:*) 1389a53f50b9Schristos echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1390a53f50b9Schristos exit ;; 1391a53f50b9Schristos *:*VMS:*:*) 1392a53f50b9Schristos UNAME_MACHINE=`(uname -p) 2>/dev/null` 1393a53f50b9Schristos case "${UNAME_MACHINE}" in 1394a53f50b9Schristos A*) echo alpha-dec-vms ; exit ;; 1395a53f50b9Schristos I*) echo ia64-dec-vms ; exit ;; 1396a53f50b9Schristos V*) echo vax-dec-vms ; exit ;; 1397a53f50b9Schristos esac ;; 1398a53f50b9Schristos *:XENIX:*:SysV) 1399a53f50b9Schristos echo i386-pc-xenix 1400a53f50b9Schristos exit ;; 1401a53f50b9Schristos i*86:skyos:*:*) 1402cc576e1dSsevan echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` 1403a53f50b9Schristos exit ;; 1404a53f50b9Schristos i*86:rdos:*:*) 1405a53f50b9Schristos echo ${UNAME_MACHINE}-pc-rdos 1406a53f50b9Schristos exit ;; 14078bae5d40Schristos i*86:AROS:*:*) 14088bae5d40Schristos echo ${UNAME_MACHINE}-pc-aros 14098bae5d40Schristos exit ;; 14108bae5d40Schristos x86_64:VMkernel:*:*) 14118bae5d40Schristos echo ${UNAME_MACHINE}-unknown-esx 14128bae5d40Schristos exit ;; 1413cc576e1dSsevan amd64:Isilon\ OneFS:*:*) 1414cc576e1dSsevan echo x86_64-unknown-onefs 1415a53f50b9Schristos exit ;; 1416a53f50b9Schristosesac 1417a53f50b9Schristos 1418a53f50b9Schristoscat >&2 <<EOF 1419a53f50b9Schristos$0: unable to guess system type 1420a53f50b9Schristos 1421cc576e1dSsevanThis script (version $timestamp), has failed to recognize the 1422cc576e1dSsevanoperating system you are using. If your script is old, overwrite 1423cc576e1dSsevanconfig.guess and config.sub with the latest versions from: 1424a53f50b9Schristos 1425cc576e1dSsevan http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess 1426a53f50b9Schristosand 1427cc576e1dSsevan http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub 1428a53f50b9Schristos 1429cc576e1dSsevanIf $0 has already been updated, send the following data and any 1430cc576e1dSsevaninformation you think might be pertinent to config-patches@gnu.org to 1431cc576e1dSsevanprovide the necessary information to handle your system. 1432a53f50b9Schristos 1433a53f50b9Schristosconfig.guess timestamp = $timestamp 1434a53f50b9Schristos 1435a53f50b9Schristosuname -m = `(uname -m) 2>/dev/null || echo unknown` 1436a53f50b9Schristosuname -r = `(uname -r) 2>/dev/null || echo unknown` 1437a53f50b9Schristosuname -s = `(uname -s) 2>/dev/null || echo unknown` 1438a53f50b9Schristosuname -v = `(uname -v) 2>/dev/null || echo unknown` 1439a53f50b9Schristos 1440a53f50b9Schristos/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1441a53f50b9Schristos/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1442a53f50b9Schristos 1443a53f50b9Schristoshostinfo = `(hostinfo) 2>/dev/null` 1444a53f50b9Schristos/bin/universe = `(/bin/universe) 2>/dev/null` 1445a53f50b9Schristos/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1446a53f50b9Schristos/bin/arch = `(/bin/arch) 2>/dev/null` 1447a53f50b9Schristos/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1448a53f50b9Schristos/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1449a53f50b9Schristos 1450a53f50b9SchristosUNAME_MACHINE = ${UNAME_MACHINE} 1451a53f50b9SchristosUNAME_RELEASE = ${UNAME_RELEASE} 1452a53f50b9SchristosUNAME_SYSTEM = ${UNAME_SYSTEM} 1453a53f50b9SchristosUNAME_VERSION = ${UNAME_VERSION} 1454a53f50b9SchristosEOF 1455a53f50b9Schristos 1456a53f50b9Schristosexit 1 1457a53f50b9Schristos 1458a53f50b9Schristos# Local variables: 1459a53f50b9Schristos# eval: (add-hook 'write-file-hooks 'time-stamp) 1460a53f50b9Schristos# time-stamp-start: "timestamp='" 1461a53f50b9Schristos# time-stamp-format: "%:y-%02m-%02d" 1462a53f50b9Schristos# time-stamp-end: "'" 1463a53f50b9Schristos# End: 1464