config.guess revision 93493779
16c321187Smrg#! /bin/sh 26c321187Smrg# Attempt to guess a canonical system name. 36c321187Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 493493779Smrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 593493779Smrg# Free Software Foundation, Inc. 66c321187Smrg 793493779Smrgtimestamp='2008-01-23' 86c321187Smrg 96c321187Smrg# This file is free software; you can redistribute it and/or modify it 106c321187Smrg# under the terms of the GNU General Public License as published by 116c321187Smrg# the Free Software Foundation; either version 2 of the License, or 126c321187Smrg# (at your option) any later version. 136c321187Smrg# 146c321187Smrg# This program is distributed in the hope that it will be useful, but 156c321187Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 166c321187Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 176c321187Smrg# General Public License for more details. 186c321187Smrg# 196c321187Smrg# You should have received a copy of the GNU General Public License 206c321187Smrg# along with this program; if not, write to the Free Software 216c321187Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 226c321187Smrg# 02110-1301, USA. 236c321187Smrg# 246c321187Smrg# As a special exception to the GNU General Public License, if you 256c321187Smrg# distribute this file as part of a program that contains a 266c321187Smrg# configuration script generated by Autoconf, you may include it under 276c321187Smrg# the same distribution terms that you use for the rest of that program. 286c321187Smrg 296c321187Smrg 306c321187Smrg# Originally written by Per Bothner <per@bothner.com>. 316c321187Smrg# Please send patches to <config-patches@gnu.org>. Submit a context 326c321187Smrg# diff and a properly formatted ChangeLog entry. 336c321187Smrg# 346c321187Smrg# This script attempts to guess a canonical system name similar to 356c321187Smrg# config.sub. If it succeeds, it prints the system name on stdout, and 366c321187Smrg# exits with 0. Otherwise, it exits with 1. 376c321187Smrg# 386c321187Smrg# The plan is that this can be called by configure scripts if you 396c321187Smrg# don't specify an explicit build system type. 406c321187Smrg 416c321187Smrgme=`echo "$0" | sed -e 's,.*/,,'` 426c321187Smrg 436c321187Smrgusage="\ 446c321187SmrgUsage: $0 [OPTION] 456c321187Smrg 466c321187SmrgOutput the configuration name of the system \`$me' is run on. 476c321187Smrg 486c321187SmrgOperation modes: 496c321187Smrg -h, --help print this help, then exit 506c321187Smrg -t, --time-stamp print date of last modification, then exit 516c321187Smrg -v, --version print version number, then exit 526c321187Smrg 536c321187SmrgReport bugs and patches to <config-patches@gnu.org>." 546c321187Smrg 556c321187Smrgversion="\ 566c321187SmrgGNU config.guess ($timestamp) 576c321187Smrg 586c321187SmrgOriginally written by Per Bothner. 5993493779SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 6093493779Smrg2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 616c321187Smrg 626c321187SmrgThis is free software; see the source for copying conditions. There is NO 636c321187Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 646c321187Smrg 656c321187Smrghelp=" 666c321187SmrgTry \`$me --help' for more information." 676c321187Smrg 686c321187Smrg# Parse command line 696c321187Smrgwhile test $# -gt 0 ; do 706c321187Smrg case $1 in 716c321187Smrg --time-stamp | --time* | -t ) 726c321187Smrg echo "$timestamp" ; exit ;; 736c321187Smrg --version | -v ) 746c321187Smrg echo "$version" ; exit ;; 756c321187Smrg --help | --h* | -h ) 766c321187Smrg echo "$usage"; exit ;; 776c321187Smrg -- ) # Stop option processing 786c321187Smrg shift; break ;; 796c321187Smrg - ) # Use stdin as input. 806c321187Smrg break ;; 816c321187Smrg -* ) 826c321187Smrg echo "$me: invalid option $1$help" >&2 836c321187Smrg exit 1 ;; 846c321187Smrg * ) 856c321187Smrg break ;; 866c321187Smrg esac 876c321187Smrgdone 886c321187Smrg 896c321187Smrgif test $# != 0; then 906c321187Smrg echo "$me: too many arguments$help" >&2 916c321187Smrg exit 1 926c321187Smrgfi 936c321187Smrg 946c321187Smrgtrap 'exit 1' 1 2 15 956c321187Smrg 966c321187Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 976c321187Smrg# compiler to aid in system detection is discouraged as it requires 986c321187Smrg# temporary files to be created and, as you can see below, it is a 996c321187Smrg# headache to deal with in a portable fashion. 1006c321187Smrg 1016c321187Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 1026c321187Smrg# use `HOST_CC' if defined, but it is deprecated. 1036c321187Smrg 1046c321187Smrg# Portable tmp directory creation inspired by the Autoconf team. 1056c321187Smrg 1066c321187Smrgset_cc_for_build=' 1076c321187Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 1086c321187Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 1096c321187Smrg: ${TMPDIR=/tmp} ; 11093493779Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 1116c321187Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 1126c321187Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 1136c321187Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 1146c321187Smrgdummy=$tmp/dummy ; 1156c321187Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 1166c321187Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 1176c321187Smrg ,,) echo "int x;" > $dummy.c ; 1186c321187Smrg for c in cc gcc c89 c99 ; do 1196c321187Smrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 1206c321187Smrg CC_FOR_BUILD="$c"; break ; 1216c321187Smrg fi ; 1226c321187Smrg done ; 1236c321187Smrg if test x"$CC_FOR_BUILD" = x ; then 1246c321187Smrg CC_FOR_BUILD=no_compiler_found ; 1256c321187Smrg fi 1266c321187Smrg ;; 1276c321187Smrg ,,*) CC_FOR_BUILD=$CC ;; 1286c321187Smrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 1296c321187Smrgesac ; set_cc_for_build= ;' 1306c321187Smrg 1316c321187Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 1326c321187Smrg# (ghazi@noc.rutgers.edu 1994-08-24) 1336c321187Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 1346c321187Smrg PATH=$PATH:/.attbin ; export PATH 1356c321187Smrgfi 1366c321187Smrg 1376c321187SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 1386c321187SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 1396c321187SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 1406c321187SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 1416c321187Smrg 1426c321187Smrg# Note: order is significant - the case branches are not exclusive. 1436c321187Smrg 1446c321187Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 1456c321187Smrg *:NetBSD:*:*) 1466c321187Smrg # NetBSD (nbsd) targets should (where applicable) match one or 1476c321187Smrg # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 1486c321187Smrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 1496c321187Smrg # switched to ELF, *-*-netbsd* would select the old 1506c321187Smrg # object file format. This provides both forward 1516c321187Smrg # compatibility and a consistent mechanism for selecting the 1526c321187Smrg # object file format. 1536c321187Smrg # 1546c321187Smrg # Note: NetBSD doesn't particularly care about the vendor 1556c321187Smrg # portion of the name. We always set it to "unknown". 1566c321187Smrg sysctl="sysctl -n hw.machine_arch" 1576c321187Smrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 1586c321187Smrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 1596c321187Smrg case "${UNAME_MACHINE_ARCH}" in 1606c321187Smrg armeb) machine=armeb-unknown ;; 1616c321187Smrg arm*) machine=arm-unknown ;; 1626c321187Smrg sh3el) machine=shl-unknown ;; 1636c321187Smrg sh3eb) machine=sh-unknown ;; 16493493779Smrg sh5el) machine=sh5le-unknown ;; 1656c321187Smrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 1666c321187Smrg esac 1676c321187Smrg # The Operating System including object format, if it has switched 1686c321187Smrg # to ELF recently, or will in the future. 1696c321187Smrg case "${UNAME_MACHINE_ARCH}" in 1706c321187Smrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 1716c321187Smrg eval $set_cc_for_build 1726c321187Smrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 1736c321187Smrg | grep __ELF__ >/dev/null 1746c321187Smrg then 1756c321187Smrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 1766c321187Smrg # Return netbsd for either. FIX? 1776c321187Smrg os=netbsd 1786c321187Smrg else 1796c321187Smrg os=netbsdelf 1806c321187Smrg fi 1816c321187Smrg ;; 1826c321187Smrg *) 1836c321187Smrg os=netbsd 1846c321187Smrg ;; 1856c321187Smrg esac 1866c321187Smrg # The OS release 1876c321187Smrg # Debian GNU/NetBSD machines have a different userland, and 1886c321187Smrg # thus, need a distinct triplet. However, they do not need 1896c321187Smrg # kernel version information, so it can be replaced with a 1906c321187Smrg # suitable tag, in the style of linux-gnu. 1916c321187Smrg case "${UNAME_VERSION}" in 1926c321187Smrg Debian*) 1936c321187Smrg release='-gnu' 1946c321187Smrg ;; 1956c321187Smrg *) 1966c321187Smrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 1976c321187Smrg ;; 1986c321187Smrg esac 1996c321187Smrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 2006c321187Smrg # contains redundant information, the shorter form: 2016c321187Smrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 2026c321187Smrg echo "${machine}-${os}${release}" 2036c321187Smrg exit ;; 2046c321187Smrg *:OpenBSD:*:*) 2056c321187Smrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 2066c321187Smrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 2076c321187Smrg exit ;; 2086c321187Smrg *:ekkoBSD:*:*) 2096c321187Smrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 2106c321187Smrg exit ;; 21193493779Smrg *:SolidBSD:*:*) 21293493779Smrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 21393493779Smrg exit ;; 2146c321187Smrg macppc:MirBSD:*:*) 21593493779Smrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 2166c321187Smrg exit ;; 2176c321187Smrg *:MirBSD:*:*) 2186c321187Smrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 2196c321187Smrg exit ;; 2206c321187Smrg alpha:OSF1:*:*) 2216c321187Smrg case $UNAME_RELEASE in 2226c321187Smrg *4.0) 2236c321187Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 2246c321187Smrg ;; 2256c321187Smrg *5.*) 2266c321187Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 2276c321187Smrg ;; 2286c321187Smrg esac 2296c321187Smrg # According to Compaq, /usr/sbin/psrinfo has been available on 2306c321187Smrg # OSF/1 and Tru64 systems produced since 1995. I hope that 2316c321187Smrg # covers most systems running today. This code pipes the CPU 2326c321187Smrg # types through head -n 1, so we only detect the type of CPU 0. 2336c321187Smrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 2346c321187Smrg case "$ALPHA_CPU_TYPE" in 2356c321187Smrg "EV4 (21064)") 2366c321187Smrg UNAME_MACHINE="alpha" ;; 2376c321187Smrg "EV4.5 (21064)") 2386c321187Smrg UNAME_MACHINE="alpha" ;; 2396c321187Smrg "LCA4 (21066/21068)") 2406c321187Smrg UNAME_MACHINE="alpha" ;; 2416c321187Smrg "EV5 (21164)") 2426c321187Smrg UNAME_MACHINE="alphaev5" ;; 2436c321187Smrg "EV5.6 (21164A)") 2446c321187Smrg UNAME_MACHINE="alphaev56" ;; 2456c321187Smrg "EV5.6 (21164PC)") 2466c321187Smrg UNAME_MACHINE="alphapca56" ;; 2476c321187Smrg "EV5.7 (21164PC)") 2486c321187Smrg UNAME_MACHINE="alphapca57" ;; 2496c321187Smrg "EV6 (21264)") 2506c321187Smrg UNAME_MACHINE="alphaev6" ;; 2516c321187Smrg "EV6.7 (21264A)") 2526c321187Smrg UNAME_MACHINE="alphaev67" ;; 2536c321187Smrg "EV6.8CB (21264C)") 2546c321187Smrg UNAME_MACHINE="alphaev68" ;; 2556c321187Smrg "EV6.8AL (21264B)") 2566c321187Smrg UNAME_MACHINE="alphaev68" ;; 2576c321187Smrg "EV6.8CX (21264D)") 2586c321187Smrg UNAME_MACHINE="alphaev68" ;; 2596c321187Smrg "EV6.9A (21264/EV69A)") 2606c321187Smrg UNAME_MACHINE="alphaev69" ;; 2616c321187Smrg "EV7 (21364)") 2626c321187Smrg UNAME_MACHINE="alphaev7" ;; 2636c321187Smrg "EV7.9 (21364A)") 2646c321187Smrg UNAME_MACHINE="alphaev79" ;; 2656c321187Smrg esac 2666c321187Smrg # A Pn.n version is a patched version. 2676c321187Smrg # A Vn.n version is a released version. 2686c321187Smrg # A Tn.n version is a released field test version. 2696c321187Smrg # A Xn.n version is an unreleased experimental baselevel. 2706c321187Smrg # 1.2 uses "1.2" for uname -r. 2716c321187Smrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2726c321187Smrg exit ;; 2736c321187Smrg Alpha\ *:Windows_NT*:*) 2746c321187Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 2756c321187Smrg # Should we change UNAME_MACHINE based on the output of uname instead 2766c321187Smrg # of the specific Alpha model? 2776c321187Smrg echo alpha-pc-interix 2786c321187Smrg exit ;; 2796c321187Smrg 21064:Windows_NT:50:3) 2806c321187Smrg echo alpha-dec-winnt3.5 2816c321187Smrg exit ;; 2826c321187Smrg Amiga*:UNIX_System_V:4.0:*) 2836c321187Smrg echo m68k-unknown-sysv4 2846c321187Smrg exit ;; 2856c321187Smrg *:[Aa]miga[Oo][Ss]:*:*) 2866c321187Smrg echo ${UNAME_MACHINE}-unknown-amigaos 2876c321187Smrg exit ;; 2886c321187Smrg *:[Mm]orph[Oo][Ss]:*:*) 2896c321187Smrg echo ${UNAME_MACHINE}-unknown-morphos 2906c321187Smrg exit ;; 2916c321187Smrg *:OS/390:*:*) 2926c321187Smrg echo i370-ibm-openedition 2936c321187Smrg exit ;; 2946c321187Smrg *:z/VM:*:*) 2956c321187Smrg echo s390-ibm-zvmoe 2966c321187Smrg exit ;; 2976c321187Smrg *:OS400:*:*) 2986c321187Smrg echo powerpc-ibm-os400 2996c321187Smrg exit ;; 3006c321187Smrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 3016c321187Smrg echo arm-acorn-riscix${UNAME_RELEASE} 3026c321187Smrg exit ;; 3036c321187Smrg arm:riscos:*:*|arm:RISCOS:*:*) 3046c321187Smrg echo arm-unknown-riscos 3056c321187Smrg exit ;; 3066c321187Smrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 3076c321187Smrg echo hppa1.1-hitachi-hiuxmpp 3086c321187Smrg exit ;; 3096c321187Smrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 3106c321187Smrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 3116c321187Smrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 3126c321187Smrg echo pyramid-pyramid-sysv3 3136c321187Smrg else 3146c321187Smrg echo pyramid-pyramid-bsd 3156c321187Smrg fi 3166c321187Smrg exit ;; 3176c321187Smrg NILE*:*:*:dcosx) 3186c321187Smrg echo pyramid-pyramid-svr4 3196c321187Smrg exit ;; 3206c321187Smrg DRS?6000:unix:4.0:6*) 3216c321187Smrg echo sparc-icl-nx6 3226c321187Smrg exit ;; 3236c321187Smrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 3246c321187Smrg case `/usr/bin/uname -p` in 3256c321187Smrg sparc) echo sparc-icl-nx7; exit ;; 3266c321187Smrg esac ;; 3276c321187Smrg sun4H:SunOS:5.*:*) 3286c321187Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3296c321187Smrg exit ;; 3306c321187Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 3316c321187Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3326c321187Smrg exit ;; 33393493779Smrg i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 3346c321187Smrg echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3356c321187Smrg exit ;; 3366c321187Smrg sun4*:SunOS:6*:*) 3376c321187Smrg # According to config.sub, this is the proper way to canonicalize 3386c321187Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 3396c321187Smrg # it's likely to be more like Solaris than SunOS4. 3406c321187Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3416c321187Smrg exit ;; 3426c321187Smrg sun4*:SunOS:*:*) 3436c321187Smrg case "`/usr/bin/arch -k`" in 3446c321187Smrg Series*|S4*) 3456c321187Smrg UNAME_RELEASE=`uname -v` 3466c321187Smrg ;; 3476c321187Smrg esac 3486c321187Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 3496c321187Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 3506c321187Smrg exit ;; 3516c321187Smrg sun3*:SunOS:*:*) 3526c321187Smrg echo m68k-sun-sunos${UNAME_RELEASE} 3536c321187Smrg exit ;; 3546c321187Smrg sun*:*:4.2BSD:*) 3556c321187Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 3566c321187Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 3576c321187Smrg case "`/bin/arch`" in 3586c321187Smrg sun3) 3596c321187Smrg echo m68k-sun-sunos${UNAME_RELEASE} 3606c321187Smrg ;; 3616c321187Smrg sun4) 3626c321187Smrg echo sparc-sun-sunos${UNAME_RELEASE} 3636c321187Smrg ;; 3646c321187Smrg esac 3656c321187Smrg exit ;; 3666c321187Smrg aushp:SunOS:*:*) 3676c321187Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 3686c321187Smrg exit ;; 3696c321187Smrg # The situation for MiNT is a little confusing. The machine name 3706c321187Smrg # can be virtually everything (everything which is not 3716c321187Smrg # "atarist" or "atariste" at least should have a processor 3726c321187Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 3736c321187Smrg # to the lowercase version "mint" (or "freemint"). Finally 3746c321187Smrg # the system name "TOS" denotes a system which is actually not 3756c321187Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 3766c321187Smrg # be no problem. 3776c321187Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 3786c321187Smrg echo m68k-atari-mint${UNAME_RELEASE} 3796c321187Smrg exit ;; 3806c321187Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 3816c321187Smrg echo m68k-atari-mint${UNAME_RELEASE} 3826c321187Smrg exit ;; 3836c321187Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 3846c321187Smrg echo m68k-atari-mint${UNAME_RELEASE} 3856c321187Smrg exit ;; 3866c321187Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 3876c321187Smrg echo m68k-milan-mint${UNAME_RELEASE} 3886c321187Smrg exit ;; 3896c321187Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 3906c321187Smrg echo m68k-hades-mint${UNAME_RELEASE} 3916c321187Smrg exit ;; 3926c321187Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 3936c321187Smrg echo m68k-unknown-mint${UNAME_RELEASE} 3946c321187Smrg exit ;; 3956c321187Smrg m68k:machten:*:*) 3966c321187Smrg echo m68k-apple-machten${UNAME_RELEASE} 3976c321187Smrg exit ;; 3986c321187Smrg powerpc:machten:*:*) 3996c321187Smrg echo powerpc-apple-machten${UNAME_RELEASE} 4006c321187Smrg exit ;; 4016c321187Smrg RISC*:Mach:*:*) 4026c321187Smrg echo mips-dec-mach_bsd4.3 4036c321187Smrg exit ;; 4046c321187Smrg RISC*:ULTRIX:*:*) 4056c321187Smrg echo mips-dec-ultrix${UNAME_RELEASE} 4066c321187Smrg exit ;; 4076c321187Smrg VAX*:ULTRIX*:*:*) 4086c321187Smrg echo vax-dec-ultrix${UNAME_RELEASE} 4096c321187Smrg exit ;; 4106c321187Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 4116c321187Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 4126c321187Smrg exit ;; 4136c321187Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 4146c321187Smrg eval $set_cc_for_build 4156c321187Smrg sed 's/^ //' << EOF >$dummy.c 4166c321187Smrg#ifdef __cplusplus 4176c321187Smrg#include <stdio.h> /* for printf() prototype */ 4186c321187Smrg int main (int argc, char *argv[]) { 4196c321187Smrg#else 4206c321187Smrg int main (argc, argv) int argc; char *argv[]; { 4216c321187Smrg#endif 4226c321187Smrg #if defined (host_mips) && defined (MIPSEB) 4236c321187Smrg #if defined (SYSTYPE_SYSV) 4246c321187Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 4256c321187Smrg #endif 4266c321187Smrg #if defined (SYSTYPE_SVR4) 4276c321187Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 4286c321187Smrg #endif 4296c321187Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 4306c321187Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 4316c321187Smrg #endif 4326c321187Smrg #endif 4336c321187Smrg exit (-1); 4346c321187Smrg } 4356c321187SmrgEOF 4366c321187Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 4376c321187Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 4386c321187Smrg SYSTEM_NAME=`$dummy $dummyarg` && 4396c321187Smrg { echo "$SYSTEM_NAME"; exit; } 4406c321187Smrg echo mips-mips-riscos${UNAME_RELEASE} 4416c321187Smrg exit ;; 4426c321187Smrg Motorola:PowerMAX_OS:*:*) 4436c321187Smrg echo powerpc-motorola-powermax 4446c321187Smrg exit ;; 4456c321187Smrg Motorola:*:4.3:PL8-*) 4466c321187Smrg echo powerpc-harris-powermax 4476c321187Smrg exit ;; 4486c321187Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 4496c321187Smrg echo powerpc-harris-powermax 4506c321187Smrg exit ;; 4516c321187Smrg Night_Hawk:Power_UNIX:*:*) 4526c321187Smrg echo powerpc-harris-powerunix 4536c321187Smrg exit ;; 4546c321187Smrg m88k:CX/UX:7*:*) 4556c321187Smrg echo m88k-harris-cxux7 4566c321187Smrg exit ;; 4576c321187Smrg m88k:*:4*:R4*) 4586c321187Smrg echo m88k-motorola-sysv4 4596c321187Smrg exit ;; 4606c321187Smrg m88k:*:3*:R3*) 4616c321187Smrg echo m88k-motorola-sysv3 4626c321187Smrg exit ;; 4636c321187Smrg AViiON:dgux:*:*) 4646c321187Smrg # DG/UX returns AViiON for all architectures 4656c321187Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 4666c321187Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 4676c321187Smrg then 4686c321187Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 4696c321187Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 4706c321187Smrg then 4716c321187Smrg echo m88k-dg-dgux${UNAME_RELEASE} 4726c321187Smrg else 4736c321187Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 4746c321187Smrg fi 4756c321187Smrg else 4766c321187Smrg echo i586-dg-dgux${UNAME_RELEASE} 4776c321187Smrg fi 4786c321187Smrg exit ;; 4796c321187Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 4806c321187Smrg echo m88k-dolphin-sysv3 4816c321187Smrg exit ;; 4826c321187Smrg M88*:*:R3*:*) 4836c321187Smrg # Delta 88k system running SVR3 4846c321187Smrg echo m88k-motorola-sysv3 4856c321187Smrg exit ;; 4866c321187Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 4876c321187Smrg echo m88k-tektronix-sysv3 4886c321187Smrg exit ;; 4896c321187Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 4906c321187Smrg echo m68k-tektronix-bsd 4916c321187Smrg exit ;; 4926c321187Smrg *:IRIX*:*:*) 4936c321187Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 4946c321187Smrg exit ;; 4956c321187Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 4966c321187Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 4976c321187Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 4986c321187Smrg i*86:AIX:*:*) 4996c321187Smrg echo i386-ibm-aix 5006c321187Smrg exit ;; 5016c321187Smrg ia64:AIX:*:*) 5026c321187Smrg if [ -x /usr/bin/oslevel ] ; then 5036c321187Smrg IBM_REV=`/usr/bin/oslevel` 5046c321187Smrg else 5056c321187Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 5066c321187Smrg fi 5076c321187Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 5086c321187Smrg exit ;; 5096c321187Smrg *:AIX:2:3) 5106c321187Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 5116c321187Smrg eval $set_cc_for_build 5126c321187Smrg sed 's/^ //' << EOF >$dummy.c 5136c321187Smrg #include <sys/systemcfg.h> 5146c321187Smrg 5156c321187Smrg main() 5166c321187Smrg { 5176c321187Smrg if (!__power_pc()) 5186c321187Smrg exit(1); 5196c321187Smrg puts("powerpc-ibm-aix3.2.5"); 5206c321187Smrg exit(0); 5216c321187Smrg } 5226c321187SmrgEOF 5236c321187Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 5246c321187Smrg then 5256c321187Smrg echo "$SYSTEM_NAME" 5266c321187Smrg else 5276c321187Smrg echo rs6000-ibm-aix3.2.5 5286c321187Smrg fi 5296c321187Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 5306c321187Smrg echo rs6000-ibm-aix3.2.4 5316c321187Smrg else 5326c321187Smrg echo rs6000-ibm-aix3.2 5336c321187Smrg fi 5346c321187Smrg exit ;; 53593493779Smrg *:AIX:*:[456]) 5366c321187Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 5376c321187Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 5386c321187Smrg IBM_ARCH=rs6000 5396c321187Smrg else 5406c321187Smrg IBM_ARCH=powerpc 5416c321187Smrg fi 5426c321187Smrg if [ -x /usr/bin/oslevel ] ; then 5436c321187Smrg IBM_REV=`/usr/bin/oslevel` 5446c321187Smrg else 5456c321187Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 5466c321187Smrg fi 5476c321187Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 5486c321187Smrg exit ;; 5496c321187Smrg *:AIX:*:*) 5506c321187Smrg echo rs6000-ibm-aix 5516c321187Smrg exit ;; 5526c321187Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 5536c321187Smrg echo romp-ibm-bsd4.4 5546c321187Smrg exit ;; 5556c321187Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 5566c321187Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 5576c321187Smrg exit ;; # report: romp-ibm BSD 4.3 5586c321187Smrg *:BOSX:*:*) 5596c321187Smrg echo rs6000-bull-bosx 5606c321187Smrg exit ;; 5616c321187Smrg DPX/2?00:B.O.S.:*:*) 5626c321187Smrg echo m68k-bull-sysv3 5636c321187Smrg exit ;; 5646c321187Smrg 9000/[34]??:4.3bsd:1.*:*) 5656c321187Smrg echo m68k-hp-bsd 5666c321187Smrg exit ;; 5676c321187Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 5686c321187Smrg echo m68k-hp-bsd4.4 5696c321187Smrg exit ;; 5706c321187Smrg 9000/[34678]??:HP-UX:*:*) 5716c321187Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 5726c321187Smrg case "${UNAME_MACHINE}" in 5736c321187Smrg 9000/31? ) HP_ARCH=m68000 ;; 5746c321187Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 5756c321187Smrg 9000/[678][0-9][0-9]) 5766c321187Smrg if [ -x /usr/bin/getconf ]; then 5776c321187Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 5786c321187Smrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 5796c321187Smrg case "${sc_cpu_version}" in 5806c321187Smrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 5816c321187Smrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 5826c321187Smrg 532) # CPU_PA_RISC2_0 5836c321187Smrg case "${sc_kernel_bits}" in 5846c321187Smrg 32) HP_ARCH="hppa2.0n" ;; 5856c321187Smrg 64) HP_ARCH="hppa2.0w" ;; 5866c321187Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 5876c321187Smrg esac ;; 5886c321187Smrg esac 5896c321187Smrg fi 5906c321187Smrg if [ "${HP_ARCH}" = "" ]; then 5916c321187Smrg eval $set_cc_for_build 5926c321187Smrg sed 's/^ //' << EOF >$dummy.c 5936c321187Smrg 5946c321187Smrg #define _HPUX_SOURCE 5956c321187Smrg #include <stdlib.h> 5966c321187Smrg #include <unistd.h> 5976c321187Smrg 5986c321187Smrg int main () 5996c321187Smrg { 6006c321187Smrg #if defined(_SC_KERNEL_BITS) 6016c321187Smrg long bits = sysconf(_SC_KERNEL_BITS); 6026c321187Smrg #endif 6036c321187Smrg long cpu = sysconf (_SC_CPU_VERSION); 6046c321187Smrg 6056c321187Smrg switch (cpu) 6066c321187Smrg { 6076c321187Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 6086c321187Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 6096c321187Smrg case CPU_PA_RISC2_0: 6106c321187Smrg #if defined(_SC_KERNEL_BITS) 6116c321187Smrg switch (bits) 6126c321187Smrg { 6136c321187Smrg case 64: puts ("hppa2.0w"); break; 6146c321187Smrg case 32: puts ("hppa2.0n"); break; 6156c321187Smrg default: puts ("hppa2.0"); break; 6166c321187Smrg } break; 6176c321187Smrg #else /* !defined(_SC_KERNEL_BITS) */ 6186c321187Smrg puts ("hppa2.0"); break; 6196c321187Smrg #endif 6206c321187Smrg default: puts ("hppa1.0"); break; 6216c321187Smrg } 6226c321187Smrg exit (0); 6236c321187Smrg } 6246c321187SmrgEOF 6256c321187Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 6266c321187Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 6276c321187Smrg fi ;; 6286c321187Smrg esac 6296c321187Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 6306c321187Smrg then 6316c321187Smrg eval $set_cc_for_build 6326c321187Smrg 6336c321187Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 6346c321187Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 6356c321187Smrg # generating 64-bit code. GNU and HP use different nomenclature: 6366c321187Smrg # 6376c321187Smrg # $ CC_FOR_BUILD=cc ./config.guess 6386c321187Smrg # => hppa2.0w-hp-hpux11.23 6396c321187Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 6406c321187Smrg # => hppa64-hp-hpux11.23 6416c321187Smrg 6426c321187Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 6436c321187Smrg grep __LP64__ >/dev/null 6446c321187Smrg then 6456c321187Smrg HP_ARCH="hppa2.0w" 6466c321187Smrg else 6476c321187Smrg HP_ARCH="hppa64" 6486c321187Smrg fi 6496c321187Smrg fi 6506c321187Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 6516c321187Smrg exit ;; 6526c321187Smrg ia64:HP-UX:*:*) 6536c321187Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 6546c321187Smrg echo ia64-hp-hpux${HPUX_REV} 6556c321187Smrg exit ;; 6566c321187Smrg 3050*:HI-UX:*:*) 6576c321187Smrg eval $set_cc_for_build 6586c321187Smrg sed 's/^ //' << EOF >$dummy.c 6596c321187Smrg #include <unistd.h> 6606c321187Smrg int 6616c321187Smrg main () 6626c321187Smrg { 6636c321187Smrg long cpu = sysconf (_SC_CPU_VERSION); 6646c321187Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 6656c321187Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 6666c321187Smrg results, however. */ 6676c321187Smrg if (CPU_IS_PA_RISC (cpu)) 6686c321187Smrg { 6696c321187Smrg switch (cpu) 6706c321187Smrg { 6716c321187Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 6726c321187Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 6736c321187Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 6746c321187Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 6756c321187Smrg } 6766c321187Smrg } 6776c321187Smrg else if (CPU_IS_HP_MC68K (cpu)) 6786c321187Smrg puts ("m68k-hitachi-hiuxwe2"); 6796c321187Smrg else puts ("unknown-hitachi-hiuxwe2"); 6806c321187Smrg exit (0); 6816c321187Smrg } 6826c321187SmrgEOF 6836c321187Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 6846c321187Smrg { echo "$SYSTEM_NAME"; exit; } 6856c321187Smrg echo unknown-hitachi-hiuxwe2 6866c321187Smrg exit ;; 6876c321187Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 6886c321187Smrg echo hppa1.1-hp-bsd 6896c321187Smrg exit ;; 6906c321187Smrg 9000/8??:4.3bsd:*:*) 6916c321187Smrg echo hppa1.0-hp-bsd 6926c321187Smrg exit ;; 6936c321187Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 6946c321187Smrg echo hppa1.0-hp-mpeix 6956c321187Smrg exit ;; 6966c321187Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 6976c321187Smrg echo hppa1.1-hp-osf 6986c321187Smrg exit ;; 6996c321187Smrg hp8??:OSF1:*:*) 7006c321187Smrg echo hppa1.0-hp-osf 7016c321187Smrg exit ;; 7026c321187Smrg i*86:OSF1:*:*) 7036c321187Smrg if [ -x /usr/sbin/sysversion ] ; then 7046c321187Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 7056c321187Smrg else 7066c321187Smrg echo ${UNAME_MACHINE}-unknown-osf1 7076c321187Smrg fi 7086c321187Smrg exit ;; 7096c321187Smrg parisc*:Lites*:*:*) 7106c321187Smrg echo hppa1.1-hp-lites 7116c321187Smrg exit ;; 7126c321187Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 7136c321187Smrg echo c1-convex-bsd 7146c321187Smrg exit ;; 7156c321187Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 7166c321187Smrg if getsysinfo -f scalar_acc 7176c321187Smrg then echo c32-convex-bsd 7186c321187Smrg else echo c2-convex-bsd 7196c321187Smrg fi 7206c321187Smrg exit ;; 7216c321187Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 7226c321187Smrg echo c34-convex-bsd 7236c321187Smrg exit ;; 7246c321187Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 7256c321187Smrg echo c38-convex-bsd 7266c321187Smrg exit ;; 7276c321187Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 7286c321187Smrg echo c4-convex-bsd 7296c321187Smrg exit ;; 7306c321187Smrg CRAY*Y-MP:*:*:*) 7316c321187Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7326c321187Smrg exit ;; 7336c321187Smrg CRAY*[A-Z]90:*:*:*) 7346c321187Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 7356c321187Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 7366c321187Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 7376c321187Smrg -e 's/\.[^.]*$/.X/' 7386c321187Smrg exit ;; 7396c321187Smrg CRAY*TS:*:*:*) 7406c321187Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7416c321187Smrg exit ;; 7426c321187Smrg CRAY*T3E:*:*:*) 7436c321187Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7446c321187Smrg exit ;; 7456c321187Smrg CRAY*SV1:*:*:*) 7466c321187Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7476c321187Smrg exit ;; 7486c321187Smrg *:UNICOS/mp:*:*) 7496c321187Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7506c321187Smrg exit ;; 7516c321187Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 7526c321187Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7536c321187Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 7546c321187Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 7556c321187Smrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 7566c321187Smrg exit ;; 7576c321187Smrg 5000:UNIX_System_V:4.*:*) 7586c321187Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 7596c321187Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 7606c321187Smrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 7616c321187Smrg exit ;; 7626c321187Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 7636c321187Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 7646c321187Smrg exit ;; 7656c321187Smrg sparc*:BSD/OS:*:*) 7666c321187Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 7676c321187Smrg exit ;; 7686c321187Smrg *:BSD/OS:*:*) 7696c321187Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 7706c321187Smrg exit ;; 7716c321187Smrg *:FreeBSD:*:*) 77293493779Smrg case ${UNAME_MACHINE} in 77393493779Smrg pc98) 77493493779Smrg echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 77593493779Smrg amd64) 77693493779Smrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 77793493779Smrg *) 77893493779Smrg echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 77993493779Smrg esac 7806c321187Smrg exit ;; 7816c321187Smrg i*:CYGWIN*:*) 7826c321187Smrg echo ${UNAME_MACHINE}-pc-cygwin 7836c321187Smrg exit ;; 78493493779Smrg *:MINGW*:*) 7856c321187Smrg echo ${UNAME_MACHINE}-pc-mingw32 7866c321187Smrg exit ;; 7876c321187Smrg i*:windows32*:*) 7886c321187Smrg # uname -m includes "-pc" on this system. 7896c321187Smrg echo ${UNAME_MACHINE}-mingw32 7906c321187Smrg exit ;; 7916c321187Smrg i*:PW*:*) 7926c321187Smrg echo ${UNAME_MACHINE}-pc-pw32 7936c321187Smrg exit ;; 79493493779Smrg *:Interix*:[3456]*) 79593493779Smrg case ${UNAME_MACHINE} in 79693493779Smrg x86) 79793493779Smrg echo i586-pc-interix${UNAME_RELEASE} 79893493779Smrg exit ;; 79993493779Smrg EM64T | authenticamd) 80093493779Smrg echo x86_64-unknown-interix${UNAME_RELEASE} 80193493779Smrg exit ;; 80293493779Smrg IA64) 80393493779Smrg echo ia64-unknown-interix${UNAME_RELEASE} 80493493779Smrg exit ;; 80593493779Smrg esac ;; 8066c321187Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 8076c321187Smrg echo i${UNAME_MACHINE}-pc-mks 8086c321187Smrg exit ;; 8096c321187Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 8106c321187Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 8116c321187Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 8126c321187Smrg # UNAME_MACHINE based on the output of uname instead of i386? 8136c321187Smrg echo i586-pc-interix 8146c321187Smrg exit ;; 8156c321187Smrg i*:UWIN*:*) 8166c321187Smrg echo ${UNAME_MACHINE}-pc-uwin 8176c321187Smrg exit ;; 8186c321187Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 8196c321187Smrg echo x86_64-unknown-cygwin 8206c321187Smrg exit ;; 8216c321187Smrg p*:CYGWIN*:*) 8226c321187Smrg echo powerpcle-unknown-cygwin 8236c321187Smrg exit ;; 8246c321187Smrg prep*:SunOS:5.*:*) 8256c321187Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 8266c321187Smrg exit ;; 8276c321187Smrg *:GNU:*:*) 8286c321187Smrg # the GNU system 8296c321187Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 8306c321187Smrg exit ;; 8316c321187Smrg *:GNU/*:*:*) 8326c321187Smrg # other systems with GNU libc and userland 8336c321187Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 8346c321187Smrg exit ;; 8356c321187Smrg i*86:Minix:*:*) 8366c321187Smrg echo ${UNAME_MACHINE}-pc-minix 8376c321187Smrg exit ;; 8386c321187Smrg arm*:Linux:*:*) 83993493779Smrg eval $set_cc_for_build 84093493779Smrg if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 84193493779Smrg | grep -q __ARM_EABI__ 84293493779Smrg then 84393493779Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 84493493779Smrg else 84593493779Smrg echo ${UNAME_MACHINE}-unknown-linux-gnueabi 84693493779Smrg fi 84793493779Smrg exit ;; 84893493779Smrg avr32*:Linux:*:*) 8496c321187Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8506c321187Smrg exit ;; 8516c321187Smrg cris:Linux:*:*) 8526c321187Smrg echo cris-axis-linux-gnu 8536c321187Smrg exit ;; 8546c321187Smrg crisv32:Linux:*:*) 8556c321187Smrg echo crisv32-axis-linux-gnu 8566c321187Smrg exit ;; 8576c321187Smrg frv:Linux:*:*) 8586c321187Smrg echo frv-unknown-linux-gnu 8596c321187Smrg exit ;; 8606c321187Smrg ia64:Linux:*:*) 8616c321187Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8626c321187Smrg exit ;; 8636c321187Smrg m32r*:Linux:*:*) 8646c321187Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8656c321187Smrg exit ;; 8666c321187Smrg m68*:Linux:*:*) 8676c321187Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8686c321187Smrg exit ;; 8696c321187Smrg mips:Linux:*:*) 8706c321187Smrg eval $set_cc_for_build 8716c321187Smrg sed 's/^ //' << EOF >$dummy.c 8726c321187Smrg #undef CPU 8736c321187Smrg #undef mips 8746c321187Smrg #undef mipsel 8756c321187Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 8766c321187Smrg CPU=mipsel 8776c321187Smrg #else 8786c321187Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 8796c321187Smrg CPU=mips 8806c321187Smrg #else 8816c321187Smrg CPU= 8826c321187Smrg #endif 8836c321187Smrg #endif 8846c321187SmrgEOF 88593493779Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 88693493779Smrg /^CPU/{ 88793493779Smrg s: ::g 88893493779Smrg p 88993493779Smrg }'`" 8906c321187Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 8916c321187Smrg ;; 8926c321187Smrg mips64:Linux:*:*) 8936c321187Smrg eval $set_cc_for_build 8946c321187Smrg sed 's/^ //' << EOF >$dummy.c 8956c321187Smrg #undef CPU 8966c321187Smrg #undef mips64 8976c321187Smrg #undef mips64el 8986c321187Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 8996c321187Smrg CPU=mips64el 9006c321187Smrg #else 9016c321187Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 9026c321187Smrg CPU=mips64 9036c321187Smrg #else 9046c321187Smrg CPU= 9056c321187Smrg #endif 9066c321187Smrg #endif 9076c321187SmrgEOF 90893493779Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 90993493779Smrg /^CPU/{ 91093493779Smrg s: ::g 91193493779Smrg p 91293493779Smrg }'`" 9136c321187Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 9146c321187Smrg ;; 9156c321187Smrg or32:Linux:*:*) 9166c321187Smrg echo or32-unknown-linux-gnu 9176c321187Smrg exit ;; 9186c321187Smrg ppc:Linux:*:*) 9196c321187Smrg echo powerpc-unknown-linux-gnu 9206c321187Smrg exit ;; 9216c321187Smrg ppc64:Linux:*:*) 9226c321187Smrg echo powerpc64-unknown-linux-gnu 9236c321187Smrg exit ;; 9246c321187Smrg alpha:Linux:*:*) 9256c321187Smrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 9266c321187Smrg EV5) UNAME_MACHINE=alphaev5 ;; 9276c321187Smrg EV56) UNAME_MACHINE=alphaev56 ;; 9286c321187Smrg PCA56) UNAME_MACHINE=alphapca56 ;; 9296c321187Smrg PCA57) UNAME_MACHINE=alphapca56 ;; 9306c321187Smrg EV6) UNAME_MACHINE=alphaev6 ;; 9316c321187Smrg EV67) UNAME_MACHINE=alphaev67 ;; 9326c321187Smrg EV68*) UNAME_MACHINE=alphaev68 ;; 9336c321187Smrg esac 9346c321187Smrg objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 9356c321187Smrg if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 9366c321187Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 9376c321187Smrg exit ;; 9386c321187Smrg parisc:Linux:*:* | hppa:Linux:*:*) 9396c321187Smrg # Look for CPU level 9406c321187Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 9416c321187Smrg PA7*) echo hppa1.1-unknown-linux-gnu ;; 9426c321187Smrg PA8*) echo hppa2.0-unknown-linux-gnu ;; 9436c321187Smrg *) echo hppa-unknown-linux-gnu ;; 9446c321187Smrg esac 9456c321187Smrg exit ;; 9466c321187Smrg parisc64:Linux:*:* | hppa64:Linux:*:*) 9476c321187Smrg echo hppa64-unknown-linux-gnu 9486c321187Smrg exit ;; 9496c321187Smrg s390:Linux:*:* | s390x:Linux:*:*) 9506c321187Smrg echo ${UNAME_MACHINE}-ibm-linux 9516c321187Smrg exit ;; 9526c321187Smrg sh64*:Linux:*:*) 9536c321187Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9546c321187Smrg exit ;; 9556c321187Smrg sh*:Linux:*:*) 9566c321187Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9576c321187Smrg exit ;; 9586c321187Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 9596c321187Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9606c321187Smrg exit ;; 9616c321187Smrg vax:Linux:*:*) 9626c321187Smrg echo ${UNAME_MACHINE}-dec-linux-gnu 9636c321187Smrg exit ;; 9646c321187Smrg x86_64:Linux:*:*) 9656c321187Smrg echo x86_64-unknown-linux-gnu 9666c321187Smrg exit ;; 96793493779Smrg xtensa*:Linux:*:*) 96893493779Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 96993493779Smrg exit ;; 9706c321187Smrg i*86:Linux:*:*) 9716c321187Smrg # The BFD linker knows what the default object file format is, so 9726c321187Smrg # first see if it will tell us. cd to the root directory to prevent 9736c321187Smrg # problems with other programs or directories called `ld' in the path. 9746c321187Smrg # Set LC_ALL=C to ensure ld outputs messages in English. 9756c321187Smrg ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ 9766c321187Smrg | sed -ne '/supported targets:/!d 9776c321187Smrg s/[ ][ ]*/ /g 9786c321187Smrg s/.*supported targets: *// 9796c321187Smrg s/ .*// 9806c321187Smrg p'` 9816c321187Smrg case "$ld_supported_targets" in 9826c321187Smrg elf32-i386) 9836c321187Smrg TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 9846c321187Smrg ;; 9856c321187Smrg a.out-i386-linux) 9866c321187Smrg echo "${UNAME_MACHINE}-pc-linux-gnuaout" 9876c321187Smrg exit ;; 9886c321187Smrg coff-i386) 9896c321187Smrg echo "${UNAME_MACHINE}-pc-linux-gnucoff" 9906c321187Smrg exit ;; 9916c321187Smrg "") 9926c321187Smrg # Either a pre-BFD a.out linker (linux-gnuoldld) or 9936c321187Smrg # one that does not give us useful --help. 9946c321187Smrg echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 9956c321187Smrg exit ;; 9966c321187Smrg esac 9976c321187Smrg # Determine whether the default compiler is a.out or elf 9986c321187Smrg eval $set_cc_for_build 9996c321187Smrg sed 's/^ //' << EOF >$dummy.c 10006c321187Smrg #include <features.h> 10016c321187Smrg #ifdef __ELF__ 10026c321187Smrg # ifdef __GLIBC__ 10036c321187Smrg # if __GLIBC__ >= 2 10046c321187Smrg LIBC=gnu 10056c321187Smrg # else 10066c321187Smrg LIBC=gnulibc1 10076c321187Smrg # endif 10086c321187Smrg # else 10096c321187Smrg LIBC=gnulibc1 10106c321187Smrg # endif 10116c321187Smrg #else 101293493779Smrg #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) 10136c321187Smrg LIBC=gnu 10146c321187Smrg #else 10156c321187Smrg LIBC=gnuaout 10166c321187Smrg #endif 10176c321187Smrg #endif 10186c321187Smrg #ifdef __dietlibc__ 10196c321187Smrg LIBC=dietlibc 10206c321187Smrg #endif 10216c321187SmrgEOF 102293493779Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 102393493779Smrg /^LIBC/{ 102493493779Smrg s: ::g 102593493779Smrg p 102693493779Smrg }'`" 10276c321187Smrg test x"${LIBC}" != x && { 10286c321187Smrg echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 10296c321187Smrg exit 10306c321187Smrg } 10316c321187Smrg test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } 10326c321187Smrg ;; 10336c321187Smrg i*86:DYNIX/ptx:4*:*) 10346c321187Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 10356c321187Smrg # earlier versions are messed up and put the nodename in both 10366c321187Smrg # sysname and nodename. 10376c321187Smrg echo i386-sequent-sysv4 10386c321187Smrg exit ;; 10396c321187Smrg i*86:UNIX_SV:4.2MP:2.*) 10406c321187Smrg # Unixware is an offshoot of SVR4, but it has its own version 10416c321187Smrg # number series starting with 2... 10426c321187Smrg # I am not positive that other SVR4 systems won't match this, 10436c321187Smrg # I just have to hope. -- rms. 10446c321187Smrg # Use sysv4.2uw... so that sysv4* matches it. 10456c321187Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 10466c321187Smrg exit ;; 10476c321187Smrg i*86:OS/2:*:*) 10486c321187Smrg # If we were able to find `uname', then EMX Unix compatibility 10496c321187Smrg # is probably installed. 10506c321187Smrg echo ${UNAME_MACHINE}-pc-os2-emx 10516c321187Smrg exit ;; 10526c321187Smrg i*86:XTS-300:*:STOP) 10536c321187Smrg echo ${UNAME_MACHINE}-unknown-stop 10546c321187Smrg exit ;; 10556c321187Smrg i*86:atheos:*:*) 10566c321187Smrg echo ${UNAME_MACHINE}-unknown-atheos 10576c321187Smrg exit ;; 10586c321187Smrg i*86:syllable:*:*) 10596c321187Smrg echo ${UNAME_MACHINE}-pc-syllable 10606c321187Smrg exit ;; 10616c321187Smrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 10626c321187Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 10636c321187Smrg exit ;; 10646c321187Smrg i*86:*DOS:*:*) 10656c321187Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 10666c321187Smrg exit ;; 10676c321187Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 10686c321187Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 10696c321187Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 10706c321187Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 10716c321187Smrg else 10726c321187Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 10736c321187Smrg fi 10746c321187Smrg exit ;; 10756c321187Smrg i*86:*:5:[678]*) 10766c321187Smrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 10776c321187Smrg case `/bin/uname -X | grep "^Machine"` in 10786c321187Smrg *486*) UNAME_MACHINE=i486 ;; 10796c321187Smrg *Pentium) UNAME_MACHINE=i586 ;; 10806c321187Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 10816c321187Smrg esac 10826c321187Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 10836c321187Smrg exit ;; 10846c321187Smrg i*86:*:3.2:*) 10856c321187Smrg if test -f /usr/options/cb.name; then 10866c321187Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 10876c321187Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 10886c321187Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 10896c321187Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 10906c321187Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 10916c321187Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 10926c321187Smrg && UNAME_MACHINE=i586 10936c321187Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 10946c321187Smrg && UNAME_MACHINE=i686 10956c321187Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 10966c321187Smrg && UNAME_MACHINE=i686 10976c321187Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 10986c321187Smrg else 10996c321187Smrg echo ${UNAME_MACHINE}-pc-sysv32 11006c321187Smrg fi 11016c321187Smrg exit ;; 11026c321187Smrg pc:*:*:*) 11036c321187Smrg # Left here for compatibility: 11046c321187Smrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 11056c321187Smrg # the processor, so we play safe by assuming i386. 11066c321187Smrg echo i386-pc-msdosdjgpp 11076c321187Smrg exit ;; 11086c321187Smrg Intel:Mach:3*:*) 11096c321187Smrg echo i386-pc-mach3 11106c321187Smrg exit ;; 11116c321187Smrg paragon:*:*:*) 11126c321187Smrg echo i860-intel-osf1 11136c321187Smrg exit ;; 11146c321187Smrg i860:*:4.*:*) # i860-SVR4 11156c321187Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 11166c321187Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 11176c321187Smrg else # Add other i860-SVR4 vendors below as they are discovered. 11186c321187Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 11196c321187Smrg fi 11206c321187Smrg exit ;; 11216c321187Smrg mini*:CTIX:SYS*5:*) 11226c321187Smrg # "miniframe" 11236c321187Smrg echo m68010-convergent-sysv 11246c321187Smrg exit ;; 11256c321187Smrg mc68k:UNIX:SYSTEM5:3.51m) 11266c321187Smrg echo m68k-convergent-sysv 11276c321187Smrg exit ;; 11286c321187Smrg M680?0:D-NIX:5.3:*) 11296c321187Smrg echo m68k-diab-dnix 11306c321187Smrg exit ;; 11316c321187Smrg M68*:*:R3V[5678]*:*) 11326c321187Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 11336c321187Smrg 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) 11346c321187Smrg OS_REL='' 11356c321187Smrg test -r /etc/.relid \ 11366c321187Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 11376c321187Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 11386c321187Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 11396c321187Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 11406c321187Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 11416c321187Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 11426c321187Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 11436c321187Smrg && { echo i486-ncr-sysv4; exit; } ;; 11446c321187Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 11456c321187Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 11466c321187Smrg exit ;; 11476c321187Smrg mc68030:UNIX_System_V:4.*:*) 11486c321187Smrg echo m68k-atari-sysv4 11496c321187Smrg exit ;; 11506c321187Smrg TSUNAMI:LynxOS:2.*:*) 11516c321187Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 11526c321187Smrg exit ;; 11536c321187Smrg rs6000:LynxOS:2.*:*) 11546c321187Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 11556c321187Smrg exit ;; 11566c321187Smrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 11576c321187Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 11586c321187Smrg exit ;; 11596c321187Smrg SM[BE]S:UNIX_SV:*:*) 11606c321187Smrg echo mips-dde-sysv${UNAME_RELEASE} 11616c321187Smrg exit ;; 11626c321187Smrg RM*:ReliantUNIX-*:*:*) 11636c321187Smrg echo mips-sni-sysv4 11646c321187Smrg exit ;; 11656c321187Smrg RM*:SINIX-*:*:*) 11666c321187Smrg echo mips-sni-sysv4 11676c321187Smrg exit ;; 11686c321187Smrg *:SINIX-*:*:*) 11696c321187Smrg if uname -p 2>/dev/null >/dev/null ; then 11706c321187Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 11716c321187Smrg echo ${UNAME_MACHINE}-sni-sysv4 11726c321187Smrg else 11736c321187Smrg echo ns32k-sni-sysv 11746c321187Smrg fi 11756c321187Smrg exit ;; 11766c321187Smrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 11776c321187Smrg # says <Richard.M.Bartel@ccMail.Census.GOV> 11786c321187Smrg echo i586-unisys-sysv4 11796c321187Smrg exit ;; 11806c321187Smrg *:UNIX_System_V:4*:FTX*) 11816c321187Smrg # From Gerald Hewes <hewes@openmarket.com>. 11826c321187Smrg # How about differentiating between stratus architectures? -djm 11836c321187Smrg echo hppa1.1-stratus-sysv4 11846c321187Smrg exit ;; 11856c321187Smrg *:*:*:FTX*) 11866c321187Smrg # From seanf@swdc.stratus.com. 11876c321187Smrg echo i860-stratus-sysv4 11886c321187Smrg exit ;; 11896c321187Smrg i*86:VOS:*:*) 11906c321187Smrg # From Paul.Green@stratus.com. 11916c321187Smrg echo ${UNAME_MACHINE}-stratus-vos 11926c321187Smrg exit ;; 11936c321187Smrg *:VOS:*:*) 11946c321187Smrg # From Paul.Green@stratus.com. 11956c321187Smrg echo hppa1.1-stratus-vos 11966c321187Smrg exit ;; 11976c321187Smrg mc68*:A/UX:*:*) 11986c321187Smrg echo m68k-apple-aux${UNAME_RELEASE} 11996c321187Smrg exit ;; 12006c321187Smrg news*:NEWS-OS:6*:*) 12016c321187Smrg echo mips-sony-newsos6 12026c321187Smrg exit ;; 12036c321187Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 12046c321187Smrg if [ -d /usr/nec ]; then 12056c321187Smrg echo mips-nec-sysv${UNAME_RELEASE} 12066c321187Smrg else 12076c321187Smrg echo mips-unknown-sysv${UNAME_RELEASE} 12086c321187Smrg fi 12096c321187Smrg exit ;; 12106c321187Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 12116c321187Smrg echo powerpc-be-beos 12126c321187Smrg exit ;; 12136c321187Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 12146c321187Smrg echo powerpc-apple-beos 12156c321187Smrg exit ;; 12166c321187Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 12176c321187Smrg echo i586-pc-beos 12186c321187Smrg exit ;; 12196c321187Smrg SX-4:SUPER-UX:*:*) 12206c321187Smrg echo sx4-nec-superux${UNAME_RELEASE} 12216c321187Smrg exit ;; 12226c321187Smrg SX-5:SUPER-UX:*:*) 12236c321187Smrg echo sx5-nec-superux${UNAME_RELEASE} 12246c321187Smrg exit ;; 12256c321187Smrg SX-6:SUPER-UX:*:*) 12266c321187Smrg echo sx6-nec-superux${UNAME_RELEASE} 12276c321187Smrg exit ;; 122893493779Smrg SX-7:SUPER-UX:*:*) 122993493779Smrg echo sx7-nec-superux${UNAME_RELEASE} 123093493779Smrg exit ;; 123193493779Smrg SX-8:SUPER-UX:*:*) 123293493779Smrg echo sx8-nec-superux${UNAME_RELEASE} 123393493779Smrg exit ;; 123493493779Smrg SX-8R:SUPER-UX:*:*) 123593493779Smrg echo sx8r-nec-superux${UNAME_RELEASE} 123693493779Smrg exit ;; 12376c321187Smrg Power*:Rhapsody:*:*) 12386c321187Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 12396c321187Smrg exit ;; 12406c321187Smrg *:Rhapsody:*:*) 12416c321187Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 12426c321187Smrg exit ;; 12436c321187Smrg *:Darwin:*:*) 12446c321187Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 12456c321187Smrg case $UNAME_PROCESSOR in 12466c321187Smrg unknown) UNAME_PROCESSOR=powerpc ;; 12476c321187Smrg esac 12486c321187Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 12496c321187Smrg exit ;; 12506c321187Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 12516c321187Smrg UNAME_PROCESSOR=`uname -p` 12526c321187Smrg if test "$UNAME_PROCESSOR" = "x86"; then 12536c321187Smrg UNAME_PROCESSOR=i386 12546c321187Smrg UNAME_MACHINE=pc 12556c321187Smrg fi 12566c321187Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 12576c321187Smrg exit ;; 12586c321187Smrg *:QNX:*:4*) 12596c321187Smrg echo i386-pc-qnx 12606c321187Smrg exit ;; 12616c321187Smrg NSE-?:NONSTOP_KERNEL:*:*) 12626c321187Smrg echo nse-tandem-nsk${UNAME_RELEASE} 12636c321187Smrg exit ;; 12646c321187Smrg NSR-?:NONSTOP_KERNEL:*:*) 12656c321187Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 12666c321187Smrg exit ;; 12676c321187Smrg *:NonStop-UX:*:*) 12686c321187Smrg echo mips-compaq-nonstopux 12696c321187Smrg exit ;; 12706c321187Smrg BS2000:POSIX*:*:*) 12716c321187Smrg echo bs2000-siemens-sysv 12726c321187Smrg exit ;; 12736c321187Smrg DS/*:UNIX_System_V:*:*) 12746c321187Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 12756c321187Smrg exit ;; 12766c321187Smrg *:Plan9:*:*) 12776c321187Smrg # "uname -m" is not consistent, so use $cputype instead. 386 12786c321187Smrg # is converted to i386 for consistency with other x86 12796c321187Smrg # operating systems. 12806c321187Smrg if test "$cputype" = "386"; then 12816c321187Smrg UNAME_MACHINE=i386 12826c321187Smrg else 12836c321187Smrg UNAME_MACHINE="$cputype" 12846c321187Smrg fi 12856c321187Smrg echo ${UNAME_MACHINE}-unknown-plan9 12866c321187Smrg exit ;; 12876c321187Smrg *:TOPS-10:*:*) 12886c321187Smrg echo pdp10-unknown-tops10 12896c321187Smrg exit ;; 12906c321187Smrg *:TENEX:*:*) 12916c321187Smrg echo pdp10-unknown-tenex 12926c321187Smrg exit ;; 12936c321187Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 12946c321187Smrg echo pdp10-dec-tops20 12956c321187Smrg exit ;; 12966c321187Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 12976c321187Smrg echo pdp10-xkl-tops20 12986c321187Smrg exit ;; 12996c321187Smrg *:TOPS-20:*:*) 13006c321187Smrg echo pdp10-unknown-tops20 13016c321187Smrg exit ;; 13026c321187Smrg *:ITS:*:*) 13036c321187Smrg echo pdp10-unknown-its 13046c321187Smrg exit ;; 13056c321187Smrg SEI:*:*:SEIUX) 13066c321187Smrg echo mips-sei-seiux${UNAME_RELEASE} 13076c321187Smrg exit ;; 13086c321187Smrg *:DragonFly:*:*) 13096c321187Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 13106c321187Smrg exit ;; 13116c321187Smrg *:*VMS:*:*) 13126c321187Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 13136c321187Smrg case "${UNAME_MACHINE}" in 13146c321187Smrg A*) echo alpha-dec-vms ; exit ;; 13156c321187Smrg I*) echo ia64-dec-vms ; exit ;; 13166c321187Smrg V*) echo vax-dec-vms ; exit ;; 13176c321187Smrg esac ;; 13186c321187Smrg *:XENIX:*:SysV) 13196c321187Smrg echo i386-pc-xenix 13206c321187Smrg exit ;; 13216c321187Smrg i*86:skyos:*:*) 13226c321187Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 13236c321187Smrg exit ;; 13246c321187Smrg i*86:rdos:*:*) 13256c321187Smrg echo ${UNAME_MACHINE}-pc-rdos 13266c321187Smrg exit ;; 13276c321187Smrgesac 13286c321187Smrg 13296c321187Smrg#echo '(No uname command or uname output not recognized.)' 1>&2 13306c321187Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 13316c321187Smrg 13326c321187Smrgeval $set_cc_for_build 13336c321187Smrgcat >$dummy.c <<EOF 13346c321187Smrg#ifdef _SEQUENT_ 13356c321187Smrg# include <sys/types.h> 13366c321187Smrg# include <sys/utsname.h> 13376c321187Smrg#endif 13386c321187Smrgmain () 13396c321187Smrg{ 13406c321187Smrg#if defined (sony) 13416c321187Smrg#if defined (MIPSEB) 13426c321187Smrg /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 13436c321187Smrg I don't know.... */ 13446c321187Smrg printf ("mips-sony-bsd\n"); exit (0); 13456c321187Smrg#else 13466c321187Smrg#include <sys/param.h> 13476c321187Smrg printf ("m68k-sony-newsos%s\n", 13486c321187Smrg#ifdef NEWSOS4 13496c321187Smrg "4" 13506c321187Smrg#else 13516c321187Smrg "" 13526c321187Smrg#endif 13536c321187Smrg ); exit (0); 13546c321187Smrg#endif 13556c321187Smrg#endif 13566c321187Smrg 13576c321187Smrg#if defined (__arm) && defined (__acorn) && defined (__unix) 13586c321187Smrg printf ("arm-acorn-riscix\n"); exit (0); 13596c321187Smrg#endif 13606c321187Smrg 13616c321187Smrg#if defined (hp300) && !defined (hpux) 13626c321187Smrg printf ("m68k-hp-bsd\n"); exit (0); 13636c321187Smrg#endif 13646c321187Smrg 13656c321187Smrg#if defined (NeXT) 13666c321187Smrg#if !defined (__ARCHITECTURE__) 13676c321187Smrg#define __ARCHITECTURE__ "m68k" 13686c321187Smrg#endif 13696c321187Smrg int version; 13706c321187Smrg version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 13716c321187Smrg if (version < 4) 13726c321187Smrg printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 13736c321187Smrg else 13746c321187Smrg printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 13756c321187Smrg exit (0); 13766c321187Smrg#endif 13776c321187Smrg 13786c321187Smrg#if defined (MULTIMAX) || defined (n16) 13796c321187Smrg#if defined (UMAXV) 13806c321187Smrg printf ("ns32k-encore-sysv\n"); exit (0); 13816c321187Smrg#else 13826c321187Smrg#if defined (CMU) 13836c321187Smrg printf ("ns32k-encore-mach\n"); exit (0); 13846c321187Smrg#else 13856c321187Smrg printf ("ns32k-encore-bsd\n"); exit (0); 13866c321187Smrg#endif 13876c321187Smrg#endif 13886c321187Smrg#endif 13896c321187Smrg 13906c321187Smrg#if defined (__386BSD__) 13916c321187Smrg printf ("i386-pc-bsd\n"); exit (0); 13926c321187Smrg#endif 13936c321187Smrg 13946c321187Smrg#if defined (sequent) 13956c321187Smrg#if defined (i386) 13966c321187Smrg printf ("i386-sequent-dynix\n"); exit (0); 13976c321187Smrg#endif 13986c321187Smrg#if defined (ns32000) 13996c321187Smrg printf ("ns32k-sequent-dynix\n"); exit (0); 14006c321187Smrg#endif 14016c321187Smrg#endif 14026c321187Smrg 14036c321187Smrg#if defined (_SEQUENT_) 14046c321187Smrg struct utsname un; 14056c321187Smrg 14066c321187Smrg uname(&un); 14076c321187Smrg 14086c321187Smrg if (strncmp(un.version, "V2", 2) == 0) { 14096c321187Smrg printf ("i386-sequent-ptx2\n"); exit (0); 14106c321187Smrg } 14116c321187Smrg if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 14126c321187Smrg printf ("i386-sequent-ptx1\n"); exit (0); 14136c321187Smrg } 14146c321187Smrg printf ("i386-sequent-ptx\n"); exit (0); 14156c321187Smrg 14166c321187Smrg#endif 14176c321187Smrg 14186c321187Smrg#if defined (vax) 14196c321187Smrg# if !defined (ultrix) 14206c321187Smrg# include <sys/param.h> 14216c321187Smrg# if defined (BSD) 14226c321187Smrg# if BSD == 43 14236c321187Smrg printf ("vax-dec-bsd4.3\n"); exit (0); 14246c321187Smrg# else 14256c321187Smrg# if BSD == 199006 14266c321187Smrg printf ("vax-dec-bsd4.3reno\n"); exit (0); 14276c321187Smrg# else 14286c321187Smrg printf ("vax-dec-bsd\n"); exit (0); 14296c321187Smrg# endif 14306c321187Smrg# endif 14316c321187Smrg# else 14326c321187Smrg printf ("vax-dec-bsd\n"); exit (0); 14336c321187Smrg# endif 14346c321187Smrg# else 14356c321187Smrg printf ("vax-dec-ultrix\n"); exit (0); 14366c321187Smrg# endif 14376c321187Smrg#endif 14386c321187Smrg 14396c321187Smrg#if defined (alliant) && defined (i860) 14406c321187Smrg printf ("i860-alliant-bsd\n"); exit (0); 14416c321187Smrg#endif 14426c321187Smrg 14436c321187Smrg exit (1); 14446c321187Smrg} 14456c321187SmrgEOF 14466c321187Smrg 14476c321187Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 14486c321187Smrg { echo "$SYSTEM_NAME"; exit; } 14496c321187Smrg 14506c321187Smrg# Apollos put the system type in the environment. 14516c321187Smrg 14526c321187Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 14536c321187Smrg 14546c321187Smrg# Convex versions that predate uname can use getsysinfo(1) 14556c321187Smrg 14566c321187Smrgif [ -x /usr/convex/getsysinfo ] 14576c321187Smrgthen 14586c321187Smrg case `getsysinfo -f cpu_type` in 14596c321187Smrg c1*) 14606c321187Smrg echo c1-convex-bsd 14616c321187Smrg exit ;; 14626c321187Smrg c2*) 14636c321187Smrg if getsysinfo -f scalar_acc 14646c321187Smrg then echo c32-convex-bsd 14656c321187Smrg else echo c2-convex-bsd 14666c321187Smrg fi 14676c321187Smrg exit ;; 14686c321187Smrg c34*) 14696c321187Smrg echo c34-convex-bsd 14706c321187Smrg exit ;; 14716c321187Smrg c38*) 14726c321187Smrg echo c38-convex-bsd 14736c321187Smrg exit ;; 14746c321187Smrg c4*) 14756c321187Smrg echo c4-convex-bsd 14766c321187Smrg exit ;; 14776c321187Smrg esac 14786c321187Smrgfi 14796c321187Smrg 14806c321187Smrgcat >&2 <<EOF 14816c321187Smrg$0: unable to guess system type 14826c321187Smrg 14836c321187SmrgThis script, last modified $timestamp, has failed to recognize 14846c321187Smrgthe operating system you are using. It is advised that you 14856c321187Smrgdownload the most up to date version of the config scripts from 14866c321187Smrg 148793493779Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 14886c321187Smrgand 148993493779Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 14906c321187Smrg 14916c321187SmrgIf the version you run ($0) is already up to date, please 14926c321187Smrgsend the following data and any information you think might be 14936c321187Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 14946c321187Smrginformation to handle your system. 14956c321187Smrg 14966c321187Smrgconfig.guess timestamp = $timestamp 14976c321187Smrg 14986c321187Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 14996c321187Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 15006c321187Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 15016c321187Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 15026c321187Smrg 15036c321187Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 15046c321187Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 15056c321187Smrg 15066c321187Smrghostinfo = `(hostinfo) 2>/dev/null` 15076c321187Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 15086c321187Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 15096c321187Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 15106c321187Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 15116c321187Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 15126c321187Smrg 15136c321187SmrgUNAME_MACHINE = ${UNAME_MACHINE} 15146c321187SmrgUNAME_RELEASE = ${UNAME_RELEASE} 15156c321187SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 15166c321187SmrgUNAME_VERSION = ${UNAME_VERSION} 15176c321187SmrgEOF 15186c321187Smrg 15196c321187Smrgexit 1 15206c321187Smrg 15216c321187Smrg# Local variables: 15226c321187Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 15236c321187Smrg# time-stamp-start: "timestamp='" 15246c321187Smrg# time-stamp-format: "%:y-%02m-%02d" 15256c321187Smrg# time-stamp-end: "'" 15266c321187Smrg# End: 1527