config.guess revision 64ce7165
164ce7165Smrg#! /bin/sh 264ce7165Smrg# Attempt to guess a canonical system name. 364ce7165Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 464ce7165Smrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, 564ce7165Smrg# Inc. 664ce7165Smrg 764ce7165Smrgtimestamp='2006-07-02' 864ce7165Smrg 964ce7165Smrg# This file is free software; you can redistribute it and/or modify it 1064ce7165Smrg# under the terms of the GNU General Public License as published by 1164ce7165Smrg# the Free Software Foundation; either version 2 of the License, or 1264ce7165Smrg# (at your option) any later version. 1364ce7165Smrg# 1464ce7165Smrg# This program is distributed in the hope that it will be useful, but 1564ce7165Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1664ce7165Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1764ce7165Smrg# General Public License for more details. 1864ce7165Smrg# 1964ce7165Smrg# You should have received a copy of the GNU General Public License 2064ce7165Smrg# along with this program; if not, write to the Free Software 2164ce7165Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 2264ce7165Smrg# 02110-1301, USA. 2364ce7165Smrg# 2464ce7165Smrg# As a special exception to the GNU General Public License, if you 2564ce7165Smrg# distribute this file as part of a program that contains a 2664ce7165Smrg# configuration script generated by Autoconf, you may include it under 2764ce7165Smrg# the same distribution terms that you use for the rest of that program. 2864ce7165Smrg 2964ce7165Smrg 3064ce7165Smrg# Originally written by Per Bothner <per@bothner.com>. 3164ce7165Smrg# Please send patches to <config-patches@gnu.org>. Submit a context 3264ce7165Smrg# diff and a properly formatted ChangeLog entry. 3364ce7165Smrg# 3464ce7165Smrg# This script attempts to guess a canonical system name similar to 3564ce7165Smrg# config.sub. If it succeeds, it prints the system name on stdout, and 3664ce7165Smrg# exits with 0. Otherwise, it exits with 1. 3764ce7165Smrg# 3864ce7165Smrg# The plan is that this can be called by configure scripts if you 3964ce7165Smrg# don't specify an explicit build system type. 4064ce7165Smrg 4164ce7165Smrgme=`echo "$0" | sed -e 's,.*/,,'` 4264ce7165Smrg 4364ce7165Smrgusage="\ 4464ce7165SmrgUsage: $0 [OPTION] 4564ce7165Smrg 4664ce7165SmrgOutput the configuration name of the system \`$me' is run on. 4764ce7165Smrg 4864ce7165SmrgOperation modes: 4964ce7165Smrg -h, --help print this help, then exit 5064ce7165Smrg -t, --time-stamp print date of last modification, then exit 5164ce7165Smrg -v, --version print version number, then exit 5264ce7165Smrg 5364ce7165SmrgReport bugs and patches to <config-patches@gnu.org>." 5464ce7165Smrg 5564ce7165Smrgversion="\ 5664ce7165SmrgGNU config.guess ($timestamp) 5764ce7165Smrg 5864ce7165SmrgOriginally written by Per Bothner. 5964ce7165SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 6064ce7165SmrgFree Software Foundation, Inc. 6164ce7165Smrg 6264ce7165SmrgThis is free software; see the source for copying conditions. There is NO 6364ce7165Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 6464ce7165Smrg 6564ce7165Smrghelp=" 6664ce7165SmrgTry \`$me --help' for more information." 6764ce7165Smrg 6864ce7165Smrg# Parse command line 6964ce7165Smrgwhile test $# -gt 0 ; do 7064ce7165Smrg case $1 in 7164ce7165Smrg --time-stamp | --time* | -t ) 7264ce7165Smrg echo "$timestamp" ; exit ;; 7364ce7165Smrg --version | -v ) 7464ce7165Smrg echo "$version" ; exit ;; 7564ce7165Smrg --help | --h* | -h ) 7664ce7165Smrg echo "$usage"; exit ;; 7764ce7165Smrg -- ) # Stop option processing 7864ce7165Smrg shift; break ;; 7964ce7165Smrg - ) # Use stdin as input. 8064ce7165Smrg break ;; 8164ce7165Smrg -* ) 8264ce7165Smrg echo "$me: invalid option $1$help" >&2 8364ce7165Smrg exit 1 ;; 8464ce7165Smrg * ) 8564ce7165Smrg break ;; 8664ce7165Smrg esac 8764ce7165Smrgdone 8864ce7165Smrg 8964ce7165Smrgif test $# != 0; then 9064ce7165Smrg echo "$me: too many arguments$help" >&2 9164ce7165Smrg exit 1 9264ce7165Smrgfi 9364ce7165Smrg 9464ce7165Smrgtrap 'exit 1' 1 2 15 9564ce7165Smrg 9664ce7165Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 9764ce7165Smrg# compiler to aid in system detection is discouraged as it requires 9864ce7165Smrg# temporary files to be created and, as you can see below, it is a 9964ce7165Smrg# headache to deal with in a portable fashion. 10064ce7165Smrg 10164ce7165Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 10264ce7165Smrg# use `HOST_CC' if defined, but it is deprecated. 10364ce7165Smrg 10464ce7165Smrg# Portable tmp directory creation inspired by the Autoconf team. 10564ce7165Smrg 10664ce7165Smrgset_cc_for_build=' 10764ce7165Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 10864ce7165Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 10964ce7165Smrg: ${TMPDIR=/tmp} ; 11064ce7165Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 11164ce7165Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 11264ce7165Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 11364ce7165Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 11464ce7165Smrgdummy=$tmp/dummy ; 11564ce7165Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 11664ce7165Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 11764ce7165Smrg ,,) echo "int x;" > $dummy.c ; 11864ce7165Smrg for c in cc gcc c89 c99 ; do 11964ce7165Smrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 12064ce7165Smrg CC_FOR_BUILD="$c"; break ; 12164ce7165Smrg fi ; 12264ce7165Smrg done ; 12364ce7165Smrg if test x"$CC_FOR_BUILD" = x ; then 12464ce7165Smrg CC_FOR_BUILD=no_compiler_found ; 12564ce7165Smrg fi 12664ce7165Smrg ;; 12764ce7165Smrg ,,*) CC_FOR_BUILD=$CC ;; 12864ce7165Smrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 12964ce7165Smrgesac ; set_cc_for_build= ;' 13064ce7165Smrg 13164ce7165Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 13264ce7165Smrg# (ghazi@noc.rutgers.edu 1994-08-24) 13364ce7165Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 13464ce7165Smrg PATH=$PATH:/.attbin ; export PATH 13564ce7165Smrgfi 13664ce7165Smrg 13764ce7165SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 13864ce7165SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 13964ce7165SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 14064ce7165SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 14164ce7165Smrg 14264ce7165Smrg# Note: order is significant - the case branches are not exclusive. 14364ce7165Smrg 14464ce7165Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 14564ce7165Smrg *:NetBSD:*:*) 14664ce7165Smrg # NetBSD (nbsd) targets should (where applicable) match one or 14764ce7165Smrg # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 14864ce7165Smrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 14964ce7165Smrg # switched to ELF, *-*-netbsd* would select the old 15064ce7165Smrg # object file format. This provides both forward 15164ce7165Smrg # compatibility and a consistent mechanism for selecting the 15264ce7165Smrg # object file format. 15364ce7165Smrg # 15464ce7165Smrg # Note: NetBSD doesn't particularly care about the vendor 15564ce7165Smrg # portion of the name. We always set it to "unknown". 15664ce7165Smrg sysctl="sysctl -n hw.machine_arch" 15764ce7165Smrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 15864ce7165Smrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 15964ce7165Smrg case "${UNAME_MACHINE_ARCH}" in 16064ce7165Smrg armeb) machine=armeb-unknown ;; 16164ce7165Smrg arm*) machine=arm-unknown ;; 16264ce7165Smrg sh3el) machine=shl-unknown ;; 16364ce7165Smrg sh3eb) machine=sh-unknown ;; 16464ce7165Smrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 16564ce7165Smrg esac 16664ce7165Smrg # The Operating System including object format, if it has switched 16764ce7165Smrg # to ELF recently, or will in the future. 16864ce7165Smrg case "${UNAME_MACHINE_ARCH}" in 16964ce7165Smrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 17064ce7165Smrg eval $set_cc_for_build 17164ce7165Smrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 17264ce7165Smrg | grep __ELF__ >/dev/null 17364ce7165Smrg then 17464ce7165Smrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 17564ce7165Smrg # Return netbsd for either. FIX? 17664ce7165Smrg os=netbsd 17764ce7165Smrg else 17864ce7165Smrg os=netbsdelf 17964ce7165Smrg fi 18064ce7165Smrg ;; 18164ce7165Smrg *) 18264ce7165Smrg os=netbsd 18364ce7165Smrg ;; 18464ce7165Smrg esac 18564ce7165Smrg # The OS release 18664ce7165Smrg # Debian GNU/NetBSD machines have a different userland, and 18764ce7165Smrg # thus, need a distinct triplet. However, they do not need 18864ce7165Smrg # kernel version information, so it can be replaced with a 18964ce7165Smrg # suitable tag, in the style of linux-gnu. 19064ce7165Smrg case "${UNAME_VERSION}" in 19164ce7165Smrg Debian*) 19264ce7165Smrg release='-gnu' 19364ce7165Smrg ;; 19464ce7165Smrg *) 19564ce7165Smrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 19664ce7165Smrg ;; 19764ce7165Smrg esac 19864ce7165Smrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 19964ce7165Smrg # contains redundant information, the shorter form: 20064ce7165Smrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 20164ce7165Smrg echo "${machine}-${os}${release}" 20264ce7165Smrg exit ;; 20364ce7165Smrg *:OpenBSD:*:*) 20464ce7165Smrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 20564ce7165Smrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 20664ce7165Smrg exit ;; 20764ce7165Smrg *:ekkoBSD:*:*) 20864ce7165Smrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 20964ce7165Smrg exit ;; 21064ce7165Smrg *:SolidBSD:*:*) 21164ce7165Smrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 21264ce7165Smrg exit ;; 21364ce7165Smrg macppc:MirBSD:*:*) 21464ce7165Smrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 21564ce7165Smrg exit ;; 21664ce7165Smrg *:MirBSD:*:*) 21764ce7165Smrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 21864ce7165Smrg exit ;; 21964ce7165Smrg alpha:OSF1:*:*) 22064ce7165Smrg case $UNAME_RELEASE in 22164ce7165Smrg *4.0) 22264ce7165Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 22364ce7165Smrg ;; 22464ce7165Smrg *5.*) 22564ce7165Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 22664ce7165Smrg ;; 22764ce7165Smrg esac 22864ce7165Smrg # According to Compaq, /usr/sbin/psrinfo has been available on 22964ce7165Smrg # OSF/1 and Tru64 systems produced since 1995. I hope that 23064ce7165Smrg # covers most systems running today. This code pipes the CPU 23164ce7165Smrg # types through head -n 1, so we only detect the type of CPU 0. 23264ce7165Smrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 23364ce7165Smrg case "$ALPHA_CPU_TYPE" in 23464ce7165Smrg "EV4 (21064)") 23564ce7165Smrg UNAME_MACHINE="alpha" ;; 23664ce7165Smrg "EV4.5 (21064)") 23764ce7165Smrg UNAME_MACHINE="alpha" ;; 23864ce7165Smrg "LCA4 (21066/21068)") 23964ce7165Smrg UNAME_MACHINE="alpha" ;; 24064ce7165Smrg "EV5 (21164)") 24164ce7165Smrg UNAME_MACHINE="alphaev5" ;; 24264ce7165Smrg "EV5.6 (21164A)") 24364ce7165Smrg UNAME_MACHINE="alphaev56" ;; 24464ce7165Smrg "EV5.6 (21164PC)") 24564ce7165Smrg UNAME_MACHINE="alphapca56" ;; 24664ce7165Smrg "EV5.7 (21164PC)") 24764ce7165Smrg UNAME_MACHINE="alphapca57" ;; 24864ce7165Smrg "EV6 (21264)") 24964ce7165Smrg UNAME_MACHINE="alphaev6" ;; 25064ce7165Smrg "EV6.7 (21264A)") 25164ce7165Smrg UNAME_MACHINE="alphaev67" ;; 25264ce7165Smrg "EV6.8CB (21264C)") 25364ce7165Smrg UNAME_MACHINE="alphaev68" ;; 25464ce7165Smrg "EV6.8AL (21264B)") 25564ce7165Smrg UNAME_MACHINE="alphaev68" ;; 25664ce7165Smrg "EV6.8CX (21264D)") 25764ce7165Smrg UNAME_MACHINE="alphaev68" ;; 25864ce7165Smrg "EV6.9A (21264/EV69A)") 25964ce7165Smrg UNAME_MACHINE="alphaev69" ;; 26064ce7165Smrg "EV7 (21364)") 26164ce7165Smrg UNAME_MACHINE="alphaev7" ;; 26264ce7165Smrg "EV7.9 (21364A)") 26364ce7165Smrg UNAME_MACHINE="alphaev79" ;; 26464ce7165Smrg esac 26564ce7165Smrg # A Pn.n version is a patched version. 26664ce7165Smrg # A Vn.n version is a released version. 26764ce7165Smrg # A Tn.n version is a released field test version. 26864ce7165Smrg # A Xn.n version is an unreleased experimental baselevel. 26964ce7165Smrg # 1.2 uses "1.2" for uname -r. 27064ce7165Smrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 27164ce7165Smrg exit ;; 27264ce7165Smrg Alpha\ *:Windows_NT*:*) 27364ce7165Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 27464ce7165Smrg # Should we change UNAME_MACHINE based on the output of uname instead 27564ce7165Smrg # of the specific Alpha model? 27664ce7165Smrg echo alpha-pc-interix 27764ce7165Smrg exit ;; 27864ce7165Smrg 21064:Windows_NT:50:3) 27964ce7165Smrg echo alpha-dec-winnt3.5 28064ce7165Smrg exit ;; 28164ce7165Smrg Amiga*:UNIX_System_V:4.0:*) 28264ce7165Smrg echo m68k-unknown-sysv4 28364ce7165Smrg exit ;; 28464ce7165Smrg *:[Aa]miga[Oo][Ss]:*:*) 28564ce7165Smrg echo ${UNAME_MACHINE}-unknown-amigaos 28664ce7165Smrg exit ;; 28764ce7165Smrg *:[Mm]orph[Oo][Ss]:*:*) 28864ce7165Smrg echo ${UNAME_MACHINE}-unknown-morphos 28964ce7165Smrg exit ;; 29064ce7165Smrg *:OS/390:*:*) 29164ce7165Smrg echo i370-ibm-openedition 29264ce7165Smrg exit ;; 29364ce7165Smrg *:z/VM:*:*) 29464ce7165Smrg echo s390-ibm-zvmoe 29564ce7165Smrg exit ;; 29664ce7165Smrg *:OS400:*:*) 29764ce7165Smrg echo powerpc-ibm-os400 29864ce7165Smrg exit ;; 29964ce7165Smrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 30064ce7165Smrg echo arm-acorn-riscix${UNAME_RELEASE} 30164ce7165Smrg exit ;; 30264ce7165Smrg arm:riscos:*:*|arm:RISCOS:*:*) 30364ce7165Smrg echo arm-unknown-riscos 30464ce7165Smrg exit ;; 30564ce7165Smrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 30664ce7165Smrg echo hppa1.1-hitachi-hiuxmpp 30764ce7165Smrg exit ;; 30864ce7165Smrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 30964ce7165Smrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 31064ce7165Smrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 31164ce7165Smrg echo pyramid-pyramid-sysv3 31264ce7165Smrg else 31364ce7165Smrg echo pyramid-pyramid-bsd 31464ce7165Smrg fi 31564ce7165Smrg exit ;; 31664ce7165Smrg NILE*:*:*:dcosx) 31764ce7165Smrg echo pyramid-pyramid-svr4 31864ce7165Smrg exit ;; 31964ce7165Smrg DRS?6000:unix:4.0:6*) 32064ce7165Smrg echo sparc-icl-nx6 32164ce7165Smrg exit ;; 32264ce7165Smrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 32364ce7165Smrg case `/usr/bin/uname -p` in 32464ce7165Smrg sparc) echo sparc-icl-nx7; exit ;; 32564ce7165Smrg esac ;; 32664ce7165Smrg sun4H:SunOS:5.*:*) 32764ce7165Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 32864ce7165Smrg exit ;; 32964ce7165Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 33064ce7165Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 33164ce7165Smrg exit ;; 33264ce7165Smrg i86pc:SunOS:5.*:*) 33364ce7165Smrg echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 33464ce7165Smrg exit ;; 33564ce7165Smrg sun4*:SunOS:6*:*) 33664ce7165Smrg # According to config.sub, this is the proper way to canonicalize 33764ce7165Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 33864ce7165Smrg # it's likely to be more like Solaris than SunOS4. 33964ce7165Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 34064ce7165Smrg exit ;; 34164ce7165Smrg sun4*:SunOS:*:*) 34264ce7165Smrg case "`/usr/bin/arch -k`" in 34364ce7165Smrg Series*|S4*) 34464ce7165Smrg UNAME_RELEASE=`uname -v` 34564ce7165Smrg ;; 34664ce7165Smrg esac 34764ce7165Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 34864ce7165Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 34964ce7165Smrg exit ;; 35064ce7165Smrg sun3*:SunOS:*:*) 35164ce7165Smrg echo m68k-sun-sunos${UNAME_RELEASE} 35264ce7165Smrg exit ;; 35364ce7165Smrg sun*:*:4.2BSD:*) 35464ce7165Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 35564ce7165Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 35664ce7165Smrg case "`/bin/arch`" in 35764ce7165Smrg sun3) 35864ce7165Smrg echo m68k-sun-sunos${UNAME_RELEASE} 35964ce7165Smrg ;; 36064ce7165Smrg sun4) 36164ce7165Smrg echo sparc-sun-sunos${UNAME_RELEASE} 36264ce7165Smrg ;; 36364ce7165Smrg esac 36464ce7165Smrg exit ;; 36564ce7165Smrg aushp:SunOS:*:*) 36664ce7165Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 36764ce7165Smrg exit ;; 36864ce7165Smrg # The situation for MiNT is a little confusing. The machine name 36964ce7165Smrg # can be virtually everything (everything which is not 37064ce7165Smrg # "atarist" or "atariste" at least should have a processor 37164ce7165Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 37264ce7165Smrg # to the lowercase version "mint" (or "freemint"). Finally 37364ce7165Smrg # the system name "TOS" denotes a system which is actually not 37464ce7165Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 37564ce7165Smrg # be no problem. 37664ce7165Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 37764ce7165Smrg echo m68k-atari-mint${UNAME_RELEASE} 37864ce7165Smrg exit ;; 37964ce7165Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 38064ce7165Smrg echo m68k-atari-mint${UNAME_RELEASE} 38164ce7165Smrg exit ;; 38264ce7165Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 38364ce7165Smrg echo m68k-atari-mint${UNAME_RELEASE} 38464ce7165Smrg exit ;; 38564ce7165Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 38664ce7165Smrg echo m68k-milan-mint${UNAME_RELEASE} 38764ce7165Smrg exit ;; 38864ce7165Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 38964ce7165Smrg echo m68k-hades-mint${UNAME_RELEASE} 39064ce7165Smrg exit ;; 39164ce7165Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 39264ce7165Smrg echo m68k-unknown-mint${UNAME_RELEASE} 39364ce7165Smrg exit ;; 39464ce7165Smrg m68k:machten:*:*) 39564ce7165Smrg echo m68k-apple-machten${UNAME_RELEASE} 39664ce7165Smrg exit ;; 39764ce7165Smrg powerpc:machten:*:*) 39864ce7165Smrg echo powerpc-apple-machten${UNAME_RELEASE} 39964ce7165Smrg exit ;; 40064ce7165Smrg RISC*:Mach:*:*) 40164ce7165Smrg echo mips-dec-mach_bsd4.3 40264ce7165Smrg exit ;; 40364ce7165Smrg RISC*:ULTRIX:*:*) 40464ce7165Smrg echo mips-dec-ultrix${UNAME_RELEASE} 40564ce7165Smrg exit ;; 40664ce7165Smrg VAX*:ULTRIX*:*:*) 40764ce7165Smrg echo vax-dec-ultrix${UNAME_RELEASE} 40864ce7165Smrg exit ;; 40964ce7165Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 41064ce7165Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 41164ce7165Smrg exit ;; 41264ce7165Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 41364ce7165Smrg eval $set_cc_for_build 41464ce7165Smrg sed 's/^ //' << EOF >$dummy.c 41564ce7165Smrg#ifdef __cplusplus 41664ce7165Smrg#include <stdio.h> /* for printf() prototype */ 41764ce7165Smrg int main (int argc, char *argv[]) { 41864ce7165Smrg#else 41964ce7165Smrg int main (argc, argv) int argc; char *argv[]; { 42064ce7165Smrg#endif 42164ce7165Smrg #if defined (host_mips) && defined (MIPSEB) 42264ce7165Smrg #if defined (SYSTYPE_SYSV) 42364ce7165Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 42464ce7165Smrg #endif 42564ce7165Smrg #if defined (SYSTYPE_SVR4) 42664ce7165Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 42764ce7165Smrg #endif 42864ce7165Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 42964ce7165Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 43064ce7165Smrg #endif 43164ce7165Smrg #endif 43264ce7165Smrg exit (-1); 43364ce7165Smrg } 43464ce7165SmrgEOF 43564ce7165Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 43664ce7165Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 43764ce7165Smrg SYSTEM_NAME=`$dummy $dummyarg` && 43864ce7165Smrg { echo "$SYSTEM_NAME"; exit; } 43964ce7165Smrg echo mips-mips-riscos${UNAME_RELEASE} 44064ce7165Smrg exit ;; 44164ce7165Smrg Motorola:PowerMAX_OS:*:*) 44264ce7165Smrg echo powerpc-motorola-powermax 44364ce7165Smrg exit ;; 44464ce7165Smrg Motorola:*:4.3:PL8-*) 44564ce7165Smrg echo powerpc-harris-powermax 44664ce7165Smrg exit ;; 44764ce7165Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 44864ce7165Smrg echo powerpc-harris-powermax 44964ce7165Smrg exit ;; 45064ce7165Smrg Night_Hawk:Power_UNIX:*:*) 45164ce7165Smrg echo powerpc-harris-powerunix 45264ce7165Smrg exit ;; 45364ce7165Smrg m88k:CX/UX:7*:*) 45464ce7165Smrg echo m88k-harris-cxux7 45564ce7165Smrg exit ;; 45664ce7165Smrg m88k:*:4*:R4*) 45764ce7165Smrg echo m88k-motorola-sysv4 45864ce7165Smrg exit ;; 45964ce7165Smrg m88k:*:3*:R3*) 46064ce7165Smrg echo m88k-motorola-sysv3 46164ce7165Smrg exit ;; 46264ce7165Smrg AViiON:dgux:*:*) 46364ce7165Smrg # DG/UX returns AViiON for all architectures 46464ce7165Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 46564ce7165Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 46664ce7165Smrg then 46764ce7165Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 46864ce7165Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 46964ce7165Smrg then 47064ce7165Smrg echo m88k-dg-dgux${UNAME_RELEASE} 47164ce7165Smrg else 47264ce7165Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 47364ce7165Smrg fi 47464ce7165Smrg else 47564ce7165Smrg echo i586-dg-dgux${UNAME_RELEASE} 47664ce7165Smrg fi 47764ce7165Smrg exit ;; 47864ce7165Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 47964ce7165Smrg echo m88k-dolphin-sysv3 48064ce7165Smrg exit ;; 48164ce7165Smrg M88*:*:R3*:*) 48264ce7165Smrg # Delta 88k system running SVR3 48364ce7165Smrg echo m88k-motorola-sysv3 48464ce7165Smrg exit ;; 48564ce7165Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 48664ce7165Smrg echo m88k-tektronix-sysv3 48764ce7165Smrg exit ;; 48864ce7165Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 48964ce7165Smrg echo m68k-tektronix-bsd 49064ce7165Smrg exit ;; 49164ce7165Smrg *:IRIX*:*:*) 49264ce7165Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 49364ce7165Smrg exit ;; 49464ce7165Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 49564ce7165Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 49664ce7165Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 49764ce7165Smrg i*86:AIX:*:*) 49864ce7165Smrg echo i386-ibm-aix 49964ce7165Smrg exit ;; 50064ce7165Smrg ia64:AIX:*:*) 50164ce7165Smrg if [ -x /usr/bin/oslevel ] ; then 50264ce7165Smrg IBM_REV=`/usr/bin/oslevel` 50364ce7165Smrg else 50464ce7165Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 50564ce7165Smrg fi 50664ce7165Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 50764ce7165Smrg exit ;; 50864ce7165Smrg *:AIX:2:3) 50964ce7165Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 51064ce7165Smrg eval $set_cc_for_build 51164ce7165Smrg sed 's/^ //' << EOF >$dummy.c 51264ce7165Smrg #include <sys/systemcfg.h> 51364ce7165Smrg 51464ce7165Smrg main() 51564ce7165Smrg { 51664ce7165Smrg if (!__power_pc()) 51764ce7165Smrg exit(1); 51864ce7165Smrg puts("powerpc-ibm-aix3.2.5"); 51964ce7165Smrg exit(0); 52064ce7165Smrg } 52164ce7165SmrgEOF 52264ce7165Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 52364ce7165Smrg then 52464ce7165Smrg echo "$SYSTEM_NAME" 52564ce7165Smrg else 52664ce7165Smrg echo rs6000-ibm-aix3.2.5 52764ce7165Smrg fi 52864ce7165Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 52964ce7165Smrg echo rs6000-ibm-aix3.2.4 53064ce7165Smrg else 53164ce7165Smrg echo rs6000-ibm-aix3.2 53264ce7165Smrg fi 53364ce7165Smrg exit ;; 53464ce7165Smrg *:AIX:*:[45]) 53564ce7165Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 53664ce7165Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 53764ce7165Smrg IBM_ARCH=rs6000 53864ce7165Smrg else 53964ce7165Smrg IBM_ARCH=powerpc 54064ce7165Smrg fi 54164ce7165Smrg if [ -x /usr/bin/oslevel ] ; then 54264ce7165Smrg IBM_REV=`/usr/bin/oslevel` 54364ce7165Smrg else 54464ce7165Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 54564ce7165Smrg fi 54664ce7165Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 54764ce7165Smrg exit ;; 54864ce7165Smrg *:AIX:*:*) 54964ce7165Smrg echo rs6000-ibm-aix 55064ce7165Smrg exit ;; 55164ce7165Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 55264ce7165Smrg echo romp-ibm-bsd4.4 55364ce7165Smrg exit ;; 55464ce7165Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 55564ce7165Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 55664ce7165Smrg exit ;; # report: romp-ibm BSD 4.3 55764ce7165Smrg *:BOSX:*:*) 55864ce7165Smrg echo rs6000-bull-bosx 55964ce7165Smrg exit ;; 56064ce7165Smrg DPX/2?00:B.O.S.:*:*) 56164ce7165Smrg echo m68k-bull-sysv3 56264ce7165Smrg exit ;; 56364ce7165Smrg 9000/[34]??:4.3bsd:1.*:*) 56464ce7165Smrg echo m68k-hp-bsd 56564ce7165Smrg exit ;; 56664ce7165Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 56764ce7165Smrg echo m68k-hp-bsd4.4 56864ce7165Smrg exit ;; 56964ce7165Smrg 9000/[34678]??:HP-UX:*:*) 57064ce7165Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 57164ce7165Smrg case "${UNAME_MACHINE}" in 57264ce7165Smrg 9000/31? ) HP_ARCH=m68000 ;; 57364ce7165Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 57464ce7165Smrg 9000/[678][0-9][0-9]) 57564ce7165Smrg if [ -x /usr/bin/getconf ]; then 57664ce7165Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 57764ce7165Smrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 57864ce7165Smrg case "${sc_cpu_version}" in 57964ce7165Smrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 58064ce7165Smrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 58164ce7165Smrg 532) # CPU_PA_RISC2_0 58264ce7165Smrg case "${sc_kernel_bits}" in 58364ce7165Smrg 32) HP_ARCH="hppa2.0n" ;; 58464ce7165Smrg 64) HP_ARCH="hppa2.0w" ;; 58564ce7165Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 58664ce7165Smrg esac ;; 58764ce7165Smrg esac 58864ce7165Smrg fi 58964ce7165Smrg if [ "${HP_ARCH}" = "" ]; then 59064ce7165Smrg eval $set_cc_for_build 59164ce7165Smrg sed 's/^ //' << EOF >$dummy.c 59264ce7165Smrg 59364ce7165Smrg #define _HPUX_SOURCE 59464ce7165Smrg #include <stdlib.h> 59564ce7165Smrg #include <unistd.h> 59664ce7165Smrg 59764ce7165Smrg int main () 59864ce7165Smrg { 59964ce7165Smrg #if defined(_SC_KERNEL_BITS) 60064ce7165Smrg long bits = sysconf(_SC_KERNEL_BITS); 60164ce7165Smrg #endif 60264ce7165Smrg long cpu = sysconf (_SC_CPU_VERSION); 60364ce7165Smrg 60464ce7165Smrg switch (cpu) 60564ce7165Smrg { 60664ce7165Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 60764ce7165Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 60864ce7165Smrg case CPU_PA_RISC2_0: 60964ce7165Smrg #if defined(_SC_KERNEL_BITS) 61064ce7165Smrg switch (bits) 61164ce7165Smrg { 61264ce7165Smrg case 64: puts ("hppa2.0w"); break; 61364ce7165Smrg case 32: puts ("hppa2.0n"); break; 61464ce7165Smrg default: puts ("hppa2.0"); break; 61564ce7165Smrg } break; 61664ce7165Smrg #else /* !defined(_SC_KERNEL_BITS) */ 61764ce7165Smrg puts ("hppa2.0"); break; 61864ce7165Smrg #endif 61964ce7165Smrg default: puts ("hppa1.0"); break; 62064ce7165Smrg } 62164ce7165Smrg exit (0); 62264ce7165Smrg } 62364ce7165SmrgEOF 62464ce7165Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 62564ce7165Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 62664ce7165Smrg fi ;; 62764ce7165Smrg esac 62864ce7165Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 62964ce7165Smrg then 63064ce7165Smrg eval $set_cc_for_build 63164ce7165Smrg 63264ce7165Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 63364ce7165Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 63464ce7165Smrg # generating 64-bit code. GNU and HP use different nomenclature: 63564ce7165Smrg # 63664ce7165Smrg # $ CC_FOR_BUILD=cc ./config.guess 63764ce7165Smrg # => hppa2.0w-hp-hpux11.23 63864ce7165Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 63964ce7165Smrg # => hppa64-hp-hpux11.23 64064ce7165Smrg 64164ce7165Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 64264ce7165Smrg grep __LP64__ >/dev/null 64364ce7165Smrg then 64464ce7165Smrg HP_ARCH="hppa2.0w" 64564ce7165Smrg else 64664ce7165Smrg HP_ARCH="hppa64" 64764ce7165Smrg fi 64864ce7165Smrg fi 64964ce7165Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 65064ce7165Smrg exit ;; 65164ce7165Smrg ia64:HP-UX:*:*) 65264ce7165Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 65364ce7165Smrg echo ia64-hp-hpux${HPUX_REV} 65464ce7165Smrg exit ;; 65564ce7165Smrg 3050*:HI-UX:*:*) 65664ce7165Smrg eval $set_cc_for_build 65764ce7165Smrg sed 's/^ //' << EOF >$dummy.c 65864ce7165Smrg #include <unistd.h> 65964ce7165Smrg int 66064ce7165Smrg main () 66164ce7165Smrg { 66264ce7165Smrg long cpu = sysconf (_SC_CPU_VERSION); 66364ce7165Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 66464ce7165Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 66564ce7165Smrg results, however. */ 66664ce7165Smrg if (CPU_IS_PA_RISC (cpu)) 66764ce7165Smrg { 66864ce7165Smrg switch (cpu) 66964ce7165Smrg { 67064ce7165Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 67164ce7165Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 67264ce7165Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 67364ce7165Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 67464ce7165Smrg } 67564ce7165Smrg } 67664ce7165Smrg else if (CPU_IS_HP_MC68K (cpu)) 67764ce7165Smrg puts ("m68k-hitachi-hiuxwe2"); 67864ce7165Smrg else puts ("unknown-hitachi-hiuxwe2"); 67964ce7165Smrg exit (0); 68064ce7165Smrg } 68164ce7165SmrgEOF 68264ce7165Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 68364ce7165Smrg { echo "$SYSTEM_NAME"; exit; } 68464ce7165Smrg echo unknown-hitachi-hiuxwe2 68564ce7165Smrg exit ;; 68664ce7165Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 68764ce7165Smrg echo hppa1.1-hp-bsd 68864ce7165Smrg exit ;; 68964ce7165Smrg 9000/8??:4.3bsd:*:*) 69064ce7165Smrg echo hppa1.0-hp-bsd 69164ce7165Smrg exit ;; 69264ce7165Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 69364ce7165Smrg echo hppa1.0-hp-mpeix 69464ce7165Smrg exit ;; 69564ce7165Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 69664ce7165Smrg echo hppa1.1-hp-osf 69764ce7165Smrg exit ;; 69864ce7165Smrg hp8??:OSF1:*:*) 69964ce7165Smrg echo hppa1.0-hp-osf 70064ce7165Smrg exit ;; 70164ce7165Smrg i*86:OSF1:*:*) 70264ce7165Smrg if [ -x /usr/sbin/sysversion ] ; then 70364ce7165Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 70464ce7165Smrg else 70564ce7165Smrg echo ${UNAME_MACHINE}-unknown-osf1 70664ce7165Smrg fi 70764ce7165Smrg exit ;; 70864ce7165Smrg parisc*:Lites*:*:*) 70964ce7165Smrg echo hppa1.1-hp-lites 71064ce7165Smrg exit ;; 71164ce7165Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 71264ce7165Smrg echo c1-convex-bsd 71364ce7165Smrg exit ;; 71464ce7165Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 71564ce7165Smrg if getsysinfo -f scalar_acc 71664ce7165Smrg then echo c32-convex-bsd 71764ce7165Smrg else echo c2-convex-bsd 71864ce7165Smrg fi 71964ce7165Smrg exit ;; 72064ce7165Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 72164ce7165Smrg echo c34-convex-bsd 72264ce7165Smrg exit ;; 72364ce7165Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 72464ce7165Smrg echo c38-convex-bsd 72564ce7165Smrg exit ;; 72664ce7165Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 72764ce7165Smrg echo c4-convex-bsd 72864ce7165Smrg exit ;; 72964ce7165Smrg CRAY*Y-MP:*:*:*) 73064ce7165Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 73164ce7165Smrg exit ;; 73264ce7165Smrg CRAY*[A-Z]90:*:*:*) 73364ce7165Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 73464ce7165Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 73564ce7165Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 73664ce7165Smrg -e 's/\.[^.]*$/.X/' 73764ce7165Smrg exit ;; 73864ce7165Smrg CRAY*TS:*:*:*) 73964ce7165Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 74064ce7165Smrg exit ;; 74164ce7165Smrg CRAY*T3E:*:*:*) 74264ce7165Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 74364ce7165Smrg exit ;; 74464ce7165Smrg CRAY*SV1:*:*:*) 74564ce7165Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 74664ce7165Smrg exit ;; 74764ce7165Smrg *:UNICOS/mp:*:*) 74864ce7165Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 74964ce7165Smrg exit ;; 75064ce7165Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 75164ce7165Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 75264ce7165Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 75364ce7165Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 75464ce7165Smrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 75564ce7165Smrg exit ;; 75664ce7165Smrg 5000:UNIX_System_V:4.*:*) 75764ce7165Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 75864ce7165Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 75964ce7165Smrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 76064ce7165Smrg exit ;; 76164ce7165Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 76264ce7165Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 76364ce7165Smrg exit ;; 76464ce7165Smrg sparc*:BSD/OS:*:*) 76564ce7165Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 76664ce7165Smrg exit ;; 76764ce7165Smrg *:BSD/OS:*:*) 76864ce7165Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 76964ce7165Smrg exit ;; 77064ce7165Smrg *:FreeBSD:*:*) 77164ce7165Smrg case ${UNAME_MACHINE} in 77264ce7165Smrg pc98) 77364ce7165Smrg echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 77464ce7165Smrg amd64) 77564ce7165Smrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 77664ce7165Smrg *) 77764ce7165Smrg echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 77864ce7165Smrg esac 77964ce7165Smrg exit ;; 78064ce7165Smrg i*:CYGWIN*:*) 78164ce7165Smrg echo ${UNAME_MACHINE}-pc-cygwin 78264ce7165Smrg exit ;; 78364ce7165Smrg i*:MINGW*:*) 78464ce7165Smrg echo ${UNAME_MACHINE}-pc-mingw32 78564ce7165Smrg exit ;; 78664ce7165Smrg i*:windows32*:*) 78764ce7165Smrg # uname -m includes "-pc" on this system. 78864ce7165Smrg echo ${UNAME_MACHINE}-mingw32 78964ce7165Smrg exit ;; 79064ce7165Smrg i*:PW*:*) 79164ce7165Smrg echo ${UNAME_MACHINE}-pc-pw32 79264ce7165Smrg exit ;; 79364ce7165Smrg x86:Interix*:[3456]*) 79464ce7165Smrg echo i586-pc-interix${UNAME_RELEASE} 79564ce7165Smrg exit ;; 79664ce7165Smrg EM64T:Interix*:[3456]*) 79764ce7165Smrg echo x86_64-unknown-interix${UNAME_RELEASE} 79864ce7165Smrg exit ;; 79964ce7165Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 80064ce7165Smrg echo i${UNAME_MACHINE}-pc-mks 80164ce7165Smrg exit ;; 80264ce7165Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 80364ce7165Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 80464ce7165Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 80564ce7165Smrg # UNAME_MACHINE based on the output of uname instead of i386? 80664ce7165Smrg echo i586-pc-interix 80764ce7165Smrg exit ;; 80864ce7165Smrg i*:UWIN*:*) 80964ce7165Smrg echo ${UNAME_MACHINE}-pc-uwin 81064ce7165Smrg exit ;; 81164ce7165Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 81264ce7165Smrg echo x86_64-unknown-cygwin 81364ce7165Smrg exit ;; 81464ce7165Smrg p*:CYGWIN*:*) 81564ce7165Smrg echo powerpcle-unknown-cygwin 81664ce7165Smrg exit ;; 81764ce7165Smrg prep*:SunOS:5.*:*) 81864ce7165Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 81964ce7165Smrg exit ;; 82064ce7165Smrg *:GNU:*:*) 82164ce7165Smrg # the GNU system 82264ce7165Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 82364ce7165Smrg exit ;; 82464ce7165Smrg *:GNU/*:*:*) 82564ce7165Smrg # other systems with GNU libc and userland 82664ce7165Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 82764ce7165Smrg exit ;; 82864ce7165Smrg i*86:Minix:*:*) 82964ce7165Smrg echo ${UNAME_MACHINE}-pc-minix 83064ce7165Smrg exit ;; 83164ce7165Smrg arm*:Linux:*:*) 83264ce7165Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 83364ce7165Smrg exit ;; 83464ce7165Smrg avr32*:Linux:*:*) 83564ce7165Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 83664ce7165Smrg exit ;; 83764ce7165Smrg cris:Linux:*:*) 83864ce7165Smrg echo cris-axis-linux-gnu 83964ce7165Smrg exit ;; 84064ce7165Smrg crisv32:Linux:*:*) 84164ce7165Smrg echo crisv32-axis-linux-gnu 84264ce7165Smrg exit ;; 84364ce7165Smrg frv:Linux:*:*) 84464ce7165Smrg echo frv-unknown-linux-gnu 84564ce7165Smrg exit ;; 84664ce7165Smrg ia64:Linux:*:*) 84764ce7165Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 84864ce7165Smrg exit ;; 84964ce7165Smrg m32r*:Linux:*:*) 85064ce7165Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 85164ce7165Smrg exit ;; 85264ce7165Smrg m68*:Linux:*:*) 85364ce7165Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 85464ce7165Smrg exit ;; 85564ce7165Smrg mips:Linux:*:*) 85664ce7165Smrg eval $set_cc_for_build 85764ce7165Smrg sed 's/^ //' << EOF >$dummy.c 85864ce7165Smrg #undef CPU 85964ce7165Smrg #undef mips 86064ce7165Smrg #undef mipsel 86164ce7165Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 86264ce7165Smrg CPU=mipsel 86364ce7165Smrg #else 86464ce7165Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 86564ce7165Smrg CPU=mips 86664ce7165Smrg #else 86764ce7165Smrg CPU= 86864ce7165Smrg #endif 86964ce7165Smrg #endif 87064ce7165SmrgEOF 87164ce7165Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 87264ce7165Smrg /^CPU/{ 87364ce7165Smrg s: ::g 87464ce7165Smrg p 87564ce7165Smrg }'`" 87664ce7165Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 87764ce7165Smrg ;; 87864ce7165Smrg mips64:Linux:*:*) 87964ce7165Smrg eval $set_cc_for_build 88064ce7165Smrg sed 's/^ //' << EOF >$dummy.c 88164ce7165Smrg #undef CPU 88264ce7165Smrg #undef mips64 88364ce7165Smrg #undef mips64el 88464ce7165Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 88564ce7165Smrg CPU=mips64el 88664ce7165Smrg #else 88764ce7165Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 88864ce7165Smrg CPU=mips64 88964ce7165Smrg #else 89064ce7165Smrg CPU= 89164ce7165Smrg #endif 89264ce7165Smrg #endif 89364ce7165SmrgEOF 89464ce7165Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 89564ce7165Smrg /^CPU/{ 89664ce7165Smrg s: ::g 89764ce7165Smrg p 89864ce7165Smrg }'`" 89964ce7165Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 90064ce7165Smrg ;; 90164ce7165Smrg or32:Linux:*:*) 90264ce7165Smrg echo or32-unknown-linux-gnu 90364ce7165Smrg exit ;; 90464ce7165Smrg ppc:Linux:*:*) 90564ce7165Smrg echo powerpc-unknown-linux-gnu 90664ce7165Smrg exit ;; 90764ce7165Smrg ppc64:Linux:*:*) 90864ce7165Smrg echo powerpc64-unknown-linux-gnu 90964ce7165Smrg exit ;; 91064ce7165Smrg alpha:Linux:*:*) 91164ce7165Smrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 91264ce7165Smrg EV5) UNAME_MACHINE=alphaev5 ;; 91364ce7165Smrg EV56) UNAME_MACHINE=alphaev56 ;; 91464ce7165Smrg PCA56) UNAME_MACHINE=alphapca56 ;; 91564ce7165Smrg PCA57) UNAME_MACHINE=alphapca56 ;; 91664ce7165Smrg EV6) UNAME_MACHINE=alphaev6 ;; 91764ce7165Smrg EV67) UNAME_MACHINE=alphaev67 ;; 91864ce7165Smrg EV68*) UNAME_MACHINE=alphaev68 ;; 91964ce7165Smrg esac 92064ce7165Smrg objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 92164ce7165Smrg if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 92264ce7165Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 92364ce7165Smrg exit ;; 92464ce7165Smrg parisc:Linux:*:* | hppa:Linux:*:*) 92564ce7165Smrg # Look for CPU level 92664ce7165Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 92764ce7165Smrg PA7*) echo hppa1.1-unknown-linux-gnu ;; 92864ce7165Smrg PA8*) echo hppa2.0-unknown-linux-gnu ;; 92964ce7165Smrg *) echo hppa-unknown-linux-gnu ;; 93064ce7165Smrg esac 93164ce7165Smrg exit ;; 93264ce7165Smrg parisc64:Linux:*:* | hppa64:Linux:*:*) 93364ce7165Smrg echo hppa64-unknown-linux-gnu 93464ce7165Smrg exit ;; 93564ce7165Smrg s390:Linux:*:* | s390x:Linux:*:*) 93664ce7165Smrg echo ${UNAME_MACHINE}-ibm-linux 93764ce7165Smrg exit ;; 93864ce7165Smrg sh64*:Linux:*:*) 93964ce7165Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 94064ce7165Smrg exit ;; 94164ce7165Smrg sh*:Linux:*:*) 94264ce7165Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 94364ce7165Smrg exit ;; 94464ce7165Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 94564ce7165Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 94664ce7165Smrg exit ;; 94764ce7165Smrg vax:Linux:*:*) 94864ce7165Smrg echo ${UNAME_MACHINE}-dec-linux-gnu 94964ce7165Smrg exit ;; 95064ce7165Smrg x86_64:Linux:*:*) 95164ce7165Smrg echo x86_64-unknown-linux-gnu 95264ce7165Smrg exit ;; 95364ce7165Smrg i*86:Linux:*:*) 95464ce7165Smrg # The BFD linker knows what the default object file format is, so 95564ce7165Smrg # first see if it will tell us. cd to the root directory to prevent 95664ce7165Smrg # problems with other programs or directories called `ld' in the path. 95764ce7165Smrg # Set LC_ALL=C to ensure ld outputs messages in English. 95864ce7165Smrg ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ 95964ce7165Smrg | sed -ne '/supported targets:/!d 96064ce7165Smrg s/[ ][ ]*/ /g 96164ce7165Smrg s/.*supported targets: *// 96264ce7165Smrg s/ .*// 96364ce7165Smrg p'` 96464ce7165Smrg case "$ld_supported_targets" in 96564ce7165Smrg elf32-i386) 96664ce7165Smrg TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 96764ce7165Smrg ;; 96864ce7165Smrg a.out-i386-linux) 96964ce7165Smrg echo "${UNAME_MACHINE}-pc-linux-gnuaout" 97064ce7165Smrg exit ;; 97164ce7165Smrg coff-i386) 97264ce7165Smrg echo "${UNAME_MACHINE}-pc-linux-gnucoff" 97364ce7165Smrg exit ;; 97464ce7165Smrg "") 97564ce7165Smrg # Either a pre-BFD a.out linker (linux-gnuoldld) or 97664ce7165Smrg # one that does not give us useful --help. 97764ce7165Smrg echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 97864ce7165Smrg exit ;; 97964ce7165Smrg esac 98064ce7165Smrg # Determine whether the default compiler is a.out or elf 98164ce7165Smrg eval $set_cc_for_build 98264ce7165Smrg sed 's/^ //' << EOF >$dummy.c 98364ce7165Smrg #include <features.h> 98464ce7165Smrg #ifdef __ELF__ 98564ce7165Smrg # ifdef __GLIBC__ 98664ce7165Smrg # if __GLIBC__ >= 2 98764ce7165Smrg LIBC=gnu 98864ce7165Smrg # else 98964ce7165Smrg LIBC=gnulibc1 99064ce7165Smrg # endif 99164ce7165Smrg # else 99264ce7165Smrg LIBC=gnulibc1 99364ce7165Smrg # endif 99464ce7165Smrg #else 99564ce7165Smrg #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) 99664ce7165Smrg LIBC=gnu 99764ce7165Smrg #else 99864ce7165Smrg LIBC=gnuaout 99964ce7165Smrg #endif 100064ce7165Smrg #endif 100164ce7165Smrg #ifdef __dietlibc__ 100264ce7165Smrg LIBC=dietlibc 100364ce7165Smrg #endif 100464ce7165SmrgEOF 100564ce7165Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 100664ce7165Smrg /^LIBC/{ 100764ce7165Smrg s: ::g 100864ce7165Smrg p 100964ce7165Smrg }'`" 101064ce7165Smrg test x"${LIBC}" != x && { 101164ce7165Smrg echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 101264ce7165Smrg exit 101364ce7165Smrg } 101464ce7165Smrg test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } 101564ce7165Smrg ;; 101664ce7165Smrg i*86:DYNIX/ptx:4*:*) 101764ce7165Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 101864ce7165Smrg # earlier versions are messed up and put the nodename in both 101964ce7165Smrg # sysname and nodename. 102064ce7165Smrg echo i386-sequent-sysv4 102164ce7165Smrg exit ;; 102264ce7165Smrg i*86:UNIX_SV:4.2MP:2.*) 102364ce7165Smrg # Unixware is an offshoot of SVR4, but it has its own version 102464ce7165Smrg # number series starting with 2... 102564ce7165Smrg # I am not positive that other SVR4 systems won't match this, 102664ce7165Smrg # I just have to hope. -- rms. 102764ce7165Smrg # Use sysv4.2uw... so that sysv4* matches it. 102864ce7165Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 102964ce7165Smrg exit ;; 103064ce7165Smrg i*86:OS/2:*:*) 103164ce7165Smrg # If we were able to find `uname', then EMX Unix compatibility 103264ce7165Smrg # is probably installed. 103364ce7165Smrg echo ${UNAME_MACHINE}-pc-os2-emx 103464ce7165Smrg exit ;; 103564ce7165Smrg i*86:XTS-300:*:STOP) 103664ce7165Smrg echo ${UNAME_MACHINE}-unknown-stop 103764ce7165Smrg exit ;; 103864ce7165Smrg i*86:atheos:*:*) 103964ce7165Smrg echo ${UNAME_MACHINE}-unknown-atheos 104064ce7165Smrg exit ;; 104164ce7165Smrg i*86:syllable:*:*) 104264ce7165Smrg echo ${UNAME_MACHINE}-pc-syllable 104364ce7165Smrg exit ;; 104464ce7165Smrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 104564ce7165Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 104664ce7165Smrg exit ;; 104764ce7165Smrg i*86:*DOS:*:*) 104864ce7165Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 104964ce7165Smrg exit ;; 105064ce7165Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 105164ce7165Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 105264ce7165Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 105364ce7165Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 105464ce7165Smrg else 105564ce7165Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 105664ce7165Smrg fi 105764ce7165Smrg exit ;; 105864ce7165Smrg i*86:*:5:[678]*) 105964ce7165Smrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 106064ce7165Smrg case `/bin/uname -X | grep "^Machine"` in 106164ce7165Smrg *486*) UNAME_MACHINE=i486 ;; 106264ce7165Smrg *Pentium) UNAME_MACHINE=i586 ;; 106364ce7165Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 106464ce7165Smrg esac 106564ce7165Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 106664ce7165Smrg exit ;; 106764ce7165Smrg i*86:*:3.2:*) 106864ce7165Smrg if test -f /usr/options/cb.name; then 106964ce7165Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 107064ce7165Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 107164ce7165Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 107264ce7165Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 107364ce7165Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 107464ce7165Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 107564ce7165Smrg && UNAME_MACHINE=i586 107664ce7165Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 107764ce7165Smrg && UNAME_MACHINE=i686 107864ce7165Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 107964ce7165Smrg && UNAME_MACHINE=i686 108064ce7165Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 108164ce7165Smrg else 108264ce7165Smrg echo ${UNAME_MACHINE}-pc-sysv32 108364ce7165Smrg fi 108464ce7165Smrg exit ;; 108564ce7165Smrg pc:*:*:*) 108664ce7165Smrg # Left here for compatibility: 108764ce7165Smrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 108864ce7165Smrg # the processor, so we play safe by assuming i386. 108964ce7165Smrg echo i386-pc-msdosdjgpp 109064ce7165Smrg exit ;; 109164ce7165Smrg Intel:Mach:3*:*) 109264ce7165Smrg echo i386-pc-mach3 109364ce7165Smrg exit ;; 109464ce7165Smrg paragon:*:*:*) 109564ce7165Smrg echo i860-intel-osf1 109664ce7165Smrg exit ;; 109764ce7165Smrg i860:*:4.*:*) # i860-SVR4 109864ce7165Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 109964ce7165Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 110064ce7165Smrg else # Add other i860-SVR4 vendors below as they are discovered. 110164ce7165Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 110264ce7165Smrg fi 110364ce7165Smrg exit ;; 110464ce7165Smrg mini*:CTIX:SYS*5:*) 110564ce7165Smrg # "miniframe" 110664ce7165Smrg echo m68010-convergent-sysv 110764ce7165Smrg exit ;; 110864ce7165Smrg mc68k:UNIX:SYSTEM5:3.51m) 110964ce7165Smrg echo m68k-convergent-sysv 111064ce7165Smrg exit ;; 111164ce7165Smrg M680?0:D-NIX:5.3:*) 111264ce7165Smrg echo m68k-diab-dnix 111364ce7165Smrg exit ;; 111464ce7165Smrg M68*:*:R3V[5678]*:*) 111564ce7165Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 111664ce7165Smrg 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) 111764ce7165Smrg OS_REL='' 111864ce7165Smrg test -r /etc/.relid \ 111964ce7165Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 112064ce7165Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 112164ce7165Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 112264ce7165Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 112364ce7165Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 112464ce7165Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 112564ce7165Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 112664ce7165Smrg && { echo i486-ncr-sysv4; exit; } ;; 112764ce7165Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 112864ce7165Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 112964ce7165Smrg exit ;; 113064ce7165Smrg mc68030:UNIX_System_V:4.*:*) 113164ce7165Smrg echo m68k-atari-sysv4 113264ce7165Smrg exit ;; 113364ce7165Smrg TSUNAMI:LynxOS:2.*:*) 113464ce7165Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 113564ce7165Smrg exit ;; 113664ce7165Smrg rs6000:LynxOS:2.*:*) 113764ce7165Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 113864ce7165Smrg exit ;; 113964ce7165Smrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 114064ce7165Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 114164ce7165Smrg exit ;; 114264ce7165Smrg SM[BE]S:UNIX_SV:*:*) 114364ce7165Smrg echo mips-dde-sysv${UNAME_RELEASE} 114464ce7165Smrg exit ;; 114564ce7165Smrg RM*:ReliantUNIX-*:*:*) 114664ce7165Smrg echo mips-sni-sysv4 114764ce7165Smrg exit ;; 114864ce7165Smrg RM*:SINIX-*:*:*) 114964ce7165Smrg echo mips-sni-sysv4 115064ce7165Smrg exit ;; 115164ce7165Smrg *:SINIX-*:*:*) 115264ce7165Smrg if uname -p 2>/dev/null >/dev/null ; then 115364ce7165Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 115464ce7165Smrg echo ${UNAME_MACHINE}-sni-sysv4 115564ce7165Smrg else 115664ce7165Smrg echo ns32k-sni-sysv 115764ce7165Smrg fi 115864ce7165Smrg exit ;; 115964ce7165Smrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 116064ce7165Smrg # says <Richard.M.Bartel@ccMail.Census.GOV> 116164ce7165Smrg echo i586-unisys-sysv4 116264ce7165Smrg exit ;; 116364ce7165Smrg *:UNIX_System_V:4*:FTX*) 116464ce7165Smrg # From Gerald Hewes <hewes@openmarket.com>. 116564ce7165Smrg # How about differentiating between stratus architectures? -djm 116664ce7165Smrg echo hppa1.1-stratus-sysv4 116764ce7165Smrg exit ;; 116864ce7165Smrg *:*:*:FTX*) 116964ce7165Smrg # From seanf@swdc.stratus.com. 117064ce7165Smrg echo i860-stratus-sysv4 117164ce7165Smrg exit ;; 117264ce7165Smrg i*86:VOS:*:*) 117364ce7165Smrg # From Paul.Green@stratus.com. 117464ce7165Smrg echo ${UNAME_MACHINE}-stratus-vos 117564ce7165Smrg exit ;; 117664ce7165Smrg *:VOS:*:*) 117764ce7165Smrg # From Paul.Green@stratus.com. 117864ce7165Smrg echo hppa1.1-stratus-vos 117964ce7165Smrg exit ;; 118064ce7165Smrg mc68*:A/UX:*:*) 118164ce7165Smrg echo m68k-apple-aux${UNAME_RELEASE} 118264ce7165Smrg exit ;; 118364ce7165Smrg news*:NEWS-OS:6*:*) 118464ce7165Smrg echo mips-sony-newsos6 118564ce7165Smrg exit ;; 118664ce7165Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 118764ce7165Smrg if [ -d /usr/nec ]; then 118864ce7165Smrg echo mips-nec-sysv${UNAME_RELEASE} 118964ce7165Smrg else 119064ce7165Smrg echo mips-unknown-sysv${UNAME_RELEASE} 119164ce7165Smrg fi 119264ce7165Smrg exit ;; 119364ce7165Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 119464ce7165Smrg echo powerpc-be-beos 119564ce7165Smrg exit ;; 119664ce7165Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 119764ce7165Smrg echo powerpc-apple-beos 119864ce7165Smrg exit ;; 119964ce7165Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 120064ce7165Smrg echo i586-pc-beos 120164ce7165Smrg exit ;; 120264ce7165Smrg SX-4:SUPER-UX:*:*) 120364ce7165Smrg echo sx4-nec-superux${UNAME_RELEASE} 120464ce7165Smrg exit ;; 120564ce7165Smrg SX-5:SUPER-UX:*:*) 120664ce7165Smrg echo sx5-nec-superux${UNAME_RELEASE} 120764ce7165Smrg exit ;; 120864ce7165Smrg SX-6:SUPER-UX:*:*) 120964ce7165Smrg echo sx6-nec-superux${UNAME_RELEASE} 121064ce7165Smrg exit ;; 121164ce7165Smrg Power*:Rhapsody:*:*) 121264ce7165Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 121364ce7165Smrg exit ;; 121464ce7165Smrg *:Rhapsody:*:*) 121564ce7165Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 121664ce7165Smrg exit ;; 121764ce7165Smrg *:Darwin:*:*) 121864ce7165Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 121964ce7165Smrg case $UNAME_PROCESSOR in 122064ce7165Smrg unknown) UNAME_PROCESSOR=powerpc ;; 122164ce7165Smrg esac 122264ce7165Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 122364ce7165Smrg exit ;; 122464ce7165Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 122564ce7165Smrg UNAME_PROCESSOR=`uname -p` 122664ce7165Smrg if test "$UNAME_PROCESSOR" = "x86"; then 122764ce7165Smrg UNAME_PROCESSOR=i386 122864ce7165Smrg UNAME_MACHINE=pc 122964ce7165Smrg fi 123064ce7165Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 123164ce7165Smrg exit ;; 123264ce7165Smrg *:QNX:*:4*) 123364ce7165Smrg echo i386-pc-qnx 123464ce7165Smrg exit ;; 123564ce7165Smrg NSE-?:NONSTOP_KERNEL:*:*) 123664ce7165Smrg echo nse-tandem-nsk${UNAME_RELEASE} 123764ce7165Smrg exit ;; 123864ce7165Smrg NSR-?:NONSTOP_KERNEL:*:*) 123964ce7165Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 124064ce7165Smrg exit ;; 124164ce7165Smrg *:NonStop-UX:*:*) 124264ce7165Smrg echo mips-compaq-nonstopux 124364ce7165Smrg exit ;; 124464ce7165Smrg BS2000:POSIX*:*:*) 124564ce7165Smrg echo bs2000-siemens-sysv 124664ce7165Smrg exit ;; 124764ce7165Smrg DS/*:UNIX_System_V:*:*) 124864ce7165Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 124964ce7165Smrg exit ;; 125064ce7165Smrg *:Plan9:*:*) 125164ce7165Smrg # "uname -m" is not consistent, so use $cputype instead. 386 125264ce7165Smrg # is converted to i386 for consistency with other x86 125364ce7165Smrg # operating systems. 125464ce7165Smrg if test "$cputype" = "386"; then 125564ce7165Smrg UNAME_MACHINE=i386 125664ce7165Smrg else 125764ce7165Smrg UNAME_MACHINE="$cputype" 125864ce7165Smrg fi 125964ce7165Smrg echo ${UNAME_MACHINE}-unknown-plan9 126064ce7165Smrg exit ;; 126164ce7165Smrg *:TOPS-10:*:*) 126264ce7165Smrg echo pdp10-unknown-tops10 126364ce7165Smrg exit ;; 126464ce7165Smrg *:TENEX:*:*) 126564ce7165Smrg echo pdp10-unknown-tenex 126664ce7165Smrg exit ;; 126764ce7165Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 126864ce7165Smrg echo pdp10-dec-tops20 126964ce7165Smrg exit ;; 127064ce7165Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 127164ce7165Smrg echo pdp10-xkl-tops20 127264ce7165Smrg exit ;; 127364ce7165Smrg *:TOPS-20:*:*) 127464ce7165Smrg echo pdp10-unknown-tops20 127564ce7165Smrg exit ;; 127664ce7165Smrg *:ITS:*:*) 127764ce7165Smrg echo pdp10-unknown-its 127864ce7165Smrg exit ;; 127964ce7165Smrg SEI:*:*:SEIUX) 128064ce7165Smrg echo mips-sei-seiux${UNAME_RELEASE} 128164ce7165Smrg exit ;; 128264ce7165Smrg *:DragonFly:*:*) 128364ce7165Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 128464ce7165Smrg exit ;; 128564ce7165Smrg *:*VMS:*:*) 128664ce7165Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 128764ce7165Smrg case "${UNAME_MACHINE}" in 128864ce7165Smrg A*) echo alpha-dec-vms ; exit ;; 128964ce7165Smrg I*) echo ia64-dec-vms ; exit ;; 129064ce7165Smrg V*) echo vax-dec-vms ; exit ;; 129164ce7165Smrg esac ;; 129264ce7165Smrg *:XENIX:*:SysV) 129364ce7165Smrg echo i386-pc-xenix 129464ce7165Smrg exit ;; 129564ce7165Smrg i*86:skyos:*:*) 129664ce7165Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 129764ce7165Smrg exit ;; 129864ce7165Smrg i*86:rdos:*:*) 129964ce7165Smrg echo ${UNAME_MACHINE}-pc-rdos 130064ce7165Smrg exit ;; 130164ce7165Smrgesac 130264ce7165Smrg 130364ce7165Smrg#echo '(No uname command or uname output not recognized.)' 1>&2 130464ce7165Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 130564ce7165Smrg 130664ce7165Smrgeval $set_cc_for_build 130764ce7165Smrgcat >$dummy.c <<EOF 130864ce7165Smrg#ifdef _SEQUENT_ 130964ce7165Smrg# include <sys/types.h> 131064ce7165Smrg# include <sys/utsname.h> 131164ce7165Smrg#endif 131264ce7165Smrgmain () 131364ce7165Smrg{ 131464ce7165Smrg#if defined (sony) 131564ce7165Smrg#if defined (MIPSEB) 131664ce7165Smrg /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 131764ce7165Smrg I don't know.... */ 131864ce7165Smrg printf ("mips-sony-bsd\n"); exit (0); 131964ce7165Smrg#else 132064ce7165Smrg#include <sys/param.h> 132164ce7165Smrg printf ("m68k-sony-newsos%s\n", 132264ce7165Smrg#ifdef NEWSOS4 132364ce7165Smrg "4" 132464ce7165Smrg#else 132564ce7165Smrg "" 132664ce7165Smrg#endif 132764ce7165Smrg ); exit (0); 132864ce7165Smrg#endif 132964ce7165Smrg#endif 133064ce7165Smrg 133164ce7165Smrg#if defined (__arm) && defined (__acorn) && defined (__unix) 133264ce7165Smrg printf ("arm-acorn-riscix\n"); exit (0); 133364ce7165Smrg#endif 133464ce7165Smrg 133564ce7165Smrg#if defined (hp300) && !defined (hpux) 133664ce7165Smrg printf ("m68k-hp-bsd\n"); exit (0); 133764ce7165Smrg#endif 133864ce7165Smrg 133964ce7165Smrg#if defined (NeXT) 134064ce7165Smrg#if !defined (__ARCHITECTURE__) 134164ce7165Smrg#define __ARCHITECTURE__ "m68k" 134264ce7165Smrg#endif 134364ce7165Smrg int version; 134464ce7165Smrg version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 134564ce7165Smrg if (version < 4) 134664ce7165Smrg printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 134764ce7165Smrg else 134864ce7165Smrg printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 134964ce7165Smrg exit (0); 135064ce7165Smrg#endif 135164ce7165Smrg 135264ce7165Smrg#if defined (MULTIMAX) || defined (n16) 135364ce7165Smrg#if defined (UMAXV) 135464ce7165Smrg printf ("ns32k-encore-sysv\n"); exit (0); 135564ce7165Smrg#else 135664ce7165Smrg#if defined (CMU) 135764ce7165Smrg printf ("ns32k-encore-mach\n"); exit (0); 135864ce7165Smrg#else 135964ce7165Smrg printf ("ns32k-encore-bsd\n"); exit (0); 136064ce7165Smrg#endif 136164ce7165Smrg#endif 136264ce7165Smrg#endif 136364ce7165Smrg 136464ce7165Smrg#if defined (__386BSD__) 136564ce7165Smrg printf ("i386-pc-bsd\n"); exit (0); 136664ce7165Smrg#endif 136764ce7165Smrg 136864ce7165Smrg#if defined (sequent) 136964ce7165Smrg#if defined (i386) 137064ce7165Smrg printf ("i386-sequent-dynix\n"); exit (0); 137164ce7165Smrg#endif 137264ce7165Smrg#if defined (ns32000) 137364ce7165Smrg printf ("ns32k-sequent-dynix\n"); exit (0); 137464ce7165Smrg#endif 137564ce7165Smrg#endif 137664ce7165Smrg 137764ce7165Smrg#if defined (_SEQUENT_) 137864ce7165Smrg struct utsname un; 137964ce7165Smrg 138064ce7165Smrg uname(&un); 138164ce7165Smrg 138264ce7165Smrg if (strncmp(un.version, "V2", 2) == 0) { 138364ce7165Smrg printf ("i386-sequent-ptx2\n"); exit (0); 138464ce7165Smrg } 138564ce7165Smrg if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 138664ce7165Smrg printf ("i386-sequent-ptx1\n"); exit (0); 138764ce7165Smrg } 138864ce7165Smrg printf ("i386-sequent-ptx\n"); exit (0); 138964ce7165Smrg 139064ce7165Smrg#endif 139164ce7165Smrg 139264ce7165Smrg#if defined (vax) 139364ce7165Smrg# if !defined (ultrix) 139464ce7165Smrg# include <sys/param.h> 139564ce7165Smrg# if defined (BSD) 139664ce7165Smrg# if BSD == 43 139764ce7165Smrg printf ("vax-dec-bsd4.3\n"); exit (0); 139864ce7165Smrg# else 139964ce7165Smrg# if BSD == 199006 140064ce7165Smrg printf ("vax-dec-bsd4.3reno\n"); exit (0); 140164ce7165Smrg# else 140264ce7165Smrg printf ("vax-dec-bsd\n"); exit (0); 140364ce7165Smrg# endif 140464ce7165Smrg# endif 140564ce7165Smrg# else 140664ce7165Smrg printf ("vax-dec-bsd\n"); exit (0); 140764ce7165Smrg# endif 140864ce7165Smrg# else 140964ce7165Smrg printf ("vax-dec-ultrix\n"); exit (0); 141064ce7165Smrg# endif 141164ce7165Smrg#endif 141264ce7165Smrg 141364ce7165Smrg#if defined (alliant) && defined (i860) 141464ce7165Smrg printf ("i860-alliant-bsd\n"); exit (0); 141564ce7165Smrg#endif 141664ce7165Smrg 141764ce7165Smrg exit (1); 141864ce7165Smrg} 141964ce7165SmrgEOF 142064ce7165Smrg 142164ce7165Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 142264ce7165Smrg { echo "$SYSTEM_NAME"; exit; } 142364ce7165Smrg 142464ce7165Smrg# Apollos put the system type in the environment. 142564ce7165Smrg 142664ce7165Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 142764ce7165Smrg 142864ce7165Smrg# Convex versions that predate uname can use getsysinfo(1) 142964ce7165Smrg 143064ce7165Smrgif [ -x /usr/convex/getsysinfo ] 143164ce7165Smrgthen 143264ce7165Smrg case `getsysinfo -f cpu_type` in 143364ce7165Smrg c1*) 143464ce7165Smrg echo c1-convex-bsd 143564ce7165Smrg exit ;; 143664ce7165Smrg c2*) 143764ce7165Smrg if getsysinfo -f scalar_acc 143864ce7165Smrg then echo c32-convex-bsd 143964ce7165Smrg else echo c2-convex-bsd 144064ce7165Smrg fi 144164ce7165Smrg exit ;; 144264ce7165Smrg c34*) 144364ce7165Smrg echo c34-convex-bsd 144464ce7165Smrg exit ;; 144564ce7165Smrg c38*) 144664ce7165Smrg echo c38-convex-bsd 144764ce7165Smrg exit ;; 144864ce7165Smrg c4*) 144964ce7165Smrg echo c4-convex-bsd 145064ce7165Smrg exit ;; 145164ce7165Smrg esac 145264ce7165Smrgfi 145364ce7165Smrg 145464ce7165Smrgcat >&2 <<EOF 145564ce7165Smrg$0: unable to guess system type 145664ce7165Smrg 145764ce7165SmrgThis script, last modified $timestamp, has failed to recognize 145864ce7165Smrgthe operating system you are using. It is advised that you 145964ce7165Smrgdownload the most up to date version of the config scripts from 146064ce7165Smrg 146164ce7165Smrg http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess 146264ce7165Smrgand 146364ce7165Smrg http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub 146464ce7165Smrg 146564ce7165SmrgIf the version you run ($0) is already up to date, please 146664ce7165Smrgsend the following data and any information you think might be 146764ce7165Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 146864ce7165Smrginformation to handle your system. 146964ce7165Smrg 147064ce7165Smrgconfig.guess timestamp = $timestamp 147164ce7165Smrg 147264ce7165Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 147364ce7165Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 147464ce7165Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 147564ce7165Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 147664ce7165Smrg 147764ce7165Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 147864ce7165Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 147964ce7165Smrg 148064ce7165Smrghostinfo = `(hostinfo) 2>/dev/null` 148164ce7165Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 148264ce7165Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 148364ce7165Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 148464ce7165Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 148564ce7165Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 148664ce7165Smrg 148764ce7165SmrgUNAME_MACHINE = ${UNAME_MACHINE} 148864ce7165SmrgUNAME_RELEASE = ${UNAME_RELEASE} 148964ce7165SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 149064ce7165SmrgUNAME_VERSION = ${UNAME_VERSION} 149164ce7165SmrgEOF 149264ce7165Smrg 149364ce7165Smrgexit 1 149464ce7165Smrg 149564ce7165Smrg# Local variables: 149664ce7165Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 149764ce7165Smrg# time-stamp-start: "timestamp='" 149864ce7165Smrg# time-stamp-format: "%:y-%02m-%02d" 149964ce7165Smrg# time-stamp-end: "'" 150064ce7165Smrg# End: 1501