17cf0acd0Smrg#! /bin/sh 27cf0acd0Smrg# Attempt to guess a canonical system name. 37cf0acd0Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 47cf0acd0Smrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 57cf0acd0Smrg# Free Software Foundation, Inc. 67cf0acd0Smrg 77cf0acd0Smrgtimestamp='2010-08-21' 87cf0acd0Smrg 97cf0acd0Smrg# This file is free software; you can redistribute it and/or modify it 107cf0acd0Smrg# under the terms of the GNU General Public License as published by 117cf0acd0Smrg# the Free Software Foundation; either version 2 of the License, or 127cf0acd0Smrg# (at your option) any later version. 137cf0acd0Smrg# 147cf0acd0Smrg# This program is distributed in the hope that it will be useful, but 157cf0acd0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 167cf0acd0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 177cf0acd0Smrg# General Public License for more details. 187cf0acd0Smrg# 197cf0acd0Smrg# You should have received a copy of the GNU General Public License 207cf0acd0Smrg# along with this program; if not, write to the Free Software 217cf0acd0Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 227cf0acd0Smrg# 02110-1301, USA. 237cf0acd0Smrg# 247cf0acd0Smrg# As a special exception to the GNU General Public License, if you 257cf0acd0Smrg# distribute this file as part of a program that contains a 267cf0acd0Smrg# configuration script generated by Autoconf, you may include it under 277cf0acd0Smrg# the same distribution terms that you use for the rest of that program. 287cf0acd0Smrg 297cf0acd0Smrg 307cf0acd0Smrg# Originally written by Per Bothner. Please send patches (context 317cf0acd0Smrg# diff format) to <config-patches@gnu.org> and include a ChangeLog 327cf0acd0Smrg# entry. 337cf0acd0Smrg# 347cf0acd0Smrg# This script attempts to guess a canonical system name similar to 357cf0acd0Smrg# config.sub. If it succeeds, it prints the system name on stdout, and 367cf0acd0Smrg# exits with 0. Otherwise, it exits with 1. 377cf0acd0Smrg# 387cf0acd0Smrg# You can get the latest version of this script from: 397cf0acd0Smrg# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 407cf0acd0Smrg 417cf0acd0Smrgme=`echo "$0" | sed -e 's,.*/,,'` 427cf0acd0Smrg 437cf0acd0Smrgusage="\ 447cf0acd0SmrgUsage: $0 [OPTION] 457cf0acd0Smrg 467cf0acd0SmrgOutput the configuration name of the system \`$me' is run on. 477cf0acd0Smrg 487cf0acd0SmrgOperation modes: 497cf0acd0Smrg -h, --help print this help, then exit 507cf0acd0Smrg -t, --time-stamp print date of last modification, then exit 517cf0acd0Smrg -v, --version print version number, then exit 527cf0acd0Smrg 537cf0acd0SmrgReport bugs and patches to <config-patches@gnu.org>." 547cf0acd0Smrg 557cf0acd0Smrgversion="\ 567cf0acd0SmrgGNU config.guess ($timestamp) 577cf0acd0Smrg 587cf0acd0SmrgOriginally written by Per Bothner. 597cf0acd0SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 607cf0acd0Smrg2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 617cf0acd0SmrgSoftware Foundation, Inc. 627cf0acd0Smrg 637cf0acd0SmrgThis is free software; see the source for copying conditions. There is NO 647cf0acd0Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 657cf0acd0Smrg 667cf0acd0Smrghelp=" 677cf0acd0SmrgTry \`$me --help' for more information." 687cf0acd0Smrg 697cf0acd0Smrg# Parse command line 707cf0acd0Smrgwhile test $# -gt 0 ; do 717cf0acd0Smrg case $1 in 727cf0acd0Smrg --time-stamp | --time* | -t ) 737cf0acd0Smrg echo "$timestamp" ; exit ;; 747cf0acd0Smrg --version | -v ) 757cf0acd0Smrg echo "$version" ; exit ;; 767cf0acd0Smrg --help | --h* | -h ) 777cf0acd0Smrg echo "$usage"; exit ;; 787cf0acd0Smrg -- ) # Stop option processing 797cf0acd0Smrg shift; break ;; 807cf0acd0Smrg - ) # Use stdin as input. 817cf0acd0Smrg break ;; 827cf0acd0Smrg -* ) 837cf0acd0Smrg echo "$me: invalid option $1$help" >&2 847cf0acd0Smrg exit 1 ;; 857cf0acd0Smrg * ) 867cf0acd0Smrg break ;; 877cf0acd0Smrg esac 887cf0acd0Smrgdone 897cf0acd0Smrg 907cf0acd0Smrgif test $# != 0; then 917cf0acd0Smrg echo "$me: too many arguments$help" >&2 927cf0acd0Smrg exit 1 937cf0acd0Smrgfi 947cf0acd0Smrg 957cf0acd0Smrgtrap 'exit 1' HUP INT TERM 967cf0acd0Smrg 977cf0acd0Smrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 987cf0acd0Smrg# compiler to aid in system detection is discouraged as it requires 997cf0acd0Smrg# temporary files to be created and, as you can see below, it is a 1007cf0acd0Smrg# headache to deal with in a portable fashion. 1017cf0acd0Smrg 1027cf0acd0Smrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 1037cf0acd0Smrg# use `HOST_CC' if defined, but it is deprecated. 1047cf0acd0Smrg 1057cf0acd0Smrg# Portable tmp directory creation inspired by the Autoconf team. 1067cf0acd0Smrg 1077cf0acd0Smrgset_cc_for_build=' 1087cf0acd0Smrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 1097cf0acd0Smrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ; 1107cf0acd0Smrg: ${TMPDIR=/tmp} ; 1117cf0acd0Smrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 1127cf0acd0Smrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 1137cf0acd0Smrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 1147cf0acd0Smrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 1157cf0acd0Smrgdummy=$tmp/dummy ; 1167cf0acd0Smrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 1177cf0acd0Smrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 1187cf0acd0Smrg ,,) echo "int x;" > $dummy.c ; 1197cf0acd0Smrg for c in cc gcc c89 c99 ; do 1207cf0acd0Smrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 1217cf0acd0Smrg CC_FOR_BUILD="$c"; break ; 1227cf0acd0Smrg fi ; 1237cf0acd0Smrg done ; 1247cf0acd0Smrg if test x"$CC_FOR_BUILD" = x ; then 1257cf0acd0Smrg CC_FOR_BUILD=no_compiler_found ; 1267cf0acd0Smrg fi 1277cf0acd0Smrg ;; 1287cf0acd0Smrg ,,*) CC_FOR_BUILD=$CC ;; 1297cf0acd0Smrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 1307cf0acd0Smrgesac ; set_cc_for_build= ;' 1317cf0acd0Smrg 1327cf0acd0Smrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 1337cf0acd0Smrg# (ghazi@noc.rutgers.edu 1994-08-24) 1347cf0acd0Smrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 1357cf0acd0Smrg PATH=$PATH:/.attbin ; export PATH 1367cf0acd0Smrgfi 1377cf0acd0Smrg 1387cf0acd0SmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 1397cf0acd0SmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 1407cf0acd0SmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 1417cf0acd0SmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 1427cf0acd0Smrg 1437cf0acd0Smrg# Note: order is significant - the case branches are not exclusive. 1447cf0acd0Smrg 1457cf0acd0Smrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 1467cf0acd0Smrg *:NetBSD:*:*) 1477cf0acd0Smrg # NetBSD (nbsd) targets should (where applicable) match one or 1487cf0acd0Smrg # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 1497cf0acd0Smrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 1507cf0acd0Smrg # switched to ELF, *-*-netbsd* would select the old 1517cf0acd0Smrg # object file format. This provides both forward 1527cf0acd0Smrg # compatibility and a consistent mechanism for selecting the 1537cf0acd0Smrg # object file format. 1547cf0acd0Smrg # 1557cf0acd0Smrg # Note: NetBSD doesn't particularly care about the vendor 1567cf0acd0Smrg # portion of the name. We always set it to "unknown". 1577cf0acd0Smrg sysctl="sysctl -n hw.machine_arch" 1587cf0acd0Smrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 1597cf0acd0Smrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 1607cf0acd0Smrg case "${UNAME_MACHINE_ARCH}" in 1617cf0acd0Smrg armeb) machine=armeb-unknown ;; 1627cf0acd0Smrg arm*) machine=arm-unknown ;; 1637cf0acd0Smrg sh3el) machine=shl-unknown ;; 1647cf0acd0Smrg sh3eb) machine=sh-unknown ;; 1657cf0acd0Smrg sh5el) machine=sh5le-unknown ;; 1667cf0acd0Smrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 1677cf0acd0Smrg esac 1687cf0acd0Smrg # The Operating System including object format, if it has switched 1697cf0acd0Smrg # to ELF recently, or will in the future. 1707cf0acd0Smrg case "${UNAME_MACHINE_ARCH}" in 1717cf0acd0Smrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 1727cf0acd0Smrg eval $set_cc_for_build 1737cf0acd0Smrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 1747cf0acd0Smrg | grep -q __ELF__ 1757cf0acd0Smrg then 1767cf0acd0Smrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 1777cf0acd0Smrg # Return netbsd for either. FIX? 1787cf0acd0Smrg os=netbsd 1797cf0acd0Smrg else 1807cf0acd0Smrg os=netbsdelf 1817cf0acd0Smrg fi 1827cf0acd0Smrg ;; 1837cf0acd0Smrg *) 1847cf0acd0Smrg os=netbsd 1857cf0acd0Smrg ;; 1867cf0acd0Smrg esac 1877cf0acd0Smrg # The OS release 1887cf0acd0Smrg # Debian GNU/NetBSD machines have a different userland, and 1897cf0acd0Smrg # thus, need a distinct triplet. However, they do not need 1907cf0acd0Smrg # kernel version information, so it can be replaced with a 1917cf0acd0Smrg # suitable tag, in the style of linux-gnu. 1927cf0acd0Smrg case "${UNAME_VERSION}" in 1937cf0acd0Smrg Debian*) 1947cf0acd0Smrg release='-gnu' 1957cf0acd0Smrg ;; 1967cf0acd0Smrg *) 1977cf0acd0Smrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 1987cf0acd0Smrg ;; 1997cf0acd0Smrg esac 2007cf0acd0Smrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 2017cf0acd0Smrg # contains redundant information, the shorter form: 2027cf0acd0Smrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 2037cf0acd0Smrg echo "${machine}-${os}${release}" 2047cf0acd0Smrg exit ;; 2057cf0acd0Smrg *:OpenBSD:*:*) 2067cf0acd0Smrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 2077cf0acd0Smrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 2087cf0acd0Smrg exit ;; 2097cf0acd0Smrg *:ekkoBSD:*:*) 2107cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 2117cf0acd0Smrg exit ;; 2127cf0acd0Smrg *:SolidBSD:*:*) 2137cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 2147cf0acd0Smrg exit ;; 2157cf0acd0Smrg macppc:MirBSD:*:*) 2167cf0acd0Smrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 2177cf0acd0Smrg exit ;; 2187cf0acd0Smrg *:MirBSD:*:*) 2197cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 2207cf0acd0Smrg exit ;; 2217cf0acd0Smrg alpha:OSF1:*:*) 2227cf0acd0Smrg case $UNAME_RELEASE in 2237cf0acd0Smrg *4.0) 2247cf0acd0Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 2257cf0acd0Smrg ;; 2267cf0acd0Smrg *5.*) 2277cf0acd0Smrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 2287cf0acd0Smrg ;; 2297cf0acd0Smrg esac 2307cf0acd0Smrg # According to Compaq, /usr/sbin/psrinfo has been available on 2317cf0acd0Smrg # OSF/1 and Tru64 systems produced since 1995. I hope that 2327cf0acd0Smrg # covers most systems running today. This code pipes the CPU 2337cf0acd0Smrg # types through head -n 1, so we only detect the type of CPU 0. 2347cf0acd0Smrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 2357cf0acd0Smrg case "$ALPHA_CPU_TYPE" in 2367cf0acd0Smrg "EV4 (21064)") 2377cf0acd0Smrg UNAME_MACHINE="alpha" ;; 2387cf0acd0Smrg "EV4.5 (21064)") 2397cf0acd0Smrg UNAME_MACHINE="alpha" ;; 2407cf0acd0Smrg "LCA4 (21066/21068)") 2417cf0acd0Smrg UNAME_MACHINE="alpha" ;; 2427cf0acd0Smrg "EV5 (21164)") 2437cf0acd0Smrg UNAME_MACHINE="alphaev5" ;; 2447cf0acd0Smrg "EV5.6 (21164A)") 2457cf0acd0Smrg UNAME_MACHINE="alphaev56" ;; 2467cf0acd0Smrg "EV5.6 (21164PC)") 2477cf0acd0Smrg UNAME_MACHINE="alphapca56" ;; 2487cf0acd0Smrg "EV5.7 (21164PC)") 2497cf0acd0Smrg UNAME_MACHINE="alphapca57" ;; 2507cf0acd0Smrg "EV6 (21264)") 2517cf0acd0Smrg UNAME_MACHINE="alphaev6" ;; 2527cf0acd0Smrg "EV6.7 (21264A)") 2537cf0acd0Smrg UNAME_MACHINE="alphaev67" ;; 2547cf0acd0Smrg "EV6.8CB (21264C)") 2557cf0acd0Smrg UNAME_MACHINE="alphaev68" ;; 2567cf0acd0Smrg "EV6.8AL (21264B)") 2577cf0acd0Smrg UNAME_MACHINE="alphaev68" ;; 2587cf0acd0Smrg "EV6.8CX (21264D)") 2597cf0acd0Smrg UNAME_MACHINE="alphaev68" ;; 2607cf0acd0Smrg "EV6.9A (21264/EV69A)") 2617cf0acd0Smrg UNAME_MACHINE="alphaev69" ;; 2627cf0acd0Smrg "EV7 (21364)") 2637cf0acd0Smrg UNAME_MACHINE="alphaev7" ;; 2647cf0acd0Smrg "EV7.9 (21364A)") 2657cf0acd0Smrg UNAME_MACHINE="alphaev79" ;; 2667cf0acd0Smrg esac 2677cf0acd0Smrg # A Pn.n version is a patched version. 2687cf0acd0Smrg # A Vn.n version is a released version. 2697cf0acd0Smrg # A Tn.n version is a released field test version. 2707cf0acd0Smrg # A Xn.n version is an unreleased experimental baselevel. 2717cf0acd0Smrg # 1.2 uses "1.2" for uname -r. 2727cf0acd0Smrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2737cf0acd0Smrg exit ;; 2747cf0acd0Smrg Alpha\ *:Windows_NT*:*) 2757cf0acd0Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 2767cf0acd0Smrg # Should we change UNAME_MACHINE based on the output of uname instead 2777cf0acd0Smrg # of the specific Alpha model? 2787cf0acd0Smrg echo alpha-pc-interix 2797cf0acd0Smrg exit ;; 2807cf0acd0Smrg 21064:Windows_NT:50:3) 2817cf0acd0Smrg echo alpha-dec-winnt3.5 2827cf0acd0Smrg exit ;; 2837cf0acd0Smrg Amiga*:UNIX_System_V:4.0:*) 2847cf0acd0Smrg echo m68k-unknown-sysv4 2857cf0acd0Smrg exit ;; 2867cf0acd0Smrg *:[Aa]miga[Oo][Ss]:*:*) 2877cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-amigaos 2887cf0acd0Smrg exit ;; 2897cf0acd0Smrg *:[Mm]orph[Oo][Ss]:*:*) 2907cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-morphos 2917cf0acd0Smrg exit ;; 2927cf0acd0Smrg *:OS/390:*:*) 2937cf0acd0Smrg echo i370-ibm-openedition 2947cf0acd0Smrg exit ;; 2957cf0acd0Smrg *:z/VM:*:*) 2967cf0acd0Smrg echo s390-ibm-zvmoe 2977cf0acd0Smrg exit ;; 2987cf0acd0Smrg *:OS400:*:*) 2997cf0acd0Smrg echo powerpc-ibm-os400 3007cf0acd0Smrg exit ;; 3017cf0acd0Smrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 3027cf0acd0Smrg echo arm-acorn-riscix${UNAME_RELEASE} 3037cf0acd0Smrg exit ;; 3047cf0acd0Smrg arm:riscos:*:*|arm:RISCOS:*:*) 3057cf0acd0Smrg echo arm-unknown-riscos 3067cf0acd0Smrg exit ;; 3077cf0acd0Smrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 3087cf0acd0Smrg echo hppa1.1-hitachi-hiuxmpp 3097cf0acd0Smrg exit ;; 3107cf0acd0Smrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 3117cf0acd0Smrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 3127cf0acd0Smrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 3137cf0acd0Smrg echo pyramid-pyramid-sysv3 3147cf0acd0Smrg else 3157cf0acd0Smrg echo pyramid-pyramid-bsd 3167cf0acd0Smrg fi 3177cf0acd0Smrg exit ;; 3187cf0acd0Smrg NILE*:*:*:dcosx) 3197cf0acd0Smrg echo pyramid-pyramid-svr4 3207cf0acd0Smrg exit ;; 3217cf0acd0Smrg DRS?6000:unix:4.0:6*) 3227cf0acd0Smrg echo sparc-icl-nx6 3237cf0acd0Smrg exit ;; 3247cf0acd0Smrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 3257cf0acd0Smrg case `/usr/bin/uname -p` in 3267cf0acd0Smrg sparc) echo sparc-icl-nx7; exit ;; 3277cf0acd0Smrg esac ;; 3287cf0acd0Smrg s390x:SunOS:*:*) 3297cf0acd0Smrg echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3307cf0acd0Smrg exit ;; 3317cf0acd0Smrg sun4H:SunOS:5.*:*) 3327cf0acd0Smrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3337cf0acd0Smrg exit ;; 3347cf0acd0Smrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 3357cf0acd0Smrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3367cf0acd0Smrg exit ;; 3377cf0acd0Smrg i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 3387cf0acd0Smrg echo i386-pc-auroraux${UNAME_RELEASE} 3397cf0acd0Smrg exit ;; 3407cf0acd0Smrg i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 3417cf0acd0Smrg eval $set_cc_for_build 3427cf0acd0Smrg SUN_ARCH="i386" 3437cf0acd0Smrg # If there is a compiler, see if it is configured for 64-bit objects. 3447cf0acd0Smrg # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 3457cf0acd0Smrg # This test works for both compilers. 3467cf0acd0Smrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 3477cf0acd0Smrg if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 3487cf0acd0Smrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 3497cf0acd0Smrg grep IS_64BIT_ARCH >/dev/null 3507cf0acd0Smrg then 3517cf0acd0Smrg SUN_ARCH="x86_64" 3527cf0acd0Smrg fi 3537cf0acd0Smrg fi 3547cf0acd0Smrg echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3557cf0acd0Smrg exit ;; 3567cf0acd0Smrg sun4*:SunOS:6*:*) 3577cf0acd0Smrg # According to config.sub, this is the proper way to canonicalize 3587cf0acd0Smrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 3597cf0acd0Smrg # it's likely to be more like Solaris than SunOS4. 3607cf0acd0Smrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3617cf0acd0Smrg exit ;; 3627cf0acd0Smrg sun4*:SunOS:*:*) 3637cf0acd0Smrg case "`/usr/bin/arch -k`" in 3647cf0acd0Smrg Series*|S4*) 3657cf0acd0Smrg UNAME_RELEASE=`uname -v` 3667cf0acd0Smrg ;; 3677cf0acd0Smrg esac 3687cf0acd0Smrg # Japanese Language versions have a version number like `4.1.3-JL'. 3697cf0acd0Smrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 3707cf0acd0Smrg exit ;; 3717cf0acd0Smrg sun3*:SunOS:*:*) 3727cf0acd0Smrg echo m68k-sun-sunos${UNAME_RELEASE} 3737cf0acd0Smrg exit ;; 3747cf0acd0Smrg sun*:*:4.2BSD:*) 3757cf0acd0Smrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 3767cf0acd0Smrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 3777cf0acd0Smrg case "`/bin/arch`" in 3787cf0acd0Smrg sun3) 3797cf0acd0Smrg echo m68k-sun-sunos${UNAME_RELEASE} 3807cf0acd0Smrg ;; 3817cf0acd0Smrg sun4) 3827cf0acd0Smrg echo sparc-sun-sunos${UNAME_RELEASE} 3837cf0acd0Smrg ;; 3847cf0acd0Smrg esac 3857cf0acd0Smrg exit ;; 3867cf0acd0Smrg aushp:SunOS:*:*) 3877cf0acd0Smrg echo sparc-auspex-sunos${UNAME_RELEASE} 3887cf0acd0Smrg exit ;; 3897cf0acd0Smrg # The situation for MiNT is a little confusing. The machine name 3907cf0acd0Smrg # can be virtually everything (everything which is not 3917cf0acd0Smrg # "atarist" or "atariste" at least should have a processor 3927cf0acd0Smrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 3937cf0acd0Smrg # to the lowercase version "mint" (or "freemint"). Finally 3947cf0acd0Smrg # the system name "TOS" denotes a system which is actually not 3957cf0acd0Smrg # MiNT. But MiNT is downward compatible to TOS, so this should 3967cf0acd0Smrg # be no problem. 3977cf0acd0Smrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 3987cf0acd0Smrg echo m68k-atari-mint${UNAME_RELEASE} 3997cf0acd0Smrg exit ;; 4007cf0acd0Smrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 4017cf0acd0Smrg echo m68k-atari-mint${UNAME_RELEASE} 4027cf0acd0Smrg exit ;; 4037cf0acd0Smrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 4047cf0acd0Smrg echo m68k-atari-mint${UNAME_RELEASE} 4057cf0acd0Smrg exit ;; 4067cf0acd0Smrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 4077cf0acd0Smrg echo m68k-milan-mint${UNAME_RELEASE} 4087cf0acd0Smrg exit ;; 4097cf0acd0Smrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 4107cf0acd0Smrg echo m68k-hades-mint${UNAME_RELEASE} 4117cf0acd0Smrg exit ;; 4127cf0acd0Smrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 4137cf0acd0Smrg echo m68k-unknown-mint${UNAME_RELEASE} 4147cf0acd0Smrg exit ;; 4157cf0acd0Smrg m68k:machten:*:*) 4167cf0acd0Smrg echo m68k-apple-machten${UNAME_RELEASE} 4177cf0acd0Smrg exit ;; 4187cf0acd0Smrg powerpc:machten:*:*) 4197cf0acd0Smrg echo powerpc-apple-machten${UNAME_RELEASE} 4207cf0acd0Smrg exit ;; 4217cf0acd0Smrg RISC*:Mach:*:*) 4227cf0acd0Smrg echo mips-dec-mach_bsd4.3 4237cf0acd0Smrg exit ;; 4247cf0acd0Smrg RISC*:ULTRIX:*:*) 4257cf0acd0Smrg echo mips-dec-ultrix${UNAME_RELEASE} 4267cf0acd0Smrg exit ;; 4277cf0acd0Smrg VAX*:ULTRIX*:*:*) 4287cf0acd0Smrg echo vax-dec-ultrix${UNAME_RELEASE} 4297cf0acd0Smrg exit ;; 4307cf0acd0Smrg 2020:CLIX:*:* | 2430:CLIX:*:*) 4317cf0acd0Smrg echo clipper-intergraph-clix${UNAME_RELEASE} 4327cf0acd0Smrg exit ;; 4337cf0acd0Smrg mips:*:*:UMIPS | mips:*:*:RISCos) 4347cf0acd0Smrg eval $set_cc_for_build 4357cf0acd0Smrg sed 's/^ //' << EOF >$dummy.c 4367cf0acd0Smrg#ifdef __cplusplus 4377cf0acd0Smrg#include <stdio.h> /* for printf() prototype */ 4387cf0acd0Smrg int main (int argc, char *argv[]) { 4397cf0acd0Smrg#else 4407cf0acd0Smrg int main (argc, argv) int argc; char *argv[]; { 4417cf0acd0Smrg#endif 4427cf0acd0Smrg #if defined (host_mips) && defined (MIPSEB) 4437cf0acd0Smrg #if defined (SYSTYPE_SYSV) 4447cf0acd0Smrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 4457cf0acd0Smrg #endif 4467cf0acd0Smrg #if defined (SYSTYPE_SVR4) 4477cf0acd0Smrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 4487cf0acd0Smrg #endif 4497cf0acd0Smrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 4507cf0acd0Smrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 4517cf0acd0Smrg #endif 4527cf0acd0Smrg #endif 4537cf0acd0Smrg exit (-1); 4547cf0acd0Smrg } 4557cf0acd0SmrgEOF 4567cf0acd0Smrg $CC_FOR_BUILD -o $dummy $dummy.c && 4577cf0acd0Smrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 4587cf0acd0Smrg SYSTEM_NAME=`$dummy $dummyarg` && 4597cf0acd0Smrg { echo "$SYSTEM_NAME"; exit; } 4607cf0acd0Smrg echo mips-mips-riscos${UNAME_RELEASE} 4617cf0acd0Smrg exit ;; 4627cf0acd0Smrg Motorola:PowerMAX_OS:*:*) 4637cf0acd0Smrg echo powerpc-motorola-powermax 4647cf0acd0Smrg exit ;; 4657cf0acd0Smrg Motorola:*:4.3:PL8-*) 4667cf0acd0Smrg echo powerpc-harris-powermax 4677cf0acd0Smrg exit ;; 4687cf0acd0Smrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 4697cf0acd0Smrg echo powerpc-harris-powermax 4707cf0acd0Smrg exit ;; 4717cf0acd0Smrg Night_Hawk:Power_UNIX:*:*) 4727cf0acd0Smrg echo powerpc-harris-powerunix 4737cf0acd0Smrg exit ;; 4747cf0acd0Smrg m88k:CX/UX:7*:*) 4757cf0acd0Smrg echo m88k-harris-cxux7 4767cf0acd0Smrg exit ;; 4777cf0acd0Smrg m88k:*:4*:R4*) 4787cf0acd0Smrg echo m88k-motorola-sysv4 4797cf0acd0Smrg exit ;; 4807cf0acd0Smrg m88k:*:3*:R3*) 4817cf0acd0Smrg echo m88k-motorola-sysv3 4827cf0acd0Smrg exit ;; 4837cf0acd0Smrg AViiON:dgux:*:*) 4847cf0acd0Smrg # DG/UX returns AViiON for all architectures 4857cf0acd0Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 4867cf0acd0Smrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 4877cf0acd0Smrg then 4887cf0acd0Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 4897cf0acd0Smrg [ ${TARGET_BINARY_INTERFACE}x = x ] 4907cf0acd0Smrg then 4917cf0acd0Smrg echo m88k-dg-dgux${UNAME_RELEASE} 4927cf0acd0Smrg else 4937cf0acd0Smrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 4947cf0acd0Smrg fi 4957cf0acd0Smrg else 4967cf0acd0Smrg echo i586-dg-dgux${UNAME_RELEASE} 4977cf0acd0Smrg fi 4987cf0acd0Smrg exit ;; 4997cf0acd0Smrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 5007cf0acd0Smrg echo m88k-dolphin-sysv3 5017cf0acd0Smrg exit ;; 5027cf0acd0Smrg M88*:*:R3*:*) 5037cf0acd0Smrg # Delta 88k system running SVR3 5047cf0acd0Smrg echo m88k-motorola-sysv3 5057cf0acd0Smrg exit ;; 5067cf0acd0Smrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 5077cf0acd0Smrg echo m88k-tektronix-sysv3 5087cf0acd0Smrg exit ;; 5097cf0acd0Smrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 5107cf0acd0Smrg echo m68k-tektronix-bsd 5117cf0acd0Smrg exit ;; 5127cf0acd0Smrg *:IRIX*:*:*) 5137cf0acd0Smrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 5147cf0acd0Smrg exit ;; 5157cf0acd0Smrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 5167cf0acd0Smrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 5177cf0acd0Smrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 5187cf0acd0Smrg i*86:AIX:*:*) 5197cf0acd0Smrg echo i386-ibm-aix 5207cf0acd0Smrg exit ;; 5217cf0acd0Smrg ia64:AIX:*:*) 5227cf0acd0Smrg if [ -x /usr/bin/oslevel ] ; then 5237cf0acd0Smrg IBM_REV=`/usr/bin/oslevel` 5247cf0acd0Smrg else 5257cf0acd0Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 5267cf0acd0Smrg fi 5277cf0acd0Smrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 5287cf0acd0Smrg exit ;; 5297cf0acd0Smrg *:AIX:2:3) 5307cf0acd0Smrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 5317cf0acd0Smrg eval $set_cc_for_build 5327cf0acd0Smrg sed 's/^ //' << EOF >$dummy.c 5337cf0acd0Smrg #include <sys/systemcfg.h> 5347cf0acd0Smrg 5357cf0acd0Smrg main() 5367cf0acd0Smrg { 5377cf0acd0Smrg if (!__power_pc()) 5387cf0acd0Smrg exit(1); 5397cf0acd0Smrg puts("powerpc-ibm-aix3.2.5"); 5407cf0acd0Smrg exit(0); 5417cf0acd0Smrg } 5427cf0acd0SmrgEOF 5437cf0acd0Smrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 5447cf0acd0Smrg then 5457cf0acd0Smrg echo "$SYSTEM_NAME" 5467cf0acd0Smrg else 5477cf0acd0Smrg echo rs6000-ibm-aix3.2.5 5487cf0acd0Smrg fi 5497cf0acd0Smrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 5507cf0acd0Smrg echo rs6000-ibm-aix3.2.4 5517cf0acd0Smrg else 5527cf0acd0Smrg echo rs6000-ibm-aix3.2 5537cf0acd0Smrg fi 5547cf0acd0Smrg exit ;; 5557cf0acd0Smrg *:AIX:*:[4567]) 5567cf0acd0Smrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 5577cf0acd0Smrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 5587cf0acd0Smrg IBM_ARCH=rs6000 5597cf0acd0Smrg else 5607cf0acd0Smrg IBM_ARCH=powerpc 5617cf0acd0Smrg fi 5627cf0acd0Smrg if [ -x /usr/bin/oslevel ] ; then 5637cf0acd0Smrg IBM_REV=`/usr/bin/oslevel` 5647cf0acd0Smrg else 5657cf0acd0Smrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 5667cf0acd0Smrg fi 5677cf0acd0Smrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 5687cf0acd0Smrg exit ;; 5697cf0acd0Smrg *:AIX:*:*) 5707cf0acd0Smrg echo rs6000-ibm-aix 5717cf0acd0Smrg exit ;; 5727cf0acd0Smrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 5737cf0acd0Smrg echo romp-ibm-bsd4.4 5747cf0acd0Smrg exit ;; 5757cf0acd0Smrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 5767cf0acd0Smrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 5777cf0acd0Smrg exit ;; # report: romp-ibm BSD 4.3 5787cf0acd0Smrg *:BOSX:*:*) 5797cf0acd0Smrg echo rs6000-bull-bosx 5807cf0acd0Smrg exit ;; 5817cf0acd0Smrg DPX/2?00:B.O.S.:*:*) 5827cf0acd0Smrg echo m68k-bull-sysv3 5837cf0acd0Smrg exit ;; 5847cf0acd0Smrg 9000/[34]??:4.3bsd:1.*:*) 5857cf0acd0Smrg echo m68k-hp-bsd 5867cf0acd0Smrg exit ;; 5877cf0acd0Smrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 5887cf0acd0Smrg echo m68k-hp-bsd4.4 5897cf0acd0Smrg exit ;; 5907cf0acd0Smrg 9000/[34678]??:HP-UX:*:*) 5917cf0acd0Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 5927cf0acd0Smrg case "${UNAME_MACHINE}" in 5937cf0acd0Smrg 9000/31? ) HP_ARCH=m68000 ;; 5947cf0acd0Smrg 9000/[34]?? ) HP_ARCH=m68k ;; 5957cf0acd0Smrg 9000/[678][0-9][0-9]) 5967cf0acd0Smrg if [ -x /usr/bin/getconf ]; then 5977cf0acd0Smrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 5987cf0acd0Smrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 5997cf0acd0Smrg case "${sc_cpu_version}" in 6007cf0acd0Smrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 6017cf0acd0Smrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 6027cf0acd0Smrg 532) # CPU_PA_RISC2_0 6037cf0acd0Smrg case "${sc_kernel_bits}" in 6047cf0acd0Smrg 32) HP_ARCH="hppa2.0n" ;; 6057cf0acd0Smrg 64) HP_ARCH="hppa2.0w" ;; 6067cf0acd0Smrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 6077cf0acd0Smrg esac ;; 6087cf0acd0Smrg esac 6097cf0acd0Smrg fi 6107cf0acd0Smrg if [ "${HP_ARCH}" = "" ]; then 6117cf0acd0Smrg eval $set_cc_for_build 6127cf0acd0Smrg sed 's/^ //' << EOF >$dummy.c 6137cf0acd0Smrg 6147cf0acd0Smrg #define _HPUX_SOURCE 6157cf0acd0Smrg #include <stdlib.h> 6167cf0acd0Smrg #include <unistd.h> 6177cf0acd0Smrg 6187cf0acd0Smrg int main () 6197cf0acd0Smrg { 6207cf0acd0Smrg #if defined(_SC_KERNEL_BITS) 6217cf0acd0Smrg long bits = sysconf(_SC_KERNEL_BITS); 6227cf0acd0Smrg #endif 6237cf0acd0Smrg long cpu = sysconf (_SC_CPU_VERSION); 6247cf0acd0Smrg 6257cf0acd0Smrg switch (cpu) 6267cf0acd0Smrg { 6277cf0acd0Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 6287cf0acd0Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 6297cf0acd0Smrg case CPU_PA_RISC2_0: 6307cf0acd0Smrg #if defined(_SC_KERNEL_BITS) 6317cf0acd0Smrg switch (bits) 6327cf0acd0Smrg { 6337cf0acd0Smrg case 64: puts ("hppa2.0w"); break; 6347cf0acd0Smrg case 32: puts ("hppa2.0n"); break; 6357cf0acd0Smrg default: puts ("hppa2.0"); break; 6367cf0acd0Smrg } break; 6377cf0acd0Smrg #else /* !defined(_SC_KERNEL_BITS) */ 6387cf0acd0Smrg puts ("hppa2.0"); break; 6397cf0acd0Smrg #endif 6407cf0acd0Smrg default: puts ("hppa1.0"); break; 6417cf0acd0Smrg } 6427cf0acd0Smrg exit (0); 6437cf0acd0Smrg } 6447cf0acd0SmrgEOF 6457cf0acd0Smrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 6467cf0acd0Smrg test -z "$HP_ARCH" && HP_ARCH=hppa 6477cf0acd0Smrg fi ;; 6487cf0acd0Smrg esac 6497cf0acd0Smrg if [ ${HP_ARCH} = "hppa2.0w" ] 6507cf0acd0Smrg then 6517cf0acd0Smrg eval $set_cc_for_build 6527cf0acd0Smrg 6537cf0acd0Smrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 6547cf0acd0Smrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 6557cf0acd0Smrg # generating 64-bit code. GNU and HP use different nomenclature: 6567cf0acd0Smrg # 6577cf0acd0Smrg # $ CC_FOR_BUILD=cc ./config.guess 6587cf0acd0Smrg # => hppa2.0w-hp-hpux11.23 6597cf0acd0Smrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 6607cf0acd0Smrg # => hppa64-hp-hpux11.23 6617cf0acd0Smrg 6627cf0acd0Smrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 6637cf0acd0Smrg grep -q __LP64__ 6647cf0acd0Smrg then 6657cf0acd0Smrg HP_ARCH="hppa2.0w" 6667cf0acd0Smrg else 6677cf0acd0Smrg HP_ARCH="hppa64" 6687cf0acd0Smrg fi 6697cf0acd0Smrg fi 6707cf0acd0Smrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 6717cf0acd0Smrg exit ;; 6727cf0acd0Smrg ia64:HP-UX:*:*) 6737cf0acd0Smrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 6747cf0acd0Smrg echo ia64-hp-hpux${HPUX_REV} 6757cf0acd0Smrg exit ;; 6767cf0acd0Smrg 3050*:HI-UX:*:*) 6777cf0acd0Smrg eval $set_cc_for_build 6787cf0acd0Smrg sed 's/^ //' << EOF >$dummy.c 6797cf0acd0Smrg #include <unistd.h> 6807cf0acd0Smrg int 6817cf0acd0Smrg main () 6827cf0acd0Smrg { 6837cf0acd0Smrg long cpu = sysconf (_SC_CPU_VERSION); 6847cf0acd0Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 6857cf0acd0Smrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 6867cf0acd0Smrg results, however. */ 6877cf0acd0Smrg if (CPU_IS_PA_RISC (cpu)) 6887cf0acd0Smrg { 6897cf0acd0Smrg switch (cpu) 6907cf0acd0Smrg { 6917cf0acd0Smrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 6927cf0acd0Smrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 6937cf0acd0Smrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 6947cf0acd0Smrg default: puts ("hppa-hitachi-hiuxwe2"); break; 6957cf0acd0Smrg } 6967cf0acd0Smrg } 6977cf0acd0Smrg else if (CPU_IS_HP_MC68K (cpu)) 6987cf0acd0Smrg puts ("m68k-hitachi-hiuxwe2"); 6997cf0acd0Smrg else puts ("unknown-hitachi-hiuxwe2"); 7007cf0acd0Smrg exit (0); 7017cf0acd0Smrg } 7027cf0acd0SmrgEOF 7037cf0acd0Smrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 7047cf0acd0Smrg { echo "$SYSTEM_NAME"; exit; } 7057cf0acd0Smrg echo unknown-hitachi-hiuxwe2 7067cf0acd0Smrg exit ;; 7077cf0acd0Smrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 7087cf0acd0Smrg echo hppa1.1-hp-bsd 7097cf0acd0Smrg exit ;; 7107cf0acd0Smrg 9000/8??:4.3bsd:*:*) 7117cf0acd0Smrg echo hppa1.0-hp-bsd 7127cf0acd0Smrg exit ;; 7137cf0acd0Smrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 7147cf0acd0Smrg echo hppa1.0-hp-mpeix 7157cf0acd0Smrg exit ;; 7167cf0acd0Smrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 7177cf0acd0Smrg echo hppa1.1-hp-osf 7187cf0acd0Smrg exit ;; 7197cf0acd0Smrg hp8??:OSF1:*:*) 7207cf0acd0Smrg echo hppa1.0-hp-osf 7217cf0acd0Smrg exit ;; 7227cf0acd0Smrg i*86:OSF1:*:*) 7237cf0acd0Smrg if [ -x /usr/sbin/sysversion ] ; then 7247cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-osf1mk 7257cf0acd0Smrg else 7267cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-osf1 7277cf0acd0Smrg fi 7287cf0acd0Smrg exit ;; 7297cf0acd0Smrg parisc*:Lites*:*:*) 7307cf0acd0Smrg echo hppa1.1-hp-lites 7317cf0acd0Smrg exit ;; 7327cf0acd0Smrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 7337cf0acd0Smrg echo c1-convex-bsd 7347cf0acd0Smrg exit ;; 7357cf0acd0Smrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 7367cf0acd0Smrg if getsysinfo -f scalar_acc 7377cf0acd0Smrg then echo c32-convex-bsd 7387cf0acd0Smrg else echo c2-convex-bsd 7397cf0acd0Smrg fi 7407cf0acd0Smrg exit ;; 7417cf0acd0Smrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 7427cf0acd0Smrg echo c34-convex-bsd 7437cf0acd0Smrg exit ;; 7447cf0acd0Smrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 7457cf0acd0Smrg echo c38-convex-bsd 7467cf0acd0Smrg exit ;; 7477cf0acd0Smrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 7487cf0acd0Smrg echo c4-convex-bsd 7497cf0acd0Smrg exit ;; 7507cf0acd0Smrg CRAY*Y-MP:*:*:*) 7517cf0acd0Smrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7527cf0acd0Smrg exit ;; 7537cf0acd0Smrg CRAY*[A-Z]90:*:*:*) 7547cf0acd0Smrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 7557cf0acd0Smrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 7567cf0acd0Smrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 7577cf0acd0Smrg -e 's/\.[^.]*$/.X/' 7587cf0acd0Smrg exit ;; 7597cf0acd0Smrg CRAY*TS:*:*:*) 7607cf0acd0Smrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7617cf0acd0Smrg exit ;; 7627cf0acd0Smrg CRAY*T3E:*:*:*) 7637cf0acd0Smrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7647cf0acd0Smrg exit ;; 7657cf0acd0Smrg CRAY*SV1:*:*:*) 7667cf0acd0Smrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7677cf0acd0Smrg exit ;; 7687cf0acd0Smrg *:UNICOS/mp:*:*) 7697cf0acd0Smrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7707cf0acd0Smrg exit ;; 7717cf0acd0Smrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 7727cf0acd0Smrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7737cf0acd0Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 7747cf0acd0Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 7757cf0acd0Smrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 7767cf0acd0Smrg exit ;; 7777cf0acd0Smrg 5000:UNIX_System_V:4.*:*) 7787cf0acd0Smrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 7797cf0acd0Smrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 7807cf0acd0Smrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 7817cf0acd0Smrg exit ;; 7827cf0acd0Smrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 7837cf0acd0Smrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 7847cf0acd0Smrg exit ;; 7857cf0acd0Smrg sparc*:BSD/OS:*:*) 7867cf0acd0Smrg echo sparc-unknown-bsdi${UNAME_RELEASE} 7877cf0acd0Smrg exit ;; 7887cf0acd0Smrg *:BSD/OS:*:*) 7897cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 7907cf0acd0Smrg exit ;; 7917cf0acd0Smrg *:FreeBSD:*:*) 7927cf0acd0Smrg case ${UNAME_MACHINE} in 7937cf0acd0Smrg pc98) 7947cf0acd0Smrg echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 7957cf0acd0Smrg amd64) 7967cf0acd0Smrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 7977cf0acd0Smrg *) 7987cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 7997cf0acd0Smrg esac 8007cf0acd0Smrg exit ;; 8017cf0acd0Smrg i*:CYGWIN*:*) 8027cf0acd0Smrg echo ${UNAME_MACHINE}-pc-cygwin 8037cf0acd0Smrg exit ;; 8047cf0acd0Smrg *:MINGW*:*) 8057cf0acd0Smrg echo ${UNAME_MACHINE}-pc-mingw32 8067cf0acd0Smrg exit ;; 8077cf0acd0Smrg i*:windows32*:*) 8087cf0acd0Smrg # uname -m includes "-pc" on this system. 8097cf0acd0Smrg echo ${UNAME_MACHINE}-mingw32 8107cf0acd0Smrg exit ;; 8117cf0acd0Smrg i*:PW*:*) 8127cf0acd0Smrg echo ${UNAME_MACHINE}-pc-pw32 8137cf0acd0Smrg exit ;; 8147cf0acd0Smrg *:Interix*:*) 8157cf0acd0Smrg case ${UNAME_MACHINE} in 8167cf0acd0Smrg x86) 8177cf0acd0Smrg echo i586-pc-interix${UNAME_RELEASE} 8187cf0acd0Smrg exit ;; 8197cf0acd0Smrg authenticamd | genuineintel | EM64T) 8207cf0acd0Smrg echo x86_64-unknown-interix${UNAME_RELEASE} 8217cf0acd0Smrg exit ;; 8227cf0acd0Smrg IA64) 8237cf0acd0Smrg echo ia64-unknown-interix${UNAME_RELEASE} 8247cf0acd0Smrg exit ;; 8257cf0acd0Smrg esac ;; 8267cf0acd0Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 8277cf0acd0Smrg echo i${UNAME_MACHINE}-pc-mks 8287cf0acd0Smrg exit ;; 8297cf0acd0Smrg 8664:Windows_NT:*) 8307cf0acd0Smrg echo x86_64-pc-mks 8317cf0acd0Smrg exit ;; 8327cf0acd0Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 8337cf0acd0Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 8347cf0acd0Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 8357cf0acd0Smrg # UNAME_MACHINE based on the output of uname instead of i386? 8367cf0acd0Smrg echo i586-pc-interix 8377cf0acd0Smrg exit ;; 8387cf0acd0Smrg i*:UWIN*:*) 8397cf0acd0Smrg echo ${UNAME_MACHINE}-pc-uwin 8407cf0acd0Smrg exit ;; 8417cf0acd0Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 8427cf0acd0Smrg echo x86_64-unknown-cygwin 8437cf0acd0Smrg exit ;; 8447cf0acd0Smrg p*:CYGWIN*:*) 8457cf0acd0Smrg echo powerpcle-unknown-cygwin 8467cf0acd0Smrg exit ;; 8477cf0acd0Smrg prep*:SunOS:5.*:*) 8487cf0acd0Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 8497cf0acd0Smrg exit ;; 8507cf0acd0Smrg *:GNU:*:*) 8517cf0acd0Smrg # the GNU system 8527cf0acd0Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 8537cf0acd0Smrg exit ;; 8547cf0acd0Smrg *:GNU/*:*:*) 8557cf0acd0Smrg # other systems with GNU libc and userland 8567cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 8577cf0acd0Smrg exit ;; 8587cf0acd0Smrg i*86:Minix:*:*) 8597cf0acd0Smrg echo ${UNAME_MACHINE}-pc-minix 8607cf0acd0Smrg exit ;; 8617cf0acd0Smrg alpha:Linux:*:*) 8627cf0acd0Smrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 8637cf0acd0Smrg EV5) UNAME_MACHINE=alphaev5 ;; 8647cf0acd0Smrg EV56) UNAME_MACHINE=alphaev56 ;; 8657cf0acd0Smrg PCA56) UNAME_MACHINE=alphapca56 ;; 8667cf0acd0Smrg PCA57) UNAME_MACHINE=alphapca56 ;; 8677cf0acd0Smrg EV6) UNAME_MACHINE=alphaev6 ;; 8687cf0acd0Smrg EV67) UNAME_MACHINE=alphaev67 ;; 8697cf0acd0Smrg EV68*) UNAME_MACHINE=alphaev68 ;; 8707cf0acd0Smrg esac 8717cf0acd0Smrg objdump --private-headers /bin/sh | grep -q ld.so.1 8727cf0acd0Smrg if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 8737cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 8747cf0acd0Smrg exit ;; 8757cf0acd0Smrg arm*:Linux:*:*) 8767cf0acd0Smrg eval $set_cc_for_build 8777cf0acd0Smrg if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 8787cf0acd0Smrg | grep -q __ARM_EABI__ 8797cf0acd0Smrg then 8807cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8817cf0acd0Smrg else 8827cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnueabi 8837cf0acd0Smrg fi 8847cf0acd0Smrg exit ;; 8857cf0acd0Smrg avr32*:Linux:*:*) 8867cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 8877cf0acd0Smrg exit ;; 8887cf0acd0Smrg cris:Linux:*:*) 8897cf0acd0Smrg echo cris-axis-linux-gnu 8907cf0acd0Smrg exit ;; 8917cf0acd0Smrg crisv32:Linux:*:*) 8927cf0acd0Smrg echo crisv32-axis-linux-gnu 8937cf0acd0Smrg exit ;; 8947cf0acd0Smrg frv:Linux:*:*) 8957cf0acd0Smrg echo frv-unknown-linux-gnu 8967cf0acd0Smrg exit ;; 8977cf0acd0Smrg i*86:Linux:*:*) 8987cf0acd0Smrg LIBC=gnu 8997cf0acd0Smrg eval $set_cc_for_build 9007cf0acd0Smrg sed 's/^ //' << EOF >$dummy.c 9017cf0acd0Smrg #ifdef __dietlibc__ 9027cf0acd0Smrg LIBC=dietlibc 9037cf0acd0Smrg #endif 9047cf0acd0SmrgEOF 9057cf0acd0Smrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` 9067cf0acd0Smrg echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 9077cf0acd0Smrg exit ;; 9087cf0acd0Smrg ia64:Linux:*:*) 9097cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9107cf0acd0Smrg exit ;; 9117cf0acd0Smrg m32r*:Linux:*:*) 9127cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9137cf0acd0Smrg exit ;; 9147cf0acd0Smrg m68*:Linux:*:*) 9157cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9167cf0acd0Smrg exit ;; 9177cf0acd0Smrg mips:Linux:*:* | mips64:Linux:*:*) 9187cf0acd0Smrg eval $set_cc_for_build 9197cf0acd0Smrg sed 's/^ //' << EOF >$dummy.c 9207cf0acd0Smrg #undef CPU 9217cf0acd0Smrg #undef ${UNAME_MACHINE} 9227cf0acd0Smrg #undef ${UNAME_MACHINE}el 9237cf0acd0Smrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 9247cf0acd0Smrg CPU=${UNAME_MACHINE}el 9257cf0acd0Smrg #else 9267cf0acd0Smrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 9277cf0acd0Smrg CPU=${UNAME_MACHINE} 9287cf0acd0Smrg #else 9297cf0acd0Smrg CPU= 9307cf0acd0Smrg #endif 9317cf0acd0Smrg #endif 9327cf0acd0SmrgEOF 9337cf0acd0Smrg eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 9347cf0acd0Smrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 9357cf0acd0Smrg ;; 9367cf0acd0Smrg or32:Linux:*:*) 9377cf0acd0Smrg echo or32-unknown-linux-gnu 9387cf0acd0Smrg exit ;; 9397cf0acd0Smrg padre:Linux:*:*) 9407cf0acd0Smrg echo sparc-unknown-linux-gnu 9417cf0acd0Smrg exit ;; 9427cf0acd0Smrg parisc64:Linux:*:* | hppa64:Linux:*:*) 9437cf0acd0Smrg echo hppa64-unknown-linux-gnu 9447cf0acd0Smrg exit ;; 9457cf0acd0Smrg parisc:Linux:*:* | hppa:Linux:*:*) 9467cf0acd0Smrg # Look for CPU level 9477cf0acd0Smrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 9487cf0acd0Smrg PA7*) echo hppa1.1-unknown-linux-gnu ;; 9497cf0acd0Smrg PA8*) echo hppa2.0-unknown-linux-gnu ;; 9507cf0acd0Smrg *) echo hppa-unknown-linux-gnu ;; 9517cf0acd0Smrg esac 9527cf0acd0Smrg exit ;; 9537cf0acd0Smrg ppc64:Linux:*:*) 9547cf0acd0Smrg echo powerpc64-unknown-linux-gnu 9557cf0acd0Smrg exit ;; 9567cf0acd0Smrg ppc:Linux:*:*) 9577cf0acd0Smrg echo powerpc-unknown-linux-gnu 9587cf0acd0Smrg exit ;; 9597cf0acd0Smrg s390:Linux:*:* | s390x:Linux:*:*) 9607cf0acd0Smrg echo ${UNAME_MACHINE}-ibm-linux 9617cf0acd0Smrg exit ;; 9627cf0acd0Smrg sh64*:Linux:*:*) 9637cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9647cf0acd0Smrg exit ;; 9657cf0acd0Smrg sh*:Linux:*:*) 9667cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9677cf0acd0Smrg exit ;; 9687cf0acd0Smrg sparc:Linux:*:* | sparc64:Linux:*:*) 9697cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9707cf0acd0Smrg exit ;; 9717cf0acd0Smrg tile*:Linux:*:*) 9727cf0acd0Smrg echo ${UNAME_MACHINE}-tilera-linux-gnu 9737cf0acd0Smrg exit ;; 9747cf0acd0Smrg vax:Linux:*:*) 9757cf0acd0Smrg echo ${UNAME_MACHINE}-dec-linux-gnu 9767cf0acd0Smrg exit ;; 9777cf0acd0Smrg x86_64:Linux:*:*) 9787cf0acd0Smrg echo x86_64-unknown-linux-gnu 9797cf0acd0Smrg exit ;; 9807cf0acd0Smrg xtensa*:Linux:*:*) 9817cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-linux-gnu 9827cf0acd0Smrg exit ;; 9837cf0acd0Smrg i*86:DYNIX/ptx:4*:*) 9847cf0acd0Smrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 9857cf0acd0Smrg # earlier versions are messed up and put the nodename in both 9867cf0acd0Smrg # sysname and nodename. 9877cf0acd0Smrg echo i386-sequent-sysv4 9887cf0acd0Smrg exit ;; 9897cf0acd0Smrg i*86:UNIX_SV:4.2MP:2.*) 9907cf0acd0Smrg # Unixware is an offshoot of SVR4, but it has its own version 9917cf0acd0Smrg # number series starting with 2... 9927cf0acd0Smrg # I am not positive that other SVR4 systems won't match this, 9937cf0acd0Smrg # I just have to hope. -- rms. 9947cf0acd0Smrg # Use sysv4.2uw... so that sysv4* matches it. 9957cf0acd0Smrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 9967cf0acd0Smrg exit ;; 9977cf0acd0Smrg i*86:OS/2:*:*) 9987cf0acd0Smrg # If we were able to find `uname', then EMX Unix compatibility 9997cf0acd0Smrg # is probably installed. 10007cf0acd0Smrg echo ${UNAME_MACHINE}-pc-os2-emx 10017cf0acd0Smrg exit ;; 10027cf0acd0Smrg i*86:XTS-300:*:STOP) 10037cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-stop 10047cf0acd0Smrg exit ;; 10057cf0acd0Smrg i*86:atheos:*:*) 10067cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-atheos 10077cf0acd0Smrg exit ;; 10087cf0acd0Smrg i*86:syllable:*:*) 10097cf0acd0Smrg echo ${UNAME_MACHINE}-pc-syllable 10107cf0acd0Smrg exit ;; 10117cf0acd0Smrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 10127cf0acd0Smrg echo i386-unknown-lynxos${UNAME_RELEASE} 10137cf0acd0Smrg exit ;; 10147cf0acd0Smrg i*86:*DOS:*:*) 10157cf0acd0Smrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 10167cf0acd0Smrg exit ;; 10177cf0acd0Smrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 10187cf0acd0Smrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 10197cf0acd0Smrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 10207cf0acd0Smrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 10217cf0acd0Smrg else 10227cf0acd0Smrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 10237cf0acd0Smrg fi 10247cf0acd0Smrg exit ;; 10257cf0acd0Smrg i*86:*:5:[678]*) 10267cf0acd0Smrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 10277cf0acd0Smrg case `/bin/uname -X | grep "^Machine"` in 10287cf0acd0Smrg *486*) UNAME_MACHINE=i486 ;; 10297cf0acd0Smrg *Pentium) UNAME_MACHINE=i586 ;; 10307cf0acd0Smrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 10317cf0acd0Smrg esac 10327cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 10337cf0acd0Smrg exit ;; 10347cf0acd0Smrg i*86:*:3.2:*) 10357cf0acd0Smrg if test -f /usr/options/cb.name; then 10367cf0acd0Smrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 10377cf0acd0Smrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 10387cf0acd0Smrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 10397cf0acd0Smrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 10407cf0acd0Smrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 10417cf0acd0Smrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 10427cf0acd0Smrg && UNAME_MACHINE=i586 10437cf0acd0Smrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 10447cf0acd0Smrg && UNAME_MACHINE=i686 10457cf0acd0Smrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 10467cf0acd0Smrg && UNAME_MACHINE=i686 10477cf0acd0Smrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 10487cf0acd0Smrg else 10497cf0acd0Smrg echo ${UNAME_MACHINE}-pc-sysv32 10507cf0acd0Smrg fi 10517cf0acd0Smrg exit ;; 10527cf0acd0Smrg pc:*:*:*) 10537cf0acd0Smrg # Left here for compatibility: 10547cf0acd0Smrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 10557cf0acd0Smrg # the processor, so we play safe by assuming i586. 10567cf0acd0Smrg # Note: whatever this is, it MUST be the same as what config.sub 10577cf0acd0Smrg # prints for the "djgpp" host, or else GDB configury will decide that 10587cf0acd0Smrg # this is a cross-build. 10597cf0acd0Smrg echo i586-pc-msdosdjgpp 10607cf0acd0Smrg exit ;; 10617cf0acd0Smrg Intel:Mach:3*:*) 10627cf0acd0Smrg echo i386-pc-mach3 10637cf0acd0Smrg exit ;; 10647cf0acd0Smrg paragon:*:*:*) 10657cf0acd0Smrg echo i860-intel-osf1 10667cf0acd0Smrg exit ;; 10677cf0acd0Smrg i860:*:4.*:*) # i860-SVR4 10687cf0acd0Smrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 10697cf0acd0Smrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 10707cf0acd0Smrg else # Add other i860-SVR4 vendors below as they are discovered. 10717cf0acd0Smrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 10727cf0acd0Smrg fi 10737cf0acd0Smrg exit ;; 10747cf0acd0Smrg mini*:CTIX:SYS*5:*) 10757cf0acd0Smrg # "miniframe" 10767cf0acd0Smrg echo m68010-convergent-sysv 10777cf0acd0Smrg exit ;; 10787cf0acd0Smrg mc68k:UNIX:SYSTEM5:3.51m) 10797cf0acd0Smrg echo m68k-convergent-sysv 10807cf0acd0Smrg exit ;; 10817cf0acd0Smrg M680?0:D-NIX:5.3:*) 10827cf0acd0Smrg echo m68k-diab-dnix 10837cf0acd0Smrg exit ;; 10847cf0acd0Smrg M68*:*:R3V[5678]*:*) 10857cf0acd0Smrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 10867cf0acd0Smrg 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) 10877cf0acd0Smrg OS_REL='' 10887cf0acd0Smrg test -r /etc/.relid \ 10897cf0acd0Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 10907cf0acd0Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 10917cf0acd0Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 10927cf0acd0Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 10937cf0acd0Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 10947cf0acd0Smrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 10957cf0acd0Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 10967cf0acd0Smrg && { echo i486-ncr-sysv4; exit; } ;; 10977cf0acd0Smrg NCR*:*:4.2:* | MPRAS*:*:4.2:*) 10987cf0acd0Smrg OS_REL='.3' 10997cf0acd0Smrg test -r /etc/.relid \ 11007cf0acd0Smrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 11017cf0acd0Smrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 11027cf0acd0Smrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 11037cf0acd0Smrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 11047cf0acd0Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 11057cf0acd0Smrg /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 11067cf0acd0Smrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 11077cf0acd0Smrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 11087cf0acd0Smrg echo m68k-unknown-lynxos${UNAME_RELEASE} 11097cf0acd0Smrg exit ;; 11107cf0acd0Smrg mc68030:UNIX_System_V:4.*:*) 11117cf0acd0Smrg echo m68k-atari-sysv4 11127cf0acd0Smrg exit ;; 11137cf0acd0Smrg TSUNAMI:LynxOS:2.*:*) 11147cf0acd0Smrg echo sparc-unknown-lynxos${UNAME_RELEASE} 11157cf0acd0Smrg exit ;; 11167cf0acd0Smrg rs6000:LynxOS:2.*:*) 11177cf0acd0Smrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 11187cf0acd0Smrg exit ;; 11197cf0acd0Smrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 11207cf0acd0Smrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 11217cf0acd0Smrg exit ;; 11227cf0acd0Smrg SM[BE]S:UNIX_SV:*:*) 11237cf0acd0Smrg echo mips-dde-sysv${UNAME_RELEASE} 11247cf0acd0Smrg exit ;; 11257cf0acd0Smrg RM*:ReliantUNIX-*:*:*) 11267cf0acd0Smrg echo mips-sni-sysv4 11277cf0acd0Smrg exit ;; 11287cf0acd0Smrg RM*:SINIX-*:*:*) 11297cf0acd0Smrg echo mips-sni-sysv4 11307cf0acd0Smrg exit ;; 11317cf0acd0Smrg *:SINIX-*:*:*) 11327cf0acd0Smrg if uname -p 2>/dev/null >/dev/null ; then 11337cf0acd0Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 11347cf0acd0Smrg echo ${UNAME_MACHINE}-sni-sysv4 11357cf0acd0Smrg else 11367cf0acd0Smrg echo ns32k-sni-sysv 11377cf0acd0Smrg fi 11387cf0acd0Smrg exit ;; 11397cf0acd0Smrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 11407cf0acd0Smrg # says <Richard.M.Bartel@ccMail.Census.GOV> 11417cf0acd0Smrg echo i586-unisys-sysv4 11427cf0acd0Smrg exit ;; 11437cf0acd0Smrg *:UNIX_System_V:4*:FTX*) 11447cf0acd0Smrg # From Gerald Hewes <hewes@openmarket.com>. 11457cf0acd0Smrg # How about differentiating between stratus architectures? -djm 11467cf0acd0Smrg echo hppa1.1-stratus-sysv4 11477cf0acd0Smrg exit ;; 11487cf0acd0Smrg *:*:*:FTX*) 11497cf0acd0Smrg # From seanf@swdc.stratus.com. 11507cf0acd0Smrg echo i860-stratus-sysv4 11517cf0acd0Smrg exit ;; 11527cf0acd0Smrg i*86:VOS:*:*) 11537cf0acd0Smrg # From Paul.Green@stratus.com. 11547cf0acd0Smrg echo ${UNAME_MACHINE}-stratus-vos 11557cf0acd0Smrg exit ;; 11567cf0acd0Smrg *:VOS:*:*) 11577cf0acd0Smrg # From Paul.Green@stratus.com. 11587cf0acd0Smrg echo hppa1.1-stratus-vos 11597cf0acd0Smrg exit ;; 11607cf0acd0Smrg mc68*:A/UX:*:*) 11617cf0acd0Smrg echo m68k-apple-aux${UNAME_RELEASE} 11627cf0acd0Smrg exit ;; 11637cf0acd0Smrg news*:NEWS-OS:6*:*) 11647cf0acd0Smrg echo mips-sony-newsos6 11657cf0acd0Smrg exit ;; 11667cf0acd0Smrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 11677cf0acd0Smrg if [ -d /usr/nec ]; then 11687cf0acd0Smrg echo mips-nec-sysv${UNAME_RELEASE} 11697cf0acd0Smrg else 11707cf0acd0Smrg echo mips-unknown-sysv${UNAME_RELEASE} 11717cf0acd0Smrg fi 11727cf0acd0Smrg exit ;; 11737cf0acd0Smrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 11747cf0acd0Smrg echo powerpc-be-beos 11757cf0acd0Smrg exit ;; 11767cf0acd0Smrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 11777cf0acd0Smrg echo powerpc-apple-beos 11787cf0acd0Smrg exit ;; 11797cf0acd0Smrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 11807cf0acd0Smrg echo i586-pc-beos 11817cf0acd0Smrg exit ;; 11827cf0acd0Smrg BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 11837cf0acd0Smrg echo i586-pc-haiku 11847cf0acd0Smrg exit ;; 11857cf0acd0Smrg SX-4:SUPER-UX:*:*) 11867cf0acd0Smrg echo sx4-nec-superux${UNAME_RELEASE} 11877cf0acd0Smrg exit ;; 11887cf0acd0Smrg SX-5:SUPER-UX:*:*) 11897cf0acd0Smrg echo sx5-nec-superux${UNAME_RELEASE} 11907cf0acd0Smrg exit ;; 11917cf0acd0Smrg SX-6:SUPER-UX:*:*) 11927cf0acd0Smrg echo sx6-nec-superux${UNAME_RELEASE} 11937cf0acd0Smrg exit ;; 11947cf0acd0Smrg SX-7:SUPER-UX:*:*) 11957cf0acd0Smrg echo sx7-nec-superux${UNAME_RELEASE} 11967cf0acd0Smrg exit ;; 11977cf0acd0Smrg SX-8:SUPER-UX:*:*) 11987cf0acd0Smrg echo sx8-nec-superux${UNAME_RELEASE} 11997cf0acd0Smrg exit ;; 12007cf0acd0Smrg SX-8R:SUPER-UX:*:*) 12017cf0acd0Smrg echo sx8r-nec-superux${UNAME_RELEASE} 12027cf0acd0Smrg exit ;; 12037cf0acd0Smrg Power*:Rhapsody:*:*) 12047cf0acd0Smrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 12057cf0acd0Smrg exit ;; 12067cf0acd0Smrg *:Rhapsody:*:*) 12077cf0acd0Smrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 12087cf0acd0Smrg exit ;; 12097cf0acd0Smrg *:Darwin:*:*) 12107cf0acd0Smrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 12117cf0acd0Smrg case $UNAME_PROCESSOR in 12127cf0acd0Smrg i386) 12137cf0acd0Smrg eval $set_cc_for_build 12147cf0acd0Smrg if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 12157cf0acd0Smrg if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 12167cf0acd0Smrg (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 12177cf0acd0Smrg grep IS_64BIT_ARCH >/dev/null 12187cf0acd0Smrg then 12197cf0acd0Smrg UNAME_PROCESSOR="x86_64" 12207cf0acd0Smrg fi 12217cf0acd0Smrg fi ;; 12227cf0acd0Smrg unknown) UNAME_PROCESSOR=powerpc ;; 12237cf0acd0Smrg esac 12247cf0acd0Smrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 12257cf0acd0Smrg exit ;; 12267cf0acd0Smrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 12277cf0acd0Smrg UNAME_PROCESSOR=`uname -p` 12287cf0acd0Smrg if test "$UNAME_PROCESSOR" = "x86"; then 12297cf0acd0Smrg UNAME_PROCESSOR=i386 12307cf0acd0Smrg UNAME_MACHINE=pc 12317cf0acd0Smrg fi 12327cf0acd0Smrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 12337cf0acd0Smrg exit ;; 12347cf0acd0Smrg *:QNX:*:4*) 12357cf0acd0Smrg echo i386-pc-qnx 12367cf0acd0Smrg exit ;; 12377cf0acd0Smrg NSE-?:NONSTOP_KERNEL:*:*) 12387cf0acd0Smrg echo nse-tandem-nsk${UNAME_RELEASE} 12397cf0acd0Smrg exit ;; 12407cf0acd0Smrg NSR-?:NONSTOP_KERNEL:*:*) 12417cf0acd0Smrg echo nsr-tandem-nsk${UNAME_RELEASE} 12427cf0acd0Smrg exit ;; 12437cf0acd0Smrg *:NonStop-UX:*:*) 12447cf0acd0Smrg echo mips-compaq-nonstopux 12457cf0acd0Smrg exit ;; 12467cf0acd0Smrg BS2000:POSIX*:*:*) 12477cf0acd0Smrg echo bs2000-siemens-sysv 12487cf0acd0Smrg exit ;; 12497cf0acd0Smrg DS/*:UNIX_System_V:*:*) 12507cf0acd0Smrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 12517cf0acd0Smrg exit ;; 12527cf0acd0Smrg *:Plan9:*:*) 12537cf0acd0Smrg # "uname -m" is not consistent, so use $cputype instead. 386 12547cf0acd0Smrg # is converted to i386 for consistency with other x86 12557cf0acd0Smrg # operating systems. 12567cf0acd0Smrg if test "$cputype" = "386"; then 12577cf0acd0Smrg UNAME_MACHINE=i386 12587cf0acd0Smrg else 12597cf0acd0Smrg UNAME_MACHINE="$cputype" 12607cf0acd0Smrg fi 12617cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-plan9 12627cf0acd0Smrg exit ;; 12637cf0acd0Smrg *:TOPS-10:*:*) 12647cf0acd0Smrg echo pdp10-unknown-tops10 12657cf0acd0Smrg exit ;; 12667cf0acd0Smrg *:TENEX:*:*) 12677cf0acd0Smrg echo pdp10-unknown-tenex 12687cf0acd0Smrg exit ;; 12697cf0acd0Smrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 12707cf0acd0Smrg echo pdp10-dec-tops20 12717cf0acd0Smrg exit ;; 12727cf0acd0Smrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 12737cf0acd0Smrg echo pdp10-xkl-tops20 12747cf0acd0Smrg exit ;; 12757cf0acd0Smrg *:TOPS-20:*:*) 12767cf0acd0Smrg echo pdp10-unknown-tops20 12777cf0acd0Smrg exit ;; 12787cf0acd0Smrg *:ITS:*:*) 12797cf0acd0Smrg echo pdp10-unknown-its 12807cf0acd0Smrg exit ;; 12817cf0acd0Smrg SEI:*:*:SEIUX) 12827cf0acd0Smrg echo mips-sei-seiux${UNAME_RELEASE} 12837cf0acd0Smrg exit ;; 12847cf0acd0Smrg *:DragonFly:*:*) 12857cf0acd0Smrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 12867cf0acd0Smrg exit ;; 12877cf0acd0Smrg *:*VMS:*:*) 12887cf0acd0Smrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 12897cf0acd0Smrg case "${UNAME_MACHINE}" in 12907cf0acd0Smrg A*) echo alpha-dec-vms ; exit ;; 12917cf0acd0Smrg I*) echo ia64-dec-vms ; exit ;; 12927cf0acd0Smrg V*) echo vax-dec-vms ; exit ;; 12937cf0acd0Smrg esac ;; 12947cf0acd0Smrg *:XENIX:*:SysV) 12957cf0acd0Smrg echo i386-pc-xenix 12967cf0acd0Smrg exit ;; 12977cf0acd0Smrg i*86:skyos:*:*) 12987cf0acd0Smrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 12997cf0acd0Smrg exit ;; 13007cf0acd0Smrg i*86:rdos:*:*) 13017cf0acd0Smrg echo ${UNAME_MACHINE}-pc-rdos 13027cf0acd0Smrg exit ;; 13037cf0acd0Smrg i*86:AROS:*:*) 13047cf0acd0Smrg echo ${UNAME_MACHINE}-pc-aros 13057cf0acd0Smrg exit ;; 13067cf0acd0Smrgesac 13077cf0acd0Smrg 13087cf0acd0Smrg#echo '(No uname command or uname output not recognized.)' 1>&2 13097cf0acd0Smrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 13107cf0acd0Smrg 13117cf0acd0Smrgeval $set_cc_for_build 13127cf0acd0Smrgcat >$dummy.c <<EOF 13137cf0acd0Smrg#ifdef _SEQUENT_ 13147cf0acd0Smrg# include <sys/types.h> 13157cf0acd0Smrg# include <sys/utsname.h> 13167cf0acd0Smrg#endif 13177cf0acd0Smrgmain () 13187cf0acd0Smrg{ 13197cf0acd0Smrg#if defined (sony) 13207cf0acd0Smrg#if defined (MIPSEB) 13217cf0acd0Smrg /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 13227cf0acd0Smrg I don't know.... */ 13237cf0acd0Smrg printf ("mips-sony-bsd\n"); exit (0); 13247cf0acd0Smrg#else 13257cf0acd0Smrg#include <sys/param.h> 13267cf0acd0Smrg printf ("m68k-sony-newsos%s\n", 13277cf0acd0Smrg#ifdef NEWSOS4 13287cf0acd0Smrg "4" 13297cf0acd0Smrg#else 13307cf0acd0Smrg "" 13317cf0acd0Smrg#endif 13327cf0acd0Smrg ); exit (0); 13337cf0acd0Smrg#endif 13347cf0acd0Smrg#endif 13357cf0acd0Smrg 13367cf0acd0Smrg#if defined (__arm) && defined (__acorn) && defined (__unix) 13377cf0acd0Smrg printf ("arm-acorn-riscix\n"); exit (0); 13387cf0acd0Smrg#endif 13397cf0acd0Smrg 13407cf0acd0Smrg#if defined (hp300) && !defined (hpux) 13417cf0acd0Smrg printf ("m68k-hp-bsd\n"); exit (0); 13427cf0acd0Smrg#endif 13437cf0acd0Smrg 13447cf0acd0Smrg#if defined (NeXT) 13457cf0acd0Smrg#if !defined (__ARCHITECTURE__) 13467cf0acd0Smrg#define __ARCHITECTURE__ "m68k" 13477cf0acd0Smrg#endif 13487cf0acd0Smrg int version; 13497cf0acd0Smrg version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 13507cf0acd0Smrg if (version < 4) 13517cf0acd0Smrg printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 13527cf0acd0Smrg else 13537cf0acd0Smrg printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 13547cf0acd0Smrg exit (0); 13557cf0acd0Smrg#endif 13567cf0acd0Smrg 13577cf0acd0Smrg#if defined (MULTIMAX) || defined (n16) 13587cf0acd0Smrg#if defined (UMAXV) 13597cf0acd0Smrg printf ("ns32k-encore-sysv\n"); exit (0); 13607cf0acd0Smrg#else 13617cf0acd0Smrg#if defined (CMU) 13627cf0acd0Smrg printf ("ns32k-encore-mach\n"); exit (0); 13637cf0acd0Smrg#else 13647cf0acd0Smrg printf ("ns32k-encore-bsd\n"); exit (0); 13657cf0acd0Smrg#endif 13667cf0acd0Smrg#endif 13677cf0acd0Smrg#endif 13687cf0acd0Smrg 13697cf0acd0Smrg#if defined (__386BSD__) 13707cf0acd0Smrg printf ("i386-pc-bsd\n"); exit (0); 13717cf0acd0Smrg#endif 13727cf0acd0Smrg 13737cf0acd0Smrg#if defined (sequent) 13747cf0acd0Smrg#if defined (i386) 13757cf0acd0Smrg printf ("i386-sequent-dynix\n"); exit (0); 13767cf0acd0Smrg#endif 13777cf0acd0Smrg#if defined (ns32000) 13787cf0acd0Smrg printf ("ns32k-sequent-dynix\n"); exit (0); 13797cf0acd0Smrg#endif 13807cf0acd0Smrg#endif 13817cf0acd0Smrg 13827cf0acd0Smrg#if defined (_SEQUENT_) 13837cf0acd0Smrg struct utsname un; 13847cf0acd0Smrg 13857cf0acd0Smrg uname(&un); 13867cf0acd0Smrg 13877cf0acd0Smrg if (strncmp(un.version, "V2", 2) == 0) { 13887cf0acd0Smrg printf ("i386-sequent-ptx2\n"); exit (0); 13897cf0acd0Smrg } 13907cf0acd0Smrg if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 13917cf0acd0Smrg printf ("i386-sequent-ptx1\n"); exit (0); 13927cf0acd0Smrg } 13937cf0acd0Smrg printf ("i386-sequent-ptx\n"); exit (0); 13947cf0acd0Smrg 13957cf0acd0Smrg#endif 13967cf0acd0Smrg 13977cf0acd0Smrg#if defined (vax) 13987cf0acd0Smrg# if !defined (ultrix) 13997cf0acd0Smrg# include <sys/param.h> 14007cf0acd0Smrg# if defined (BSD) 14017cf0acd0Smrg# if BSD == 43 14027cf0acd0Smrg printf ("vax-dec-bsd4.3\n"); exit (0); 14037cf0acd0Smrg# else 14047cf0acd0Smrg# if BSD == 199006 14057cf0acd0Smrg printf ("vax-dec-bsd4.3reno\n"); exit (0); 14067cf0acd0Smrg# else 14077cf0acd0Smrg printf ("vax-dec-bsd\n"); exit (0); 14087cf0acd0Smrg# endif 14097cf0acd0Smrg# endif 14107cf0acd0Smrg# else 14117cf0acd0Smrg printf ("vax-dec-bsd\n"); exit (0); 14127cf0acd0Smrg# endif 14137cf0acd0Smrg# else 14147cf0acd0Smrg printf ("vax-dec-ultrix\n"); exit (0); 14157cf0acd0Smrg# endif 14167cf0acd0Smrg#endif 14177cf0acd0Smrg 14187cf0acd0Smrg#if defined (alliant) && defined (i860) 14197cf0acd0Smrg printf ("i860-alliant-bsd\n"); exit (0); 14207cf0acd0Smrg#endif 14217cf0acd0Smrg 14227cf0acd0Smrg exit (1); 14237cf0acd0Smrg} 14247cf0acd0SmrgEOF 14257cf0acd0Smrg 14267cf0acd0Smrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 14277cf0acd0Smrg { echo "$SYSTEM_NAME"; exit; } 14287cf0acd0Smrg 14297cf0acd0Smrg# Apollos put the system type in the environment. 14307cf0acd0Smrg 14317cf0acd0Smrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 14327cf0acd0Smrg 14337cf0acd0Smrg# Convex versions that predate uname can use getsysinfo(1) 14347cf0acd0Smrg 14357cf0acd0Smrgif [ -x /usr/convex/getsysinfo ] 14367cf0acd0Smrgthen 14377cf0acd0Smrg case `getsysinfo -f cpu_type` in 14387cf0acd0Smrg c1*) 14397cf0acd0Smrg echo c1-convex-bsd 14407cf0acd0Smrg exit ;; 14417cf0acd0Smrg c2*) 14427cf0acd0Smrg if getsysinfo -f scalar_acc 14437cf0acd0Smrg then echo c32-convex-bsd 14447cf0acd0Smrg else echo c2-convex-bsd 14457cf0acd0Smrg fi 14467cf0acd0Smrg exit ;; 14477cf0acd0Smrg c34*) 14487cf0acd0Smrg echo c34-convex-bsd 14497cf0acd0Smrg exit ;; 14507cf0acd0Smrg c38*) 14517cf0acd0Smrg echo c38-convex-bsd 14527cf0acd0Smrg exit ;; 14537cf0acd0Smrg c4*) 14547cf0acd0Smrg echo c4-convex-bsd 14557cf0acd0Smrg exit ;; 14567cf0acd0Smrg esac 14577cf0acd0Smrgfi 14587cf0acd0Smrg 14597cf0acd0Smrgcat >&2 <<EOF 14607cf0acd0Smrg$0: unable to guess system type 14617cf0acd0Smrg 14627cf0acd0SmrgThis script, last modified $timestamp, has failed to recognize 14637cf0acd0Smrgthe operating system you are using. It is advised that you 14647cf0acd0Smrgdownload the most up to date version of the config scripts from 14657cf0acd0Smrg 14667cf0acd0Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 14677cf0acd0Smrgand 14687cf0acd0Smrg http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 14697cf0acd0Smrg 14707cf0acd0SmrgIf the version you run ($0) is already up to date, please 14717cf0acd0Smrgsend the following data and any information you think might be 14727cf0acd0Smrgpertinent to <config-patches@gnu.org> in order to provide the needed 14737cf0acd0Smrginformation to handle your system. 14747cf0acd0Smrg 14757cf0acd0Smrgconfig.guess timestamp = $timestamp 14767cf0acd0Smrg 14777cf0acd0Smrguname -m = `(uname -m) 2>/dev/null || echo unknown` 14787cf0acd0Smrguname -r = `(uname -r) 2>/dev/null || echo unknown` 14797cf0acd0Smrguname -s = `(uname -s) 2>/dev/null || echo unknown` 14807cf0acd0Smrguname -v = `(uname -v) 2>/dev/null || echo unknown` 14817cf0acd0Smrg 14827cf0acd0Smrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 14837cf0acd0Smrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 14847cf0acd0Smrg 14857cf0acd0Smrghostinfo = `(hostinfo) 2>/dev/null` 14867cf0acd0Smrg/bin/universe = `(/bin/universe) 2>/dev/null` 14877cf0acd0Smrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 14887cf0acd0Smrg/bin/arch = `(/bin/arch) 2>/dev/null` 14897cf0acd0Smrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 14907cf0acd0Smrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 14917cf0acd0Smrg 14927cf0acd0SmrgUNAME_MACHINE = ${UNAME_MACHINE} 14937cf0acd0SmrgUNAME_RELEASE = ${UNAME_RELEASE} 14947cf0acd0SmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 14957cf0acd0SmrgUNAME_VERSION = ${UNAME_VERSION} 14967cf0acd0SmrgEOF 14977cf0acd0Smrg 14987cf0acd0Smrgexit 1 14997cf0acd0Smrg 15007cf0acd0Smrg# Local variables: 15017cf0acd0Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 15027cf0acd0Smrg# time-stamp-start: "timestamp='" 15037cf0acd0Smrg# time-stamp-format: "%:y-%02m-%02d" 15047cf0acd0Smrg# time-stamp-end: "'" 15057cf0acd0Smrg# End: 1506