config.guess revision 659607e0
1659607e0Smrg#! /bin/sh 2659607e0Smrg# Attempt to guess a canonical system name. 3659607e0Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4659607e0Smrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, 5659607e0Smrg# Inc. 6659607e0Smrg 7659607e0Smrgtimestamp='2007-05-17' 8659607e0Smrg 9659607e0Smrg# This file is free software; you can redistribute it and/or modify it 10659607e0Smrg# under the terms of the GNU General Public License as published by 11659607e0Smrg# the Free Software Foundation; either version 2 of the License, or 12659607e0Smrg# (at your option) any later version. 13659607e0Smrg# 14659607e0Smrg# This program is distributed in the hope that it will be useful, but 15659607e0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 16659607e0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17659607e0Smrg# General Public License for more details. 18659607e0Smrg# 19659607e0Smrg# You should have received a copy of the GNU General Public License 20659607e0Smrg# along with this program; if not, write to the Free Software 21659607e0Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 22659607e0Smrg# 02110-1301, USA. 23659607e0Smrg# 24659607e0Smrg# As a special exception to the GNU General Public License, if you 25659607e0Smrg# distribute this file as part of a program that contains a 26659607e0Smrg# configuration script generated by Autoconf, you may include it under 27659607e0Smrg# the same distribution terms that you use for the rest of that program. 28659607e0Smrg 29659607e0Smrg 30659607e0Smrg# Originally written by Per Bothner <per@bothner.com>. 31659607e0Smrg# Please send patches to <config-patches@gnu.org>. Submit a context 32659607e0Smrg# diff and a properly formatted ChangeLog entry. 33659607e0Smrg# 34659607e0Smrg# This script attempts to guess a canonical system name similar to 35659607e0Smrg# config.sub. If it succeeds, it prints the system name on stdout, and 36659607e0Smrg# exits with 0. Otherwise, it exits with 1. 37659607e0Smrg# 38659607e0Smrg# The plan is that this can be called by configure scripts if you 39659607e0Smrg# don't specify an explicit build system type. 40659607e0Smrg 41659607e0Smrgme=`echo "$0" | sed -e 's,.*/,,'` 42659607e0Smrg 43659607e0Smrgusage="\ 44659607e0SmrgUsage: $0 [OPTION] 45659607e0Smrg 46659607e0SmrgOutput the configuration name of the system \`$me' is run on. 47659607e0Smrg 48659607e0SmrgOperation modes: 49659607e0Smrg -h, --help print this help, then exit 50659607e0Smrg -t, --time-stamp print date of last modification, then exit 51659607e0Smrg -v, --version print version number, then exit 52659607e0Smrg 53659607e0SmrgReport bugs and patches to <config-patches@gnu.org>." 54659607e0Smrg 55659607e0Smrgversion="\ 56659607e0SmrgGNU config.guess ($timestamp) 57659607e0Smrg 58659607e0SmrgOriginally written by Per Bothner. 59659607e0SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 60659607e0SmrgFree Software Foundation, Inc. 61659607e0Smrg 62659607e0SmrgThis is free software; see the source for copying conditions. There is NO 63659607e0Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 64659607e0Smrg 65659607e0Smrghelp=" 66659607e0SmrgTry \`$me --help' for more information." 67659607e0Smrg 68659607e0Smrg# Parse command line 69659607e0Smrgwhile test $# -gt 0 ; do 70659607e0Smrg case $1 in 71659607e0Smrg --time-stamp | --time* | -t ) 72659607e0Smrg echo "$timestamp" ; exit ;; 73659607e0Smrg --version | -v ) 74659607e0Smrg echo "$version" ; exit ;; 75659607e0Smrg --help | --h* | -h ) 76659607e0Smrg echo "$usage"; exit ;; 77659607e0Smrg -- ) # Stop option processing 78659607e0Smrg shift; break ;; 79659607e0Smrg - ) # Use stdin as input. 80659607e0Smrg break ;; 81659607e0Smrg -* ) 82659607e0Smrg echo "$me: invalid option $1$help" >&2 83659607e0Smrg exit 1 ;; 84659607e0Smrg * ) 85659607e0Smrg break ;; 86659607e0Smrg esac 87659607e0Smrgdone 88659607e0Smrg 89659607e0Smrgif test $# != 0; then 90659607e0Smrg echo "$me: too many arguments$help" >&2 91659607e0Smrg exit 1 92659607e0Smrgfi 93659607e0Smrg 94659607e0Smrgtrap 'exit 1' 1 2 15 95659607e0Smrg 96659607e0Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 97659607e0Smrg# compiler to aid in system detection is discouraged as it requires 98659607e0Smrg# temporary files to be created and, as you can see below, it is a 99659607e0Smrg# headache to deal with in a portable fashion. 100659607e0Smrg 101659607e0Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 102659607e0Smrg# use `HOST_CC' if defined, but it is deprecated. 103659607e0Smrg 104659607e0Smrg# Portable tmp directory creation inspired by the Autoconf team. 105659607e0Smrg 106659607e0Smrgset_cc_for_build=' 107659607e0Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 108659607e0Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 109659607e0Smrg: ${TMPDIR=/tmp} ; 110659607e0Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 111659607e0Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 112659607e0Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 113659607e0Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 114659607e0Smrgdummy=$tmp/dummy ; 115659607e0Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 116659607e0Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 117659607e0Smrg ,,) echo "int x;" > $dummy.c ; 118659607e0Smrg for c in cc gcc c89 c99 ; do 119659607e0Smrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 120659607e0Smrg CC_FOR_BUILD="$c"; break ; 121659607e0Smrg fi ; 122659607e0Smrg done ; 123659607e0Smrg if test x"$CC_FOR_BUILD" = x ; then 124659607e0Smrg CC_FOR_BUILD=no_compiler_found ; 125659607e0Smrg fi 126659607e0Smrg ;; 127659607e0Smrg ,,*) CC_FOR_BUILD=$CC ;; 128659607e0Smrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 129659607e0Smrgesac ; set_cc_for_build= ;' 130659607e0Smrg 131659607e0Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 132659607e0Smrg# (ghazi@noc.rutgers.edu 1994-08-24) 133659607e0Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 134659607e0Smrg PATH=$PATH:/.attbin ; export PATH 135659607e0Smrgfi 136659607e0Smrg 137659607e0SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 138659607e0SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 139659607e0SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 140659607e0SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 141659607e0Smrg 142659607e0Smrg# Note: order is significant - the case branches are not exclusive. 143659607e0Smrg 144659607e0Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 145659607e0Smrg *:NetBSD:*:*) 146659607e0Smrg # NetBSD (nbsd) targets should (where applicable) match one or 147659607e0Smrg # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 148659607e0Smrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 149659607e0Smrg # switched to ELF, *-*-netbsd* would select the old 150659607e0Smrg # object file format. This provides both forward 151659607e0Smrg # compatibility and a consistent mechanism for selecting the 152659607e0Smrg # object file format. 153659607e0Smrg # 154659607e0Smrg # Note: NetBSD doesn't particularly care about the vendor 155659607e0Smrg # portion of the name. We always set it to "unknown". 156659607e0Smrg sysctl="sysctl -n hw.machine_arch" 157659607e0Smrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 158659607e0Smrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 159659607e0Smrg case "${UNAME_MACHINE_ARCH}" in 160659607e0Smrg armeb) machine=armeb-unknown ;; 161659607e0Smrg arm*) machine=arm-unknown ;; 162659607e0Smrg sh3el) machine=shl-unknown ;; 163659607e0Smrg sh3eb) machine=sh-unknown ;; 164659607e0Smrg sh5el) machine=sh5le-unknown ;; 165659607e0Smrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 166659607e0Smrg esac 167659607e0Smrg # The Operating System including object format, if it has switched 168659607e0Smrg # to ELF recently, or will in the future. 169659607e0Smrg case "${UNAME_MACHINE_ARCH}" in 170659607e0Smrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 171659607e0Smrg eval $set_cc_for_build 172659607e0Smrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 173659607e0Smrg | grep __ELF__ >/dev/null 174659607e0Smrg then 175659607e0Smrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 176659607e0Smrg # Return netbsd for either. FIX? 177659607e0Smrg os=netbsd 178659607e0Smrg else 179659607e0Smrg os=netbsdelf 180659607e0Smrg fi 181659607e0Smrg ;; 182659607e0Smrg *) 183659607e0Smrg os=netbsd 184659607e0Smrg ;; 185659607e0Smrg esac 186659607e0Smrg # The OS release 187659607e0Smrg # Debian GNU/NetBSD machines have a different userland, and 188659607e0Smrg # thus, need a distinct triplet. However, they do not need 189659607e0Smrg # kernel version information, so it can be replaced with a 190659607e0Smrg # suitable tag, in the style of linux-gnu. 191659607e0Smrg case "${UNAME_VERSION}" in 192659607e0Smrg Debian*) 193659607e0Smrg release='-gnu' 194659607e0Smrg ;; 195659607e0Smrg *) 196659607e0Smrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 197659607e0Smrg ;; 198659607e0Smrg esac 199659607e0Smrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 200659607e0Smrg # contains redundant information, the shorter form: 201659607e0Smrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 202659607e0Smrg echo "${machine}-${os}${release}" 203659607e0Smrg exit ;; 204659607e0Smrg *:OpenBSD:*:*) 205659607e0Smrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 206659607e0Smrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 207659607e0Smrg exit ;; 208659607e0Smrg *:ekkoBSD:*:*) 209659607e0Smrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 210659607e0Smrg exit ;; 211659607e0Smrg *:SolidBSD:*:*) 212659607e0Smrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 213659607e0Smrg exit ;; 214659607e0Smrg macppc:MirBSD:*:*) 215659607e0Smrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 216659607e0Smrg exit ;; 217659607e0Smrg *:MirBSD:*:*) 218659607e0Smrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 219659607e0Smrg exit ;; 220659607e0Smrg alpha:OSF1:*:*) 221659607e0Smrg case $UNAME_RELEASE in 222659607e0Smrg *4.0) 223659607e0Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 224659607e0Smrg ;; 225659607e0Smrg *5.*) 226659607e0Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 227659607e0Smrg ;; 228659607e0Smrg esac 229659607e0Smrg # According to Compaq, /usr/sbin/psrinfo has been available on 230659607e0Smrg # OSF/1 and Tru64 systems produced since 1995. I hope that 231659607e0Smrg # covers most systems running today. This code pipes the CPU 232659607e0Smrg # types through head -n 1, so we only detect the type of CPU 0. 233659607e0Smrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 234659607e0Smrg case "$ALPHA_CPU_TYPE" in 235659607e0Smrg "EV4 (21064)") 236659607e0Smrg UNAME_MACHINE="alpha" ;; 237659607e0Smrg "EV4.5 (21064)") 238659607e0Smrg UNAME_MACHINE="alpha" ;; 239659607e0Smrg "LCA4 (21066/21068)") 240659607e0Smrg UNAME_MACHINE="alpha" ;; 241659607e0Smrg "EV5 (21164)") 242659607e0Smrg UNAME_MACHINE="alphaev5" ;; 243659607e0Smrg "EV5.6 (21164A)") 244659607e0Smrg UNAME_MACHINE="alphaev56" ;; 245659607e0Smrg "EV5.6 (21164PC)") 246659607e0Smrg UNAME_MACHINE="alphapca56" ;; 247659607e0Smrg "EV5.7 (21164PC)") 248659607e0Smrg UNAME_MACHINE="alphapca57" ;; 249659607e0Smrg "EV6 (21264)") 250659607e0Smrg UNAME_MACHINE="alphaev6" ;; 251659607e0Smrg "EV6.7 (21264A)") 252659607e0Smrg UNAME_MACHINE="alphaev67" ;; 253659607e0Smrg "EV6.8CB (21264C)") 254659607e0Smrg UNAME_MACHINE="alphaev68" ;; 255659607e0Smrg "EV6.8AL (21264B)") 256659607e0Smrg UNAME_MACHINE="alphaev68" ;; 257659607e0Smrg "EV6.8CX (21264D)") 258659607e0Smrg UNAME_MACHINE="alphaev68" ;; 259659607e0Smrg "EV6.9A (21264/EV69A)") 260659607e0Smrg UNAME_MACHINE="alphaev69" ;; 261659607e0Smrg "EV7 (21364)") 262659607e0Smrg UNAME_MACHINE="alphaev7" ;; 263659607e0Smrg "EV7.9 (21364A)") 264659607e0Smrg UNAME_MACHINE="alphaev79" ;; 265659607e0Smrg esac 266659607e0Smrg # A Pn.n version is a patched version. 267659607e0Smrg # A Vn.n version is a released version. 268659607e0Smrg # A Tn.n version is a released field test version. 269659607e0Smrg # A Xn.n version is an unreleased experimental baselevel. 270659607e0Smrg # 1.2 uses "1.2" for uname -r. 271659607e0Smrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 272659607e0Smrg exit ;; 273659607e0Smrg Alpha\ *:Windows_NT*:*) 274659607e0Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 275659607e0Smrg # Should we change UNAME_MACHINE based on the output of uname instead 276659607e0Smrg # of the specific Alpha model? 277659607e0Smrg echo alpha-pc-interix 278659607e0Smrg exit ;; 279659607e0Smrg 21064:Windows_NT:50:3) 280659607e0Smrg echo alpha-dec-winnt3.5 281659607e0Smrg exit ;; 282659607e0Smrg Amiga*:UNIX_System_V:4.0:*) 283659607e0Smrg echo m68k-unknown-sysv4 284659607e0Smrg exit ;; 285659607e0Smrg *:[Aa]miga[Oo][Ss]:*:*) 286659607e0Smrg echo ${UNAME_MACHINE}-unknown-amigaos 287659607e0Smrg exit ;; 288659607e0Smrg *:[Mm]orph[Oo][Ss]:*:*) 289659607e0Smrg echo ${UNAME_MACHINE}-unknown-morphos 290659607e0Smrg exit ;; 291659607e0Smrg *:OS/390:*:*) 292659607e0Smrg echo i370-ibm-openedition 293659607e0Smrg exit ;; 294659607e0Smrg *:z/VM:*:*) 295659607e0Smrg echo s390-ibm-zvmoe 296659607e0Smrg exit ;; 297659607e0Smrg *:OS400:*:*) 298659607e0Smrg echo powerpc-ibm-os400 299659607e0Smrg exit ;; 300659607e0Smrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 301659607e0Smrg echo arm-acorn-riscix${UNAME_RELEASE} 302659607e0Smrg exit ;; 303659607e0Smrg arm:riscos:*:*|arm:RISCOS:*:*) 304659607e0Smrg echo arm-unknown-riscos 305659607e0Smrg exit ;; 306659607e0Smrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 307659607e0Smrg echo hppa1.1-hitachi-hiuxmpp 308659607e0Smrg exit ;; 309659607e0Smrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 310659607e0Smrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 311659607e0Smrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 312659607e0Smrg echo pyramid-pyramid-sysv3 313659607e0Smrg else 314659607e0Smrg echo pyramid-pyramid-bsd 315659607e0Smrg fi 316659607e0Smrg exit ;; 317659607e0Smrg NILE*:*:*:dcosx) 318659607e0Smrg echo pyramid-pyramid-svr4 319659607e0Smrg exit ;; 320659607e0Smrg DRS?6000:unix:4.0:6*) 321659607e0Smrg echo sparc-icl-nx6 322659607e0Smrg exit ;; 323659607e0Smrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 324659607e0Smrg case `/usr/bin/uname -p` in 325659607e0Smrg sparc) echo sparc-icl-nx7; exit ;; 326659607e0Smrg esac ;; 327659607e0Smrg sun4H:SunOS:5.*:*) 328659607e0Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 329659607e0Smrg exit ;; 330659607e0Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 331659607e0Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 332659607e0Smrg exit ;; 333659607e0Smrg i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*) 334659607e0Smrg echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 335659607e0Smrg exit ;; 336659607e0Smrg sun4*:SunOS:6*:*) 337659607e0Smrg # According to config.sub, this is the proper way to canonicalize 338659607e0Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 339659607e0Smrg # it's likely to be more like Solaris than SunOS4. 340659607e0Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 341659607e0Smrg exit ;; 342659607e0Smrg sun4*:SunOS:*:*) 343659607e0Smrg case "`/usr/bin/arch -k`" in 344659607e0Smrg Series*|S4*) 345659607e0Smrg UNAME_RELEASE=`uname -v` 346659607e0Smrg ;; 347659607e0Smrg esac 348659607e0Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 349659607e0Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 350659607e0Smrg exit ;; 351659607e0Smrg sun3*:SunOS:*:*) 352659607e0Smrg echo m68k-sun-sunos${UNAME_RELEASE} 353659607e0Smrg exit ;; 354659607e0Smrg sun*:*:4.2BSD:*) 355659607e0Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 356659607e0Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 357659607e0Smrg case "`/bin/arch`" in 358659607e0Smrg sun3) 359659607e0Smrg echo m68k-sun-sunos${UNAME_RELEASE} 360659607e0Smrg ;; 361659607e0Smrg sun4) 362659607e0Smrg echo sparc-sun-sunos${UNAME_RELEASE} 363659607e0Smrg ;; 364659607e0Smrg esac 365659607e0Smrg exit ;; 366659607e0Smrg aushp:SunOS:*:*) 367659607e0Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 368659607e0Smrg exit ;; 369659607e0Smrg # The situation for MiNT is a little confusing. The machine name 370659607e0Smrg # can be virtually everything (everything which is not 371659607e0Smrg # "atarist" or "atariste" at least should have a processor 372659607e0Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 373659607e0Smrg # to the lowercase version "mint" (or "freemint"). Finally 374659607e0Smrg # the system name "TOS" denotes a system which is actually not 375659607e0Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 376659607e0Smrg # be no problem. 377659607e0Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 378659607e0Smrg echo m68k-atari-mint${UNAME_RELEASE} 379659607e0Smrg exit ;; 380659607e0Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 381659607e0Smrg echo m68k-atari-mint${UNAME_RELEASE} 382659607e0Smrg exit ;; 383659607e0Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 384659607e0Smrg echo m68k-atari-mint${UNAME_RELEASE} 385659607e0Smrg exit ;; 386659607e0Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 387659607e0Smrg echo m68k-milan-mint${UNAME_RELEASE} 388659607e0Smrg exit ;; 389659607e0Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 390659607e0Smrg echo m68k-hades-mint${UNAME_RELEASE} 391659607e0Smrg exit ;; 392659607e0Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 393659607e0Smrg echo m68k-unknown-mint${UNAME_RELEASE} 394659607e0Smrg exit ;; 395659607e0Smrg m68k:machten:*:*) 396659607e0Smrg echo m68k-apple-machten${UNAME_RELEASE} 397659607e0Smrg exit ;; 398659607e0Smrg powerpc:machten:*:*) 399659607e0Smrg echo powerpc-apple-machten${UNAME_RELEASE} 400659607e0Smrg exit ;; 401659607e0Smrg RISC*:Mach:*:*) 402659607e0Smrg echo mips-dec-mach_bsd4.3 403659607e0Smrg exit ;; 404659607e0Smrg RISC*:ULTRIX:*:*) 405659607e0Smrg echo mips-dec-ultrix${UNAME_RELEASE} 406659607e0Smrg exit ;; 407659607e0Smrg VAX*:ULTRIX*:*:*) 408659607e0Smrg echo vax-dec-ultrix${UNAME_RELEASE} 409659607e0Smrg exit ;; 410659607e0Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 411659607e0Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 412659607e0Smrg exit ;; 413659607e0Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 414659607e0Smrg eval $set_cc_for_build 415659607e0Smrg sed 's/^ //' << EOF >$dummy.c 416659607e0Smrg#ifdef __cplusplus 417659607e0Smrg#include <stdio.h> /* for printf() prototype */ 418659607e0Smrg int main (int argc, char *argv[]) { 419659607e0Smrg#else 420659607e0Smrg int main (argc, argv) int argc; char *argv[]; { 421659607e0Smrg#endif 422659607e0Smrg #if defined (host_mips) && defined (MIPSEB) 423659607e0Smrg #if defined (SYSTYPE_SYSV) 424659607e0Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 425659607e0Smrg #endif 426659607e0Smrg #if defined (SYSTYPE_SVR4) 427659607e0Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 428659607e0Smrg #endif 429659607e0Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 430659607e0Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 431659607e0Smrg #endif 432659607e0Smrg #endif 433659607e0Smrg exit (-1); 434659607e0Smrg } 435659607e0SmrgEOF 436659607e0Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 437659607e0Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 438659607e0Smrg SYSTEM_NAME=`$dummy $dummyarg` && 439659607e0Smrg { echo "$SYSTEM_NAME"; exit; } 440659607e0Smrg echo mips-mips-riscos${UNAME_RELEASE} 441659607e0Smrg exit ;; 442659607e0Smrg Motorola:PowerMAX_OS:*:*) 443659607e0Smrg echo powerpc-motorola-powermax 444659607e0Smrg exit ;; 445659607e0Smrg Motorola:*:4.3:PL8-*) 446659607e0Smrg echo powerpc-harris-powermax 447659607e0Smrg exit ;; 448659607e0Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 449659607e0Smrg echo powerpc-harris-powermax 450659607e0Smrg exit ;; 451659607e0Smrg Night_Hawk:Power_UNIX:*:*) 452659607e0Smrg echo powerpc-harris-powerunix 453659607e0Smrg exit ;; 454659607e0Smrg m88k:CX/UX:7*:*) 455659607e0Smrg echo m88k-harris-cxux7 456659607e0Smrg exit ;; 457659607e0Smrg m88k:*:4*:R4*) 458659607e0Smrg echo m88k-motorola-sysv4 459659607e0Smrg exit ;; 460659607e0Smrg m88k:*:3*:R3*) 461659607e0Smrg echo m88k-motorola-sysv3 462659607e0Smrg exit ;; 463659607e0Smrg AViiON:dgux:*:*) 464659607e0Smrg # DG/UX returns AViiON for all architectures 465659607e0Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 466659607e0Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 467659607e0Smrg then 468659607e0Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 469659607e0Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 470659607e0Smrg then 471659607e0Smrg echo m88k-dg-dgux${UNAME_RELEASE} 472659607e0Smrg else 473659607e0Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 474659607e0Smrg fi 475659607e0Smrg else 476659607e0Smrg echo i586-dg-dgux${UNAME_RELEASE} 477659607e0Smrg fi 478659607e0Smrg exit ;; 479659607e0Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 480659607e0Smrg echo m88k-dolphin-sysv3 481659607e0Smrg exit ;; 482659607e0Smrg M88*:*:R3*:*) 483659607e0Smrg # Delta 88k system running SVR3 484659607e0Smrg echo m88k-motorola-sysv3 485659607e0Smrg exit ;; 486659607e0Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 487659607e0Smrg echo m88k-tektronix-sysv3 488659607e0Smrg exit ;; 489659607e0Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 490659607e0Smrg echo m68k-tektronix-bsd 491659607e0Smrg exit ;; 492659607e0Smrg *:IRIX*:*:*) 493659607e0Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 494659607e0Smrg exit ;; 495659607e0Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 496659607e0Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 497659607e0Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 498659607e0Smrg i*86:AIX:*:*) 499659607e0Smrg echo i386-ibm-aix 500659607e0Smrg exit ;; 501659607e0Smrg ia64:AIX:*:*) 502659607e0Smrg if [ -x /usr/bin/oslevel ] ; then 503659607e0Smrg IBM_REV=`/usr/bin/oslevel` 504659607e0Smrg else 505659607e0Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 506659607e0Smrg fi 507659607e0Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 508659607e0Smrg exit ;; 509659607e0Smrg *:AIX:2:3) 510659607e0Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 511659607e0Smrg eval $set_cc_for_build 512659607e0Smrg sed 's/^ //' << EOF >$dummy.c 513659607e0Smrg #include <sys/systemcfg.h> 514659607e0Smrg 515659607e0Smrg main() 516659607e0Smrg { 517659607e0Smrg if (!__power_pc()) 518659607e0Smrg exit(1); 519659607e0Smrg puts("powerpc-ibm-aix3.2.5"); 520659607e0Smrg exit(0); 521659607e0Smrg } 522659607e0SmrgEOF 523659607e0Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 524659607e0Smrg then 525659607e0Smrg echo "$SYSTEM_NAME" 526659607e0Smrg else 527659607e0Smrg echo rs6000-ibm-aix3.2.5 528659607e0Smrg fi 529659607e0Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 530659607e0Smrg echo rs6000-ibm-aix3.2.4 531659607e0Smrg else 532659607e0Smrg echo rs6000-ibm-aix3.2 533659607e0Smrg fi 534659607e0Smrg exit ;; 535659607e0Smrg *:AIX:*:[45]) 536659607e0Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 537659607e0Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 538659607e0Smrg IBM_ARCH=rs6000 539659607e0Smrg else 540659607e0Smrg IBM_ARCH=powerpc 541659607e0Smrg fi 542659607e0Smrg if [ -x /usr/bin/oslevel ] ; then 543659607e0Smrg IBM_REV=`/usr/bin/oslevel` 544659607e0Smrg else 545659607e0Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 546659607e0Smrg fi 547659607e0Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 548659607e0Smrg exit ;; 549659607e0Smrg *:AIX:*:*) 550659607e0Smrg echo rs6000-ibm-aix 551659607e0Smrg exit ;; 552659607e0Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 553659607e0Smrg echo romp-ibm-bsd4.4 554659607e0Smrg exit ;; 555659607e0Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 556659607e0Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 557659607e0Smrg exit ;; # report: romp-ibm BSD 4.3 558659607e0Smrg *:BOSX:*:*) 559659607e0Smrg echo rs6000-bull-bosx 560659607e0Smrg exit ;; 561659607e0Smrg DPX/2?00:B.O.S.:*:*) 562659607e0Smrg echo m68k-bull-sysv3 563659607e0Smrg exit ;; 564659607e0Smrg 9000/[34]??:4.3bsd:1.*:*) 565659607e0Smrg echo m68k-hp-bsd 566659607e0Smrg exit ;; 567659607e0Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 568659607e0Smrg echo m68k-hp-bsd4.4 569659607e0Smrg exit ;; 570659607e0Smrg 9000/[34678]??:HP-UX:*:*) 571659607e0Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 572659607e0Smrg case "${UNAME_MACHINE}" in 573659607e0Smrg 9000/31? ) HP_ARCH=m68000 ;; 574659607e0Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 575659607e0Smrg 9000/[678][0-9][0-9]) 576659607e0Smrg if [ -x /usr/bin/getconf ]; then 577659607e0Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 578659607e0Smrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 579659607e0Smrg case "${sc_cpu_version}" in 580659607e0Smrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 581659607e0Smrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 582659607e0Smrg 532) # CPU_PA_RISC2_0 583659607e0Smrg case "${sc_kernel_bits}" in 584659607e0Smrg 32) HP_ARCH="hppa2.0n" ;; 585659607e0Smrg 64) HP_ARCH="hppa2.0w" ;; 586659607e0Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 587659607e0Smrg esac ;; 588659607e0Smrg esac 589659607e0Smrg fi 590659607e0Smrg if [ "${HP_ARCH}" = "" ]; then 591659607e0Smrg eval $set_cc_for_build 592659607e0Smrg sed 's/^ //' << EOF >$dummy.c 593659607e0Smrg 594659607e0Smrg #define _HPUX_SOURCE 595659607e0Smrg #include <stdlib.h> 596659607e0Smrg #include <unistd.h> 597659607e0Smrg 598659607e0Smrg int main () 599659607e0Smrg { 600659607e0Smrg #if defined(_SC_KERNEL_BITS) 601659607e0Smrg long bits = sysconf(_SC_KERNEL_BITS); 602659607e0Smrg #endif 603659607e0Smrg long cpu = sysconf (_SC_CPU_VERSION); 604659607e0Smrg 605659607e0Smrg switch (cpu) 606659607e0Smrg { 607659607e0Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 608659607e0Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 609659607e0Smrg case CPU_PA_RISC2_0: 610659607e0Smrg #if defined(_SC_KERNEL_BITS) 611659607e0Smrg switch (bits) 612659607e0Smrg { 613659607e0Smrg case 64: puts ("hppa2.0w"); break; 614659607e0Smrg case 32: puts ("hppa2.0n"); break; 615659607e0Smrg default: puts ("hppa2.0"); break; 616659607e0Smrg } break; 617659607e0Smrg #else /* !defined(_SC_KERNEL_BITS) */ 618659607e0Smrg puts ("hppa2.0"); break; 619659607e0Smrg #endif 620659607e0Smrg default: puts ("hppa1.0"); break; 621659607e0Smrg } 622659607e0Smrg exit (0); 623659607e0Smrg } 624659607e0SmrgEOF 625659607e0Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 626659607e0Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 627659607e0Smrg fi ;; 628659607e0Smrg esac 629659607e0Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 630659607e0Smrg then 631659607e0Smrg eval $set_cc_for_build 632659607e0Smrg 633659607e0Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 634659607e0Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 635659607e0Smrg # generating 64-bit code. GNU and HP use different nomenclature: 636659607e0Smrg # 637659607e0Smrg # $ CC_FOR_BUILD=cc ./config.guess 638659607e0Smrg # => hppa2.0w-hp-hpux11.23 639659607e0Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 640659607e0Smrg # => hppa64-hp-hpux11.23 641659607e0Smrg 642659607e0Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 643659607e0Smrg grep __LP64__ >/dev/null 644659607e0Smrg then 645659607e0Smrg HP_ARCH="hppa2.0w" 646659607e0Smrg else 647659607e0Smrg HP_ARCH="hppa64" 648659607e0Smrg fi 649659607e0Smrg fi 650659607e0Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 651659607e0Smrg exit ;; 652659607e0Smrg ia64:HP-UX:*:*) 653659607e0Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 654659607e0Smrg echo ia64-hp-hpux${HPUX_REV} 655659607e0Smrg exit ;; 656659607e0Smrg 3050*:HI-UX:*:*) 657659607e0Smrg eval $set_cc_for_build 658659607e0Smrg sed 's/^ //' << EOF >$dummy.c 659659607e0Smrg #include <unistd.h> 660659607e0Smrg int 661659607e0Smrg main () 662659607e0Smrg { 663659607e0Smrg long cpu = sysconf (_SC_CPU_VERSION); 664659607e0Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 665659607e0Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 666659607e0Smrg results, however. */ 667659607e0Smrg if (CPU_IS_PA_RISC (cpu)) 668659607e0Smrg { 669659607e0Smrg switch (cpu) 670659607e0Smrg { 671659607e0Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 672659607e0Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 673659607e0Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 674659607e0Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 675659607e0Smrg } 676659607e0Smrg } 677659607e0Smrg else if (CPU_IS_HP_MC68K (cpu)) 678659607e0Smrg puts ("m68k-hitachi-hiuxwe2"); 679659607e0Smrg else puts ("unknown-hitachi-hiuxwe2"); 680659607e0Smrg exit (0); 681659607e0Smrg } 682659607e0SmrgEOF 683659607e0Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 684659607e0Smrg { echo "$SYSTEM_NAME"; exit; } 685659607e0Smrg echo unknown-hitachi-hiuxwe2 686659607e0Smrg exit ;; 687659607e0Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 688659607e0Smrg echo hppa1.1-hp-bsd 689659607e0Smrg exit ;; 690659607e0Smrg 9000/8??:4.3bsd:*:*) 691659607e0Smrg echo hppa1.0-hp-bsd 692659607e0Smrg exit ;; 693659607e0Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 694659607e0Smrg echo hppa1.0-hp-mpeix 695659607e0Smrg exit ;; 696659607e0Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 697659607e0Smrg echo hppa1.1-hp-osf 698659607e0Smrg exit ;; 699659607e0Smrg hp8??:OSF1:*:*) 700659607e0Smrg echo hppa1.0-hp-osf 701659607e0Smrg exit ;; 702659607e0Smrg i*86:OSF1:*:*) 703659607e0Smrg if [ -x /usr/sbin/sysversion ] ; then 704659607e0Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 705659607e0Smrg else 706659607e0Smrg echo ${UNAME_MACHINE}-unknown-osf1 707659607e0Smrg fi 708659607e0Smrg exit ;; 709659607e0Smrg parisc*:Lites*:*:*) 710659607e0Smrg echo hppa1.1-hp-lites 711659607e0Smrg exit ;; 712659607e0Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 713659607e0Smrg echo c1-convex-bsd 714659607e0Smrg exit ;; 715659607e0Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 716659607e0Smrg if getsysinfo -f scalar_acc 717659607e0Smrg then echo c32-convex-bsd 718659607e0Smrg else echo c2-convex-bsd 719659607e0Smrg fi 720659607e0Smrg exit ;; 721659607e0Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 722659607e0Smrg echo c34-convex-bsd 723659607e0Smrg exit ;; 724659607e0Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 725659607e0Smrg echo c38-convex-bsd 726659607e0Smrg exit ;; 727659607e0Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 728659607e0Smrg echo c4-convex-bsd 729659607e0Smrg exit ;; 730659607e0Smrg CRAY*Y-MP:*:*:*) 731659607e0Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 732659607e0Smrg exit ;; 733659607e0Smrg CRAY*[A-Z]90:*:*:*) 734659607e0Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 735659607e0Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 736659607e0Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 737659607e0Smrg -e 's/\.[^.]*$/.X/' 738659607e0Smrg exit ;; 739659607e0Smrg CRAY*TS:*:*:*) 740659607e0Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 741659607e0Smrg exit ;; 742659607e0Smrg CRAY*T3E:*:*:*) 743659607e0Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 744659607e0Smrg exit ;; 745659607e0Smrg CRAY*SV1:*:*:*) 746659607e0Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 747659607e0Smrg exit ;; 748659607e0Smrg *:UNICOS/mp:*:*) 749659607e0Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 750659607e0Smrg exit ;; 751659607e0Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 752659607e0Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 753659607e0Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 754659607e0Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 755659607e0Smrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 756659607e0Smrg exit ;; 757659607e0Smrg 5000:UNIX_System_V:4.*:*) 758659607e0Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 759659607e0Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 760659607e0Smrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 761659607e0Smrg exit ;; 762659607e0Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 763659607e0Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 764659607e0Smrg exit ;; 765659607e0Smrg sparc*:BSD/OS:*:*) 766659607e0Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 767659607e0Smrg exit ;; 768659607e0Smrg *:BSD/OS:*:*) 769659607e0Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 770659607e0Smrg exit ;; 771659607e0Smrg *:FreeBSD:*:*) 772659607e0Smrg case ${UNAME_MACHINE} in 773659607e0Smrg pc98) 774659607e0Smrg echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 775659607e0Smrg amd64) 776659607e0Smrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 777659607e0Smrg *) 778659607e0Smrg echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 779659607e0Smrg esac 780659607e0Smrg exit ;; 781659607e0Smrg i*:CYGWIN*:*) 782659607e0Smrg echo ${UNAME_MACHINE}-pc-cygwin 783659607e0Smrg exit ;; 784659607e0Smrg *:MINGW*:*) 785659607e0Smrg echo ${UNAME_MACHINE}-pc-mingw32 786659607e0Smrg exit ;; 787659607e0Smrg i*:windows32*:*) 788659607e0Smrg # uname -m includes "-pc" on this system. 789659607e0Smrg echo ${UNAME_MACHINE}-mingw32 790659607e0Smrg exit ;; 791659607e0Smrg i*:PW*:*) 792659607e0Smrg echo ${UNAME_MACHINE}-pc-pw32 793659607e0Smrg exit ;; 794659607e0Smrg *:Interix*:[3456]*) 795659607e0Smrg case ${UNAME_MACHINE} in 796659607e0Smrg x86) 797659607e0Smrg echo i586-pc-interix${UNAME_RELEASE} 798659607e0Smrg exit ;; 799659607e0Smrg EM64T | authenticamd) 800659607e0Smrg echo x86_64-unknown-interix${UNAME_RELEASE} 801659607e0Smrg exit ;; 802659607e0Smrg esac ;; 803659607e0Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 804659607e0Smrg echo i${UNAME_MACHINE}-pc-mks 805659607e0Smrg exit ;; 806659607e0Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 807659607e0Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 808659607e0Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 809659607e0Smrg # UNAME_MACHINE based on the output of uname instead of i386? 810659607e0Smrg echo i586-pc-interix 811659607e0Smrg exit ;; 812659607e0Smrg i*:UWIN*:*) 813659607e0Smrg echo ${UNAME_MACHINE}-pc-uwin 814659607e0Smrg exit ;; 815659607e0Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 816659607e0Smrg echo x86_64-unknown-cygwin 817659607e0Smrg exit ;; 818659607e0Smrg p*:CYGWIN*:*) 819659607e0Smrg echo powerpcle-unknown-cygwin 820659607e0Smrg exit ;; 821659607e0Smrg prep*:SunOS:5.*:*) 822659607e0Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 823659607e0Smrg exit ;; 824659607e0Smrg *:GNU:*:*) 825659607e0Smrg # the GNU system 826659607e0Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 827659607e0Smrg exit ;; 828659607e0Smrg *:GNU/*:*:*) 829659607e0Smrg # other systems with GNU libc and userland 830659607e0Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 831659607e0Smrg exit ;; 832659607e0Smrg i*86:Minix:*:*) 833659607e0Smrg echo ${UNAME_MACHINE}-pc-minix 834659607e0Smrg exit ;; 835659607e0Smrg arm*:Linux:*:*) 836659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 837659607e0Smrg exit ;; 838659607e0Smrg avr32*:Linux:*:*) 839659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 840659607e0Smrg exit ;; 841659607e0Smrg cris:Linux:*:*) 842659607e0Smrg echo cris-axis-linux-gnu 843659607e0Smrg exit ;; 844659607e0Smrg crisv32:Linux:*:*) 845659607e0Smrg echo crisv32-axis-linux-gnu 846659607e0Smrg exit ;; 847659607e0Smrg frv:Linux:*:*) 848659607e0Smrg echo frv-unknown-linux-gnu 849659607e0Smrg exit ;; 850659607e0Smrg ia64:Linux:*:*) 851659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 852659607e0Smrg exit ;; 853659607e0Smrg m32r*:Linux:*:*) 854659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 855659607e0Smrg exit ;; 856659607e0Smrg m68*:Linux:*:*) 857659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 858659607e0Smrg exit ;; 859659607e0Smrg mips:Linux:*:*) 860659607e0Smrg eval $set_cc_for_build 861659607e0Smrg sed 's/^ //' << EOF >$dummy.c 862659607e0Smrg #undef CPU 863659607e0Smrg #undef mips 864659607e0Smrg #undef mipsel 865659607e0Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 866659607e0Smrg CPU=mipsel 867659607e0Smrg #else 868659607e0Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 869659607e0Smrg CPU=mips 870659607e0Smrg #else 871659607e0Smrg CPU= 872659607e0Smrg #endif 873659607e0Smrg #endif 874659607e0SmrgEOF 875659607e0Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 876659607e0Smrg /^CPU/{ 877659607e0Smrg s: ::g 878659607e0Smrg p 879659607e0Smrg }'`" 880659607e0Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 881659607e0Smrg ;; 882659607e0Smrg mips64:Linux:*:*) 883659607e0Smrg eval $set_cc_for_build 884659607e0Smrg sed 's/^ //' << EOF >$dummy.c 885659607e0Smrg #undef CPU 886659607e0Smrg #undef mips64 887659607e0Smrg #undef mips64el 888659607e0Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 889659607e0Smrg CPU=mips64el 890659607e0Smrg #else 891659607e0Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 892659607e0Smrg CPU=mips64 893659607e0Smrg #else 894659607e0Smrg CPU= 895659607e0Smrg #endif 896659607e0Smrg #endif 897659607e0SmrgEOF 898659607e0Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 899659607e0Smrg /^CPU/{ 900659607e0Smrg s: ::g 901659607e0Smrg p 902659607e0Smrg }'`" 903659607e0Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 904659607e0Smrg ;; 905659607e0Smrg or32:Linux:*:*) 906659607e0Smrg echo or32-unknown-linux-gnu 907659607e0Smrg exit ;; 908659607e0Smrg ppc:Linux:*:*) 909659607e0Smrg echo powerpc-unknown-linux-gnu 910659607e0Smrg exit ;; 911659607e0Smrg ppc64:Linux:*:*) 912659607e0Smrg echo powerpc64-unknown-linux-gnu 913659607e0Smrg exit ;; 914659607e0Smrg alpha:Linux:*:*) 915659607e0Smrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 916659607e0Smrg EV5) UNAME_MACHINE=alphaev5 ;; 917659607e0Smrg EV56) UNAME_MACHINE=alphaev56 ;; 918659607e0Smrg PCA56) UNAME_MACHINE=alphapca56 ;; 919659607e0Smrg PCA57) UNAME_MACHINE=alphapca56 ;; 920659607e0Smrg EV6) UNAME_MACHINE=alphaev6 ;; 921659607e0Smrg EV67) UNAME_MACHINE=alphaev67 ;; 922659607e0Smrg EV68*) UNAME_MACHINE=alphaev68 ;; 923659607e0Smrg esac 924659607e0Smrg objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 925659607e0Smrg if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 926659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 927659607e0Smrg exit ;; 928659607e0Smrg parisc:Linux:*:* | hppa:Linux:*:*) 929659607e0Smrg # Look for CPU level 930659607e0Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 931659607e0Smrg PA7*) echo hppa1.1-unknown-linux-gnu ;; 932659607e0Smrg PA8*) echo hppa2.0-unknown-linux-gnu ;; 933659607e0Smrg *) echo hppa-unknown-linux-gnu ;; 934659607e0Smrg esac 935659607e0Smrg exit ;; 936659607e0Smrg parisc64:Linux:*:* | hppa64:Linux:*:*) 937659607e0Smrg echo hppa64-unknown-linux-gnu 938659607e0Smrg exit ;; 939659607e0Smrg s390:Linux:*:* | s390x:Linux:*:*) 940659607e0Smrg echo ${UNAME_MACHINE}-ibm-linux 941659607e0Smrg exit ;; 942659607e0Smrg sh64*:Linux:*:*) 943659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 944659607e0Smrg exit ;; 945659607e0Smrg sh*:Linux:*:*) 946659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 947659607e0Smrg exit ;; 948659607e0Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 949659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 950659607e0Smrg exit ;; 951659607e0Smrg vax:Linux:*:*) 952659607e0Smrg echo ${UNAME_MACHINE}-dec-linux-gnu 953659607e0Smrg exit ;; 954659607e0Smrg x86_64:Linux:*:*) 955659607e0Smrg echo x86_64-unknown-linux-gnu 956659607e0Smrg exit ;; 957659607e0Smrg xtensa:Linux:*:*) 958659607e0Smrg echo xtensa-unknown-linux-gnu 959659607e0Smrg exit ;; 960659607e0Smrg i*86:Linux:*:*) 961659607e0Smrg # The BFD linker knows what the default object file format is, so 962659607e0Smrg # first see if it will tell us. cd to the root directory to prevent 963659607e0Smrg # problems with other programs or directories called `ld' in the path. 964659607e0Smrg # Set LC_ALL=C to ensure ld outputs messages in English. 965659607e0Smrg ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ 966659607e0Smrg | sed -ne '/supported targets:/!d 967659607e0Smrg s/[ ][ ]*/ /g 968659607e0Smrg s/.*supported targets: *// 969659607e0Smrg s/ .*// 970659607e0Smrg p'` 971659607e0Smrg case "$ld_supported_targets" in 972659607e0Smrg elf32-i386) 973659607e0Smrg TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 974659607e0Smrg ;; 975659607e0Smrg a.out-i386-linux) 976659607e0Smrg echo "${UNAME_MACHINE}-pc-linux-gnuaout" 977659607e0Smrg exit ;; 978659607e0Smrg coff-i386) 979659607e0Smrg echo "${UNAME_MACHINE}-pc-linux-gnucoff" 980659607e0Smrg exit ;; 981659607e0Smrg "") 982659607e0Smrg # Either a pre-BFD a.out linker (linux-gnuoldld) or 983659607e0Smrg # one that does not give us useful --help. 984659607e0Smrg echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 985659607e0Smrg exit ;; 986659607e0Smrg esac 987659607e0Smrg # Determine whether the default compiler is a.out or elf 988659607e0Smrg eval $set_cc_for_build 989659607e0Smrg sed 's/^ //' << EOF >$dummy.c 990659607e0Smrg #include <features.h> 991659607e0Smrg #ifdef __ELF__ 992659607e0Smrg # ifdef __GLIBC__ 993659607e0Smrg # if __GLIBC__ >= 2 994659607e0Smrg LIBC=gnu 995659607e0Smrg # else 996659607e0Smrg LIBC=gnulibc1 997659607e0Smrg # endif 998659607e0Smrg # else 999659607e0Smrg LIBC=gnulibc1 1000659607e0Smrg # endif 1001659607e0Smrg #else 1002659607e0Smrg #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) 1003659607e0Smrg LIBC=gnu 1004659607e0Smrg #else 1005659607e0Smrg LIBC=gnuaout 1006659607e0Smrg #endif 1007659607e0Smrg #endif 1008659607e0Smrg #ifdef __dietlibc__ 1009659607e0Smrg LIBC=dietlibc 1010659607e0Smrg #endif 1011659607e0SmrgEOF 1012659607e0Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 1013659607e0Smrg /^LIBC/{ 1014659607e0Smrg s: ::g 1015659607e0Smrg p 1016659607e0Smrg }'`" 1017659607e0Smrg test x"${LIBC}" != x && { 1018659607e0Smrg echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 1019659607e0Smrg exit 1020659607e0Smrg } 1021659607e0Smrg test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } 1022659607e0Smrg ;; 1023659607e0Smrg i*86:DYNIX/ptx:4*:*) 1024659607e0Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1025659607e0Smrg # earlier versions are messed up and put the nodename in both 1026659607e0Smrg # sysname and nodename. 1027659607e0Smrg echo i386-sequent-sysv4 1028659607e0Smrg exit ;; 1029659607e0Smrg i*86:UNIX_SV:4.2MP:2.*) 1030659607e0Smrg # Unixware is an offshoot of SVR4, but it has its own version 1031659607e0Smrg # number series starting with 2... 1032659607e0Smrg # I am not positive that other SVR4 systems won't match this, 1033659607e0Smrg # I just have to hope. -- rms. 1034659607e0Smrg # Use sysv4.2uw... so that sysv4* matches it. 1035659607e0Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1036659607e0Smrg exit ;; 1037659607e0Smrg i*86:OS/2:*:*) 1038659607e0Smrg # If we were able to find `uname', then EMX Unix compatibility 1039659607e0Smrg # is probably installed. 1040659607e0Smrg echo ${UNAME_MACHINE}-pc-os2-emx 1041659607e0Smrg exit ;; 1042659607e0Smrg i*86:XTS-300:*:STOP) 1043659607e0Smrg echo ${UNAME_MACHINE}-unknown-stop 1044659607e0Smrg exit ;; 1045659607e0Smrg i*86:atheos:*:*) 1046659607e0Smrg echo ${UNAME_MACHINE}-unknown-atheos 1047659607e0Smrg exit ;; 1048659607e0Smrg i*86:syllable:*:*) 1049659607e0Smrg echo ${UNAME_MACHINE}-pc-syllable 1050659607e0Smrg exit ;; 1051659607e0Smrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 1052659607e0Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 1053659607e0Smrg exit ;; 1054659607e0Smrg i*86:*DOS:*:*) 1055659607e0Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 1056659607e0Smrg exit ;; 1057659607e0Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1058659607e0Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1059659607e0Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1060659607e0Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 1061659607e0Smrg else 1062659607e0Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1063659607e0Smrg fi 1064659607e0Smrg exit ;; 1065659607e0Smrg i*86:*:5:[678]*) 1066659607e0Smrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 1067659607e0Smrg case `/bin/uname -X | grep "^Machine"` in 1068659607e0Smrg *486*) UNAME_MACHINE=i486 ;; 1069659607e0Smrg *Pentium) UNAME_MACHINE=i586 ;; 1070659607e0Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1071659607e0Smrg esac 1072659607e0Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1073659607e0Smrg exit ;; 1074659607e0Smrg i*86:*:3.2:*) 1075659607e0Smrg if test -f /usr/options/cb.name; then 1076659607e0Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1077659607e0Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 1078659607e0Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 1079659607e0Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1080659607e0Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1081659607e0Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 1082659607e0Smrg && UNAME_MACHINE=i586 1083659607e0Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1084659607e0Smrg && UNAME_MACHINE=i686 1085659607e0Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1086659607e0Smrg && UNAME_MACHINE=i686 1087659607e0Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 1088659607e0Smrg else 1089659607e0Smrg echo ${UNAME_MACHINE}-pc-sysv32 1090659607e0Smrg fi 1091659607e0Smrg exit ;; 1092659607e0Smrg pc:*:*:*) 1093659607e0Smrg # Left here for compatibility: 1094659607e0Smrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 1095659607e0Smrg # the processor, so we play safe by assuming i386. 1096659607e0Smrg echo i386-pc-msdosdjgpp 1097659607e0Smrg exit ;; 1098659607e0Smrg Intel:Mach:3*:*) 1099659607e0Smrg echo i386-pc-mach3 1100659607e0Smrg exit ;; 1101659607e0Smrg paragon:*:*:*) 1102659607e0Smrg echo i860-intel-osf1 1103659607e0Smrg exit ;; 1104659607e0Smrg i860:*:4.*:*) # i860-SVR4 1105659607e0Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1106659607e0Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1107659607e0Smrg else # Add other i860-SVR4 vendors below as they are discovered. 1108659607e0Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1109659607e0Smrg fi 1110659607e0Smrg exit ;; 1111659607e0Smrg mini*:CTIX:SYS*5:*) 1112659607e0Smrg # "miniframe" 1113659607e0Smrg echo m68010-convergent-sysv 1114659607e0Smrg exit ;; 1115659607e0Smrg mc68k:UNIX:SYSTEM5:3.51m) 1116659607e0Smrg echo m68k-convergent-sysv 1117659607e0Smrg exit ;; 1118659607e0Smrg M680?0:D-NIX:5.3:*) 1119659607e0Smrg echo m68k-diab-dnix 1120659607e0Smrg exit ;; 1121659607e0Smrg M68*:*:R3V[5678]*:*) 1122659607e0Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1123659607e0Smrg 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) 1124659607e0Smrg OS_REL='' 1125659607e0Smrg test -r /etc/.relid \ 1126659607e0Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1127659607e0Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1128659607e0Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1129659607e0Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1130659607e0Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1131659607e0Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1132659607e0Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1133659607e0Smrg && { echo i486-ncr-sysv4; exit; } ;; 1134659607e0Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1135659607e0Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 1136659607e0Smrg exit ;; 1137659607e0Smrg mc68030:UNIX_System_V:4.*:*) 1138659607e0Smrg echo m68k-atari-sysv4 1139659607e0Smrg exit ;; 1140659607e0Smrg TSUNAMI:LynxOS:2.*:*) 1141659607e0Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 1142659607e0Smrg exit ;; 1143659607e0Smrg rs6000:LynxOS:2.*:*) 1144659607e0Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 1145659607e0Smrg exit ;; 1146659607e0Smrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1147659607e0Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 1148659607e0Smrg exit ;; 1149659607e0Smrg SM[BE]S:UNIX_SV:*:*) 1150659607e0Smrg echo mips-dde-sysv${UNAME_RELEASE} 1151659607e0Smrg exit ;; 1152659607e0Smrg RM*:ReliantUNIX-*:*:*) 1153659607e0Smrg echo mips-sni-sysv4 1154659607e0Smrg exit ;; 1155659607e0Smrg RM*:SINIX-*:*:*) 1156659607e0Smrg echo mips-sni-sysv4 1157659607e0Smrg exit ;; 1158659607e0Smrg *:SINIX-*:*:*) 1159659607e0Smrg if uname -p 2>/dev/null >/dev/null ; then 1160659607e0Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 1161659607e0Smrg echo ${UNAME_MACHINE}-sni-sysv4 1162659607e0Smrg else 1163659607e0Smrg echo ns32k-sni-sysv 1164659607e0Smrg fi 1165659607e0Smrg exit ;; 1166659607e0Smrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1167659607e0Smrg # says <Richard.M.Bartel@ccMail.Census.GOV> 1168659607e0Smrg echo i586-unisys-sysv4 1169659607e0Smrg exit ;; 1170659607e0Smrg *:UNIX_System_V:4*:FTX*) 1171659607e0Smrg # From Gerald Hewes <hewes@openmarket.com>. 1172659607e0Smrg # How about differentiating between stratus architectures? -djm 1173659607e0Smrg echo hppa1.1-stratus-sysv4 1174659607e0Smrg exit ;; 1175659607e0Smrg *:*:*:FTX*) 1176659607e0Smrg # From seanf@swdc.stratus.com. 1177659607e0Smrg echo i860-stratus-sysv4 1178659607e0Smrg exit ;; 1179659607e0Smrg i*86:VOS:*:*) 1180659607e0Smrg # From Paul.Green@stratus.com. 1181659607e0Smrg echo ${UNAME_MACHINE}-stratus-vos 1182659607e0Smrg exit ;; 1183659607e0Smrg *:VOS:*:*) 1184659607e0Smrg # From Paul.Green@stratus.com. 1185659607e0Smrg echo hppa1.1-stratus-vos 1186659607e0Smrg exit ;; 1187659607e0Smrg mc68*:A/UX:*:*) 1188659607e0Smrg echo m68k-apple-aux${UNAME_RELEASE} 1189659607e0Smrg exit ;; 1190659607e0Smrg news*:NEWS-OS:6*:*) 1191659607e0Smrg echo mips-sony-newsos6 1192659607e0Smrg exit ;; 1193659607e0Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1194659607e0Smrg if [ -d /usr/nec ]; then 1195659607e0Smrg echo mips-nec-sysv${UNAME_RELEASE} 1196659607e0Smrg else 1197659607e0Smrg echo mips-unknown-sysv${UNAME_RELEASE} 1198659607e0Smrg fi 1199659607e0Smrg exit ;; 1200659607e0Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1201659607e0Smrg echo powerpc-be-beos 1202659607e0Smrg exit ;; 1203659607e0Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1204659607e0Smrg echo powerpc-apple-beos 1205659607e0Smrg exit ;; 1206659607e0Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1207659607e0Smrg echo i586-pc-beos 1208659607e0Smrg exit ;; 1209659607e0Smrg SX-4:SUPER-UX:*:*) 1210659607e0Smrg echo sx4-nec-superux${UNAME_RELEASE} 1211659607e0Smrg exit ;; 1212659607e0Smrg SX-5:SUPER-UX:*:*) 1213659607e0Smrg echo sx5-nec-superux${UNAME_RELEASE} 1214659607e0Smrg exit ;; 1215659607e0Smrg SX-6:SUPER-UX:*:*) 1216659607e0Smrg echo sx6-nec-superux${UNAME_RELEASE} 1217659607e0Smrg exit ;; 1218659607e0Smrg SX-7:SUPER-UX:*:*) 1219659607e0Smrg echo sx7-nec-superux${UNAME_RELEASE} 1220659607e0Smrg exit ;; 1221659607e0Smrg SX-8:SUPER-UX:*:*) 1222659607e0Smrg echo sx8-nec-superux${UNAME_RELEASE} 1223659607e0Smrg exit ;; 1224659607e0Smrg SX-8R:SUPER-UX:*:*) 1225659607e0Smrg echo sx8r-nec-superux${UNAME_RELEASE} 1226659607e0Smrg exit ;; 1227659607e0Smrg Power*:Rhapsody:*:*) 1228659607e0Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 1229659607e0Smrg exit ;; 1230659607e0Smrg *:Rhapsody:*:*) 1231659607e0Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1232659607e0Smrg exit ;; 1233659607e0Smrg *:Darwin:*:*) 1234659607e0Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1235659607e0Smrg case $UNAME_PROCESSOR in 1236659607e0Smrg unknown) UNAME_PROCESSOR=powerpc ;; 1237659607e0Smrg esac 1238659607e0Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1239659607e0Smrg exit ;; 1240659607e0Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 1241659607e0Smrg UNAME_PROCESSOR=`uname -p` 1242659607e0Smrg if test "$UNAME_PROCESSOR" = "x86"; then 1243659607e0Smrg UNAME_PROCESSOR=i386 1244659607e0Smrg UNAME_MACHINE=pc 1245659607e0Smrg fi 1246659607e0Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1247659607e0Smrg exit ;; 1248659607e0Smrg *:QNX:*:4*) 1249659607e0Smrg echo i386-pc-qnx 1250659607e0Smrg exit ;; 1251659607e0Smrg NSE-?:NONSTOP_KERNEL:*:*) 1252659607e0Smrg echo nse-tandem-nsk${UNAME_RELEASE} 1253659607e0Smrg exit ;; 1254659607e0Smrg NSR-?:NONSTOP_KERNEL:*:*) 1255659607e0Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 1256659607e0Smrg exit ;; 1257659607e0Smrg *:NonStop-UX:*:*) 1258659607e0Smrg echo mips-compaq-nonstopux 1259659607e0Smrg exit ;; 1260659607e0Smrg BS2000:POSIX*:*:*) 1261659607e0Smrg echo bs2000-siemens-sysv 1262659607e0Smrg exit ;; 1263659607e0Smrg DS/*:UNIX_System_V:*:*) 1264659607e0Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1265659607e0Smrg exit ;; 1266659607e0Smrg *:Plan9:*:*) 1267659607e0Smrg # "uname -m" is not consistent, so use $cputype instead. 386 1268659607e0Smrg # is converted to i386 for consistency with other x86 1269659607e0Smrg # operating systems. 1270659607e0Smrg if test "$cputype" = "386"; then 1271659607e0Smrg UNAME_MACHINE=i386 1272659607e0Smrg else 1273659607e0Smrg UNAME_MACHINE="$cputype" 1274659607e0Smrg fi 1275659607e0Smrg echo ${UNAME_MACHINE}-unknown-plan9 1276659607e0Smrg exit ;; 1277659607e0Smrg *:TOPS-10:*:*) 1278659607e0Smrg echo pdp10-unknown-tops10 1279659607e0Smrg exit ;; 1280659607e0Smrg *:TENEX:*:*) 1281659607e0Smrg echo pdp10-unknown-tenex 1282659607e0Smrg exit ;; 1283659607e0Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1284659607e0Smrg echo pdp10-dec-tops20 1285659607e0Smrg exit ;; 1286659607e0Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1287659607e0Smrg echo pdp10-xkl-tops20 1288659607e0Smrg exit ;; 1289659607e0Smrg *:TOPS-20:*:*) 1290659607e0Smrg echo pdp10-unknown-tops20 1291659607e0Smrg exit ;; 1292659607e0Smrg *:ITS:*:*) 1293659607e0Smrg echo pdp10-unknown-its 1294659607e0Smrg exit ;; 1295659607e0Smrg SEI:*:*:SEIUX) 1296659607e0Smrg echo mips-sei-seiux${UNAME_RELEASE} 1297659607e0Smrg exit ;; 1298659607e0Smrg *:DragonFly:*:*) 1299659607e0Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1300659607e0Smrg exit ;; 1301659607e0Smrg *:*VMS:*:*) 1302659607e0Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 1303659607e0Smrg case "${UNAME_MACHINE}" in 1304659607e0Smrg A*) echo alpha-dec-vms ; exit ;; 1305659607e0Smrg I*) echo ia64-dec-vms ; exit ;; 1306659607e0Smrg V*) echo vax-dec-vms ; exit ;; 1307659607e0Smrg esac ;; 1308659607e0Smrg *:XENIX:*:SysV) 1309659607e0Smrg echo i386-pc-xenix 1310659607e0Smrg exit ;; 1311659607e0Smrg i*86:skyos:*:*) 1312659607e0Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1313659607e0Smrg exit ;; 1314659607e0Smrg i*86:rdos:*:*) 1315659607e0Smrg echo ${UNAME_MACHINE}-pc-rdos 1316659607e0Smrg exit ;; 1317659607e0Smrgesac 1318659607e0Smrg 1319659607e0Smrg#echo '(No uname command or uname output not recognized.)' 1>&2 1320659607e0Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 1321659607e0Smrg 1322659607e0Smrgeval $set_cc_for_build 1323659607e0Smrgcat >$dummy.c <<EOF 1324659607e0Smrg#ifdef _SEQUENT_ 1325659607e0Smrg# include <sys/types.h> 1326659607e0Smrg# include <sys/utsname.h> 1327659607e0Smrg#endif 1328659607e0Smrgmain () 1329659607e0Smrg{ 1330659607e0Smrg#if defined (sony) 1331659607e0Smrg#if defined (MIPSEB) 1332659607e0Smrg /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 1333659607e0Smrg I don't know.... */ 1334659607e0Smrg printf ("mips-sony-bsd\n"); exit (0); 1335659607e0Smrg#else 1336659607e0Smrg#include <sys/param.h> 1337659607e0Smrg printf ("m68k-sony-newsos%s\n", 1338659607e0Smrg#ifdef NEWSOS4 1339659607e0Smrg "4" 1340659607e0Smrg#else 1341659607e0Smrg "" 1342659607e0Smrg#endif 1343659607e0Smrg ); exit (0); 1344659607e0Smrg#endif 1345659607e0Smrg#endif 1346659607e0Smrg 1347659607e0Smrg#if defined (__arm) && defined (__acorn) && defined (__unix) 1348659607e0Smrg printf ("arm-acorn-riscix\n"); exit (0); 1349659607e0Smrg#endif 1350659607e0Smrg 1351659607e0Smrg#if defined (hp300) && !defined (hpux) 1352659607e0Smrg printf ("m68k-hp-bsd\n"); exit (0); 1353659607e0Smrg#endif 1354659607e0Smrg 1355659607e0Smrg#if defined (NeXT) 1356659607e0Smrg#if !defined (__ARCHITECTURE__) 1357659607e0Smrg#define __ARCHITECTURE__ "m68k" 1358659607e0Smrg#endif 1359659607e0Smrg int version; 1360659607e0Smrg version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 1361659607e0Smrg if (version < 4) 1362659607e0Smrg printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1363659607e0Smrg else 1364659607e0Smrg printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 1365659607e0Smrg exit (0); 1366659607e0Smrg#endif 1367659607e0Smrg 1368659607e0Smrg#if defined (MULTIMAX) || defined (n16) 1369659607e0Smrg#if defined (UMAXV) 1370659607e0Smrg printf ("ns32k-encore-sysv\n"); exit (0); 1371659607e0Smrg#else 1372659607e0Smrg#if defined (CMU) 1373659607e0Smrg printf ("ns32k-encore-mach\n"); exit (0); 1374659607e0Smrg#else 1375659607e0Smrg printf ("ns32k-encore-bsd\n"); exit (0); 1376659607e0Smrg#endif 1377659607e0Smrg#endif 1378659607e0Smrg#endif 1379659607e0Smrg 1380659607e0Smrg#if defined (__386BSD__) 1381659607e0Smrg printf ("i386-pc-bsd\n"); exit (0); 1382659607e0Smrg#endif 1383659607e0Smrg 1384659607e0Smrg#if defined (sequent) 1385659607e0Smrg#if defined (i386) 1386659607e0Smrg printf ("i386-sequent-dynix\n"); exit (0); 1387659607e0Smrg#endif 1388659607e0Smrg#if defined (ns32000) 1389659607e0Smrg printf ("ns32k-sequent-dynix\n"); exit (0); 1390659607e0Smrg#endif 1391659607e0Smrg#endif 1392659607e0Smrg 1393659607e0Smrg#if defined (_SEQUENT_) 1394659607e0Smrg struct utsname un; 1395659607e0Smrg 1396659607e0Smrg uname(&un); 1397659607e0Smrg 1398659607e0Smrg if (strncmp(un.version, "V2", 2) == 0) { 1399659607e0Smrg printf ("i386-sequent-ptx2\n"); exit (0); 1400659607e0Smrg } 1401659607e0Smrg if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 1402659607e0Smrg printf ("i386-sequent-ptx1\n"); exit (0); 1403659607e0Smrg } 1404659607e0Smrg printf ("i386-sequent-ptx\n"); exit (0); 1405659607e0Smrg 1406659607e0Smrg#endif 1407659607e0Smrg 1408659607e0Smrg#if defined (vax) 1409659607e0Smrg# if !defined (ultrix) 1410659607e0Smrg# include <sys/param.h> 1411659607e0Smrg# if defined (BSD) 1412659607e0Smrg# if BSD == 43 1413659607e0Smrg printf ("vax-dec-bsd4.3\n"); exit (0); 1414659607e0Smrg# else 1415659607e0Smrg# if BSD == 199006 1416659607e0Smrg printf ("vax-dec-bsd4.3reno\n"); exit (0); 1417659607e0Smrg# else 1418659607e0Smrg printf ("vax-dec-bsd\n"); exit (0); 1419659607e0Smrg# endif 1420659607e0Smrg# endif 1421659607e0Smrg# else 1422659607e0Smrg printf ("vax-dec-bsd\n"); exit (0); 1423659607e0Smrg# endif 1424659607e0Smrg# else 1425659607e0Smrg printf ("vax-dec-ultrix\n"); exit (0); 1426659607e0Smrg# endif 1427659607e0Smrg#endif 1428659607e0Smrg 1429659607e0Smrg#if defined (alliant) && defined (i860) 1430659607e0Smrg printf ("i860-alliant-bsd\n"); exit (0); 1431659607e0Smrg#endif 1432659607e0Smrg 1433659607e0Smrg exit (1); 1434659607e0Smrg} 1435659607e0SmrgEOF 1436659607e0Smrg 1437659607e0Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 1438659607e0Smrg { echo "$SYSTEM_NAME"; exit; } 1439659607e0Smrg 1440659607e0Smrg# Apollos put the system type in the environment. 1441659607e0Smrg 1442659607e0Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 1443659607e0Smrg 1444659607e0Smrg# Convex versions that predate uname can use getsysinfo(1) 1445659607e0Smrg 1446659607e0Smrgif [ -x /usr/convex/getsysinfo ] 1447659607e0Smrgthen 1448659607e0Smrg case `getsysinfo -f cpu_type` in 1449659607e0Smrg c1*) 1450659607e0Smrg echo c1-convex-bsd 1451659607e0Smrg exit ;; 1452659607e0Smrg c2*) 1453659607e0Smrg if getsysinfo -f scalar_acc 1454659607e0Smrg then echo c32-convex-bsd 1455659607e0Smrg else echo c2-convex-bsd 1456659607e0Smrg fi 1457659607e0Smrg exit ;; 1458659607e0Smrg c34*) 1459659607e0Smrg echo c34-convex-bsd 1460659607e0Smrg exit ;; 1461659607e0Smrg c38*) 1462659607e0Smrg echo c38-convex-bsd 1463659607e0Smrg exit ;; 1464659607e0Smrg c4*) 1465659607e0Smrg echo c4-convex-bsd 1466659607e0Smrg exit ;; 1467659607e0Smrg esac 1468659607e0Smrgfi 1469659607e0Smrg 1470659607e0Smrgcat >&2 <<EOF 1471659607e0Smrg$0: unable to guess system type 1472659607e0Smrg 1473659607e0SmrgThis script, last modified $timestamp, has failed to recognize 1474659607e0Smrgthe operating system you are using. It is advised that you 1475659607e0Smrgdownload the most up to date version of the config scripts from 1476659607e0Smrg 1477659607e0Smrg http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess 1478659607e0Smrgand 1479659607e0Smrg http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub 1480659607e0Smrg 1481659607e0SmrgIf the version you run ($0) is already up to date, please 1482659607e0Smrgsend the following data and any information you think might be 1483659607e0Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 1484659607e0Smrginformation to handle your system. 1485659607e0Smrg 1486659607e0Smrgconfig.guess timestamp = $timestamp 1487659607e0Smrg 1488659607e0Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 1489659607e0Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 1490659607e0Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 1491659607e0Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 1492659607e0Smrg 1493659607e0Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1494659607e0Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1495659607e0Smrg 1496659607e0Smrghostinfo = `(hostinfo) 2>/dev/null` 1497659607e0Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 1498659607e0Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1499659607e0Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 1500659607e0Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1501659607e0Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1502659607e0Smrg 1503659607e0SmrgUNAME_MACHINE = ${UNAME_MACHINE} 1504659607e0SmrgUNAME_RELEASE = ${UNAME_RELEASE} 1505659607e0SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 1506659607e0SmrgUNAME_VERSION = ${UNAME_VERSION} 1507659607e0SmrgEOF 1508659607e0Smrg 1509659607e0Smrgexit 1 1510659607e0Smrg 1511659607e0Smrg# Local variables: 1512659607e0Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 1513659607e0Smrg# time-stamp-start: "timestamp='" 1514659607e0Smrg# time-stamp-format: "%:y-%02m-%02d" 1515659607e0Smrg# time-stamp-end: "'" 1516659607e0Smrg# End: 1517