config.guess revision 8c9fbc29
18c9fbc29Smrg#! /bin/sh 28c9fbc29Smrg# Attempt to guess a canonical system name. 38c9fbc29Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 48c9fbc29Smrg# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 58c9fbc29Smrg 68c9fbc29Smrgtimestamp='2005-12-13' 78c9fbc29Smrg 88c9fbc29Smrg# This file is free software; you can redistribute it and/or modify it 98c9fbc29Smrg# under the terms of the GNU General Public License as published by 108c9fbc29Smrg# the Free Software Foundation; either version 2 of the License, or 118c9fbc29Smrg# (at your option) any later version. 128c9fbc29Smrg# 138c9fbc29Smrg# This program is distributed in the hope that it will be useful, but 148c9fbc29Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 158c9fbc29Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 168c9fbc29Smrg# General Public License for more details. 178c9fbc29Smrg# 188c9fbc29Smrg# You should have received a copy of the GNU General Public License 198c9fbc29Smrg# along with this program; if not, write to the Free Software 208c9fbc29Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 218c9fbc29Smrg# 02110-1301, USA. 228c9fbc29Smrg# 238c9fbc29Smrg# As a special exception to the GNU General Public License, if you 248c9fbc29Smrg# distribute this file as part of a program that contains a 258c9fbc29Smrg# configuration script generated by Autoconf, you may include it under 268c9fbc29Smrg# the same distribution terms that you use for the rest of that program. 278c9fbc29Smrg 288c9fbc29Smrg 298c9fbc29Smrg# Originally written by Per Bothner <per@bothner.com>. 308c9fbc29Smrg# Please send patches to <config-patches@gnu.org>. Submit a context 318c9fbc29Smrg# diff and a properly formatted ChangeLog entry. 328c9fbc29Smrg# 338c9fbc29Smrg# This script attempts to guess a canonical system name similar to 348c9fbc29Smrg# config.sub. If it succeeds, it prints the system name on stdout, and 358c9fbc29Smrg# exits with 0. Otherwise, it exits with 1. 368c9fbc29Smrg# 378c9fbc29Smrg# The plan is that this can be called by configure scripts if you 388c9fbc29Smrg# don't specify an explicit build system type. 398c9fbc29Smrg 408c9fbc29Smrgme=`echo "$0" | sed -e 's,.*/,,'` 418c9fbc29Smrg 428c9fbc29Smrgusage="\ 438c9fbc29SmrgUsage: $0 [OPTION] 448c9fbc29Smrg 458c9fbc29SmrgOutput the configuration name of the system \`$me' is run on. 468c9fbc29Smrg 478c9fbc29SmrgOperation modes: 488c9fbc29Smrg -h, --help print this help, then exit 498c9fbc29Smrg -t, --time-stamp print date of last modification, then exit 508c9fbc29Smrg -v, --version print version number, then exit 518c9fbc29Smrg 528c9fbc29SmrgReport bugs and patches to <config-patches@gnu.org>." 538c9fbc29Smrg 548c9fbc29Smrgversion="\ 558c9fbc29SmrgGNU config.guess ($timestamp) 568c9fbc29Smrg 578c9fbc29SmrgOriginally written by Per Bothner. 588c9fbc29SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 598c9fbc29SmrgFree Software Foundation, Inc. 608c9fbc29Smrg 618c9fbc29SmrgThis is free software; see the source for copying conditions. There is NO 628c9fbc29Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 638c9fbc29Smrg 648c9fbc29Smrghelp=" 658c9fbc29SmrgTry \`$me --help' for more information." 668c9fbc29Smrg 678c9fbc29Smrg# Parse command line 688c9fbc29Smrgwhile test $# -gt 0 ; do 698c9fbc29Smrg case $1 in 708c9fbc29Smrg --time-stamp | --time* | -t ) 718c9fbc29Smrg echo "$timestamp" ; exit ;; 728c9fbc29Smrg --version | -v ) 738c9fbc29Smrg echo "$version" ; exit ;; 748c9fbc29Smrg --help | --h* | -h ) 758c9fbc29Smrg echo "$usage"; exit ;; 768c9fbc29Smrg -- ) # Stop option processing 778c9fbc29Smrg shift; break ;; 788c9fbc29Smrg - ) # Use stdin as input. 798c9fbc29Smrg break ;; 808c9fbc29Smrg -* ) 818c9fbc29Smrg echo "$me: invalid option $1$help" >&2 828c9fbc29Smrg exit 1 ;; 838c9fbc29Smrg * ) 848c9fbc29Smrg break ;; 858c9fbc29Smrg esac 868c9fbc29Smrgdone 878c9fbc29Smrg 888c9fbc29Smrgif test $# != 0; then 898c9fbc29Smrg echo "$me: too many arguments$help" >&2 908c9fbc29Smrg exit 1 918c9fbc29Smrgfi 928c9fbc29Smrg 938c9fbc29Smrgtrap 'exit 1' 1 2 15 948c9fbc29Smrg 958c9fbc29Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 968c9fbc29Smrg# compiler to aid in system detection is discouraged as it requires 978c9fbc29Smrg# temporary files to be created and, as you can see below, it is a 988c9fbc29Smrg# headache to deal with in a portable fashion. 998c9fbc29Smrg 1008c9fbc29Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 1018c9fbc29Smrg# use `HOST_CC' if defined, but it is deprecated. 1028c9fbc29Smrg 1038c9fbc29Smrg# Portable tmp directory creation inspired by the Autoconf team. 1048c9fbc29Smrg 1058c9fbc29Smrgset_cc_for_build=' 1068c9fbc29Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 1078c9fbc29Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 1088c9fbc29Smrg: ${TMPDIR=/tmp} ; 1098c9fbc29Smrg { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 1108c9fbc29Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 1118c9fbc29Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 1128c9fbc29Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 1138c9fbc29Smrgdummy=$tmp/dummy ; 1148c9fbc29Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 1158c9fbc29Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 1168c9fbc29Smrg ,,) echo "int x;" > $dummy.c ; 1178c9fbc29Smrg for c in cc gcc c89 c99 ; do 1188c9fbc29Smrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 1198c9fbc29Smrg CC_FOR_BUILD="$c"; break ; 1208c9fbc29Smrg fi ; 1218c9fbc29Smrg done ; 1228c9fbc29Smrg if test x"$CC_FOR_BUILD" = x ; then 1238c9fbc29Smrg CC_FOR_BUILD=no_compiler_found ; 1248c9fbc29Smrg fi 1258c9fbc29Smrg ;; 1268c9fbc29Smrg ,,*) CC_FOR_BUILD=$CC ;; 1278c9fbc29Smrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 1288c9fbc29Smrgesac ; set_cc_for_build= ;' 1298c9fbc29Smrg 1308c9fbc29Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 1318c9fbc29Smrg# (ghazi@noc.rutgers.edu 1994-08-24) 1328c9fbc29Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 1338c9fbc29Smrg PATH=$PATH:/.attbin ; export PATH 1348c9fbc29Smrgfi 1358c9fbc29Smrg 1368c9fbc29SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 1378c9fbc29SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 1388c9fbc29SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 1398c9fbc29SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 1408c9fbc29Smrg 1418c9fbc29Smrg# Note: order is significant - the case branches are not exclusive. 1428c9fbc29Smrg 1438c9fbc29Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 1448c9fbc29Smrg *:NetBSD:*:*) 1458c9fbc29Smrg # NetBSD (nbsd) targets should (where applicable) match one or 1468c9fbc29Smrg # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 1478c9fbc29Smrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 1488c9fbc29Smrg # switched to ELF, *-*-netbsd* would select the old 1498c9fbc29Smrg # object file format. This provides both forward 1508c9fbc29Smrg # compatibility and a consistent mechanism for selecting the 1518c9fbc29Smrg # object file format. 1528c9fbc29Smrg # 1538c9fbc29Smrg # Note: NetBSD doesn't particularly care about the vendor 1548c9fbc29Smrg # portion of the name. We always set it to "unknown". 1558c9fbc29Smrg sysctl="sysctl -n hw.machine_arch" 1568c9fbc29Smrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 1578c9fbc29Smrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 1588c9fbc29Smrg case "${UNAME_MACHINE_ARCH}" in 1598c9fbc29Smrg armeb) machine=armeb-unknown ;; 1608c9fbc29Smrg arm*) machine=arm-unknown ;; 1618c9fbc29Smrg sh3el) machine=shl-unknown ;; 1628c9fbc29Smrg sh3eb) machine=sh-unknown ;; 1638c9fbc29Smrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 1648c9fbc29Smrg esac 1658c9fbc29Smrg # The Operating System including object format, if it has switched 1668c9fbc29Smrg # to ELF recently, or will in the future. 1678c9fbc29Smrg case "${UNAME_MACHINE_ARCH}" in 1688c9fbc29Smrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 1698c9fbc29Smrg eval $set_cc_for_build 1708c9fbc29Smrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 1718c9fbc29Smrg | grep __ELF__ >/dev/null 1728c9fbc29Smrg then 1738c9fbc29Smrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 1748c9fbc29Smrg # Return netbsd for either. FIX? 1758c9fbc29Smrg os=netbsd 1768c9fbc29Smrg else 1778c9fbc29Smrg os=netbsdelf 1788c9fbc29Smrg fi 1798c9fbc29Smrg ;; 1808c9fbc29Smrg *) 1818c9fbc29Smrg os=netbsd 1828c9fbc29Smrg ;; 1838c9fbc29Smrg esac 1848c9fbc29Smrg # The OS release 1858c9fbc29Smrg # Debian GNU/NetBSD machines have a different userland, and 1868c9fbc29Smrg # thus, need a distinct triplet. However, they do not need 1878c9fbc29Smrg # kernel version information, so it can be replaced with a 1888c9fbc29Smrg # suitable tag, in the style of linux-gnu. 1898c9fbc29Smrg case "${UNAME_VERSION}" in 1908c9fbc29Smrg Debian*) 1918c9fbc29Smrg release='-gnu' 1928c9fbc29Smrg ;; 1938c9fbc29Smrg *) 1948c9fbc29Smrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 1958c9fbc29Smrg ;; 1968c9fbc29Smrg esac 1978c9fbc29Smrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 1988c9fbc29Smrg # contains redundant information, the shorter form: 1998c9fbc29Smrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 2008c9fbc29Smrg echo "${machine}-${os}${release}" 2018c9fbc29Smrg exit ;; 2028c9fbc29Smrg *:OpenBSD:*:*) 2038c9fbc29Smrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 2048c9fbc29Smrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 2058c9fbc29Smrg exit ;; 2068c9fbc29Smrg *:ekkoBSD:*:*) 2078c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 2088c9fbc29Smrg exit ;; 2098c9fbc29Smrg macppc:MirBSD:*:*) 2108c9fbc29Smrg echo powerppc-unknown-mirbsd${UNAME_RELEASE} 2118c9fbc29Smrg exit ;; 2128c9fbc29Smrg *:MirBSD:*:*) 2138c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 2148c9fbc29Smrg exit ;; 2158c9fbc29Smrg alpha:OSF1:*:*) 2168c9fbc29Smrg case $UNAME_RELEASE in 2178c9fbc29Smrg *4.0) 2188c9fbc29Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 2198c9fbc29Smrg ;; 2208c9fbc29Smrg *5.*) 2218c9fbc29Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 2228c9fbc29Smrg ;; 2238c9fbc29Smrg esac 2248c9fbc29Smrg # According to Compaq, /usr/sbin/psrinfo has been available on 2258c9fbc29Smrg # OSF/1 and Tru64 systems produced since 1995. I hope that 2268c9fbc29Smrg # covers most systems running today. This code pipes the CPU 2278c9fbc29Smrg # types through head -n 1, so we only detect the type of CPU 0. 2288c9fbc29Smrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 2298c9fbc29Smrg case "$ALPHA_CPU_TYPE" in 2308c9fbc29Smrg "EV4 (21064)") 2318c9fbc29Smrg UNAME_MACHINE="alpha" ;; 2328c9fbc29Smrg "EV4.5 (21064)") 2338c9fbc29Smrg UNAME_MACHINE="alpha" ;; 2348c9fbc29Smrg "LCA4 (21066/21068)") 2358c9fbc29Smrg UNAME_MACHINE="alpha" ;; 2368c9fbc29Smrg "EV5 (21164)") 2378c9fbc29Smrg UNAME_MACHINE="alphaev5" ;; 2388c9fbc29Smrg "EV5.6 (21164A)") 2398c9fbc29Smrg UNAME_MACHINE="alphaev56" ;; 2408c9fbc29Smrg "EV5.6 (21164PC)") 2418c9fbc29Smrg UNAME_MACHINE="alphapca56" ;; 2428c9fbc29Smrg "EV5.7 (21164PC)") 2438c9fbc29Smrg UNAME_MACHINE="alphapca57" ;; 2448c9fbc29Smrg "EV6 (21264)") 2458c9fbc29Smrg UNAME_MACHINE="alphaev6" ;; 2468c9fbc29Smrg "EV6.7 (21264A)") 2478c9fbc29Smrg UNAME_MACHINE="alphaev67" ;; 2488c9fbc29Smrg "EV6.8CB (21264C)") 2498c9fbc29Smrg UNAME_MACHINE="alphaev68" ;; 2508c9fbc29Smrg "EV6.8AL (21264B)") 2518c9fbc29Smrg UNAME_MACHINE="alphaev68" ;; 2528c9fbc29Smrg "EV6.8CX (21264D)") 2538c9fbc29Smrg UNAME_MACHINE="alphaev68" ;; 2548c9fbc29Smrg "EV6.9A (21264/EV69A)") 2558c9fbc29Smrg UNAME_MACHINE="alphaev69" ;; 2568c9fbc29Smrg "EV7 (21364)") 2578c9fbc29Smrg UNAME_MACHINE="alphaev7" ;; 2588c9fbc29Smrg "EV7.9 (21364A)") 2598c9fbc29Smrg UNAME_MACHINE="alphaev79" ;; 2608c9fbc29Smrg esac 2618c9fbc29Smrg # A Pn.n version is a patched version. 2628c9fbc29Smrg # A Vn.n version is a released version. 2638c9fbc29Smrg # A Tn.n version is a released field test version. 2648c9fbc29Smrg # A Xn.n version is an unreleased experimental baselevel. 2658c9fbc29Smrg # 1.2 uses "1.2" for uname -r. 2668c9fbc29Smrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2678c9fbc29Smrg exit ;; 2688c9fbc29Smrg Alpha\ *:Windows_NT*:*) 2698c9fbc29Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 2708c9fbc29Smrg # Should we change UNAME_MACHINE based on the output of uname instead 2718c9fbc29Smrg # of the specific Alpha model? 2728c9fbc29Smrg echo alpha-pc-interix 2738c9fbc29Smrg exit ;; 2748c9fbc29Smrg 21064:Windows_NT:50:3) 2758c9fbc29Smrg echo alpha-dec-winnt3.5 2768c9fbc29Smrg exit ;; 2778c9fbc29Smrg Amiga*:UNIX_System_V:4.0:*) 2788c9fbc29Smrg echo m68k-unknown-sysv4 2798c9fbc29Smrg exit ;; 2808c9fbc29Smrg *:[Aa]miga[Oo][Ss]:*:*) 2818c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-amigaos 2828c9fbc29Smrg exit ;; 2838c9fbc29Smrg *:[Mm]orph[Oo][Ss]:*:*) 2848c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-morphos 2858c9fbc29Smrg exit ;; 2868c9fbc29Smrg *:OS/390:*:*) 2878c9fbc29Smrg echo i370-ibm-openedition 2888c9fbc29Smrg exit ;; 2898c9fbc29Smrg *:z/VM:*:*) 2908c9fbc29Smrg echo s390-ibm-zvmoe 2918c9fbc29Smrg exit ;; 2928c9fbc29Smrg *:OS400:*:*) 2938c9fbc29Smrg echo powerpc-ibm-os400 2948c9fbc29Smrg exit ;; 2958c9fbc29Smrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 2968c9fbc29Smrg echo arm-acorn-riscix${UNAME_RELEASE} 2978c9fbc29Smrg exit ;; 2988c9fbc29Smrg arm:riscos:*:*|arm:RISCOS:*:*) 2998c9fbc29Smrg echo arm-unknown-riscos 3008c9fbc29Smrg exit ;; 3018c9fbc29Smrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 3028c9fbc29Smrg echo hppa1.1-hitachi-hiuxmpp 3038c9fbc29Smrg exit ;; 3048c9fbc29Smrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 3058c9fbc29Smrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 3068c9fbc29Smrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 3078c9fbc29Smrg echo pyramid-pyramid-sysv3 3088c9fbc29Smrg else 3098c9fbc29Smrg echo pyramid-pyramid-bsd 3108c9fbc29Smrg fi 3118c9fbc29Smrg exit ;; 3128c9fbc29Smrg NILE*:*:*:dcosx) 3138c9fbc29Smrg echo pyramid-pyramid-svr4 3148c9fbc29Smrg exit ;; 3158c9fbc29Smrg DRS?6000:unix:4.0:6*) 3168c9fbc29Smrg echo sparc-icl-nx6 3178c9fbc29Smrg exit ;; 3188c9fbc29Smrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 3198c9fbc29Smrg case `/usr/bin/uname -p` in 3208c9fbc29Smrg sparc) echo sparc-icl-nx7; exit ;; 3218c9fbc29Smrg esac ;; 3228c9fbc29Smrg sun4H:SunOS:5.*:*) 3238c9fbc29Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3248c9fbc29Smrg exit ;; 3258c9fbc29Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 3268c9fbc29Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3278c9fbc29Smrg exit ;; 3288c9fbc29Smrg i86pc:SunOS:5.*:*) 3298c9fbc29Smrg echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3308c9fbc29Smrg exit ;; 3318c9fbc29Smrg sun4*:SunOS:6*:*) 3328c9fbc29Smrg # According to config.sub, this is the proper way to canonicalize 3338c9fbc29Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 3348c9fbc29Smrg # it's likely to be more like Solaris than SunOS4. 3358c9fbc29Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3368c9fbc29Smrg exit ;; 3378c9fbc29Smrg sun4*:SunOS:*:*) 3388c9fbc29Smrg case "`/usr/bin/arch -k`" in 3398c9fbc29Smrg Series*|S4*) 3408c9fbc29Smrg UNAME_RELEASE=`uname -v` 3418c9fbc29Smrg ;; 3428c9fbc29Smrg esac 3438c9fbc29Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 3448c9fbc29Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 3458c9fbc29Smrg exit ;; 3468c9fbc29Smrg sun3*:SunOS:*:*) 3478c9fbc29Smrg echo m68k-sun-sunos${UNAME_RELEASE} 3488c9fbc29Smrg exit ;; 3498c9fbc29Smrg sun*:*:4.2BSD:*) 3508c9fbc29Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 3518c9fbc29Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 3528c9fbc29Smrg case "`/bin/arch`" in 3538c9fbc29Smrg sun3) 3548c9fbc29Smrg echo m68k-sun-sunos${UNAME_RELEASE} 3558c9fbc29Smrg ;; 3568c9fbc29Smrg sun4) 3578c9fbc29Smrg echo sparc-sun-sunos${UNAME_RELEASE} 3588c9fbc29Smrg ;; 3598c9fbc29Smrg esac 3608c9fbc29Smrg exit ;; 3618c9fbc29Smrg aushp:SunOS:*:*) 3628c9fbc29Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 3638c9fbc29Smrg exit ;; 3648c9fbc29Smrg # The situation for MiNT is a little confusing. The machine name 3658c9fbc29Smrg # can be virtually everything (everything which is not 3668c9fbc29Smrg # "atarist" or "atariste" at least should have a processor 3678c9fbc29Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 3688c9fbc29Smrg # to the lowercase version "mint" (or "freemint"). Finally 3698c9fbc29Smrg # the system name "TOS" denotes a system which is actually not 3708c9fbc29Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 3718c9fbc29Smrg # be no problem. 3728c9fbc29Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 3738c9fbc29Smrg echo m68k-atari-mint${UNAME_RELEASE} 3748c9fbc29Smrg exit ;; 3758c9fbc29Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 3768c9fbc29Smrg echo m68k-atari-mint${UNAME_RELEASE} 3778c9fbc29Smrg exit ;; 3788c9fbc29Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 3798c9fbc29Smrg echo m68k-atari-mint${UNAME_RELEASE} 3808c9fbc29Smrg exit ;; 3818c9fbc29Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 3828c9fbc29Smrg echo m68k-milan-mint${UNAME_RELEASE} 3838c9fbc29Smrg exit ;; 3848c9fbc29Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 3858c9fbc29Smrg echo m68k-hades-mint${UNAME_RELEASE} 3868c9fbc29Smrg exit ;; 3878c9fbc29Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 3888c9fbc29Smrg echo m68k-unknown-mint${UNAME_RELEASE} 3898c9fbc29Smrg exit ;; 3908c9fbc29Smrg m68k:machten:*:*) 3918c9fbc29Smrg echo m68k-apple-machten${UNAME_RELEASE} 3928c9fbc29Smrg exit ;; 3938c9fbc29Smrg powerpc:machten:*:*) 3948c9fbc29Smrg echo powerpc-apple-machten${UNAME_RELEASE} 3958c9fbc29Smrg exit ;; 3968c9fbc29Smrg RISC*:Mach:*:*) 3978c9fbc29Smrg echo mips-dec-mach_bsd4.3 3988c9fbc29Smrg exit ;; 3998c9fbc29Smrg RISC*:ULTRIX:*:*) 4008c9fbc29Smrg echo mips-dec-ultrix${UNAME_RELEASE} 4018c9fbc29Smrg exit ;; 4028c9fbc29Smrg VAX*:ULTRIX*:*:*) 4038c9fbc29Smrg echo vax-dec-ultrix${UNAME_RELEASE} 4048c9fbc29Smrg exit ;; 4058c9fbc29Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 4068c9fbc29Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 4078c9fbc29Smrg exit ;; 4088c9fbc29Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 4098c9fbc29Smrg eval $set_cc_for_build 4108c9fbc29Smrg sed 's/^ //' << EOF >$dummy.c 4118c9fbc29Smrg#ifdef __cplusplus 4128c9fbc29Smrg#include <stdio.h> /* for printf() prototype */ 4138c9fbc29Smrg int main (int argc, char *argv[]) { 4148c9fbc29Smrg#else 4158c9fbc29Smrg int main (argc, argv) int argc; char *argv[]; { 4168c9fbc29Smrg#endif 4178c9fbc29Smrg #if defined (host_mips) && defined (MIPSEB) 4188c9fbc29Smrg #if defined (SYSTYPE_SYSV) 4198c9fbc29Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 4208c9fbc29Smrg #endif 4218c9fbc29Smrg #if defined (SYSTYPE_SVR4) 4228c9fbc29Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 4238c9fbc29Smrg #endif 4248c9fbc29Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 4258c9fbc29Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 4268c9fbc29Smrg #endif 4278c9fbc29Smrg #endif 4288c9fbc29Smrg exit (-1); 4298c9fbc29Smrg } 4308c9fbc29SmrgEOF 4318c9fbc29Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 4328c9fbc29Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 4338c9fbc29Smrg SYSTEM_NAME=`$dummy $dummyarg` && 4348c9fbc29Smrg { echo "$SYSTEM_NAME"; exit; } 4358c9fbc29Smrg echo mips-mips-riscos${UNAME_RELEASE} 4368c9fbc29Smrg exit ;; 4378c9fbc29Smrg Motorola:PowerMAX_OS:*:*) 4388c9fbc29Smrg echo powerpc-motorola-powermax 4398c9fbc29Smrg exit ;; 4408c9fbc29Smrg Motorola:*:4.3:PL8-*) 4418c9fbc29Smrg echo powerpc-harris-powermax 4428c9fbc29Smrg exit ;; 4438c9fbc29Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 4448c9fbc29Smrg echo powerpc-harris-powermax 4458c9fbc29Smrg exit ;; 4468c9fbc29Smrg Night_Hawk:Power_UNIX:*:*) 4478c9fbc29Smrg echo powerpc-harris-powerunix 4488c9fbc29Smrg exit ;; 4498c9fbc29Smrg m88k:CX/UX:7*:*) 4508c9fbc29Smrg echo m88k-harris-cxux7 4518c9fbc29Smrg exit ;; 4528c9fbc29Smrg m88k:*:4*:R4*) 4538c9fbc29Smrg echo m88k-motorola-sysv4 4548c9fbc29Smrg exit ;; 4558c9fbc29Smrg m88k:*:3*:R3*) 4568c9fbc29Smrg echo m88k-motorola-sysv3 4578c9fbc29Smrg exit ;; 4588c9fbc29Smrg AViiON:dgux:*:*) 4598c9fbc29Smrg # DG/UX returns AViiON for all architectures 4608c9fbc29Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 4618c9fbc29Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 4628c9fbc29Smrg then 4638c9fbc29Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 4648c9fbc29Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 4658c9fbc29Smrg then 4668c9fbc29Smrg echo m88k-dg-dgux${UNAME_RELEASE} 4678c9fbc29Smrg else 4688c9fbc29Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 4698c9fbc29Smrg fi 4708c9fbc29Smrg else 4718c9fbc29Smrg echo i586-dg-dgux${UNAME_RELEASE} 4728c9fbc29Smrg fi 4738c9fbc29Smrg exit ;; 4748c9fbc29Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 4758c9fbc29Smrg echo m88k-dolphin-sysv3 4768c9fbc29Smrg exit ;; 4778c9fbc29Smrg M88*:*:R3*:*) 4788c9fbc29Smrg # Delta 88k system running SVR3 4798c9fbc29Smrg echo m88k-motorola-sysv3 4808c9fbc29Smrg exit ;; 4818c9fbc29Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 4828c9fbc29Smrg echo m88k-tektronix-sysv3 4838c9fbc29Smrg exit ;; 4848c9fbc29Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 4858c9fbc29Smrg echo m68k-tektronix-bsd 4868c9fbc29Smrg exit ;; 4878c9fbc29Smrg *:IRIX*:*:*) 4888c9fbc29Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 4898c9fbc29Smrg exit ;; 4908c9fbc29Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 4918c9fbc29Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 4928c9fbc29Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 4938c9fbc29Smrg i*86:AIX:*:*) 4948c9fbc29Smrg echo i386-ibm-aix 4958c9fbc29Smrg exit ;; 4968c9fbc29Smrg ia64:AIX:*:*) 4978c9fbc29Smrg if [ -x /usr/bin/oslevel ] ; then 4988c9fbc29Smrg IBM_REV=`/usr/bin/oslevel` 4998c9fbc29Smrg else 5008c9fbc29Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 5018c9fbc29Smrg fi 5028c9fbc29Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 5038c9fbc29Smrg exit ;; 5048c9fbc29Smrg *:AIX:2:3) 5058c9fbc29Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 5068c9fbc29Smrg eval $set_cc_for_build 5078c9fbc29Smrg sed 's/^ //' << EOF >$dummy.c 5088c9fbc29Smrg #include <sys/systemcfg.h> 5098c9fbc29Smrg 5108c9fbc29Smrg main() 5118c9fbc29Smrg { 5128c9fbc29Smrg if (!__power_pc()) 5138c9fbc29Smrg exit(1); 5148c9fbc29Smrg puts("powerpc-ibm-aix3.2.5"); 5158c9fbc29Smrg exit(0); 5168c9fbc29Smrg } 5178c9fbc29SmrgEOF 5188c9fbc29Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 5198c9fbc29Smrg then 5208c9fbc29Smrg echo "$SYSTEM_NAME" 5218c9fbc29Smrg else 5228c9fbc29Smrg echo rs6000-ibm-aix3.2.5 5238c9fbc29Smrg fi 5248c9fbc29Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 5258c9fbc29Smrg echo rs6000-ibm-aix3.2.4 5268c9fbc29Smrg else 5278c9fbc29Smrg echo rs6000-ibm-aix3.2 5288c9fbc29Smrg fi 5298c9fbc29Smrg exit ;; 5308c9fbc29Smrg *:AIX:*:[45]) 5318c9fbc29Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 5328c9fbc29Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 5338c9fbc29Smrg IBM_ARCH=rs6000 5348c9fbc29Smrg else 5358c9fbc29Smrg IBM_ARCH=powerpc 5368c9fbc29Smrg fi 5378c9fbc29Smrg if [ -x /usr/bin/oslevel ] ; then 5388c9fbc29Smrg IBM_REV=`/usr/bin/oslevel` 5398c9fbc29Smrg else 5408c9fbc29Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 5418c9fbc29Smrg fi 5428c9fbc29Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 5438c9fbc29Smrg exit ;; 5448c9fbc29Smrg *:AIX:*:*) 5458c9fbc29Smrg echo rs6000-ibm-aix 5468c9fbc29Smrg exit ;; 5478c9fbc29Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 5488c9fbc29Smrg echo romp-ibm-bsd4.4 5498c9fbc29Smrg exit ;; 5508c9fbc29Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 5518c9fbc29Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 5528c9fbc29Smrg exit ;; # report: romp-ibm BSD 4.3 5538c9fbc29Smrg *:BOSX:*:*) 5548c9fbc29Smrg echo rs6000-bull-bosx 5558c9fbc29Smrg exit ;; 5568c9fbc29Smrg DPX/2?00:B.O.S.:*:*) 5578c9fbc29Smrg echo m68k-bull-sysv3 5588c9fbc29Smrg exit ;; 5598c9fbc29Smrg 9000/[34]??:4.3bsd:1.*:*) 5608c9fbc29Smrg echo m68k-hp-bsd 5618c9fbc29Smrg exit ;; 5628c9fbc29Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 5638c9fbc29Smrg echo m68k-hp-bsd4.4 5648c9fbc29Smrg exit ;; 5658c9fbc29Smrg 9000/[34678]??:HP-UX:*:*) 5668c9fbc29Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 5678c9fbc29Smrg case "${UNAME_MACHINE}" in 5688c9fbc29Smrg 9000/31? ) HP_ARCH=m68000 ;; 5698c9fbc29Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 5708c9fbc29Smrg 9000/[678][0-9][0-9]) 5718c9fbc29Smrg if [ -x /usr/bin/getconf ]; then 5728c9fbc29Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 5738c9fbc29Smrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 5748c9fbc29Smrg case "${sc_cpu_version}" in 5758c9fbc29Smrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 5768c9fbc29Smrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 5778c9fbc29Smrg 532) # CPU_PA_RISC2_0 5788c9fbc29Smrg case "${sc_kernel_bits}" in 5798c9fbc29Smrg 32) HP_ARCH="hppa2.0n" ;; 5808c9fbc29Smrg 64) HP_ARCH="hppa2.0w" ;; 5818c9fbc29Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 5828c9fbc29Smrg esac ;; 5838c9fbc29Smrg esac 5848c9fbc29Smrg fi 5858c9fbc29Smrg if [ "${HP_ARCH}" = "" ]; then 5868c9fbc29Smrg eval $set_cc_for_build 5878c9fbc29Smrg sed 's/^ //' << EOF >$dummy.c 5888c9fbc29Smrg 5898c9fbc29Smrg #define _HPUX_SOURCE 5908c9fbc29Smrg #include <stdlib.h> 5918c9fbc29Smrg #include <unistd.h> 5928c9fbc29Smrg 5938c9fbc29Smrg int main () 5948c9fbc29Smrg { 5958c9fbc29Smrg #if defined(_SC_KERNEL_BITS) 5968c9fbc29Smrg long bits = sysconf(_SC_KERNEL_BITS); 5978c9fbc29Smrg #endif 5988c9fbc29Smrg long cpu = sysconf (_SC_CPU_VERSION); 5998c9fbc29Smrg 6008c9fbc29Smrg switch (cpu) 6018c9fbc29Smrg { 6028c9fbc29Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 6038c9fbc29Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 6048c9fbc29Smrg case CPU_PA_RISC2_0: 6058c9fbc29Smrg #if defined(_SC_KERNEL_BITS) 6068c9fbc29Smrg switch (bits) 6078c9fbc29Smrg { 6088c9fbc29Smrg case 64: puts ("hppa2.0w"); break; 6098c9fbc29Smrg case 32: puts ("hppa2.0n"); break; 6108c9fbc29Smrg default: puts ("hppa2.0"); break; 6118c9fbc29Smrg } break; 6128c9fbc29Smrg #else /* !defined(_SC_KERNEL_BITS) */ 6138c9fbc29Smrg puts ("hppa2.0"); break; 6148c9fbc29Smrg #endif 6158c9fbc29Smrg default: puts ("hppa1.0"); break; 6168c9fbc29Smrg } 6178c9fbc29Smrg exit (0); 6188c9fbc29Smrg } 6198c9fbc29SmrgEOF 6208c9fbc29Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 6218c9fbc29Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 6228c9fbc29Smrg fi ;; 6238c9fbc29Smrg esac 6248c9fbc29Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 6258c9fbc29Smrg then 6268c9fbc29Smrg eval $set_cc_for_build 6278c9fbc29Smrg 6288c9fbc29Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 6298c9fbc29Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 6308c9fbc29Smrg # generating 64-bit code. GNU and HP use different nomenclature: 6318c9fbc29Smrg # 6328c9fbc29Smrg # $ CC_FOR_BUILD=cc ./config.guess 6338c9fbc29Smrg # => hppa2.0w-hp-hpux11.23 6348c9fbc29Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 6358c9fbc29Smrg # => hppa64-hp-hpux11.23 6368c9fbc29Smrg 6378c9fbc29Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 6388c9fbc29Smrg grep __LP64__ >/dev/null 6398c9fbc29Smrg then 6408c9fbc29Smrg HP_ARCH="hppa2.0w" 6418c9fbc29Smrg else 6428c9fbc29Smrg HP_ARCH="hppa64" 6438c9fbc29Smrg fi 6448c9fbc29Smrg fi 6458c9fbc29Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 6468c9fbc29Smrg exit ;; 6478c9fbc29Smrg ia64:HP-UX:*:*) 6488c9fbc29Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 6498c9fbc29Smrg echo ia64-hp-hpux${HPUX_REV} 6508c9fbc29Smrg exit ;; 6518c9fbc29Smrg 3050*:HI-UX:*:*) 6528c9fbc29Smrg eval $set_cc_for_build 6538c9fbc29Smrg sed 's/^ //' << EOF >$dummy.c 6548c9fbc29Smrg #include <unistd.h> 6558c9fbc29Smrg int 6568c9fbc29Smrg main () 6578c9fbc29Smrg { 6588c9fbc29Smrg long cpu = sysconf (_SC_CPU_VERSION); 6598c9fbc29Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 6608c9fbc29Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 6618c9fbc29Smrg results, however. */ 6628c9fbc29Smrg if (CPU_IS_PA_RISC (cpu)) 6638c9fbc29Smrg { 6648c9fbc29Smrg switch (cpu) 6658c9fbc29Smrg { 6668c9fbc29Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 6678c9fbc29Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 6688c9fbc29Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 6698c9fbc29Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 6708c9fbc29Smrg } 6718c9fbc29Smrg } 6728c9fbc29Smrg else if (CPU_IS_HP_MC68K (cpu)) 6738c9fbc29Smrg puts ("m68k-hitachi-hiuxwe2"); 6748c9fbc29Smrg else puts ("unknown-hitachi-hiuxwe2"); 6758c9fbc29Smrg exit (0); 6768c9fbc29Smrg } 6778c9fbc29SmrgEOF 6788c9fbc29Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 6798c9fbc29Smrg { echo "$SYSTEM_NAME"; exit; } 6808c9fbc29Smrg echo unknown-hitachi-hiuxwe2 6818c9fbc29Smrg exit ;; 6828c9fbc29Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 6838c9fbc29Smrg echo hppa1.1-hp-bsd 6848c9fbc29Smrg exit ;; 6858c9fbc29Smrg 9000/8??:4.3bsd:*:*) 6868c9fbc29Smrg echo hppa1.0-hp-bsd 6878c9fbc29Smrg exit ;; 6888c9fbc29Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 6898c9fbc29Smrg echo hppa1.0-hp-mpeix 6908c9fbc29Smrg exit ;; 6918c9fbc29Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 6928c9fbc29Smrg echo hppa1.1-hp-osf 6938c9fbc29Smrg exit ;; 6948c9fbc29Smrg hp8??:OSF1:*:*) 6958c9fbc29Smrg echo hppa1.0-hp-osf 6968c9fbc29Smrg exit ;; 6978c9fbc29Smrg i*86:OSF1:*:*) 6988c9fbc29Smrg if [ -x /usr/sbin/sysversion ] ; then 6998c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 7008c9fbc29Smrg else 7018c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-osf1 7028c9fbc29Smrg fi 7038c9fbc29Smrg exit ;; 7048c9fbc29Smrg parisc*:Lites*:*:*) 7058c9fbc29Smrg echo hppa1.1-hp-lites 7068c9fbc29Smrg exit ;; 7078c9fbc29Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 7088c9fbc29Smrg echo c1-convex-bsd 7098c9fbc29Smrg exit ;; 7108c9fbc29Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 7118c9fbc29Smrg if getsysinfo -f scalar_acc 7128c9fbc29Smrg then echo c32-convex-bsd 7138c9fbc29Smrg else echo c2-convex-bsd 7148c9fbc29Smrg fi 7158c9fbc29Smrg exit ;; 7168c9fbc29Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 7178c9fbc29Smrg echo c34-convex-bsd 7188c9fbc29Smrg exit ;; 7198c9fbc29Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 7208c9fbc29Smrg echo c38-convex-bsd 7218c9fbc29Smrg exit ;; 7228c9fbc29Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 7238c9fbc29Smrg echo c4-convex-bsd 7248c9fbc29Smrg exit ;; 7258c9fbc29Smrg CRAY*Y-MP:*:*:*) 7268c9fbc29Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7278c9fbc29Smrg exit ;; 7288c9fbc29Smrg CRAY*[A-Z]90:*:*:*) 7298c9fbc29Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 7308c9fbc29Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 7318c9fbc29Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 7328c9fbc29Smrg -e 's/\.[^.]*$/.X/' 7338c9fbc29Smrg exit ;; 7348c9fbc29Smrg CRAY*TS:*:*:*) 7358c9fbc29Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7368c9fbc29Smrg exit ;; 7378c9fbc29Smrg CRAY*T3E:*:*:*) 7388c9fbc29Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7398c9fbc29Smrg exit ;; 7408c9fbc29Smrg CRAY*SV1:*:*:*) 7418c9fbc29Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7428c9fbc29Smrg exit ;; 7438c9fbc29Smrg *:UNICOS/mp:*:*) 7448c9fbc29Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7458c9fbc29Smrg exit ;; 7468c9fbc29Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 7478c9fbc29Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7488c9fbc29Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 7498c9fbc29Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 7508c9fbc29Smrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 7518c9fbc29Smrg exit ;; 7528c9fbc29Smrg 5000:UNIX_System_V:4.*:*) 7538c9fbc29Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 7548c9fbc29Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 7558c9fbc29Smrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 7568c9fbc29Smrg exit ;; 7578c9fbc29Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 7588c9fbc29Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 7598c9fbc29Smrg exit ;; 7608c9fbc29Smrg sparc*:BSD/OS:*:*) 7618c9fbc29Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 7628c9fbc29Smrg exit ;; 7638c9fbc29Smrg *:BSD/OS:*:*) 7648c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 7658c9fbc29Smrg exit ;; 7668c9fbc29Smrg *:FreeBSD:*:*) 7678c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 7688c9fbc29Smrg exit ;; 7698c9fbc29Smrg i*:CYGWIN*:*) 7708c9fbc29Smrg echo ${UNAME_MACHINE}-pc-cygwin 7718c9fbc29Smrg exit ;; 7728c9fbc29Smrg i*:MINGW*:*) 7738c9fbc29Smrg echo ${UNAME_MACHINE}-pc-mingw32 7748c9fbc29Smrg exit ;; 7758c9fbc29Smrg i*:windows32*:*) 7768c9fbc29Smrg # uname -m includes "-pc" on this system. 7778c9fbc29Smrg echo ${UNAME_MACHINE}-mingw32 7788c9fbc29Smrg exit ;; 7798c9fbc29Smrg i*:PW*:*) 7808c9fbc29Smrg echo ${UNAME_MACHINE}-pc-pw32 7818c9fbc29Smrg exit ;; 7828c9fbc29Smrg x86:Interix*:[345]*) 7838c9fbc29Smrg echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' 7848c9fbc29Smrg exit ;; 7858c9fbc29Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 7868c9fbc29Smrg echo i${UNAME_MACHINE}-pc-mks 7878c9fbc29Smrg exit ;; 7888c9fbc29Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 7898c9fbc29Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 7908c9fbc29Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 7918c9fbc29Smrg # UNAME_MACHINE based on the output of uname instead of i386? 7928c9fbc29Smrg echo i586-pc-interix 7938c9fbc29Smrg exit ;; 7948c9fbc29Smrg i*:UWIN*:*) 7958c9fbc29Smrg echo ${UNAME_MACHINE}-pc-uwin 7968c9fbc29Smrg exit ;; 7978c9fbc29Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 7988c9fbc29Smrg echo x86_64-unknown-cygwin 7998c9fbc29Smrg exit ;; 8008c9fbc29Smrg p*:CYGWIN*:*) 8018c9fbc29Smrg echo powerpcle-unknown-cygwin 8028c9fbc29Smrg exit ;; 8038c9fbc29Smrg prep*:SunOS:5.*:*) 8048c9fbc29Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 8058c9fbc29Smrg exit ;; 8068c9fbc29Smrg *:GNU:*:*) 8078c9fbc29Smrg # the GNU system 8088c9fbc29Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 8098c9fbc29Smrg exit ;; 8108c9fbc29Smrg *:GNU/*:*:*) 8118c9fbc29Smrg # other systems with GNU libc and userland 8128c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 8138c9fbc29Smrg exit ;; 8148c9fbc29Smrg i*86:Minix:*:*) 8158c9fbc29Smrg echo ${UNAME_MACHINE}-pc-minix 8168c9fbc29Smrg exit ;; 8178c9fbc29Smrg arm*:Linux:*:*) 8188c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8198c9fbc29Smrg exit ;; 8208c9fbc29Smrg cris:Linux:*:*) 8218c9fbc29Smrg echo cris-axis-linux-gnu 8228c9fbc29Smrg exit ;; 8238c9fbc29Smrg crisv32:Linux:*:*) 8248c9fbc29Smrg echo crisv32-axis-linux-gnu 8258c9fbc29Smrg exit ;; 8268c9fbc29Smrg frv:Linux:*:*) 8278c9fbc29Smrg echo frv-unknown-linux-gnu 8288c9fbc29Smrg exit ;; 8298c9fbc29Smrg ia64:Linux:*:*) 8308c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8318c9fbc29Smrg exit ;; 8328c9fbc29Smrg m32r*:Linux:*:*) 8338c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8348c9fbc29Smrg exit ;; 8358c9fbc29Smrg m68*:Linux:*:*) 8368c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8378c9fbc29Smrg exit ;; 8388c9fbc29Smrg mips:Linux:*:*) 8398c9fbc29Smrg eval $set_cc_for_build 8408c9fbc29Smrg sed 's/^ //' << EOF >$dummy.c 8418c9fbc29Smrg #undef CPU 8428c9fbc29Smrg #undef mips 8438c9fbc29Smrg #undef mipsel 8448c9fbc29Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 8458c9fbc29Smrg CPU=mipsel 8468c9fbc29Smrg #else 8478c9fbc29Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 8488c9fbc29Smrg CPU=mips 8498c9fbc29Smrg #else 8508c9fbc29Smrg CPU= 8518c9fbc29Smrg #endif 8528c9fbc29Smrg #endif 8538c9fbc29SmrgEOF 8548c9fbc29Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" 8558c9fbc29Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 8568c9fbc29Smrg ;; 8578c9fbc29Smrg mips64:Linux:*:*) 8588c9fbc29Smrg eval $set_cc_for_build 8598c9fbc29Smrg sed 's/^ //' << EOF >$dummy.c 8608c9fbc29Smrg #undef CPU 8618c9fbc29Smrg #undef mips64 8628c9fbc29Smrg #undef mips64el 8638c9fbc29Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 8648c9fbc29Smrg CPU=mips64el 8658c9fbc29Smrg #else 8668c9fbc29Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 8678c9fbc29Smrg CPU=mips64 8688c9fbc29Smrg #else 8698c9fbc29Smrg CPU= 8708c9fbc29Smrg #endif 8718c9fbc29Smrg #endif 8728c9fbc29SmrgEOF 8738c9fbc29Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`" 8748c9fbc29Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 8758c9fbc29Smrg ;; 8768c9fbc29Smrg or32:Linux:*:*) 8778c9fbc29Smrg echo or32-unknown-linux-gnu 8788c9fbc29Smrg exit ;; 8798c9fbc29Smrg ppc:Linux:*:*) 8808c9fbc29Smrg echo powerpc-unknown-linux-gnu 8818c9fbc29Smrg exit ;; 8828c9fbc29Smrg ppc64:Linux:*:*) 8838c9fbc29Smrg echo powerpc64-unknown-linux-gnu 8848c9fbc29Smrg exit ;; 8858c9fbc29Smrg alpha:Linux:*:*) 8868c9fbc29Smrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 8878c9fbc29Smrg EV5) UNAME_MACHINE=alphaev5 ;; 8888c9fbc29Smrg EV56) UNAME_MACHINE=alphaev56 ;; 8898c9fbc29Smrg PCA56) UNAME_MACHINE=alphapca56 ;; 8908c9fbc29Smrg PCA57) UNAME_MACHINE=alphapca56 ;; 8918c9fbc29Smrg EV6) UNAME_MACHINE=alphaev6 ;; 8928c9fbc29Smrg EV67) UNAME_MACHINE=alphaev67 ;; 8938c9fbc29Smrg EV68*) UNAME_MACHINE=alphaev68 ;; 8948c9fbc29Smrg esac 8958c9fbc29Smrg objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 8968c9fbc29Smrg if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 8978c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 8988c9fbc29Smrg exit ;; 8998c9fbc29Smrg parisc:Linux:*:* | hppa:Linux:*:*) 9008c9fbc29Smrg # Look for CPU level 9018c9fbc29Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 9028c9fbc29Smrg PA7*) echo hppa1.1-unknown-linux-gnu ;; 9038c9fbc29Smrg PA8*) echo hppa2.0-unknown-linux-gnu ;; 9048c9fbc29Smrg *) echo hppa-unknown-linux-gnu ;; 9058c9fbc29Smrg esac 9068c9fbc29Smrg exit ;; 9078c9fbc29Smrg parisc64:Linux:*:* | hppa64:Linux:*:*) 9088c9fbc29Smrg echo hppa64-unknown-linux-gnu 9098c9fbc29Smrg exit ;; 9108c9fbc29Smrg s390:Linux:*:* | s390x:Linux:*:*) 9118c9fbc29Smrg echo ${UNAME_MACHINE}-ibm-linux 9128c9fbc29Smrg exit ;; 9138c9fbc29Smrg sh64*:Linux:*:*) 9148c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9158c9fbc29Smrg exit ;; 9168c9fbc29Smrg sh*:Linux:*:*) 9178c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9188c9fbc29Smrg exit ;; 9198c9fbc29Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 9208c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9218c9fbc29Smrg exit ;; 9228c9fbc29Smrg vax:Linux:*:*) 9238c9fbc29Smrg echo ${UNAME_MACHINE}-dec-linux-gnu 9248c9fbc29Smrg exit ;; 9258c9fbc29Smrg x86_64:Linux:*:*) 9268c9fbc29Smrg echo x86_64-unknown-linux-gnu 9278c9fbc29Smrg exit ;; 9288c9fbc29Smrg i*86:Linux:*:*) 9298c9fbc29Smrg # The BFD linker knows what the default object file format is, so 9308c9fbc29Smrg # first see if it will tell us. cd to the root directory to prevent 9318c9fbc29Smrg # problems with other programs or directories called `ld' in the path. 9328c9fbc29Smrg # Set LC_ALL=C to ensure ld outputs messages in English. 9338c9fbc29Smrg ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ 9348c9fbc29Smrg | sed -ne '/supported targets:/!d 9358c9fbc29Smrg s/[ ][ ]*/ /g 9368c9fbc29Smrg s/.*supported targets: *// 9378c9fbc29Smrg s/ .*// 9388c9fbc29Smrg p'` 9398c9fbc29Smrg case "$ld_supported_targets" in 9408c9fbc29Smrg elf32-i386) 9418c9fbc29Smrg TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 9428c9fbc29Smrg ;; 9438c9fbc29Smrg a.out-i386-linux) 9448c9fbc29Smrg echo "${UNAME_MACHINE}-pc-linux-gnuaout" 9458c9fbc29Smrg exit ;; 9468c9fbc29Smrg coff-i386) 9478c9fbc29Smrg echo "${UNAME_MACHINE}-pc-linux-gnucoff" 9488c9fbc29Smrg exit ;; 9498c9fbc29Smrg "") 9508c9fbc29Smrg # Either a pre-BFD a.out linker (linux-gnuoldld) or 9518c9fbc29Smrg # one that does not give us useful --help. 9528c9fbc29Smrg echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 9538c9fbc29Smrg exit ;; 9548c9fbc29Smrg esac 9558c9fbc29Smrg # Determine whether the default compiler is a.out or elf 9568c9fbc29Smrg eval $set_cc_for_build 9578c9fbc29Smrg sed 's/^ //' << EOF >$dummy.c 9588c9fbc29Smrg #include <features.h> 9598c9fbc29Smrg #ifdef __ELF__ 9608c9fbc29Smrg # ifdef __GLIBC__ 9618c9fbc29Smrg # if __GLIBC__ >= 2 9628c9fbc29Smrg LIBC=gnu 9638c9fbc29Smrg # else 9648c9fbc29Smrg LIBC=gnulibc1 9658c9fbc29Smrg # endif 9668c9fbc29Smrg # else 9678c9fbc29Smrg LIBC=gnulibc1 9688c9fbc29Smrg # endif 9698c9fbc29Smrg #else 9708c9fbc29Smrg #if defined(__INTEL_COMPILER) || defined(__PGI) 9718c9fbc29Smrg LIBC=gnu 9728c9fbc29Smrg #else 9738c9fbc29Smrg LIBC=gnuaout 9748c9fbc29Smrg #endif 9758c9fbc29Smrg #endif 9768c9fbc29Smrg #ifdef __dietlibc__ 9778c9fbc29Smrg LIBC=dietlibc 9788c9fbc29Smrg #endif 9798c9fbc29SmrgEOF 9808c9fbc29Smrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`" 9818c9fbc29Smrg test x"${LIBC}" != x && { 9828c9fbc29Smrg echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 9838c9fbc29Smrg exit 9848c9fbc29Smrg } 9858c9fbc29Smrg test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } 9868c9fbc29Smrg ;; 9878c9fbc29Smrg i*86:DYNIX/ptx:4*:*) 9888c9fbc29Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 9898c9fbc29Smrg # earlier versions are messed up and put the nodename in both 9908c9fbc29Smrg # sysname and nodename. 9918c9fbc29Smrg echo i386-sequent-sysv4 9928c9fbc29Smrg exit ;; 9938c9fbc29Smrg i*86:UNIX_SV:4.2MP:2.*) 9948c9fbc29Smrg # Unixware is an offshoot of SVR4, but it has its own version 9958c9fbc29Smrg # number series starting with 2... 9968c9fbc29Smrg # I am not positive that other SVR4 systems won't match this, 9978c9fbc29Smrg # I just have to hope. -- rms. 9988c9fbc29Smrg # Use sysv4.2uw... so that sysv4* matches it. 9998c9fbc29Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 10008c9fbc29Smrg exit ;; 10018c9fbc29Smrg i*86:OS/2:*:*) 10028c9fbc29Smrg # If we were able to find `uname', then EMX Unix compatibility 10038c9fbc29Smrg # is probably installed. 10048c9fbc29Smrg echo ${UNAME_MACHINE}-pc-os2-emx 10058c9fbc29Smrg exit ;; 10068c9fbc29Smrg i*86:XTS-300:*:STOP) 10078c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-stop 10088c9fbc29Smrg exit ;; 10098c9fbc29Smrg i*86:atheos:*:*) 10108c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-atheos 10118c9fbc29Smrg exit ;; 10128c9fbc29Smrg i*86:syllable:*:*) 10138c9fbc29Smrg echo ${UNAME_MACHINE}-pc-syllable 10148c9fbc29Smrg exit ;; 10158c9fbc29Smrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 10168c9fbc29Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 10178c9fbc29Smrg exit ;; 10188c9fbc29Smrg i*86:*DOS:*:*) 10198c9fbc29Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 10208c9fbc29Smrg exit ;; 10218c9fbc29Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 10228c9fbc29Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 10238c9fbc29Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 10248c9fbc29Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 10258c9fbc29Smrg else 10268c9fbc29Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 10278c9fbc29Smrg fi 10288c9fbc29Smrg exit ;; 10298c9fbc29Smrg i*86:*:5:[678]*) 10308c9fbc29Smrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 10318c9fbc29Smrg case `/bin/uname -X | grep "^Machine"` in 10328c9fbc29Smrg *486*) UNAME_MACHINE=i486 ;; 10338c9fbc29Smrg *Pentium) UNAME_MACHINE=i586 ;; 10348c9fbc29Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 10358c9fbc29Smrg esac 10368c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 10378c9fbc29Smrg exit ;; 10388c9fbc29Smrg i*86:*:3.2:*) 10398c9fbc29Smrg if test -f /usr/options/cb.name; then 10408c9fbc29Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 10418c9fbc29Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 10428c9fbc29Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 10438c9fbc29Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 10448c9fbc29Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 10458c9fbc29Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 10468c9fbc29Smrg && UNAME_MACHINE=i586 10478c9fbc29Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 10488c9fbc29Smrg && UNAME_MACHINE=i686 10498c9fbc29Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 10508c9fbc29Smrg && UNAME_MACHINE=i686 10518c9fbc29Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 10528c9fbc29Smrg else 10538c9fbc29Smrg echo ${UNAME_MACHINE}-pc-sysv32 10548c9fbc29Smrg fi 10558c9fbc29Smrg exit ;; 10568c9fbc29Smrg pc:*:*:*) 10578c9fbc29Smrg # Left here for compatibility: 10588c9fbc29Smrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 10598c9fbc29Smrg # the processor, so we play safe by assuming i386. 10608c9fbc29Smrg echo i386-pc-msdosdjgpp 10618c9fbc29Smrg exit ;; 10628c9fbc29Smrg Intel:Mach:3*:*) 10638c9fbc29Smrg echo i386-pc-mach3 10648c9fbc29Smrg exit ;; 10658c9fbc29Smrg paragon:*:*:*) 10668c9fbc29Smrg echo i860-intel-osf1 10678c9fbc29Smrg exit ;; 10688c9fbc29Smrg i860:*:4.*:*) # i860-SVR4 10698c9fbc29Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 10708c9fbc29Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 10718c9fbc29Smrg else # Add other i860-SVR4 vendors below as they are discovered. 10728c9fbc29Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 10738c9fbc29Smrg fi 10748c9fbc29Smrg exit ;; 10758c9fbc29Smrg mini*:CTIX:SYS*5:*) 10768c9fbc29Smrg # "miniframe" 10778c9fbc29Smrg echo m68010-convergent-sysv 10788c9fbc29Smrg exit ;; 10798c9fbc29Smrg mc68k:UNIX:SYSTEM5:3.51m) 10808c9fbc29Smrg echo m68k-convergent-sysv 10818c9fbc29Smrg exit ;; 10828c9fbc29Smrg M680?0:D-NIX:5.3:*) 10838c9fbc29Smrg echo m68k-diab-dnix 10848c9fbc29Smrg exit ;; 10858c9fbc29Smrg M68*:*:R3V[5678]*:*) 10868c9fbc29Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 10878c9fbc29Smrg 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) 10888c9fbc29Smrg OS_REL='' 10898c9fbc29Smrg test -r /etc/.relid \ 10908c9fbc29Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 10918c9fbc29Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 10928c9fbc29Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 10938c9fbc29Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 10948c9fbc29Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 10958c9fbc29Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 10968c9fbc29Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 10978c9fbc29Smrg && { echo i486-ncr-sysv4; exit; } ;; 10988c9fbc29Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 10998c9fbc29Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 11008c9fbc29Smrg exit ;; 11018c9fbc29Smrg mc68030:UNIX_System_V:4.*:*) 11028c9fbc29Smrg echo m68k-atari-sysv4 11038c9fbc29Smrg exit ;; 11048c9fbc29Smrg TSUNAMI:LynxOS:2.*:*) 11058c9fbc29Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 11068c9fbc29Smrg exit ;; 11078c9fbc29Smrg rs6000:LynxOS:2.*:*) 11088c9fbc29Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 11098c9fbc29Smrg exit ;; 11108c9fbc29Smrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 11118c9fbc29Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 11128c9fbc29Smrg exit ;; 11138c9fbc29Smrg SM[BE]S:UNIX_SV:*:*) 11148c9fbc29Smrg echo mips-dde-sysv${UNAME_RELEASE} 11158c9fbc29Smrg exit ;; 11168c9fbc29Smrg RM*:ReliantUNIX-*:*:*) 11178c9fbc29Smrg echo mips-sni-sysv4 11188c9fbc29Smrg exit ;; 11198c9fbc29Smrg RM*:SINIX-*:*:*) 11208c9fbc29Smrg echo mips-sni-sysv4 11218c9fbc29Smrg exit ;; 11228c9fbc29Smrg *:SINIX-*:*:*) 11238c9fbc29Smrg if uname -p 2>/dev/null >/dev/null ; then 11248c9fbc29Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 11258c9fbc29Smrg echo ${UNAME_MACHINE}-sni-sysv4 11268c9fbc29Smrg else 11278c9fbc29Smrg echo ns32k-sni-sysv 11288c9fbc29Smrg fi 11298c9fbc29Smrg exit ;; 11308c9fbc29Smrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 11318c9fbc29Smrg # says <Richard.M.Bartel@ccMail.Census.GOV> 11328c9fbc29Smrg echo i586-unisys-sysv4 11338c9fbc29Smrg exit ;; 11348c9fbc29Smrg *:UNIX_System_V:4*:FTX*) 11358c9fbc29Smrg # From Gerald Hewes <hewes@openmarket.com>. 11368c9fbc29Smrg # How about differentiating between stratus architectures? -djm 11378c9fbc29Smrg echo hppa1.1-stratus-sysv4 11388c9fbc29Smrg exit ;; 11398c9fbc29Smrg *:*:*:FTX*) 11408c9fbc29Smrg # From seanf@swdc.stratus.com. 11418c9fbc29Smrg echo i860-stratus-sysv4 11428c9fbc29Smrg exit ;; 11438c9fbc29Smrg i*86:VOS:*:*) 11448c9fbc29Smrg # From Paul.Green@stratus.com. 11458c9fbc29Smrg echo ${UNAME_MACHINE}-stratus-vos 11468c9fbc29Smrg exit ;; 11478c9fbc29Smrg *:VOS:*:*) 11488c9fbc29Smrg # From Paul.Green@stratus.com. 11498c9fbc29Smrg echo hppa1.1-stratus-vos 11508c9fbc29Smrg exit ;; 11518c9fbc29Smrg mc68*:A/UX:*:*) 11528c9fbc29Smrg echo m68k-apple-aux${UNAME_RELEASE} 11538c9fbc29Smrg exit ;; 11548c9fbc29Smrg news*:NEWS-OS:6*:*) 11558c9fbc29Smrg echo mips-sony-newsos6 11568c9fbc29Smrg exit ;; 11578c9fbc29Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 11588c9fbc29Smrg if [ -d /usr/nec ]; then 11598c9fbc29Smrg echo mips-nec-sysv${UNAME_RELEASE} 11608c9fbc29Smrg else 11618c9fbc29Smrg echo mips-unknown-sysv${UNAME_RELEASE} 11628c9fbc29Smrg fi 11638c9fbc29Smrg exit ;; 11648c9fbc29Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 11658c9fbc29Smrg echo powerpc-be-beos 11668c9fbc29Smrg exit ;; 11678c9fbc29Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 11688c9fbc29Smrg echo powerpc-apple-beos 11698c9fbc29Smrg exit ;; 11708c9fbc29Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 11718c9fbc29Smrg echo i586-pc-beos 11728c9fbc29Smrg exit ;; 11738c9fbc29Smrg SX-4:SUPER-UX:*:*) 11748c9fbc29Smrg echo sx4-nec-superux${UNAME_RELEASE} 11758c9fbc29Smrg exit ;; 11768c9fbc29Smrg SX-5:SUPER-UX:*:*) 11778c9fbc29Smrg echo sx5-nec-superux${UNAME_RELEASE} 11788c9fbc29Smrg exit ;; 11798c9fbc29Smrg SX-6:SUPER-UX:*:*) 11808c9fbc29Smrg echo sx6-nec-superux${UNAME_RELEASE} 11818c9fbc29Smrg exit ;; 11828c9fbc29Smrg Power*:Rhapsody:*:*) 11838c9fbc29Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 11848c9fbc29Smrg exit ;; 11858c9fbc29Smrg *:Rhapsody:*:*) 11868c9fbc29Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 11878c9fbc29Smrg exit ;; 11888c9fbc29Smrg *:Darwin:*:*) 11898c9fbc29Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 11908c9fbc29Smrg case $UNAME_PROCESSOR in 11918c9fbc29Smrg unknown) UNAME_PROCESSOR=powerpc ;; 11928c9fbc29Smrg esac 11938c9fbc29Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 11948c9fbc29Smrg exit ;; 11958c9fbc29Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 11968c9fbc29Smrg UNAME_PROCESSOR=`uname -p` 11978c9fbc29Smrg if test "$UNAME_PROCESSOR" = "x86"; then 11988c9fbc29Smrg UNAME_PROCESSOR=i386 11998c9fbc29Smrg UNAME_MACHINE=pc 12008c9fbc29Smrg fi 12018c9fbc29Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 12028c9fbc29Smrg exit ;; 12038c9fbc29Smrg *:QNX:*:4*) 12048c9fbc29Smrg echo i386-pc-qnx 12058c9fbc29Smrg exit ;; 12068c9fbc29Smrg NSE-?:NONSTOP_KERNEL:*:*) 12078c9fbc29Smrg echo nse-tandem-nsk${UNAME_RELEASE} 12088c9fbc29Smrg exit ;; 12098c9fbc29Smrg NSR-?:NONSTOP_KERNEL:*:*) 12108c9fbc29Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 12118c9fbc29Smrg exit ;; 12128c9fbc29Smrg *:NonStop-UX:*:*) 12138c9fbc29Smrg echo mips-compaq-nonstopux 12148c9fbc29Smrg exit ;; 12158c9fbc29Smrg BS2000:POSIX*:*:*) 12168c9fbc29Smrg echo bs2000-siemens-sysv 12178c9fbc29Smrg exit ;; 12188c9fbc29Smrg DS/*:UNIX_System_V:*:*) 12198c9fbc29Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 12208c9fbc29Smrg exit ;; 12218c9fbc29Smrg *:Plan9:*:*) 12228c9fbc29Smrg # "uname -m" is not consistent, so use $cputype instead. 386 12238c9fbc29Smrg # is converted to i386 for consistency with other x86 12248c9fbc29Smrg # operating systems. 12258c9fbc29Smrg if test "$cputype" = "386"; then 12268c9fbc29Smrg UNAME_MACHINE=i386 12278c9fbc29Smrg else 12288c9fbc29Smrg UNAME_MACHINE="$cputype" 12298c9fbc29Smrg fi 12308c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-plan9 12318c9fbc29Smrg exit ;; 12328c9fbc29Smrg *:TOPS-10:*:*) 12338c9fbc29Smrg echo pdp10-unknown-tops10 12348c9fbc29Smrg exit ;; 12358c9fbc29Smrg *:TENEX:*:*) 12368c9fbc29Smrg echo pdp10-unknown-tenex 12378c9fbc29Smrg exit ;; 12388c9fbc29Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 12398c9fbc29Smrg echo pdp10-dec-tops20 12408c9fbc29Smrg exit ;; 12418c9fbc29Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 12428c9fbc29Smrg echo pdp10-xkl-tops20 12438c9fbc29Smrg exit ;; 12448c9fbc29Smrg *:TOPS-20:*:*) 12458c9fbc29Smrg echo pdp10-unknown-tops20 12468c9fbc29Smrg exit ;; 12478c9fbc29Smrg *:ITS:*:*) 12488c9fbc29Smrg echo pdp10-unknown-its 12498c9fbc29Smrg exit ;; 12508c9fbc29Smrg SEI:*:*:SEIUX) 12518c9fbc29Smrg echo mips-sei-seiux${UNAME_RELEASE} 12528c9fbc29Smrg exit ;; 12538c9fbc29Smrg *:DragonFly:*:*) 12548c9fbc29Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 12558c9fbc29Smrg exit ;; 12568c9fbc29Smrg *:*VMS:*:*) 12578c9fbc29Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 12588c9fbc29Smrg case "${UNAME_MACHINE}" in 12598c9fbc29Smrg A*) echo alpha-dec-vms ; exit ;; 12608c9fbc29Smrg I*) echo ia64-dec-vms ; exit ;; 12618c9fbc29Smrg V*) echo vax-dec-vms ; exit ;; 12628c9fbc29Smrg esac ;; 12638c9fbc29Smrg *:XENIX:*:SysV) 12648c9fbc29Smrg echo i386-pc-xenix 12658c9fbc29Smrg exit ;; 12668c9fbc29Smrg i*86:skyos:*:*) 12678c9fbc29Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 12688c9fbc29Smrg exit ;; 12698c9fbc29Smrg i*86:rdos:*:*) 12708c9fbc29Smrg echo ${UNAME_MACHINE}-pc-rdos 12718c9fbc29Smrg exit ;; 12728c9fbc29Smrgesac 12738c9fbc29Smrg 12748c9fbc29Smrg#echo '(No uname command or uname output not recognized.)' 1>&2 12758c9fbc29Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 12768c9fbc29Smrg 12778c9fbc29Smrgeval $set_cc_for_build 12788c9fbc29Smrgcat >$dummy.c <<EOF 12798c9fbc29Smrg#ifdef _SEQUENT_ 12808c9fbc29Smrg# include <sys/types.h> 12818c9fbc29Smrg# include <sys/utsname.h> 12828c9fbc29Smrg#endif 12838c9fbc29Smrgmain () 12848c9fbc29Smrg{ 12858c9fbc29Smrg#if defined (sony) 12868c9fbc29Smrg#if defined (MIPSEB) 12878c9fbc29Smrg /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 12888c9fbc29Smrg I don't know.... */ 12898c9fbc29Smrg printf ("mips-sony-bsd\n"); exit (0); 12908c9fbc29Smrg#else 12918c9fbc29Smrg#include <sys/param.h> 12928c9fbc29Smrg printf ("m68k-sony-newsos%s\n", 12938c9fbc29Smrg#ifdef NEWSOS4 12948c9fbc29Smrg "4" 12958c9fbc29Smrg#else 12968c9fbc29Smrg "" 12978c9fbc29Smrg#endif 12988c9fbc29Smrg ); exit (0); 12998c9fbc29Smrg#endif 13008c9fbc29Smrg#endif 13018c9fbc29Smrg 13028c9fbc29Smrg#if defined (__arm) && defined (__acorn) && defined (__unix) 13038c9fbc29Smrg printf ("arm-acorn-riscix\n"); exit (0); 13048c9fbc29Smrg#endif 13058c9fbc29Smrg 13068c9fbc29Smrg#if defined (hp300) && !defined (hpux) 13078c9fbc29Smrg printf ("m68k-hp-bsd\n"); exit (0); 13088c9fbc29Smrg#endif 13098c9fbc29Smrg 13108c9fbc29Smrg#if defined (NeXT) 13118c9fbc29Smrg#if !defined (__ARCHITECTURE__) 13128c9fbc29Smrg#define __ARCHITECTURE__ "m68k" 13138c9fbc29Smrg#endif 13148c9fbc29Smrg int version; 13158c9fbc29Smrg version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 13168c9fbc29Smrg if (version < 4) 13178c9fbc29Smrg printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 13188c9fbc29Smrg else 13198c9fbc29Smrg printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 13208c9fbc29Smrg exit (0); 13218c9fbc29Smrg#endif 13228c9fbc29Smrg 13238c9fbc29Smrg#if defined (MULTIMAX) || defined (n16) 13248c9fbc29Smrg#if defined (UMAXV) 13258c9fbc29Smrg printf ("ns32k-encore-sysv\n"); exit (0); 13268c9fbc29Smrg#else 13278c9fbc29Smrg#if defined (CMU) 13288c9fbc29Smrg printf ("ns32k-encore-mach\n"); exit (0); 13298c9fbc29Smrg#else 13308c9fbc29Smrg printf ("ns32k-encore-bsd\n"); exit (0); 13318c9fbc29Smrg#endif 13328c9fbc29Smrg#endif 13338c9fbc29Smrg#endif 13348c9fbc29Smrg 13358c9fbc29Smrg#if defined (__386BSD__) 13368c9fbc29Smrg printf ("i386-pc-bsd\n"); exit (0); 13378c9fbc29Smrg#endif 13388c9fbc29Smrg 13398c9fbc29Smrg#if defined (sequent) 13408c9fbc29Smrg#if defined (i386) 13418c9fbc29Smrg printf ("i386-sequent-dynix\n"); exit (0); 13428c9fbc29Smrg#endif 13438c9fbc29Smrg#if defined (ns32000) 13448c9fbc29Smrg printf ("ns32k-sequent-dynix\n"); exit (0); 13458c9fbc29Smrg#endif 13468c9fbc29Smrg#endif 13478c9fbc29Smrg 13488c9fbc29Smrg#if defined (_SEQUENT_) 13498c9fbc29Smrg struct utsname un; 13508c9fbc29Smrg 13518c9fbc29Smrg uname(&un); 13528c9fbc29Smrg 13538c9fbc29Smrg if (strncmp(un.version, "V2", 2) == 0) { 13548c9fbc29Smrg printf ("i386-sequent-ptx2\n"); exit (0); 13558c9fbc29Smrg } 13568c9fbc29Smrg if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 13578c9fbc29Smrg printf ("i386-sequent-ptx1\n"); exit (0); 13588c9fbc29Smrg } 13598c9fbc29Smrg printf ("i386-sequent-ptx\n"); exit (0); 13608c9fbc29Smrg 13618c9fbc29Smrg#endif 13628c9fbc29Smrg 13638c9fbc29Smrg#if defined (vax) 13648c9fbc29Smrg# if !defined (ultrix) 13658c9fbc29Smrg# include <sys/param.h> 13668c9fbc29Smrg# if defined (BSD) 13678c9fbc29Smrg# if BSD == 43 13688c9fbc29Smrg printf ("vax-dec-bsd4.3\n"); exit (0); 13698c9fbc29Smrg# else 13708c9fbc29Smrg# if BSD == 199006 13718c9fbc29Smrg printf ("vax-dec-bsd4.3reno\n"); exit (0); 13728c9fbc29Smrg# else 13738c9fbc29Smrg printf ("vax-dec-bsd\n"); exit (0); 13748c9fbc29Smrg# endif 13758c9fbc29Smrg# endif 13768c9fbc29Smrg# else 13778c9fbc29Smrg printf ("vax-dec-bsd\n"); exit (0); 13788c9fbc29Smrg# endif 13798c9fbc29Smrg# else 13808c9fbc29Smrg printf ("vax-dec-ultrix\n"); exit (0); 13818c9fbc29Smrg# endif 13828c9fbc29Smrg#endif 13838c9fbc29Smrg 13848c9fbc29Smrg#if defined (alliant) && defined (i860) 13858c9fbc29Smrg printf ("i860-alliant-bsd\n"); exit (0); 13868c9fbc29Smrg#endif 13878c9fbc29Smrg 13888c9fbc29Smrg exit (1); 13898c9fbc29Smrg} 13908c9fbc29SmrgEOF 13918c9fbc29Smrg 13928c9fbc29Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 13938c9fbc29Smrg { echo "$SYSTEM_NAME"; exit; } 13948c9fbc29Smrg 13958c9fbc29Smrg# Apollos put the system type in the environment. 13968c9fbc29Smrg 13978c9fbc29Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 13988c9fbc29Smrg 13998c9fbc29Smrg# Convex versions that predate uname can use getsysinfo(1) 14008c9fbc29Smrg 14018c9fbc29Smrgif [ -x /usr/convex/getsysinfo ] 14028c9fbc29Smrgthen 14038c9fbc29Smrg case `getsysinfo -f cpu_type` in 14048c9fbc29Smrg c1*) 14058c9fbc29Smrg echo c1-convex-bsd 14068c9fbc29Smrg exit ;; 14078c9fbc29Smrg c2*) 14088c9fbc29Smrg if getsysinfo -f scalar_acc 14098c9fbc29Smrg then echo c32-convex-bsd 14108c9fbc29Smrg else echo c2-convex-bsd 14118c9fbc29Smrg fi 14128c9fbc29Smrg exit ;; 14138c9fbc29Smrg c34*) 14148c9fbc29Smrg echo c34-convex-bsd 14158c9fbc29Smrg exit ;; 14168c9fbc29Smrg c38*) 14178c9fbc29Smrg echo c38-convex-bsd 14188c9fbc29Smrg exit ;; 14198c9fbc29Smrg c4*) 14208c9fbc29Smrg echo c4-convex-bsd 14218c9fbc29Smrg exit ;; 14228c9fbc29Smrg esac 14238c9fbc29Smrgfi 14248c9fbc29Smrg 14258c9fbc29Smrgcat >&2 <<EOF 14268c9fbc29Smrg$0: unable to guess system type 14278c9fbc29Smrg 14288c9fbc29SmrgThis script, last modified $timestamp, has failed to recognize 14298c9fbc29Smrgthe operating system you are using. It is advised that you 14308c9fbc29Smrgdownload the most up to date version of the config scripts from 14318c9fbc29Smrg 14328c9fbc29Smrg http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess 14338c9fbc29Smrgand 14348c9fbc29Smrg http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub 14358c9fbc29Smrg 14368c9fbc29SmrgIf the version you run ($0) is already up to date, please 14378c9fbc29Smrgsend the following data and any information you think might be 14388c9fbc29Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 14398c9fbc29Smrginformation to handle your system. 14408c9fbc29Smrg 14418c9fbc29Smrgconfig.guess timestamp = $timestamp 14428c9fbc29Smrg 14438c9fbc29Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 14448c9fbc29Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 14458c9fbc29Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 14468c9fbc29Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 14478c9fbc29Smrg 14488c9fbc29Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 14498c9fbc29Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 14508c9fbc29Smrg 14518c9fbc29Smrghostinfo = `(hostinfo) 2>/dev/null` 14528c9fbc29Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 14538c9fbc29Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 14548c9fbc29Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 14558c9fbc29Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 14568c9fbc29Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 14578c9fbc29Smrg 14588c9fbc29SmrgUNAME_MACHINE = ${UNAME_MACHINE} 14598c9fbc29SmrgUNAME_RELEASE = ${UNAME_RELEASE} 14608c9fbc29SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 14618c9fbc29SmrgUNAME_VERSION = ${UNAME_VERSION} 14628c9fbc29SmrgEOF 14638c9fbc29Smrg 14648c9fbc29Smrgexit 1 14658c9fbc29Smrg 14668c9fbc29Smrg# Local variables: 14678c9fbc29Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 14688c9fbc29Smrg# time-stamp-start: "timestamp='" 14698c9fbc29Smrg# time-stamp-format: "%:y-%02m-%02d" 14708c9fbc29Smrg# time-stamp-end: "'" 14718c9fbc29Smrg# End: 1472