config.guess revision ff7e0acc
1ff7e0accSmrg#! /bin/sh 2ff7e0accSmrg# Attempt to guess a canonical system name. 3ff7e0accSmrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4ff7e0accSmrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, 5ff7e0accSmrg# Inc. 6ff7e0accSmrg 7ff7e0accSmrgtimestamp='2007-07-22' 8ff7e0accSmrg 9ff7e0accSmrg# This file is free software; you can redistribute it and/or modify it 10ff7e0accSmrg# under the terms of the GNU General Public License as published by 11ff7e0accSmrg# the Free Software Foundation; either version 2 of the License, or 12ff7e0accSmrg# (at your option) any later version. 13ff7e0accSmrg# 14ff7e0accSmrg# This program is distributed in the hope that it will be useful, but 15ff7e0accSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 16ff7e0accSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17ff7e0accSmrg# General Public License for more details. 18ff7e0accSmrg# 19ff7e0accSmrg# You should have received a copy of the GNU General Public License 20ff7e0accSmrg# along with this program; if not, write to the Free Software 21ff7e0accSmrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 22ff7e0accSmrg# 02110-1301, USA. 23ff7e0accSmrg# 24ff7e0accSmrg# As a special exception to the GNU General Public License, if you 25ff7e0accSmrg# distribute this file as part of a program that contains a 26ff7e0accSmrg# configuration script generated by Autoconf, you may include it under 27ff7e0accSmrg# the same distribution terms that you use for the rest of that program. 28ff7e0accSmrg 29ff7e0accSmrg 30ff7e0accSmrg# Originally written by Per Bothner <per@bothner.com>. 31ff7e0accSmrg# Please send patches to <config-patches@gnu.org>. Submit a context 32ff7e0accSmrg# diff and a properly formatted ChangeLog entry. 33ff7e0accSmrg# 34ff7e0accSmrg# This script attempts to guess a canonical system name similar to 35ff7e0accSmrg# config.sub. If it succeeds, it prints the system name on stdout, and 36ff7e0accSmrg# exits with 0. Otherwise, it exits with 1. 37ff7e0accSmrg# 38ff7e0accSmrg# The plan is that this can be called by configure scripts if you 39ff7e0accSmrg# don't specify an explicit build system type. 40ff7e0accSmrg 41ff7e0accSmrgme=`echo "$0" | sed -e 's,.*/,,'` 42ff7e0accSmrg 43ff7e0accSmrgusage="\ 44ff7e0accSmrgUsage: $0 [OPTION] 45ff7e0accSmrg 46ff7e0accSmrgOutput the configuration name of the system \`$me' is run on. 47ff7e0accSmrg 48ff7e0accSmrgOperation modes: 49ff7e0accSmrg -h, --help print this help, then exit 50ff7e0accSmrg -t, --time-stamp print date of last modification, then exit 51ff7e0accSmrg -v, --version print version number, then exit 52ff7e0accSmrg 53ff7e0accSmrgReport bugs and patches to <config-patches@gnu.org>." 54ff7e0accSmrg 55ff7e0accSmrgversion="\ 56ff7e0accSmrgGNU config.guess ($timestamp) 57ff7e0accSmrg 58ff7e0accSmrgOriginally written by Per Bothner. 59ff7e0accSmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 60ff7e0accSmrgFree Software Foundation, Inc. 61ff7e0accSmrg 62ff7e0accSmrgThis is free software; see the source for copying conditions. There is NO 63ff7e0accSmrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 64ff7e0accSmrg 65ff7e0accSmrghelp=" 66ff7e0accSmrgTry \`$me --help' for more information." 67ff7e0accSmrg 68ff7e0accSmrg# Parse command line 69ff7e0accSmrgwhile test $# -gt 0 ; do 70ff7e0accSmrg case $1 in 71ff7e0accSmrg --time-stamp | --time* | -t ) 72ff7e0accSmrg echo "$timestamp" ; exit ;; 73ff7e0accSmrg --version | -v ) 74ff7e0accSmrg echo "$version" ; exit ;; 75ff7e0accSmrg --help | --h* | -h ) 76ff7e0accSmrg echo "$usage"; exit ;; 77ff7e0accSmrg -- ) # Stop option processing 78ff7e0accSmrg shift; break ;; 79ff7e0accSmrg - ) # Use stdin as input. 80ff7e0accSmrg break ;; 81ff7e0accSmrg -* ) 82ff7e0accSmrg echo "$me: invalid option $1$help" >&2 83ff7e0accSmrg exit 1 ;; 84ff7e0accSmrg * ) 85ff7e0accSmrg break ;; 86ff7e0accSmrg esac 87ff7e0accSmrgdone 88ff7e0accSmrg 89ff7e0accSmrgif test $# != 0; then 90ff7e0accSmrg echo "$me: too many arguments$help" >&2 91ff7e0accSmrg exit 1 92ff7e0accSmrgfi 93ff7e0accSmrg 94ff7e0accSmrgtrap 'exit 1' 1 2 15 95ff7e0accSmrg 96ff7e0accSmrg# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 97ff7e0accSmrg# compiler to aid in system detection is discouraged as it requires 98ff7e0accSmrg# temporary files to be created and, as you can see below, it is a 99ff7e0accSmrg# headache to deal with in a portable fashion. 100ff7e0accSmrg 101ff7e0accSmrg# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 102ff7e0accSmrg# use `HOST_CC' if defined, but it is deprecated. 103ff7e0accSmrg 104ff7e0accSmrg# Portable tmp directory creation inspired by the Autoconf team. 105ff7e0accSmrg 106ff7e0accSmrgset_cc_for_build=' 107ff7e0accSmrgtrap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 108ff7e0accSmrgtrap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 109ff7e0accSmrg: ${TMPDIR=/tmp} ; 110ff7e0accSmrg { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 111ff7e0accSmrg { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 112ff7e0accSmrg { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 113ff7e0accSmrg { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 114ff7e0accSmrgdummy=$tmp/dummy ; 115ff7e0accSmrgtmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 116ff7e0accSmrgcase $CC_FOR_BUILD,$HOST_CC,$CC in 117ff7e0accSmrg ,,) echo "int x;" > $dummy.c ; 118ff7e0accSmrg for c in cc gcc c89 c99 ; do 119ff7e0accSmrg if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 120ff7e0accSmrg CC_FOR_BUILD="$c"; break ; 121ff7e0accSmrg fi ; 122ff7e0accSmrg done ; 123ff7e0accSmrg if test x"$CC_FOR_BUILD" = x ; then 124ff7e0accSmrg CC_FOR_BUILD=no_compiler_found ; 125ff7e0accSmrg fi 126ff7e0accSmrg ;; 127ff7e0accSmrg ,,*) CC_FOR_BUILD=$CC ;; 128ff7e0accSmrg ,*,*) CC_FOR_BUILD=$HOST_CC ;; 129ff7e0accSmrgesac ; set_cc_for_build= ;' 130ff7e0accSmrg 131ff7e0accSmrg# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 132ff7e0accSmrg# (ghazi@noc.rutgers.edu 1994-08-24) 133ff7e0accSmrgif (test -f /.attbin/uname) >/dev/null 2>&1 ; then 134ff7e0accSmrg PATH=$PATH:/.attbin ; export PATH 135ff7e0accSmrgfi 136ff7e0accSmrg 137ff7e0accSmrgUNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown 138ff7e0accSmrgUNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown 139ff7e0accSmrgUNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 140ff7e0accSmrgUNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 141ff7e0accSmrg 142ff7e0accSmrg# Note: order is significant - the case branches are not exclusive. 143ff7e0accSmrg 144ff7e0accSmrgcase "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 145ff7e0accSmrg *:NetBSD:*:*) 146ff7e0accSmrg # NetBSD (nbsd) targets should (where applicable) match one or 147ff7e0accSmrg # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 148ff7e0accSmrg # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 149ff7e0accSmrg # switched to ELF, *-*-netbsd* would select the old 150ff7e0accSmrg # object file format. This provides both forward 151ff7e0accSmrg # compatibility and a consistent mechanism for selecting the 152ff7e0accSmrg # object file format. 153ff7e0accSmrg # 154ff7e0accSmrg # Note: NetBSD doesn't particularly care about the vendor 155ff7e0accSmrg # portion of the name. We always set it to "unknown". 156ff7e0accSmrg sysctl="sysctl -n hw.machine_arch" 157ff7e0accSmrg UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 158ff7e0accSmrg /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 159ff7e0accSmrg case "${UNAME_MACHINE_ARCH}" in 160ff7e0accSmrg armeb) machine=armeb-unknown ;; 161ff7e0accSmrg arm*) machine=arm-unknown ;; 162ff7e0accSmrg sh3el) machine=shl-unknown ;; 163ff7e0accSmrg sh3eb) machine=sh-unknown ;; 164ff7e0accSmrg sh5el) machine=sh5le-unknown ;; 165ff7e0accSmrg *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 166ff7e0accSmrg esac 167ff7e0accSmrg # The Operating System including object format, if it has switched 168ff7e0accSmrg # to ELF recently, or will in the future. 169ff7e0accSmrg case "${UNAME_MACHINE_ARCH}" in 170ff7e0accSmrg arm*|i386|m68k|ns32k|sh3*|sparc|vax) 171ff7e0accSmrg eval $set_cc_for_build 172ff7e0accSmrg if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 173ff7e0accSmrg | grep __ELF__ >/dev/null 174ff7e0accSmrg then 175ff7e0accSmrg # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 176ff7e0accSmrg # Return netbsd for either. FIX? 177ff7e0accSmrg os=netbsd 178ff7e0accSmrg else 179ff7e0accSmrg os=netbsdelf 180ff7e0accSmrg fi 181ff7e0accSmrg ;; 182ff7e0accSmrg *) 183ff7e0accSmrg os=netbsd 184ff7e0accSmrg ;; 185ff7e0accSmrg esac 186ff7e0accSmrg # The OS release 187ff7e0accSmrg # Debian GNU/NetBSD machines have a different userland, and 188ff7e0accSmrg # thus, need a distinct triplet. However, they do not need 189ff7e0accSmrg # kernel version information, so it can be replaced with a 190ff7e0accSmrg # suitable tag, in the style of linux-gnu. 191ff7e0accSmrg case "${UNAME_VERSION}" in 192ff7e0accSmrg Debian*) 193ff7e0accSmrg release='-gnu' 194ff7e0accSmrg ;; 195ff7e0accSmrg *) 196ff7e0accSmrg release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 197ff7e0accSmrg ;; 198ff7e0accSmrg esac 199ff7e0accSmrg # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 200ff7e0accSmrg # contains redundant information, the shorter form: 201ff7e0accSmrg # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 202ff7e0accSmrg echo "${machine}-${os}${release}" 203ff7e0accSmrg exit ;; 204ff7e0accSmrg *:OpenBSD:*:*) 205ff7e0accSmrg UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 206ff7e0accSmrg echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 207ff7e0accSmrg exit ;; 208ff7e0accSmrg *:ekkoBSD:*:*) 209ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 210ff7e0accSmrg exit ;; 211ff7e0accSmrg *:SolidBSD:*:*) 212ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 213ff7e0accSmrg exit ;; 214ff7e0accSmrg macppc:MirBSD:*:*) 215ff7e0accSmrg echo powerpc-unknown-mirbsd${UNAME_RELEASE} 216ff7e0accSmrg exit ;; 217ff7e0accSmrg *:MirBSD:*:*) 218ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 219ff7e0accSmrg exit ;; 220ff7e0accSmrg alpha:OSF1:*:*) 221ff7e0accSmrg case $UNAME_RELEASE in 222ff7e0accSmrg *4.0) 223ff7e0accSmrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 224ff7e0accSmrg ;; 225ff7e0accSmrg *5.*) 226ff7e0accSmrg UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 227ff7e0accSmrg ;; 228ff7e0accSmrg esac 229ff7e0accSmrg # According to Compaq, /usr/sbin/psrinfo has been available on 230ff7e0accSmrg # OSF/1 and Tru64 systems produced since 1995. I hope that 231ff7e0accSmrg # covers most systems running today. This code pipes the CPU 232ff7e0accSmrg # types through head -n 1, so we only detect the type of CPU 0. 233ff7e0accSmrg ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` 234ff7e0accSmrg case "$ALPHA_CPU_TYPE" in 235ff7e0accSmrg "EV4 (21064)") 236ff7e0accSmrg UNAME_MACHINE="alpha" ;; 237ff7e0accSmrg "EV4.5 (21064)") 238ff7e0accSmrg UNAME_MACHINE="alpha" ;; 239ff7e0accSmrg "LCA4 (21066/21068)") 240ff7e0accSmrg UNAME_MACHINE="alpha" ;; 241ff7e0accSmrg "EV5 (21164)") 242ff7e0accSmrg UNAME_MACHINE="alphaev5" ;; 243ff7e0accSmrg "EV5.6 (21164A)") 244ff7e0accSmrg UNAME_MACHINE="alphaev56" ;; 245ff7e0accSmrg "EV5.6 (21164PC)") 246ff7e0accSmrg UNAME_MACHINE="alphapca56" ;; 247ff7e0accSmrg "EV5.7 (21164PC)") 248ff7e0accSmrg UNAME_MACHINE="alphapca57" ;; 249ff7e0accSmrg "EV6 (21264)") 250ff7e0accSmrg UNAME_MACHINE="alphaev6" ;; 251ff7e0accSmrg "EV6.7 (21264A)") 252ff7e0accSmrg UNAME_MACHINE="alphaev67" ;; 253ff7e0accSmrg "EV6.8CB (21264C)") 254ff7e0accSmrg UNAME_MACHINE="alphaev68" ;; 255ff7e0accSmrg "EV6.8AL (21264B)") 256ff7e0accSmrg UNAME_MACHINE="alphaev68" ;; 257ff7e0accSmrg "EV6.8CX (21264D)") 258ff7e0accSmrg UNAME_MACHINE="alphaev68" ;; 259ff7e0accSmrg "EV6.9A (21264/EV69A)") 260ff7e0accSmrg UNAME_MACHINE="alphaev69" ;; 261ff7e0accSmrg "EV7 (21364)") 262ff7e0accSmrg UNAME_MACHINE="alphaev7" ;; 263ff7e0accSmrg "EV7.9 (21364A)") 264ff7e0accSmrg UNAME_MACHINE="alphaev79" ;; 265ff7e0accSmrg esac 266ff7e0accSmrg # A Pn.n version is a patched version. 267ff7e0accSmrg # A Vn.n version is a released version. 268ff7e0accSmrg # A Tn.n version is a released field test version. 269ff7e0accSmrg # A Xn.n version is an unreleased experimental baselevel. 270ff7e0accSmrg # 1.2 uses "1.2" for uname -r. 271ff7e0accSmrg echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 272ff7e0accSmrg exit ;; 273ff7e0accSmrg Alpha\ *:Windows_NT*:*) 274ff7e0accSmrg # How do we know it's Interix rather than the generic POSIX subsystem? 275ff7e0accSmrg # Should we change UNAME_MACHINE based on the output of uname instead 276ff7e0accSmrg # of the specific Alpha model? 277ff7e0accSmrg echo alpha-pc-interix 278ff7e0accSmrg exit ;; 279ff7e0accSmrg 21064:Windows_NT:50:3) 280ff7e0accSmrg echo alpha-dec-winnt3.5 281ff7e0accSmrg exit ;; 282ff7e0accSmrg Amiga*:UNIX_System_V:4.0:*) 283ff7e0accSmrg echo m68k-unknown-sysv4 284ff7e0accSmrg exit ;; 285ff7e0accSmrg *:[Aa]miga[Oo][Ss]:*:*) 286ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-amigaos 287ff7e0accSmrg exit ;; 288ff7e0accSmrg *:[Mm]orph[Oo][Ss]:*:*) 289ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-morphos 290ff7e0accSmrg exit ;; 291ff7e0accSmrg *:OS/390:*:*) 292ff7e0accSmrg echo i370-ibm-openedition 293ff7e0accSmrg exit ;; 294ff7e0accSmrg *:z/VM:*:*) 295ff7e0accSmrg echo s390-ibm-zvmoe 296ff7e0accSmrg exit ;; 297ff7e0accSmrg *:OS400:*:*) 298ff7e0accSmrg echo powerpc-ibm-os400 299ff7e0accSmrg exit ;; 300ff7e0accSmrg arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 301ff7e0accSmrg echo arm-acorn-riscix${UNAME_RELEASE} 302ff7e0accSmrg exit ;; 303ff7e0accSmrg arm:riscos:*:*|arm:RISCOS:*:*) 304ff7e0accSmrg echo arm-unknown-riscos 305ff7e0accSmrg exit ;; 306ff7e0accSmrg SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 307ff7e0accSmrg echo hppa1.1-hitachi-hiuxmpp 308ff7e0accSmrg exit ;; 309ff7e0accSmrg Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 310ff7e0accSmrg # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 311ff7e0accSmrg if test "`(/bin/universe) 2>/dev/null`" = att ; then 312ff7e0accSmrg echo pyramid-pyramid-sysv3 313ff7e0accSmrg else 314ff7e0accSmrg echo pyramid-pyramid-bsd 315ff7e0accSmrg fi 316ff7e0accSmrg exit ;; 317ff7e0accSmrg NILE*:*:*:dcosx) 318ff7e0accSmrg echo pyramid-pyramid-svr4 319ff7e0accSmrg exit ;; 320ff7e0accSmrg DRS?6000:unix:4.0:6*) 321ff7e0accSmrg echo sparc-icl-nx6 322ff7e0accSmrg exit ;; 323ff7e0accSmrg DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 324ff7e0accSmrg case `/usr/bin/uname -p` in 325ff7e0accSmrg sparc) echo sparc-icl-nx7; exit ;; 326ff7e0accSmrg esac ;; 327ff7e0accSmrg sun4H:SunOS:5.*:*) 328ff7e0accSmrg echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 329ff7e0accSmrg exit ;; 330ff7e0accSmrg sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 331ff7e0accSmrg echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 332ff7e0accSmrg exit ;; 333ff7e0accSmrg i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 334ff7e0accSmrg echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 335ff7e0accSmrg exit ;; 336ff7e0accSmrg sun4*:SunOS:6*:*) 337ff7e0accSmrg # According to config.sub, this is the proper way to canonicalize 338ff7e0accSmrg # SunOS6. Hard to guess exactly what SunOS6 will be like, but 339ff7e0accSmrg # it's likely to be more like Solaris than SunOS4. 340ff7e0accSmrg echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 341ff7e0accSmrg exit ;; 342ff7e0accSmrg sun4*:SunOS:*:*) 343ff7e0accSmrg case "`/usr/bin/arch -k`" in 344ff7e0accSmrg Series*|S4*) 345ff7e0accSmrg UNAME_RELEASE=`uname -v` 346ff7e0accSmrg ;; 347ff7e0accSmrg esac 348ff7e0accSmrg # Japanese Language versions have a version number like `4.1.3-JL'. 349ff7e0accSmrg echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 350ff7e0accSmrg exit ;; 351ff7e0accSmrg sun3*:SunOS:*:*) 352ff7e0accSmrg echo m68k-sun-sunos${UNAME_RELEASE} 353ff7e0accSmrg exit ;; 354ff7e0accSmrg sun*:*:4.2BSD:*) 355ff7e0accSmrg UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 356ff7e0accSmrg test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 357ff7e0accSmrg case "`/bin/arch`" in 358ff7e0accSmrg sun3) 359ff7e0accSmrg echo m68k-sun-sunos${UNAME_RELEASE} 360ff7e0accSmrg ;; 361ff7e0accSmrg sun4) 362ff7e0accSmrg echo sparc-sun-sunos${UNAME_RELEASE} 363ff7e0accSmrg ;; 364ff7e0accSmrg esac 365ff7e0accSmrg exit ;; 366ff7e0accSmrg aushp:SunOS:*:*) 367ff7e0accSmrg echo sparc-auspex-sunos${UNAME_RELEASE} 368ff7e0accSmrg exit ;; 369ff7e0accSmrg # The situation for MiNT is a little confusing. The machine name 370ff7e0accSmrg # can be virtually everything (everything which is not 371ff7e0accSmrg # "atarist" or "atariste" at least should have a processor 372ff7e0accSmrg # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 373ff7e0accSmrg # to the lowercase version "mint" (or "freemint"). Finally 374ff7e0accSmrg # the system name "TOS" denotes a system which is actually not 375ff7e0accSmrg # MiNT. But MiNT is downward compatible to TOS, so this should 376ff7e0accSmrg # be no problem. 377ff7e0accSmrg atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 378ff7e0accSmrg echo m68k-atari-mint${UNAME_RELEASE} 379ff7e0accSmrg exit ;; 380ff7e0accSmrg atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 381ff7e0accSmrg echo m68k-atari-mint${UNAME_RELEASE} 382ff7e0accSmrg exit ;; 383ff7e0accSmrg *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 384ff7e0accSmrg echo m68k-atari-mint${UNAME_RELEASE} 385ff7e0accSmrg exit ;; 386ff7e0accSmrg milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 387ff7e0accSmrg echo m68k-milan-mint${UNAME_RELEASE} 388ff7e0accSmrg exit ;; 389ff7e0accSmrg hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 390ff7e0accSmrg echo m68k-hades-mint${UNAME_RELEASE} 391ff7e0accSmrg exit ;; 392ff7e0accSmrg *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 393ff7e0accSmrg echo m68k-unknown-mint${UNAME_RELEASE} 394ff7e0accSmrg exit ;; 395ff7e0accSmrg m68k:machten:*:*) 396ff7e0accSmrg echo m68k-apple-machten${UNAME_RELEASE} 397ff7e0accSmrg exit ;; 398ff7e0accSmrg powerpc:machten:*:*) 399ff7e0accSmrg echo powerpc-apple-machten${UNAME_RELEASE} 400ff7e0accSmrg exit ;; 401ff7e0accSmrg RISC*:Mach:*:*) 402ff7e0accSmrg echo mips-dec-mach_bsd4.3 403ff7e0accSmrg exit ;; 404ff7e0accSmrg RISC*:ULTRIX:*:*) 405ff7e0accSmrg echo mips-dec-ultrix${UNAME_RELEASE} 406ff7e0accSmrg exit ;; 407ff7e0accSmrg VAX*:ULTRIX*:*:*) 408ff7e0accSmrg echo vax-dec-ultrix${UNAME_RELEASE} 409ff7e0accSmrg exit ;; 410ff7e0accSmrg 2020:CLIX:*:* | 2430:CLIX:*:*) 411ff7e0accSmrg echo clipper-intergraph-clix${UNAME_RELEASE} 412ff7e0accSmrg exit ;; 413ff7e0accSmrg mips:*:*:UMIPS | mips:*:*:RISCos) 414ff7e0accSmrg eval $set_cc_for_build 415ff7e0accSmrg sed 's/^ //' << EOF >$dummy.c 416ff7e0accSmrg#ifdef __cplusplus 417ff7e0accSmrg#include <stdio.h> /* for printf() prototype */ 418ff7e0accSmrg int main (int argc, char *argv[]) { 419ff7e0accSmrg#else 420ff7e0accSmrg int main (argc, argv) int argc; char *argv[]; { 421ff7e0accSmrg#endif 422ff7e0accSmrg #if defined (host_mips) && defined (MIPSEB) 423ff7e0accSmrg #if defined (SYSTYPE_SYSV) 424ff7e0accSmrg printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 425ff7e0accSmrg #endif 426ff7e0accSmrg #if defined (SYSTYPE_SVR4) 427ff7e0accSmrg printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 428ff7e0accSmrg #endif 429ff7e0accSmrg #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 430ff7e0accSmrg printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 431ff7e0accSmrg #endif 432ff7e0accSmrg #endif 433ff7e0accSmrg exit (-1); 434ff7e0accSmrg } 435ff7e0accSmrgEOF 436ff7e0accSmrg $CC_FOR_BUILD -o $dummy $dummy.c && 437ff7e0accSmrg dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 438ff7e0accSmrg SYSTEM_NAME=`$dummy $dummyarg` && 439ff7e0accSmrg { echo "$SYSTEM_NAME"; exit; } 440ff7e0accSmrg echo mips-mips-riscos${UNAME_RELEASE} 441ff7e0accSmrg exit ;; 442ff7e0accSmrg Motorola:PowerMAX_OS:*:*) 443ff7e0accSmrg echo powerpc-motorola-powermax 444ff7e0accSmrg exit ;; 445ff7e0accSmrg Motorola:*:4.3:PL8-*) 446ff7e0accSmrg echo powerpc-harris-powermax 447ff7e0accSmrg exit ;; 448ff7e0accSmrg Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 449ff7e0accSmrg echo powerpc-harris-powermax 450ff7e0accSmrg exit ;; 451ff7e0accSmrg Night_Hawk:Power_UNIX:*:*) 452ff7e0accSmrg echo powerpc-harris-powerunix 453ff7e0accSmrg exit ;; 454ff7e0accSmrg m88k:CX/UX:7*:*) 455ff7e0accSmrg echo m88k-harris-cxux7 456ff7e0accSmrg exit ;; 457ff7e0accSmrg m88k:*:4*:R4*) 458ff7e0accSmrg echo m88k-motorola-sysv4 459ff7e0accSmrg exit ;; 460ff7e0accSmrg m88k:*:3*:R3*) 461ff7e0accSmrg echo m88k-motorola-sysv3 462ff7e0accSmrg exit ;; 463ff7e0accSmrg AViiON:dgux:*:*) 464ff7e0accSmrg # DG/UX returns AViiON for all architectures 465ff7e0accSmrg UNAME_PROCESSOR=`/usr/bin/uname -p` 466ff7e0accSmrg if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 467ff7e0accSmrg then 468ff7e0accSmrg if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 469ff7e0accSmrg [ ${TARGET_BINARY_INTERFACE}x = x ] 470ff7e0accSmrg then 471ff7e0accSmrg echo m88k-dg-dgux${UNAME_RELEASE} 472ff7e0accSmrg else 473ff7e0accSmrg echo m88k-dg-dguxbcs${UNAME_RELEASE} 474ff7e0accSmrg fi 475ff7e0accSmrg else 476ff7e0accSmrg echo i586-dg-dgux${UNAME_RELEASE} 477ff7e0accSmrg fi 478ff7e0accSmrg exit ;; 479ff7e0accSmrg M88*:DolphinOS:*:*) # DolphinOS (SVR3) 480ff7e0accSmrg echo m88k-dolphin-sysv3 481ff7e0accSmrg exit ;; 482ff7e0accSmrg M88*:*:R3*:*) 483ff7e0accSmrg # Delta 88k system running SVR3 484ff7e0accSmrg echo m88k-motorola-sysv3 485ff7e0accSmrg exit ;; 486ff7e0accSmrg XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 487ff7e0accSmrg echo m88k-tektronix-sysv3 488ff7e0accSmrg exit ;; 489ff7e0accSmrg Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 490ff7e0accSmrg echo m68k-tektronix-bsd 491ff7e0accSmrg exit ;; 492ff7e0accSmrg *:IRIX*:*:*) 493ff7e0accSmrg echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 494ff7e0accSmrg exit ;; 495ff7e0accSmrg ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 496ff7e0accSmrg echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 497ff7e0accSmrg exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 498ff7e0accSmrg i*86:AIX:*:*) 499ff7e0accSmrg echo i386-ibm-aix 500ff7e0accSmrg exit ;; 501ff7e0accSmrg ia64:AIX:*:*) 502ff7e0accSmrg if [ -x /usr/bin/oslevel ] ; then 503ff7e0accSmrg IBM_REV=`/usr/bin/oslevel` 504ff7e0accSmrg else 505ff7e0accSmrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 506ff7e0accSmrg fi 507ff7e0accSmrg echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 508ff7e0accSmrg exit ;; 509ff7e0accSmrg *:AIX:2:3) 510ff7e0accSmrg if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 511ff7e0accSmrg eval $set_cc_for_build 512ff7e0accSmrg sed 's/^ //' << EOF >$dummy.c 513ff7e0accSmrg #include <sys/systemcfg.h> 514ff7e0accSmrg 515ff7e0accSmrg main() 516ff7e0accSmrg { 517ff7e0accSmrg if (!__power_pc()) 518ff7e0accSmrg exit(1); 519ff7e0accSmrg puts("powerpc-ibm-aix3.2.5"); 520ff7e0accSmrg exit(0); 521ff7e0accSmrg } 522ff7e0accSmrgEOF 523ff7e0accSmrg if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 524ff7e0accSmrg then 525ff7e0accSmrg echo "$SYSTEM_NAME" 526ff7e0accSmrg else 527ff7e0accSmrg echo rs6000-ibm-aix3.2.5 528ff7e0accSmrg fi 529ff7e0accSmrg elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 530ff7e0accSmrg echo rs6000-ibm-aix3.2.4 531ff7e0accSmrg else 532ff7e0accSmrg echo rs6000-ibm-aix3.2 533ff7e0accSmrg fi 534ff7e0accSmrg exit ;; 535ff7e0accSmrg *:AIX:*:[45]) 536ff7e0accSmrg IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 537ff7e0accSmrg if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 538ff7e0accSmrg IBM_ARCH=rs6000 539ff7e0accSmrg else 540ff7e0accSmrg IBM_ARCH=powerpc 541ff7e0accSmrg fi 542ff7e0accSmrg if [ -x /usr/bin/oslevel ] ; then 543ff7e0accSmrg IBM_REV=`/usr/bin/oslevel` 544ff7e0accSmrg else 545ff7e0accSmrg IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 546ff7e0accSmrg fi 547ff7e0accSmrg echo ${IBM_ARCH}-ibm-aix${IBM_REV} 548ff7e0accSmrg exit ;; 549ff7e0accSmrg *:AIX:*:*) 550ff7e0accSmrg echo rs6000-ibm-aix 551ff7e0accSmrg exit ;; 552ff7e0accSmrg ibmrt:4.4BSD:*|romp-ibm:BSD:*) 553ff7e0accSmrg echo romp-ibm-bsd4.4 554ff7e0accSmrg exit ;; 555ff7e0accSmrg ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 556ff7e0accSmrg echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 557ff7e0accSmrg exit ;; # report: romp-ibm BSD 4.3 558ff7e0accSmrg *:BOSX:*:*) 559ff7e0accSmrg echo rs6000-bull-bosx 560ff7e0accSmrg exit ;; 561ff7e0accSmrg DPX/2?00:B.O.S.:*:*) 562ff7e0accSmrg echo m68k-bull-sysv3 563ff7e0accSmrg exit ;; 564ff7e0accSmrg 9000/[34]??:4.3bsd:1.*:*) 565ff7e0accSmrg echo m68k-hp-bsd 566ff7e0accSmrg exit ;; 567ff7e0accSmrg hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 568ff7e0accSmrg echo m68k-hp-bsd4.4 569ff7e0accSmrg exit ;; 570ff7e0accSmrg 9000/[34678]??:HP-UX:*:*) 571ff7e0accSmrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 572ff7e0accSmrg case "${UNAME_MACHINE}" in 573ff7e0accSmrg 9000/31? ) HP_ARCH=m68000 ;; 574ff7e0accSmrg 9000/[34]?? ) HP_ARCH=m68k ;; 575ff7e0accSmrg 9000/[678][0-9][0-9]) 576ff7e0accSmrg if [ -x /usr/bin/getconf ]; then 577ff7e0accSmrg sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 578ff7e0accSmrg sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 579ff7e0accSmrg case "${sc_cpu_version}" in 580ff7e0accSmrg 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 581ff7e0accSmrg 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 582ff7e0accSmrg 532) # CPU_PA_RISC2_0 583ff7e0accSmrg case "${sc_kernel_bits}" in 584ff7e0accSmrg 32) HP_ARCH="hppa2.0n" ;; 585ff7e0accSmrg 64) HP_ARCH="hppa2.0w" ;; 586ff7e0accSmrg '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 587ff7e0accSmrg esac ;; 588ff7e0accSmrg esac 589ff7e0accSmrg fi 590ff7e0accSmrg if [ "${HP_ARCH}" = "" ]; then 591ff7e0accSmrg eval $set_cc_for_build 592ff7e0accSmrg sed 's/^ //' << EOF >$dummy.c 593ff7e0accSmrg 594ff7e0accSmrg #define _HPUX_SOURCE 595ff7e0accSmrg #include <stdlib.h> 596ff7e0accSmrg #include <unistd.h> 597ff7e0accSmrg 598ff7e0accSmrg int main () 599ff7e0accSmrg { 600ff7e0accSmrg #if defined(_SC_KERNEL_BITS) 601ff7e0accSmrg long bits = sysconf(_SC_KERNEL_BITS); 602ff7e0accSmrg #endif 603ff7e0accSmrg long cpu = sysconf (_SC_CPU_VERSION); 604ff7e0accSmrg 605ff7e0accSmrg switch (cpu) 606ff7e0accSmrg { 607ff7e0accSmrg case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 608ff7e0accSmrg case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 609ff7e0accSmrg case CPU_PA_RISC2_0: 610ff7e0accSmrg #if defined(_SC_KERNEL_BITS) 611ff7e0accSmrg switch (bits) 612ff7e0accSmrg { 613ff7e0accSmrg case 64: puts ("hppa2.0w"); break; 614ff7e0accSmrg case 32: puts ("hppa2.0n"); break; 615ff7e0accSmrg default: puts ("hppa2.0"); break; 616ff7e0accSmrg } break; 617ff7e0accSmrg #else /* !defined(_SC_KERNEL_BITS) */ 618ff7e0accSmrg puts ("hppa2.0"); break; 619ff7e0accSmrg #endif 620ff7e0accSmrg default: puts ("hppa1.0"); break; 621ff7e0accSmrg } 622ff7e0accSmrg exit (0); 623ff7e0accSmrg } 624ff7e0accSmrgEOF 625ff7e0accSmrg (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 626ff7e0accSmrg test -z "$HP_ARCH" && HP_ARCH=hppa 627ff7e0accSmrg fi ;; 628ff7e0accSmrg esac 629ff7e0accSmrg if [ ${HP_ARCH} = "hppa2.0w" ] 630ff7e0accSmrg then 631ff7e0accSmrg eval $set_cc_for_build 632ff7e0accSmrg 633ff7e0accSmrg # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 634ff7e0accSmrg # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler 635ff7e0accSmrg # generating 64-bit code. GNU and HP use different nomenclature: 636ff7e0accSmrg # 637ff7e0accSmrg # $ CC_FOR_BUILD=cc ./config.guess 638ff7e0accSmrg # => hppa2.0w-hp-hpux11.23 639ff7e0accSmrg # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 640ff7e0accSmrg # => hppa64-hp-hpux11.23 641ff7e0accSmrg 642ff7e0accSmrg if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 643ff7e0accSmrg grep __LP64__ >/dev/null 644ff7e0accSmrg then 645ff7e0accSmrg HP_ARCH="hppa2.0w" 646ff7e0accSmrg else 647ff7e0accSmrg HP_ARCH="hppa64" 648ff7e0accSmrg fi 649ff7e0accSmrg fi 650ff7e0accSmrg echo ${HP_ARCH}-hp-hpux${HPUX_REV} 651ff7e0accSmrg exit ;; 652ff7e0accSmrg ia64:HP-UX:*:*) 653ff7e0accSmrg HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 654ff7e0accSmrg echo ia64-hp-hpux${HPUX_REV} 655ff7e0accSmrg exit ;; 656ff7e0accSmrg 3050*:HI-UX:*:*) 657ff7e0accSmrg eval $set_cc_for_build 658ff7e0accSmrg sed 's/^ //' << EOF >$dummy.c 659ff7e0accSmrg #include <unistd.h> 660ff7e0accSmrg int 661ff7e0accSmrg main () 662ff7e0accSmrg { 663ff7e0accSmrg long cpu = sysconf (_SC_CPU_VERSION); 664ff7e0accSmrg /* The order matters, because CPU_IS_HP_MC68K erroneously returns 665ff7e0accSmrg true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 666ff7e0accSmrg results, however. */ 667ff7e0accSmrg if (CPU_IS_PA_RISC (cpu)) 668ff7e0accSmrg { 669ff7e0accSmrg switch (cpu) 670ff7e0accSmrg { 671ff7e0accSmrg case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 672ff7e0accSmrg case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 673ff7e0accSmrg case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 674ff7e0accSmrg default: puts ("hppa-hitachi-hiuxwe2"); break; 675ff7e0accSmrg } 676ff7e0accSmrg } 677ff7e0accSmrg else if (CPU_IS_HP_MC68K (cpu)) 678ff7e0accSmrg puts ("m68k-hitachi-hiuxwe2"); 679ff7e0accSmrg else puts ("unknown-hitachi-hiuxwe2"); 680ff7e0accSmrg exit (0); 681ff7e0accSmrg } 682ff7e0accSmrgEOF 683ff7e0accSmrg $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 684ff7e0accSmrg { echo "$SYSTEM_NAME"; exit; } 685ff7e0accSmrg echo unknown-hitachi-hiuxwe2 686ff7e0accSmrg exit ;; 687ff7e0accSmrg 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 688ff7e0accSmrg echo hppa1.1-hp-bsd 689ff7e0accSmrg exit ;; 690ff7e0accSmrg 9000/8??:4.3bsd:*:*) 691ff7e0accSmrg echo hppa1.0-hp-bsd 692ff7e0accSmrg exit ;; 693ff7e0accSmrg *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 694ff7e0accSmrg echo hppa1.0-hp-mpeix 695ff7e0accSmrg exit ;; 696ff7e0accSmrg hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 697ff7e0accSmrg echo hppa1.1-hp-osf 698ff7e0accSmrg exit ;; 699ff7e0accSmrg hp8??:OSF1:*:*) 700ff7e0accSmrg echo hppa1.0-hp-osf 701ff7e0accSmrg exit ;; 702ff7e0accSmrg i*86:OSF1:*:*) 703ff7e0accSmrg if [ -x /usr/sbin/sysversion ] ; then 704ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-osf1mk 705ff7e0accSmrg else 706ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-osf1 707ff7e0accSmrg fi 708ff7e0accSmrg exit ;; 709ff7e0accSmrg parisc*:Lites*:*:*) 710ff7e0accSmrg echo hppa1.1-hp-lites 711ff7e0accSmrg exit ;; 712ff7e0accSmrg C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 713ff7e0accSmrg echo c1-convex-bsd 714ff7e0accSmrg exit ;; 715ff7e0accSmrg C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 716ff7e0accSmrg if getsysinfo -f scalar_acc 717ff7e0accSmrg then echo c32-convex-bsd 718ff7e0accSmrg else echo c2-convex-bsd 719ff7e0accSmrg fi 720ff7e0accSmrg exit ;; 721ff7e0accSmrg C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 722ff7e0accSmrg echo c34-convex-bsd 723ff7e0accSmrg exit ;; 724ff7e0accSmrg C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 725ff7e0accSmrg echo c38-convex-bsd 726ff7e0accSmrg exit ;; 727ff7e0accSmrg C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 728ff7e0accSmrg echo c4-convex-bsd 729ff7e0accSmrg exit ;; 730ff7e0accSmrg CRAY*Y-MP:*:*:*) 731ff7e0accSmrg echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 732ff7e0accSmrg exit ;; 733ff7e0accSmrg CRAY*[A-Z]90:*:*:*) 734ff7e0accSmrg echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 735ff7e0accSmrg | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 736ff7e0accSmrg -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 737ff7e0accSmrg -e 's/\.[^.]*$/.X/' 738ff7e0accSmrg exit ;; 739ff7e0accSmrg CRAY*TS:*:*:*) 740ff7e0accSmrg echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 741ff7e0accSmrg exit ;; 742ff7e0accSmrg CRAY*T3E:*:*:*) 743ff7e0accSmrg echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 744ff7e0accSmrg exit ;; 745ff7e0accSmrg CRAY*SV1:*:*:*) 746ff7e0accSmrg echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 747ff7e0accSmrg exit ;; 748ff7e0accSmrg *:UNICOS/mp:*:*) 749ff7e0accSmrg echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 750ff7e0accSmrg exit ;; 751ff7e0accSmrg F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 752ff7e0accSmrg FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 753ff7e0accSmrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 754ff7e0accSmrg FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 755ff7e0accSmrg echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 756ff7e0accSmrg exit ;; 757ff7e0accSmrg 5000:UNIX_System_V:4.*:*) 758ff7e0accSmrg FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 759ff7e0accSmrg FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 760ff7e0accSmrg echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 761ff7e0accSmrg exit ;; 762ff7e0accSmrg i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 763ff7e0accSmrg echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 764ff7e0accSmrg exit ;; 765ff7e0accSmrg sparc*:BSD/OS:*:*) 766ff7e0accSmrg echo sparc-unknown-bsdi${UNAME_RELEASE} 767ff7e0accSmrg exit ;; 768ff7e0accSmrg *:BSD/OS:*:*) 769ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 770ff7e0accSmrg exit ;; 771ff7e0accSmrg *:FreeBSD:*:*) 772ff7e0accSmrg case ${UNAME_MACHINE} in 773ff7e0accSmrg pc98) 774ff7e0accSmrg echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 775ff7e0accSmrg amd64) 776ff7e0accSmrg echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 777ff7e0accSmrg *) 778ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 779ff7e0accSmrg esac 780ff7e0accSmrg exit ;; 781ff7e0accSmrg i*:CYGWIN*:*) 782ff7e0accSmrg echo ${UNAME_MACHINE}-pc-cygwin 783ff7e0accSmrg exit ;; 784ff7e0accSmrg *:MINGW*:*) 785ff7e0accSmrg echo ${UNAME_MACHINE}-pc-mingw32 786ff7e0accSmrg exit ;; 787ff7e0accSmrg i*:windows32*:*) 788ff7e0accSmrg # uname -m includes "-pc" on this system. 789ff7e0accSmrg echo ${UNAME_MACHINE}-mingw32 790ff7e0accSmrg exit ;; 791ff7e0accSmrg i*:PW*:*) 792ff7e0accSmrg echo ${UNAME_MACHINE}-pc-pw32 793ff7e0accSmrg exit ;; 794ff7e0accSmrg *:Interix*:[3456]*) 795ff7e0accSmrg case ${UNAME_MACHINE} in 796ff7e0accSmrg x86) 797ff7e0accSmrg echo i586-pc-interix${UNAME_RELEASE} 798ff7e0accSmrg exit ;; 799ff7e0accSmrg EM64T | authenticamd) 800ff7e0accSmrg echo x86_64-unknown-interix${UNAME_RELEASE} 801ff7e0accSmrg exit ;; 802ff7e0accSmrg esac ;; 803ff7e0accSmrg [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 804ff7e0accSmrg echo i${UNAME_MACHINE}-pc-mks 805ff7e0accSmrg exit ;; 806ff7e0accSmrg i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 807ff7e0accSmrg # How do we know it's Interix rather than the generic POSIX subsystem? 808ff7e0accSmrg # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 809ff7e0accSmrg # UNAME_MACHINE based on the output of uname instead of i386? 810ff7e0accSmrg echo i586-pc-interix 811ff7e0accSmrg exit ;; 812ff7e0accSmrg i*:UWIN*:*) 813ff7e0accSmrg echo ${UNAME_MACHINE}-pc-uwin 814ff7e0accSmrg exit ;; 815ff7e0accSmrg amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 816ff7e0accSmrg echo x86_64-unknown-cygwin 817ff7e0accSmrg exit ;; 818ff7e0accSmrg p*:CYGWIN*:*) 819ff7e0accSmrg echo powerpcle-unknown-cygwin 820ff7e0accSmrg exit ;; 821ff7e0accSmrg prep*:SunOS:5.*:*) 822ff7e0accSmrg echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 823ff7e0accSmrg exit ;; 824ff7e0accSmrg *:GNU:*:*) 825ff7e0accSmrg # the GNU system 826ff7e0accSmrg echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 827ff7e0accSmrg exit ;; 828ff7e0accSmrg *:GNU/*:*:*) 829ff7e0accSmrg # other systems with GNU libc and userland 830ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 831ff7e0accSmrg exit ;; 832ff7e0accSmrg i*86:Minix:*:*) 833ff7e0accSmrg echo ${UNAME_MACHINE}-pc-minix 834ff7e0accSmrg exit ;; 835ff7e0accSmrg arm*:Linux:*:*) 836ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 837ff7e0accSmrg exit ;; 838ff7e0accSmrg avr32*:Linux:*:*) 839ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 840ff7e0accSmrg exit ;; 841ff7e0accSmrg cris:Linux:*:*) 842ff7e0accSmrg echo cris-axis-linux-gnu 843ff7e0accSmrg exit ;; 844ff7e0accSmrg crisv32:Linux:*:*) 845ff7e0accSmrg echo crisv32-axis-linux-gnu 846ff7e0accSmrg exit ;; 847ff7e0accSmrg frv:Linux:*:*) 848ff7e0accSmrg echo frv-unknown-linux-gnu 849ff7e0accSmrg exit ;; 850ff7e0accSmrg ia64:Linux:*:*) 851ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 852ff7e0accSmrg exit ;; 853ff7e0accSmrg m32r*:Linux:*:*) 854ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 855ff7e0accSmrg exit ;; 856ff7e0accSmrg m68*:Linux:*:*) 857ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 858ff7e0accSmrg exit ;; 859ff7e0accSmrg mips:Linux:*:*) 860ff7e0accSmrg eval $set_cc_for_build 861ff7e0accSmrg sed 's/^ //' << EOF >$dummy.c 862ff7e0accSmrg #undef CPU 863ff7e0accSmrg #undef mips 864ff7e0accSmrg #undef mipsel 865ff7e0accSmrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 866ff7e0accSmrg CPU=mipsel 867ff7e0accSmrg #else 868ff7e0accSmrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 869ff7e0accSmrg CPU=mips 870ff7e0accSmrg #else 871ff7e0accSmrg CPU= 872ff7e0accSmrg #endif 873ff7e0accSmrg #endif 874ff7e0accSmrgEOF 875ff7e0accSmrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 876ff7e0accSmrg /^CPU/{ 877ff7e0accSmrg s: ::g 878ff7e0accSmrg p 879ff7e0accSmrg }'`" 880ff7e0accSmrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 881ff7e0accSmrg ;; 882ff7e0accSmrg mips64:Linux:*:*) 883ff7e0accSmrg eval $set_cc_for_build 884ff7e0accSmrg sed 's/^ //' << EOF >$dummy.c 885ff7e0accSmrg #undef CPU 886ff7e0accSmrg #undef mips64 887ff7e0accSmrg #undef mips64el 888ff7e0accSmrg #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 889ff7e0accSmrg CPU=mips64el 890ff7e0accSmrg #else 891ff7e0accSmrg #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 892ff7e0accSmrg CPU=mips64 893ff7e0accSmrg #else 894ff7e0accSmrg CPU= 895ff7e0accSmrg #endif 896ff7e0accSmrg #endif 897ff7e0accSmrgEOF 898ff7e0accSmrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 899ff7e0accSmrg /^CPU/{ 900ff7e0accSmrg s: ::g 901ff7e0accSmrg p 902ff7e0accSmrg }'`" 903ff7e0accSmrg test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 904ff7e0accSmrg ;; 905ff7e0accSmrg or32:Linux:*:*) 906ff7e0accSmrg echo or32-unknown-linux-gnu 907ff7e0accSmrg exit ;; 908ff7e0accSmrg ppc:Linux:*:*) 909ff7e0accSmrg echo powerpc-unknown-linux-gnu 910ff7e0accSmrg exit ;; 911ff7e0accSmrg ppc64:Linux:*:*) 912ff7e0accSmrg echo powerpc64-unknown-linux-gnu 913ff7e0accSmrg exit ;; 914ff7e0accSmrg alpha:Linux:*:*) 915ff7e0accSmrg case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 916ff7e0accSmrg EV5) UNAME_MACHINE=alphaev5 ;; 917ff7e0accSmrg EV56) UNAME_MACHINE=alphaev56 ;; 918ff7e0accSmrg PCA56) UNAME_MACHINE=alphapca56 ;; 919ff7e0accSmrg PCA57) UNAME_MACHINE=alphapca56 ;; 920ff7e0accSmrg EV6) UNAME_MACHINE=alphaev6 ;; 921ff7e0accSmrg EV67) UNAME_MACHINE=alphaev67 ;; 922ff7e0accSmrg EV68*) UNAME_MACHINE=alphaev68 ;; 923ff7e0accSmrg esac 924ff7e0accSmrg objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 925ff7e0accSmrg if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 926ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 927ff7e0accSmrg exit ;; 928ff7e0accSmrg parisc:Linux:*:* | hppa:Linux:*:*) 929ff7e0accSmrg # Look for CPU level 930ff7e0accSmrg case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 931ff7e0accSmrg PA7*) echo hppa1.1-unknown-linux-gnu ;; 932ff7e0accSmrg PA8*) echo hppa2.0-unknown-linux-gnu ;; 933ff7e0accSmrg *) echo hppa-unknown-linux-gnu ;; 934ff7e0accSmrg esac 935ff7e0accSmrg exit ;; 936ff7e0accSmrg parisc64:Linux:*:* | hppa64:Linux:*:*) 937ff7e0accSmrg echo hppa64-unknown-linux-gnu 938ff7e0accSmrg exit ;; 939ff7e0accSmrg s390:Linux:*:* | s390x:Linux:*:*) 940ff7e0accSmrg echo ${UNAME_MACHINE}-ibm-linux 941ff7e0accSmrg exit ;; 942ff7e0accSmrg sh64*:Linux:*:*) 943ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 944ff7e0accSmrg exit ;; 945ff7e0accSmrg sh*:Linux:*:*) 946ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 947ff7e0accSmrg exit ;; 948ff7e0accSmrg sparc:Linux:*:* | sparc64:Linux:*:*) 949ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-linux-gnu 950ff7e0accSmrg exit ;; 951ff7e0accSmrg vax:Linux:*:*) 952ff7e0accSmrg echo ${UNAME_MACHINE}-dec-linux-gnu 953ff7e0accSmrg exit ;; 954ff7e0accSmrg x86_64:Linux:*:*) 955ff7e0accSmrg echo x86_64-unknown-linux-gnu 956ff7e0accSmrg exit ;; 957ff7e0accSmrg xtensa:Linux:*:*) 958ff7e0accSmrg echo xtensa-unknown-linux-gnu 959ff7e0accSmrg exit ;; 960ff7e0accSmrg i*86:Linux:*:*) 961ff7e0accSmrg # The BFD linker knows what the default object file format is, so 962ff7e0accSmrg # first see if it will tell us. cd to the root directory to prevent 963ff7e0accSmrg # problems with other programs or directories called `ld' in the path. 964ff7e0accSmrg # Set LC_ALL=C to ensure ld outputs messages in English. 965ff7e0accSmrg ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ 966ff7e0accSmrg | sed -ne '/supported targets:/!d 967ff7e0accSmrg s/[ ][ ]*/ /g 968ff7e0accSmrg s/.*supported targets: *// 969ff7e0accSmrg s/ .*// 970ff7e0accSmrg p'` 971ff7e0accSmrg case "$ld_supported_targets" in 972ff7e0accSmrg elf32-i386) 973ff7e0accSmrg TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 974ff7e0accSmrg ;; 975ff7e0accSmrg a.out-i386-linux) 976ff7e0accSmrg echo "${UNAME_MACHINE}-pc-linux-gnuaout" 977ff7e0accSmrg exit ;; 978ff7e0accSmrg coff-i386) 979ff7e0accSmrg echo "${UNAME_MACHINE}-pc-linux-gnucoff" 980ff7e0accSmrg exit ;; 981ff7e0accSmrg "") 982ff7e0accSmrg # Either a pre-BFD a.out linker (linux-gnuoldld) or 983ff7e0accSmrg # one that does not give us useful --help. 984ff7e0accSmrg echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 985ff7e0accSmrg exit ;; 986ff7e0accSmrg esac 987ff7e0accSmrg # Determine whether the default compiler is a.out or elf 988ff7e0accSmrg eval $set_cc_for_build 989ff7e0accSmrg sed 's/^ //' << EOF >$dummy.c 990ff7e0accSmrg #include <features.h> 991ff7e0accSmrg #ifdef __ELF__ 992ff7e0accSmrg # ifdef __GLIBC__ 993ff7e0accSmrg # if __GLIBC__ >= 2 994ff7e0accSmrg LIBC=gnu 995ff7e0accSmrg # else 996ff7e0accSmrg LIBC=gnulibc1 997ff7e0accSmrg # endif 998ff7e0accSmrg # else 999ff7e0accSmrg LIBC=gnulibc1 1000ff7e0accSmrg # endif 1001ff7e0accSmrg #else 1002ff7e0accSmrg #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) 1003ff7e0accSmrg LIBC=gnu 1004ff7e0accSmrg #else 1005ff7e0accSmrg LIBC=gnuaout 1006ff7e0accSmrg #endif 1007ff7e0accSmrg #endif 1008ff7e0accSmrg #ifdef __dietlibc__ 1009ff7e0accSmrg LIBC=dietlibc 1010ff7e0accSmrg #endif 1011ff7e0accSmrgEOF 1012ff7e0accSmrg eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' 1013ff7e0accSmrg /^LIBC/{ 1014ff7e0accSmrg s: ::g 1015ff7e0accSmrg p 1016ff7e0accSmrg }'`" 1017ff7e0accSmrg test x"${LIBC}" != x && { 1018ff7e0accSmrg echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 1019ff7e0accSmrg exit 1020ff7e0accSmrg } 1021ff7e0accSmrg test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } 1022ff7e0accSmrg ;; 1023ff7e0accSmrg i*86:DYNIX/ptx:4*:*) 1024ff7e0accSmrg # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 1025ff7e0accSmrg # earlier versions are messed up and put the nodename in both 1026ff7e0accSmrg # sysname and nodename. 1027ff7e0accSmrg echo i386-sequent-sysv4 1028ff7e0accSmrg exit ;; 1029ff7e0accSmrg i*86:UNIX_SV:4.2MP:2.*) 1030ff7e0accSmrg # Unixware is an offshoot of SVR4, but it has its own version 1031ff7e0accSmrg # number series starting with 2... 1032ff7e0accSmrg # I am not positive that other SVR4 systems won't match this, 1033ff7e0accSmrg # I just have to hope. -- rms. 1034ff7e0accSmrg # Use sysv4.2uw... so that sysv4* matches it. 1035ff7e0accSmrg echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 1036ff7e0accSmrg exit ;; 1037ff7e0accSmrg i*86:OS/2:*:*) 1038ff7e0accSmrg # If we were able to find `uname', then EMX Unix compatibility 1039ff7e0accSmrg # is probably installed. 1040ff7e0accSmrg echo ${UNAME_MACHINE}-pc-os2-emx 1041ff7e0accSmrg exit ;; 1042ff7e0accSmrg i*86:XTS-300:*:STOP) 1043ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-stop 1044ff7e0accSmrg exit ;; 1045ff7e0accSmrg i*86:atheos:*:*) 1046ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-atheos 1047ff7e0accSmrg exit ;; 1048ff7e0accSmrg i*86:syllable:*:*) 1049ff7e0accSmrg echo ${UNAME_MACHINE}-pc-syllable 1050ff7e0accSmrg exit ;; 1051ff7e0accSmrg i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 1052ff7e0accSmrg echo i386-unknown-lynxos${UNAME_RELEASE} 1053ff7e0accSmrg exit ;; 1054ff7e0accSmrg i*86:*DOS:*:*) 1055ff7e0accSmrg echo ${UNAME_MACHINE}-pc-msdosdjgpp 1056ff7e0accSmrg exit ;; 1057ff7e0accSmrg i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 1058ff7e0accSmrg UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 1059ff7e0accSmrg if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then 1060ff7e0accSmrg echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} 1061ff7e0accSmrg else 1062ff7e0accSmrg echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 1063ff7e0accSmrg fi 1064ff7e0accSmrg exit ;; 1065ff7e0accSmrg i*86:*:5:[678]*) 1066ff7e0accSmrg # UnixWare 7.x, OpenUNIX and OpenServer 6. 1067ff7e0accSmrg case `/bin/uname -X | grep "^Machine"` in 1068ff7e0accSmrg *486*) UNAME_MACHINE=i486 ;; 1069ff7e0accSmrg *Pentium) UNAME_MACHINE=i586 ;; 1070ff7e0accSmrg *Pent*|*Celeron) UNAME_MACHINE=i686 ;; 1071ff7e0accSmrg esac 1072ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 1073ff7e0accSmrg exit ;; 1074ff7e0accSmrg i*86:*:3.2:*) 1075ff7e0accSmrg if test -f /usr/options/cb.name; then 1076ff7e0accSmrg UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` 1077ff7e0accSmrg echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 1078ff7e0accSmrg elif /bin/uname -X 2>/dev/null >/dev/null ; then 1079ff7e0accSmrg UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 1080ff7e0accSmrg (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 1081ff7e0accSmrg (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 1082ff7e0accSmrg && UNAME_MACHINE=i586 1083ff7e0accSmrg (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 1084ff7e0accSmrg && UNAME_MACHINE=i686 1085ff7e0accSmrg (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 1086ff7e0accSmrg && UNAME_MACHINE=i686 1087ff7e0accSmrg echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 1088ff7e0accSmrg else 1089ff7e0accSmrg echo ${UNAME_MACHINE}-pc-sysv32 1090ff7e0accSmrg fi 1091ff7e0accSmrg exit ;; 1092ff7e0accSmrg pc:*:*:*) 1093ff7e0accSmrg # Left here for compatibility: 1094ff7e0accSmrg # uname -m prints for DJGPP always 'pc', but it prints nothing about 1095ff7e0accSmrg # the processor, so we play safe by assuming i386. 1096ff7e0accSmrg echo i386-pc-msdosdjgpp 1097ff7e0accSmrg exit ;; 1098ff7e0accSmrg Intel:Mach:3*:*) 1099ff7e0accSmrg echo i386-pc-mach3 1100ff7e0accSmrg exit ;; 1101ff7e0accSmrg paragon:*:*:*) 1102ff7e0accSmrg echo i860-intel-osf1 1103ff7e0accSmrg exit ;; 1104ff7e0accSmrg i860:*:4.*:*) # i860-SVR4 1105ff7e0accSmrg if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 1106ff7e0accSmrg echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 1107ff7e0accSmrg else # Add other i860-SVR4 vendors below as they are discovered. 1108ff7e0accSmrg echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 1109ff7e0accSmrg fi 1110ff7e0accSmrg exit ;; 1111ff7e0accSmrg mini*:CTIX:SYS*5:*) 1112ff7e0accSmrg # "miniframe" 1113ff7e0accSmrg echo m68010-convergent-sysv 1114ff7e0accSmrg exit ;; 1115ff7e0accSmrg mc68k:UNIX:SYSTEM5:3.51m) 1116ff7e0accSmrg echo m68k-convergent-sysv 1117ff7e0accSmrg exit ;; 1118ff7e0accSmrg M680?0:D-NIX:5.3:*) 1119ff7e0accSmrg echo m68k-diab-dnix 1120ff7e0accSmrg exit ;; 1121ff7e0accSmrg M68*:*:R3V[5678]*:*) 1122ff7e0accSmrg test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 1123ff7e0accSmrg 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) 1124ff7e0accSmrg OS_REL='' 1125ff7e0accSmrg test -r /etc/.relid \ 1126ff7e0accSmrg && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 1127ff7e0accSmrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1128ff7e0accSmrg && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 1129ff7e0accSmrg /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 1130ff7e0accSmrg && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 1131ff7e0accSmrg 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 1132ff7e0accSmrg /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 1133ff7e0accSmrg && { echo i486-ncr-sysv4; exit; } ;; 1134ff7e0accSmrg m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 1135ff7e0accSmrg echo m68k-unknown-lynxos${UNAME_RELEASE} 1136ff7e0accSmrg exit ;; 1137ff7e0accSmrg mc68030:UNIX_System_V:4.*:*) 1138ff7e0accSmrg echo m68k-atari-sysv4 1139ff7e0accSmrg exit ;; 1140ff7e0accSmrg TSUNAMI:LynxOS:2.*:*) 1141ff7e0accSmrg echo sparc-unknown-lynxos${UNAME_RELEASE} 1142ff7e0accSmrg exit ;; 1143ff7e0accSmrg rs6000:LynxOS:2.*:*) 1144ff7e0accSmrg echo rs6000-unknown-lynxos${UNAME_RELEASE} 1145ff7e0accSmrg exit ;; 1146ff7e0accSmrg PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 1147ff7e0accSmrg echo powerpc-unknown-lynxos${UNAME_RELEASE} 1148ff7e0accSmrg exit ;; 1149ff7e0accSmrg SM[BE]S:UNIX_SV:*:*) 1150ff7e0accSmrg echo mips-dde-sysv${UNAME_RELEASE} 1151ff7e0accSmrg exit ;; 1152ff7e0accSmrg RM*:ReliantUNIX-*:*:*) 1153ff7e0accSmrg echo mips-sni-sysv4 1154ff7e0accSmrg exit ;; 1155ff7e0accSmrg RM*:SINIX-*:*:*) 1156ff7e0accSmrg echo mips-sni-sysv4 1157ff7e0accSmrg exit ;; 1158ff7e0accSmrg *:SINIX-*:*:*) 1159ff7e0accSmrg if uname -p 2>/dev/null >/dev/null ; then 1160ff7e0accSmrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 1161ff7e0accSmrg echo ${UNAME_MACHINE}-sni-sysv4 1162ff7e0accSmrg else 1163ff7e0accSmrg echo ns32k-sni-sysv 1164ff7e0accSmrg fi 1165ff7e0accSmrg exit ;; 1166ff7e0accSmrg PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 1167ff7e0accSmrg # says <Richard.M.Bartel@ccMail.Census.GOV> 1168ff7e0accSmrg echo i586-unisys-sysv4 1169ff7e0accSmrg exit ;; 1170ff7e0accSmrg *:UNIX_System_V:4*:FTX*) 1171ff7e0accSmrg # From Gerald Hewes <hewes@openmarket.com>. 1172ff7e0accSmrg # How about differentiating between stratus architectures? -djm 1173ff7e0accSmrg echo hppa1.1-stratus-sysv4 1174ff7e0accSmrg exit ;; 1175ff7e0accSmrg *:*:*:FTX*) 1176ff7e0accSmrg # From seanf@swdc.stratus.com. 1177ff7e0accSmrg echo i860-stratus-sysv4 1178ff7e0accSmrg exit ;; 1179ff7e0accSmrg i*86:VOS:*:*) 1180ff7e0accSmrg # From Paul.Green@stratus.com. 1181ff7e0accSmrg echo ${UNAME_MACHINE}-stratus-vos 1182ff7e0accSmrg exit ;; 1183ff7e0accSmrg *:VOS:*:*) 1184ff7e0accSmrg # From Paul.Green@stratus.com. 1185ff7e0accSmrg echo hppa1.1-stratus-vos 1186ff7e0accSmrg exit ;; 1187ff7e0accSmrg mc68*:A/UX:*:*) 1188ff7e0accSmrg echo m68k-apple-aux${UNAME_RELEASE} 1189ff7e0accSmrg exit ;; 1190ff7e0accSmrg news*:NEWS-OS:6*:*) 1191ff7e0accSmrg echo mips-sony-newsos6 1192ff7e0accSmrg exit ;; 1193ff7e0accSmrg R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 1194ff7e0accSmrg if [ -d /usr/nec ]; then 1195ff7e0accSmrg echo mips-nec-sysv${UNAME_RELEASE} 1196ff7e0accSmrg else 1197ff7e0accSmrg echo mips-unknown-sysv${UNAME_RELEASE} 1198ff7e0accSmrg fi 1199ff7e0accSmrg exit ;; 1200ff7e0accSmrg BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. 1201ff7e0accSmrg echo powerpc-be-beos 1202ff7e0accSmrg exit ;; 1203ff7e0accSmrg BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. 1204ff7e0accSmrg echo powerpc-apple-beos 1205ff7e0accSmrg exit ;; 1206ff7e0accSmrg BePC:BeOS:*:*) # BeOS running on Intel PC compatible. 1207ff7e0accSmrg echo i586-pc-beos 1208ff7e0accSmrg exit ;; 1209ff7e0accSmrg SX-4:SUPER-UX:*:*) 1210ff7e0accSmrg echo sx4-nec-superux${UNAME_RELEASE} 1211ff7e0accSmrg exit ;; 1212ff7e0accSmrg SX-5:SUPER-UX:*:*) 1213ff7e0accSmrg echo sx5-nec-superux${UNAME_RELEASE} 1214ff7e0accSmrg exit ;; 1215ff7e0accSmrg SX-6:SUPER-UX:*:*) 1216ff7e0accSmrg echo sx6-nec-superux${UNAME_RELEASE} 1217ff7e0accSmrg exit ;; 1218ff7e0accSmrg SX-7:SUPER-UX:*:*) 1219ff7e0accSmrg echo sx7-nec-superux${UNAME_RELEASE} 1220ff7e0accSmrg exit ;; 1221ff7e0accSmrg SX-8:SUPER-UX:*:*) 1222ff7e0accSmrg echo sx8-nec-superux${UNAME_RELEASE} 1223ff7e0accSmrg exit ;; 1224ff7e0accSmrg SX-8R:SUPER-UX:*:*) 1225ff7e0accSmrg echo sx8r-nec-superux${UNAME_RELEASE} 1226ff7e0accSmrg exit ;; 1227ff7e0accSmrg Power*:Rhapsody:*:*) 1228ff7e0accSmrg echo powerpc-apple-rhapsody${UNAME_RELEASE} 1229ff7e0accSmrg exit ;; 1230ff7e0accSmrg *:Rhapsody:*:*) 1231ff7e0accSmrg echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 1232ff7e0accSmrg exit ;; 1233ff7e0accSmrg *:Darwin:*:*) 1234ff7e0accSmrg UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1235ff7e0accSmrg case $UNAME_PROCESSOR in 1236ff7e0accSmrg unknown) UNAME_PROCESSOR=powerpc ;; 1237ff7e0accSmrg esac 1238ff7e0accSmrg echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 1239ff7e0accSmrg exit ;; 1240ff7e0accSmrg *:procnto*:*:* | *:QNX:[0123456789]*:*) 1241ff7e0accSmrg UNAME_PROCESSOR=`uname -p` 1242ff7e0accSmrg if test "$UNAME_PROCESSOR" = "x86"; then 1243ff7e0accSmrg UNAME_PROCESSOR=i386 1244ff7e0accSmrg UNAME_MACHINE=pc 1245ff7e0accSmrg fi 1246ff7e0accSmrg echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 1247ff7e0accSmrg exit ;; 1248ff7e0accSmrg *:QNX:*:4*) 1249ff7e0accSmrg echo i386-pc-qnx 1250ff7e0accSmrg exit ;; 1251ff7e0accSmrg NSE-?:NONSTOP_KERNEL:*:*) 1252ff7e0accSmrg echo nse-tandem-nsk${UNAME_RELEASE} 1253ff7e0accSmrg exit ;; 1254ff7e0accSmrg NSR-?:NONSTOP_KERNEL:*:*) 1255ff7e0accSmrg echo nsr-tandem-nsk${UNAME_RELEASE} 1256ff7e0accSmrg exit ;; 1257ff7e0accSmrg *:NonStop-UX:*:*) 1258ff7e0accSmrg echo mips-compaq-nonstopux 1259ff7e0accSmrg exit ;; 1260ff7e0accSmrg BS2000:POSIX*:*:*) 1261ff7e0accSmrg echo bs2000-siemens-sysv 1262ff7e0accSmrg exit ;; 1263ff7e0accSmrg DS/*:UNIX_System_V:*:*) 1264ff7e0accSmrg echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 1265ff7e0accSmrg exit ;; 1266ff7e0accSmrg *:Plan9:*:*) 1267ff7e0accSmrg # "uname -m" is not consistent, so use $cputype instead. 386 1268ff7e0accSmrg # is converted to i386 for consistency with other x86 1269ff7e0accSmrg # operating systems. 1270ff7e0accSmrg if test "$cputype" = "386"; then 1271ff7e0accSmrg UNAME_MACHINE=i386 1272ff7e0accSmrg else 1273ff7e0accSmrg UNAME_MACHINE="$cputype" 1274ff7e0accSmrg fi 1275ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-plan9 1276ff7e0accSmrg exit ;; 1277ff7e0accSmrg *:TOPS-10:*:*) 1278ff7e0accSmrg echo pdp10-unknown-tops10 1279ff7e0accSmrg exit ;; 1280ff7e0accSmrg *:TENEX:*:*) 1281ff7e0accSmrg echo pdp10-unknown-tenex 1282ff7e0accSmrg exit ;; 1283ff7e0accSmrg KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 1284ff7e0accSmrg echo pdp10-dec-tops20 1285ff7e0accSmrg exit ;; 1286ff7e0accSmrg XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 1287ff7e0accSmrg echo pdp10-xkl-tops20 1288ff7e0accSmrg exit ;; 1289ff7e0accSmrg *:TOPS-20:*:*) 1290ff7e0accSmrg echo pdp10-unknown-tops20 1291ff7e0accSmrg exit ;; 1292ff7e0accSmrg *:ITS:*:*) 1293ff7e0accSmrg echo pdp10-unknown-its 1294ff7e0accSmrg exit ;; 1295ff7e0accSmrg SEI:*:*:SEIUX) 1296ff7e0accSmrg echo mips-sei-seiux${UNAME_RELEASE} 1297ff7e0accSmrg exit ;; 1298ff7e0accSmrg *:DragonFly:*:*) 1299ff7e0accSmrg echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 1300ff7e0accSmrg exit ;; 1301ff7e0accSmrg *:*VMS:*:*) 1302ff7e0accSmrg UNAME_MACHINE=`(uname -p) 2>/dev/null` 1303ff7e0accSmrg case "${UNAME_MACHINE}" in 1304ff7e0accSmrg A*) echo alpha-dec-vms ; exit ;; 1305ff7e0accSmrg I*) echo ia64-dec-vms ; exit ;; 1306ff7e0accSmrg V*) echo vax-dec-vms ; exit ;; 1307ff7e0accSmrg esac ;; 1308ff7e0accSmrg *:XENIX:*:SysV) 1309ff7e0accSmrg echo i386-pc-xenix 1310ff7e0accSmrg exit ;; 1311ff7e0accSmrg i*86:skyos:*:*) 1312ff7e0accSmrg echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 1313ff7e0accSmrg exit ;; 1314ff7e0accSmrg i*86:rdos:*:*) 1315ff7e0accSmrg echo ${UNAME_MACHINE}-pc-rdos 1316ff7e0accSmrg exit ;; 1317ff7e0accSmrgesac 1318ff7e0accSmrg 1319ff7e0accSmrg#echo '(No uname command or uname output not recognized.)' 1>&2 1320ff7e0accSmrg#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 1321ff7e0accSmrg 1322ff7e0accSmrgeval $set_cc_for_build 1323ff7e0accSmrgcat >$dummy.c <<EOF 1324ff7e0accSmrg#ifdef _SEQUENT_ 1325ff7e0accSmrg# include <sys/types.h> 1326ff7e0accSmrg# include <sys/utsname.h> 1327ff7e0accSmrg#endif 1328ff7e0accSmrgmain () 1329ff7e0accSmrg{ 1330ff7e0accSmrg#if defined (sony) 1331ff7e0accSmrg#if defined (MIPSEB) 1332ff7e0accSmrg /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, 1333ff7e0accSmrg I don't know.... */ 1334ff7e0accSmrg printf ("mips-sony-bsd\n"); exit (0); 1335ff7e0accSmrg#else 1336ff7e0accSmrg#include <sys/param.h> 1337ff7e0accSmrg printf ("m68k-sony-newsos%s\n", 1338ff7e0accSmrg#ifdef NEWSOS4 1339ff7e0accSmrg "4" 1340ff7e0accSmrg#else 1341ff7e0accSmrg "" 1342ff7e0accSmrg#endif 1343ff7e0accSmrg ); exit (0); 1344ff7e0accSmrg#endif 1345ff7e0accSmrg#endif 1346ff7e0accSmrg 1347ff7e0accSmrg#if defined (__arm) && defined (__acorn) && defined (__unix) 1348ff7e0accSmrg printf ("arm-acorn-riscix\n"); exit (0); 1349ff7e0accSmrg#endif 1350ff7e0accSmrg 1351ff7e0accSmrg#if defined (hp300) && !defined (hpux) 1352ff7e0accSmrg printf ("m68k-hp-bsd\n"); exit (0); 1353ff7e0accSmrg#endif 1354ff7e0accSmrg 1355ff7e0accSmrg#if defined (NeXT) 1356ff7e0accSmrg#if !defined (__ARCHITECTURE__) 1357ff7e0accSmrg#define __ARCHITECTURE__ "m68k" 1358ff7e0accSmrg#endif 1359ff7e0accSmrg int version; 1360ff7e0accSmrg version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; 1361ff7e0accSmrg if (version < 4) 1362ff7e0accSmrg printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); 1363ff7e0accSmrg else 1364ff7e0accSmrg printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); 1365ff7e0accSmrg exit (0); 1366ff7e0accSmrg#endif 1367ff7e0accSmrg 1368ff7e0accSmrg#if defined (MULTIMAX) || defined (n16) 1369ff7e0accSmrg#if defined (UMAXV) 1370ff7e0accSmrg printf ("ns32k-encore-sysv\n"); exit (0); 1371ff7e0accSmrg#else 1372ff7e0accSmrg#if defined (CMU) 1373ff7e0accSmrg printf ("ns32k-encore-mach\n"); exit (0); 1374ff7e0accSmrg#else 1375ff7e0accSmrg printf ("ns32k-encore-bsd\n"); exit (0); 1376ff7e0accSmrg#endif 1377ff7e0accSmrg#endif 1378ff7e0accSmrg#endif 1379ff7e0accSmrg 1380ff7e0accSmrg#if defined (__386BSD__) 1381ff7e0accSmrg printf ("i386-pc-bsd\n"); exit (0); 1382ff7e0accSmrg#endif 1383ff7e0accSmrg 1384ff7e0accSmrg#if defined (sequent) 1385ff7e0accSmrg#if defined (i386) 1386ff7e0accSmrg printf ("i386-sequent-dynix\n"); exit (0); 1387ff7e0accSmrg#endif 1388ff7e0accSmrg#if defined (ns32000) 1389ff7e0accSmrg printf ("ns32k-sequent-dynix\n"); exit (0); 1390ff7e0accSmrg#endif 1391ff7e0accSmrg#endif 1392ff7e0accSmrg 1393ff7e0accSmrg#if defined (_SEQUENT_) 1394ff7e0accSmrg struct utsname un; 1395ff7e0accSmrg 1396ff7e0accSmrg uname(&un); 1397ff7e0accSmrg 1398ff7e0accSmrg if (strncmp(un.version, "V2", 2) == 0) { 1399ff7e0accSmrg printf ("i386-sequent-ptx2\n"); exit (0); 1400ff7e0accSmrg } 1401ff7e0accSmrg if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ 1402ff7e0accSmrg printf ("i386-sequent-ptx1\n"); exit (0); 1403ff7e0accSmrg } 1404ff7e0accSmrg printf ("i386-sequent-ptx\n"); exit (0); 1405ff7e0accSmrg 1406ff7e0accSmrg#endif 1407ff7e0accSmrg 1408ff7e0accSmrg#if defined (vax) 1409ff7e0accSmrg# if !defined (ultrix) 1410ff7e0accSmrg# include <sys/param.h> 1411ff7e0accSmrg# if defined (BSD) 1412ff7e0accSmrg# if BSD == 43 1413ff7e0accSmrg printf ("vax-dec-bsd4.3\n"); exit (0); 1414ff7e0accSmrg# else 1415ff7e0accSmrg# if BSD == 199006 1416ff7e0accSmrg printf ("vax-dec-bsd4.3reno\n"); exit (0); 1417ff7e0accSmrg# else 1418ff7e0accSmrg printf ("vax-dec-bsd\n"); exit (0); 1419ff7e0accSmrg# endif 1420ff7e0accSmrg# endif 1421ff7e0accSmrg# else 1422ff7e0accSmrg printf ("vax-dec-bsd\n"); exit (0); 1423ff7e0accSmrg# endif 1424ff7e0accSmrg# else 1425ff7e0accSmrg printf ("vax-dec-ultrix\n"); exit (0); 1426ff7e0accSmrg# endif 1427ff7e0accSmrg#endif 1428ff7e0accSmrg 1429ff7e0accSmrg#if defined (alliant) && defined (i860) 1430ff7e0accSmrg printf ("i860-alliant-bsd\n"); exit (0); 1431ff7e0accSmrg#endif 1432ff7e0accSmrg 1433ff7e0accSmrg exit (1); 1434ff7e0accSmrg} 1435ff7e0accSmrgEOF 1436ff7e0accSmrg 1437ff7e0accSmrg$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 1438ff7e0accSmrg { echo "$SYSTEM_NAME"; exit; } 1439ff7e0accSmrg 1440ff7e0accSmrg# Apollos put the system type in the environment. 1441ff7e0accSmrg 1442ff7e0accSmrgtest -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 1443ff7e0accSmrg 1444ff7e0accSmrg# Convex versions that predate uname can use getsysinfo(1) 1445ff7e0accSmrg 1446ff7e0accSmrgif [ -x /usr/convex/getsysinfo ] 1447ff7e0accSmrgthen 1448ff7e0accSmrg case `getsysinfo -f cpu_type` in 1449ff7e0accSmrg c1*) 1450ff7e0accSmrg echo c1-convex-bsd 1451ff7e0accSmrg exit ;; 1452ff7e0accSmrg c2*) 1453ff7e0accSmrg if getsysinfo -f scalar_acc 1454ff7e0accSmrg then echo c32-convex-bsd 1455ff7e0accSmrg else echo c2-convex-bsd 1456ff7e0accSmrg fi 1457ff7e0accSmrg exit ;; 1458ff7e0accSmrg c34*) 1459ff7e0accSmrg echo c34-convex-bsd 1460ff7e0accSmrg exit ;; 1461ff7e0accSmrg c38*) 1462ff7e0accSmrg echo c38-convex-bsd 1463ff7e0accSmrg exit ;; 1464ff7e0accSmrg c4*) 1465ff7e0accSmrg echo c4-convex-bsd 1466ff7e0accSmrg exit ;; 1467ff7e0accSmrg esac 1468ff7e0accSmrgfi 1469ff7e0accSmrg 1470ff7e0accSmrgcat >&2 <<EOF 1471ff7e0accSmrg$0: unable to guess system type 1472ff7e0accSmrg 1473ff7e0accSmrgThis script, last modified $timestamp, has failed to recognize 1474ff7e0accSmrgthe operating system you are using. It is advised that you 1475ff7e0accSmrgdownload the most up to date version of the config scripts from 1476ff7e0accSmrg 1477ff7e0accSmrg http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess 1478ff7e0accSmrgand 1479ff7e0accSmrg http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub 1480ff7e0accSmrg 1481ff7e0accSmrgIf the version you run ($0) is already up to date, please 1482ff7e0accSmrgsend the following data and any information you think might be 1483ff7e0accSmrgpertinent to <config-patches@gnu.org> in order to provide the needed 1484ff7e0accSmrginformation to handle your system. 1485ff7e0accSmrg 1486ff7e0accSmrgconfig.guess timestamp = $timestamp 1487ff7e0accSmrg 1488ff7e0accSmrguname -m = `(uname -m) 2>/dev/null || echo unknown` 1489ff7e0accSmrguname -r = `(uname -r) 2>/dev/null || echo unknown` 1490ff7e0accSmrguname -s = `(uname -s) 2>/dev/null || echo unknown` 1491ff7e0accSmrguname -v = `(uname -v) 2>/dev/null || echo unknown` 1492ff7e0accSmrg 1493ff7e0accSmrg/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` 1494ff7e0accSmrg/bin/uname -X = `(/bin/uname -X) 2>/dev/null` 1495ff7e0accSmrg 1496ff7e0accSmrghostinfo = `(hostinfo) 2>/dev/null` 1497ff7e0accSmrg/bin/universe = `(/bin/universe) 2>/dev/null` 1498ff7e0accSmrg/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` 1499ff7e0accSmrg/bin/arch = `(/bin/arch) 2>/dev/null` 1500ff7e0accSmrg/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` 1501ff7e0accSmrg/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` 1502ff7e0accSmrg 1503ff7e0accSmrgUNAME_MACHINE = ${UNAME_MACHINE} 1504ff7e0accSmrgUNAME_RELEASE = ${UNAME_RELEASE} 1505ff7e0accSmrgUNAME_SYSTEM = ${UNAME_SYSTEM} 1506ff7e0accSmrgUNAME_VERSION = ${UNAME_VERSION} 1507ff7e0accSmrgEOF 1508ff7e0accSmrg 1509ff7e0accSmrgexit 1 1510ff7e0accSmrg 1511ff7e0accSmrg# Local variables: 1512ff7e0accSmrg# eval: (add-hook 'write-file-hooks 'time-stamp) 1513ff7e0accSmrg# time-stamp-start: "timestamp='" 1514ff7e0accSmrg# time-stamp-format: "%:y-%02m-%02d" 1515ff7e0accSmrg# time-stamp-end: "'" 1516ff7e0accSmrg# End: 1517