config.guess revision 0cc67336
1301ea0f4Smrg#! /bin/sh 2301ea0f4Smrg# Attempt to guess a canonical system name. 3301ea0f4Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 40cc67336Smrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 50cc67336Smrg# Free Software Foundation, Inc. 6301ea0f4Smrg 70cc67336Smrgtimestamp='2008-01-23' 8301ea0f4Smrg 9301ea0f4Smrg# This file is free software; you can redistribute it and/or modify it 10301ea0f4Smrg# under the terms of the GNU General Public License as published by 11301ea0f4Smrg# the Free Software Foundation; either version 2 of the License, or 12301ea0f4Smrg# (at your option) any later version. 13301ea0f4Smrg# 14301ea0f4Smrg# This program is distributed in the hope that it will be useful, but 15301ea0f4Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 16301ea0f4Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17301ea0f4Smrg# General Public License for more details. 18301ea0f4Smrg# 19301ea0f4Smrg# You should have received a copy of the GNU General Public License 20301ea0f4Smrg# along with this program; if not, write to the Free Software 210cc67336Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 220cc67336Smrg# 02110-1301, USA. 23301ea0f4Smrg# 24301ea0f4Smrg# As a special exception to the GNU General Public License, if you 25301ea0f4Smrg# distribute this file as part of a program that contains a 26301ea0f4Smrg# configuration script generated by Autoconf, you may include it under 27301ea0f4Smrg# the same distribution terms that you use for the rest of that program. 28301ea0f4Smrg 290cc67336Smrg 30301ea0f4Smrg# Originally written by Per Bothner <per@bothner.com>. 31301ea0f4Smrg# Please send patches to <config-patches@gnu.org>. Submit a context 32301ea0f4Smrg# diff and a properly formatted ChangeLog entry. 33301ea0f4Smrg# 34301ea0f4Smrg# This script attempts to guess a canonical system name similar to 35301ea0f4Smrg# config.sub. If it succeeds, it prints the system name on stdout, and 36301ea0f4Smrg# exits with 0. Otherwise, it exits with 1. 37301ea0f4Smrg# 38301ea0f4Smrg# The plan is that this can be called by configure scripts if you 39301ea0f4Smrg# don't specify an explicit build system type. 40301ea0f4Smrg 41301ea0f4Smrgme=`echo "$0" | sed -e 's,.*/,,'` 42301ea0f4Smrg 43301ea0f4Smrgusage="\ 44301ea0f4SmrgUsage: $0 [OPTION] 45301ea0f4Smrg 46301ea0f4SmrgOutput the configuration name of the system \`$me' is run on. 47301ea0f4Smrg 48301ea0f4SmrgOperation modes: 49301ea0f4Smrg -h, --help print this help, then exit 50301ea0f4Smrg -t, --time-stamp print date of last modification, then exit 51301ea0f4Smrg -v, --version print version number, then exit 52301ea0f4Smrg 53301ea0f4SmrgReport bugs and patches to <config-patches@gnu.org>." 54301ea0f4Smrg 55301ea0f4Smrgversion="\ 56301ea0f4SmrgGNU config.guess ($timestamp) 57301ea0f4Smrg 58301ea0f4SmrgOriginally written by Per Bothner. 590cc67336SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 600cc67336Smrg2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 61301ea0f4Smrg 62301ea0f4SmrgThis is free software; see the source for copying conditions. There is NO 63301ea0f4Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 64301ea0f4Smrg 65301ea0f4Smrghelp=" 66301ea0f4SmrgTry \`$me --help' for more information." 67301ea0f4Smrg 68301ea0f4Smrg# Parse command line 69301ea0f4Smrgwhile test $# -gt 0 ; do 70301ea0f4Smrg case $1 in 71301ea0f4Smrg --time-stamp | --time* | -t ) 720cc67336Smrg echo "$timestamp" ; exit ;; 73301ea0f4Smrg --version | -v ) 740cc67336Smrg echo "$version" ; exit ;; 75301ea0f4Smrg --help | --h* | -h ) 760cc67336Smrg echo "$usage"; exit ;; 77301ea0f4Smrg -- ) # Stop option processing 78301ea0f4Smrg shift; break ;; 79301ea0f4Smrg - ) # Use stdin as input. 80301ea0f4Smrg break ;; 81301ea0f4Smrg -* ) 82301ea0f4Smrg echo "$me: invalid option $1$help" >&2 83301ea0f4Smrg exit 1 ;; 84301ea0f4Smrg * ) 85301ea0f4Smrg break ;; 86301ea0f4Smrg esac 87301ea0f4Smrgdone 88301ea0f4Smrg 89301ea0f4Smrgif test $# != 0; then 90301ea0f4Smrg echo "$me: too many arguments$help" >&2 91301ea0f4Smrg exit 1 92301ea0f4Smrgfi 93301ea0f4Smrg 94301ea0f4Smrgtrap 'exit 1' 1 2 15 95301ea0f4Smrg 96301ea0f4Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 97301ea0f4Smrg# compiler to aid in system detection is discouraged as it requires 98301ea0f4Smrg# temporary files to be created and, as you can see below, it is a 99301ea0f4Smrg# headache to deal with in a portable fashion. 100301ea0f4Smrg 101301ea0f4Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 102301ea0f4Smrg# use `HOST_CC' if defined, but it is deprecated. 103301ea0f4Smrg 104301ea0f4Smrg# Portable tmp directory creation inspired by the Autoconf team. 105301ea0f4Smrg 106301ea0f4Smrgset_cc_for_build=' 107301ea0f4Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 108301ea0f4Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 109301ea0f4Smrg: ${TMPDIR=/tmp} ; 1100cc67336Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 111301ea0f4Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 112301ea0f4Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 113301ea0f4Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 114301ea0f4Smrgdummy=$tmp/dummy ; 115301ea0f4Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 116301ea0f4Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 117301ea0f4Smrg ,,) echo "int x;" > $dummy.c ; 118301ea0f4Smrg for c in cc gcc c89 c99 ; do 119301ea0f4Smrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 120301ea0f4Smrg CC_FOR_BUILD="$c"; break ; 121301ea0f4Smrg fi ; 122301ea0f4Smrg done ; 123301ea0f4Smrg if test x"$CC_FOR_BUILD" = x ; then 124301ea0f4Smrg CC_FOR_BUILD=no_compiler_found ; 125301ea0f4Smrg fi 126301ea0f4Smrg ;; 127301ea0f4Smrg ,,*) CC_FOR_BUILD=$CC ;; 128301ea0f4Smrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 1290cc67336Smrgesac ; set_cc_for_build= ;' 130301ea0f4Smrg 131301ea0f4Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 132301ea0f4Smrg# (ghazi@noc.rutgers.edu 1994-08-24) 133301ea0f4Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 134301ea0f4Smrg PATH=$PATH:/.attbin ; export PATH 135301ea0f4Smrgfi 136301ea0f4Smrg 137301ea0f4SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 138301ea0f4SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 139301ea0f4SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 140301ea0f4SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 141301ea0f4Smrg 142301ea0f4Smrg# Note: order is significant - the case branches are not exclusive. 143301ea0f4Smrg 144301ea0f4Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 145301ea0f4Smrg *:NetBSD:*:*) 146301ea0f4Smrg # NetBSD (nbsd) targets should (where applicable) match one or 147301ea0f4Smrg # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 148301ea0f4Smrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 149301ea0f4Smrg # switched to ELF, *-*-netbsd* would select the old 150301ea0f4Smrg # object file format. This provides both forward 151301ea0f4Smrg # compatibility and a consistent mechanism for selecting the 152301ea0f4Smrg # object file format. 153301ea0f4Smrg # 154301ea0f4Smrg # Note: NetBSD doesn't particularly care about the vendor 155301ea0f4Smrg # portion of the name. We always set it to "unknown". 156301ea0f4Smrg sysctl="sysctl -n hw.machine_arch" 157301ea0f4Smrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 158301ea0f4Smrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 159301ea0f4Smrg case "${UNAME_MACHINE_ARCH}" in 160301ea0f4Smrg armeb) machine=armeb-unknown ;; 161301ea0f4Smrg arm*) machine=arm-unknown ;; 162301ea0f4Smrg sh3el) machine=shl-unknown ;; 163301ea0f4Smrg sh3eb) machine=sh-unknown ;; 1640cc67336Smrg sh5el) machine=sh5le-unknown ;; 165301ea0f4Smrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 166301ea0f4Smrg esac 167301ea0f4Smrg # The Operating System including object format, if it has switched 168301ea0f4Smrg # to ELF recently, or will in the future. 169301ea0f4Smrg case "${UNAME_MACHINE_ARCH}" in 170301ea0f4Smrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 171301ea0f4Smrg eval $set_cc_for_build 172301ea0f4Smrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 173301ea0f4Smrg | grep __ELF__ >/dev/null 174301ea0f4Smrg then 175301ea0f4Smrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 176301ea0f4Smrg # Return netbsd for either. FIX? 177301ea0f4Smrg os=netbsd 178301ea0f4Smrg else 179301ea0f4Smrg os=netbsdelf 180301ea0f4Smrg fi 181301ea0f4Smrg ;; 182301ea0f4Smrg *) 183301ea0f4Smrg os=netbsd 184301ea0f4Smrg ;; 185301ea0f4Smrg esac 186301ea0f4Smrg # The OS release 187301ea0f4Smrg # Debian GNU/NetBSD machines have a different userland, and 188301ea0f4Smrg # thus, need a distinct triplet. However, they do not need 189301ea0f4Smrg # kernel version information, so it can be replaced with a 190301ea0f4Smrg # suitable tag, in the style of linux-gnu. 191301ea0f4Smrg case "${UNAME_VERSION}" in 192301ea0f4Smrg Debian*) 193301ea0f4Smrg release='-gnu' 194301ea0f4Smrg ;; 195301ea0f4Smrg *) 196301ea0f4Smrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 197301ea0f4Smrg ;; 198301ea0f4Smrg esac 199301ea0f4Smrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 200301ea0f4Smrg # contains redundant information, the shorter form: 201301ea0f4Smrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 202301ea0f4Smrg echo "${machine}-${os}${release}" 2030cc67336Smrg exit ;; 204301ea0f4Smrg *:OpenBSD:*:*) 2050cc67336Smrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 2060cc67336Smrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 2070cc67336Smrg exit ;; 2080cc67336Smrg *:ekkoBSD:*:*) 2090cc67336Smrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 2100cc67336Smrg exit ;; 2110cc67336Smrg *:SolidBSD:*:*) 2120cc67336Smrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 2130cc67336Smrg exit ;; 2140cc67336Smrg macppc:MirBSD:*:*) 2150cc67336Smrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 2160cc67336Smrg exit ;; 2170cc67336Smrg *:MirBSD:*:*) 2180cc67336Smrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 2190cc67336Smrg exit ;; 220301ea0f4Smrg alpha:OSF1:*:*) 2210cc67336Smrg case $UNAME_RELEASE in 2220cc67336Smrg *4.0) 223301ea0f4Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 2240cc67336Smrg ;; 2250cc67336Smrg *5.*) 2260cc67336Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 2270cc67336Smrg ;; 2280cc67336Smrg esac 229301ea0f4Smrg # According to Compaq, /usr/sbin/psrinfo has been available on 230301ea0f4Smrg # OSF/1 and Tru64 systems produced since 1995. I hope that 231301ea0f4Smrg # covers most systems running today. This code pipes the CPU 232301ea0f4Smrg # types through head -n 1, so we only detect the type of CPU 0. 233301ea0f4Smrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 234301ea0f4Smrg case "$ALPHA_CPU_TYPE" in 235301ea0f4Smrg "EV4 (21064)") 236301ea0f4Smrg UNAME_MACHINE="alpha" ;; 237301ea0f4Smrg "EV4.5 (21064)") 238301ea0f4Smrg UNAME_MACHINE="alpha" ;; 239301ea0f4Smrg "LCA4 (21066/21068)") 240301ea0f4Smrg UNAME_MACHINE="alpha" ;; 241301ea0f4Smrg "EV5 (21164)") 242301ea0f4Smrg UNAME_MACHINE="alphaev5" ;; 243301ea0f4Smrg "EV5.6 (21164A)") 244301ea0f4Smrg UNAME_MACHINE="alphaev56" ;; 245301ea0f4Smrg "EV5.6 (21164PC)") 246301ea0f4Smrg UNAME_MACHINE="alphapca56" ;; 247301ea0f4Smrg "EV5.7 (21164PC)") 248301ea0f4Smrg UNAME_MACHINE="alphapca57" ;; 249301ea0f4Smrg "EV6 (21264)") 250301ea0f4Smrg UNAME_MACHINE="alphaev6" ;; 251301ea0f4Smrg "EV6.7 (21264A)") 252301ea0f4Smrg UNAME_MACHINE="alphaev67" ;; 253301ea0f4Smrg "EV6.8CB (21264C)") 254301ea0f4Smrg UNAME_MACHINE="alphaev68" ;; 255301ea0f4Smrg "EV6.8AL (21264B)") 256301ea0f4Smrg UNAME_MACHINE="alphaev68" ;; 257301ea0f4Smrg "EV6.8CX (21264D)") 258301ea0f4Smrg UNAME_MACHINE="alphaev68" ;; 259301ea0f4Smrg "EV6.9A (21264/EV69A)") 260301ea0f4Smrg UNAME_MACHINE="alphaev69" ;; 261301ea0f4Smrg "EV7 (21364)") 262301ea0f4Smrg UNAME_MACHINE="alphaev7" ;; 263301ea0f4Smrg "EV7.9 (21364A)") 264301ea0f4Smrg UNAME_MACHINE="alphaev79" ;; 265301ea0f4Smrg esac 2660cc67336Smrg # A Pn.n version is a patched version. 267301ea0f4Smrg # A Vn.n version is a released version. 268301ea0f4Smrg # A Tn.n version is a released field test version. 269301ea0f4Smrg # A Xn.n version is an unreleased experimental baselevel. 270301ea0f4Smrg # 1.2 uses "1.2" for uname -r. 2710cc67336Smrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2720cc67336Smrg exit ;; 273301ea0f4Smrg Alpha\ *:Windows_NT*:*) 274301ea0f4Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 275301ea0f4Smrg # Should we change UNAME_MACHINE based on the output of uname instead 276301ea0f4Smrg # of the specific Alpha model? 277301ea0f4Smrg echo alpha-pc-interix 2780cc67336Smrg exit ;; 279301ea0f4Smrg 21064:Windows_NT:50:3) 280301ea0f4Smrg echo alpha-dec-winnt3.5 2810cc67336Smrg exit ;; 282301ea0f4Smrg Amiga*:UNIX_System_V:4.0:*) 283301ea0f4Smrg echo m68k-unknown-sysv4 2840cc67336Smrg exit ;; 285301ea0f4Smrg *:[Aa]miga[Oo][Ss]:*:*) 286301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-amigaos 2870cc67336Smrg exit ;; 288301ea0f4Smrg *:[Mm]orph[Oo][Ss]:*:*) 289301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-morphos 2900cc67336Smrg exit ;; 291301ea0f4Smrg *:OS/390:*:*) 292301ea0f4Smrg echo i370-ibm-openedition 2930cc67336Smrg exit ;; 2940cc67336Smrg *:z/VM:*:*) 2950cc67336Smrg echo s390-ibm-zvmoe 2960cc67336Smrg exit ;; 2970cc67336Smrg *:OS400:*:*) 2980cc67336Smrg echo powerpc-ibm-os400 2990cc67336Smrg exit ;; 300301ea0f4Smrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 301301ea0f4Smrg echo arm-acorn-riscix${UNAME_RELEASE} 3020cc67336Smrg exit ;; 3030cc67336Smrg arm:riscos:*:*|arm:RISCOS:*:*) 3040cc67336Smrg echo arm-unknown-riscos 3050cc67336Smrg exit ;; 306301ea0f4Smrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 307301ea0f4Smrg echo hppa1.1-hitachi-hiuxmpp 3080cc67336Smrg exit ;; 309301ea0f4Smrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 310301ea0f4Smrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 311301ea0f4Smrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 312301ea0f4Smrg echo pyramid-pyramid-sysv3 313301ea0f4Smrg else 314301ea0f4Smrg echo pyramid-pyramid-bsd 315301ea0f4Smrg fi 3160cc67336Smrg exit ;; 317301ea0f4Smrg NILE*:*:*:dcosx) 318301ea0f4Smrg echo pyramid-pyramid-svr4 3190cc67336Smrg exit ;; 320301ea0f4Smrg DRS?6000:unix:4.0:6*) 321301ea0f4Smrg echo sparc-icl-nx6 3220cc67336Smrg exit ;; 3230cc67336Smrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 324301ea0f4Smrg case `/usr/bin/uname -p` in 3250cc67336Smrg sparc) echo sparc-icl-nx7; exit ;; 326301ea0f4Smrg esac ;; 327301ea0f4Smrg sun4H:SunOS:5.*:*) 328301ea0f4Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3290cc67336Smrg exit ;; 330301ea0f4Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 331301ea0f4Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3320cc67336Smrg exit ;; 3330cc67336Smrg i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 334301ea0f4Smrg echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3350cc67336Smrg exit ;; 336301ea0f4Smrg sun4*:SunOS:6*:*) 337301ea0f4Smrg # According to config.sub, this is the proper way to canonicalize 338301ea0f4Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 339301ea0f4Smrg # it's likely to be more like Solaris than SunOS4. 340301ea0f4Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3410cc67336Smrg exit ;; 342301ea0f4Smrg sun4*:SunOS:*:*) 343301ea0f4Smrg case "`/usr/bin/arch -k`" in 344301ea0f4Smrg Series*|S4*) 345301ea0f4Smrg UNAME_RELEASE=`uname -v` 346301ea0f4Smrg ;; 347301ea0f4Smrg esac 348301ea0f4Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 349301ea0f4Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 3500cc67336Smrg exit ;; 351301ea0f4Smrg sun3*:SunOS:*:*) 352301ea0f4Smrg echo m68k-sun-sunos${UNAME_RELEASE} 3530cc67336Smrg exit ;; 354301ea0f4Smrg sun*:*:4.2BSD:*) 355301ea0f4Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 356301ea0f4Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 357301ea0f4Smrg case "`/bin/arch`" in 358301ea0f4Smrg sun3) 359301ea0f4Smrg echo m68k-sun-sunos${UNAME_RELEASE} 360301ea0f4Smrg ;; 361301ea0f4Smrg sun4) 362301ea0f4Smrg echo sparc-sun-sunos${UNAME_RELEASE} 363301ea0f4Smrg ;; 364301ea0f4Smrg esac 3650cc67336Smrg exit ;; 366301ea0f4Smrg aushp:SunOS:*:*) 367301ea0f4Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 3680cc67336Smrg exit ;; 369301ea0f4Smrg # The situation for MiNT is a little confusing. The machine name 370301ea0f4Smrg # can be virtually everything (everything which is not 371301ea0f4Smrg # "atarist" or "atariste" at least should have a processor 372301ea0f4Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 373301ea0f4Smrg # to the lowercase version "mint" (or "freemint"). Finally 374301ea0f4Smrg # the system name "TOS" denotes a system which is actually not 375301ea0f4Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 376301ea0f4Smrg # be no problem. 377301ea0f4Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 378301ea0f4Smrg echo m68k-atari-mint${UNAME_RELEASE} 3790cc67336Smrg exit ;; 380301ea0f4Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 381301ea0f4Smrg echo m68k-atari-mint${UNAME_RELEASE} 3820cc67336Smrg exit ;; 383301ea0f4Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 384301ea0f4Smrg echo m68k-atari-mint${UNAME_RELEASE} 3850cc67336Smrg exit ;; 386301ea0f4Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 387301ea0f4Smrg echo m68k-milan-mint${UNAME_RELEASE} 3880cc67336Smrg exit ;; 389301ea0f4Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 390301ea0f4Smrg echo m68k-hades-mint${UNAME_RELEASE} 3910cc67336Smrg exit ;; 392301ea0f4Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 393301ea0f4Smrg echo m68k-unknown-mint${UNAME_RELEASE} 3940cc67336Smrg exit ;; 3950cc67336Smrg m68k:machten:*:*) 3960cc67336Smrg echo m68k-apple-machten${UNAME_RELEASE} 3970cc67336Smrg exit ;; 398301ea0f4Smrg powerpc:machten:*:*) 399301ea0f4Smrg echo powerpc-apple-machten${UNAME_RELEASE} 4000cc67336Smrg exit ;; 401301ea0f4Smrg RISC*:Mach:*:*) 402301ea0f4Smrg echo mips-dec-mach_bsd4.3 4030cc67336Smrg exit ;; 404301ea0f4Smrg RISC*:ULTRIX:*:*) 405301ea0f4Smrg echo mips-dec-ultrix${UNAME_RELEASE} 4060cc67336Smrg exit ;; 407301ea0f4Smrg VAX*:ULTRIX*:*:*) 408301ea0f4Smrg echo vax-dec-ultrix${UNAME_RELEASE} 4090cc67336Smrg exit ;; 410301ea0f4Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 411301ea0f4Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 4120cc67336Smrg exit ;; 413301ea0f4Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 414301ea0f4Smrg eval $set_cc_for_build 415301ea0f4Smrg sed 's/^ //' << EOF >$dummy.c 416301ea0f4Smrg#ifdef __cplusplus 417301ea0f4Smrg#include <stdio.h> /* for printf() prototype */ 418301ea0f4Smrg int main (int argc, char *argv[]) { 419301ea0f4Smrg#else 420301ea0f4Smrg int main (argc, argv) int argc; char *argv[]; { 421301ea0f4Smrg#endif 422301ea0f4Smrg #if defined (host_mips) && defined (MIPSEB) 423301ea0f4Smrg #if defined (SYSTYPE_SYSV) 424301ea0f4Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 425301ea0f4Smrg #endif 426301ea0f4Smrg #if defined (SYSTYPE_SVR4) 427301ea0f4Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 428301ea0f4Smrg #endif 429301ea0f4Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 430301ea0f4Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 431301ea0f4Smrg #endif 432301ea0f4Smrg #endif 433301ea0f4Smrg exit (-1); 434301ea0f4Smrg } 435301ea0f4SmrgEOF 4360cc67336Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 4370cc67336Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 4380cc67336Smrg SYSTEM_NAME=`$dummy $dummyarg` && 4390cc67336Smrg { echo "$SYSTEM_NAME"; exit; } 440301ea0f4Smrg echo mips-mips-riscos${UNAME_RELEASE} 4410cc67336Smrg exit ;; 442301ea0f4Smrg Motorola:PowerMAX_OS:*:*) 443301ea0f4Smrg echo powerpc-motorola-powermax 4440cc67336Smrg exit ;; 445301ea0f4Smrg Motorola:*:4.3:PL8-*) 446301ea0f4Smrg echo powerpc-harris-powermax 4470cc67336Smrg exit ;; 448301ea0f4Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 449301ea0f4Smrg echo powerpc-harris-powermax 4500cc67336Smrg exit ;; 451301ea0f4Smrg Night_Hawk:Power_UNIX:*:*) 452301ea0f4Smrg echo powerpc-harris-powerunix 4530cc67336Smrg exit ;; 454301ea0f4Smrg m88k:CX/UX:7*:*) 455301ea0f4Smrg echo m88k-harris-cxux7 4560cc67336Smrg exit ;; 457301ea0f4Smrg m88k:*:4*:R4*) 458301ea0f4Smrg echo m88k-motorola-sysv4 4590cc67336Smrg exit ;; 460301ea0f4Smrg m88k:*:3*:R3*) 461301ea0f4Smrg echo m88k-motorola-sysv3 4620cc67336Smrg exit ;; 463301ea0f4Smrg AViiON:dgux:*:*) 464301ea0f4Smrg # DG/UX returns AViiON for all architectures 465301ea0f4Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 466301ea0f4Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 467301ea0f4Smrg then 468301ea0f4Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 469301ea0f4Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 470301ea0f4Smrg then 471301ea0f4Smrg echo m88k-dg-dgux${UNAME_RELEASE} 472301ea0f4Smrg else 473301ea0f4Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 474301ea0f4Smrg fi 475301ea0f4Smrg else 476301ea0f4Smrg echo i586-dg-dgux${UNAME_RELEASE} 477301ea0f4Smrg fi 4780cc67336Smrg exit ;; 479301ea0f4Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 480301ea0f4Smrg echo m88k-dolphin-sysv3 4810cc67336Smrg exit ;; 482301ea0f4Smrg M88*:*:R3*:*) 483301ea0f4Smrg # Delta 88k system running SVR3 484301ea0f4Smrg echo m88k-motorola-sysv3 4850cc67336Smrg exit ;; 486301ea0f4Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 487301ea0f4Smrg echo m88k-tektronix-sysv3 4880cc67336Smrg exit ;; 489301ea0f4Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 490301ea0f4Smrg echo m68k-tektronix-bsd 4910cc67336Smrg exit ;; 492301ea0f4Smrg *:IRIX*:*:*) 493301ea0f4Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 4940cc67336Smrg exit ;; 495301ea0f4Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 4960cc67336Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 4970cc67336Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 498301ea0f4Smrg i*86:AIX:*:*) 499301ea0f4Smrg echo i386-ibm-aix 5000cc67336Smrg exit ;; 501301ea0f4Smrg ia64:AIX:*:*) 502301ea0f4Smrg if [ -x /usr/bin/oslevel ] ; then 503301ea0f4Smrg IBM_REV=`/usr/bin/oslevel` 504301ea0f4Smrg else 505301ea0f4Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 506301ea0f4Smrg fi 507301ea0f4Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 5080cc67336Smrg exit ;; 509301ea0f4Smrg *:AIX:2:3) 510301ea0f4Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 511301ea0f4Smrg eval $set_cc_for_build 512301ea0f4Smrg sed 's/^ //' << EOF >$dummy.c 513301ea0f4Smrg #include <sys/systemcfg.h> 514301ea0f4Smrg 515301ea0f4Smrg main() 516301ea0f4Smrg { 517301ea0f4Smrg if (!__power_pc()) 518301ea0f4Smrg exit(1); 519301ea0f4Smrg puts("powerpc-ibm-aix3.2.5"); 520301ea0f4Smrg exit(0); 521301ea0f4Smrg } 522301ea0f4SmrgEOF 5230cc67336Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 5240cc67336Smrg then 5250cc67336Smrg echo "$SYSTEM_NAME" 5260cc67336Smrg else 5270cc67336Smrg echo rs6000-ibm-aix3.2.5 5280cc67336Smrg fi 529301ea0f4Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 530301ea0f4Smrg echo rs6000-ibm-aix3.2.4 531301ea0f4Smrg else 532301ea0f4Smrg echo rs6000-ibm-aix3.2 533301ea0f4Smrg fi 5340cc67336Smrg exit ;; 5350cc67336Smrg *:AIX:*:[456]) 536301ea0f4Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 537301ea0f4Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 538301ea0f4Smrg IBM_ARCH=rs6000 539301ea0f4Smrg else 540301ea0f4Smrg IBM_ARCH=powerpc 541301ea0f4Smrg fi 542301ea0f4Smrg if [ -x /usr/bin/oslevel ] ; then 543301ea0f4Smrg IBM_REV=`/usr/bin/oslevel` 544301ea0f4Smrg else 545301ea0f4Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 546301ea0f4Smrg fi 547301ea0f4Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 5480cc67336Smrg exit ;; 549301ea0f4Smrg *:AIX:*:*) 550301ea0f4Smrg echo rs6000-ibm-aix 5510cc67336Smrg exit ;; 552301ea0f4Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 553301ea0f4Smrg echo romp-ibm-bsd4.4 5540cc67336Smrg exit ;; 555301ea0f4Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 556301ea0f4Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 5570cc67336Smrg exit ;; # report: romp-ibm BSD 4.3 558301ea0f4Smrg *:BOSX:*:*) 559301ea0f4Smrg echo rs6000-bull-bosx 5600cc67336Smrg exit ;; 561301ea0f4Smrg DPX/2?00:B.O.S.:*:*) 562301ea0f4Smrg echo m68k-bull-sysv3 5630cc67336Smrg exit ;; 564301ea0f4Smrg 9000/[34]??:4.3bsd:1.*:*) 565301ea0f4Smrg echo m68k-hp-bsd 5660cc67336Smrg exit ;; 567301ea0f4Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 568301ea0f4Smrg echo m68k-hp-bsd4.4 5690cc67336Smrg exit ;; 570301ea0f4Smrg 9000/[34678]??:HP-UX:*:*) 571301ea0f4Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 572301ea0f4Smrg case "${UNAME_MACHINE}" in 573301ea0f4Smrg 9000/31? ) HP_ARCH=m68000 ;; 574301ea0f4Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 575301ea0f4Smrg 9000/[678][0-9][0-9]) 576301ea0f4Smrg if [ -x /usr/bin/getconf ]; then 577301ea0f4Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 578301ea0f4Smrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 579301ea0f4Smrg case "${sc_cpu_version}" in 580301ea0f4Smrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 581301ea0f4Smrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 582301ea0f4Smrg 532) # CPU_PA_RISC2_0 583301ea0f4Smrg case "${sc_kernel_bits}" in 584301ea0f4Smrg 32) HP_ARCH="hppa2.0n" ;; 585301ea0f4Smrg 64) HP_ARCH="hppa2.0w" ;; 586301ea0f4Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 587301ea0f4Smrg esac ;; 588301ea0f4Smrg esac 589301ea0f4Smrg fi 590301ea0f4Smrg if [ "${HP_ARCH}" = "" ]; then 591301ea0f4Smrg eval $set_cc_for_build 592301ea0f4Smrg sed 's/^ //' << EOF >$dummy.c 593301ea0f4Smrg 594301ea0f4Smrg #define _HPUX_SOURCE 595301ea0f4Smrg #include <stdlib.h> 596301ea0f4Smrg #include <unistd.h> 597301ea0f4Smrg 598301ea0f4Smrg int main () 599301ea0f4Smrg { 600301ea0f4Smrg #if defined(_SC_KERNEL_BITS) 601301ea0f4Smrg long bits = sysconf(_SC_KERNEL_BITS); 602301ea0f4Smrg #endif 603301ea0f4Smrg long cpu = sysconf (_SC_CPU_VERSION); 604301ea0f4Smrg 605301ea0f4Smrg switch (cpu) 606301ea0f4Smrg { 607301ea0f4Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 608301ea0f4Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 609301ea0f4Smrg case CPU_PA_RISC2_0: 610301ea0f4Smrg #if defined(_SC_KERNEL_BITS) 611301ea0f4Smrg switch (bits) 612301ea0f4Smrg { 613301ea0f4Smrg case 64: puts ("hppa2.0w"); break; 614301ea0f4Smrg case 32: puts ("hppa2.0n"); break; 615301ea0f4Smrg default: puts ("hppa2.0"); break; 616301ea0f4Smrg } break; 617301ea0f4Smrg #else /* !defined(_SC_KERNEL_BITS) */ 618301ea0f4Smrg puts ("hppa2.0"); break; 619301ea0f4Smrg #endif 620301ea0f4Smrg default: puts ("hppa1.0"); break; 621301ea0f4Smrg } 622301ea0f4Smrg exit (0); 623301ea0f4Smrg } 624301ea0f4SmrgEOF 625301ea0f4Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 626301ea0f4Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 627301ea0f4Smrg fi ;; 628301ea0f4Smrg esac 629301ea0f4Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 630301ea0f4Smrg then 6310cc67336Smrg eval $set_cc_for_build 6320cc67336Smrg 6330cc67336Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 6340cc67336Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 6350cc67336Smrg # generating 64-bit code. GNU and HP use different nomenclature: 6360cc67336Smrg # 6370cc67336Smrg # $ CC_FOR_BUILD=cc ./config.guess 6380cc67336Smrg # => hppa2.0w-hp-hpux11.23 6390cc67336Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 6400cc67336Smrg # => hppa64-hp-hpux11.23 6410cc67336Smrg 6420cc67336Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 6430cc67336Smrg grep __LP64__ >/dev/null 644301ea0f4Smrg then 645301ea0f4Smrg HP_ARCH="hppa2.0w" 646301ea0f4Smrg else 647301ea0f4Smrg HP_ARCH="hppa64" 648301ea0f4Smrg fi 649301ea0f4Smrg fi 650301ea0f4Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 6510cc67336Smrg exit ;; 652301ea0f4Smrg ia64:HP-UX:*:*) 653301ea0f4Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 654301ea0f4Smrg echo ia64-hp-hpux${HPUX_REV} 6550cc67336Smrg exit ;; 656301ea0f4Smrg 3050*:HI-UX:*:*) 657301ea0f4Smrg eval $set_cc_for_build 658301ea0f4Smrg sed 's/^ //' << EOF >$dummy.c 659301ea0f4Smrg #include <unistd.h> 660301ea0f4Smrg int 661301ea0f4Smrg main () 662301ea0f4Smrg { 663301ea0f4Smrg long cpu = sysconf (_SC_CPU_VERSION); 664301ea0f4Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 665301ea0f4Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 666301ea0f4Smrg results, however. */ 667301ea0f4Smrg if (CPU_IS_PA_RISC (cpu)) 668301ea0f4Smrg { 669301ea0f4Smrg switch (cpu) 670301ea0f4Smrg { 671301ea0f4Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 672301ea0f4Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 673301ea0f4Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 674301ea0f4Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 675301ea0f4Smrg } 676301ea0f4Smrg } 677301ea0f4Smrg else if (CPU_IS_HP_MC68K (cpu)) 678301ea0f4Smrg puts ("m68k-hitachi-hiuxwe2"); 679301ea0f4Smrg else puts ("unknown-hitachi-hiuxwe2"); 680301ea0f4Smrg exit (0); 681301ea0f4Smrg } 682301ea0f4SmrgEOF 6830cc67336Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 6840cc67336Smrg { echo "$SYSTEM_NAME"; exit; } 685301ea0f4Smrg echo unknown-hitachi-hiuxwe2 6860cc67336Smrg exit ;; 687301ea0f4Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 688301ea0f4Smrg echo hppa1.1-hp-bsd 6890cc67336Smrg exit ;; 690301ea0f4Smrg 9000/8??:4.3bsd:*:*) 691301ea0f4Smrg echo hppa1.0-hp-bsd 6920cc67336Smrg exit ;; 693301ea0f4Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 694301ea0f4Smrg echo hppa1.0-hp-mpeix 6950cc67336Smrg exit ;; 696301ea0f4Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 697301ea0f4Smrg echo hppa1.1-hp-osf 6980cc67336Smrg exit ;; 699301ea0f4Smrg hp8??:OSF1:*:*) 700301ea0f4Smrg echo hppa1.0-hp-osf 7010cc67336Smrg exit ;; 702301ea0f4Smrg i*86:OSF1:*:*) 703301ea0f4Smrg if [ -x /usr/sbin/sysversion ] ; then 704301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 705301ea0f4Smrg else 706301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-osf1 707301ea0f4Smrg fi 7080cc67336Smrg exit ;; 709301ea0f4Smrg parisc*:Lites*:*:*) 710301ea0f4Smrg echo hppa1.1-hp-lites 7110cc67336Smrg exit ;; 712301ea0f4Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 713301ea0f4Smrg echo c1-convex-bsd 7140cc67336Smrg exit ;; 715301ea0f4Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 716301ea0f4Smrg if getsysinfo -f scalar_acc 717301ea0f4Smrg then echo c32-convex-bsd 718301ea0f4Smrg else echo c2-convex-bsd 719301ea0f4Smrg fi 7200cc67336Smrg exit ;; 721301ea0f4Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 722301ea0f4Smrg echo c34-convex-bsd 7230cc67336Smrg exit ;; 724301ea0f4Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 725301ea0f4Smrg echo c38-convex-bsd 7260cc67336Smrg exit ;; 727301ea0f4Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 728301ea0f4Smrg echo c4-convex-bsd 7290cc67336Smrg exit ;; 730301ea0f4Smrg CRAY*Y-MP:*:*:*) 731301ea0f4Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7320cc67336Smrg exit ;; 733301ea0f4Smrg CRAY*[A-Z]90:*:*:*) 734301ea0f4Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 735301ea0f4Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 736301ea0f4Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 737301ea0f4Smrg -e 's/\.[^.]*$/.X/' 7380cc67336Smrg exit ;; 739301ea0f4Smrg CRAY*TS:*:*:*) 740301ea0f4Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7410cc67336Smrg exit ;; 742301ea0f4Smrg CRAY*T3E:*:*:*) 743301ea0f4Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7440cc67336Smrg exit ;; 745301ea0f4Smrg CRAY*SV1:*:*:*) 746301ea0f4Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7470cc67336Smrg exit ;; 748301ea0f4Smrg *:UNICOS/mp:*:*) 7490cc67336Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7500cc67336Smrg exit ;; 751301ea0f4Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 752301ea0f4Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 753301ea0f4Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 754301ea0f4Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 755301ea0f4Smrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 7560cc67336Smrg exit ;; 7570cc67336Smrg 5000:UNIX_System_V:4.*:*) 7580cc67336Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 7590cc67336Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 7600cc67336Smrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 7610cc67336Smrg exit ;; 762301ea0f4Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 763301ea0f4Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 7640cc67336Smrg exit ;; 765301ea0f4Smrg sparc*:BSD/OS:*:*) 766301ea0f4Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 7670cc67336Smrg exit ;; 768301ea0f4Smrg *:BSD/OS:*:*) 769301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 7700cc67336Smrg exit ;; 7710cc67336Smrg *:FreeBSD:*:*) 7720cc67336Smrg case ${UNAME_MACHINE} in 7730cc67336Smrg pc98) 7740cc67336Smrg echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 7750cc67336Smrg amd64) 7760cc67336Smrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 7770cc67336Smrg *) 7780cc67336Smrg echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 7790cc67336Smrg esac 7800cc67336Smrg exit ;; 781301ea0f4Smrg i*:CYGWIN*:*) 782301ea0f4Smrg echo ${UNAME_MACHINE}-pc-cygwin 7830cc67336Smrg exit ;; 7840cc67336Smrg *:MINGW*:*) 785301ea0f4Smrg echo ${UNAME_MACHINE}-pc-mingw32 7860cc67336Smrg exit ;; 7870cc67336Smrg i*:windows32*:*) 7880cc67336Smrg # uname -m includes "-pc" on this system. 7890cc67336Smrg echo ${UNAME_MACHINE}-mingw32 7900cc67336Smrg exit ;; 791301ea0f4Smrg i*:PW*:*) 792301ea0f4Smrg echo ${UNAME_MACHINE}-pc-pw32 7930cc67336Smrg exit ;; 7940cc67336Smrg *:Interix*:[3456]*) 7950cc67336Smrg case ${UNAME_MACHINE} in 7960cc67336Smrg x86) 7970cc67336Smrg echo i586-pc-interix${UNAME_RELEASE} 7980cc67336Smrg exit ;; 7990cc67336Smrg EM64T | authenticamd) 8000cc67336Smrg echo x86_64-unknown-interix${UNAME_RELEASE} 8010cc67336Smrg exit ;; 8020cc67336Smrg IA64) 8030cc67336Smrg echo ia64-unknown-interix${UNAME_RELEASE} 8040cc67336Smrg exit ;; 8050cc67336Smrg esac ;; 806301ea0f4Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 807301ea0f4Smrg echo i${UNAME_MACHINE}-pc-mks 8080cc67336Smrg exit ;; 809301ea0f4Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 810301ea0f4Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 811301ea0f4Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 812301ea0f4Smrg # UNAME_MACHINE based on the output of uname instead of i386? 813301ea0f4Smrg echo i586-pc-interix 8140cc67336Smrg exit ;; 815301ea0f4Smrg i*:UWIN*:*) 816301ea0f4Smrg echo ${UNAME_MACHINE}-pc-uwin 8170cc67336Smrg exit ;; 8180cc67336Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 8190cc67336Smrg echo x86_64-unknown-cygwin 8200cc67336Smrg exit ;; 821301ea0f4Smrg p*:CYGWIN*:*) 822301ea0f4Smrg echo powerpcle-unknown-cygwin 8230cc67336Smrg exit ;; 824301ea0f4Smrg prep*:SunOS:5.*:*) 825301ea0f4Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 8260cc67336Smrg exit ;; 827301ea0f4Smrg *:GNU:*:*) 8280cc67336Smrg # the GNU system 829301ea0f4Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 8300cc67336Smrg exit ;; 8310cc67336Smrg *:GNU/*:*:*) 8320cc67336Smrg # other systems with GNU libc and userland 8330cc67336Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 8340cc67336Smrg exit ;; 835301ea0f4Smrg i*86:Minix:*:*) 836301ea0f4Smrg echo ${UNAME_MACHINE}-pc-minix 8370cc67336Smrg exit ;; 838301ea0f4Smrg arm*:Linux:*:*) 8390cc67336Smrg eval $set_cc_for_build 8400cc67336Smrg if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 8410cc67336Smrg | grep -q __ARM_EABI__ 8420cc67336Smrg then 8430cc67336Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8440cc67336Smrg else 8450cc67336Smrg echo ${UNAME_MACHINE}-unknown-linux-gnueabi 8460cc67336Smrg fi 8470cc67336Smrg exit ;; 8480cc67336Smrg avr32*:Linux:*:*) 849301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8500cc67336Smrg exit ;; 851301ea0f4Smrg cris:Linux:*:*) 852301ea0f4Smrg echo cris-axis-linux-gnu 8530cc67336Smrg exit ;; 8540cc67336Smrg crisv32:Linux:*:*) 8550cc67336Smrg echo crisv32-axis-linux-gnu 8560cc67336Smrg exit ;; 8570cc67336Smrg frv:Linux:*:*) 8580cc67336Smrg echo frv-unknown-linux-gnu 8590cc67336Smrg exit ;; 860301ea0f4Smrg ia64:Linux:*:*) 8610cc67336Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8620cc67336Smrg exit ;; 8630cc67336Smrg m32r*:Linux:*:*) 8640cc67336Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8650cc67336Smrg exit ;; 866301ea0f4Smrg m68*:Linux:*:*) 867301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8680cc67336Smrg exit ;; 869301ea0f4Smrg mips:Linux:*:*) 870301ea0f4Smrg eval $set_cc_for_build 871301ea0f4Smrg sed 's/^ //' << EOF >$dummy.c 872301ea0f4Smrg #undef CPU 873301ea0f4Smrg #undef mips 874301ea0f4Smrg #undef mipsel 875301ea0f4Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 876301ea0f4Smrg CPU=mipsel 877301ea0f4Smrg #else 878301ea0f4Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 879301ea0f4Smrg CPU=mips 880301ea0f4Smrg #else 881301ea0f4Smrg CPU= 882301ea0f4Smrg #endif 883301ea0f4Smrg #endif 884301ea0f4SmrgEOF 8850cc67336Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 8860cc67336Smrg /^CPU/{ 8870cc67336Smrg s: ::g 8880cc67336Smrg p 8890cc67336Smrg }'`" 8900cc67336Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 891301ea0f4Smrg ;; 892301ea0f4Smrg mips64:Linux:*:*) 893301ea0f4Smrg eval $set_cc_for_build 894301ea0f4Smrg sed 's/^ //' << EOF >$dummy.c 895301ea0f4Smrg #undef CPU 896301ea0f4Smrg #undef mips64 897301ea0f4Smrg #undef mips64el 898301ea0f4Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 899301ea0f4Smrg CPU=mips64el 900301ea0f4Smrg #else 901301ea0f4Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 902301ea0f4Smrg CPU=mips64 903301ea0f4Smrg #else 904301ea0f4Smrg CPU= 905301ea0f4Smrg #endif 906301ea0f4Smrg #endif 907301ea0f4SmrgEOF 9080cc67336Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 9090cc67336Smrg /^CPU/{ 9100cc67336Smrg s: ::g 9110cc67336Smrg p 9120cc67336Smrg }'`" 9130cc67336Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 914301ea0f4Smrg ;; 9150cc67336Smrg or32:Linux:*:*) 9160cc67336Smrg echo or32-unknown-linux-gnu 9170cc67336Smrg exit ;; 918301ea0f4Smrg ppc:Linux:*:*) 9190cc67336Smrg echo powerpc-unknown-linux-gnu 9200cc67336Smrg exit ;; 921301ea0f4Smrg ppc64:Linux:*:*) 9220cc67336Smrg echo powerpc64-unknown-linux-gnu 9230cc67336Smrg exit ;; 924301ea0f4Smrg alpha:Linux:*:*) 925301ea0f4Smrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 926301ea0f4Smrg EV5) UNAME_MACHINE=alphaev5 ;; 927301ea0f4Smrg EV56) UNAME_MACHINE=alphaev56 ;; 928301ea0f4Smrg PCA56) UNAME_MACHINE=alphapca56 ;; 929301ea0f4Smrg PCA57) UNAME_MACHINE=alphapca56 ;; 930301ea0f4Smrg EV6) UNAME_MACHINE=alphaev6 ;; 931301ea0f4Smrg EV67) UNAME_MACHINE=alphaev67 ;; 932301ea0f4Smrg EV68*) UNAME_MACHINE=alphaev68 ;; 933301ea0f4Smrg esac 934301ea0f4Smrg objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 935301ea0f4Smrg if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 936301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 9370cc67336Smrg exit ;; 938301ea0f4Smrg parisc:Linux:*:* | hppa:Linux:*:*) 939301ea0f4Smrg # Look for CPU level 940301ea0f4Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 941301ea0f4Smrg PA7*) echo hppa1.1-unknown-linux-gnu ;; 942301ea0f4Smrg PA8*) echo hppa2.0-unknown-linux-gnu ;; 943301ea0f4Smrg *) echo hppa-unknown-linux-gnu ;; 944301ea0f4Smrg esac 9450cc67336Smrg exit ;; 946301ea0f4Smrg parisc64:Linux:*:* | hppa64:Linux:*:*) 947301ea0f4Smrg echo hppa64-unknown-linux-gnu 9480cc67336Smrg exit ;; 949301ea0f4Smrg s390:Linux:*:* | s390x:Linux:*:*) 9500cc67336Smrg echo ${UNAME_MACHINE}-ibm-linux 9510cc67336Smrg exit ;; 952301ea0f4Smrg sh64*:Linux:*:*) 953301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9540cc67336Smrg exit ;; 955301ea0f4Smrg sh*:Linux:*:*) 956301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9570cc67336Smrg exit ;; 958301ea0f4Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 959301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9600cc67336Smrg exit ;; 9610cc67336Smrg vax:Linux:*:*) 9620cc67336Smrg echo ${UNAME_MACHINE}-dec-linux-gnu 9630cc67336Smrg exit ;; 964301ea0f4Smrg x86_64:Linux:*:*) 9650cc67336Smrg echo x86_64-unknown-linux-gnu 9660cc67336Smrg exit ;; 9670cc67336Smrg xtensa*:Linux:*:*) 9680cc67336Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9690cc67336Smrg exit ;; 970301ea0f4Smrg i*86:Linux:*:*) 971301ea0f4Smrg # The BFD linker knows what the default object file format is, so 972301ea0f4Smrg # first see if it will tell us. cd to the root directory to prevent 973301ea0f4Smrg # problems with other programs or directories called `ld' in the path. 974301ea0f4Smrg # Set LC_ALL=C to ensure ld outputs messages in English. 975301ea0f4Smrg ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ 976301ea0f4Smrg | sed -ne '/supported targets:/!d 977301ea0f4Smrg s/[ ][ ]*/ /g 978301ea0f4Smrg s/.*supported targets: *// 979301ea0f4Smrg s/ .*// 980301ea0f4Smrg p'` 981301ea0f4Smrg case "$ld_supported_targets" in 982301ea0f4Smrg elf32-i386) 983301ea0f4Smrg TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 984301ea0f4Smrg ;; 985301ea0f4Smrg a.out-i386-linux) 986301ea0f4Smrg echo "${UNAME_MACHINE}-pc-linux-gnuaout" 9870cc67336Smrg exit ;; 988301ea0f4Smrg coff-i386) 989301ea0f4Smrg echo "${UNAME_MACHINE}-pc-linux-gnucoff" 9900cc67336Smrg exit ;; 991301ea0f4Smrg "") 992301ea0f4Smrg # Either a pre-BFD a.out linker (linux-gnuoldld) or 993301ea0f4Smrg # one that does not give us useful --help. 994301ea0f4Smrg echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 9950cc67336Smrg exit ;; 996301ea0f4Smrg esac 997301ea0f4Smrg # Determine whether the default compiler is a.out or elf 998301ea0f4Smrg eval $set_cc_for_build 999301ea0f4Smrg sed 's/^ //' << EOF >$dummy.c 1000301ea0f4Smrg #include <features.h> 1001301ea0f4Smrg #ifdef __ELF__ 1002301ea0f4Smrg # ifdef __GLIBC__ 1003301ea0f4Smrg # if __GLIBC__ >= 2 1004301ea0f4Smrg LIBC=gnu 1005301ea0f4Smrg # else 1006301ea0f4Smrg LIBC=gnulibc1 1007301ea0f4Smrg # endif 1008301ea0f4Smrg # else 1009301ea0f4Smrg LIBC=gnulibc1 1010301ea0f4Smrg # endif 1011301ea0f4Smrg #else 10120cc67336Smrg #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) 1013301ea0f4Smrg LIBC=gnu 1014301ea0f4Smrg #else 1015301ea0f4Smrg LIBC=gnuaout 1016301ea0f4Smrg #endif 1017301ea0f4Smrg #endif 10180cc67336Smrg #ifdef __dietlibc__ 10190cc67336Smrg LIBC=dietlibc 10200cc67336Smrg #endif 1021301ea0f4SmrgEOF 10220cc67336Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 10230cc67336Smrg /^LIBC/{ 10240cc67336Smrg s: ::g 10250cc67336Smrg p 10260cc67336Smrg }'`" 10270cc67336Smrg test x"${LIBC}" != x && { 10280cc67336Smrg echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 10290cc67336Smrg exit 10300cc67336Smrg } 10310cc67336Smrg test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } 1032301ea0f4Smrg ;; 1033301ea0f4Smrg i*86:DYNIX/ptx:4*:*) 1034301ea0f4Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1035301ea0f4Smrg # earlier versions are messed up and put the nodename in both 1036301ea0f4Smrg # sysname and nodename. 1037301ea0f4Smrg echo i386-sequent-sysv4 10380cc67336Smrg exit ;; 1039301ea0f4Smrg i*86:UNIX_SV:4.2MP:2.*) 1040301ea0f4Smrg # Unixware is an offshoot of SVR4, but it has its own version 1041301ea0f4Smrg # number series starting with 2... 1042301ea0f4Smrg # I am not positive that other SVR4 systems won't match this, 1043301ea0f4Smrg # I just have to hope. -- rms. 1044301ea0f4Smrg # Use sysv4.2uw... so that sysv4* matches it. 1045301ea0f4Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 10460cc67336Smrg exit ;; 1047301ea0f4Smrg i*86:OS/2:*:*) 1048301ea0f4Smrg # If we were able to find `uname', then EMX Unix compatibility 1049301ea0f4Smrg # is probably installed. 1050301ea0f4Smrg echo ${UNAME_MACHINE}-pc-os2-emx 10510cc67336Smrg exit ;; 1052301ea0f4Smrg i*86:XTS-300:*:STOP) 1053301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-stop 10540cc67336Smrg exit ;; 1055301ea0f4Smrg i*86:atheos:*:*) 1056301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-atheos 10570cc67336Smrg exit ;; 10580cc67336Smrg i*86:syllable:*:*) 10590cc67336Smrg echo ${UNAME_MACHINE}-pc-syllable 10600cc67336Smrg exit ;; 1061301ea0f4Smrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 1062301ea0f4Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 10630cc67336Smrg exit ;; 1064301ea0f4Smrg i*86:*DOS:*:*) 1065301ea0f4Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 10660cc67336Smrg exit ;; 1067301ea0f4Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1068301ea0f4Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1069301ea0f4Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1070301ea0f4Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 1071301ea0f4Smrg else 1072301ea0f4Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1073301ea0f4Smrg fi 10740cc67336Smrg exit ;; 10750cc67336Smrg i*86:*:5:[678]*) 10760cc67336Smrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 1077301ea0f4Smrg case `/bin/uname -X | grep "^Machine"` in 1078301ea0f4Smrg *486*) UNAME_MACHINE=i486 ;; 1079301ea0f4Smrg *Pentium) UNAME_MACHINE=i586 ;; 1080301ea0f4Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1081301ea0f4Smrg esac 1082301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 10830cc67336Smrg exit ;; 1084301ea0f4Smrg i*86:*:3.2:*) 1085301ea0f4Smrg if test -f /usr/options/cb.name; then 1086301ea0f4Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1087301ea0f4Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 1088301ea0f4Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 1089301ea0f4Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1090301ea0f4Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1091301ea0f4Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 1092301ea0f4Smrg && UNAME_MACHINE=i586 1093301ea0f4Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1094301ea0f4Smrg && UNAME_MACHINE=i686 1095301ea0f4Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1096301ea0f4Smrg && UNAME_MACHINE=i686 1097301ea0f4Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 1098301ea0f4Smrg else 1099301ea0f4Smrg echo ${UNAME_MACHINE}-pc-sysv32 1100301ea0f4Smrg fi 11010cc67336Smrg exit ;; 1102301ea0f4Smrg pc:*:*:*) 1103301ea0f4Smrg # Left here for compatibility: 1104301ea0f4Smrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 1105301ea0f4Smrg # the processor, so we play safe by assuming i386. 1106301ea0f4Smrg echo i386-pc-msdosdjgpp 11070cc67336Smrg exit ;; 1108301ea0f4Smrg Intel:Mach:3*:*) 1109301ea0f4Smrg echo i386-pc-mach3 11100cc67336Smrg exit ;; 1111301ea0f4Smrg paragon:*:*:*) 1112301ea0f4Smrg echo i860-intel-osf1 11130cc67336Smrg exit ;; 1114301ea0f4Smrg i860:*:4.*:*) # i860-SVR4 1115301ea0f4Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1116301ea0f4Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1117301ea0f4Smrg else # Add other i860-SVR4 vendors below as they are discovered. 1118301ea0f4Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1119301ea0f4Smrg fi 11200cc67336Smrg exit ;; 1121301ea0f4Smrg mini*:CTIX:SYS*5:*) 1122301ea0f4Smrg # "miniframe" 1123301ea0f4Smrg echo m68010-convergent-sysv 11240cc67336Smrg exit ;; 1125301ea0f4Smrg mc68k:UNIX:SYSTEM5:3.51m) 1126301ea0f4Smrg echo m68k-convergent-sysv 11270cc67336Smrg exit ;; 1128301ea0f4Smrg M680?0:D-NIX:5.3:*) 1129301ea0f4Smrg echo m68k-diab-dnix 11300cc67336Smrg exit ;; 11310cc67336Smrg M68*:*:R3V[5678]*:*) 11320cc67336Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 11330cc67336Smrg 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) 1134301ea0f4Smrg OS_REL='' 1135301ea0f4Smrg test -r /etc/.relid \ 1136301ea0f4Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1137301ea0f4Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 11380cc67336Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1139301ea0f4Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 11400cc67336Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1141301ea0f4Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1142301ea0f4Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 11430cc67336Smrg && { echo i486-ncr-sysv4; exit; } ;; 1144301ea0f4Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1145301ea0f4Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 11460cc67336Smrg exit ;; 1147301ea0f4Smrg mc68030:UNIX_System_V:4.*:*) 1148301ea0f4Smrg echo m68k-atari-sysv4 11490cc67336Smrg exit ;; 1150301ea0f4Smrg TSUNAMI:LynxOS:2.*:*) 1151301ea0f4Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 11520cc67336Smrg exit ;; 1153301ea0f4Smrg rs6000:LynxOS:2.*:*) 1154301ea0f4Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 11550cc67336Smrg exit ;; 1156301ea0f4Smrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1157301ea0f4Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 11580cc67336Smrg exit ;; 1159301ea0f4Smrg SM[BE]S:UNIX_SV:*:*) 1160301ea0f4Smrg echo mips-dde-sysv${UNAME_RELEASE} 11610cc67336Smrg exit ;; 1162301ea0f4Smrg RM*:ReliantUNIX-*:*:*) 1163301ea0f4Smrg echo mips-sni-sysv4 11640cc67336Smrg exit ;; 1165301ea0f4Smrg RM*:SINIX-*:*:*) 1166301ea0f4Smrg echo mips-sni-sysv4 11670cc67336Smrg exit ;; 1168301ea0f4Smrg *:SINIX-*:*:*) 1169301ea0f4Smrg if uname -p 2>/dev/null >/dev/null ; then 1170301ea0f4Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 1171301ea0f4Smrg echo ${UNAME_MACHINE}-sni-sysv4 1172301ea0f4Smrg else 1173301ea0f4Smrg echo ns32k-sni-sysv 1174301ea0f4Smrg fi 11750cc67336Smrg exit ;; 1176301ea0f4Smrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1177301ea0f4Smrg # says <Richard.M.Bartel@ccMail.Census.GOV> 1178301ea0f4Smrg echo i586-unisys-sysv4 11790cc67336Smrg exit ;; 1180301ea0f4Smrg *:UNIX_System_V:4*:FTX*) 1181301ea0f4Smrg # From Gerald Hewes <hewes@openmarket.com>. 1182301ea0f4Smrg # How about differentiating between stratus architectures? -djm 1183301ea0f4Smrg echo hppa1.1-stratus-sysv4 11840cc67336Smrg exit ;; 1185301ea0f4Smrg *:*:*:FTX*) 1186301ea0f4Smrg # From seanf@swdc.stratus.com. 1187301ea0f4Smrg echo i860-stratus-sysv4 11880cc67336Smrg exit ;; 11890cc67336Smrg i*86:VOS:*:*) 11900cc67336Smrg # From Paul.Green@stratus.com. 11910cc67336Smrg echo ${UNAME_MACHINE}-stratus-vos 11920cc67336Smrg exit ;; 1193301ea0f4Smrg *:VOS:*:*) 1194301ea0f4Smrg # From Paul.Green@stratus.com. 1195301ea0f4Smrg echo hppa1.1-stratus-vos 11960cc67336Smrg exit ;; 1197301ea0f4Smrg mc68*:A/UX:*:*) 1198301ea0f4Smrg echo m68k-apple-aux${UNAME_RELEASE} 11990cc67336Smrg exit ;; 1200301ea0f4Smrg news*:NEWS-OS:6*:*) 1201301ea0f4Smrg echo mips-sony-newsos6 12020cc67336Smrg exit ;; 1203301ea0f4Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1204301ea0f4Smrg if [ -d /usr/nec ]; then 1205301ea0f4Smrg echo mips-nec-sysv${UNAME_RELEASE} 1206301ea0f4Smrg else 1207301ea0f4Smrg echo mips-unknown-sysv${UNAME_RELEASE} 1208301ea0f4Smrg fi 12090cc67336Smrg exit ;; 1210301ea0f4Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1211301ea0f4Smrg echo powerpc-be-beos 12120cc67336Smrg exit ;; 1213301ea0f4Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1214301ea0f4Smrg echo powerpc-apple-beos 12150cc67336Smrg exit ;; 1216301ea0f4Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1217301ea0f4Smrg echo i586-pc-beos 12180cc67336Smrg exit ;; 1219301ea0f4Smrg SX-4:SUPER-UX:*:*) 1220301ea0f4Smrg echo sx4-nec-superux${UNAME_RELEASE} 12210cc67336Smrg exit ;; 1222301ea0f4Smrg SX-5:SUPER-UX:*:*) 1223301ea0f4Smrg echo sx5-nec-superux${UNAME_RELEASE} 12240cc67336Smrg exit ;; 1225301ea0f4Smrg SX-6:SUPER-UX:*:*) 1226301ea0f4Smrg echo sx6-nec-superux${UNAME_RELEASE} 12270cc67336Smrg exit ;; 12280cc67336Smrg SX-7:SUPER-UX:*:*) 12290cc67336Smrg echo sx7-nec-superux${UNAME_RELEASE} 12300cc67336Smrg exit ;; 12310cc67336Smrg SX-8:SUPER-UX:*:*) 12320cc67336Smrg echo sx8-nec-superux${UNAME_RELEASE} 12330cc67336Smrg exit ;; 12340cc67336Smrg SX-8R:SUPER-UX:*:*) 12350cc67336Smrg echo sx8r-nec-superux${UNAME_RELEASE} 12360cc67336Smrg exit ;; 1237301ea0f4Smrg Power*:Rhapsody:*:*) 1238301ea0f4Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 12390cc67336Smrg exit ;; 1240301ea0f4Smrg *:Rhapsody:*:*) 1241301ea0f4Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 12420cc67336Smrg exit ;; 1243301ea0f4Smrg *:Darwin:*:*) 12440cc67336Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 12450cc67336Smrg case $UNAME_PROCESSOR in 12460cc67336Smrg unknown) UNAME_PROCESSOR=powerpc ;; 1247301ea0f4Smrg esac 1248301ea0f4Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 12490cc67336Smrg exit ;; 1250301ea0f4Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 1251301ea0f4Smrg UNAME_PROCESSOR=`uname -p` 1252301ea0f4Smrg if test "$UNAME_PROCESSOR" = "x86"; then 1253301ea0f4Smrg UNAME_PROCESSOR=i386 1254301ea0f4Smrg UNAME_MACHINE=pc 1255301ea0f4Smrg fi 1256301ea0f4Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 12570cc67336Smrg exit ;; 1258301ea0f4Smrg *:QNX:*:4*) 1259301ea0f4Smrg echo i386-pc-qnx 12600cc67336Smrg exit ;; 12610cc67336Smrg NSE-?:NONSTOP_KERNEL:*:*) 12620cc67336Smrg echo nse-tandem-nsk${UNAME_RELEASE} 12630cc67336Smrg exit ;; 12640cc67336Smrg NSR-?:NONSTOP_KERNEL:*:*) 1265301ea0f4Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 12660cc67336Smrg exit ;; 1267301ea0f4Smrg *:NonStop-UX:*:*) 1268301ea0f4Smrg echo mips-compaq-nonstopux 12690cc67336Smrg exit ;; 1270301ea0f4Smrg BS2000:POSIX*:*:*) 1271301ea0f4Smrg echo bs2000-siemens-sysv 12720cc67336Smrg exit ;; 1273301ea0f4Smrg DS/*:UNIX_System_V:*:*) 1274301ea0f4Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 12750cc67336Smrg exit ;; 1276301ea0f4Smrg *:Plan9:*:*) 1277301ea0f4Smrg # "uname -m" is not consistent, so use $cputype instead. 386 1278301ea0f4Smrg # is converted to i386 for consistency with other x86 1279301ea0f4Smrg # operating systems. 1280301ea0f4Smrg if test "$cputype" = "386"; then 1281301ea0f4Smrg UNAME_MACHINE=i386 1282301ea0f4Smrg else 1283301ea0f4Smrg UNAME_MACHINE="$cputype" 1284301ea0f4Smrg fi 1285301ea0f4Smrg echo ${UNAME_MACHINE}-unknown-plan9 12860cc67336Smrg exit ;; 1287301ea0f4Smrg *:TOPS-10:*:*) 1288301ea0f4Smrg echo pdp10-unknown-tops10 12890cc67336Smrg exit ;; 1290301ea0f4Smrg *:TENEX:*:*) 1291301ea0f4Smrg echo pdp10-unknown-tenex 12920cc67336Smrg exit ;; 1293301ea0f4Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1294301ea0f4Smrg echo pdp10-dec-tops20 12950cc67336Smrg exit ;; 1296301ea0f4Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1297301ea0f4Smrg echo pdp10-xkl-tops20 12980cc67336Smrg exit ;; 1299301ea0f4Smrg *:TOPS-20:*:*) 1300301ea0f4Smrg echo pdp10-unknown-tops20 13010cc67336Smrg exit ;; 1302301ea0f4Smrg *:ITS:*:*) 1303301ea0f4Smrg echo pdp10-unknown-its 13040cc67336Smrg exit ;; 1305301ea0f4Smrg SEI:*:*:SEIUX) 1306301ea0f4Smrg echo mips-sei-seiux${UNAME_RELEASE} 13070cc67336Smrg exit ;; 13080cc67336Smrg *:DragonFly:*:*) 13090cc67336Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 13100cc67336Smrg exit ;; 13110cc67336Smrg *:*VMS:*:*) 13120cc67336Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 13130cc67336Smrg case "${UNAME_MACHINE}" in 13140cc67336Smrg A*) echo alpha-dec-vms ; exit ;; 13150cc67336Smrg I*) echo ia64-dec-vms ; exit ;; 13160cc67336Smrg V*) echo vax-dec-vms ; exit ;; 13170cc67336Smrg esac ;; 13180cc67336Smrg *:XENIX:*:SysV) 13190cc67336Smrg echo i386-pc-xenix 13200cc67336Smrg exit ;; 13210cc67336Smrg i*86:skyos:*:*) 13220cc67336Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 13230cc67336Smrg exit ;; 13240cc67336Smrg i*86:rdos:*:*) 13250cc67336Smrg echo ${UNAME_MACHINE}-pc-rdos 13260cc67336Smrg exit ;; 1327301ea0f4Smrgesac 1328301ea0f4Smrg 1329301ea0f4Smrg#echo '(No uname command or uname output not recognized.)' 1>&2 1330301ea0f4Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 1331301ea0f4Smrg 1332301ea0f4Smrgeval $set_cc_for_build 1333301ea0f4Smrgcat >$dummy.c <<EOF 1334301ea0f4Smrg#ifdef _SEQUENT_ 1335301ea0f4Smrg# include <sys/types.h> 1336301ea0f4Smrg# include <sys/utsname.h> 1337301ea0f4Smrg#endif 1338301ea0f4Smrgmain () 1339301ea0f4Smrg{ 1340301ea0f4Smrg#if defined (sony) 1341301ea0f4Smrg#if defined (MIPSEB) 1342301ea0f4Smrg /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 1343301ea0f4Smrg I don't know.... */ 1344301ea0f4Smrg printf ("mips-sony-bsd\n"); exit (0); 1345301ea0f4Smrg#else 1346301ea0f4Smrg#include <sys/param.h> 1347301ea0f4Smrg printf ("m68k-sony-newsos%s\n", 1348301ea0f4Smrg#ifdef NEWSOS4 1349301ea0f4Smrg "4" 1350301ea0f4Smrg#else 1351301ea0f4Smrg "" 1352301ea0f4Smrg#endif 1353301ea0f4Smrg ); exit (0); 1354301ea0f4Smrg#endif 1355301ea0f4Smrg#endif 1356301ea0f4Smrg 1357301ea0f4Smrg#if defined (__arm) && defined (__acorn) && defined (__unix) 13580cc67336Smrg printf ("arm-acorn-riscix\n"); exit (0); 1359301ea0f4Smrg#endif 1360301ea0f4Smrg 1361301ea0f4Smrg#if defined (hp300) && !defined (hpux) 1362301ea0f4Smrg printf ("m68k-hp-bsd\n"); exit (0); 1363301ea0f4Smrg#endif 1364301ea0f4Smrg 1365301ea0f4Smrg#if defined (NeXT) 1366301ea0f4Smrg#if !defined (__ARCHITECTURE__) 1367301ea0f4Smrg#define __ARCHITECTURE__ "m68k" 1368301ea0f4Smrg#endif 1369301ea0f4Smrg int version; 1370301ea0f4Smrg version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 1371301ea0f4Smrg if (version < 4) 1372301ea0f4Smrg printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1373301ea0f4Smrg else 1374301ea0f4Smrg printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 1375301ea0f4Smrg exit (0); 1376301ea0f4Smrg#endif 1377301ea0f4Smrg 1378301ea0f4Smrg#if defined (MULTIMAX) || defined (n16) 1379301ea0f4Smrg#if defined (UMAXV) 1380301ea0f4Smrg printf ("ns32k-encore-sysv\n"); exit (0); 1381301ea0f4Smrg#else 1382301ea0f4Smrg#if defined (CMU) 1383301ea0f4Smrg printf ("ns32k-encore-mach\n"); exit (0); 1384301ea0f4Smrg#else 1385301ea0f4Smrg printf ("ns32k-encore-bsd\n"); exit (0); 1386301ea0f4Smrg#endif 1387301ea0f4Smrg#endif 1388301ea0f4Smrg#endif 1389301ea0f4Smrg 1390301ea0f4Smrg#if defined (__386BSD__) 1391301ea0f4Smrg printf ("i386-pc-bsd\n"); exit (0); 1392301ea0f4Smrg#endif 1393301ea0f4Smrg 1394301ea0f4Smrg#if defined (sequent) 1395301ea0f4Smrg#if defined (i386) 1396301ea0f4Smrg printf ("i386-sequent-dynix\n"); exit (0); 1397301ea0f4Smrg#endif 1398301ea0f4Smrg#if defined (ns32000) 1399301ea0f4Smrg printf ("ns32k-sequent-dynix\n"); exit (0); 1400301ea0f4Smrg#endif 1401301ea0f4Smrg#endif 1402301ea0f4Smrg 1403301ea0f4Smrg#if defined (_SEQUENT_) 1404301ea0f4Smrg struct utsname un; 1405301ea0f4Smrg 1406301ea0f4Smrg uname(&un); 1407301ea0f4Smrg 1408301ea0f4Smrg if (strncmp(un.version, "V2", 2) == 0) { 1409301ea0f4Smrg printf ("i386-sequent-ptx2\n"); exit (0); 1410301ea0f4Smrg } 1411301ea0f4Smrg if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 1412301ea0f4Smrg printf ("i386-sequent-ptx1\n"); exit (0); 1413301ea0f4Smrg } 1414301ea0f4Smrg printf ("i386-sequent-ptx\n"); exit (0); 1415301ea0f4Smrg 1416301ea0f4Smrg#endif 1417301ea0f4Smrg 1418301ea0f4Smrg#if defined (vax) 1419301ea0f4Smrg# if !defined (ultrix) 1420301ea0f4Smrg# include <sys/param.h> 1421301ea0f4Smrg# if defined (BSD) 1422301ea0f4Smrg# if BSD == 43 1423301ea0f4Smrg printf ("vax-dec-bsd4.3\n"); exit (0); 1424301ea0f4Smrg# else 1425301ea0f4Smrg# if BSD == 199006 1426301ea0f4Smrg printf ("vax-dec-bsd4.3reno\n"); exit (0); 1427301ea0f4Smrg# else 1428301ea0f4Smrg printf ("vax-dec-bsd\n"); exit (0); 1429301ea0f4Smrg# endif 1430301ea0f4Smrg# endif 1431301ea0f4Smrg# else 1432301ea0f4Smrg printf ("vax-dec-bsd\n"); exit (0); 1433301ea0f4Smrg# endif 1434301ea0f4Smrg# else 1435301ea0f4Smrg printf ("vax-dec-ultrix\n"); exit (0); 1436301ea0f4Smrg# endif 1437301ea0f4Smrg#endif 1438301ea0f4Smrg 1439301ea0f4Smrg#if defined (alliant) && defined (i860) 1440301ea0f4Smrg printf ("i860-alliant-bsd\n"); exit (0); 1441301ea0f4Smrg#endif 1442301ea0f4Smrg 1443301ea0f4Smrg exit (1); 1444301ea0f4Smrg} 1445301ea0f4SmrgEOF 1446301ea0f4Smrg 14470cc67336Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 14480cc67336Smrg { echo "$SYSTEM_NAME"; exit; } 1449301ea0f4Smrg 1450301ea0f4Smrg# Apollos put the system type in the environment. 1451301ea0f4Smrg 14520cc67336Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 1453301ea0f4Smrg 1454301ea0f4Smrg# Convex versions that predate uname can use getsysinfo(1) 1455301ea0f4Smrg 1456301ea0f4Smrgif [ -x /usr/convex/getsysinfo ] 1457301ea0f4Smrgthen 1458301ea0f4Smrg case `getsysinfo -f cpu_type` in 1459301ea0f4Smrg c1*) 1460301ea0f4Smrg echo c1-convex-bsd 14610cc67336Smrg exit ;; 1462301ea0f4Smrg c2*) 1463301ea0f4Smrg if getsysinfo -f scalar_acc 1464301ea0f4Smrg then echo c32-convex-bsd 1465301ea0f4Smrg else echo c2-convex-bsd 1466301ea0f4Smrg fi 14670cc67336Smrg exit ;; 1468301ea0f4Smrg c34*) 1469301ea0f4Smrg echo c34-convex-bsd 14700cc67336Smrg exit ;; 1471301ea0f4Smrg c38*) 1472301ea0f4Smrg echo c38-convex-bsd 14730cc67336Smrg exit ;; 1474301ea0f4Smrg c4*) 1475301ea0f4Smrg echo c4-convex-bsd 14760cc67336Smrg exit ;; 1477301ea0f4Smrg esac 1478301ea0f4Smrgfi 1479301ea0f4Smrg 1480301ea0f4Smrgcat >&2 <<EOF 1481301ea0f4Smrg$0: unable to guess system type 1482301ea0f4Smrg 1483301ea0f4SmrgThis script, last modified $timestamp, has failed to recognize 1484301ea0f4Smrgthe operating system you are using. It is advised that you 1485301ea0f4Smrgdownload the most up to date version of the config scripts from 1486301ea0f4Smrg 14870cc67336Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 14880cc67336Smrgand 14890cc67336Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1490301ea0f4Smrg 1491301ea0f4SmrgIf the version you run ($0) is already up to date, please 1492301ea0f4Smrgsend the following data and any information you think might be 1493301ea0f4Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 1494301ea0f4Smrginformation to handle your system. 1495301ea0f4Smrg 1496301ea0f4Smrgconfig.guess timestamp = $timestamp 1497301ea0f4Smrg 1498301ea0f4Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 1499301ea0f4Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 1500301ea0f4Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 1501301ea0f4Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 1502301ea0f4Smrg 1503301ea0f4Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1504301ea0f4Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1505301ea0f4Smrg 1506301ea0f4Smrghostinfo = `(hostinfo) 2>/dev/null` 1507301ea0f4Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 1508301ea0f4Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1509301ea0f4Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 1510301ea0f4Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1511301ea0f4Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1512301ea0f4Smrg 1513301ea0f4SmrgUNAME_MACHINE = ${UNAME_MACHINE} 1514301ea0f4SmrgUNAME_RELEASE = ${UNAME_RELEASE} 1515301ea0f4SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 1516301ea0f4SmrgUNAME_VERSION = ${UNAME_VERSION} 1517301ea0f4SmrgEOF 1518301ea0f4Smrg 1519301ea0f4Smrgexit 1 1520301ea0f4Smrg 1521301ea0f4Smrg# Local variables: 1522301ea0f4Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 1523301ea0f4Smrg# time-stamp-start: "timestamp='" 1524301ea0f4Smrg# time-stamp-format: "%:y-%02m-%02d" 1525301ea0f4Smrg# time-stamp-end: "'" 1526301ea0f4Smrg# End: 1527