config.guess revision b73be646
1659607e0Smrg#! /bin/sh 2659607e0Smrg# Attempt to guess a canonical system name. 3659607e0Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4b73be646Smrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 5fc27e79cSmrg# Free Software Foundation, Inc. 6659607e0Smrg 7b73be646Smrgtimestamp='2009-11-20' 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 30b73be646Smrg# Originally written by Per Bothner. Please send patches (context 31b73be646Smrg# diff format) to <config-patches@gnu.org> and include a ChangeLog 32b73be646Smrg# 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# 38b73be646Smrg# You can get the latest version of this script from: 39b73be646Smrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 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. 59fc27e79cSmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 60fc27e79cSmrg2002, 2003, 2004, 2005, 2006, 2007, 2008 Free 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} ; 110fc27e79cSmrg { 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 ;; 164fc27e79cSmrg 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 \ 173b73be646Smrg | grep -q __ELF__ 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 ;; 211fc27e79cSmrg *:SolidBSD:*:*) 212fc27e79cSmrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 213fc27e79cSmrg exit ;; 214659607e0Smrg macppc:MirBSD:*:*) 215fc27e79cSmrg 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 ;; 327b73be646Smrg s390x:SunOS:*:*) 328b73be646Smrg echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 329b73be646Smrg exit ;; 330659607e0Smrg sun4H:SunOS:5.*:*) 331659607e0Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 332659607e0Smrg exit ;; 333659607e0Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 334659607e0Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 335659607e0Smrg exit ;; 336b73be646Smrg i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 337b73be646Smrg echo i386-pc-auroraux${UNAME_RELEASE} 338b73be646Smrg exit ;; 339fc27e79cSmrg i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 340b73be646Smrg eval $set_cc_for_build 341b73be646Smrg SUN_ARCH="i386" 342b73be646Smrg # If there is a compiler, see if it is configured for 64-bit objects. 343b73be646Smrg # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 344b73be646Smrg # This test works for both compilers. 345b73be646Smrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 346b73be646Smrg if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 347b73be646Smrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 348b73be646Smrg grep IS_64BIT_ARCH >/dev/null 349b73be646Smrg then 350b73be646Smrg SUN_ARCH="x86_64" 351b73be646Smrg fi 352b73be646Smrg fi 353b73be646Smrg echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 354659607e0Smrg exit ;; 355659607e0Smrg sun4*:SunOS:6*:*) 356659607e0Smrg # According to config.sub, this is the proper way to canonicalize 357659607e0Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 358659607e0Smrg # it's likely to be more like Solaris than SunOS4. 359659607e0Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 360659607e0Smrg exit ;; 361659607e0Smrg sun4*:SunOS:*:*) 362659607e0Smrg case "`/usr/bin/arch -k`" in 363659607e0Smrg Series*|S4*) 364659607e0Smrg UNAME_RELEASE=`uname -v` 365659607e0Smrg ;; 366659607e0Smrg esac 367659607e0Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 368659607e0Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 369659607e0Smrg exit ;; 370659607e0Smrg sun3*:SunOS:*:*) 371659607e0Smrg echo m68k-sun-sunos${UNAME_RELEASE} 372659607e0Smrg exit ;; 373659607e0Smrg sun*:*:4.2BSD:*) 374659607e0Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 375659607e0Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 376659607e0Smrg case "`/bin/arch`" in 377659607e0Smrg sun3) 378659607e0Smrg echo m68k-sun-sunos${UNAME_RELEASE} 379659607e0Smrg ;; 380659607e0Smrg sun4) 381659607e0Smrg echo sparc-sun-sunos${UNAME_RELEASE} 382659607e0Smrg ;; 383659607e0Smrg esac 384659607e0Smrg exit ;; 385659607e0Smrg aushp:SunOS:*:*) 386659607e0Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 387659607e0Smrg exit ;; 388659607e0Smrg # The situation for MiNT is a little confusing. The machine name 389659607e0Smrg # can be virtually everything (everything which is not 390659607e0Smrg # "atarist" or "atariste" at least should have a processor 391659607e0Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 392659607e0Smrg # to the lowercase version "mint" (or "freemint"). Finally 393659607e0Smrg # the system name "TOS" denotes a system which is actually not 394659607e0Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 395659607e0Smrg # be no problem. 396659607e0Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 397659607e0Smrg echo m68k-atari-mint${UNAME_RELEASE} 398659607e0Smrg exit ;; 399659607e0Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 400659607e0Smrg echo m68k-atari-mint${UNAME_RELEASE} 401659607e0Smrg exit ;; 402659607e0Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 403659607e0Smrg echo m68k-atari-mint${UNAME_RELEASE} 404659607e0Smrg exit ;; 405659607e0Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 406659607e0Smrg echo m68k-milan-mint${UNAME_RELEASE} 407659607e0Smrg exit ;; 408659607e0Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 409659607e0Smrg echo m68k-hades-mint${UNAME_RELEASE} 410659607e0Smrg exit ;; 411659607e0Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 412659607e0Smrg echo m68k-unknown-mint${UNAME_RELEASE} 413659607e0Smrg exit ;; 414659607e0Smrg m68k:machten:*:*) 415659607e0Smrg echo m68k-apple-machten${UNAME_RELEASE} 416659607e0Smrg exit ;; 417659607e0Smrg powerpc:machten:*:*) 418659607e0Smrg echo powerpc-apple-machten${UNAME_RELEASE} 419659607e0Smrg exit ;; 420659607e0Smrg RISC*:Mach:*:*) 421659607e0Smrg echo mips-dec-mach_bsd4.3 422659607e0Smrg exit ;; 423659607e0Smrg RISC*:ULTRIX:*:*) 424659607e0Smrg echo mips-dec-ultrix${UNAME_RELEASE} 425659607e0Smrg exit ;; 426659607e0Smrg VAX*:ULTRIX*:*:*) 427659607e0Smrg echo vax-dec-ultrix${UNAME_RELEASE} 428659607e0Smrg exit ;; 429659607e0Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 430659607e0Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 431659607e0Smrg exit ;; 432659607e0Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 433659607e0Smrg eval $set_cc_for_build 434659607e0Smrg sed 's/^ //' << EOF >$dummy.c 435659607e0Smrg#ifdef __cplusplus 436659607e0Smrg#include <stdio.h> /* for printf() prototype */ 437659607e0Smrg int main (int argc, char *argv[]) { 438659607e0Smrg#else 439659607e0Smrg int main (argc, argv) int argc; char *argv[]; { 440659607e0Smrg#endif 441659607e0Smrg #if defined (host_mips) && defined (MIPSEB) 442659607e0Smrg #if defined (SYSTYPE_SYSV) 443659607e0Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 444659607e0Smrg #endif 445659607e0Smrg #if defined (SYSTYPE_SVR4) 446659607e0Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 447659607e0Smrg #endif 448659607e0Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 449659607e0Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 450659607e0Smrg #endif 451659607e0Smrg #endif 452659607e0Smrg exit (-1); 453659607e0Smrg } 454659607e0SmrgEOF 455659607e0Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 456659607e0Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 457659607e0Smrg SYSTEM_NAME=`$dummy $dummyarg` && 458659607e0Smrg { echo "$SYSTEM_NAME"; exit; } 459659607e0Smrg echo mips-mips-riscos${UNAME_RELEASE} 460659607e0Smrg exit ;; 461659607e0Smrg Motorola:PowerMAX_OS:*:*) 462659607e0Smrg echo powerpc-motorola-powermax 463659607e0Smrg exit ;; 464659607e0Smrg Motorola:*:4.3:PL8-*) 465659607e0Smrg echo powerpc-harris-powermax 466659607e0Smrg exit ;; 467659607e0Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 468659607e0Smrg echo powerpc-harris-powermax 469659607e0Smrg exit ;; 470659607e0Smrg Night_Hawk:Power_UNIX:*:*) 471659607e0Smrg echo powerpc-harris-powerunix 472659607e0Smrg exit ;; 473659607e0Smrg m88k:CX/UX:7*:*) 474659607e0Smrg echo m88k-harris-cxux7 475659607e0Smrg exit ;; 476659607e0Smrg m88k:*:4*:R4*) 477659607e0Smrg echo m88k-motorola-sysv4 478659607e0Smrg exit ;; 479659607e0Smrg m88k:*:3*:R3*) 480659607e0Smrg echo m88k-motorola-sysv3 481659607e0Smrg exit ;; 482659607e0Smrg AViiON:dgux:*:*) 483659607e0Smrg # DG/UX returns AViiON for all architectures 484659607e0Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 485659607e0Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 486659607e0Smrg then 487659607e0Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 488659607e0Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 489659607e0Smrg then 490659607e0Smrg echo m88k-dg-dgux${UNAME_RELEASE} 491659607e0Smrg else 492659607e0Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 493659607e0Smrg fi 494659607e0Smrg else 495659607e0Smrg echo i586-dg-dgux${UNAME_RELEASE} 496659607e0Smrg fi 497659607e0Smrg exit ;; 498659607e0Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 499659607e0Smrg echo m88k-dolphin-sysv3 500659607e0Smrg exit ;; 501659607e0Smrg M88*:*:R3*:*) 502659607e0Smrg # Delta 88k system running SVR3 503659607e0Smrg echo m88k-motorola-sysv3 504659607e0Smrg exit ;; 505659607e0Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 506659607e0Smrg echo m88k-tektronix-sysv3 507659607e0Smrg exit ;; 508659607e0Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 509659607e0Smrg echo m68k-tektronix-bsd 510659607e0Smrg exit ;; 511659607e0Smrg *:IRIX*:*:*) 512659607e0Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 513659607e0Smrg exit ;; 514659607e0Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 515659607e0Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 516659607e0Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 517659607e0Smrg i*86:AIX:*:*) 518659607e0Smrg echo i386-ibm-aix 519659607e0Smrg exit ;; 520659607e0Smrg ia64:AIX:*:*) 521659607e0Smrg if [ -x /usr/bin/oslevel ] ; then 522659607e0Smrg IBM_REV=`/usr/bin/oslevel` 523659607e0Smrg else 524659607e0Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 525659607e0Smrg fi 526659607e0Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 527659607e0Smrg exit ;; 528659607e0Smrg *:AIX:2:3) 529659607e0Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 530659607e0Smrg eval $set_cc_for_build 531659607e0Smrg sed 's/^ //' << EOF >$dummy.c 532659607e0Smrg #include <sys/systemcfg.h> 533659607e0Smrg 534659607e0Smrg main() 535659607e0Smrg { 536659607e0Smrg if (!__power_pc()) 537659607e0Smrg exit(1); 538659607e0Smrg puts("powerpc-ibm-aix3.2.5"); 539659607e0Smrg exit(0); 540659607e0Smrg } 541659607e0SmrgEOF 542659607e0Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 543659607e0Smrg then 544659607e0Smrg echo "$SYSTEM_NAME" 545659607e0Smrg else 546659607e0Smrg echo rs6000-ibm-aix3.2.5 547659607e0Smrg fi 548659607e0Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 549659607e0Smrg echo rs6000-ibm-aix3.2.4 550659607e0Smrg else 551659607e0Smrg echo rs6000-ibm-aix3.2 552659607e0Smrg fi 553659607e0Smrg exit ;; 554fc27e79cSmrg *:AIX:*:[456]) 555659607e0Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 556659607e0Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 557659607e0Smrg IBM_ARCH=rs6000 558659607e0Smrg else 559659607e0Smrg IBM_ARCH=powerpc 560659607e0Smrg fi 561659607e0Smrg if [ -x /usr/bin/oslevel ] ; then 562659607e0Smrg IBM_REV=`/usr/bin/oslevel` 563659607e0Smrg else 564659607e0Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 565659607e0Smrg fi 566659607e0Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 567659607e0Smrg exit ;; 568659607e0Smrg *:AIX:*:*) 569659607e0Smrg echo rs6000-ibm-aix 570659607e0Smrg exit ;; 571659607e0Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 572659607e0Smrg echo romp-ibm-bsd4.4 573659607e0Smrg exit ;; 574659607e0Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 575659607e0Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 576659607e0Smrg exit ;; # report: romp-ibm BSD 4.3 577659607e0Smrg *:BOSX:*:*) 578659607e0Smrg echo rs6000-bull-bosx 579659607e0Smrg exit ;; 580659607e0Smrg DPX/2?00:B.O.S.:*:*) 581659607e0Smrg echo m68k-bull-sysv3 582659607e0Smrg exit ;; 583659607e0Smrg 9000/[34]??:4.3bsd:1.*:*) 584659607e0Smrg echo m68k-hp-bsd 585659607e0Smrg exit ;; 586659607e0Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 587659607e0Smrg echo m68k-hp-bsd4.4 588659607e0Smrg exit ;; 589659607e0Smrg 9000/[34678]??:HP-UX:*:*) 590659607e0Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 591659607e0Smrg case "${UNAME_MACHINE}" in 592659607e0Smrg 9000/31? ) HP_ARCH=m68000 ;; 593659607e0Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 594659607e0Smrg 9000/[678][0-9][0-9]) 595659607e0Smrg if [ -x /usr/bin/getconf ]; then 596659607e0Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 597659607e0Smrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 598659607e0Smrg case "${sc_cpu_version}" in 599659607e0Smrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 600659607e0Smrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 601659607e0Smrg 532) # CPU_PA_RISC2_0 602659607e0Smrg case "${sc_kernel_bits}" in 603659607e0Smrg 32) HP_ARCH="hppa2.0n" ;; 604659607e0Smrg 64) HP_ARCH="hppa2.0w" ;; 605659607e0Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 606659607e0Smrg esac ;; 607659607e0Smrg esac 608659607e0Smrg fi 609659607e0Smrg if [ "${HP_ARCH}" = "" ]; then 610659607e0Smrg eval $set_cc_for_build 611659607e0Smrg sed 's/^ //' << EOF >$dummy.c 612659607e0Smrg 613659607e0Smrg #define _HPUX_SOURCE 614659607e0Smrg #include <stdlib.h> 615659607e0Smrg #include <unistd.h> 616659607e0Smrg 617659607e0Smrg int main () 618659607e0Smrg { 619659607e0Smrg #if defined(_SC_KERNEL_BITS) 620659607e0Smrg long bits = sysconf(_SC_KERNEL_BITS); 621659607e0Smrg #endif 622659607e0Smrg long cpu = sysconf (_SC_CPU_VERSION); 623659607e0Smrg 624659607e0Smrg switch (cpu) 625659607e0Smrg { 626659607e0Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 627659607e0Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 628659607e0Smrg case CPU_PA_RISC2_0: 629659607e0Smrg #if defined(_SC_KERNEL_BITS) 630659607e0Smrg switch (bits) 631659607e0Smrg { 632659607e0Smrg case 64: puts ("hppa2.0w"); break; 633659607e0Smrg case 32: puts ("hppa2.0n"); break; 634659607e0Smrg default: puts ("hppa2.0"); break; 635659607e0Smrg } break; 636659607e0Smrg #else /* !defined(_SC_KERNEL_BITS) */ 637659607e0Smrg puts ("hppa2.0"); break; 638659607e0Smrg #endif 639659607e0Smrg default: puts ("hppa1.0"); break; 640659607e0Smrg } 641659607e0Smrg exit (0); 642659607e0Smrg } 643659607e0SmrgEOF 644659607e0Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 645659607e0Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 646659607e0Smrg fi ;; 647659607e0Smrg esac 648659607e0Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 649659607e0Smrg then 650659607e0Smrg eval $set_cc_for_build 651659607e0Smrg 652659607e0Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 653659607e0Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 654659607e0Smrg # generating 64-bit code. GNU and HP use different nomenclature: 655659607e0Smrg # 656659607e0Smrg # $ CC_FOR_BUILD=cc ./config.guess 657659607e0Smrg # => hppa2.0w-hp-hpux11.23 658659607e0Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 659659607e0Smrg # => hppa64-hp-hpux11.23 660659607e0Smrg 661659607e0Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 662b73be646Smrg grep -q __LP64__ 663659607e0Smrg then 664659607e0Smrg HP_ARCH="hppa2.0w" 665659607e0Smrg else 666659607e0Smrg HP_ARCH="hppa64" 667659607e0Smrg fi 668659607e0Smrg fi 669659607e0Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 670659607e0Smrg exit ;; 671659607e0Smrg ia64:HP-UX:*:*) 672659607e0Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 673659607e0Smrg echo ia64-hp-hpux${HPUX_REV} 674659607e0Smrg exit ;; 675659607e0Smrg 3050*:HI-UX:*:*) 676659607e0Smrg eval $set_cc_for_build 677659607e0Smrg sed 's/^ //' << EOF >$dummy.c 678659607e0Smrg #include <unistd.h> 679659607e0Smrg int 680659607e0Smrg main () 681659607e0Smrg { 682659607e0Smrg long cpu = sysconf (_SC_CPU_VERSION); 683659607e0Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 684659607e0Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 685659607e0Smrg results, however. */ 686659607e0Smrg if (CPU_IS_PA_RISC (cpu)) 687659607e0Smrg { 688659607e0Smrg switch (cpu) 689659607e0Smrg { 690659607e0Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 691659607e0Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 692659607e0Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 693659607e0Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 694659607e0Smrg } 695659607e0Smrg } 696659607e0Smrg else if (CPU_IS_HP_MC68K (cpu)) 697659607e0Smrg puts ("m68k-hitachi-hiuxwe2"); 698659607e0Smrg else puts ("unknown-hitachi-hiuxwe2"); 699659607e0Smrg exit (0); 700659607e0Smrg } 701659607e0SmrgEOF 702659607e0Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 703659607e0Smrg { echo "$SYSTEM_NAME"; exit; } 704659607e0Smrg echo unknown-hitachi-hiuxwe2 705659607e0Smrg exit ;; 706659607e0Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 707659607e0Smrg echo hppa1.1-hp-bsd 708659607e0Smrg exit ;; 709659607e0Smrg 9000/8??:4.3bsd:*:*) 710659607e0Smrg echo hppa1.0-hp-bsd 711659607e0Smrg exit ;; 712659607e0Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 713659607e0Smrg echo hppa1.0-hp-mpeix 714659607e0Smrg exit ;; 715659607e0Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 716659607e0Smrg echo hppa1.1-hp-osf 717659607e0Smrg exit ;; 718659607e0Smrg hp8??:OSF1:*:*) 719659607e0Smrg echo hppa1.0-hp-osf 720659607e0Smrg exit ;; 721659607e0Smrg i*86:OSF1:*:*) 722659607e0Smrg if [ -x /usr/sbin/sysversion ] ; then 723659607e0Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 724659607e0Smrg else 725659607e0Smrg echo ${UNAME_MACHINE}-unknown-osf1 726659607e0Smrg fi 727659607e0Smrg exit ;; 728659607e0Smrg parisc*:Lites*:*:*) 729659607e0Smrg echo hppa1.1-hp-lites 730659607e0Smrg exit ;; 731659607e0Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 732659607e0Smrg echo c1-convex-bsd 733659607e0Smrg exit ;; 734659607e0Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 735659607e0Smrg if getsysinfo -f scalar_acc 736659607e0Smrg then echo c32-convex-bsd 737659607e0Smrg else echo c2-convex-bsd 738659607e0Smrg fi 739659607e0Smrg exit ;; 740659607e0Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 741659607e0Smrg echo c34-convex-bsd 742659607e0Smrg exit ;; 743659607e0Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 744659607e0Smrg echo c38-convex-bsd 745659607e0Smrg exit ;; 746659607e0Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 747659607e0Smrg echo c4-convex-bsd 748659607e0Smrg exit ;; 749659607e0Smrg CRAY*Y-MP:*:*:*) 750659607e0Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 751659607e0Smrg exit ;; 752659607e0Smrg CRAY*[A-Z]90:*:*:*) 753659607e0Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 754659607e0Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 755659607e0Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 756659607e0Smrg -e 's/\.[^.]*$/.X/' 757659607e0Smrg exit ;; 758659607e0Smrg CRAY*TS:*:*:*) 759659607e0Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 760659607e0Smrg exit ;; 761659607e0Smrg CRAY*T3E:*:*:*) 762659607e0Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 763659607e0Smrg exit ;; 764659607e0Smrg CRAY*SV1:*:*:*) 765659607e0Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 766659607e0Smrg exit ;; 767659607e0Smrg *:UNICOS/mp:*:*) 768659607e0Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 769659607e0Smrg exit ;; 770659607e0Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 771659607e0Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 772659607e0Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 773659607e0Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 774659607e0Smrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 775659607e0Smrg exit ;; 776659607e0Smrg 5000:UNIX_System_V:4.*:*) 777659607e0Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 778659607e0Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 779659607e0Smrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 780659607e0Smrg exit ;; 781659607e0Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 782659607e0Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 783659607e0Smrg exit ;; 784659607e0Smrg sparc*:BSD/OS:*:*) 785659607e0Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 786659607e0Smrg exit ;; 787659607e0Smrg *:BSD/OS:*:*) 788659607e0Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 789659607e0Smrg exit ;; 790659607e0Smrg *:FreeBSD:*:*) 791fc27e79cSmrg case ${UNAME_MACHINE} in 792fc27e79cSmrg pc98) 793fc27e79cSmrg echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 794fc27e79cSmrg amd64) 795fc27e79cSmrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 796fc27e79cSmrg *) 797fc27e79cSmrg echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 798fc27e79cSmrg esac 799659607e0Smrg exit ;; 800659607e0Smrg i*:CYGWIN*:*) 801659607e0Smrg echo ${UNAME_MACHINE}-pc-cygwin 802659607e0Smrg exit ;; 803fc27e79cSmrg *:MINGW*:*) 804659607e0Smrg echo ${UNAME_MACHINE}-pc-mingw32 805659607e0Smrg exit ;; 806659607e0Smrg i*:windows32*:*) 807659607e0Smrg # uname -m includes "-pc" on this system. 808659607e0Smrg echo ${UNAME_MACHINE}-mingw32 809659607e0Smrg exit ;; 810659607e0Smrg i*:PW*:*) 811659607e0Smrg echo ${UNAME_MACHINE}-pc-pw32 812659607e0Smrg exit ;; 813b73be646Smrg *:Interix*:*) 814fc27e79cSmrg case ${UNAME_MACHINE} in 815fc27e79cSmrg x86) 816fc27e79cSmrg echo i586-pc-interix${UNAME_RELEASE} 817fc27e79cSmrg exit ;; 818b73be646Smrg authenticamd | genuineintel | EM64T) 819fc27e79cSmrg echo x86_64-unknown-interix${UNAME_RELEASE} 820fc27e79cSmrg exit ;; 821fc27e79cSmrg IA64) 822fc27e79cSmrg echo ia64-unknown-interix${UNAME_RELEASE} 823fc27e79cSmrg exit ;; 824fc27e79cSmrg esac ;; 825659607e0Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 826659607e0Smrg echo i${UNAME_MACHINE}-pc-mks 827659607e0Smrg exit ;; 828b73be646Smrg 8664:Windows_NT:*) 829b73be646Smrg echo x86_64-pc-mks 830b73be646Smrg exit ;; 831659607e0Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 832659607e0Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 833659607e0Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 834659607e0Smrg # UNAME_MACHINE based on the output of uname instead of i386? 835659607e0Smrg echo i586-pc-interix 836659607e0Smrg exit ;; 837659607e0Smrg i*:UWIN*:*) 838659607e0Smrg echo ${UNAME_MACHINE}-pc-uwin 839659607e0Smrg exit ;; 840659607e0Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 841659607e0Smrg echo x86_64-unknown-cygwin 842659607e0Smrg exit ;; 843659607e0Smrg p*:CYGWIN*:*) 844659607e0Smrg echo powerpcle-unknown-cygwin 845659607e0Smrg exit ;; 846659607e0Smrg prep*:SunOS:5.*:*) 847659607e0Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 848659607e0Smrg exit ;; 849659607e0Smrg *:GNU:*:*) 850659607e0Smrg # the GNU system 851659607e0Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 852659607e0Smrg exit ;; 853659607e0Smrg *:GNU/*:*:*) 854659607e0Smrg # other systems with GNU libc and userland 855659607e0Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 856659607e0Smrg exit ;; 857659607e0Smrg i*86:Minix:*:*) 858659607e0Smrg echo ${UNAME_MACHINE}-pc-minix 859659607e0Smrg exit ;; 860b73be646Smrg alpha:Linux:*:*) 861b73be646Smrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 862b73be646Smrg EV5) UNAME_MACHINE=alphaev5 ;; 863b73be646Smrg EV56) UNAME_MACHINE=alphaev56 ;; 864b73be646Smrg PCA56) UNAME_MACHINE=alphapca56 ;; 865b73be646Smrg PCA57) UNAME_MACHINE=alphapca56 ;; 866b73be646Smrg EV6) UNAME_MACHINE=alphaev6 ;; 867b73be646Smrg EV67) UNAME_MACHINE=alphaev67 ;; 868b73be646Smrg EV68*) UNAME_MACHINE=alphaev68 ;; 869b73be646Smrg esac 870b73be646Smrg objdump --private-headers /bin/sh | grep -q ld.so.1 871b73be646Smrg if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 872b73be646Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 873b73be646Smrg exit ;; 874659607e0Smrg arm*:Linux:*:*) 875fc27e79cSmrg eval $set_cc_for_build 876fc27e79cSmrg if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 877fc27e79cSmrg | grep -q __ARM_EABI__ 878fc27e79cSmrg then 879fc27e79cSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 880fc27e79cSmrg else 881fc27e79cSmrg echo ${UNAME_MACHINE}-unknown-linux-gnueabi 882fc27e79cSmrg fi 883fc27e79cSmrg exit ;; 884fc27e79cSmrg avr32*:Linux:*:*) 885659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 886659607e0Smrg exit ;; 887659607e0Smrg cris:Linux:*:*) 888659607e0Smrg echo cris-axis-linux-gnu 889659607e0Smrg exit ;; 890659607e0Smrg crisv32:Linux:*:*) 891659607e0Smrg echo crisv32-axis-linux-gnu 892659607e0Smrg exit ;; 893659607e0Smrg frv:Linux:*:*) 894659607e0Smrg echo frv-unknown-linux-gnu 895659607e0Smrg exit ;; 896b73be646Smrg i*86:Linux:*:*) 897b73be646Smrg LIBC=gnu 898b73be646Smrg eval $set_cc_for_build 899b73be646Smrg sed 's/^ //' << EOF >$dummy.c 900b73be646Smrg #ifdef __dietlibc__ 901b73be646Smrg LIBC=dietlibc 902b73be646Smrg #endif 903b73be646SmrgEOF 904b73be646Smrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` 905b73be646Smrg echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 906b73be646Smrg exit ;; 907659607e0Smrg ia64:Linux:*:*) 908659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 909659607e0Smrg exit ;; 910659607e0Smrg m32r*:Linux:*:*) 911659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 912659607e0Smrg exit ;; 913659607e0Smrg m68*:Linux:*:*) 914659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 915659607e0Smrg exit ;; 916b73be646Smrg mips:Linux:*:* | mips64:Linux:*:*) 917659607e0Smrg eval $set_cc_for_build 918659607e0Smrg sed 's/^ //' << EOF >$dummy.c 919659607e0Smrg #undef CPU 920b73be646Smrg #undef ${UNAME_MACHINE} 921b73be646Smrg #undef ${UNAME_MACHINE}el 922659607e0Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 923b73be646Smrg CPU=${UNAME_MACHINE}el 924659607e0Smrg #else 925659607e0Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 926b73be646Smrg CPU=${UNAME_MACHINE} 927659607e0Smrg #else 928659607e0Smrg CPU= 929659607e0Smrg #endif 930659607e0Smrg #endif 931659607e0SmrgEOF 932b73be646Smrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 933659607e0Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 934659607e0Smrg ;; 935659607e0Smrg or32:Linux:*:*) 936659607e0Smrg echo or32-unknown-linux-gnu 937659607e0Smrg exit ;; 938b73be646Smrg padre:Linux:*:*) 939b73be646Smrg echo sparc-unknown-linux-gnu 940659607e0Smrg exit ;; 941b73be646Smrg parisc64:Linux:*:* | hppa64:Linux:*:*) 942b73be646Smrg echo hppa64-unknown-linux-gnu 943659607e0Smrg exit ;; 944659607e0Smrg parisc:Linux:*:* | hppa:Linux:*:*) 945659607e0Smrg # Look for CPU level 946659607e0Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 947659607e0Smrg PA7*) echo hppa1.1-unknown-linux-gnu ;; 948659607e0Smrg PA8*) echo hppa2.0-unknown-linux-gnu ;; 949659607e0Smrg *) echo hppa-unknown-linux-gnu ;; 950659607e0Smrg esac 951659607e0Smrg exit ;; 952b73be646Smrg ppc64:Linux:*:*) 953b73be646Smrg echo powerpc64-unknown-linux-gnu 954b73be646Smrg exit ;; 955b73be646Smrg ppc:Linux:*:*) 956b73be646Smrg echo powerpc-unknown-linux-gnu 957659607e0Smrg exit ;; 958659607e0Smrg s390:Linux:*:* | s390x:Linux:*:*) 959659607e0Smrg echo ${UNAME_MACHINE}-ibm-linux 960659607e0Smrg exit ;; 961659607e0Smrg sh64*:Linux:*:*) 962659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 963659607e0Smrg exit ;; 964659607e0Smrg sh*:Linux:*:*) 965659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 966659607e0Smrg exit ;; 967659607e0Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 968659607e0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 969659607e0Smrg exit ;; 970659607e0Smrg vax:Linux:*:*) 971659607e0Smrg echo ${UNAME_MACHINE}-dec-linux-gnu 972659607e0Smrg exit ;; 973659607e0Smrg x86_64:Linux:*:*) 974659607e0Smrg echo x86_64-unknown-linux-gnu 975659607e0Smrg exit ;; 976fc27e79cSmrg xtensa*:Linux:*:*) 977fc27e79cSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 978fc27e79cSmrg exit ;; 979659607e0Smrg i*86:DYNIX/ptx:4*:*) 980659607e0Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 981659607e0Smrg # earlier versions are messed up and put the nodename in both 982659607e0Smrg # sysname and nodename. 983659607e0Smrg echo i386-sequent-sysv4 984659607e0Smrg exit ;; 985659607e0Smrg i*86:UNIX_SV:4.2MP:2.*) 986659607e0Smrg # Unixware is an offshoot of SVR4, but it has its own version 987659607e0Smrg # number series starting with 2... 988659607e0Smrg # I am not positive that other SVR4 systems won't match this, 989659607e0Smrg # I just have to hope. -- rms. 990659607e0Smrg # Use sysv4.2uw... so that sysv4* matches it. 991659607e0Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 992659607e0Smrg exit ;; 993659607e0Smrg i*86:OS/2:*:*) 994659607e0Smrg # If we were able to find `uname', then EMX Unix compatibility 995659607e0Smrg # is probably installed. 996659607e0Smrg echo ${UNAME_MACHINE}-pc-os2-emx 997659607e0Smrg exit ;; 998659607e0Smrg i*86:XTS-300:*:STOP) 999659607e0Smrg echo ${UNAME_MACHINE}-unknown-stop 1000659607e0Smrg exit ;; 1001659607e0Smrg i*86:atheos:*:*) 1002659607e0Smrg echo ${UNAME_MACHINE}-unknown-atheos 1003659607e0Smrg exit ;; 1004659607e0Smrg i*86:syllable:*:*) 1005659607e0Smrg echo ${UNAME_MACHINE}-pc-syllable 1006659607e0Smrg exit ;; 1007b73be646Smrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1008659607e0Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 1009659607e0Smrg exit ;; 1010659607e0Smrg i*86:*DOS:*:*) 1011659607e0Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 1012659607e0Smrg exit ;; 1013659607e0Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1014659607e0Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1015659607e0Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1016659607e0Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 1017659607e0Smrg else 1018659607e0Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1019659607e0Smrg fi 1020659607e0Smrg exit ;; 1021659607e0Smrg i*86:*:5:[678]*) 1022659607e0Smrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 1023659607e0Smrg case `/bin/uname -X | grep "^Machine"` in 1024659607e0Smrg *486*) UNAME_MACHINE=i486 ;; 1025659607e0Smrg *Pentium) UNAME_MACHINE=i586 ;; 1026659607e0Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1027659607e0Smrg esac 1028659607e0Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1029659607e0Smrg exit ;; 1030659607e0Smrg i*86:*:3.2:*) 1031659607e0Smrg if test -f /usr/options/cb.name; then 1032659607e0Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1033659607e0Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 1034659607e0Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 1035659607e0Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1036659607e0Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1037659607e0Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 1038659607e0Smrg && UNAME_MACHINE=i586 1039659607e0Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1040659607e0Smrg && UNAME_MACHINE=i686 1041659607e0Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1042659607e0Smrg && UNAME_MACHINE=i686 1043659607e0Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 1044659607e0Smrg else 1045659607e0Smrg echo ${UNAME_MACHINE}-pc-sysv32 1046659607e0Smrg fi 1047659607e0Smrg exit ;; 1048659607e0Smrg pc:*:*:*) 1049659607e0Smrg # Left here for compatibility: 1050659607e0Smrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 1051b73be646Smrg # the processor, so we play safe by assuming i586. 1052b73be646Smrg # Note: whatever this is, it MUST be the same as what config.sub 1053b73be646Smrg # prints for the "djgpp" host, or else GDB configury will decide that 1054b73be646Smrg # this is a cross-build. 1055b73be646Smrg echo i586-pc-msdosdjgpp 1056659607e0Smrg exit ;; 1057659607e0Smrg Intel:Mach:3*:*) 1058659607e0Smrg echo i386-pc-mach3 1059659607e0Smrg exit ;; 1060659607e0Smrg paragon:*:*:*) 1061659607e0Smrg echo i860-intel-osf1 1062659607e0Smrg exit ;; 1063659607e0Smrg i860:*:4.*:*) # i860-SVR4 1064659607e0Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1065659607e0Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1066659607e0Smrg else # Add other i860-SVR4 vendors below as they are discovered. 1067659607e0Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1068659607e0Smrg fi 1069659607e0Smrg exit ;; 1070659607e0Smrg mini*:CTIX:SYS*5:*) 1071659607e0Smrg # "miniframe" 1072659607e0Smrg echo m68010-convergent-sysv 1073659607e0Smrg exit ;; 1074659607e0Smrg mc68k:UNIX:SYSTEM5:3.51m) 1075659607e0Smrg echo m68k-convergent-sysv 1076659607e0Smrg exit ;; 1077659607e0Smrg M680?0:D-NIX:5.3:*) 1078659607e0Smrg echo m68k-diab-dnix 1079659607e0Smrg exit ;; 1080659607e0Smrg M68*:*:R3V[5678]*:*) 1081659607e0Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1082659607e0Smrg 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) 1083659607e0Smrg OS_REL='' 1084659607e0Smrg test -r /etc/.relid \ 1085659607e0Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1086659607e0Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1087659607e0Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1088659607e0Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1089659607e0Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1090659607e0Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1091659607e0Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1092659607e0Smrg && { echo i486-ncr-sysv4; exit; } ;; 1093b73be646Smrg NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1094b73be646Smrg OS_REL='.3' 1095b73be646Smrg test -r /etc/.relid \ 1096b73be646Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1097b73be646Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1098b73be646Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1099b73be646Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1100b73be646Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1101b73be646Smrg /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1102b73be646Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1103659607e0Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1104659607e0Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 1105659607e0Smrg exit ;; 1106659607e0Smrg mc68030:UNIX_System_V:4.*:*) 1107659607e0Smrg echo m68k-atari-sysv4 1108659607e0Smrg exit ;; 1109659607e0Smrg TSUNAMI:LynxOS:2.*:*) 1110659607e0Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 1111659607e0Smrg exit ;; 1112659607e0Smrg rs6000:LynxOS:2.*:*) 1113659607e0Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 1114659607e0Smrg exit ;; 1115b73be646Smrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1116659607e0Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 1117659607e0Smrg exit ;; 1118659607e0Smrg SM[BE]S:UNIX_SV:*:*) 1119659607e0Smrg echo mips-dde-sysv${UNAME_RELEASE} 1120659607e0Smrg exit ;; 1121659607e0Smrg RM*:ReliantUNIX-*:*:*) 1122659607e0Smrg echo mips-sni-sysv4 1123659607e0Smrg exit ;; 1124659607e0Smrg RM*:SINIX-*:*:*) 1125659607e0Smrg echo mips-sni-sysv4 1126659607e0Smrg exit ;; 1127659607e0Smrg *:SINIX-*:*:*) 1128659607e0Smrg if uname -p 2>/dev/null >/dev/null ; then 1129659607e0Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 1130659607e0Smrg echo ${UNAME_MACHINE}-sni-sysv4 1131659607e0Smrg else 1132659607e0Smrg echo ns32k-sni-sysv 1133659607e0Smrg fi 1134659607e0Smrg exit ;; 1135659607e0Smrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1136659607e0Smrg # says <Richard.M.Bartel@ccMail.Census.GOV> 1137659607e0Smrg echo i586-unisys-sysv4 1138659607e0Smrg exit ;; 1139659607e0Smrg *:UNIX_System_V:4*:FTX*) 1140659607e0Smrg # From Gerald Hewes <hewes@openmarket.com>. 1141659607e0Smrg # How about differentiating between stratus architectures? -djm 1142659607e0Smrg echo hppa1.1-stratus-sysv4 1143659607e0Smrg exit ;; 1144659607e0Smrg *:*:*:FTX*) 1145659607e0Smrg # From seanf@swdc.stratus.com. 1146659607e0Smrg echo i860-stratus-sysv4 1147659607e0Smrg exit ;; 1148659607e0Smrg i*86:VOS:*:*) 1149659607e0Smrg # From Paul.Green@stratus.com. 1150659607e0Smrg echo ${UNAME_MACHINE}-stratus-vos 1151659607e0Smrg exit ;; 1152659607e0Smrg *:VOS:*:*) 1153659607e0Smrg # From Paul.Green@stratus.com. 1154659607e0Smrg echo hppa1.1-stratus-vos 1155659607e0Smrg exit ;; 1156659607e0Smrg mc68*:A/UX:*:*) 1157659607e0Smrg echo m68k-apple-aux${UNAME_RELEASE} 1158659607e0Smrg exit ;; 1159659607e0Smrg news*:NEWS-OS:6*:*) 1160659607e0Smrg echo mips-sony-newsos6 1161659607e0Smrg exit ;; 1162659607e0Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1163659607e0Smrg if [ -d /usr/nec ]; then 1164659607e0Smrg echo mips-nec-sysv${UNAME_RELEASE} 1165659607e0Smrg else 1166659607e0Smrg echo mips-unknown-sysv${UNAME_RELEASE} 1167659607e0Smrg fi 1168659607e0Smrg exit ;; 1169659607e0Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1170659607e0Smrg echo powerpc-be-beos 1171659607e0Smrg exit ;; 1172659607e0Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1173659607e0Smrg echo powerpc-apple-beos 1174659607e0Smrg exit ;; 1175659607e0Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1176659607e0Smrg echo i586-pc-beos 1177659607e0Smrg exit ;; 1178b73be646Smrg BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1179b73be646Smrg echo i586-pc-haiku 1180b73be646Smrg exit ;; 1181659607e0Smrg SX-4:SUPER-UX:*:*) 1182659607e0Smrg echo sx4-nec-superux${UNAME_RELEASE} 1183659607e0Smrg exit ;; 1184659607e0Smrg SX-5:SUPER-UX:*:*) 1185659607e0Smrg echo sx5-nec-superux${UNAME_RELEASE} 1186659607e0Smrg exit ;; 1187659607e0Smrg SX-6:SUPER-UX:*:*) 1188659607e0Smrg echo sx6-nec-superux${UNAME_RELEASE} 1189659607e0Smrg exit ;; 1190fc27e79cSmrg SX-7:SUPER-UX:*:*) 1191fc27e79cSmrg echo sx7-nec-superux${UNAME_RELEASE} 1192fc27e79cSmrg exit ;; 1193fc27e79cSmrg SX-8:SUPER-UX:*:*) 1194fc27e79cSmrg echo sx8-nec-superux${UNAME_RELEASE} 1195fc27e79cSmrg exit ;; 1196fc27e79cSmrg SX-8R:SUPER-UX:*:*) 1197fc27e79cSmrg echo sx8r-nec-superux${UNAME_RELEASE} 1198fc27e79cSmrg exit ;; 1199659607e0Smrg Power*:Rhapsody:*:*) 1200659607e0Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 1201659607e0Smrg exit ;; 1202659607e0Smrg *:Rhapsody:*:*) 1203659607e0Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1204659607e0Smrg exit ;; 1205659607e0Smrg *:Darwin:*:*) 1206659607e0Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1207659607e0Smrg case $UNAME_PROCESSOR in 1208b73be646Smrg i386) 1209b73be646Smrg eval $set_cc_for_build 1210b73be646Smrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1211b73be646Smrg if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1212b73be646Smrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1213b73be646Smrg grep IS_64BIT_ARCH >/dev/null 1214b73be646Smrg then 1215b73be646Smrg UNAME_PROCESSOR="x86_64" 1216b73be646Smrg fi 1217b73be646Smrg fi ;; 1218659607e0Smrg unknown) UNAME_PROCESSOR=powerpc ;; 1219659607e0Smrg esac 1220659607e0Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1221659607e0Smrg exit ;; 1222659607e0Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 1223659607e0Smrg UNAME_PROCESSOR=`uname -p` 1224659607e0Smrg if test "$UNAME_PROCESSOR" = "x86"; then 1225659607e0Smrg UNAME_PROCESSOR=i386 1226659607e0Smrg UNAME_MACHINE=pc 1227659607e0Smrg fi 1228659607e0Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1229659607e0Smrg exit ;; 1230659607e0Smrg *:QNX:*:4*) 1231659607e0Smrg echo i386-pc-qnx 1232659607e0Smrg exit ;; 1233659607e0Smrg NSE-?:NONSTOP_KERNEL:*:*) 1234659607e0Smrg echo nse-tandem-nsk${UNAME_RELEASE} 1235659607e0Smrg exit ;; 1236659607e0Smrg NSR-?:NONSTOP_KERNEL:*:*) 1237659607e0Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 1238659607e0Smrg exit ;; 1239659607e0Smrg *:NonStop-UX:*:*) 1240659607e0Smrg echo mips-compaq-nonstopux 1241659607e0Smrg exit ;; 1242659607e0Smrg BS2000:POSIX*:*:*) 1243659607e0Smrg echo bs2000-siemens-sysv 1244659607e0Smrg exit ;; 1245659607e0Smrg DS/*:UNIX_System_V:*:*) 1246659607e0Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1247659607e0Smrg exit ;; 1248659607e0Smrg *:Plan9:*:*) 1249659607e0Smrg # "uname -m" is not consistent, so use $cputype instead. 386 1250659607e0Smrg # is converted to i386 for consistency with other x86 1251659607e0Smrg # operating systems. 1252659607e0Smrg if test "$cputype" = "386"; then 1253659607e0Smrg UNAME_MACHINE=i386 1254659607e0Smrg else 1255659607e0Smrg UNAME_MACHINE="$cputype" 1256659607e0Smrg fi 1257659607e0Smrg echo ${UNAME_MACHINE}-unknown-plan9 1258659607e0Smrg exit ;; 1259659607e0Smrg *:TOPS-10:*:*) 1260659607e0Smrg echo pdp10-unknown-tops10 1261659607e0Smrg exit ;; 1262659607e0Smrg *:TENEX:*:*) 1263659607e0Smrg echo pdp10-unknown-tenex 1264659607e0Smrg exit ;; 1265659607e0Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1266659607e0Smrg echo pdp10-dec-tops20 1267659607e0Smrg exit ;; 1268659607e0Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1269659607e0Smrg echo pdp10-xkl-tops20 1270659607e0Smrg exit ;; 1271659607e0Smrg *:TOPS-20:*:*) 1272659607e0Smrg echo pdp10-unknown-tops20 1273659607e0Smrg exit ;; 1274659607e0Smrg *:ITS:*:*) 1275659607e0Smrg echo pdp10-unknown-its 1276659607e0Smrg exit ;; 1277659607e0Smrg SEI:*:*:SEIUX) 1278659607e0Smrg echo mips-sei-seiux${UNAME_RELEASE} 1279659607e0Smrg exit ;; 1280659607e0Smrg *:DragonFly:*:*) 1281659607e0Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1282659607e0Smrg exit ;; 1283659607e0Smrg *:*VMS:*:*) 1284659607e0Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 1285659607e0Smrg case "${UNAME_MACHINE}" in 1286659607e0Smrg A*) echo alpha-dec-vms ; exit ;; 1287659607e0Smrg I*) echo ia64-dec-vms ; exit ;; 1288659607e0Smrg V*) echo vax-dec-vms ; exit ;; 1289659607e0Smrg esac ;; 1290659607e0Smrg *:XENIX:*:SysV) 1291659607e0Smrg echo i386-pc-xenix 1292659607e0Smrg exit ;; 1293659607e0Smrg i*86:skyos:*:*) 1294659607e0Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1295659607e0Smrg exit ;; 1296659607e0Smrg i*86:rdos:*:*) 1297659607e0Smrg echo ${UNAME_MACHINE}-pc-rdos 1298659607e0Smrg exit ;; 1299b73be646Smrg i*86:AROS:*:*) 1300b73be646Smrg echo ${UNAME_MACHINE}-pc-aros 1301b73be646Smrg exit ;; 1302659607e0Smrgesac 1303659607e0Smrg 1304659607e0Smrg#echo '(No uname command or uname output not recognized.)' 1>&2 1305659607e0Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 1306659607e0Smrg 1307659607e0Smrgeval $set_cc_for_build 1308659607e0Smrgcat >$dummy.c <<EOF 1309659607e0Smrg#ifdef _SEQUENT_ 1310659607e0Smrg# include <sys/types.h> 1311659607e0Smrg# include <sys/utsname.h> 1312659607e0Smrg#endif 1313659607e0Smrgmain () 1314659607e0Smrg{ 1315659607e0Smrg#if defined (sony) 1316659607e0Smrg#if defined (MIPSEB) 1317659607e0Smrg /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 1318659607e0Smrg I don't know.... */ 1319659607e0Smrg printf ("mips-sony-bsd\n"); exit (0); 1320659607e0Smrg#else 1321659607e0Smrg#include <sys/param.h> 1322659607e0Smrg printf ("m68k-sony-newsos%s\n", 1323659607e0Smrg#ifdef NEWSOS4 1324659607e0Smrg "4" 1325659607e0Smrg#else 1326659607e0Smrg "" 1327659607e0Smrg#endif 1328659607e0Smrg ); exit (0); 1329659607e0Smrg#endif 1330659607e0Smrg#endif 1331659607e0Smrg 1332659607e0Smrg#if defined (__arm) && defined (__acorn) && defined (__unix) 1333659607e0Smrg printf ("arm-acorn-riscix\n"); exit (0); 1334659607e0Smrg#endif 1335659607e0Smrg 1336659607e0Smrg#if defined (hp300) && !defined (hpux) 1337659607e0Smrg printf ("m68k-hp-bsd\n"); exit (0); 1338659607e0Smrg#endif 1339659607e0Smrg 1340659607e0Smrg#if defined (NeXT) 1341659607e0Smrg#if !defined (__ARCHITECTURE__) 1342659607e0Smrg#define __ARCHITECTURE__ "m68k" 1343659607e0Smrg#endif 1344659607e0Smrg int version; 1345659607e0Smrg version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 1346659607e0Smrg if (version < 4) 1347659607e0Smrg printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1348659607e0Smrg else 1349659607e0Smrg printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 1350659607e0Smrg exit (0); 1351659607e0Smrg#endif 1352659607e0Smrg 1353659607e0Smrg#if defined (MULTIMAX) || defined (n16) 1354659607e0Smrg#if defined (UMAXV) 1355659607e0Smrg printf ("ns32k-encore-sysv\n"); exit (0); 1356659607e0Smrg#else 1357659607e0Smrg#if defined (CMU) 1358659607e0Smrg printf ("ns32k-encore-mach\n"); exit (0); 1359659607e0Smrg#else 1360659607e0Smrg printf ("ns32k-encore-bsd\n"); exit (0); 1361659607e0Smrg#endif 1362659607e0Smrg#endif 1363659607e0Smrg#endif 1364659607e0Smrg 1365659607e0Smrg#if defined (__386BSD__) 1366659607e0Smrg printf ("i386-pc-bsd\n"); exit (0); 1367659607e0Smrg#endif 1368659607e0Smrg 1369659607e0Smrg#if defined (sequent) 1370659607e0Smrg#if defined (i386) 1371659607e0Smrg printf ("i386-sequent-dynix\n"); exit (0); 1372659607e0Smrg#endif 1373659607e0Smrg#if defined (ns32000) 1374659607e0Smrg printf ("ns32k-sequent-dynix\n"); exit (0); 1375659607e0Smrg#endif 1376659607e0Smrg#endif 1377659607e0Smrg 1378659607e0Smrg#if defined (_SEQUENT_) 1379659607e0Smrg struct utsname un; 1380659607e0Smrg 1381659607e0Smrg uname(&un); 1382659607e0Smrg 1383659607e0Smrg if (strncmp(un.version, "V2", 2) == 0) { 1384659607e0Smrg printf ("i386-sequent-ptx2\n"); exit (0); 1385659607e0Smrg } 1386659607e0Smrg if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 1387659607e0Smrg printf ("i386-sequent-ptx1\n"); exit (0); 1388659607e0Smrg } 1389659607e0Smrg printf ("i386-sequent-ptx\n"); exit (0); 1390659607e0Smrg 1391659607e0Smrg#endif 1392659607e0Smrg 1393659607e0Smrg#if defined (vax) 1394659607e0Smrg# if !defined (ultrix) 1395659607e0Smrg# include <sys/param.h> 1396659607e0Smrg# if defined (BSD) 1397659607e0Smrg# if BSD == 43 1398659607e0Smrg printf ("vax-dec-bsd4.3\n"); exit (0); 1399659607e0Smrg# else 1400659607e0Smrg# if BSD == 199006 1401659607e0Smrg printf ("vax-dec-bsd4.3reno\n"); exit (0); 1402659607e0Smrg# else 1403659607e0Smrg printf ("vax-dec-bsd\n"); exit (0); 1404659607e0Smrg# endif 1405659607e0Smrg# endif 1406659607e0Smrg# else 1407659607e0Smrg printf ("vax-dec-bsd\n"); exit (0); 1408659607e0Smrg# endif 1409659607e0Smrg# else 1410659607e0Smrg printf ("vax-dec-ultrix\n"); exit (0); 1411659607e0Smrg# endif 1412659607e0Smrg#endif 1413659607e0Smrg 1414659607e0Smrg#if defined (alliant) && defined (i860) 1415659607e0Smrg printf ("i860-alliant-bsd\n"); exit (0); 1416659607e0Smrg#endif 1417659607e0Smrg 1418659607e0Smrg exit (1); 1419659607e0Smrg} 1420659607e0SmrgEOF 1421659607e0Smrg 1422659607e0Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 1423659607e0Smrg { echo "$SYSTEM_NAME"; exit; } 1424659607e0Smrg 1425659607e0Smrg# Apollos put the system type in the environment. 1426659607e0Smrg 1427659607e0Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 1428659607e0Smrg 1429659607e0Smrg# Convex versions that predate uname can use getsysinfo(1) 1430659607e0Smrg 1431659607e0Smrgif [ -x /usr/convex/getsysinfo ] 1432659607e0Smrgthen 1433659607e0Smrg case `getsysinfo -f cpu_type` in 1434659607e0Smrg c1*) 1435659607e0Smrg echo c1-convex-bsd 1436659607e0Smrg exit ;; 1437659607e0Smrg c2*) 1438659607e0Smrg if getsysinfo -f scalar_acc 1439659607e0Smrg then echo c32-convex-bsd 1440659607e0Smrg else echo c2-convex-bsd 1441659607e0Smrg fi 1442659607e0Smrg exit ;; 1443659607e0Smrg c34*) 1444659607e0Smrg echo c34-convex-bsd 1445659607e0Smrg exit ;; 1446659607e0Smrg c38*) 1447659607e0Smrg echo c38-convex-bsd 1448659607e0Smrg exit ;; 1449659607e0Smrg c4*) 1450659607e0Smrg echo c4-convex-bsd 1451659607e0Smrg exit ;; 1452659607e0Smrg esac 1453659607e0Smrgfi 1454659607e0Smrg 1455659607e0Smrgcat >&2 <<EOF 1456659607e0Smrg$0: unable to guess system type 1457659607e0Smrg 1458659607e0SmrgThis script, last modified $timestamp, has failed to recognize 1459659607e0Smrgthe operating system you are using. It is advised that you 1460659607e0Smrgdownload the most up to date version of the config scripts from 1461659607e0Smrg 1462fc27e79cSmrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1463659607e0Smrgand 1464fc27e79cSmrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1465659607e0Smrg 1466659607e0SmrgIf the version you run ($0) is already up to date, please 1467659607e0Smrgsend the following data and any information you think might be 1468659607e0Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 1469659607e0Smrginformation to handle your system. 1470659607e0Smrg 1471659607e0Smrgconfig.guess timestamp = $timestamp 1472659607e0Smrg 1473659607e0Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 1474659607e0Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 1475659607e0Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 1476659607e0Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 1477659607e0Smrg 1478659607e0Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1479659607e0Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1480659607e0Smrg 1481659607e0Smrghostinfo = `(hostinfo) 2>/dev/null` 1482659607e0Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 1483659607e0Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1484659607e0Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 1485659607e0Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1486659607e0Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1487659607e0Smrg 1488659607e0SmrgUNAME_MACHINE = ${UNAME_MACHINE} 1489659607e0SmrgUNAME_RELEASE = ${UNAME_RELEASE} 1490659607e0SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 1491659607e0SmrgUNAME_VERSION = ${UNAME_VERSION} 1492659607e0SmrgEOF 1493659607e0Smrg 1494659607e0Smrgexit 1 1495659607e0Smrg 1496659607e0Smrg# Local variables: 1497659607e0Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 1498659607e0Smrg# time-stamp-start: "timestamp='" 1499659607e0Smrg# time-stamp-format: "%:y-%02m-%02d" 1500659607e0Smrg# time-stamp-end: "'" 1501659607e0Smrg# End: 1502