config.guess revision ce62200c
11a30de1fSmrg#! /bin/sh 21a30de1fSmrg# Attempt to guess a canonical system name. 31a30de1fSmrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4ce62200cSmrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 5b7fb5eacSmrg# Free Software Foundation, Inc. 61a30de1fSmrg 7ce62200cSmrgtimestamp='2010-08-21' 81a30de1fSmrg 91a30de1fSmrg# This file is free software; you can redistribute it and/or modify it 101a30de1fSmrg# under the terms of the GNU General Public License as published by 111a30de1fSmrg# the Free Software Foundation; either version 2 of the License, or 121a30de1fSmrg# (at your option) any later version. 131a30de1fSmrg# 141a30de1fSmrg# This program is distributed in the hope that it will be useful, but 151a30de1fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 161a30de1fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 171a30de1fSmrg# General Public License for more details. 181a30de1fSmrg# 191a30de1fSmrg# You should have received a copy of the GNU General Public License 201a30de1fSmrg# along with this program; if not, write to the Free Software 211a30de1fSmrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 221a30de1fSmrg# 02110-1301, USA. 231a30de1fSmrg# 241a30de1fSmrg# As a special exception to the GNU General Public License, if you 251a30de1fSmrg# distribute this file as part of a program that contains a 261a30de1fSmrg# configuration script generated by Autoconf, you may include it under 271a30de1fSmrg# the same distribution terms that you use for the rest of that program. 281a30de1fSmrg 291a30de1fSmrg 30ce62200cSmrg# Originally written by Per Bothner. Please send patches (context 31ce62200cSmrg# diff format) to <config-patches@gnu.org> and include a ChangeLog 32ce62200cSmrg# entry. 331a30de1fSmrg# 341a30de1fSmrg# This script attempts to guess a canonical system name similar to 351a30de1fSmrg# config.sub. If it succeeds, it prints the system name on stdout, and 361a30de1fSmrg# exits with 0. Otherwise, it exits with 1. 371a30de1fSmrg# 38ce62200cSmrg# You can get the latest version of this script from: 39ce62200cSmrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 401a30de1fSmrg 411a30de1fSmrgme=`echo "$0" | sed -e 's,.*/,,'` 421a30de1fSmrg 431a30de1fSmrgusage="\ 441a30de1fSmrgUsage: $0 [OPTION] 451a30de1fSmrg 461a30de1fSmrgOutput the configuration name of the system \`$me' is run on. 471a30de1fSmrg 481a30de1fSmrgOperation modes: 491a30de1fSmrg -h, --help print this help, then exit 501a30de1fSmrg -t, --time-stamp print date of last modification, then exit 511a30de1fSmrg -v, --version print version number, then exit 521a30de1fSmrg 531a30de1fSmrgReport bugs and patches to <config-patches@gnu.org>." 541a30de1fSmrg 551a30de1fSmrgversion="\ 561a30de1fSmrgGNU config.guess ($timestamp) 571a30de1fSmrg 581a30de1fSmrgOriginally written by Per Bothner. 59ce62200cSmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 60ce62200cSmrg2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 61ce62200cSmrgSoftware Foundation, Inc. 621a30de1fSmrg 631a30de1fSmrgThis is free software; see the source for copying conditions. There is NO 641a30de1fSmrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 651a30de1fSmrg 661a30de1fSmrghelp=" 671a30de1fSmrgTry \`$me --help' for more information." 681a30de1fSmrg 691a30de1fSmrg# Parse command line 701a30de1fSmrgwhile test $# -gt 0 ; do 711a30de1fSmrg case $1 in 721a30de1fSmrg --time-stamp | --time* | -t ) 731a30de1fSmrg echo "$timestamp" ; exit ;; 741a30de1fSmrg --version | -v ) 751a30de1fSmrg echo "$version" ; exit ;; 761a30de1fSmrg --help | --h* | -h ) 771a30de1fSmrg echo "$usage"; exit ;; 781a30de1fSmrg -- ) # Stop option processing 791a30de1fSmrg shift; break ;; 801a30de1fSmrg - ) # Use stdin as input. 811a30de1fSmrg break ;; 821a30de1fSmrg -* ) 831a30de1fSmrg echo "$me: invalid option $1$help" >&2 841a30de1fSmrg exit 1 ;; 851a30de1fSmrg * ) 861a30de1fSmrg break ;; 871a30de1fSmrg esac 881a30de1fSmrgdone 891a30de1fSmrg 901a30de1fSmrgif test $# != 0; then 911a30de1fSmrg echo "$me: too many arguments$help" >&2 921a30de1fSmrg exit 1 931a30de1fSmrgfi 941a30de1fSmrg 95ce62200cSmrgtrap 'exit 1' HUP INT TERM 961a30de1fSmrg 971a30de1fSmrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 981a30de1fSmrg# compiler to aid in system detection is discouraged as it requires 991a30de1fSmrg# temporary files to be created and, as you can see below, it is a 1001a30de1fSmrg# headache to deal with in a portable fashion. 1011a30de1fSmrg 1021a30de1fSmrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 1031a30de1fSmrg# use `HOST_CC' if defined, but it is deprecated. 1041a30de1fSmrg 1051a30de1fSmrg# Portable tmp directory creation inspired by the Autoconf team. 1061a30de1fSmrg 1071a30de1fSmrgset_cc_for_build=' 1081a30de1fSmrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 109ce62200cSmrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ; 1101a30de1fSmrg: ${TMPDIR=/tmp} ; 1111a30de1fSmrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 1121a30de1fSmrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 1131a30de1fSmrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 1141a30de1fSmrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 1151a30de1fSmrgdummy=$tmp/dummy ; 1161a30de1fSmrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 1171a30de1fSmrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 1181a30de1fSmrg ,,) echo "int x;" > $dummy.c ; 1191a30de1fSmrg for c in cc gcc c89 c99 ; do 1201a30de1fSmrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 1211a30de1fSmrg CC_FOR_BUILD="$c"; break ; 1221a30de1fSmrg fi ; 1231a30de1fSmrg done ; 1241a30de1fSmrg if test x"$CC_FOR_BUILD" = x ; then 1251a30de1fSmrg CC_FOR_BUILD=no_compiler_found ; 1261a30de1fSmrg fi 1271a30de1fSmrg ;; 1281a30de1fSmrg ,,*) CC_FOR_BUILD=$CC ;; 1291a30de1fSmrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 1301a30de1fSmrgesac ; set_cc_for_build= ;' 1311a30de1fSmrg 1321a30de1fSmrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 1331a30de1fSmrg# (ghazi@noc.rutgers.edu 1994-08-24) 1341a30de1fSmrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 1351a30de1fSmrg PATH=$PATH:/.attbin ; export PATH 1361a30de1fSmrgfi 1371a30de1fSmrg 1381a30de1fSmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 1391a30de1fSmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 1401a30de1fSmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 1411a30de1fSmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 1421a30de1fSmrg 1431a30de1fSmrg# Note: order is significant - the case branches are not exclusive. 1441a30de1fSmrg 1451a30de1fSmrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 1461a30de1fSmrg *:NetBSD:*:*) 1471a30de1fSmrg # NetBSD (nbsd) targets should (where applicable) match one or 1481a30de1fSmrg # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 1491a30de1fSmrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 1501a30de1fSmrg # switched to ELF, *-*-netbsd* would select the old 1511a30de1fSmrg # object file format. This provides both forward 1521a30de1fSmrg # compatibility and a consistent mechanism for selecting the 1531a30de1fSmrg # object file format. 1541a30de1fSmrg # 1551a30de1fSmrg # Note: NetBSD doesn't particularly care about the vendor 1561a30de1fSmrg # portion of the name. We always set it to "unknown". 1571a30de1fSmrg sysctl="sysctl -n hw.machine_arch" 1581a30de1fSmrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 1591a30de1fSmrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 1601a30de1fSmrg case "${UNAME_MACHINE_ARCH}" in 1611a30de1fSmrg armeb) machine=armeb-unknown ;; 1621a30de1fSmrg arm*) machine=arm-unknown ;; 1631a30de1fSmrg sh3el) machine=shl-unknown ;; 1641a30de1fSmrg sh3eb) machine=sh-unknown ;; 165b7fb5eacSmrg sh5el) machine=sh5le-unknown ;; 1661a30de1fSmrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 1671a30de1fSmrg esac 1681a30de1fSmrg # The Operating System including object format, if it has switched 1691a30de1fSmrg # to ELF recently, or will in the future. 1701a30de1fSmrg case "${UNAME_MACHINE_ARCH}" in 1711a30de1fSmrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 1721a30de1fSmrg eval $set_cc_for_build 1731a30de1fSmrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 174ce62200cSmrg | grep -q __ELF__ 1751a30de1fSmrg then 1761a30de1fSmrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 1771a30de1fSmrg # Return netbsd for either. FIX? 1781a30de1fSmrg os=netbsd 1791a30de1fSmrg else 1801a30de1fSmrg os=netbsdelf 1811a30de1fSmrg fi 1821a30de1fSmrg ;; 1831a30de1fSmrg *) 1841a30de1fSmrg os=netbsd 1851a30de1fSmrg ;; 1861a30de1fSmrg esac 1871a30de1fSmrg # The OS release 1881a30de1fSmrg # Debian GNU/NetBSD machines have a different userland, and 1891a30de1fSmrg # thus, need a distinct triplet. However, they do not need 1901a30de1fSmrg # kernel version information, so it can be replaced with a 1911a30de1fSmrg # suitable tag, in the style of linux-gnu. 1921a30de1fSmrg case "${UNAME_VERSION}" in 1931a30de1fSmrg Debian*) 1941a30de1fSmrg release='-gnu' 1951a30de1fSmrg ;; 1961a30de1fSmrg *) 1971a30de1fSmrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 1981a30de1fSmrg ;; 1991a30de1fSmrg esac 2001a30de1fSmrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 2011a30de1fSmrg # contains redundant information, the shorter form: 2021a30de1fSmrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 2031a30de1fSmrg echo "${machine}-${os}${release}" 2041a30de1fSmrg exit ;; 2051a30de1fSmrg *:OpenBSD:*:*) 2061a30de1fSmrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 2071a30de1fSmrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 2081a30de1fSmrg exit ;; 2091a30de1fSmrg *:ekkoBSD:*:*) 2101a30de1fSmrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 2111a30de1fSmrg exit ;; 2121a30de1fSmrg *:SolidBSD:*:*) 2131a30de1fSmrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 2141a30de1fSmrg exit ;; 2151a30de1fSmrg macppc:MirBSD:*:*) 2161a30de1fSmrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 2171a30de1fSmrg exit ;; 2181a30de1fSmrg *:MirBSD:*:*) 2191a30de1fSmrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 2201a30de1fSmrg exit ;; 2211a30de1fSmrg alpha:OSF1:*:*) 2221a30de1fSmrg case $UNAME_RELEASE in 2231a30de1fSmrg *4.0) 2241a30de1fSmrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 2251a30de1fSmrg ;; 2261a30de1fSmrg *5.*) 2271a30de1fSmrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 2281a30de1fSmrg ;; 2291a30de1fSmrg esac 2301a30de1fSmrg # According to Compaq, /usr/sbin/psrinfo has been available on 2311a30de1fSmrg # OSF/1 and Tru64 systems produced since 1995. I hope that 2321a30de1fSmrg # covers most systems running today. This code pipes the CPU 2331a30de1fSmrg # types through head -n 1, so we only detect the type of CPU 0. 2341a30de1fSmrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 2351a30de1fSmrg case "$ALPHA_CPU_TYPE" in 2361a30de1fSmrg "EV4 (21064)") 2371a30de1fSmrg UNAME_MACHINE="alpha" ;; 2381a30de1fSmrg "EV4.5 (21064)") 2391a30de1fSmrg UNAME_MACHINE="alpha" ;; 2401a30de1fSmrg "LCA4 (21066/21068)") 2411a30de1fSmrg UNAME_MACHINE="alpha" ;; 2421a30de1fSmrg "EV5 (21164)") 2431a30de1fSmrg UNAME_MACHINE="alphaev5" ;; 2441a30de1fSmrg "EV5.6 (21164A)") 2451a30de1fSmrg UNAME_MACHINE="alphaev56" ;; 2461a30de1fSmrg "EV5.6 (21164PC)") 2471a30de1fSmrg UNAME_MACHINE="alphapca56" ;; 2481a30de1fSmrg "EV5.7 (21164PC)") 2491a30de1fSmrg UNAME_MACHINE="alphapca57" ;; 2501a30de1fSmrg "EV6 (21264)") 2511a30de1fSmrg UNAME_MACHINE="alphaev6" ;; 2521a30de1fSmrg "EV6.7 (21264A)") 2531a30de1fSmrg UNAME_MACHINE="alphaev67" ;; 2541a30de1fSmrg "EV6.8CB (21264C)") 2551a30de1fSmrg UNAME_MACHINE="alphaev68" ;; 2561a30de1fSmrg "EV6.8AL (21264B)") 2571a30de1fSmrg UNAME_MACHINE="alphaev68" ;; 2581a30de1fSmrg "EV6.8CX (21264D)") 2591a30de1fSmrg UNAME_MACHINE="alphaev68" ;; 2601a30de1fSmrg "EV6.9A (21264/EV69A)") 2611a30de1fSmrg UNAME_MACHINE="alphaev69" ;; 2621a30de1fSmrg "EV7 (21364)") 2631a30de1fSmrg UNAME_MACHINE="alphaev7" ;; 2641a30de1fSmrg "EV7.9 (21364A)") 2651a30de1fSmrg UNAME_MACHINE="alphaev79" ;; 2661a30de1fSmrg esac 2671a30de1fSmrg # A Pn.n version is a patched version. 2681a30de1fSmrg # A Vn.n version is a released version. 2691a30de1fSmrg # A Tn.n version is a released field test version. 2701a30de1fSmrg # A Xn.n version is an unreleased experimental baselevel. 2711a30de1fSmrg # 1.2 uses "1.2" for uname -r. 2721a30de1fSmrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2731a30de1fSmrg exit ;; 2741a30de1fSmrg Alpha\ *:Windows_NT*:*) 2751a30de1fSmrg # How do we know it's Interix rather than the generic POSIX subsystem? 2761a30de1fSmrg # Should we change UNAME_MACHINE based on the output of uname instead 2771a30de1fSmrg # of the specific Alpha model? 2781a30de1fSmrg echo alpha-pc-interix 2791a30de1fSmrg exit ;; 2801a30de1fSmrg 21064:Windows_NT:50:3) 2811a30de1fSmrg echo alpha-dec-winnt3.5 2821a30de1fSmrg exit ;; 2831a30de1fSmrg Amiga*:UNIX_System_V:4.0:*) 2841a30de1fSmrg echo m68k-unknown-sysv4 2851a30de1fSmrg exit ;; 2861a30de1fSmrg *:[Aa]miga[Oo][Ss]:*:*) 2871a30de1fSmrg echo ${UNAME_MACHINE}-unknown-amigaos 2881a30de1fSmrg exit ;; 2891a30de1fSmrg *:[Mm]orph[Oo][Ss]:*:*) 2901a30de1fSmrg echo ${UNAME_MACHINE}-unknown-morphos 2911a30de1fSmrg exit ;; 2921a30de1fSmrg *:OS/390:*:*) 2931a30de1fSmrg echo i370-ibm-openedition 2941a30de1fSmrg exit ;; 2951a30de1fSmrg *:z/VM:*:*) 2961a30de1fSmrg echo s390-ibm-zvmoe 2971a30de1fSmrg exit ;; 2981a30de1fSmrg *:OS400:*:*) 2991a30de1fSmrg echo powerpc-ibm-os400 3001a30de1fSmrg exit ;; 3011a30de1fSmrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 3021a30de1fSmrg echo arm-acorn-riscix${UNAME_RELEASE} 3031a30de1fSmrg exit ;; 3041a30de1fSmrg arm:riscos:*:*|arm:RISCOS:*:*) 3051a30de1fSmrg echo arm-unknown-riscos 3061a30de1fSmrg exit ;; 3071a30de1fSmrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 3081a30de1fSmrg echo hppa1.1-hitachi-hiuxmpp 3091a30de1fSmrg exit ;; 3101a30de1fSmrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 3111a30de1fSmrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 3121a30de1fSmrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 3131a30de1fSmrg echo pyramid-pyramid-sysv3 3141a30de1fSmrg else 3151a30de1fSmrg echo pyramid-pyramid-bsd 3161a30de1fSmrg fi 3171a30de1fSmrg exit ;; 3181a30de1fSmrg NILE*:*:*:dcosx) 3191a30de1fSmrg echo pyramid-pyramid-svr4 3201a30de1fSmrg exit ;; 3211a30de1fSmrg DRS?6000:unix:4.0:6*) 3221a30de1fSmrg echo sparc-icl-nx6 3231a30de1fSmrg exit ;; 3241a30de1fSmrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 3251a30de1fSmrg case `/usr/bin/uname -p` in 3261a30de1fSmrg sparc) echo sparc-icl-nx7; exit ;; 3271a30de1fSmrg esac ;; 328b7fb5eacSmrg s390x:SunOS:*:*) 329b7fb5eacSmrg echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 330b7fb5eacSmrg exit ;; 3311a30de1fSmrg sun4H:SunOS:5.*:*) 3321a30de1fSmrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3331a30de1fSmrg exit ;; 3341a30de1fSmrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 3351a30de1fSmrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3361a30de1fSmrg exit ;; 337ce62200cSmrg i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 338ce62200cSmrg echo i386-pc-auroraux${UNAME_RELEASE} 339ce62200cSmrg exit ;; 340b7fb5eacSmrg i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 341b7fb5eacSmrg eval $set_cc_for_build 342b7fb5eacSmrg SUN_ARCH="i386" 343b7fb5eacSmrg # If there is a compiler, see if it is configured for 64-bit objects. 344b7fb5eacSmrg # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 345b7fb5eacSmrg # This test works for both compilers. 346b7fb5eacSmrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 347b7fb5eacSmrg if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 348b7fb5eacSmrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 349b7fb5eacSmrg grep IS_64BIT_ARCH >/dev/null 350b7fb5eacSmrg then 351b7fb5eacSmrg SUN_ARCH="x86_64" 352b7fb5eacSmrg fi 353b7fb5eacSmrg fi 354b7fb5eacSmrg echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3551a30de1fSmrg exit ;; 3561a30de1fSmrg sun4*:SunOS:6*:*) 3571a30de1fSmrg # According to config.sub, this is the proper way to canonicalize 3581a30de1fSmrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 3591a30de1fSmrg # it's likely to be more like Solaris than SunOS4. 3601a30de1fSmrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3611a30de1fSmrg exit ;; 3621a30de1fSmrg sun4*:SunOS:*:*) 3631a30de1fSmrg case "`/usr/bin/arch -k`" in 3641a30de1fSmrg Series*|S4*) 3651a30de1fSmrg UNAME_RELEASE=`uname -v` 3661a30de1fSmrg ;; 3671a30de1fSmrg esac 3681a30de1fSmrg # Japanese Language versions have a version number like `4.1.3-JL'. 3691a30de1fSmrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 3701a30de1fSmrg exit ;; 3711a30de1fSmrg sun3*:SunOS:*:*) 3721a30de1fSmrg echo m68k-sun-sunos${UNAME_RELEASE} 3731a30de1fSmrg exit ;; 3741a30de1fSmrg sun*:*:4.2BSD:*) 3751a30de1fSmrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 3761a30de1fSmrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 3771a30de1fSmrg case "`/bin/arch`" in 3781a30de1fSmrg sun3) 3791a30de1fSmrg echo m68k-sun-sunos${UNAME_RELEASE} 3801a30de1fSmrg ;; 3811a30de1fSmrg sun4) 3821a30de1fSmrg echo sparc-sun-sunos${UNAME_RELEASE} 3831a30de1fSmrg ;; 3841a30de1fSmrg esac 3851a30de1fSmrg exit ;; 3861a30de1fSmrg aushp:SunOS:*:*) 3871a30de1fSmrg echo sparc-auspex-sunos${UNAME_RELEASE} 3881a30de1fSmrg exit ;; 3891a30de1fSmrg # The situation for MiNT is a little confusing. The machine name 3901a30de1fSmrg # can be virtually everything (everything which is not 3911a30de1fSmrg # "atarist" or "atariste" at least should have a processor 3921a30de1fSmrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 3931a30de1fSmrg # to the lowercase version "mint" (or "freemint"). Finally 3941a30de1fSmrg # the system name "TOS" denotes a system which is actually not 3951a30de1fSmrg # MiNT. But MiNT is downward compatible to TOS, so this should 3961a30de1fSmrg # be no problem. 3971a30de1fSmrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 3981a30de1fSmrg echo m68k-atari-mint${UNAME_RELEASE} 3991a30de1fSmrg exit ;; 4001a30de1fSmrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 4011a30de1fSmrg echo m68k-atari-mint${UNAME_RELEASE} 4021a30de1fSmrg exit ;; 4031a30de1fSmrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 4041a30de1fSmrg echo m68k-atari-mint${UNAME_RELEASE} 4051a30de1fSmrg exit ;; 4061a30de1fSmrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 4071a30de1fSmrg echo m68k-milan-mint${UNAME_RELEASE} 4081a30de1fSmrg exit ;; 4091a30de1fSmrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 4101a30de1fSmrg echo m68k-hades-mint${UNAME_RELEASE} 4111a30de1fSmrg exit ;; 4121a30de1fSmrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 4131a30de1fSmrg echo m68k-unknown-mint${UNAME_RELEASE} 4141a30de1fSmrg exit ;; 4151a30de1fSmrg m68k:machten:*:*) 4161a30de1fSmrg echo m68k-apple-machten${UNAME_RELEASE} 4171a30de1fSmrg exit ;; 4181a30de1fSmrg powerpc:machten:*:*) 4191a30de1fSmrg echo powerpc-apple-machten${UNAME_RELEASE} 4201a30de1fSmrg exit ;; 4211a30de1fSmrg RISC*:Mach:*:*) 4221a30de1fSmrg echo mips-dec-mach_bsd4.3 4231a30de1fSmrg exit ;; 4241a30de1fSmrg RISC*:ULTRIX:*:*) 4251a30de1fSmrg echo mips-dec-ultrix${UNAME_RELEASE} 4261a30de1fSmrg exit ;; 4271a30de1fSmrg VAX*:ULTRIX*:*:*) 4281a30de1fSmrg echo vax-dec-ultrix${UNAME_RELEASE} 4291a30de1fSmrg exit ;; 4301a30de1fSmrg 2020:CLIX:*:* | 2430:CLIX:*:*) 4311a30de1fSmrg echo clipper-intergraph-clix${UNAME_RELEASE} 4321a30de1fSmrg exit ;; 4331a30de1fSmrg mips:*:*:UMIPS | mips:*:*:RISCos) 4341a30de1fSmrg eval $set_cc_for_build 4351a30de1fSmrg sed 's/^ //' << EOF >$dummy.c 4361a30de1fSmrg#ifdef __cplusplus 4371a30de1fSmrg#include <stdio.h> /* for printf() prototype */ 4381a30de1fSmrg int main (int argc, char *argv[]) { 4391a30de1fSmrg#else 4401a30de1fSmrg int main (argc, argv) int argc; char *argv[]; { 4411a30de1fSmrg#endif 4421a30de1fSmrg #if defined (host_mips) && defined (MIPSEB) 4431a30de1fSmrg #if defined (SYSTYPE_SYSV) 4441a30de1fSmrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 4451a30de1fSmrg #endif 4461a30de1fSmrg #if defined (SYSTYPE_SVR4) 4471a30de1fSmrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 4481a30de1fSmrg #endif 4491a30de1fSmrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 4501a30de1fSmrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 4511a30de1fSmrg #endif 4521a30de1fSmrg #endif 4531a30de1fSmrg exit (-1); 4541a30de1fSmrg } 4551a30de1fSmrgEOF 4561a30de1fSmrg $CC_FOR_BUILD -o $dummy $dummy.c && 4571a30de1fSmrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 4581a30de1fSmrg SYSTEM_NAME=`$dummy $dummyarg` && 4591a30de1fSmrg { echo "$SYSTEM_NAME"; exit; } 4601a30de1fSmrg echo mips-mips-riscos${UNAME_RELEASE} 4611a30de1fSmrg exit ;; 4621a30de1fSmrg Motorola:PowerMAX_OS:*:*) 4631a30de1fSmrg echo powerpc-motorola-powermax 4641a30de1fSmrg exit ;; 4651a30de1fSmrg Motorola:*:4.3:PL8-*) 4661a30de1fSmrg echo powerpc-harris-powermax 4671a30de1fSmrg exit ;; 4681a30de1fSmrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 4691a30de1fSmrg echo powerpc-harris-powermax 4701a30de1fSmrg exit ;; 4711a30de1fSmrg Night_Hawk:Power_UNIX:*:*) 4721a30de1fSmrg echo powerpc-harris-powerunix 4731a30de1fSmrg exit ;; 4741a30de1fSmrg m88k:CX/UX:7*:*) 4751a30de1fSmrg echo m88k-harris-cxux7 4761a30de1fSmrg exit ;; 4771a30de1fSmrg m88k:*:4*:R4*) 4781a30de1fSmrg echo m88k-motorola-sysv4 4791a30de1fSmrg exit ;; 4801a30de1fSmrg m88k:*:3*:R3*) 4811a30de1fSmrg echo m88k-motorola-sysv3 4821a30de1fSmrg exit ;; 4831a30de1fSmrg AViiON:dgux:*:*) 4841a30de1fSmrg # DG/UX returns AViiON for all architectures 4851a30de1fSmrg UNAME_PROCESSOR=`/usr/bin/uname -p` 4861a30de1fSmrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 4871a30de1fSmrg then 4881a30de1fSmrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 4891a30de1fSmrg [ ${TARGET_BINARY_INTERFACE}x = x ] 4901a30de1fSmrg then 4911a30de1fSmrg echo m88k-dg-dgux${UNAME_RELEASE} 4921a30de1fSmrg else 4931a30de1fSmrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 4941a30de1fSmrg fi 4951a30de1fSmrg else 4961a30de1fSmrg echo i586-dg-dgux${UNAME_RELEASE} 4971a30de1fSmrg fi 4981a30de1fSmrg exit ;; 4991a30de1fSmrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 5001a30de1fSmrg echo m88k-dolphin-sysv3 5011a30de1fSmrg exit ;; 5021a30de1fSmrg M88*:*:R3*:*) 5031a30de1fSmrg # Delta 88k system running SVR3 5041a30de1fSmrg echo m88k-motorola-sysv3 5051a30de1fSmrg exit ;; 5061a30de1fSmrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 5071a30de1fSmrg echo m88k-tektronix-sysv3 5081a30de1fSmrg exit ;; 5091a30de1fSmrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 5101a30de1fSmrg echo m68k-tektronix-bsd 5111a30de1fSmrg exit ;; 5121a30de1fSmrg *:IRIX*:*:*) 5131a30de1fSmrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 5141a30de1fSmrg exit ;; 5151a30de1fSmrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 5161a30de1fSmrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 5171a30de1fSmrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 5181a30de1fSmrg i*86:AIX:*:*) 5191a30de1fSmrg echo i386-ibm-aix 5201a30de1fSmrg exit ;; 5211a30de1fSmrg ia64:AIX:*:*) 5221a30de1fSmrg if [ -x /usr/bin/oslevel ] ; then 5231a30de1fSmrg IBM_REV=`/usr/bin/oslevel` 5241a30de1fSmrg else 5251a30de1fSmrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 5261a30de1fSmrg fi 5271a30de1fSmrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 5281a30de1fSmrg exit ;; 5291a30de1fSmrg *:AIX:2:3) 5301a30de1fSmrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 5311a30de1fSmrg eval $set_cc_for_build 5321a30de1fSmrg sed 's/^ //' << EOF >$dummy.c 5331a30de1fSmrg #include <sys/systemcfg.h> 5341a30de1fSmrg 5351a30de1fSmrg main() 5361a30de1fSmrg { 5371a30de1fSmrg if (!__power_pc()) 5381a30de1fSmrg exit(1); 5391a30de1fSmrg puts("powerpc-ibm-aix3.2.5"); 5401a30de1fSmrg exit(0); 5411a30de1fSmrg } 5421a30de1fSmrgEOF 5431a30de1fSmrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 5441a30de1fSmrg then 5451a30de1fSmrg echo "$SYSTEM_NAME" 5461a30de1fSmrg else 5471a30de1fSmrg echo rs6000-ibm-aix3.2.5 5481a30de1fSmrg fi 5491a30de1fSmrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 5501a30de1fSmrg echo rs6000-ibm-aix3.2.4 5511a30de1fSmrg else 5521a30de1fSmrg echo rs6000-ibm-aix3.2 5531a30de1fSmrg fi 5541a30de1fSmrg exit ;; 555ce62200cSmrg *:AIX:*:[4567]) 5561a30de1fSmrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 5571a30de1fSmrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 5581a30de1fSmrg IBM_ARCH=rs6000 5591a30de1fSmrg else 5601a30de1fSmrg IBM_ARCH=powerpc 5611a30de1fSmrg fi 5621a30de1fSmrg if [ -x /usr/bin/oslevel ] ; then 5631a30de1fSmrg IBM_REV=`/usr/bin/oslevel` 5641a30de1fSmrg else 5651a30de1fSmrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 5661a30de1fSmrg fi 5671a30de1fSmrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 5681a30de1fSmrg exit ;; 5691a30de1fSmrg *:AIX:*:*) 5701a30de1fSmrg echo rs6000-ibm-aix 5711a30de1fSmrg exit ;; 5721a30de1fSmrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 5731a30de1fSmrg echo romp-ibm-bsd4.4 5741a30de1fSmrg exit ;; 5751a30de1fSmrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 5761a30de1fSmrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 5771a30de1fSmrg exit ;; # report: romp-ibm BSD 4.3 5781a30de1fSmrg *:BOSX:*:*) 5791a30de1fSmrg echo rs6000-bull-bosx 5801a30de1fSmrg exit ;; 5811a30de1fSmrg DPX/2?00:B.O.S.:*:*) 5821a30de1fSmrg echo m68k-bull-sysv3 5831a30de1fSmrg exit ;; 5841a30de1fSmrg 9000/[34]??:4.3bsd:1.*:*) 5851a30de1fSmrg echo m68k-hp-bsd 5861a30de1fSmrg exit ;; 5871a30de1fSmrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 5881a30de1fSmrg echo m68k-hp-bsd4.4 5891a30de1fSmrg exit ;; 5901a30de1fSmrg 9000/[34678]??:HP-UX:*:*) 5911a30de1fSmrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 5921a30de1fSmrg case "${UNAME_MACHINE}" in 5931a30de1fSmrg 9000/31? ) HP_ARCH=m68000 ;; 5941a30de1fSmrg 9000/[34]?? ) HP_ARCH=m68k ;; 5951a30de1fSmrg 9000/[678][0-9][0-9]) 5961a30de1fSmrg if [ -x /usr/bin/getconf ]; then 5971a30de1fSmrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 5981a30de1fSmrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 5991a30de1fSmrg case "${sc_cpu_version}" in 6001a30de1fSmrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 6011a30de1fSmrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 6021a30de1fSmrg 532) # CPU_PA_RISC2_0 6031a30de1fSmrg case "${sc_kernel_bits}" in 6041a30de1fSmrg 32) HP_ARCH="hppa2.0n" ;; 6051a30de1fSmrg 64) HP_ARCH="hppa2.0w" ;; 6061a30de1fSmrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 6071a30de1fSmrg esac ;; 6081a30de1fSmrg esac 6091a30de1fSmrg fi 6101a30de1fSmrg if [ "${HP_ARCH}" = "" ]; then 6111a30de1fSmrg eval $set_cc_for_build 6121a30de1fSmrg sed 's/^ //' << EOF >$dummy.c 6131a30de1fSmrg 6141a30de1fSmrg #define _HPUX_SOURCE 6151a30de1fSmrg #include <stdlib.h> 6161a30de1fSmrg #include <unistd.h> 6171a30de1fSmrg 6181a30de1fSmrg int main () 6191a30de1fSmrg { 6201a30de1fSmrg #if defined(_SC_KERNEL_BITS) 6211a30de1fSmrg long bits = sysconf(_SC_KERNEL_BITS); 6221a30de1fSmrg #endif 6231a30de1fSmrg long cpu = sysconf (_SC_CPU_VERSION); 6241a30de1fSmrg 6251a30de1fSmrg switch (cpu) 6261a30de1fSmrg { 6271a30de1fSmrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 6281a30de1fSmrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 6291a30de1fSmrg case CPU_PA_RISC2_0: 6301a30de1fSmrg #if defined(_SC_KERNEL_BITS) 6311a30de1fSmrg switch (bits) 6321a30de1fSmrg { 6331a30de1fSmrg case 64: puts ("hppa2.0w"); break; 6341a30de1fSmrg case 32: puts ("hppa2.0n"); break; 6351a30de1fSmrg default: puts ("hppa2.0"); break; 6361a30de1fSmrg } break; 6371a30de1fSmrg #else /* !defined(_SC_KERNEL_BITS) */ 6381a30de1fSmrg puts ("hppa2.0"); break; 6391a30de1fSmrg #endif 6401a30de1fSmrg default: puts ("hppa1.0"); break; 6411a30de1fSmrg } 6421a30de1fSmrg exit (0); 6431a30de1fSmrg } 6441a30de1fSmrgEOF 6451a30de1fSmrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 6461a30de1fSmrg test -z "$HP_ARCH" && HP_ARCH=hppa 6471a30de1fSmrg fi ;; 6481a30de1fSmrg esac 6491a30de1fSmrg if [ ${HP_ARCH} = "hppa2.0w" ] 6501a30de1fSmrg then 6511a30de1fSmrg eval $set_cc_for_build 6521a30de1fSmrg 6531a30de1fSmrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 6541a30de1fSmrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 6551a30de1fSmrg # generating 64-bit code. GNU and HP use different nomenclature: 6561a30de1fSmrg # 6571a30de1fSmrg # $ CC_FOR_BUILD=cc ./config.guess 6581a30de1fSmrg # => hppa2.0w-hp-hpux11.23 6591a30de1fSmrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 6601a30de1fSmrg # => hppa64-hp-hpux11.23 6611a30de1fSmrg 6621a30de1fSmrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 663ce62200cSmrg grep -q __LP64__ 6641a30de1fSmrg then 6651a30de1fSmrg HP_ARCH="hppa2.0w" 6661a30de1fSmrg else 6671a30de1fSmrg HP_ARCH="hppa64" 6681a30de1fSmrg fi 6691a30de1fSmrg fi 6701a30de1fSmrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 6711a30de1fSmrg exit ;; 6721a30de1fSmrg ia64:HP-UX:*:*) 6731a30de1fSmrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 6741a30de1fSmrg echo ia64-hp-hpux${HPUX_REV} 6751a30de1fSmrg exit ;; 6761a30de1fSmrg 3050*:HI-UX:*:*) 6771a30de1fSmrg eval $set_cc_for_build 6781a30de1fSmrg sed 's/^ //' << EOF >$dummy.c 6791a30de1fSmrg #include <unistd.h> 6801a30de1fSmrg int 6811a30de1fSmrg main () 6821a30de1fSmrg { 6831a30de1fSmrg long cpu = sysconf (_SC_CPU_VERSION); 6841a30de1fSmrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 6851a30de1fSmrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 6861a30de1fSmrg results, however. */ 6871a30de1fSmrg if (CPU_IS_PA_RISC (cpu)) 6881a30de1fSmrg { 6891a30de1fSmrg switch (cpu) 6901a30de1fSmrg { 6911a30de1fSmrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 6921a30de1fSmrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 6931a30de1fSmrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 6941a30de1fSmrg default: puts ("hppa-hitachi-hiuxwe2"); break; 6951a30de1fSmrg } 6961a30de1fSmrg } 6971a30de1fSmrg else if (CPU_IS_HP_MC68K (cpu)) 6981a30de1fSmrg puts ("m68k-hitachi-hiuxwe2"); 6991a30de1fSmrg else puts ("unknown-hitachi-hiuxwe2"); 7001a30de1fSmrg exit (0); 7011a30de1fSmrg } 7021a30de1fSmrgEOF 7031a30de1fSmrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 7041a30de1fSmrg { echo "$SYSTEM_NAME"; exit; } 7051a30de1fSmrg echo unknown-hitachi-hiuxwe2 7061a30de1fSmrg exit ;; 7071a30de1fSmrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 7081a30de1fSmrg echo hppa1.1-hp-bsd 7091a30de1fSmrg exit ;; 7101a30de1fSmrg 9000/8??:4.3bsd:*:*) 7111a30de1fSmrg echo hppa1.0-hp-bsd 7121a30de1fSmrg exit ;; 7131a30de1fSmrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 7141a30de1fSmrg echo hppa1.0-hp-mpeix 7151a30de1fSmrg exit ;; 7161a30de1fSmrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 7171a30de1fSmrg echo hppa1.1-hp-osf 7181a30de1fSmrg exit ;; 7191a30de1fSmrg hp8??:OSF1:*:*) 7201a30de1fSmrg echo hppa1.0-hp-osf 7211a30de1fSmrg exit ;; 7221a30de1fSmrg i*86:OSF1:*:*) 7231a30de1fSmrg if [ -x /usr/sbin/sysversion ] ; then 7241a30de1fSmrg echo ${UNAME_MACHINE}-unknown-osf1mk 7251a30de1fSmrg else 7261a30de1fSmrg echo ${UNAME_MACHINE}-unknown-osf1 7271a30de1fSmrg fi 7281a30de1fSmrg exit ;; 7291a30de1fSmrg parisc*:Lites*:*:*) 7301a30de1fSmrg echo hppa1.1-hp-lites 7311a30de1fSmrg exit ;; 7321a30de1fSmrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 7331a30de1fSmrg echo c1-convex-bsd 7341a30de1fSmrg exit ;; 7351a30de1fSmrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 7361a30de1fSmrg if getsysinfo -f scalar_acc 7371a30de1fSmrg then echo c32-convex-bsd 7381a30de1fSmrg else echo c2-convex-bsd 7391a30de1fSmrg fi 7401a30de1fSmrg exit ;; 7411a30de1fSmrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 7421a30de1fSmrg echo c34-convex-bsd 7431a30de1fSmrg exit ;; 7441a30de1fSmrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 7451a30de1fSmrg echo c38-convex-bsd 7461a30de1fSmrg exit ;; 7471a30de1fSmrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 7481a30de1fSmrg echo c4-convex-bsd 7491a30de1fSmrg exit ;; 7501a30de1fSmrg CRAY*Y-MP:*:*:*) 7511a30de1fSmrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7521a30de1fSmrg exit ;; 7531a30de1fSmrg CRAY*[A-Z]90:*:*:*) 7541a30de1fSmrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 7551a30de1fSmrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 7561a30de1fSmrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 7571a30de1fSmrg -e 's/\.[^.]*$/.X/' 7581a30de1fSmrg exit ;; 7591a30de1fSmrg CRAY*TS:*:*:*) 7601a30de1fSmrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7611a30de1fSmrg exit ;; 7621a30de1fSmrg CRAY*T3E:*:*:*) 7631a30de1fSmrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7641a30de1fSmrg exit ;; 7651a30de1fSmrg CRAY*SV1:*:*:*) 7661a30de1fSmrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7671a30de1fSmrg exit ;; 7681a30de1fSmrg *:UNICOS/mp:*:*) 7691a30de1fSmrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7701a30de1fSmrg exit ;; 7711a30de1fSmrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 7721a30de1fSmrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7731a30de1fSmrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 7741a30de1fSmrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 7751a30de1fSmrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 7761a30de1fSmrg exit ;; 7771a30de1fSmrg 5000:UNIX_System_V:4.*:*) 7781a30de1fSmrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 7791a30de1fSmrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 7801a30de1fSmrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 7811a30de1fSmrg exit ;; 7821a30de1fSmrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 7831a30de1fSmrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 7841a30de1fSmrg exit ;; 7851a30de1fSmrg sparc*:BSD/OS:*:*) 7861a30de1fSmrg echo sparc-unknown-bsdi${UNAME_RELEASE} 7871a30de1fSmrg exit ;; 7881a30de1fSmrg *:BSD/OS:*:*) 7891a30de1fSmrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 7901a30de1fSmrg exit ;; 7911a30de1fSmrg *:FreeBSD:*:*) 7921a30de1fSmrg case ${UNAME_MACHINE} in 7931a30de1fSmrg pc98) 7941a30de1fSmrg echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 7951a30de1fSmrg amd64) 7961a30de1fSmrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 7971a30de1fSmrg *) 7981a30de1fSmrg echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 7991a30de1fSmrg esac 8001a30de1fSmrg exit ;; 8011a30de1fSmrg i*:CYGWIN*:*) 8021a30de1fSmrg echo ${UNAME_MACHINE}-pc-cygwin 8031a30de1fSmrg exit ;; 804b7fb5eacSmrg *:MINGW*:*) 8051a30de1fSmrg echo ${UNAME_MACHINE}-pc-mingw32 8061a30de1fSmrg exit ;; 8071a30de1fSmrg i*:windows32*:*) 8081a30de1fSmrg # uname -m includes "-pc" on this system. 8091a30de1fSmrg echo ${UNAME_MACHINE}-mingw32 8101a30de1fSmrg exit ;; 8111a30de1fSmrg i*:PW*:*) 8121a30de1fSmrg echo ${UNAME_MACHINE}-pc-pw32 8131a30de1fSmrg exit ;; 814ce62200cSmrg *:Interix*:*) 815b7fb5eacSmrg case ${UNAME_MACHINE} in 816b7fb5eacSmrg x86) 817b7fb5eacSmrg echo i586-pc-interix${UNAME_RELEASE} 818b7fb5eacSmrg exit ;; 819ce62200cSmrg authenticamd | genuineintel | EM64T) 820b7fb5eacSmrg echo x86_64-unknown-interix${UNAME_RELEASE} 821b7fb5eacSmrg exit ;; 822b7fb5eacSmrg IA64) 823b7fb5eacSmrg echo ia64-unknown-interix${UNAME_RELEASE} 824b7fb5eacSmrg exit ;; 825b7fb5eacSmrg esac ;; 8261a30de1fSmrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 8271a30de1fSmrg echo i${UNAME_MACHINE}-pc-mks 8281a30de1fSmrg exit ;; 829ce62200cSmrg 8664:Windows_NT:*) 830ce62200cSmrg echo x86_64-pc-mks 831ce62200cSmrg exit ;; 8321a30de1fSmrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 8331a30de1fSmrg # How do we know it's Interix rather than the generic POSIX subsystem? 8341a30de1fSmrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 8351a30de1fSmrg # UNAME_MACHINE based on the output of uname instead of i386? 8361a30de1fSmrg echo i586-pc-interix 8371a30de1fSmrg exit ;; 8381a30de1fSmrg i*:UWIN*:*) 8391a30de1fSmrg echo ${UNAME_MACHINE}-pc-uwin 8401a30de1fSmrg exit ;; 8411a30de1fSmrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 8421a30de1fSmrg echo x86_64-unknown-cygwin 8431a30de1fSmrg exit ;; 8441a30de1fSmrg p*:CYGWIN*:*) 8451a30de1fSmrg echo powerpcle-unknown-cygwin 8461a30de1fSmrg exit ;; 8471a30de1fSmrg prep*:SunOS:5.*:*) 8481a30de1fSmrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 8491a30de1fSmrg exit ;; 8501a30de1fSmrg *:GNU:*:*) 8511a30de1fSmrg # the GNU system 8521a30de1fSmrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 8531a30de1fSmrg exit ;; 8541a30de1fSmrg *:GNU/*:*:*) 8551a30de1fSmrg # other systems with GNU libc and userland 8561a30de1fSmrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 8571a30de1fSmrg exit ;; 8581a30de1fSmrg i*86:Minix:*:*) 8591a30de1fSmrg echo ${UNAME_MACHINE}-pc-minix 8601a30de1fSmrg exit ;; 861ce62200cSmrg alpha:Linux:*:*) 862ce62200cSmrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 863ce62200cSmrg EV5) UNAME_MACHINE=alphaev5 ;; 864ce62200cSmrg EV56) UNAME_MACHINE=alphaev56 ;; 865ce62200cSmrg PCA56) UNAME_MACHINE=alphapca56 ;; 866ce62200cSmrg PCA57) UNAME_MACHINE=alphapca56 ;; 867ce62200cSmrg EV6) UNAME_MACHINE=alphaev6 ;; 868ce62200cSmrg EV67) UNAME_MACHINE=alphaev67 ;; 869ce62200cSmrg EV68*) UNAME_MACHINE=alphaev68 ;; 870ce62200cSmrg esac 871ce62200cSmrg objdump --private-headers /bin/sh | grep -q ld.so.1 872ce62200cSmrg if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 873ce62200cSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 874ce62200cSmrg exit ;; 8751a30de1fSmrg arm*:Linux:*:*) 876b7fb5eacSmrg eval $set_cc_for_build 877b7fb5eacSmrg if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 878b7fb5eacSmrg | grep -q __ARM_EABI__ 879b7fb5eacSmrg then 880b7fb5eacSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 881b7fb5eacSmrg else 882b7fb5eacSmrg echo ${UNAME_MACHINE}-unknown-linux-gnueabi 883b7fb5eacSmrg fi 8841a30de1fSmrg exit ;; 8851a30de1fSmrg avr32*:Linux:*:*) 8861a30de1fSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8871a30de1fSmrg exit ;; 8881a30de1fSmrg cris:Linux:*:*) 8891a30de1fSmrg echo cris-axis-linux-gnu 8901a30de1fSmrg exit ;; 8911a30de1fSmrg crisv32:Linux:*:*) 8921a30de1fSmrg echo crisv32-axis-linux-gnu 8931a30de1fSmrg exit ;; 8941a30de1fSmrg frv:Linux:*:*) 8951a30de1fSmrg echo frv-unknown-linux-gnu 8961a30de1fSmrg exit ;; 897ce62200cSmrg i*86:Linux:*:*) 898ce62200cSmrg LIBC=gnu 899ce62200cSmrg eval $set_cc_for_build 900ce62200cSmrg sed 's/^ //' << EOF >$dummy.c 901ce62200cSmrg #ifdef __dietlibc__ 902ce62200cSmrg LIBC=dietlibc 903ce62200cSmrg #endif 904ce62200cSmrgEOF 905ce62200cSmrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` 906ce62200cSmrg echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 907ce62200cSmrg exit ;; 9081a30de1fSmrg ia64:Linux:*:*) 9091a30de1fSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9101a30de1fSmrg exit ;; 9111a30de1fSmrg m32r*:Linux:*:*) 9121a30de1fSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9131a30de1fSmrg exit ;; 9141a30de1fSmrg m68*:Linux:*:*) 9151a30de1fSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9161a30de1fSmrg exit ;; 917ce62200cSmrg mips:Linux:*:* | mips64:Linux:*:*) 9181a30de1fSmrg eval $set_cc_for_build 9191a30de1fSmrg sed 's/^ //' << EOF >$dummy.c 9201a30de1fSmrg #undef CPU 921ce62200cSmrg #undef ${UNAME_MACHINE} 922ce62200cSmrg #undef ${UNAME_MACHINE}el 9231a30de1fSmrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 924ce62200cSmrg CPU=${UNAME_MACHINE}el 9251a30de1fSmrg #else 9261a30de1fSmrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 927ce62200cSmrg CPU=${UNAME_MACHINE} 9281a30de1fSmrg #else 9291a30de1fSmrg CPU= 9301a30de1fSmrg #endif 9311a30de1fSmrg #endif 9321a30de1fSmrgEOF 933ce62200cSmrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 9341a30de1fSmrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 9351a30de1fSmrg ;; 9361a30de1fSmrg or32:Linux:*:*) 9371a30de1fSmrg echo or32-unknown-linux-gnu 9381a30de1fSmrg exit ;; 939b7fb5eacSmrg padre:Linux:*:*) 940b7fb5eacSmrg echo sparc-unknown-linux-gnu 941b7fb5eacSmrg exit ;; 942ce62200cSmrg parisc64:Linux:*:* | hppa64:Linux:*:*) 943ce62200cSmrg echo hppa64-unknown-linux-gnu 944ce62200cSmrg exit ;; 9451a30de1fSmrg parisc:Linux:*:* | hppa:Linux:*:*) 9461a30de1fSmrg # Look for CPU level 9471a30de1fSmrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 9481a30de1fSmrg PA7*) echo hppa1.1-unknown-linux-gnu ;; 9491a30de1fSmrg PA8*) echo hppa2.0-unknown-linux-gnu ;; 9501a30de1fSmrg *) echo hppa-unknown-linux-gnu ;; 9511a30de1fSmrg esac 9521a30de1fSmrg exit ;; 953ce62200cSmrg ppc64:Linux:*:*) 954ce62200cSmrg echo powerpc64-unknown-linux-gnu 955ce62200cSmrg exit ;; 956ce62200cSmrg ppc:Linux:*:*) 957ce62200cSmrg echo powerpc-unknown-linux-gnu 9581a30de1fSmrg exit ;; 9591a30de1fSmrg s390:Linux:*:* | s390x:Linux:*:*) 9601a30de1fSmrg echo ${UNAME_MACHINE}-ibm-linux 9611a30de1fSmrg exit ;; 9621a30de1fSmrg sh64*:Linux:*:*) 9631a30de1fSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9641a30de1fSmrg exit ;; 9651a30de1fSmrg sh*:Linux:*:*) 9661a30de1fSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9671a30de1fSmrg exit ;; 9681a30de1fSmrg sparc:Linux:*:* | sparc64:Linux:*:*) 9691a30de1fSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9701a30de1fSmrg exit ;; 971ce62200cSmrg tile*:Linux:*:*) 972ce62200cSmrg echo ${UNAME_MACHINE}-tilera-linux-gnu 973ce62200cSmrg exit ;; 9741a30de1fSmrg vax:Linux:*:*) 9751a30de1fSmrg echo ${UNAME_MACHINE}-dec-linux-gnu 9761a30de1fSmrg exit ;; 9771a30de1fSmrg x86_64:Linux:*:*) 9781a30de1fSmrg echo x86_64-unknown-linux-gnu 9791a30de1fSmrg exit ;; 980b7fb5eacSmrg xtensa*:Linux:*:*) 981b7fb5eacSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 982b7fb5eacSmrg exit ;; 9831a30de1fSmrg i*86:DYNIX/ptx:4*:*) 9841a30de1fSmrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 9851a30de1fSmrg # earlier versions are messed up and put the nodename in both 9861a30de1fSmrg # sysname and nodename. 9871a30de1fSmrg echo i386-sequent-sysv4 9881a30de1fSmrg exit ;; 9891a30de1fSmrg i*86:UNIX_SV:4.2MP:2.*) 9901a30de1fSmrg # Unixware is an offshoot of SVR4, but it has its own version 9911a30de1fSmrg # number series starting with 2... 9921a30de1fSmrg # I am not positive that other SVR4 systems won't match this, 9931a30de1fSmrg # I just have to hope. -- rms. 9941a30de1fSmrg # Use sysv4.2uw... so that sysv4* matches it. 9951a30de1fSmrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 9961a30de1fSmrg exit ;; 9971a30de1fSmrg i*86:OS/2:*:*) 9981a30de1fSmrg # If we were able to find `uname', then EMX Unix compatibility 9991a30de1fSmrg # is probably installed. 10001a30de1fSmrg echo ${UNAME_MACHINE}-pc-os2-emx 10011a30de1fSmrg exit ;; 10021a30de1fSmrg i*86:XTS-300:*:STOP) 10031a30de1fSmrg echo ${UNAME_MACHINE}-unknown-stop 10041a30de1fSmrg exit ;; 10051a30de1fSmrg i*86:atheos:*:*) 10061a30de1fSmrg echo ${UNAME_MACHINE}-unknown-atheos 10071a30de1fSmrg exit ;; 10081a30de1fSmrg i*86:syllable:*:*) 10091a30de1fSmrg echo ${UNAME_MACHINE}-pc-syllable 10101a30de1fSmrg exit ;; 1011ce62200cSmrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 10121a30de1fSmrg echo i386-unknown-lynxos${UNAME_RELEASE} 10131a30de1fSmrg exit ;; 10141a30de1fSmrg i*86:*DOS:*:*) 10151a30de1fSmrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 10161a30de1fSmrg exit ;; 10171a30de1fSmrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 10181a30de1fSmrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 10191a30de1fSmrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 10201a30de1fSmrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 10211a30de1fSmrg else 10221a30de1fSmrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 10231a30de1fSmrg fi 10241a30de1fSmrg exit ;; 10251a30de1fSmrg i*86:*:5:[678]*) 10261a30de1fSmrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 10271a30de1fSmrg case `/bin/uname -X | grep "^Machine"` in 10281a30de1fSmrg *486*) UNAME_MACHINE=i486 ;; 10291a30de1fSmrg *Pentium) UNAME_MACHINE=i586 ;; 10301a30de1fSmrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 10311a30de1fSmrg esac 10321a30de1fSmrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 10331a30de1fSmrg exit ;; 10341a30de1fSmrg i*86:*:3.2:*) 10351a30de1fSmrg if test -f /usr/options/cb.name; then 10361a30de1fSmrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 10371a30de1fSmrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 10381a30de1fSmrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 10391a30de1fSmrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 10401a30de1fSmrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 10411a30de1fSmrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 10421a30de1fSmrg && UNAME_MACHINE=i586 10431a30de1fSmrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 10441a30de1fSmrg && UNAME_MACHINE=i686 10451a30de1fSmrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 10461a30de1fSmrg && UNAME_MACHINE=i686 10471a30de1fSmrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 10481a30de1fSmrg else 10491a30de1fSmrg echo ${UNAME_MACHINE}-pc-sysv32 10501a30de1fSmrg fi 10511a30de1fSmrg exit ;; 10521a30de1fSmrg pc:*:*:*) 10531a30de1fSmrg # Left here for compatibility: 10541a30de1fSmrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 1055b7fb5eacSmrg # the processor, so we play safe by assuming i586. 1056b7fb5eacSmrg # Note: whatever this is, it MUST be the same as what config.sub 1057b7fb5eacSmrg # prints for the "djgpp" host, or else GDB configury will decide that 1058b7fb5eacSmrg # this is a cross-build. 1059b7fb5eacSmrg echo i586-pc-msdosdjgpp 10601a30de1fSmrg exit ;; 10611a30de1fSmrg Intel:Mach:3*:*) 10621a30de1fSmrg echo i386-pc-mach3 10631a30de1fSmrg exit ;; 10641a30de1fSmrg paragon:*:*:*) 10651a30de1fSmrg echo i860-intel-osf1 10661a30de1fSmrg exit ;; 10671a30de1fSmrg i860:*:4.*:*) # i860-SVR4 10681a30de1fSmrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 10691a30de1fSmrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 10701a30de1fSmrg else # Add other i860-SVR4 vendors below as they are discovered. 10711a30de1fSmrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 10721a30de1fSmrg fi 10731a30de1fSmrg exit ;; 10741a30de1fSmrg mini*:CTIX:SYS*5:*) 10751a30de1fSmrg # "miniframe" 10761a30de1fSmrg echo m68010-convergent-sysv 10771a30de1fSmrg exit ;; 10781a30de1fSmrg mc68k:UNIX:SYSTEM5:3.51m) 10791a30de1fSmrg echo m68k-convergent-sysv 10801a30de1fSmrg exit ;; 10811a30de1fSmrg M680?0:D-NIX:5.3:*) 10821a30de1fSmrg echo m68k-diab-dnix 10831a30de1fSmrg exit ;; 10841a30de1fSmrg M68*:*:R3V[5678]*:*) 10851a30de1fSmrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 10861a30de1fSmrg 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) 10871a30de1fSmrg OS_REL='' 10881a30de1fSmrg test -r /etc/.relid \ 10891a30de1fSmrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 10901a30de1fSmrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 10911a30de1fSmrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 10921a30de1fSmrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 10931a30de1fSmrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 10941a30de1fSmrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 10951a30de1fSmrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 10961a30de1fSmrg && { echo i486-ncr-sysv4; exit; } ;; 1097b7fb5eacSmrg NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1098b7fb5eacSmrg OS_REL='.3' 1099b7fb5eacSmrg test -r /etc/.relid \ 1100b7fb5eacSmrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1101b7fb5eacSmrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1102b7fb5eacSmrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1103b7fb5eacSmrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1104b7fb5eacSmrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1105b7fb5eacSmrg /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1106b7fb5eacSmrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 11071a30de1fSmrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 11081a30de1fSmrg echo m68k-unknown-lynxos${UNAME_RELEASE} 11091a30de1fSmrg exit ;; 11101a30de1fSmrg mc68030:UNIX_System_V:4.*:*) 11111a30de1fSmrg echo m68k-atari-sysv4 11121a30de1fSmrg exit ;; 11131a30de1fSmrg TSUNAMI:LynxOS:2.*:*) 11141a30de1fSmrg echo sparc-unknown-lynxos${UNAME_RELEASE} 11151a30de1fSmrg exit ;; 11161a30de1fSmrg rs6000:LynxOS:2.*:*) 11171a30de1fSmrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 11181a30de1fSmrg exit ;; 1119ce62200cSmrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 11201a30de1fSmrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 11211a30de1fSmrg exit ;; 11221a30de1fSmrg SM[BE]S:UNIX_SV:*:*) 11231a30de1fSmrg echo mips-dde-sysv${UNAME_RELEASE} 11241a30de1fSmrg exit ;; 11251a30de1fSmrg RM*:ReliantUNIX-*:*:*) 11261a30de1fSmrg echo mips-sni-sysv4 11271a30de1fSmrg exit ;; 11281a30de1fSmrg RM*:SINIX-*:*:*) 11291a30de1fSmrg echo mips-sni-sysv4 11301a30de1fSmrg exit ;; 11311a30de1fSmrg *:SINIX-*:*:*) 11321a30de1fSmrg if uname -p 2>/dev/null >/dev/null ; then 11331a30de1fSmrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 11341a30de1fSmrg echo ${UNAME_MACHINE}-sni-sysv4 11351a30de1fSmrg else 11361a30de1fSmrg echo ns32k-sni-sysv 11371a30de1fSmrg fi 11381a30de1fSmrg exit ;; 11391a30de1fSmrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 11401a30de1fSmrg # says <Richard.M.Bartel@ccMail.Census.GOV> 11411a30de1fSmrg echo i586-unisys-sysv4 11421a30de1fSmrg exit ;; 11431a30de1fSmrg *:UNIX_System_V:4*:FTX*) 11441a30de1fSmrg # From Gerald Hewes <hewes@openmarket.com>. 11451a30de1fSmrg # How about differentiating between stratus architectures? -djm 11461a30de1fSmrg echo hppa1.1-stratus-sysv4 11471a30de1fSmrg exit ;; 11481a30de1fSmrg *:*:*:FTX*) 11491a30de1fSmrg # From seanf@swdc.stratus.com. 11501a30de1fSmrg echo i860-stratus-sysv4 11511a30de1fSmrg exit ;; 11521a30de1fSmrg i*86:VOS:*:*) 11531a30de1fSmrg # From Paul.Green@stratus.com. 11541a30de1fSmrg echo ${UNAME_MACHINE}-stratus-vos 11551a30de1fSmrg exit ;; 11561a30de1fSmrg *:VOS:*:*) 11571a30de1fSmrg # From Paul.Green@stratus.com. 11581a30de1fSmrg echo hppa1.1-stratus-vos 11591a30de1fSmrg exit ;; 11601a30de1fSmrg mc68*:A/UX:*:*) 11611a30de1fSmrg echo m68k-apple-aux${UNAME_RELEASE} 11621a30de1fSmrg exit ;; 11631a30de1fSmrg news*:NEWS-OS:6*:*) 11641a30de1fSmrg echo mips-sony-newsos6 11651a30de1fSmrg exit ;; 11661a30de1fSmrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 11671a30de1fSmrg if [ -d /usr/nec ]; then 11681a30de1fSmrg echo mips-nec-sysv${UNAME_RELEASE} 11691a30de1fSmrg else 11701a30de1fSmrg echo mips-unknown-sysv${UNAME_RELEASE} 11711a30de1fSmrg fi 11721a30de1fSmrg exit ;; 11731a30de1fSmrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 11741a30de1fSmrg echo powerpc-be-beos 11751a30de1fSmrg exit ;; 11761a30de1fSmrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 11771a30de1fSmrg echo powerpc-apple-beos 11781a30de1fSmrg exit ;; 11791a30de1fSmrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 11801a30de1fSmrg echo i586-pc-beos 11811a30de1fSmrg exit ;; 1182b7fb5eacSmrg BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1183b7fb5eacSmrg echo i586-pc-haiku 1184b7fb5eacSmrg exit ;; 11851a30de1fSmrg SX-4:SUPER-UX:*:*) 11861a30de1fSmrg echo sx4-nec-superux${UNAME_RELEASE} 11871a30de1fSmrg exit ;; 11881a30de1fSmrg SX-5:SUPER-UX:*:*) 11891a30de1fSmrg echo sx5-nec-superux${UNAME_RELEASE} 11901a30de1fSmrg exit ;; 11911a30de1fSmrg SX-6:SUPER-UX:*:*) 11921a30de1fSmrg echo sx6-nec-superux${UNAME_RELEASE} 11931a30de1fSmrg exit ;; 1194b7fb5eacSmrg SX-7:SUPER-UX:*:*) 1195b7fb5eacSmrg echo sx7-nec-superux${UNAME_RELEASE} 1196b7fb5eacSmrg exit ;; 1197b7fb5eacSmrg SX-8:SUPER-UX:*:*) 1198b7fb5eacSmrg echo sx8-nec-superux${UNAME_RELEASE} 1199b7fb5eacSmrg exit ;; 1200b7fb5eacSmrg SX-8R:SUPER-UX:*:*) 1201b7fb5eacSmrg echo sx8r-nec-superux${UNAME_RELEASE} 1202b7fb5eacSmrg exit ;; 12031a30de1fSmrg Power*:Rhapsody:*:*) 12041a30de1fSmrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 12051a30de1fSmrg exit ;; 12061a30de1fSmrg *:Rhapsody:*:*) 12071a30de1fSmrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 12081a30de1fSmrg exit ;; 12091a30de1fSmrg *:Darwin:*:*) 12101a30de1fSmrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 12111a30de1fSmrg case $UNAME_PROCESSOR in 1212ce62200cSmrg i386) 1213ce62200cSmrg eval $set_cc_for_build 1214ce62200cSmrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1215ce62200cSmrg if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1216ce62200cSmrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1217ce62200cSmrg grep IS_64BIT_ARCH >/dev/null 1218ce62200cSmrg then 1219ce62200cSmrg UNAME_PROCESSOR="x86_64" 1220ce62200cSmrg fi 1221ce62200cSmrg fi ;; 12221a30de1fSmrg unknown) UNAME_PROCESSOR=powerpc ;; 12231a30de1fSmrg esac 12241a30de1fSmrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 12251a30de1fSmrg exit ;; 12261a30de1fSmrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 12271a30de1fSmrg UNAME_PROCESSOR=`uname -p` 12281a30de1fSmrg if test "$UNAME_PROCESSOR" = "x86"; then 12291a30de1fSmrg UNAME_PROCESSOR=i386 12301a30de1fSmrg UNAME_MACHINE=pc 12311a30de1fSmrg fi 12321a30de1fSmrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 12331a30de1fSmrg exit ;; 12341a30de1fSmrg *:QNX:*:4*) 12351a30de1fSmrg echo i386-pc-qnx 12361a30de1fSmrg exit ;; 12371a30de1fSmrg NSE-?:NONSTOP_KERNEL:*:*) 12381a30de1fSmrg echo nse-tandem-nsk${UNAME_RELEASE} 12391a30de1fSmrg exit ;; 12401a30de1fSmrg NSR-?:NONSTOP_KERNEL:*:*) 12411a30de1fSmrg echo nsr-tandem-nsk${UNAME_RELEASE} 12421a30de1fSmrg exit ;; 12431a30de1fSmrg *:NonStop-UX:*:*) 12441a30de1fSmrg echo mips-compaq-nonstopux 12451a30de1fSmrg exit ;; 12461a30de1fSmrg BS2000:POSIX*:*:*) 12471a30de1fSmrg echo bs2000-siemens-sysv 12481a30de1fSmrg exit ;; 12491a30de1fSmrg DS/*:UNIX_System_V:*:*) 12501a30de1fSmrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 12511a30de1fSmrg exit ;; 12521a30de1fSmrg *:Plan9:*:*) 12531a30de1fSmrg # "uname -m" is not consistent, so use $cputype instead. 386 12541a30de1fSmrg # is converted to i386 for consistency with other x86 12551a30de1fSmrg # operating systems. 12561a30de1fSmrg if test "$cputype" = "386"; then 12571a30de1fSmrg UNAME_MACHINE=i386 12581a30de1fSmrg else 12591a30de1fSmrg UNAME_MACHINE="$cputype" 12601a30de1fSmrg fi 12611a30de1fSmrg echo ${UNAME_MACHINE}-unknown-plan9 12621a30de1fSmrg exit ;; 12631a30de1fSmrg *:TOPS-10:*:*) 12641a30de1fSmrg echo pdp10-unknown-tops10 12651a30de1fSmrg exit ;; 12661a30de1fSmrg *:TENEX:*:*) 12671a30de1fSmrg echo pdp10-unknown-tenex 12681a30de1fSmrg exit ;; 12691a30de1fSmrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 12701a30de1fSmrg echo pdp10-dec-tops20 12711a30de1fSmrg exit ;; 12721a30de1fSmrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 12731a30de1fSmrg echo pdp10-xkl-tops20 12741a30de1fSmrg exit ;; 12751a30de1fSmrg *:TOPS-20:*:*) 12761a30de1fSmrg echo pdp10-unknown-tops20 12771a30de1fSmrg exit ;; 12781a30de1fSmrg *:ITS:*:*) 12791a30de1fSmrg echo pdp10-unknown-its 12801a30de1fSmrg exit ;; 12811a30de1fSmrg SEI:*:*:SEIUX) 12821a30de1fSmrg echo mips-sei-seiux${UNAME_RELEASE} 12831a30de1fSmrg exit ;; 12841a30de1fSmrg *:DragonFly:*:*) 12851a30de1fSmrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 12861a30de1fSmrg exit ;; 12871a30de1fSmrg *:*VMS:*:*) 12881a30de1fSmrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 12891a30de1fSmrg case "${UNAME_MACHINE}" in 12901a30de1fSmrg A*) echo alpha-dec-vms ; exit ;; 12911a30de1fSmrg I*) echo ia64-dec-vms ; exit ;; 12921a30de1fSmrg V*) echo vax-dec-vms ; exit ;; 12931a30de1fSmrg esac ;; 12941a30de1fSmrg *:XENIX:*:SysV) 12951a30de1fSmrg echo i386-pc-xenix 12961a30de1fSmrg exit ;; 12971a30de1fSmrg i*86:skyos:*:*) 12981a30de1fSmrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 12991a30de1fSmrg exit ;; 13001a30de1fSmrg i*86:rdos:*:*) 13011a30de1fSmrg echo ${UNAME_MACHINE}-pc-rdos 13021a30de1fSmrg exit ;; 1303b7fb5eacSmrg i*86:AROS:*:*) 1304b7fb5eacSmrg echo ${UNAME_MACHINE}-pc-aros 1305b7fb5eacSmrg exit ;; 13061a30de1fSmrgesac 13071a30de1fSmrg 13081a30de1fSmrg#echo '(No uname command or uname output not recognized.)' 1>&2 13091a30de1fSmrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 13101a30de1fSmrg 13111a30de1fSmrgeval $set_cc_for_build 13121a30de1fSmrgcat >$dummy.c <<EOF 13131a30de1fSmrg#ifdef _SEQUENT_ 13141a30de1fSmrg# include <sys/types.h> 13151a30de1fSmrg# include <sys/utsname.h> 13161a30de1fSmrg#endif 13171a30de1fSmrgmain () 13181a30de1fSmrg{ 13191a30de1fSmrg#if defined (sony) 13201a30de1fSmrg#if defined (MIPSEB) 13211a30de1fSmrg /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 13221a30de1fSmrg I don't know.... */ 13231a30de1fSmrg printf ("mips-sony-bsd\n"); exit (0); 13241a30de1fSmrg#else 13251a30de1fSmrg#include <sys/param.h> 13261a30de1fSmrg printf ("m68k-sony-newsos%s\n", 13271a30de1fSmrg#ifdef NEWSOS4 13281a30de1fSmrg "4" 13291a30de1fSmrg#else 13301a30de1fSmrg "" 13311a30de1fSmrg#endif 13321a30de1fSmrg ); exit (0); 13331a30de1fSmrg#endif 13341a30de1fSmrg#endif 13351a30de1fSmrg 13361a30de1fSmrg#if defined (__arm) && defined (__acorn) && defined (__unix) 13371a30de1fSmrg printf ("arm-acorn-riscix\n"); exit (0); 13381a30de1fSmrg#endif 13391a30de1fSmrg 13401a30de1fSmrg#if defined (hp300) && !defined (hpux) 13411a30de1fSmrg printf ("m68k-hp-bsd\n"); exit (0); 13421a30de1fSmrg#endif 13431a30de1fSmrg 13441a30de1fSmrg#if defined (NeXT) 13451a30de1fSmrg#if !defined (__ARCHITECTURE__) 13461a30de1fSmrg#define __ARCHITECTURE__ "m68k" 13471a30de1fSmrg#endif 13481a30de1fSmrg int version; 13491a30de1fSmrg version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 13501a30de1fSmrg if (version < 4) 13511a30de1fSmrg printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 13521a30de1fSmrg else 13531a30de1fSmrg printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 13541a30de1fSmrg exit (0); 13551a30de1fSmrg#endif 13561a30de1fSmrg 13571a30de1fSmrg#if defined (MULTIMAX) || defined (n16) 13581a30de1fSmrg#if defined (UMAXV) 13591a30de1fSmrg printf ("ns32k-encore-sysv\n"); exit (0); 13601a30de1fSmrg#else 13611a30de1fSmrg#if defined (CMU) 13621a30de1fSmrg printf ("ns32k-encore-mach\n"); exit (0); 13631a30de1fSmrg#else 13641a30de1fSmrg printf ("ns32k-encore-bsd\n"); exit (0); 13651a30de1fSmrg#endif 13661a30de1fSmrg#endif 13671a30de1fSmrg#endif 13681a30de1fSmrg 13691a30de1fSmrg#if defined (__386BSD__) 13701a30de1fSmrg printf ("i386-pc-bsd\n"); exit (0); 13711a30de1fSmrg#endif 13721a30de1fSmrg 13731a30de1fSmrg#if defined (sequent) 13741a30de1fSmrg#if defined (i386) 13751a30de1fSmrg printf ("i386-sequent-dynix\n"); exit (0); 13761a30de1fSmrg#endif 13771a30de1fSmrg#if defined (ns32000) 13781a30de1fSmrg printf ("ns32k-sequent-dynix\n"); exit (0); 13791a30de1fSmrg#endif 13801a30de1fSmrg#endif 13811a30de1fSmrg 13821a30de1fSmrg#if defined (_SEQUENT_) 13831a30de1fSmrg struct utsname un; 13841a30de1fSmrg 13851a30de1fSmrg uname(&un); 13861a30de1fSmrg 13871a30de1fSmrg if (strncmp(un.version, "V2", 2) == 0) { 13881a30de1fSmrg printf ("i386-sequent-ptx2\n"); exit (0); 13891a30de1fSmrg } 13901a30de1fSmrg if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 13911a30de1fSmrg printf ("i386-sequent-ptx1\n"); exit (0); 13921a30de1fSmrg } 13931a30de1fSmrg printf ("i386-sequent-ptx\n"); exit (0); 13941a30de1fSmrg 13951a30de1fSmrg#endif 13961a30de1fSmrg 13971a30de1fSmrg#if defined (vax) 13981a30de1fSmrg# if !defined (ultrix) 13991a30de1fSmrg# include <sys/param.h> 14001a30de1fSmrg# if defined (BSD) 14011a30de1fSmrg# if BSD == 43 14021a30de1fSmrg printf ("vax-dec-bsd4.3\n"); exit (0); 14031a30de1fSmrg# else 14041a30de1fSmrg# if BSD == 199006 14051a30de1fSmrg printf ("vax-dec-bsd4.3reno\n"); exit (0); 14061a30de1fSmrg# else 14071a30de1fSmrg printf ("vax-dec-bsd\n"); exit (0); 14081a30de1fSmrg# endif 14091a30de1fSmrg# endif 14101a30de1fSmrg# else 14111a30de1fSmrg printf ("vax-dec-bsd\n"); exit (0); 14121a30de1fSmrg# endif 14131a30de1fSmrg# else 14141a30de1fSmrg printf ("vax-dec-ultrix\n"); exit (0); 14151a30de1fSmrg# endif 14161a30de1fSmrg#endif 14171a30de1fSmrg 14181a30de1fSmrg#if defined (alliant) && defined (i860) 14191a30de1fSmrg printf ("i860-alliant-bsd\n"); exit (0); 14201a30de1fSmrg#endif 14211a30de1fSmrg 14221a30de1fSmrg exit (1); 14231a30de1fSmrg} 14241a30de1fSmrgEOF 14251a30de1fSmrg 14261a30de1fSmrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 14271a30de1fSmrg { echo "$SYSTEM_NAME"; exit; } 14281a30de1fSmrg 14291a30de1fSmrg# Apollos put the system type in the environment. 14301a30de1fSmrg 14311a30de1fSmrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 14321a30de1fSmrg 14331a30de1fSmrg# Convex versions that predate uname can use getsysinfo(1) 14341a30de1fSmrg 14351a30de1fSmrgif [ -x /usr/convex/getsysinfo ] 14361a30de1fSmrgthen 14371a30de1fSmrg case `getsysinfo -f cpu_type` in 14381a30de1fSmrg c1*) 14391a30de1fSmrg echo c1-convex-bsd 14401a30de1fSmrg exit ;; 14411a30de1fSmrg c2*) 14421a30de1fSmrg if getsysinfo -f scalar_acc 14431a30de1fSmrg then echo c32-convex-bsd 14441a30de1fSmrg else echo c2-convex-bsd 14451a30de1fSmrg fi 14461a30de1fSmrg exit ;; 14471a30de1fSmrg c34*) 14481a30de1fSmrg echo c34-convex-bsd 14491a30de1fSmrg exit ;; 14501a30de1fSmrg c38*) 14511a30de1fSmrg echo c38-convex-bsd 14521a30de1fSmrg exit ;; 14531a30de1fSmrg c4*) 14541a30de1fSmrg echo c4-convex-bsd 14551a30de1fSmrg exit ;; 14561a30de1fSmrg esac 14571a30de1fSmrgfi 14581a30de1fSmrg 14591a30de1fSmrgcat >&2 <<EOF 14601a30de1fSmrg$0: unable to guess system type 14611a30de1fSmrg 14621a30de1fSmrgThis script, last modified $timestamp, has failed to recognize 14631a30de1fSmrgthe operating system you are using. It is advised that you 14641a30de1fSmrgdownload the most up to date version of the config scripts from 14651a30de1fSmrg 1466b7fb5eacSmrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 14671a30de1fSmrgand 1468b7fb5eacSmrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 14691a30de1fSmrg 14701a30de1fSmrgIf the version you run ($0) is already up to date, please 14711a30de1fSmrgsend the following data and any information you think might be 14721a30de1fSmrgpertinent to <config-patches@gnu.org> in order to provide the needed 14731a30de1fSmrginformation to handle your system. 14741a30de1fSmrg 14751a30de1fSmrgconfig.guess timestamp = $timestamp 14761a30de1fSmrg 14771a30de1fSmrguname -m = `(uname -m) 2>/dev/null || echo unknown` 14781a30de1fSmrguname -r = `(uname -r) 2>/dev/null || echo unknown` 14791a30de1fSmrguname -s = `(uname -s) 2>/dev/null || echo unknown` 14801a30de1fSmrguname -v = `(uname -v) 2>/dev/null || echo unknown` 14811a30de1fSmrg 14821a30de1fSmrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 14831a30de1fSmrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 14841a30de1fSmrg 14851a30de1fSmrghostinfo = `(hostinfo) 2>/dev/null` 14861a30de1fSmrg/bin/universe = `(/bin/universe) 2>/dev/null` 14871a30de1fSmrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 14881a30de1fSmrg/bin/arch = `(/bin/arch) 2>/dev/null` 14891a30de1fSmrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 14901a30de1fSmrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 14911a30de1fSmrg 14921a30de1fSmrgUNAME_MACHINE = ${UNAME_MACHINE} 14931a30de1fSmrgUNAME_RELEASE = ${UNAME_RELEASE} 14941a30de1fSmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 14951a30de1fSmrgUNAME_VERSION = ${UNAME_VERSION} 14961a30de1fSmrgEOF 14971a30de1fSmrg 14981a30de1fSmrgexit 1 14991a30de1fSmrg 15001a30de1fSmrg# Local variables: 15011a30de1fSmrg# eval: (add-hook 'write-file-hooks 'time-stamp) 15021a30de1fSmrg# time-stamp-start: "timestamp='" 15031a30de1fSmrg# time-stamp-format: "%:y-%02m-%02d" 15041a30de1fSmrg# time-stamp-end: "'" 15051a30de1fSmrg# End: 1506