config.guess revision 0ed7c580
11.573Sskrll#! /bin/sh 21.64Slukem# Attempt to guess a canonical system name. 31.64Slukem# Copyright 1992-2013 Free Software Foundation, Inc. 41.64Slukem 51.24Sthorpejtimestamp='2013-11-29' 61.169Stv 71.205Stv# This file is free software; you can redistribute it and/or modify it 81.13Smycroft# under the terms of the GNU General Public License as published by 91.341Slukem# the Free Software Foundation; either version 3 of the License, or 101.310Sthorpej# (at your option) any later version. 111.341Slukem# 121.495Sscw# This program is distributed in the hope that it will be useful, but 131.310Sthorpej# WITHOUT ANY WARRANTY; without even the implied warranty of 141.341Slukem# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 151.418Scl# General Public License for more details. 161.418Scl# 171.418Scl# You should have received a copy of the GNU General Public License 181.418Scl# along with this program; if not, see <http://www.gnu.org/licenses/>. 191.418Scl# 201.418Scl# As a special exception to the GNU General Public License, if you 211.418Scl# distribute this file as part of a program that contains a 221.418Scl# configuration script generated by Autoconf, you may include it under 231.418Scl# the same distribution terms that you use for the rest of that 241.418Scl# program. This Exception is an additional permission under section 7 251.418Scl# of the GNU General Public License, version 3 ("GPLv3"). 261.418Scl# 271.418Scl# Originally written by Per Bothner. 281.418Scl# 291.209Stv# You can get the latest version of this script from: 301.209Stv# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 311.209Stv# 321.341Slukem# Please send patches with a ChangeLog entry to config-patches@gnu.org. 331.209Stv 341.209Stv 351.341Slukemme=`echo "$0" | sed -e 's,.*/,,'` 361.310Sthorpej 371.403Sscwusage="\ 381.403SscwUsage: $0 [OPTION] 391.403Sscw 401.341SlukemOutput the configuration name of the system \`$me' is run on. 411.448Smrg 421.221SthorpejOperation modes: 431.477Smatt -h, --help print this help, then exit 441.519Sgmcgarry -t, --time-stamp print date of last modification, then exit 451.519Sgmcgarry -v, --version print version number, then exit 461.519Sgmcgarry 471.395SmrgReport bugs and patches to <config-patches@gnu.org>." 481.493Schs 491.476Schristosversion="\ 501.456SchristosGNU config.guess ($timestamp) 511.568Sskrll 521.573SskrllOriginally written by Per Bothner. 531.573SskrllCopyright 1992-2013 Free Software Foundation, Inc. 541.573Sskrll 551.573SskrllThis is free software; see the source for copying conditions. There is NO 561.568Sskrllwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 571.573Sskrll 581.568Sskrllhelp=" 591.221SthorpejTry \`$me --help' for more information." 601.519Sgmcgarry 611.452Smrg# Parse command line 621.352Smrgwhile test $# -gt 0 ; do 631.452Smrg case $1 in 641.450Smrg --time-stamp | --time* | -t ) 651.346Smrg echo "$timestamp" ; exit ;; 661.519Sgmcgarry --version | -v ) 671.184Stv echo "$version" ; exit ;; 681.222Sperry --help | --h* | -h ) 691.489Sdsl echo "$usage"; exit ;; 701.489Sdsl -- ) # Stop option processing 711.489Sdsl shift; break ;; 721.488Sdrochner - ) # Use stdin as input. 731.489Sdsl break ;; 741.222Sperry -* ) 751.222Sperry echo "$me: invalid option $1$help" >&2 761.222Sperry exit 1 ;; 771.222Sperry * ) 781.341Slukem break ;; 791.286Slukem esac 801.286Slukemdone 811.286Slukem 821.286Slukemif test $# != 0; then 831.287Slukem echo "$me: too many arguments$help" >&2 841.199Sjmc exit 1 851.200Sjmcfi 861.199Sjmc 871.199Sjmctrap 'exit 1' 1 2 15 881.341Slukem 891.199Sjmc# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 901.199Sjmc# compiler to aid in system detection is discouraged as it requires 911.199Sjmc# temporary files to be created and, as you can see below, it is a 921.287Slukem# headache to deal with in a portable fashion. 931.222Sperry 941.341Slukem# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 951.322Slukem# use `HOST_CC' if defined, but it is deprecated. 961.288Slukem 971.287Slukem# Portable tmp directory creation inspired by the Autoconf team. 981.287Slukem 991.287Slukemset_cc_for_build=' 1001.288Slukemtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 1011.180Stvtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 1021.287Slukem: ${TMPDIR=/tmp} ; 1031.287Slukem { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 1041.287Slukem { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 1051.286Slukem { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 1061.286Slukem { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 1071.322Slukemdummy=$tmp/dummy ; 1081.286Slukemtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 1091.286Slukemcase $CC_FOR_BUILD,$HOST_CC,$CC in 1101.310Sthorpej ,,) echo "int x;" > $dummy.c ; 1111.406Slukem for c in cc gcc c89 c99 ; do 1121.287Slukem if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 1131.286Slukem CC_FOR_BUILD="$c"; break ; 1141.287Slukem fi ; 1151.287Slukem done ; 1161.286Slukem if test x"$CC_FOR_BUILD" = x ; then 1171.468Smatt CC_FOR_BUILD=no_compiler_found ; 1181.495Sscw fi 1191.180Stv ;; 1201.180Stv ,,*) CC_FOR_BUILD=$CC ;; 1211.180Stv ,*,*) CC_FOR_BUILD=$HOST_CC ;; 1221.310Sthorpejesac ; set_cc_for_build= ;' 1231.406Slukem 1241.310Sthorpej# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 1251.180Stv# (ghazi@noc.rutgers.edu 1994-08-24) 1261.203Stvif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 1271.180Stv PATH=$PATH:/.attbin ; export PATH 1281.180Stvfi 1291.180Stv 1301.341SlukemUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 1311.204StvUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 1321.341SlukemUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 1331.204StvUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 1341.204Stv 1351.204Stvcase "${UNAME_SYSTEM}" in 1361.558SapbLinux|GNU|GNU/*) 1371.558Sapb # If the system lacks a compiler, then just pick glibc. 1381.558Sapb # We could probably try harder. 1391.559Sapb LIBC=gnu 1401.558Sapb 1411.558Sapb eval $set_cc_for_build 1421.558Sapb cat <<-EOF > $dummy.c 1431.421Sjmc #include <features.h> 1441.204Stv #if defined(__UCLIBC__) 1451.558Sapb LIBC=uclibc 1461.204Stv #elif defined(__dietlibc__) 1471.275Slukem LIBC=dietlibc 1481.275Slukem #else 1491.341Slukem LIBC=gnu 1501.204Stv #endif 1511.341Slukem EOF 1521.199Sjmc eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` 1531.339Slukem ;; 1541.204Stvesac 1551.199Sjmc 1561.180Stv# Note: order is significant - the case branches are not exclusive. 1571.341Slukem 1581.320Sthorpejcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 1591.341Slukem *:NetBSD:*:*) 1601.320Sthorpej # NetBSD (nbsd) targets should (where applicable) match one or 1611.320Sthorpej # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 1621.341Slukem # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 1631.318Sthorpej # switched to ELF, *-*-netbsd* would select the old 1641.341Slukem # object file format. This provides both forward 1651.341Slukem # compatibility and a consistent mechanism for selecting the 1661.318Sthorpej # object file format. 1671.318Sthorpej # 1681.318Sthorpej # Note: NetBSD doesn't particularly care about the vendor 1691.318Sthorpej # portion of the name. We always set it to "unknown". 1701.318Sthorpej sysctl="sysctl -n hw.machine_arch" 1711.318Sthorpej UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 1721.318Sthorpej /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 1731.318Sthorpej case "${UNAME_MACHINE_ARCH}" in 1741.318Sthorpej armeb) machine=armeb-unknown ;; 1751.318Sthorpej arm*) machine=arm-unknown ;; 1761.318Sthorpej sh3el) machine=shl-unknown ;; 1771.318Sthorpej sh3eb) machine=sh-unknown ;; 1781.318Sthorpej sh5el) machine=sh5le-unknown ;; 1791.318Sthorpej *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 1801.318Sthorpej esac 1811.341Slukem # The Operating System including object format, if it has switched 1821.204Stv # to ELF recently, or will in the future. 1831.341Slukem case "${UNAME_MACHINE_ARCH}" in 1841.232Stv arm*|i386|m68k|ns32k|sh3*|sparc|vax) 1851.232Stv eval $set_cc_for_build 1861.234Sthorpej if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 1871.234Sthorpej | grep -q __ELF__ 1881.234Sthorpej then 1891.234Sthorpej # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 1901.234Sthorpej # Return netbsd for either. FIX? 1911.234Sthorpej os=netbsd 1921.234Sthorpej else 1931.341Slukem os=netbsdelf 1941.234Sthorpej fi 1951.519Sgmcgarry ;; 1961.234Sthorpej *) 1971.234Sthorpej os=netbsd 1981.234Sthorpej ;; 1991.234Sthorpej esac 2001.234Sthorpej # The OS release 2011.341Slukem # Debian GNU/NetBSD machines have a different userland, and 2021.519Sgmcgarry # thus, need a distinct triplet. However, they do not need 2031.519Sgmcgarry # kernel version information, so it can be replaced with a 2041.519Sgmcgarry # suitable tag, in the style of linux-gnu. 2051.519Sgmcgarry case "${UNAME_VERSION}" in 2061.519Sgmcgarry Debian*) 2071.519Sgmcgarry release='-gnu' 2081.519Sgmcgarry ;; 2091.519Sgmcgarry *) 2101.519Sgmcgarry release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 2111.341Slukem ;; 2121.234Sthorpej esac 2131.338Slukem # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 2141.338Slukem # contains redundant information, the shorter form: 2151.210Sthorpej # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 2161.320Sthorpej echo "${machine}-${os}${release}" 2171.496Sjoerg exit ;; 2181.320Sthorpej *:Bitrig:*:*) 2191.215Stv UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 2201.338Slukem echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} 2211.320Sthorpej exit ;; 2221.483Schristos *:OpenBSD:*:*) 2231.320Sthorpej UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 2241.320Sthorpej echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 2251.338Slukem exit ;; 2261.426Sjmc *:ekkoBSD:*:*) 2271.426Sjmc echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 2281.426Sjmc exit ;; 2291.338Slukem *:SolidBSD:*:*) 2301.498Sjmmv echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 2311.535Sapb exit ;; 2321.338Slukem macppc:MirBSD:*:*) 2331.338Slukem echo powerpc-unknown-mirbsd${UNAME_RELEASE} 2341.338Slukem exit ;; 2351.338Slukem *:MirBSD:*:*) 2361.338Slukem echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 2371.338Slukem exit ;; 2381.338Slukem alpha:OSF1:*:*) 2391.338Slukem case $UNAME_RELEASE in 2401.532Sapb *4.0) 2411.338Slukem UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 2421.532Sapb ;; 2431.338Slukem *5.*) 2441.439Sthorpej UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 2451.338Slukem ;; 2461.446Sjmc esac 2471.557Ssketch # According to Compaq, /usr/sbin/psrinfo has been available on 2481.338Slukem # OSF/1 and Tru64 systems produced since 1995. I hope that 2491.338Slukem # covers most systems running today. This code pipes the CPU 2501.427Sjmc # types through head -n 1, so we only detect the type of CPU 0. 2511.510Sskrll ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 2521.338Slukem case "$ALPHA_CPU_TYPE" in 2531.338Slukem "EV4 (21064)") 2541.338Slukem UNAME_MACHINE="alpha" ;; 2551.492Sapb "EV4.5 (21064)") 2561.338Slukem UNAME_MACHINE="alpha" ;; 2571.405Smatt "LCA4 (21066/21068)") 2581.338Slukem UNAME_MACHINE="alpha" ;; 2591.338Slukem "EV5 (21164)") 2601.338Slukem UNAME_MACHINE="alphaev5" ;; 2611.338Slukem "EV5.6 (21164A)") 2621.338Slukem UNAME_MACHINE="alphaev56" ;; 2631.425Sjmc "EV5.6 (21164PC)") 2641.338Slukem UNAME_MACHINE="alphapca56" ;; 2651.338Slukem "EV5.7 (21164PC)") 2661.338Slukem UNAME_MACHINE="alphapca57" ;; 2671.338Slukem "EV6 (21264)") 2681.338Slukem UNAME_MACHINE="alphaev6" ;; 2691.338Slukem "EV6.7 (21264A)") 2701.338Slukem UNAME_MACHINE="alphaev67" ;; 2711.338Slukem "EV6.8CB (21264C)") 2721.338Slukem UNAME_MACHINE="alphaev68" ;; 2731.506Sgarbled "EV6.8AL (21264B)") 2741.338Slukem UNAME_MACHINE="alphaev68" ;; 2751.338Slukem "EV6.8CX (21264D)") 2761.338Slukem UNAME_MACHINE="alphaev68" ;; 2771.338Slukem "EV6.9A (21264/EV69A)") 2781.340Slukem UNAME_MACHINE="alphaev69" ;; 2791.338Slukem "EV7 (21364)") 2801.338Slukem UNAME_MACHINE="alphaev7" ;; 2811.501Snakayama "EV7.9 (21364A)") 2821.454Sgdamore UNAME_MACHINE="alphaev79" ;; 2831.338Slukem esac 2841.532Sapb # A Pn.n version is a patched version. 2851.342Slukem # A Vn.n version is a released version. 2861.530Sapb # A Tn.n version is a released field test version. 2871.338Slukem # A Xn.n version is an unreleased experimental baselevel. 2881.338Slukem # 1.2 uses "1.2" for uname -r. 2891.338Slukem echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2901.338Slukem # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 2911.338Slukem exitcode=$? 2921.180Stv trap '' 0 2931.538Sapb exit $exitcode ;; 2941.538Sapb Alpha\ *:Windows_NT*:*) 2951.538Sapb # How do we know it's Interix rather than the generic POSIX subsystem? 2961.538Sapb # Should we change UNAME_MACHINE based on the output of uname instead 2971.538Sapb # of the specific Alpha model? 2981.538Sapb echo alpha-pc-interix 2991.538Sapb exit ;; 3001.538Sapb 21064:Windows_NT:50:3) 3011.538Sapb echo alpha-dec-winnt3.5 3021.538Sapb exit ;; 3031.538Sapb Amiga*:UNIX_System_V:4.0:*) 3041.538Sapb echo m68k-unknown-sysv4 3051.538Sapb exit ;; 3061.538Sapb *:[Aa]miga[Oo][Ss]:*:*) 3071.538Sapb echo ${UNAME_MACHINE}-unknown-amigaos 3081.538Sapb exit ;; 3091.538Sapb *:[Mm]orph[Oo][Ss]:*:*) 3101.538Sapb echo ${UNAME_MACHINE}-unknown-morphos 3111.538Sapb exit ;; 3121.538Sapb *:OS/390:*:*) 3131.538Sapb echo i370-ibm-openedition 3141.538Sapb exit ;; 3151.538Sapb *:z/VM:*:*) 3161.557Ssketch echo s390-ibm-zvmoe 3171.538Sapb exit ;; 3181.538Sapb *:OS400:*:*) 3191.538Sapb echo powerpc-ibm-os400 3201.538Sapb exit ;; 3211.538Sapb arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 3221.538Sapb echo arm-acorn-riscix${UNAME_RELEASE} 3231.538Sapb exit ;; 3241.538Sapb arm*:riscos:*:*|arm*:RISCOS:*:*) 3251.538Sapb echo arm-unknown-riscos 3261.538Sapb exit ;; 3271.538Sapb SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 3281.538Sapb echo hppa1.1-hitachi-hiuxmpp 3291.538Sapb exit ;; 3301.538Sapb Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 3311.538Sapb # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 3321.538Sapb if test "`(/bin/universe) 2>/dev/null`" = att ; then 3331.538Sapb echo pyramid-pyramid-sysv3 3341.538Sapb else 3351.538Sapb echo pyramid-pyramid-bsd 3361.538Sapb fi 3371.538Sapb exit ;; 3381.538Sapb NILE*:*:*:dcosx) 3391.538Sapb echo pyramid-pyramid-svr4 3401.538Sapb exit ;; 3411.538Sapb DRS?6000:unix:4.0:6*) 3421.538Sapb echo sparc-icl-nx6 3431.538Sapb exit ;; 3441.538Sapb DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 3451.538Sapb case `/usr/bin/uname -p` in 3461.538Sapb sparc) echo sparc-icl-nx7; exit ;; 3471.538Sapb esac ;; 3481.538Sapb s390x:SunOS:*:*) 3491.538Sapb echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3501.538Sapb exit ;; 3511.538Sapb sun4H:SunOS:5.*:*) 3521.538Sapb echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3531.538Sapb exit ;; 3541.538Sapb sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 3551.538Sapb echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3561.538Sapb exit ;; 3571.538Sapb i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 3581.538Sapb echo i386-pc-auroraux${UNAME_RELEASE} 3591.538Sapb exit ;; 3601.538Sapb i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 3611.538Sapb eval $set_cc_for_build 3621.538Sapb SUN_ARCH="i386" 3631.272Slukem # If there is a compiler, see if it is configured for 64-bit objects. 3641.341Slukem # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 3651.272Slukem # This test works for both compilers. 3661.272Slukem if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 3671.272Slukem if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 3681.272Slukem (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 3691.272Slukem grep IS_64BIT_ARCH >/dev/null 3701.272Slukem then 3711.272Slukem SUN_ARCH="x86_64" 3721.272Slukem fi 3731.272Slukem fi 3741.272Slukem echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3751.272Slukem exit ;; 3761.272Slukem sun4*:SunOS:6*:*) 3771.272Slukem # According to config.sub, this is the proper way to canonicalize 3781.272Slukem # SunOS6. Hard to guess exactly what SunOS6 will be like, but 3791.272Slukem # it's likely to be more like Solaris than SunOS4. 3801.272Slukem echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 3811.272Slukem exit ;; 3821.272Slukem sun4*:SunOS:*:*) 3831.272Slukem case "`/usr/bin/arch -k`" in 3841.272Slukem Series*|S4*) 3851.272Slukem UNAME_RELEASE=`uname -v` 3861.272Slukem ;; 3871.272Slukem esac 3881.341Slukem # Japanese Language versions have a version number like `4.1.3-JL'. 3891.341Slukem echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 3901.180Stv exit ;; 3911.180Stv sun3*:SunOS:*:*) 3921.180Stv echo m68k-sun-sunos${UNAME_RELEASE} 3931.341Slukem exit ;; 3941.180Stv sun*:*:4.2BSD:*) 3951.341Slukem UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 3961.287Slukem test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 3971.341Slukem case "`/bin/arch`" in 3981.306Slukem sun3) 3991.306Slukem echo m68k-sun-sunos${UNAME_RELEASE} 4001.306Slukem ;; 4011.306Slukem sun4) 4021.315Sthorpej echo sparc-sun-sunos${UNAME_RELEASE} 4031.315Sthorpej ;; 4041.315Sthorpej esac 4051.315Sthorpej exit ;; 4061.311Slukem aushp:SunOS:*:*) 4071.306Slukem echo sparc-auspex-sunos${UNAME_RELEASE} 4081.341Slukem exit ;; 4091.287Slukem # The situation for MiNT is a little confusing. The machine name 4101.287Slukem # can be virtually everything (everything which is not 4111.287Slukem # "atarist" or "atariste" at least should have a processor 4121.287Slukem # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 4131.287Slukem # to the lowercase version "mint" (or "freemint"). Finally 4141.288Slukem # the system name "TOS" denotes a system which is actually not 4151.1Scgd # MiNT. But MiNT is downward compatible to TOS, so this should 4161.61Slukem # be no problem. 4171.61Slukem atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 4181.1Scgd echo m68k-atari-mint${UNAME_RELEASE} 4191.4Smycroft exit ;; 4201.17Sbrezak atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 4211.31Schristos echo m68k-atari-mint${UNAME_RELEASE} 4221.61Slukem exit ;; 4231.61Slukem *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 4241.4Smycroft echo m68k-atari-mint${UNAME_RELEASE} 4251.524Slukem exit ;; 4261.115Stv milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 4271.115Stv echo m68k-milan-mint${UNAME_RELEASE} 4281.115Stv exit ;; 4291.115Stv hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 4301.115Stv echo m68k-hades-mint${UNAME_RELEASE} 4311.4Smycroft exit ;; 4321.4Smycroft *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 4331.315Sthorpej echo m68k-unknown-mint${UNAME_RELEASE} 4341.4Smycroft exit ;; 4351.4Smycroft m68k:machten:*:*) 4361.4Smycroft echo m68k-apple-machten${UNAME_RELEASE} 4371.4Smycroft exit ;; 4381.4Smycroft powerpc:machten:*:*) 4391.135Ssimonb echo powerpc-apple-machten${UNAME_RELEASE} 4401.136Ssimonb exit ;; 4411.61Slukem RISC*:Mach:*:*) 4421.61Slukem echo mips-dec-mach_bsd4.3 4431.135Ssimonb exit ;; 4441.15Sjtc RISC*:ULTRIX:*:*) 4451.15Sjtc echo mips-dec-ultrix${UNAME_RELEASE} 4461.61Slukem exit ;; 4471.61Slukem VAX*:ULTRIX*:*:*) 4481.15Sjtc echo vax-dec-ultrix${UNAME_RELEASE} 4491.25Sexplorer exit ;; 4501.508Sad 2020:CLIX:*:* | 2430:CLIX:*:*) 4511.508Sad echo clipper-intergraph-clix${UNAME_RELEASE} 4521.508Sad exit ;; 4531.508Sad mips:*:*:UMIPS | mips:*:*:RISCos) 4541.155Sitojun eval $set_cc_for_build 4551.155Sitojun sed 's/^ //' << EOF >$dummy.c 4561.155Sitojun#ifdef __cplusplus 4571.155Sitojun#include <stdio.h> /* for printf() prototype */ 4581.1Scgd int main (int argc, char *argv[]) { 4591.453Srpaulo#else 4601.453Srpaulo int main (argc, argv) int argc; char *argv[]; { 4611.453Srpaulo#endif 4621.453Srpaulo #if defined (host_mips) && defined (MIPSEB) 4631.453Srpaulo #if defined (SYSTYPE_SYSV) 4641.465Slukem printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 4651.465Slukem #endif 4661.465Slukem #if defined (SYSTYPE_SVR4) 4671.465Slukem printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 4681.465Slukem #endif 4691.341Slukem #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 4701.341Slukem printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 4711.264Sthorpej #endif 4721.264Sthorpej #endif 4731.264Sthorpej exit (-1); 4741.296Sthorpej } 4751.264SthorpejEOF 4761.499Ssimonb $CC_FOR_BUILD -o $dummy $dummy.c && 4771.341Slukem dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 4781.264Sthorpej SYSTEM_NAME=`$dummy $dummyarg` && 4791.264Sthorpej { echo "$SYSTEM_NAME"; exit; } 4801.341Slukem echo mips-mips-riscos${UNAME_RELEASE} 4811.310Sthorpej exit ;; 4821.341Slukem Motorola:PowerMAX_OS:*:*) 4831.406Slukem echo powerpc-motorola-powermax 4841.572Sskrll exit ;; 4851.310Sthorpej Motorola:*:4.3:PL8-*) 4861.310Sthorpej echo powerpc-harris-powermax 4871.310Sthorpej exit ;; 4881.310Sthorpej Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 4891.341Slukem echo powerpc-harris-powermax 4901.310Sthorpej exit ;; 4911.572Sskrll Night_Hawk:Power_UNIX:*:*) 4921.310Sthorpej echo powerpc-harris-powerunix 4931.341Slukem exit ;; 4941.310Sthorpej m88k:CX/UX:7*:*) 4951.310Sthorpej echo m88k-harris-cxux7 4961.310Sthorpej exit ;; 4971.310Sthorpej m88k:*:4*:R4*) 4981.341Slukem echo m88k-motorola-sysv4 4991.165Sfredette exit ;; 5001.341Slukem m88k:*:3*:R3*) 5011.165Sfredette echo m88k-motorola-sysv3 5021.230Stv exit ;; 5031.458Smrg AViiON:dgux:*:*) 5041.458Smrg # DG/UX returns AViiON for all architectures 5051.458Smrg UNAME_PROCESSOR=`/usr/bin/uname -p` 5061.519Sgmcgarry if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 5071.458Smrg then 5081.458Smrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 5091.32Sthorpej [ ${TARGET_BINARY_INTERFACE}x = x ] 5101.122Ssimonb then 5111.341Slukem echo m88k-dg-dgux${UNAME_RELEASE} 5121.441Sskrll else 5131.441Sskrll echo m88k-dg-dguxbcs${UNAME_RELEASE} 5141.441Sskrll fi 5151.441Sskrll else 5161.472Sskrll echo i586-dg-dgux${UNAME_RELEASE} 5171.441Sskrll fi 5181.441Sskrll exit ;; 5191.441Sskrll M88*:DolphinOS:*:*) # DolphinOS (SVR3) 5201.327Sthorpej echo m88k-dolphin-sysv3 5211.327Sthorpej exit ;; 5221.341Slukem M88*:*:R3*:*) 5231.327Sthorpej # Delta 88k system running SVR3 5241.327Sthorpej echo m88k-motorola-sysv3 5251.327Sthorpej exit ;; 5261.327Sthorpej XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 5271.341Slukem echo m88k-tektronix-sysv3 5281.327Sthorpej exit ;; 5291.401Smatt Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 5301.401Smatt echo m68k-tektronix-bsd 5311.341Slukem exit ;; 5321.494Smatt *:IRIX*:*:*) 5331.494Smatt echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 5341.327Sthorpej exit ;; 5351.327Sthorpej ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 5361.341Slukem echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 5371.122Ssimonb exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 5381.122Ssimonb i*86:AIX:*:*) 5391.122Ssimonb echo i386-ibm-aix 5401.341Slukem exit ;; 5411.122Ssimonb ia64:AIX:*:*) 5421.69Stv if [ -x /usr/bin/oslevel ] ; then 5431.341Slukem IBM_REV=`/usr/bin/oslevel` 5441.69Stv else 5451.341Slukem IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 5461.494Smatt fi 5471.560Sdrochner echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 5481.560Sdrochner exit ;; 5491.563Sad *:AIX:2:3) 5501.563Sad if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 5511.261Sthorpej eval $set_cc_for_build 5521.150Sitojun sed 's/^ //' << EOF >$dummy.c 5531.236Sthorpej #include <sys/systemcfg.h> 5541.468Smatt 5551.172Stv main() 5561.161Stv { 5571.341Slukem if (!__power_pc()) 5581.161Stv exit(1); 5591.161Stv puts("powerpc-ibm-aix3.2.5"); 5601.341Slukem exit(0); 5611.162Stv } 5621.192SthorpejEOF 5631.294Sthorpej if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 5641.168Smatt then 5651.494Smatt echo "$SYSTEM_NAME" 5661.235Sthorpej else 5671.236Sthorpej echo rs6000-ibm-aix3.2.5 5681.168Smatt fi 5691.168Smatt elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 5701.318Sthorpej echo rs6000-ibm-aix3.2.4 5711.161Stv else 5721.318Sthorpej echo rs6000-ibm-aix3.2 5731.161Stv fi 5741.153Sitojun exit ;; 5751.553Spooka *:AIX:*:[4567]) 5761.553Spooka IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 5771.553Spooka if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 5781.553Spooka IBM_ARCH=rs6000 5791.553Spooka else 5801.553Spooka IBM_ARCH=powerpc 5811.553Spooka fi 5821.553Spooka if [ -x /usr/bin/oslevel ] ; then 5831.160Stv IBM_REV=`/usr/bin/oslevel` 5841.521Slukem else 5851.485Sdsl IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 5861.128Sperry fi 5871.142Sphil echo ${IBM_ARCH}-ibm-aix${IBM_REV} 5881.521Slukem exit ;; 5891.485Sdsl *:AIX:*:*) 5901.485Sdsl echo rs6000-ibm-aix 5911.58Sagc exit ;; 5921.406Slukem ibmrt:4.4BSD:*|romp-ibm:BSD:*) 5931.56Sdrochner echo romp-ibm-bsd4.4 5941.485Sdsl exit ;; 5951.485Sdsl ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 5961.485Sdsl echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 5971.485Sdsl exit ;; # report: romp-ibm BSD 4.3 5981.485Sdsl *:BOSX:*:*) 5991.485Sdsl echo rs6000-bull-bosx 6001.485Sdsl exit ;; 6011.485Sdsl DPX/2?00:B.O.S.:*:*) 6021.485Sdsl echo m68k-bull-sysv3 6031.485Sdsl exit ;; 6041.485Sdsl 9000/[34]??:4.3bsd:1.*:*) 6051.485Sdsl echo m68k-hp-bsd 6061.485Sdsl exit ;; 6071.485Sdsl hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 6081.205Stv echo m68k-hp-bsd4.4 6091.205Stv exit ;; 6101.205Stv 9000/[34678]??:HP-UX:*:*) 6111.132Smycroft HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 6121.116Slukem case "${UNAME_MACHINE}" in 6131.341Slukem 9000/31? ) HP_ARCH=m68000 ;; 6141.116Slukem 9000/[34]?? ) HP_ARCH=m68k ;; 6151.350Slukem 9000/[678][0-9][0-9]) 6161.116Slukem if [ -x /usr/bin/getconf ]; then 6171.340Slukem sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 6181.116Slukem sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 6191.466Slukem case "${sc_cpu_version}" in 6201.466Slukem 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 6211.466Slukem 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 6221.116Slukem 532) # CPU_PA_RISC2_0 6231.341Slukem case "${sc_kernel_bits}" in 6241.230Stv 32) HP_ARCH="hppa2.0n" ;; 6251.230Stv 64) HP_ARCH="hppa2.0w" ;; 6261.341Slukem '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 6271.503Sdholland esac ;; 6281.503Sdholland esac 6291.503Sdholland fi 6301.422Slukem if [ "${HP_ARCH}" = "" ]; then 6311.534Sapb eval $set_cc_for_build 6321.503Sdholland sed 's/^ //' << EOF >$dummy.c 6331.503Sdholland 6341.503Sdholland #define _HPUX_SOURCE 6351.230Stv #include <stdlib.h> 6361.230Stv #include <unistd.h> 6371.268Sross 6381.341Slukem int main () 6391.341Slukem { 6401.341Slukem #if defined(_SC_KERNEL_BITS) 6411.341Slukem long bits = sysconf(_SC_KERNEL_BITS); 6421.341Slukem #endif 6431.341Slukem long cpu = sysconf (_SC_CPU_VERSION); 6441.268Sross 6451.341Slukem switch (cpu) 6461.230Stv { 6471.536Smrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 6481.536Smrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 6491.536Smrg case CPU_PA_RISC2_0: 6501.536Smrg #if defined(_SC_KERNEL_BITS) 6511.536Smrg switch (bits) 6521.536Smrg { 6531.536Smrg case 64: puts ("hppa2.0w"); break; 6541.536Smrg case 32: puts ("hppa2.0n"); break; 6551.536Smrg default: puts ("hppa2.0"); break; 6561.536Smrg } break; 6571.341Slukem #else /* !defined(_SC_KERNEL_BITS) */ 6581.572Sskrll puts ("hppa2.0"); break; 6591.572Sskrll #endif 6601.572Sskrll default: puts ("hppa1.0"); break; 6611.572Sskrll } 6621.572Sskrll exit (0); 6631.572Sskrll } 6641.572SskrllEOF 6651.230Stv (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 6661.341Slukem test -z "$HP_ARCH" && HP_ARCH=hppa 6671.422Slukem fi ;; 6681.514Sgmcgarry esac 6691.572Sskrll if [ ${HP_ARCH} = "hppa2.0w" ] 6701.514Sgmcgarry then 6711.504Slukem eval $set_cc_for_build 6721.504Slukem 6731.524Slukem # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 6741.504Slukem # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 6751.504Slukem # generating 64-bit code. GNU and HP use different nomenclature: 6761.570Sdyoung # 6771.513Swiz # $ CC_FOR_BUILD=cc ./config.guess 6781.504Slukem # => hppa2.0w-hp-hpux11.23 6791.525Schristos # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 6801.504Slukem # => hppa64-hp-hpux11.23 6811.519Sgmcgarry 6821.519Sgmcgarry if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 6831.504Slukem grep -q __LP64__ 6841.567Smrg then 6851.504Slukem HP_ARCH="hppa2.0w" 6861.504Slukem else 6871.230Stv HP_ARCH="hppa64" 6881.230Stv fi 6891.341Slukem fi 6901.230Stv echo ${HP_ARCH}-hp-hpux${HPUX_REV} 6911.341Slukem exit ;; 6921.422Slukem ia64:HP-UX:*:*) 6931.504Slukem HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 6941.552Sagc echo ia64-hp-hpux${HPUX_REV} 6951.547Sad exit ;; 6961.514Sgmcgarry 3050*:HI-UX:*:*) 6971.541Sagc eval $set_cc_for_build 6981.552Sagc sed 's/^ //' << EOF >$dummy.c 6991.504Slukem #include <unistd.h> 7001.230Stv int 7011.230Stv main () 7021.341Slukem { 7031.544Smrg long cpu = sysconf (_SC_CPU_VERSION); 7041.544Smrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 7051.561Sbouyer true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 7061.561Sbouyer results, however. */ 7071.561Sbouyer if (CPU_IS_PA_RISC (cpu)) 7081.561Sbouyer { 7091.561Sbouyer switch (cpu) 7101.561Sbouyer { 7111.561Sbouyer case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 7121.561Sbouyer case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 7131.555Sabs case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 7141.555Sabs default: puts ("hppa-hitachi-hiuxwe2"); break; 7151.544Smrg } 7161.544Smrg } 7171.544Smrg else if (CPU_IS_HP_MC68K (cpu)) 7181.544Smrg puts ("m68k-hitachi-hiuxwe2"); 7191.230Stv else puts ("unknown-hitachi-hiuxwe2"); 7201.341Slukem exit (0); 7211.341Slukem } 7221.230StvEOF 7231.230Stv $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 7241.340Slukem { echo "$SYSTEM_NAME"; exit; } 7251.340Slukem echo unknown-hitachi-hiuxwe2 7261.340Slukem exit ;; 7271.341Slukem 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 7281.340Slukem echo hppa1.1-hp-bsd 7291.116Slukem exit ;; 7301.116Slukem 9000/8??:4.3bsd:*:*) 7311.117Slukem echo hppa1.0-hp-bsd 7321.507Slukem exit ;; 7331.230Stv *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 7341.230Stv echo hppa1.0-hp-mpeix 7351.327Sthorpej exit ;; 7361.327Sthorpej hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 7371.327Sthorpej echo hppa1.1-hp-osf 7381.327Sthorpej exit ;; 7391.116Slukem hp8??:OSF1:*:*) 7401.116Slukem echo hppa1.0-hp-osf 7411.230Stv exit ;; 7421.230Stv i*86:OSF1:*:*) 7431.116Slukem if [ -x /usr/sbin/sysversion ] ; then 7441.116Slukem echo ${UNAME_MACHINE}-unknown-osf1mk 7451.117Slukem else 7461.230Stv echo ${UNAME_MACHINE}-unknown-osf1 7471.230Stv fi 7481.230Stv exit ;; 7491.341Slukem parisc*:Lites*:*:*) 7501.230Stv echo hppa1.1-hp-lites 7511.230Stv exit ;; 7521.116Slukem C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 7531.276Sthorpej echo c1-convex-bsd 7541.341Slukem exit ;; 7551.341Slukem C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 7561.341Slukem if getsysinfo -f scalar_acc 7571.341Slukem then echo c32-convex-bsd 7581.341Slukem else echo c2-convex-bsd 7591.341Slukem fi 7601.341Slukem exit ;; 7611.341Slukem C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 7621.341Slukem echo c34-convex-bsd 7631.341Slukem exit ;; 7641.341Slukem C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 7651.444Schristos echo c38-convex-bsd 7661.341Slukem exit ;; 7671.341Slukem C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 7681.341Slukem echo c4-convex-bsd 7691.341Slukem exit ;; 7701.341Slukem CRAY*Y-MP:*:*:*) 7711.562Sapb echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7721.341Slukem exit ;; 7731.341Slukem CRAY*[A-Z]90:*:*:*) 7741.341Slukem echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 7751.341Slukem | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 7761.341Slukem -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 7771.410Slukem -e 's/\.[^.]*$/.X/' 7781.341Slukem exit ;; 7791.406Slukem CRAY*TS:*:*:*) 7801.341Slukem echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7811.341Slukem exit ;; 7821.341Slukem CRAY*T3E:*:*:*) 7831.341Slukem echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7841.341Slukem exit ;; 7851.440Sdyoung CRAY*SV1:*:*:*) 7861.440Sdyoung echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7871.341Slukem exit ;; 7881.341Slukem *:UNICOS/mp:*:*) 7891.341Slukem echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 7901.351Slukem exit ;; 7911.351Slukem F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 7921.351Slukem FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 7931.351Slukem FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 7941.433Slukem FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 7951.433Slukem echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 7961.433Slukem exit ;; 7971.505Slukem 5000:UNIX_System_V:4.*:*) 7981.505Slukem FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 7991.505Slukem FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 8001.505Slukem echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 8011.505Slukem exit ;; 8021.505Slukem i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 8031.505Slukem echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 8041.433Slukem exit ;; 8051.433Slukem sparc*:BSD/OS:*:*) 8061.351Slukem echo sparc-unknown-bsdi${UNAME_RELEASE} 8071.351Slukem exit ;; 8081.341Slukem *:BSD/OS:*:*) 8091.512Slukem echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 8101.504Slukem exit ;; 8111.504Slukem *:FreeBSD:*:*) 8121.276Sthorpej UNAME_PROCESSOR=`/usr/bin/uname -p` 8131.504Slukem case ${UNAME_PROCESSOR} in 8141.276Sthorpej amd64) 8151.351Slukem echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 8161.351Slukem *) 8171.351Slukem echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 8181.351Slukem esac 8191.351Slukem exit ;; 8201.504Slukem i*:CYGWIN*:*) 8211.504Slukem echo ${UNAME_MACHINE}-pc-cygwin 8221.497Sad exit ;; 8231.300Stron *:MINGW64*:*) 8241.341Slukem echo ${UNAME_MACHINE}-pc-mingw64 8251.445Sjmc exit ;; 8261.445Sjmc *:MINGW*:*) 8271.480Smrg echo ${UNAME_MACHINE}-pc-mingw32 8281.504Slukem exit ;; 8291.480Smrg i*:MSYS*:*) 8301.357Slukem echo ${UNAME_MACHINE}-pc-msys 8311.357Slukem exit ;; 8321.522Smrg i*:windows32*:*) 8331.357Slukem # uname -m includes "-pc" on this system. 8341.357Slukem echo ${UNAME_MACHINE}-mingw32 8351.357Slukem exit ;; 8361.357Slukem i*:PW*:*) 8371.544Smrg echo ${UNAME_MACHINE}-pc-pw32 8381.522Smrg exit ;; 8391.522Smrg *:Interix*:*) 8401.357Slukem case ${UNAME_MACHINE} in 8411.522Smrg x86) 8421.357Slukem echo i586-pc-interix${UNAME_RELEASE} 8431.417Slukem exit ;; 8441.357Slukem authenticamd | genuineintel | EM64T) 8451.357Slukem echo x86_64-unknown-interix${UNAME_RELEASE} 8461.357Slukem exit ;; 8471.357Slukem IA64) 8481.357Slukem echo ia64-unknown-interix${UNAME_RELEASE} 8491.417Slukem exit ;; 8501.516Smrg esac ;; 8511.516Smrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 8521.516Smrg echo i${UNAME_MACHINE}-pc-mks 8531.516Smrg exit ;; 8541.516Smrg 8664:Windows_NT:*) 8551.516Smrg echo x86_64-pc-mks 8561.564Smrg exit ;; 8571.516Smrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 8581.564Smrg # How do we know it's Interix rather than the generic POSIX subsystem? 8591.516Smrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 8601.516Smrg # UNAME_MACHINE based on the output of uname instead of i386? 8611.516Smrg echo i586-pc-interix 8621.516Smrg exit ;; 8631.516Smrg i*:UWIN*:*) 8641.565Smrg echo ${UNAME_MACHINE}-pc-uwin 8651.516Smrg exit ;; 8661.516Smrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 8671.516Smrg echo x86_64-unknown-cygwin 8681.516Smrg exit ;; 8691.516Smrg p*:CYGWIN*:*) 8701.516Smrg echo powerpcle-unknown-cygwin 8711.566Smrg exit ;; 8721.517Smrg prep*:SunOS:5.*:*) 8731.516Smrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 8741.546Scube exit ;; 8751.516Smrg *:GNU:*:*) 8761.516Smrg # the GNU system 8771.516Smrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 8781.516Smrg exit ;; 8791.516Smrg *:GNU/*:*:*) 8801.516Smrg # other systems with GNU libc and userland 8811.516Smrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} 8821.516Smrg exit ;; 8831.516Smrg i*86:Minix:*:*) 8841.526Smrg echo ${UNAME_MACHINE}-pc-minix 8851.516Smrg exit ;; 8861.516Smrg aarch64:Linux:*:*) 8871.516Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 8881.516Smrg exit ;; 8891.516Smrg aarch64_be:Linux:*:*) 8901.516Smrg UNAME_MACHINE=aarch64_be 8911.516Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 8921.516Smrg exit ;; 8931.554Stron alpha:Linux:*:*) 8941.516Smrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 8951.516Smrg EV5) UNAME_MACHINE=alphaev5 ;; 8961.516Smrg EV56) UNAME_MACHINE=alphaev56 ;; 8971.518Smrg PCA56) UNAME_MACHINE=alphapca56 ;; 8981.518Smrg PCA57) UNAME_MACHINE=alphapca56 ;; 8991.518Smrg EV6) UNAME_MACHINE=alphaev6 ;; 9001.518Smrg EV67) UNAME_MACHINE=alphaev67 ;; 9011.518Smrg EV68*) UNAME_MACHINE=alphaev68 ;; 9021.518Smrg esac 9031.545Smacallan objdump --private-headers /bin/sh | grep -q ld.so.1 9041.543Smacallan if test "$?" = 0 ; then LIBC="gnulibc1" ; fi 9051.571Smacallan echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9061.571Smacallan exit ;; 9071.543Smacallan arc:Linux:*:* | arceb:Linux:*:*) 9081.518Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9091.518Smrg exit ;; 9101.518Smrg arm*:Linux:*:*) 9111.544Smrg eval $set_cc_for_build 9121.516Smrg if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 9131.516Smrg | grep -q __ARM_EABI__ 9141.516Smrg then 9151.516Smrg echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9161.516Smrg else 9171.374Slukem if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 9181.374Slukem | grep -q __ARM_PCS_VFP 9191.374Slukem then 9201.414Slukem echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi 9211.414Slukem else 9221.414Slukem echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf 9231.414Slukem fi 9241.414Slukem fi 9251.414Slukem exit ;; 9261.414Slukem avr32*:Linux:*:*) 9271.414Slukem echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9281.414Slukem exit ;; 9291.414Slukem cris:Linux:*:*) 9301.414Slukem echo ${UNAME_MACHINE}-axis-linux-${LIBC} 9311.414Slukem exit ;; 9321.414Slukem crisv32:Linux:*:*) 9331.414Slukem echo ${UNAME_MACHINE}-axis-linux-${LIBC} 9341.414Slukem exit ;; 9351.414Slukem frv:Linux:*:*) 9361.414Slukem echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9371.414Slukem exit ;; 9381.414Slukem hexagon:Linux:*:*) 9391.414Slukem echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9401.414Slukem exit ;; 9411.414Slukem i*86:Linux:*:*) 9421.414Slukem echo ${UNAME_MACHINE}-pc-linux-${LIBC} 9431.374Slukem exit ;; 9441.549Sapb ia64:Linux:*:*) 9451.549Sapb echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9461.549Sapb exit ;; 9471.549Sapb m32r*:Linux:*:*) 9481.549Sapb echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9491.374Slukem exit ;; 9501.374Slukem m68*:Linux:*:*) 9511.374Slukem echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9521.374Slukem exit ;; 9531.374Slukem mips:Linux:*:* | mips64:Linux:*:*) 9541.374Slukem eval $set_cc_for_build 9551.374Slukem sed 's/^ //' << EOF >$dummy.c 9561.380Slukem #undef CPU 9571.374Slukem #undef ${UNAME_MACHINE} 9581.374Slukem #undef ${UNAME_MACHINE}el 9591.374Slukem #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 9601.374Slukem CPU=${UNAME_MACHINE}el 9611.380Slukem #else 9621.549Sapb #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 9631.374Slukem CPU=${UNAME_MACHINE} 9641.374Slukem #else 9651.374Slukem CPU= 9661.380Slukem #endif 9671.549Sapb #endif 9681.549SapbEOF 9691.549Sapb eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 9701.549Sapb test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } 9711.549Sapb ;; 9721.549Sapb or1k:Linux:*:*) 9731.549Sapb echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9741.374Slukem exit ;; 9751.374Slukem or32:Linux:*:*) 9761.374Slukem echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 9771.374Slukem exit ;; 9781.374Slukem padre:Linux:*:*) 9791.374Slukem echo sparc-unknown-linux-${LIBC} 9801.374Slukem exit ;; 9811.374Slukem parisc64:Linux:*:* | hppa64:Linux:*:*) 9821.374Slukem echo hppa64-unknown-linux-${LIBC} 9831.374Slukem exit ;; 9841.391Slukem parisc:Linux:*:* | hppa:Linux:*:*) 9851.391Slukem # Look for CPU level 9861.391Slukem case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 9871.374Slukem PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; 9881.394Slukem PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; 9891.394Slukem *) echo hppa-unknown-linux-${LIBC} ;; 9901.394Slukem esac 9911.394Slukem exit ;; 9921.394Slukem ppc64:Linux:*:*) 9931.394Slukem echo powerpc64-unknown-linux-${LIBC} 9941.394Slukem exit ;; 9951.394Slukem ppc:Linux:*:*) 9961.394Slukem echo powerpc-unknown-linux-${LIBC} 9971.64Slukem exit ;; 9981.347Slukem ppc64le:Linux:*:*) 999 echo powerpc64le-unknown-linux-${LIBC} 1000 exit ;; 1001 ppcle:Linux:*:*) 1002 echo powerpcle-unknown-linux-${LIBC} 1003 exit ;; 1004 s390:Linux:*:* | s390x:Linux:*:*) 1005 echo ${UNAME_MACHINE}-ibm-linux-${LIBC} 1006 exit ;; 1007 sh64*:Linux:*:*) 1008 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1009 exit ;; 1010 sh*:Linux:*:*) 1011 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1012 exit ;; 1013 sparc:Linux:*:* | sparc64:Linux:*:*) 1014 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1015 exit ;; 1016 tile*:Linux:*:*) 1017 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1018 exit ;; 1019 vax:Linux:*:*) 1020 echo ${UNAME_MACHINE}-dec-linux-${LIBC} 1021 exit ;; 1022 x86_64:Linux:*:*) 1023 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1024 exit ;; 1025 xtensa*:Linux:*:*) 1026 echo ${UNAME_MACHINE}-unknown-linux-${LIBC} 1027 exit ;; 1028 i*86:DYNIX/ptx:4*:*) 1029 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1030 # earlier versions are messed up and put the nodename in both 1031 # sysname and nodename. 1032 echo i386-sequent-sysv4 1033 exit ;; 1034 i*86:UNIX_SV:4.2MP:2.*) 1035 # Unixware is an offshoot of SVR4, but it has its own version 1036 # number series starting with 2... 1037 # I am not positive that other SVR4 systems won't match this, 1038 # I just have to hope. -- rms. 1039 # Use sysv4.2uw... so that sysv4* matches it. 1040 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1041 exit ;; 1042 i*86:OS/2:*:*) 1043 # If we were able to find `uname', then EMX Unix compatibility 1044 # is probably installed. 1045 echo ${UNAME_MACHINE}-pc-os2-emx 1046 exit ;; 1047 i*86:XTS-300:*:STOP) 1048 echo ${UNAME_MACHINE}-unknown-stop 1049 exit ;; 1050 i*86:atheos:*:*) 1051 echo ${UNAME_MACHINE}-unknown-atheos 1052 exit ;; 1053 i*86:syllable:*:*) 1054 echo ${UNAME_MACHINE}-pc-syllable 1055 exit ;; 1056 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 1057 echo i386-unknown-lynxos${UNAME_RELEASE} 1058 exit ;; 1059 i*86:*DOS:*:*) 1060 echo ${UNAME_MACHINE}-pc-msdosdjgpp 1061 exit ;; 1062 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1063 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1064 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1065 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 1066 else 1067 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1068 fi 1069 exit ;; 1070 i*86:*:5:[678]*) 1071 # UnixWare 7.x, OpenUNIX and OpenServer 6. 1072 case `/bin/uname -X | grep "^Machine"` in 1073 *486*) UNAME_MACHINE=i486 ;; 1074 *Pentium) UNAME_MACHINE=i586 ;; 1075 *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1076 esac 1077 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1078 exit ;; 1079 i*86:*:3.2:*) 1080 if test -f /usr/options/cb.name; then 1081 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1082 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 1083 elif /bin/uname -X 2>/dev/null >/dev/null ; then 1084 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1085 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1086 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 1087 && UNAME_MACHINE=i586 1088 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1089 && UNAME_MACHINE=i686 1090 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1091 && UNAME_MACHINE=i686 1092 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 1093 else 1094 echo ${UNAME_MACHINE}-pc-sysv32 1095 fi 1096 exit ;; 1097 pc:*:*:*) 1098 # Left here for compatibility: 1099 # uname -m prints for DJGPP always 'pc', but it prints nothing about 1100 # the processor, so we play safe by assuming i586. 1101 # Note: whatever this is, it MUST be the same as what config.sub 1102 # prints for the "djgpp" host, or else GDB configury will decide that 1103 # this is a cross-build. 1104 echo i586-pc-msdosdjgpp 1105 exit ;; 1106 Intel:Mach:3*:*) 1107 echo i386-pc-mach3 1108 exit ;; 1109 paragon:*:*:*) 1110 echo i860-intel-osf1 1111 exit ;; 1112 i860:*:4.*:*) # i860-SVR4 1113 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1114 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1115 else # Add other i860-SVR4 vendors below as they are discovered. 1116 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1117 fi 1118 exit ;; 1119 mini*:CTIX:SYS*5:*) 1120 # "miniframe" 1121 echo m68010-convergent-sysv 1122 exit ;; 1123 mc68k:UNIX:SYSTEM5:3.51m) 1124 echo m68k-convergent-sysv 1125 exit ;; 1126 M680?0:D-NIX:5.3:*) 1127 echo m68k-diab-dnix 1128 exit ;; 1129 M68*:*:R3V[5678]*:*) 1130 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1131 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) 1132 OS_REL='' 1133 test -r /etc/.relid \ 1134 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1135 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1136 && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1137 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1138 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1139 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1140 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1141 && { echo i486-ncr-sysv4; exit; } ;; 1142 NCR*:*:4.2:* | MPRAS*:*:4.2:*) 1143 OS_REL='.3' 1144 test -r /etc/.relid \ 1145 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1146 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1147 && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1148 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1149 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 1150 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 1151 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1152 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1153 echo m68k-unknown-lynxos${UNAME_RELEASE} 1154 exit ;; 1155 mc68030:UNIX_System_V:4.*:*) 1156 echo m68k-atari-sysv4 1157 exit ;; 1158 TSUNAMI:LynxOS:2.*:*) 1159 echo sparc-unknown-lynxos${UNAME_RELEASE} 1160 exit ;; 1161 rs6000:LynxOS:2.*:*) 1162 echo rs6000-unknown-lynxos${UNAME_RELEASE} 1163 exit ;; 1164 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 1165 echo powerpc-unknown-lynxos${UNAME_RELEASE} 1166 exit ;; 1167 SM[BE]S:UNIX_SV:*:*) 1168 echo mips-dde-sysv${UNAME_RELEASE} 1169 exit ;; 1170 RM*:ReliantUNIX-*:*:*) 1171 echo mips-sni-sysv4 1172 exit ;; 1173 RM*:SINIX-*:*:*) 1174 echo mips-sni-sysv4 1175 exit ;; 1176 *:SINIX-*:*:*) 1177 if uname -p 2>/dev/null >/dev/null ; then 1178 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1179 echo ${UNAME_MACHINE}-sni-sysv4 1180 else 1181 echo ns32k-sni-sysv 1182 fi 1183 exit ;; 1184 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1185 # says <Richard.M.Bartel@ccMail.Census.GOV> 1186 echo i586-unisys-sysv4 1187 exit ;; 1188 *:UNIX_System_V:4*:FTX*) 1189 # From Gerald Hewes <hewes@openmarket.com>. 1190 # How about differentiating between stratus architectures? -djm 1191 echo hppa1.1-stratus-sysv4 1192 exit ;; 1193 *:*:*:FTX*) 1194 # From seanf@swdc.stratus.com. 1195 echo i860-stratus-sysv4 1196 exit ;; 1197 i*86:VOS:*:*) 1198 # From Paul.Green@stratus.com. 1199 echo ${UNAME_MACHINE}-stratus-vos 1200 exit ;; 1201 *:VOS:*:*) 1202 # From Paul.Green@stratus.com. 1203 echo hppa1.1-stratus-vos 1204 exit ;; 1205 mc68*:A/UX:*:*) 1206 echo m68k-apple-aux${UNAME_RELEASE} 1207 exit ;; 1208 news*:NEWS-OS:6*:*) 1209 echo mips-sony-newsos6 1210 exit ;; 1211 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1212 if [ -d /usr/nec ]; then 1213 echo mips-nec-sysv${UNAME_RELEASE} 1214 else 1215 echo mips-unknown-sysv${UNAME_RELEASE} 1216 fi 1217 exit ;; 1218 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1219 echo powerpc-be-beos 1220 exit ;; 1221 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1222 echo powerpc-apple-beos 1223 exit ;; 1224 BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1225 echo i586-pc-beos 1226 exit ;; 1227 BePC:Haiku:*:*) # Haiku running on Intel PC compatible. 1228 echo i586-pc-haiku 1229 exit ;; 1230 x86_64:Haiku:*:*) 1231 echo x86_64-unknown-haiku 1232 exit ;; 1233 SX-4:SUPER-UX:*:*) 1234 echo sx4-nec-superux${UNAME_RELEASE} 1235 exit ;; 1236 SX-5:SUPER-UX:*:*) 1237 echo sx5-nec-superux${UNAME_RELEASE} 1238 exit ;; 1239 SX-6:SUPER-UX:*:*) 1240 echo sx6-nec-superux${UNAME_RELEASE} 1241 exit ;; 1242 SX-7:SUPER-UX:*:*) 1243 echo sx7-nec-superux${UNAME_RELEASE} 1244 exit ;; 1245 SX-8:SUPER-UX:*:*) 1246 echo sx8-nec-superux${UNAME_RELEASE} 1247 exit ;; 1248 SX-8R:SUPER-UX:*:*) 1249 echo sx8r-nec-superux${UNAME_RELEASE} 1250 exit ;; 1251 Power*:Rhapsody:*:*) 1252 echo powerpc-apple-rhapsody${UNAME_RELEASE} 1253 exit ;; 1254 *:Rhapsody:*:*) 1255 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1256 exit ;; 1257 *:Darwin:*:*) 1258 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1259 eval $set_cc_for_build 1260 if test "$UNAME_PROCESSOR" = unknown ; then 1261 UNAME_PROCESSOR=powerpc 1262 fi 1263 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then 1264 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 1265 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 1266 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 1267 grep IS_64BIT_ARCH >/dev/null 1268 then 1269 case $UNAME_PROCESSOR in 1270 i386) UNAME_PROCESSOR=x86_64 ;; 1271 powerpc) UNAME_PROCESSOR=powerpc64 ;; 1272 esac 1273 fi 1274 fi 1275 elif test "$UNAME_PROCESSOR" = i386 ; then 1276 # Avoid executing cc on OS X 10.9, as it ships with a stub 1277 # that puts up a graphical alert prompting to install 1278 # developer tools. Any system running Mac OS X 10.7 or 1279 # later (Darwin 11 and later) is required to have a 64-bit 1280 # processor. This is not true of the ARM version of Darwin 1281 # that Apple uses in portable devices. 1282 UNAME_PROCESSOR=x86_64 1283 fi 1284 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1285 exit ;; 1286 *:procnto*:*:* | *:QNX:[0123456789]*:*) 1287 UNAME_PROCESSOR=`uname -p` 1288 if test "$UNAME_PROCESSOR" = "x86"; then 1289 UNAME_PROCESSOR=i386 1290 UNAME_MACHINE=pc 1291 fi 1292 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1293 exit ;; 1294 *:QNX:*:4*) 1295 echo i386-pc-qnx 1296 exit ;; 1297 NEO-?:NONSTOP_KERNEL:*:*) 1298 echo neo-tandem-nsk${UNAME_RELEASE} 1299 exit ;; 1300 NSE-*:NONSTOP_KERNEL:*:*) 1301 echo nse-tandem-nsk${UNAME_RELEASE} 1302 exit ;; 1303 NSR-?:NONSTOP_KERNEL:*:*) 1304 echo nsr-tandem-nsk${UNAME_RELEASE} 1305 exit ;; 1306 *:NonStop-UX:*:*) 1307 echo mips-compaq-nonstopux 1308 exit ;; 1309 BS2000:POSIX*:*:*) 1310 echo bs2000-siemens-sysv 1311 exit ;; 1312 DS/*:UNIX_System_V:*:*) 1313 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1314 exit ;; 1315 *:Plan9:*:*) 1316 # "uname -m" is not consistent, so use $cputype instead. 386 1317 # is converted to i386 for consistency with other x86 1318 # operating systems. 1319 if test "$cputype" = "386"; then 1320 UNAME_MACHINE=i386 1321 else 1322 UNAME_MACHINE="$cputype" 1323 fi 1324 echo ${UNAME_MACHINE}-unknown-plan9 1325 exit ;; 1326 *:TOPS-10:*:*) 1327 echo pdp10-unknown-tops10 1328 exit ;; 1329 *:TENEX:*:*) 1330 echo pdp10-unknown-tenex 1331 exit ;; 1332 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1333 echo pdp10-dec-tops20 1334 exit ;; 1335 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1336 echo pdp10-xkl-tops20 1337 exit ;; 1338 *:TOPS-20:*:*) 1339 echo pdp10-unknown-tops20 1340 exit ;; 1341 *:ITS:*:*) 1342 echo pdp10-unknown-its 1343 exit ;; 1344 SEI:*:*:SEIUX) 1345 echo mips-sei-seiux${UNAME_RELEASE} 1346 exit ;; 1347 *:DragonFly:*:*) 1348 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1349 exit ;; 1350 *:*VMS:*:*) 1351 UNAME_MACHINE=`(uname -p) 2>/dev/null` 1352 case "${UNAME_MACHINE}" in 1353 A*) echo alpha-dec-vms ; exit ;; 1354 I*) echo ia64-dec-vms ; exit ;; 1355 V*) echo vax-dec-vms ; exit ;; 1356 esac ;; 1357 *:XENIX:*:SysV) 1358 echo i386-pc-xenix 1359 exit ;; 1360 i*86:skyos:*:*) 1361 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1362 exit ;; 1363 i*86:rdos:*:*) 1364 echo ${UNAME_MACHINE}-pc-rdos 1365 exit ;; 1366 i*86:AROS:*:*) 1367 echo ${UNAME_MACHINE}-pc-aros 1368 exit ;; 1369 x86_64:VMkernel:*:*) 1370 echo ${UNAME_MACHINE}-unknown-esx 1371 exit ;; 1372esac 1373 1374eval $set_cc_for_build 1375cat >$dummy.c <<EOF 1376#ifdef _SEQUENT_ 1377# include <sys/types.h> 1378# include <sys/utsname.h> 1379#endif 1380main () 1381{ 1382#if defined (sony) 1383#if defined (MIPSEB) 1384 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 1385 I don't know.... */ 1386 printf ("mips-sony-bsd\n"); exit (0); 1387#else 1388#include <sys/param.h> 1389 printf ("m68k-sony-newsos%s\n", 1390#ifdef NEWSOS4 1391 "4" 1392#else 1393 "" 1394#endif 1395 ); exit (0); 1396#endif 1397#endif 1398 1399#if defined (__arm) && defined (__acorn) && defined (__unix) 1400 printf ("arm-acorn-riscix\n"); exit (0); 1401#endif 1402 1403#if defined (hp300) && !defined (hpux) 1404 printf ("m68k-hp-bsd\n"); exit (0); 1405#endif 1406 1407#if defined (NeXT) 1408#if !defined (__ARCHITECTURE__) 1409#define __ARCHITECTURE__ "m68k" 1410#endif 1411 int version; 1412 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 1413 if (version < 4) 1414 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1415 else 1416 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 1417 exit (0); 1418#endif 1419 1420#if defined (MULTIMAX) || defined (n16) 1421#if defined (UMAXV) 1422 printf ("ns32k-encore-sysv\n"); exit (0); 1423#else 1424#if defined (CMU) 1425 printf ("ns32k-encore-mach\n"); exit (0); 1426#else 1427 printf ("ns32k-encore-bsd\n"); exit (0); 1428#endif 1429#endif 1430#endif 1431 1432#if defined (__386BSD__) 1433 printf ("i386-pc-bsd\n"); exit (0); 1434#endif 1435 1436#if defined (sequent) 1437#if defined (i386) 1438 printf ("i386-sequent-dynix\n"); exit (0); 1439#endif 1440#if defined (ns32000) 1441 printf ("ns32k-sequent-dynix\n"); exit (0); 1442#endif 1443#endif 1444 1445#if defined (_SEQUENT_) 1446 struct utsname un; 1447 1448 uname(&un); 1449 1450 if (strncmp(un.version, "V2", 2) == 0) { 1451 printf ("i386-sequent-ptx2\n"); exit (0); 1452 } 1453 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 1454 printf ("i386-sequent-ptx1\n"); exit (0); 1455 } 1456 printf ("i386-sequent-ptx\n"); exit (0); 1457 1458#endif 1459 1460#if defined (vax) 1461# if !defined (ultrix) 1462# include <sys/param.h> 1463# if defined (BSD) 1464# if BSD == 43 1465 printf ("vax-dec-bsd4.3\n"); exit (0); 1466# else 1467# if BSD == 199006 1468 printf ("vax-dec-bsd4.3reno\n"); exit (0); 1469# else 1470 printf ("vax-dec-bsd\n"); exit (0); 1471# endif 1472# endif 1473# else 1474 printf ("vax-dec-bsd\n"); exit (0); 1475# endif 1476# else 1477 printf ("vax-dec-ultrix\n"); exit (0); 1478# endif 1479#endif 1480 1481#if defined (alliant) && defined (i860) 1482 printf ("i860-alliant-bsd\n"); exit (0); 1483#endif 1484 1485 exit (1); 1486} 1487EOF 1488 1489$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 1490 { echo "$SYSTEM_NAME"; exit; } 1491 1492# Apollos put the system type in the environment. 1493 1494test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 1495 1496# Convex versions that predate uname can use getsysinfo(1) 1497 1498if [ -x /usr/convex/getsysinfo ] 1499then 1500 case `getsysinfo -f cpu_type` in 1501 c1*) 1502 echo c1-convex-bsd 1503 exit ;; 1504 c2*) 1505 if getsysinfo -f scalar_acc 1506 then echo c32-convex-bsd 1507 else echo c2-convex-bsd 1508 fi 1509 exit ;; 1510 c34*) 1511 echo c34-convex-bsd 1512 exit ;; 1513 c38*) 1514 echo c38-convex-bsd 1515 exit ;; 1516 c4*) 1517 echo c4-convex-bsd 1518 exit ;; 1519 esac 1520fi 1521 1522cat >&2 <<EOF 1523$0: unable to guess system type 1524 1525This script, last modified $timestamp, has failed to recognize 1526the operating system you are using. It is advised that you 1527download the most up to date version of the config scripts from 1528 1529 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 1530and 1531 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 1532 1533If the version you run ($0) is already up to date, please 1534send the following data and any information you think might be 1535pertinent to <config-patches@gnu.org> in order to provide the needed 1536information to handle your system. 1537 1538config.guess timestamp = $timestamp 1539 1540uname -m = `(uname -m) 2>/dev/null || echo unknown` 1541uname -r = `(uname -r) 2>/dev/null || echo unknown` 1542uname -s = `(uname -s) 2>/dev/null || echo unknown` 1543uname -v = `(uname -v) 2>/dev/null || echo unknown` 1544 1545/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1546/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1547 1548hostinfo = `(hostinfo) 2>/dev/null` 1549/bin/universe = `(/bin/universe) 2>/dev/null` 1550/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1551/bin/arch = `(/bin/arch) 2>/dev/null` 1552/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1553/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1554 1555UNAME_MACHINE = ${UNAME_MACHINE} 1556UNAME_RELEASE = ${UNAME_RELEASE} 1557UNAME_SYSTEM = ${UNAME_SYSTEM} 1558UNAME_VERSION = ${UNAME_VERSION} 1559EOF 1560 1561exit 1 1562 1563# Local variables: 1564# eval: (add-hook 'write-file-hooks 'time-stamp) 1565# time-stamp-start: "timestamp='" 1566# time-stamp-format: "%:y-%02m-%02d" 1567# time-stamp-end: "'" 1568# End: 1569