config.guess revision bf2eeab3
114c0a534Smrg#! /bin/sh 214c0a534Smrg# Attempt to guess a canonical system name. 314c0a534Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4bf2eeab3Smrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 5bf2eeab3Smrg# Free Software Foundation, Inc. 614c0a534Smrg 7bf2eeab3Smrgtimestamp='2009-04-27' 814c0a534Smrg 914c0a534Smrg# This file is free software; you can redistribute it and/or modify it 1014c0a534Smrg# under the terms of the GNU General Public License as published by 1114c0a534Smrg# the Free Software Foundation; either version 2 of the License, or 1214c0a534Smrg# (at your option) any later version. 1314c0a534Smrg# 1414c0a534Smrg# This program is distributed in the hope that it will be useful, but 1514c0a534Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1614c0a534Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1714c0a534Smrg# General Public License for more details. 1814c0a534Smrg# 1914c0a534Smrg# You should have received a copy of the GNU General Public License 2014c0a534Smrg# along with this program; if not, write to the Free Software 2114c0a534Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 2214c0a534Smrg# 02110-1301, USA. 2314c0a534Smrg# 2414c0a534Smrg# As a special exception to the GNU General Public License, if you 2514c0a534Smrg# distribute this file as part of a program that contains a 2614c0a534Smrg# configuration script generated by Autoconf, you may include it under 2714c0a534Smrg# the same distribution terms that you use for the rest of that program. 2814c0a534Smrg 2914c0a534Smrg 3014c0a534Smrg# Originally written by Per Bothner <per@bothner.com>. 3114c0a534Smrg# Please send patches to <config-patches@gnu.org>. Submit a context 3214c0a534Smrg# diff and a properly formatted ChangeLog entry. 3314c0a534Smrg# 3414c0a534Smrg# This script attempts to guess a canonical system name similar to 3514c0a534Smrg# config.sub. If it succeeds, it prints the system name on stdout, and 3614c0a534Smrg# exits with 0. Otherwise, it exits with 1. 3714c0a534Smrg# 3814c0a534Smrg# The plan is that this can be called by configure scripts if you 3914c0a534Smrg# don't specify an explicit build system type. 4014c0a534Smrg 4114c0a534Smrgme=`echo "$0" | sed -e 's,.*/,,'` 4214c0a534Smrg 4314c0a534Smrgusage="\ 4414c0a534SmrgUsage: $0 [OPTION] 4514c0a534Smrg 4614c0a534SmrgOutput the configuration name of the system \`$me' is run on. 4714c0a534Smrg 4814c0a534SmrgOperation modes: 4914c0a534Smrg -h, --help print this help, then exit 5014c0a534Smrg -t, --time-stamp print date of last modification, then exit 5114c0a534Smrg -v, --version print version number, then exit 5214c0a534Smrg 5314c0a534SmrgReport bugs and patches to <config-patches@gnu.org>." 5414c0a534Smrg 5514c0a534Smrgversion="\ 5614c0a534SmrgGNU config.guess ($timestamp) 5714c0a534Smrg 5814c0a534SmrgOriginally written by Per Bothner. 59bf2eeab3SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 60bf2eeab3Smrg2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 6114c0a534Smrg 6214c0a534SmrgThis is free software; see the source for copying conditions. There is NO 6314c0a534Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 6414c0a534Smrg 6514c0a534Smrghelp=" 6614c0a534SmrgTry \`$me --help' for more information." 6714c0a534Smrg 6814c0a534Smrg# Parse command line 6914c0a534Smrgwhile test $# -gt 0 ; do 7014c0a534Smrg case $1 in 7114c0a534Smrg --time-stamp | --time* | -t ) 7214c0a534Smrg echo "$timestamp" ; exit ;; 7314c0a534Smrg --version | -v ) 7414c0a534Smrg echo "$version" ; exit ;; 7514c0a534Smrg --help | --h* | -h ) 7614c0a534Smrg echo "$usage"; exit ;; 7714c0a534Smrg -- ) # Stop option processing 7814c0a534Smrg shift; break ;; 7914c0a534Smrg - ) # Use stdin as input. 8014c0a534Smrg break ;; 8114c0a534Smrg -* ) 8214c0a534Smrg echo "$me: invalid option $1$help" >&2 8314c0a534Smrg exit 1 ;; 8414c0a534Smrg * ) 8514c0a534Smrg break ;; 8614c0a534Smrg esac 8714c0a534Smrgdone 8814c0a534Smrg 8914c0a534Smrgif test $# != 0; then 9014c0a534Smrg echo "$me: too many arguments$help" >&2 9114c0a534Smrg exit 1 9214c0a534Smrgfi 9314c0a534Smrg 9414c0a534Smrgtrap 'exit 1' 1 2 15 9514c0a534Smrg 9614c0a534Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 9714c0a534Smrg# compiler to aid in system detection is discouraged as it requires 9814c0a534Smrg# temporary files to be created and, as you can see below, it is a 9914c0a534Smrg# headache to deal with in a portable fashion. 10014c0a534Smrg 10114c0a534Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 10214c0a534Smrg# use `HOST_CC' if defined, but it is deprecated. 10314c0a534Smrg 10414c0a534Smrg# Portable tmp directory creation inspired by the Autoconf team. 10514c0a534Smrg 10614c0a534Smrgset_cc_for_build=' 10714c0a534Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 10814c0a534Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 10914c0a534Smrg: ${TMPDIR=/tmp} ; 110bf2eeab3Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 11114c0a534Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 11214c0a534Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 11314c0a534Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 11414c0a534Smrgdummy=$tmp/dummy ; 11514c0a534Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 11614c0a534Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 11714c0a534Smrg ,,) echo "int x;" > $dummy.c ; 11814c0a534Smrg for c in cc gcc c89 c99 ; do 11914c0a534Smrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 12014c0a534Smrg CC_FOR_BUILD="$c"; break ; 12114c0a534Smrg fi ; 12214c0a534Smrg done ; 12314c0a534Smrg if test x"$CC_FOR_BUILD" = x ; then 12414c0a534Smrg CC_FOR_BUILD=no_compiler_found ; 12514c0a534Smrg fi 12614c0a534Smrg ;; 12714c0a534Smrg ,,*) CC_FOR_BUILD=$CC ;; 12814c0a534Smrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 12914c0a534Smrgesac ; set_cc_for_build= ;' 13014c0a534Smrg 13114c0a534Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 13214c0a534Smrg# (ghazi@noc.rutgers.edu 1994-08-24) 13314c0a534Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 13414c0a534Smrg PATH=$PATH:/.attbin ; export PATH 13514c0a534Smrgfi 13614c0a534Smrg 13714c0a534SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 13814c0a534SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 13914c0a534SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 14014c0a534SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 14114c0a534Smrg 14214c0a534Smrg# Note: order is significant - the case branches are not exclusive. 14314c0a534Smrg 14414c0a534Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 14514c0a534Smrg *:NetBSD:*:*) 14614c0a534Smrg # NetBSD (nbsd) targets should (where applicable) match one or 14714c0a534Smrg # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 14814c0a534Smrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 14914c0a534Smrg # switched to ELF, *-*-netbsd* would select the old 15014c0a534Smrg # object file format. This provides both forward 15114c0a534Smrg # compatibility and a consistent mechanism for selecting the 15214c0a534Smrg # object file format. 15314c0a534Smrg # 15414c0a534Smrg # Note: NetBSD doesn't particularly care about the vendor 15514c0a534Smrg # portion of the name. We always set it to "unknown". 15614c0a534Smrg sysctl="sysctl -n hw.machine_arch" 15714c0a534Smrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 15814c0a534Smrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 15914c0a534Smrg case "${UNAME_MACHINE_ARCH}" in 16014c0a534Smrg armeb) machine=armeb-unknown ;; 16114c0a534Smrg arm*) machine=arm-unknown ;; 16214c0a534Smrg sh3el) machine=shl-unknown ;; 16314c0a534Smrg sh3eb) machine=sh-unknown ;; 164bf2eeab3Smrg sh5el) machine=sh5le-unknown ;; 16514c0a534Smrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 16614c0a534Smrg esac 16714c0a534Smrg # The Operating System including object format, if it has switched 16814c0a534Smrg # to ELF recently, or will in the future. 16914c0a534Smrg case "${UNAME_MACHINE_ARCH}" in 17014c0a534Smrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 17114c0a534Smrg eval $set_cc_for_build 17214c0a534Smrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 17314c0a534Smrg | grep __ELF__ >/dev/null 17414c0a534Smrg then 17514c0a534Smrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 17614c0a534Smrg # Return netbsd for either. FIX? 17714c0a534Smrg os=netbsd 17814c0a534Smrg else 17914c0a534Smrg os=netbsdelf 18014c0a534Smrg fi 18114c0a534Smrg ;; 18214c0a534Smrg *) 18314c0a534Smrg os=netbsd 18414c0a534Smrg ;; 18514c0a534Smrg esac 18614c0a534Smrg # The OS release 18714c0a534Smrg # Debian GNU/NetBSD machines have a different userland, and 18814c0a534Smrg # thus, need a distinct triplet. However, they do not need 18914c0a534Smrg # kernel version information, so it can be replaced with a 19014c0a534Smrg # suitable tag, in the style of linux-gnu. 19114c0a534Smrg case "${UNAME_VERSION}" in 19214c0a534Smrg Debian*) 19314c0a534Smrg release='-gnu' 19414c0a534Smrg ;; 19514c0a534Smrg *) 19614c0a534Smrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 19714c0a534Smrg ;; 19814c0a534Smrg esac 19914c0a534Smrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 20014c0a534Smrg # contains redundant information, the shorter form: 20114c0a534Smrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 20214c0a534Smrg echo "${machine}-${os}${release}" 20314c0a534Smrg exit ;; 20414c0a534Smrg *:OpenBSD:*:*) 20514c0a534Smrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 20614c0a534Smrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 20714c0a534Smrg exit ;; 20814c0a534Smrg *:ekkoBSD:*:*) 20914c0a534Smrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 21014c0a534Smrg exit ;; 211bf2eeab3Smrg *:SolidBSD:*:*) 212bf2eeab3Smrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 213bf2eeab3Smrg exit ;; 21414c0a534Smrg macppc:MirBSD:*:*) 215bf2eeab3Smrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 21614c0a534Smrg exit ;; 21714c0a534Smrg *:MirBSD:*:*) 21814c0a534Smrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 21914c0a534Smrg exit ;; 22014c0a534Smrg alpha:OSF1:*:*) 22114c0a534Smrg case $UNAME_RELEASE in 22214c0a534Smrg *4.0) 22314c0a534Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 22414c0a534Smrg ;; 22514c0a534Smrg *5.*) 22614c0a534Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 22714c0a534Smrg ;; 22814c0a534Smrg esac 22914c0a534Smrg # According to Compaq, /usr/sbin/psrinfo has been available on 23014c0a534Smrg # OSF/1 and Tru64 systems produced since 1995. I hope that 23114c0a534Smrg # covers most systems running today. This code pipes the CPU 23214c0a534Smrg # types through head -n 1, so we only detect the type of CPU 0. 23314c0a534Smrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 23414c0a534Smrg case "$ALPHA_CPU_TYPE" in 23514c0a534Smrg "EV4 (21064)") 23614c0a534Smrg UNAME_MACHINE="alpha" ;; 23714c0a534Smrg "EV4.5 (21064)") 23814c0a534Smrg UNAME_MACHINE="alpha" ;; 23914c0a534Smrg "LCA4 (21066/21068)") 24014c0a534Smrg UNAME_MACHINE="alpha" ;; 24114c0a534Smrg "EV5 (21164)") 24214c0a534Smrg UNAME_MACHINE="alphaev5" ;; 24314c0a534Smrg "EV5.6 (21164A)") 24414c0a534Smrg UNAME_MACHINE="alphaev56" ;; 24514c0a534Smrg "EV5.6 (21164PC)") 24614c0a534Smrg UNAME_MACHINE="alphapca56" ;; 24714c0a534Smrg "EV5.7 (21164PC)") 24814c0a534Smrg UNAME_MACHINE="alphapca57" ;; 24914c0a534Smrg "EV6 (21264)") 25014c0a534Smrg UNAME_MACHINE="alphaev6" ;; 25114c0a534Smrg "EV6.7 (21264A)") 25214c0a534Smrg UNAME_MACHINE="alphaev67" ;; 25314c0a534Smrg "EV6.8CB (21264C)") 25414c0a534Smrg UNAME_MACHINE="alphaev68" ;; 25514c0a534Smrg "EV6.8AL (21264B)") 25614c0a534Smrg UNAME_MACHINE="alphaev68" ;; 25714c0a534Smrg "EV6.8CX (21264D)") 25814c0a534Smrg UNAME_MACHINE="alphaev68" ;; 25914c0a534Smrg "EV6.9A (21264/EV69A)") 26014c0a534Smrg UNAME_MACHINE="alphaev69" ;; 26114c0a534Smrg "EV7 (21364)") 26214c0a534Smrg UNAME_MACHINE="alphaev7" ;; 26314c0a534Smrg "EV7.9 (21364A)") 26414c0a534Smrg UNAME_MACHINE="alphaev79" ;; 26514c0a534Smrg esac 26614c0a534Smrg # A Pn.n version is a patched version. 26714c0a534Smrg # A Vn.n version is a released version. 26814c0a534Smrg # A Tn.n version is a released field test version. 26914c0a534Smrg # A Xn.n version is an unreleased experimental baselevel. 27014c0a534Smrg # 1.2 uses "1.2" for uname -r. 27114c0a534Smrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27214c0a534Smrg exit ;; 27314c0a534Smrg Alpha\ *:Windows_NT*:*) 27414c0a534Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 27514c0a534Smrg # Should we change UNAME_MACHINE based on the output of uname instead 27614c0a534Smrg # of the specific Alpha model? 27714c0a534Smrg echo alpha-pc-interix 27814c0a534Smrg exit ;; 27914c0a534Smrg 21064:Windows_NT:50:3) 28014c0a534Smrg echo alpha-dec-winnt3.5 28114c0a534Smrg exit ;; 28214c0a534Smrg Amiga*:UNIX_System_V:4.0:*) 28314c0a534Smrg echo m68k-unknown-sysv4 28414c0a534Smrg exit ;; 28514c0a534Smrg *:[Aa]miga[Oo][Ss]:*:*) 28614c0a534Smrg echo ${UNAME_MACHINE}-unknown-amigaos 28714c0a534Smrg exit ;; 28814c0a534Smrg *:[Mm]orph[Oo][Ss]:*:*) 28914c0a534Smrg echo ${UNAME_MACHINE}-unknown-morphos 29014c0a534Smrg exit ;; 29114c0a534Smrg *:OS/390:*:*) 29214c0a534Smrg echo i370-ibm-openedition 29314c0a534Smrg exit ;; 29414c0a534Smrg *:z/VM:*:*) 29514c0a534Smrg echo s390-ibm-zvmoe 29614c0a534Smrg exit ;; 29714c0a534Smrg *:OS400:*:*) 29814c0a534Smrg echo powerpc-ibm-os400 29914c0a534Smrg exit ;; 30014c0a534Smrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 30114c0a534Smrg echo arm-acorn-riscix${UNAME_RELEASE} 30214c0a534Smrg exit ;; 30314c0a534Smrg arm:riscos:*:*|arm:RISCOS:*:*) 30414c0a534Smrg echo arm-unknown-riscos 30514c0a534Smrg exit ;; 30614c0a534Smrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 30714c0a534Smrg echo hppa1.1-hitachi-hiuxmpp 30814c0a534Smrg exit ;; 30914c0a534Smrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 31014c0a534Smrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 31114c0a534Smrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 31214c0a534Smrg echo pyramid-pyramid-sysv3 31314c0a534Smrg else 31414c0a534Smrg echo pyramid-pyramid-bsd 31514c0a534Smrg fi 31614c0a534Smrg exit ;; 31714c0a534Smrg NILE*:*:*:dcosx) 31814c0a534Smrg echo pyramid-pyramid-svr4 31914c0a534Smrg exit ;; 32014c0a534Smrg DRS?6000:unix:4.0:6*) 32114c0a534Smrg echo sparc-icl-nx6 32214c0a534Smrg exit ;; 32314c0a534Smrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 32414c0a534Smrg case `/usr/bin/uname -p` in 32514c0a534Smrg sparc) echo sparc-icl-nx7; exit ;; 32614c0a534Smrg esac ;; 327bf2eeab3Smrg s390x:SunOS:*:*) 328bf2eeab3Smrg echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 329bf2eeab3Smrg exit ;; 33014c0a534Smrg sun4H:SunOS:5.*:*) 33114c0a534Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 33214c0a534Smrg exit ;; 33314c0a534Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 33414c0a534Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 33514c0a534Smrg exit ;; 336bf2eeab3Smrg i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 337bf2eeab3Smrg eval $set_cc_for_build 338bf2eeab3Smrg SUN_ARCH="i386" 339bf2eeab3Smrg # If there is a compiler, see if it is configured for 64-bit objects. 340bf2eeab3Smrg # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 341bf2eeab3Smrg # This test works for both compilers. 342bf2eeab3Smrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 343bf2eeab3Smrg if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 344bf2eeab3Smrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 345bf2eeab3Smrg grep IS_64BIT_ARCH >/dev/null 346bf2eeab3Smrg then 347bf2eeab3Smrg SUN_ARCH="x86_64" 348bf2eeab3Smrg fi 349bf2eeab3Smrg fi 350bf2eeab3Smrg echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 35114c0a534Smrg exit ;; 35214c0a534Smrg sun4*:SunOS:6*:*) 35314c0a534Smrg # According to config.sub, this is the proper way to canonicalize 35414c0a534Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 35514c0a534Smrg # it's likely to be more like Solaris than SunOS4. 35614c0a534Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 35714c0a534Smrg exit ;; 35814c0a534Smrg sun4*:SunOS:*:*) 35914c0a534Smrg case "`/usr/bin/arch -k`" in 36014c0a534Smrg Series*|S4*) 36114c0a534Smrg UNAME_RELEASE=`uname -v` 36214c0a534Smrg ;; 36314c0a534Smrg esac 36414c0a534Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 36514c0a534Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 36614c0a534Smrg exit ;; 36714c0a534Smrg sun3*:SunOS:*:*) 36814c0a534Smrg echo m68k-sun-sunos${UNAME_RELEASE} 36914c0a534Smrg exit ;; 37014c0a534Smrg sun*:*:4.2BSD:*) 37114c0a534Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 37214c0a534Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 37314c0a534Smrg case "`/bin/arch`" in 37414c0a534Smrg sun3) 37514c0a534Smrg echo m68k-sun-sunos${UNAME_RELEASE} 37614c0a534Smrg ;; 37714c0a534Smrg sun4) 37814c0a534Smrg echo sparc-sun-sunos${UNAME_RELEASE} 37914c0a534Smrg ;; 38014c0a534Smrg esac 38114c0a534Smrg exit ;; 38214c0a534Smrg aushp:SunOS:*:*) 38314c0a534Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 38414c0a534Smrg exit ;; 38514c0a534Smrg # The situation for MiNT is a little confusing. The machine name 38614c0a534Smrg # can be virtually everything (everything which is not 38714c0a534Smrg # "atarist" or "atariste" at least should have a processor 38814c0a534Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 38914c0a534Smrg # to the lowercase version "mint" (or "freemint"). Finally 39014c0a534Smrg # the system name "TOS" denotes a system which is actually not 39114c0a534Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 39214c0a534Smrg # be no problem. 39314c0a534Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 39414c0a534Smrg echo m68k-atari-mint${UNAME_RELEASE} 39514c0a534Smrg exit ;; 39614c0a534Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 39714c0a534Smrg echo m68k-atari-mint${UNAME_RELEASE} 39814c0a534Smrg exit ;; 39914c0a534Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 40014c0a534Smrg echo m68k-atari-mint${UNAME_RELEASE} 40114c0a534Smrg exit ;; 40214c0a534Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 40314c0a534Smrg echo m68k-milan-mint${UNAME_RELEASE} 40414c0a534Smrg exit ;; 40514c0a534Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 40614c0a534Smrg echo m68k-hades-mint${UNAME_RELEASE} 40714c0a534Smrg exit ;; 40814c0a534Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 40914c0a534Smrg echo m68k-unknown-mint${UNAME_RELEASE} 41014c0a534Smrg exit ;; 41114c0a534Smrg m68k:machten:*:*) 41214c0a534Smrg echo m68k-apple-machten${UNAME_RELEASE} 41314c0a534Smrg exit ;; 41414c0a534Smrg powerpc:machten:*:*) 41514c0a534Smrg echo powerpc-apple-machten${UNAME_RELEASE} 41614c0a534Smrg exit ;; 41714c0a534Smrg RISC*:Mach:*:*) 41814c0a534Smrg echo mips-dec-mach_bsd4.3 41914c0a534Smrg exit ;; 42014c0a534Smrg RISC*:ULTRIX:*:*) 42114c0a534Smrg echo mips-dec-ultrix${UNAME_RELEASE} 42214c0a534Smrg exit ;; 42314c0a534Smrg VAX*:ULTRIX*:*:*) 42414c0a534Smrg echo vax-dec-ultrix${UNAME_RELEASE} 42514c0a534Smrg exit ;; 42614c0a534Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 42714c0a534Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 42814c0a534Smrg exit ;; 42914c0a534Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 43014c0a534Smrg eval $set_cc_for_build 43114c0a534Smrg sed 's/^ //' << EOF >$dummy.c 43214c0a534Smrg#ifdef __cplusplus 43314c0a534Smrg#include <stdio.h> /* for printf() prototype */ 43414c0a534Smrg int main (int argc, char *argv[]) { 43514c0a534Smrg#else 43614c0a534Smrg int main (argc, argv) int argc; char *argv[]; { 43714c0a534Smrg#endif 43814c0a534Smrg #if defined (host_mips) && defined (MIPSEB) 43914c0a534Smrg #if defined (SYSTYPE_SYSV) 44014c0a534Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 44114c0a534Smrg #endif 44214c0a534Smrg #if defined (SYSTYPE_SVR4) 44314c0a534Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 44414c0a534Smrg #endif 44514c0a534Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 44614c0a534Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 44714c0a534Smrg #endif 44814c0a534Smrg #endif 44914c0a534Smrg exit (-1); 45014c0a534Smrg } 45114c0a534SmrgEOF 45214c0a534Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 45314c0a534Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 45414c0a534Smrg SYSTEM_NAME=`$dummy $dummyarg` && 45514c0a534Smrg { echo "$SYSTEM_NAME"; exit; } 45614c0a534Smrg echo mips-mips-riscos${UNAME_RELEASE} 45714c0a534Smrg exit ;; 45814c0a534Smrg Motorola:PowerMAX_OS:*:*) 45914c0a534Smrg echo powerpc-motorola-powermax 46014c0a534Smrg exit ;; 46114c0a534Smrg Motorola:*:4.3:PL8-*) 46214c0a534Smrg echo powerpc-harris-powermax 46314c0a534Smrg exit ;; 46414c0a534Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 46514c0a534Smrg echo powerpc-harris-powermax 46614c0a534Smrg exit ;; 46714c0a534Smrg Night_Hawk:Power_UNIX:*:*) 46814c0a534Smrg echo powerpc-harris-powerunix 46914c0a534Smrg exit ;; 47014c0a534Smrg m88k:CX/UX:7*:*) 47114c0a534Smrg echo m88k-harris-cxux7 47214c0a534Smrg exit ;; 47314c0a534Smrg m88k:*:4*:R4*) 47414c0a534Smrg echo m88k-motorola-sysv4 47514c0a534Smrg exit ;; 47614c0a534Smrg m88k:*:3*:R3*) 47714c0a534Smrg echo m88k-motorola-sysv3 47814c0a534Smrg exit ;; 47914c0a534Smrg AViiON:dgux:*:*) 48014c0a534Smrg # DG/UX returns AViiON for all architectures 48114c0a534Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 48214c0a534Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 48314c0a534Smrg then 48414c0a534Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 48514c0a534Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 48614c0a534Smrg then 48714c0a534Smrg echo m88k-dg-dgux${UNAME_RELEASE} 48814c0a534Smrg else 48914c0a534Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 49014c0a534Smrg fi 49114c0a534Smrg else 49214c0a534Smrg echo i586-dg-dgux${UNAME_RELEASE} 49314c0a534Smrg fi 49414c0a534Smrg exit ;; 49514c0a534Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 49614c0a534Smrg echo m88k-dolphin-sysv3 49714c0a534Smrg exit ;; 49814c0a534Smrg M88*:*:R3*:*) 49914c0a534Smrg # Delta 88k system running SVR3 50014c0a534Smrg echo m88k-motorola-sysv3 50114c0a534Smrg exit ;; 50214c0a534Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 50314c0a534Smrg echo m88k-tektronix-sysv3 50414c0a534Smrg exit ;; 50514c0a534Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 50614c0a534Smrg echo m68k-tektronix-bsd 50714c0a534Smrg exit ;; 50814c0a534Smrg *:IRIX*:*:*) 50914c0a534Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 51014c0a534Smrg exit ;; 51114c0a534Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 51214c0a534Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 51314c0a534Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 51414c0a534Smrg i*86:AIX:*:*) 51514c0a534Smrg echo i386-ibm-aix 51614c0a534Smrg exit ;; 51714c0a534Smrg ia64:AIX:*:*) 51814c0a534Smrg if [ -x /usr/bin/oslevel ] ; then 51914c0a534Smrg IBM_REV=`/usr/bin/oslevel` 52014c0a534Smrg else 52114c0a534Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 52214c0a534Smrg fi 52314c0a534Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 52414c0a534Smrg exit ;; 52514c0a534Smrg *:AIX:2:3) 52614c0a534Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 52714c0a534Smrg eval $set_cc_for_build 52814c0a534Smrg sed 's/^ //' << EOF >$dummy.c 52914c0a534Smrg #include <sys/systemcfg.h> 53014c0a534Smrg 53114c0a534Smrg main() 53214c0a534Smrg { 53314c0a534Smrg if (!__power_pc()) 53414c0a534Smrg exit(1); 53514c0a534Smrg puts("powerpc-ibm-aix3.2.5"); 53614c0a534Smrg exit(0); 53714c0a534Smrg } 53814c0a534SmrgEOF 53914c0a534Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 54014c0a534Smrg then 54114c0a534Smrg echo "$SYSTEM_NAME" 54214c0a534Smrg else 54314c0a534Smrg echo rs6000-ibm-aix3.2.5 54414c0a534Smrg fi 54514c0a534Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 54614c0a534Smrg echo rs6000-ibm-aix3.2.4 54714c0a534Smrg else 54814c0a534Smrg echo rs6000-ibm-aix3.2 54914c0a534Smrg fi 55014c0a534Smrg exit ;; 551bf2eeab3Smrg *:AIX:*:[456]) 55214c0a534Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 55314c0a534Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 55414c0a534Smrg IBM_ARCH=rs6000 55514c0a534Smrg else 55614c0a534Smrg IBM_ARCH=powerpc 55714c0a534Smrg fi 55814c0a534Smrg if [ -x /usr/bin/oslevel ] ; then 55914c0a534Smrg IBM_REV=`/usr/bin/oslevel` 56014c0a534Smrg else 56114c0a534Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 56214c0a534Smrg fi 56314c0a534Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 56414c0a534Smrg exit ;; 56514c0a534Smrg *:AIX:*:*) 56614c0a534Smrg echo rs6000-ibm-aix 56714c0a534Smrg exit ;; 56814c0a534Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 56914c0a534Smrg echo romp-ibm-bsd4.4 57014c0a534Smrg exit ;; 57114c0a534Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 57214c0a534Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 57314c0a534Smrg exit ;; # report: romp-ibm BSD 4.3 57414c0a534Smrg *:BOSX:*:*) 57514c0a534Smrg echo rs6000-bull-bosx 57614c0a534Smrg exit ;; 57714c0a534Smrg DPX/2?00:B.O.S.:*:*) 57814c0a534Smrg echo m68k-bull-sysv3 57914c0a534Smrg exit ;; 58014c0a534Smrg 9000/[34]??:4.3bsd:1.*:*) 58114c0a534Smrg echo m68k-hp-bsd 58214c0a534Smrg exit ;; 58314c0a534Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 58414c0a534Smrg echo m68k-hp-bsd4.4 58514c0a534Smrg exit ;; 58614c0a534Smrg 9000/[34678]??:HP-UX:*:*) 58714c0a534Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 58814c0a534Smrg case "${UNAME_MACHINE}" in 58914c0a534Smrg 9000/31? ) HP_ARCH=m68000 ;; 59014c0a534Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 59114c0a534Smrg 9000/[678][0-9][0-9]) 59214c0a534Smrg if [ -x /usr/bin/getconf ]; then 59314c0a534Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 59414c0a534Smrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 59514c0a534Smrg case "${sc_cpu_version}" in 59614c0a534Smrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 59714c0a534Smrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 59814c0a534Smrg 532) # CPU_PA_RISC2_0 59914c0a534Smrg case "${sc_kernel_bits}" in 60014c0a534Smrg 32) HP_ARCH="hppa2.0n" ;; 60114c0a534Smrg 64) HP_ARCH="hppa2.0w" ;; 60214c0a534Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 60314c0a534Smrg esac ;; 60414c0a534Smrg esac 60514c0a534Smrg fi 60614c0a534Smrg if [ "${HP_ARCH}" = "" ]; then 60714c0a534Smrg eval $set_cc_for_build 60814c0a534Smrg sed 's/^ //' << EOF >$dummy.c 60914c0a534Smrg 61014c0a534Smrg #define _HPUX_SOURCE 61114c0a534Smrg #include <stdlib.h> 61214c0a534Smrg #include <unistd.h> 61314c0a534Smrg 61414c0a534Smrg int main () 61514c0a534Smrg { 61614c0a534Smrg #if defined(_SC_KERNEL_BITS) 61714c0a534Smrg long bits = sysconf(_SC_KERNEL_BITS); 61814c0a534Smrg #endif 61914c0a534Smrg long cpu = sysconf (_SC_CPU_VERSION); 62014c0a534Smrg 62114c0a534Smrg switch (cpu) 62214c0a534Smrg { 62314c0a534Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 62414c0a534Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 62514c0a534Smrg case CPU_PA_RISC2_0: 62614c0a534Smrg #if defined(_SC_KERNEL_BITS) 62714c0a534Smrg switch (bits) 62814c0a534Smrg { 62914c0a534Smrg case 64: puts ("hppa2.0w"); break; 63014c0a534Smrg case 32: puts ("hppa2.0n"); break; 63114c0a534Smrg default: puts ("hppa2.0"); break; 63214c0a534Smrg } break; 63314c0a534Smrg #else /* !defined(_SC_KERNEL_BITS) */ 63414c0a534Smrg puts ("hppa2.0"); break; 63514c0a534Smrg #endif 63614c0a534Smrg default: puts ("hppa1.0"); break; 63714c0a534Smrg } 63814c0a534Smrg exit (0); 63914c0a534Smrg } 64014c0a534SmrgEOF 64114c0a534Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 64214c0a534Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 64314c0a534Smrg fi ;; 64414c0a534Smrg esac 64514c0a534Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 64614c0a534Smrg then 64714c0a534Smrg eval $set_cc_for_build 64814c0a534Smrg 64914c0a534Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 65014c0a534Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 65114c0a534Smrg # generating 64-bit code. GNU and HP use different nomenclature: 65214c0a534Smrg # 65314c0a534Smrg # $ CC_FOR_BUILD=cc ./config.guess 65414c0a534Smrg # => hppa2.0w-hp-hpux11.23 65514c0a534Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 65614c0a534Smrg # => hppa64-hp-hpux11.23 65714c0a534Smrg 65814c0a534Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 65914c0a534Smrg grep __LP64__ >/dev/null 66014c0a534Smrg then 66114c0a534Smrg HP_ARCH="hppa2.0w" 66214c0a534Smrg else 66314c0a534Smrg HP_ARCH="hppa64" 66414c0a534Smrg fi 66514c0a534Smrg fi 66614c0a534Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 66714c0a534Smrg exit ;; 66814c0a534Smrg ia64:HP-UX:*:*) 66914c0a534Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 67014c0a534Smrg echo ia64-hp-hpux${HPUX_REV} 67114c0a534Smrg exit ;; 67214c0a534Smrg 3050*:HI-UX:*:*) 67314c0a534Smrg eval $set_cc_for_build 67414c0a534Smrg sed 's/^ //' << EOF >$dummy.c 67514c0a534Smrg #include <unistd.h> 67614c0a534Smrg int 67714c0a534Smrg main () 67814c0a534Smrg { 67914c0a534Smrg long cpu = sysconf (_SC_CPU_VERSION); 68014c0a534Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 68114c0a534Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 68214c0a534Smrg results, however. */ 68314c0a534Smrg if (CPU_IS_PA_RISC (cpu)) 68414c0a534Smrg { 68514c0a534Smrg switch (cpu) 68614c0a534Smrg { 68714c0a534Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 68814c0a534Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 68914c0a534Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 69014c0a534Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 69114c0a534Smrg } 69214c0a534Smrg } 69314c0a534Smrg else if (CPU_IS_HP_MC68K (cpu)) 69414c0a534Smrg puts ("m68k-hitachi-hiuxwe2"); 69514c0a534Smrg else puts ("unknown-hitachi-hiuxwe2"); 69614c0a534Smrg exit (0); 69714c0a534Smrg } 69814c0a534SmrgEOF 69914c0a534Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 70014c0a534Smrg { echo "$SYSTEM_NAME"; exit; } 70114c0a534Smrg echo unknown-hitachi-hiuxwe2 70214c0a534Smrg exit ;; 70314c0a534Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 70414c0a534Smrg echo hppa1.1-hp-bsd 70514c0a534Smrg exit ;; 70614c0a534Smrg 9000/8??:4.3bsd:*:*) 70714c0a534Smrg echo hppa1.0-hp-bsd 70814c0a534Smrg exit ;; 70914c0a534Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 71014c0a534Smrg echo hppa1.0-hp-mpeix 71114c0a534Smrg exit ;; 71214c0a534Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 71314c0a534Smrg echo hppa1.1-hp-osf 71414c0a534Smrg exit ;; 71514c0a534Smrg hp8??:OSF1:*:*) 71614c0a534Smrg echo hppa1.0-hp-osf 71714c0a534Smrg exit ;; 71814c0a534Smrg i*86:OSF1:*:*) 71914c0a534Smrg if [ -x /usr/sbin/sysversion ] ; then 72014c0a534Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 72114c0a534Smrg else 72214c0a534Smrg echo ${UNAME_MACHINE}-unknown-osf1 72314c0a534Smrg fi 72414c0a534Smrg exit ;; 72514c0a534Smrg parisc*:Lites*:*:*) 72614c0a534Smrg echo hppa1.1-hp-lites 72714c0a534Smrg exit ;; 72814c0a534Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 72914c0a534Smrg echo c1-convex-bsd 73014c0a534Smrg exit ;; 73114c0a534Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 73214c0a534Smrg if getsysinfo -f scalar_acc 73314c0a534Smrg then echo c32-convex-bsd 73414c0a534Smrg else echo c2-convex-bsd 73514c0a534Smrg fi 73614c0a534Smrg exit ;; 73714c0a534Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 73814c0a534Smrg echo c34-convex-bsd 73914c0a534Smrg exit ;; 74014c0a534Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 74114c0a534Smrg echo c38-convex-bsd 74214c0a534Smrg exit ;; 74314c0a534Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 74414c0a534Smrg echo c4-convex-bsd 74514c0a534Smrg exit ;; 74614c0a534Smrg CRAY*Y-MP:*:*:*) 74714c0a534Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 74814c0a534Smrg exit ;; 74914c0a534Smrg CRAY*[A-Z]90:*:*:*) 75014c0a534Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 75114c0a534Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 75214c0a534Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 75314c0a534Smrg -e 's/\.[^.]*$/.X/' 75414c0a534Smrg exit ;; 75514c0a534Smrg CRAY*TS:*:*:*) 75614c0a534Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 75714c0a534Smrg exit ;; 75814c0a534Smrg CRAY*T3E:*:*:*) 75914c0a534Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 76014c0a534Smrg exit ;; 76114c0a534Smrg CRAY*SV1:*:*:*) 76214c0a534Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 76314c0a534Smrg exit ;; 76414c0a534Smrg *:UNICOS/mp:*:*) 76514c0a534Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 76614c0a534Smrg exit ;; 76714c0a534Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 76814c0a534Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 76914c0a534Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 77014c0a534Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 77114c0a534Smrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 77214c0a534Smrg exit ;; 77314c0a534Smrg 5000:UNIX_System_V:4.*:*) 77414c0a534Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 77514c0a534Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 77614c0a534Smrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 77714c0a534Smrg exit ;; 77814c0a534Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 77914c0a534Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 78014c0a534Smrg exit ;; 78114c0a534Smrg sparc*:BSD/OS:*:*) 78214c0a534Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 78314c0a534Smrg exit ;; 78414c0a534Smrg *:BSD/OS:*:*) 78514c0a534Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 78614c0a534Smrg exit ;; 78714c0a534Smrg *:FreeBSD:*:*) 788bf2eeab3Smrg case ${UNAME_MACHINE} in 789bf2eeab3Smrg pc98) 790bf2eeab3Smrg echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 791bf2eeab3Smrg amd64) 792bf2eeab3Smrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 793bf2eeab3Smrg *) 794bf2eeab3Smrg echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 795bf2eeab3Smrg esac 79614c0a534Smrg exit ;; 79714c0a534Smrg i*:CYGWIN*:*) 79814c0a534Smrg echo ${UNAME_MACHINE}-pc-cygwin 79914c0a534Smrg exit ;; 800bf2eeab3Smrg *:MINGW*:*) 80114c0a534Smrg echo ${UNAME_MACHINE}-pc-mingw32 80214c0a534Smrg exit ;; 80314c0a534Smrg i*:windows32*:*) 80414c0a534Smrg # uname -m includes "-pc" on this system. 80514c0a534Smrg echo ${UNAME_MACHINE}-mingw32 80614c0a534Smrg exit ;; 80714c0a534Smrg i*:PW*:*) 80814c0a534Smrg echo ${UNAME_MACHINE}-pc-pw32 80914c0a534Smrg exit ;; 810bf2eeab3Smrg *:Interix*:[3456]*) 811bf2eeab3Smrg case ${UNAME_MACHINE} in 812bf2eeab3Smrg x86) 813bf2eeab3Smrg echo i586-pc-interix${UNAME_RELEASE} 814bf2eeab3Smrg exit ;; 815bf2eeab3Smrg EM64T | authenticamd | genuineintel) 816bf2eeab3Smrg echo x86_64-unknown-interix${UNAME_RELEASE} 817bf2eeab3Smrg exit ;; 818bf2eeab3Smrg IA64) 819bf2eeab3Smrg echo ia64-unknown-interix${UNAME_RELEASE} 820bf2eeab3Smrg exit ;; 821bf2eeab3Smrg esac ;; 82214c0a534Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 82314c0a534Smrg echo i${UNAME_MACHINE}-pc-mks 82414c0a534Smrg exit ;; 82514c0a534Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 82614c0a534Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 82714c0a534Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 82814c0a534Smrg # UNAME_MACHINE based on the output of uname instead of i386? 82914c0a534Smrg echo i586-pc-interix 83014c0a534Smrg exit ;; 83114c0a534Smrg i*:UWIN*:*) 83214c0a534Smrg echo ${UNAME_MACHINE}-pc-uwin 83314c0a534Smrg exit ;; 834bf2eeab3Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 83514c0a534Smrg echo x86_64-unknown-cygwin 83614c0a534Smrg exit ;; 83714c0a534Smrg p*:CYGWIN*:*) 83814c0a534Smrg echo powerpcle-unknown-cygwin 83914c0a534Smrg exit ;; 84014c0a534Smrg prep*:SunOS:5.*:*) 84114c0a534Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 84214c0a534Smrg exit ;; 84314c0a534Smrg *:GNU:*:*) 84414c0a534Smrg # the GNU system 84514c0a534Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 84614c0a534Smrg exit ;; 84714c0a534Smrg *:GNU/*:*:*) 84814c0a534Smrg # other systems with GNU libc and userland 84914c0a534Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 85014c0a534Smrg exit ;; 85114c0a534Smrg i*86:Minix:*:*) 85214c0a534Smrg echo ${UNAME_MACHINE}-pc-minix 85314c0a534Smrg exit ;; 85414c0a534Smrg arm*:Linux:*:*) 855bf2eeab3Smrg eval $set_cc_for_build 856bf2eeab3Smrg if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 857bf2eeab3Smrg | grep -q __ARM_EABI__ 858bf2eeab3Smrg then 859bf2eeab3Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 860bf2eeab3Smrg else 861bf2eeab3Smrg echo ${UNAME_MACHINE}-unknown-linux-gnueabi 862bf2eeab3Smrg fi 863bf2eeab3Smrg exit ;; 864bf2eeab3Smrg avr32*:Linux:*:*) 86514c0a534Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 86614c0a534Smrg exit ;; 86714c0a534Smrg cris:Linux:*:*) 86814c0a534Smrg echo cris-axis-linux-gnu 86914c0a534Smrg exit ;; 87014c0a534Smrg crisv32:Linux:*:*) 87114c0a534Smrg echo crisv32-axis-linux-gnu 87214c0a534Smrg exit ;; 87314c0a534Smrg frv:Linux:*:*) 87414c0a534Smrg echo frv-unknown-linux-gnu 87514c0a534Smrg exit ;; 87614c0a534Smrg ia64:Linux:*:*) 87714c0a534Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 87814c0a534Smrg exit ;; 87914c0a534Smrg m32r*:Linux:*:*) 88014c0a534Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 88114c0a534Smrg exit ;; 88214c0a534Smrg m68*:Linux:*:*) 88314c0a534Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 88414c0a534Smrg exit ;; 88514c0a534Smrg mips:Linux:*:*) 88614c0a534Smrg eval $set_cc_for_build 88714c0a534Smrg sed 's/^ //' << EOF >$dummy.c 88814c0a534Smrg #undef CPU 88914c0a534Smrg #undef mips 89014c0a534Smrg #undef mipsel 89114c0a534Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 89214c0a534Smrg CPU=mipsel 89314c0a534Smrg #else 89414c0a534Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 89514c0a534Smrg CPU=mips 89614c0a534Smrg #else 89714c0a534Smrg CPU= 89814c0a534Smrg #endif 89914c0a534Smrg #endif 90014c0a534SmrgEOF 901bf2eeab3Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 902bf2eeab3Smrg /^CPU/{ 903bf2eeab3Smrg s: ::g 904bf2eeab3Smrg p 905bf2eeab3Smrg }'`" 90614c0a534Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 90714c0a534Smrg ;; 90814c0a534Smrg mips64:Linux:*:*) 90914c0a534Smrg eval $set_cc_for_build 91014c0a534Smrg sed 's/^ //' << EOF >$dummy.c 91114c0a534Smrg #undef CPU 91214c0a534Smrg #undef mips64 91314c0a534Smrg #undef mips64el 91414c0a534Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 91514c0a534Smrg CPU=mips64el 91614c0a534Smrg #else 91714c0a534Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 91814c0a534Smrg CPU=mips64 91914c0a534Smrg #else 92014c0a534Smrg CPU= 92114c0a534Smrg #endif 92214c0a534Smrg #endif 92314c0a534SmrgEOF 924bf2eeab3Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 925bf2eeab3Smrg /^CPU/{ 926bf2eeab3Smrg s: ::g 927bf2eeab3Smrg p 928bf2eeab3Smrg }'`" 92914c0a534Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 93014c0a534Smrg ;; 931bf2eeab3Smrg or32:Linux:*:*) 932bf2eeab3Smrg echo or32-unknown-linux-gnu 933bf2eeab3Smrg exit ;; 93414c0a534Smrg ppc:Linux:*:*) 93514c0a534Smrg echo powerpc-unknown-linux-gnu 93614c0a534Smrg exit ;; 93714c0a534Smrg ppc64:Linux:*:*) 93814c0a534Smrg echo powerpc64-unknown-linux-gnu 93914c0a534Smrg exit ;; 94014c0a534Smrg alpha:Linux:*:*) 94114c0a534Smrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 94214c0a534Smrg EV5) UNAME_MACHINE=alphaev5 ;; 94314c0a534Smrg EV56) UNAME_MACHINE=alphaev56 ;; 94414c0a534Smrg PCA56) UNAME_MACHINE=alphapca56 ;; 94514c0a534Smrg PCA57) UNAME_MACHINE=alphapca56 ;; 94614c0a534Smrg EV6) UNAME_MACHINE=alphaev6 ;; 94714c0a534Smrg EV67) UNAME_MACHINE=alphaev67 ;; 94814c0a534Smrg EV68*) UNAME_MACHINE=alphaev68 ;; 94914c0a534Smrg esac 95014c0a534Smrg objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 95114c0a534Smrg if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 95214c0a534Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 95314c0a534Smrg exit ;; 954bf2eeab3Smrg padre:Linux:*:*) 955bf2eeab3Smrg echo sparc-unknown-linux-gnu 956bf2eeab3Smrg exit ;; 95714c0a534Smrg parisc:Linux:*:* | hppa:Linux:*:*) 95814c0a534Smrg # Look for CPU level 95914c0a534Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 96014c0a534Smrg PA7*) echo hppa1.1-unknown-linux-gnu ;; 96114c0a534Smrg PA8*) echo hppa2.0-unknown-linux-gnu ;; 96214c0a534Smrg *) echo hppa-unknown-linux-gnu ;; 96314c0a534Smrg esac 96414c0a534Smrg exit ;; 96514c0a534Smrg parisc64:Linux:*:* | hppa64:Linux:*:*) 96614c0a534Smrg echo hppa64-unknown-linux-gnu 96714c0a534Smrg exit ;; 96814c0a534Smrg s390:Linux:*:* | s390x:Linux:*:*) 96914c0a534Smrg echo ${UNAME_MACHINE}-ibm-linux 97014c0a534Smrg exit ;; 97114c0a534Smrg sh64*:Linux:*:*) 97214c0a534Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 97314c0a534Smrg exit ;; 97414c0a534Smrg sh*:Linux:*:*) 97514c0a534Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 97614c0a534Smrg exit ;; 97714c0a534Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 97814c0a534Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 97914c0a534Smrg exit ;; 980bf2eeab3Smrg vax:Linux:*:*) 981bf2eeab3Smrg echo ${UNAME_MACHINE}-dec-linux-gnu 982bf2eeab3Smrg exit ;; 98314c0a534Smrg x86_64:Linux:*:*) 98414c0a534Smrg echo x86_64-unknown-linux-gnu 98514c0a534Smrg exit ;; 986bf2eeab3Smrg xtensa*:Linux:*:*) 987bf2eeab3Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 988bf2eeab3Smrg exit ;; 98914c0a534Smrg i*86:Linux:*:*) 99014c0a534Smrg # The BFD linker knows what the default object file format is, so 99114c0a534Smrg # first see if it will tell us. cd to the root directory to prevent 99214c0a534Smrg # problems with other programs or directories called `ld' in the path. 99314c0a534Smrg # Set LC_ALL=C to ensure ld outputs messages in English. 99414c0a534Smrg ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ 99514c0a534Smrg | sed -ne '/supported targets:/!d 99614c0a534Smrg s/[ ][ ]*/ /g 99714c0a534Smrg s/.*supported targets: *// 99814c0a534Smrg s/ .*// 99914c0a534Smrg p'` 100014c0a534Smrg case "$ld_supported_targets" in 100114c0a534Smrg elf32-i386) 100214c0a534Smrg TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 100314c0a534Smrg ;; 100414c0a534Smrg a.out-i386-linux) 100514c0a534Smrg echo "${UNAME_MACHINE}-pc-linux-gnuaout" 100614c0a534Smrg exit ;; 100714c0a534Smrg "") 100814c0a534Smrg # Either a pre-BFD a.out linker (linux-gnuoldld) or 100914c0a534Smrg # one that does not give us useful --help. 101014c0a534Smrg echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 101114c0a534Smrg exit ;; 101214c0a534Smrg esac 101314c0a534Smrg # Determine whether the default compiler is a.out or elf 101414c0a534Smrg eval $set_cc_for_build 101514c0a534Smrg sed 's/^ //' << EOF >$dummy.c 101614c0a534Smrg #include <features.h> 101714c0a534Smrg #ifdef __ELF__ 101814c0a534Smrg # ifdef __GLIBC__ 101914c0a534Smrg # if __GLIBC__ >= 2 102014c0a534Smrg LIBC=gnu 102114c0a534Smrg # else 102214c0a534Smrg LIBC=gnulibc1 102314c0a534Smrg # endif 102414c0a534Smrg # else 102514c0a534Smrg LIBC=gnulibc1 102614c0a534Smrg # endif 102714c0a534Smrg #else 1028bf2eeab3Smrg #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) 102914c0a534Smrg LIBC=gnu 103014c0a534Smrg #else 103114c0a534Smrg LIBC=gnuaout 103214c0a534Smrg #endif 103314c0a534Smrg #endif 103414c0a534Smrg #ifdef __dietlibc__ 103514c0a534Smrg LIBC=dietlibc 103614c0a534Smrg #endif 103714c0a534SmrgEOF 1038bf2eeab3Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 1039bf2eeab3Smrg /^LIBC/{ 1040bf2eeab3Smrg s: ::g 1041bf2eeab3Smrg p 1042bf2eeab3Smrg }'`" 104314c0a534Smrg test x"${LIBC}" != x && { 104414c0a534Smrg echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 104514c0a534Smrg exit 104614c0a534Smrg } 104714c0a534Smrg test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } 104814c0a534Smrg ;; 104914c0a534Smrg i*86:DYNIX/ptx:4*:*) 105014c0a534Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 105114c0a534Smrg # earlier versions are messed up and put the nodename in both 105214c0a534Smrg # sysname and nodename. 105314c0a534Smrg echo i386-sequent-sysv4 105414c0a534Smrg exit ;; 105514c0a534Smrg i*86:UNIX_SV:4.2MP:2.*) 105614c0a534Smrg # Unixware is an offshoot of SVR4, but it has its own version 105714c0a534Smrg # number series starting with 2... 105814c0a534Smrg # I am not positive that other SVR4 systems won't match this, 105914c0a534Smrg # I just have to hope. -- rms. 106014c0a534Smrg # Use sysv4.2uw... so that sysv4* matches it. 106114c0a534Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 106214c0a534Smrg exit ;; 106314c0a534Smrg i*86:OS/2:*:*) 106414c0a534Smrg # If we were able to find `uname', then EMX Unix compatibility 106514c0a534Smrg # is probably installed. 106614c0a534Smrg echo ${UNAME_MACHINE}-pc-os2-emx 106714c0a534Smrg exit ;; 106814c0a534Smrg i*86:XTS-300:*:STOP) 106914c0a534Smrg echo ${UNAME_MACHINE}-unknown-stop 107014c0a534Smrg exit ;; 107114c0a534Smrg i*86:atheos:*:*) 107214c0a534Smrg echo ${UNAME_MACHINE}-unknown-atheos 107314c0a534Smrg exit ;; 107414c0a534Smrg i*86:syllable:*:*) 107514c0a534Smrg echo ${UNAME_MACHINE}-pc-syllable 107614c0a534Smrg exit ;; 107714c0a534Smrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 107814c0a534Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 107914c0a534Smrg exit ;; 108014c0a534Smrg i*86:*DOS:*:*) 108114c0a534Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 108214c0a534Smrg exit ;; 108314c0a534Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 108414c0a534Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 108514c0a534Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 108614c0a534Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 108714c0a534Smrg else 108814c0a534Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 108914c0a534Smrg fi 109014c0a534Smrg exit ;; 109114c0a534Smrg i*86:*:5:[678]*) 109214c0a534Smrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 109314c0a534Smrg case `/bin/uname -X | grep "^Machine"` in 109414c0a534Smrg *486*) UNAME_MACHINE=i486 ;; 109514c0a534Smrg *Pentium) UNAME_MACHINE=i586 ;; 109614c0a534Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 109714c0a534Smrg esac 109814c0a534Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 109914c0a534Smrg exit ;; 110014c0a534Smrg i*86:*:3.2:*) 110114c0a534Smrg if test -f /usr/options/cb.name; then 110214c0a534Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 110314c0a534Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 110414c0a534Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 110514c0a534Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 110614c0a534Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 110714c0a534Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 110814c0a534Smrg && UNAME_MACHINE=i586 110914c0a534Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 111014c0a534Smrg && UNAME_MACHINE=i686 111114c0a534Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 111214c0a534Smrg && UNAME_MACHINE=i686 111314c0a534Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 111414c0a534Smrg else 111514c0a534Smrg echo ${UNAME_MACHINE}-pc-sysv32 111614c0a534Smrg fi 111714c0a534Smrg exit ;; 111814c0a534Smrg pc:*:*:*) 111914c0a534Smrg # Left here for compatibility: 112014c0a534Smrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 1121bf2eeab3Smrg # the processor, so we play safe by assuming i586. 1122bf2eeab3Smrg # Note: whatever this is, it MUST be the same as what config.sub 1123bf2eeab3Smrg # prints for the "djgpp" host, or else GDB configury will decide that 1124bf2eeab3Smrg # this is a cross-build. 1125bf2eeab3Smrg echo i586-pc-msdosdjgpp 112614c0a534Smrg exit ;; 112714c0a534Smrg Intel:Mach:3*:*) 112814c0a534Smrg echo i386-pc-mach3 112914c0a534Smrg exit ;; 113014c0a534Smrg paragon:*:*:*) 113114c0a534Smrg echo i860-intel-osf1 113214c0a534Smrg exit ;; 113314c0a534Smrg i860:*:4.*:*) # i860-SVR4 113414c0a534Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 113514c0a534Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 113614c0a534Smrg else # Add other i860-SVR4 vendors below as they are discovered. 113714c0a534Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 113814c0a534Smrg fi 113914c0a534Smrg exit ;; 114014c0a534Smrg mini*:CTIX:SYS*5:*) 114114c0a534Smrg # "miniframe" 114214c0a534Smrg echo m68010-convergent-sysv 114314c0a534Smrg exit ;; 114414c0a534Smrg mc68k:UNIX:SYSTEM5:3.51m) 114514c0a534Smrg echo m68k-convergent-sysv 114614c0a534Smrg exit ;; 114714c0a534Smrg M680?0:D-NIX:5.3:*) 114814c0a534Smrg echo m68k-diab-dnix 114914c0a534Smrg exit ;; 115014c0a534Smrg M68*:*:R3V[5678]*:*) 115114c0a534Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 115214c0a534Smrg 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) 115314c0a534Smrg OS_REL='' 115414c0a534Smrg test -r /etc/.relid \ 115514c0a534Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 115614c0a534Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 115714c0a534Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 115814c0a534Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 115914c0a534Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 116014c0a534Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 116114c0a534Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 116214c0a534Smrg && { echo i486-ncr-sysv4; exit; } ;; 1163bf2eeab3Smrg NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1164bf2eeab3Smrg OS_REL='.3' 1165bf2eeab3Smrg test -r /etc/.relid \ 1166bf2eeab3Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1167bf2eeab3Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1168bf2eeab3Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1169bf2eeab3Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1170bf2eeab3Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1171bf2eeab3Smrg /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1172bf2eeab3Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 117314c0a534Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 117414c0a534Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 117514c0a534Smrg exit ;; 117614c0a534Smrg mc68030:UNIX_System_V:4.*:*) 117714c0a534Smrg echo m68k-atari-sysv4 117814c0a534Smrg exit ;; 117914c0a534Smrg TSUNAMI:LynxOS:2.*:*) 118014c0a534Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 118114c0a534Smrg exit ;; 118214c0a534Smrg rs6000:LynxOS:2.*:*) 118314c0a534Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 118414c0a534Smrg exit ;; 118514c0a534Smrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 118614c0a534Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 118714c0a534Smrg exit ;; 118814c0a534Smrg SM[BE]S:UNIX_SV:*:*) 118914c0a534Smrg echo mips-dde-sysv${UNAME_RELEASE} 119014c0a534Smrg exit ;; 119114c0a534Smrg RM*:ReliantUNIX-*:*:*) 119214c0a534Smrg echo mips-sni-sysv4 119314c0a534Smrg exit ;; 119414c0a534Smrg RM*:SINIX-*:*:*) 119514c0a534Smrg echo mips-sni-sysv4 119614c0a534Smrg exit ;; 119714c0a534Smrg *:SINIX-*:*:*) 119814c0a534Smrg if uname -p 2>/dev/null >/dev/null ; then 119914c0a534Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 120014c0a534Smrg echo ${UNAME_MACHINE}-sni-sysv4 120114c0a534Smrg else 120214c0a534Smrg echo ns32k-sni-sysv 120314c0a534Smrg fi 120414c0a534Smrg exit ;; 120514c0a534Smrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 120614c0a534Smrg # says <Richard.M.Bartel@ccMail.Census.GOV> 120714c0a534Smrg echo i586-unisys-sysv4 120814c0a534Smrg exit ;; 120914c0a534Smrg *:UNIX_System_V:4*:FTX*) 121014c0a534Smrg # From Gerald Hewes <hewes@openmarket.com>. 121114c0a534Smrg # How about differentiating between stratus architectures? -djm 121214c0a534Smrg echo hppa1.1-stratus-sysv4 121314c0a534Smrg exit ;; 121414c0a534Smrg *:*:*:FTX*) 121514c0a534Smrg # From seanf@swdc.stratus.com. 121614c0a534Smrg echo i860-stratus-sysv4 121714c0a534Smrg exit ;; 121814c0a534Smrg i*86:VOS:*:*) 121914c0a534Smrg # From Paul.Green@stratus.com. 122014c0a534Smrg echo ${UNAME_MACHINE}-stratus-vos 122114c0a534Smrg exit ;; 122214c0a534Smrg *:VOS:*:*) 122314c0a534Smrg # From Paul.Green@stratus.com. 122414c0a534Smrg echo hppa1.1-stratus-vos 122514c0a534Smrg exit ;; 122614c0a534Smrg mc68*:A/UX:*:*) 122714c0a534Smrg echo m68k-apple-aux${UNAME_RELEASE} 122814c0a534Smrg exit ;; 122914c0a534Smrg news*:NEWS-OS:6*:*) 123014c0a534Smrg echo mips-sony-newsos6 123114c0a534Smrg exit ;; 123214c0a534Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 123314c0a534Smrg if [ -d /usr/nec ]; then 123414c0a534Smrg echo mips-nec-sysv${UNAME_RELEASE} 123514c0a534Smrg else 123614c0a534Smrg echo mips-unknown-sysv${UNAME_RELEASE} 123714c0a534Smrg fi 123814c0a534Smrg exit ;; 123914c0a534Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 124014c0a534Smrg echo powerpc-be-beos 124114c0a534Smrg exit ;; 124214c0a534Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 124314c0a534Smrg echo powerpc-apple-beos 124414c0a534Smrg exit ;; 124514c0a534Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 124614c0a534Smrg echo i586-pc-beos 124714c0a534Smrg exit ;; 1248bf2eeab3Smrg BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1249bf2eeab3Smrg echo i586-pc-haiku 1250bf2eeab3Smrg exit ;; 125114c0a534Smrg SX-4:SUPER-UX:*:*) 125214c0a534Smrg echo sx4-nec-superux${UNAME_RELEASE} 125314c0a534Smrg exit ;; 125414c0a534Smrg SX-5:SUPER-UX:*:*) 125514c0a534Smrg echo sx5-nec-superux${UNAME_RELEASE} 125614c0a534Smrg exit ;; 125714c0a534Smrg SX-6:SUPER-UX:*:*) 125814c0a534Smrg echo sx6-nec-superux${UNAME_RELEASE} 125914c0a534Smrg exit ;; 1260bf2eeab3Smrg SX-7:SUPER-UX:*:*) 1261bf2eeab3Smrg echo sx7-nec-superux${UNAME_RELEASE} 1262bf2eeab3Smrg exit ;; 1263bf2eeab3Smrg SX-8:SUPER-UX:*:*) 1264bf2eeab3Smrg echo sx8-nec-superux${UNAME_RELEASE} 1265bf2eeab3Smrg exit ;; 1266bf2eeab3Smrg SX-8R:SUPER-UX:*:*) 1267bf2eeab3Smrg echo sx8r-nec-superux${UNAME_RELEASE} 1268bf2eeab3Smrg exit ;; 126914c0a534Smrg Power*:Rhapsody:*:*) 127014c0a534Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 127114c0a534Smrg exit ;; 127214c0a534Smrg *:Rhapsody:*:*) 127314c0a534Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 127414c0a534Smrg exit ;; 127514c0a534Smrg *:Darwin:*:*) 127614c0a534Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 127714c0a534Smrg case $UNAME_PROCESSOR in 127814c0a534Smrg unknown) UNAME_PROCESSOR=powerpc ;; 127914c0a534Smrg esac 128014c0a534Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 128114c0a534Smrg exit ;; 128214c0a534Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 128314c0a534Smrg UNAME_PROCESSOR=`uname -p` 128414c0a534Smrg if test "$UNAME_PROCESSOR" = "x86"; then 128514c0a534Smrg UNAME_PROCESSOR=i386 128614c0a534Smrg UNAME_MACHINE=pc 128714c0a534Smrg fi 128814c0a534Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 128914c0a534Smrg exit ;; 129014c0a534Smrg *:QNX:*:4*) 129114c0a534Smrg echo i386-pc-qnx 129214c0a534Smrg exit ;; 129314c0a534Smrg NSE-?:NONSTOP_KERNEL:*:*) 129414c0a534Smrg echo nse-tandem-nsk${UNAME_RELEASE} 129514c0a534Smrg exit ;; 129614c0a534Smrg NSR-?:NONSTOP_KERNEL:*:*) 129714c0a534Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 129814c0a534Smrg exit ;; 129914c0a534Smrg *:NonStop-UX:*:*) 130014c0a534Smrg echo mips-compaq-nonstopux 130114c0a534Smrg exit ;; 130214c0a534Smrg BS2000:POSIX*:*:*) 130314c0a534Smrg echo bs2000-siemens-sysv 130414c0a534Smrg exit ;; 130514c0a534Smrg DS/*:UNIX_System_V:*:*) 130614c0a534Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 130714c0a534Smrg exit ;; 130814c0a534Smrg *:Plan9:*:*) 130914c0a534Smrg # "uname -m" is not consistent, so use $cputype instead. 386 131014c0a534Smrg # is converted to i386 for consistency with other x86 131114c0a534Smrg # operating systems. 131214c0a534Smrg if test "$cputype" = "386"; then 131314c0a534Smrg UNAME_MACHINE=i386 131414c0a534Smrg else 131514c0a534Smrg UNAME_MACHINE="$cputype" 131614c0a534Smrg fi 131714c0a534Smrg echo ${UNAME_MACHINE}-unknown-plan9 131814c0a534Smrg exit ;; 131914c0a534Smrg *:TOPS-10:*:*) 132014c0a534Smrg echo pdp10-unknown-tops10 132114c0a534Smrg exit ;; 132214c0a534Smrg *:TENEX:*:*) 132314c0a534Smrg echo pdp10-unknown-tenex 132414c0a534Smrg exit ;; 132514c0a534Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 132614c0a534Smrg echo pdp10-dec-tops20 132714c0a534Smrg exit ;; 132814c0a534Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 132914c0a534Smrg echo pdp10-xkl-tops20 133014c0a534Smrg exit ;; 133114c0a534Smrg *:TOPS-20:*:*) 133214c0a534Smrg echo pdp10-unknown-tops20 133314c0a534Smrg exit ;; 133414c0a534Smrg *:ITS:*:*) 133514c0a534Smrg echo pdp10-unknown-its 133614c0a534Smrg exit ;; 133714c0a534Smrg SEI:*:*:SEIUX) 133814c0a534Smrg echo mips-sei-seiux${UNAME_RELEASE} 133914c0a534Smrg exit ;; 134014c0a534Smrg *:DragonFly:*:*) 134114c0a534Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 134214c0a534Smrg exit ;; 134314c0a534Smrg *:*VMS:*:*) 134414c0a534Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 134514c0a534Smrg case "${UNAME_MACHINE}" in 134614c0a534Smrg A*) echo alpha-dec-vms ; exit ;; 134714c0a534Smrg I*) echo ia64-dec-vms ; exit ;; 134814c0a534Smrg V*) echo vax-dec-vms ; exit ;; 134914c0a534Smrg esac ;; 135014c0a534Smrg *:XENIX:*:SysV) 135114c0a534Smrg echo i386-pc-xenix 135214c0a534Smrg exit ;; 135314c0a534Smrg i*86:skyos:*:*) 135414c0a534Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 135514c0a534Smrg exit ;; 1356bf2eeab3Smrg i*86:rdos:*:*) 1357bf2eeab3Smrg echo ${UNAME_MACHINE}-pc-rdos 1358bf2eeab3Smrg exit ;; 1359bf2eeab3Smrg i*86:AROS:*:*) 1360bf2eeab3Smrg echo ${UNAME_MACHINE}-pc-aros 1361bf2eeab3Smrg exit ;; 136214c0a534Smrgesac 136314c0a534Smrg 136414c0a534Smrg#echo '(No uname command or uname output not recognized.)' 1>&2 136514c0a534Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 136614c0a534Smrg 136714c0a534Smrgeval $set_cc_for_build 136814c0a534Smrgcat >$dummy.c <<EOF 136914c0a534Smrg#ifdef _SEQUENT_ 137014c0a534Smrg# include <sys/types.h> 137114c0a534Smrg# include <sys/utsname.h> 137214c0a534Smrg#endif 137314c0a534Smrgmain () 137414c0a534Smrg{ 137514c0a534Smrg#if defined (sony) 137614c0a534Smrg#if defined (MIPSEB) 137714c0a534Smrg /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 137814c0a534Smrg I don't know.... */ 137914c0a534Smrg printf ("mips-sony-bsd\n"); exit (0); 138014c0a534Smrg#else 138114c0a534Smrg#include <sys/param.h> 138214c0a534Smrg printf ("m68k-sony-newsos%s\n", 138314c0a534Smrg#ifdef NEWSOS4 138414c0a534Smrg "4" 138514c0a534Smrg#else 138614c0a534Smrg "" 138714c0a534Smrg#endif 138814c0a534Smrg ); exit (0); 138914c0a534Smrg#endif 139014c0a534Smrg#endif 139114c0a534Smrg 139214c0a534Smrg#if defined (__arm) && defined (__acorn) && defined (__unix) 139314c0a534Smrg printf ("arm-acorn-riscix\n"); exit (0); 139414c0a534Smrg#endif 139514c0a534Smrg 139614c0a534Smrg#if defined (hp300) && !defined (hpux) 139714c0a534Smrg printf ("m68k-hp-bsd\n"); exit (0); 139814c0a534Smrg#endif 139914c0a534Smrg 140014c0a534Smrg#if defined (NeXT) 140114c0a534Smrg#if !defined (__ARCHITECTURE__) 140214c0a534Smrg#define __ARCHITECTURE__ "m68k" 140314c0a534Smrg#endif 140414c0a534Smrg int version; 140514c0a534Smrg version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 140614c0a534Smrg if (version < 4) 140714c0a534Smrg printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 140814c0a534Smrg else 140914c0a534Smrg printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 141014c0a534Smrg exit (0); 141114c0a534Smrg#endif 141214c0a534Smrg 141314c0a534Smrg#if defined (MULTIMAX) || defined (n16) 141414c0a534Smrg#if defined (UMAXV) 141514c0a534Smrg printf ("ns32k-encore-sysv\n"); exit (0); 141614c0a534Smrg#else 141714c0a534Smrg#if defined (CMU) 141814c0a534Smrg printf ("ns32k-encore-mach\n"); exit (0); 141914c0a534Smrg#else 142014c0a534Smrg printf ("ns32k-encore-bsd\n"); exit (0); 142114c0a534Smrg#endif 142214c0a534Smrg#endif 142314c0a534Smrg#endif 142414c0a534Smrg 142514c0a534Smrg#if defined (__386BSD__) 142614c0a534Smrg printf ("i386-pc-bsd\n"); exit (0); 142714c0a534Smrg#endif 142814c0a534Smrg 142914c0a534Smrg#if defined (sequent) 143014c0a534Smrg#if defined (i386) 143114c0a534Smrg printf ("i386-sequent-dynix\n"); exit (0); 143214c0a534Smrg#endif 143314c0a534Smrg#if defined (ns32000) 143414c0a534Smrg printf ("ns32k-sequent-dynix\n"); exit (0); 143514c0a534Smrg#endif 143614c0a534Smrg#endif 143714c0a534Smrg 143814c0a534Smrg#if defined (_SEQUENT_) 143914c0a534Smrg struct utsname un; 144014c0a534Smrg 144114c0a534Smrg uname(&un); 144214c0a534Smrg 144314c0a534Smrg if (strncmp(un.version, "V2", 2) == 0) { 144414c0a534Smrg printf ("i386-sequent-ptx2\n"); exit (0); 144514c0a534Smrg } 144614c0a534Smrg if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 144714c0a534Smrg printf ("i386-sequent-ptx1\n"); exit (0); 144814c0a534Smrg } 144914c0a534Smrg printf ("i386-sequent-ptx\n"); exit (0); 145014c0a534Smrg 145114c0a534Smrg#endif 145214c0a534Smrg 145314c0a534Smrg#if defined (vax) 145414c0a534Smrg# if !defined (ultrix) 145514c0a534Smrg# include <sys/param.h> 145614c0a534Smrg# if defined (BSD) 145714c0a534Smrg# if BSD == 43 145814c0a534Smrg printf ("vax-dec-bsd4.3\n"); exit (0); 145914c0a534Smrg# else 146014c0a534Smrg# if BSD == 199006 146114c0a534Smrg printf ("vax-dec-bsd4.3reno\n"); exit (0); 146214c0a534Smrg# else 146314c0a534Smrg printf ("vax-dec-bsd\n"); exit (0); 146414c0a534Smrg# endif 146514c0a534Smrg# endif 146614c0a534Smrg# else 146714c0a534Smrg printf ("vax-dec-bsd\n"); exit (0); 146814c0a534Smrg# endif 146914c0a534Smrg# else 147014c0a534Smrg printf ("vax-dec-ultrix\n"); exit (0); 147114c0a534Smrg# endif 147214c0a534Smrg#endif 147314c0a534Smrg 147414c0a534Smrg#if defined (alliant) && defined (i860) 147514c0a534Smrg printf ("i860-alliant-bsd\n"); exit (0); 147614c0a534Smrg#endif 147714c0a534Smrg 147814c0a534Smrg exit (1); 147914c0a534Smrg} 148014c0a534SmrgEOF 148114c0a534Smrg 148214c0a534Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 148314c0a534Smrg { echo "$SYSTEM_NAME"; exit; } 148414c0a534Smrg 148514c0a534Smrg# Apollos put the system type in the environment. 148614c0a534Smrg 148714c0a534Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 148814c0a534Smrg 148914c0a534Smrg# Convex versions that predate uname can use getsysinfo(1) 149014c0a534Smrg 149114c0a534Smrgif [ -x /usr/convex/getsysinfo ] 149214c0a534Smrgthen 149314c0a534Smrg case `getsysinfo -f cpu_type` in 149414c0a534Smrg c1*) 149514c0a534Smrg echo c1-convex-bsd 149614c0a534Smrg exit ;; 149714c0a534Smrg c2*) 149814c0a534Smrg if getsysinfo -f scalar_acc 149914c0a534Smrg then echo c32-convex-bsd 150014c0a534Smrg else echo c2-convex-bsd 150114c0a534Smrg fi 150214c0a534Smrg exit ;; 150314c0a534Smrg c34*) 150414c0a534Smrg echo c34-convex-bsd 150514c0a534Smrg exit ;; 150614c0a534Smrg c38*) 150714c0a534Smrg echo c38-convex-bsd 150814c0a534Smrg exit ;; 150914c0a534Smrg c4*) 151014c0a534Smrg echo c4-convex-bsd 151114c0a534Smrg exit ;; 151214c0a534Smrg esac 151314c0a534Smrgfi 151414c0a534Smrg 151514c0a534Smrgcat >&2 <<EOF 151614c0a534Smrg$0: unable to guess system type 151714c0a534Smrg 151814c0a534SmrgThis script, last modified $timestamp, has failed to recognize 151914c0a534Smrgthe operating system you are using. It is advised that you 152014c0a534Smrgdownload the most up to date version of the config scripts from 152114c0a534Smrg 1522bf2eeab3Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 152314c0a534Smrgand 1524bf2eeab3Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 152514c0a534Smrg 152614c0a534SmrgIf the version you run ($0) is already up to date, please 152714c0a534Smrgsend the following data and any information you think might be 152814c0a534Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 152914c0a534Smrginformation to handle your system. 153014c0a534Smrg 153114c0a534Smrgconfig.guess timestamp = $timestamp 153214c0a534Smrg 153314c0a534Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 153414c0a534Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 153514c0a534Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 153614c0a534Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 153714c0a534Smrg 153814c0a534Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 153914c0a534Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 154014c0a534Smrg 154114c0a534Smrghostinfo = `(hostinfo) 2>/dev/null` 154214c0a534Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 154314c0a534Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 154414c0a534Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 154514c0a534Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 154614c0a534Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 154714c0a534Smrg 154814c0a534SmrgUNAME_MACHINE = ${UNAME_MACHINE} 154914c0a534SmrgUNAME_RELEASE = ${UNAME_RELEASE} 155014c0a534SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 155114c0a534SmrgUNAME_VERSION = ${UNAME_VERSION} 155214c0a534SmrgEOF 155314c0a534Smrg 155414c0a534Smrgexit 1 155514c0a534Smrg 155614c0a534Smrg# Local variables: 155714c0a534Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 155814c0a534Smrg# time-stamp-start: "timestamp='" 155914c0a534Smrg# time-stamp-format: "%:y-%02m-%02d" 156014c0a534Smrg# time-stamp-end: "'" 156114c0a534Smrg# End: 1562