erikj@459: #! /bin/sh ohair@576: # ohair@576: # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. ohair@576: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ohair@576: # ohair@576: # This code is free software; you can redistribute it and/or modify it ohair@576: # under the terms of the GNU General Public License version 2 only, as ohair@576: # published by the Free Software Foundation. Oracle designates this ohair@576: # particular file as subject to the "Classpath" exception as provided ohair@576: # by Oracle in the LICENSE file that accompanied this code. ohair@576: # ohair@576: # This code is distributed in the hope that it will be useful, but WITHOUT ohair@576: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ohair@576: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ohair@576: # version 2 for more details (a copy is included in the LICENSE file that ohair@576: # accompanied this code). ohair@576: # ohair@576: # You should have received a copy of the GNU General Public License version ohair@576: # 2 along with this work; if not, write to the Free Software Foundation, ohair@576: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ohair@576: # ohair@576: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@576: # or visit www.oracle.com if you need additional information or have any ohair@576: # questions. ohair@576: # ohair@576: erikj@459: # Attempt to guess a canonical system name. erikj@459: # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ihse@794: # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, ihse@794: # 2011, 2012 Free Software Foundation, Inc. erikj@459: ihse@794: timestamp='2012-02-10' erikj@459: erikj@459: # This file is free software; you can redistribute it and/or modify it erikj@459: # under the terms of the GNU General Public License as published by erikj@459: # the Free Software Foundation; either version 2 of the License, or erikj@459: # (at your option) any later version. erikj@459: # erikj@459: # This program is distributed in the hope that it will be useful, but erikj@459: # WITHOUT ANY WARRANTY; without even the implied warranty of erikj@459: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU erikj@459: # General Public License for more details. erikj@459: # erikj@459: # You should have received a copy of the GNU General Public License ihse@794: # along with this program; if not, see . erikj@459: # erikj@459: # As a special exception to the GNU General Public License, if you erikj@459: # distribute this file as part of a program that contains a erikj@459: # configuration script generated by Autoconf, you may include it under erikj@459: # the same distribution terms that you use for the rest of that program. erikj@459: erikj@459: ihse@794: # Originally written by Per Bothner. Please send patches (context ihse@794: # diff format) to and include a ChangeLog ihse@794: # entry. erikj@459: # erikj@459: # This script attempts to guess a canonical system name similar to erikj@459: # config.sub. If it succeeds, it prints the system name on stdout, and erikj@459: # exits with 0. Otherwise, it exits with 1. erikj@459: # ihse@794: # You can get the latest version of this script from: ihse@794: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD erikj@459: erikj@459: me=`echo "$0" | sed -e 's,.*/,,'` erikj@459: erikj@459: usage="\ erikj@459: Usage: $0 [OPTION] erikj@459: erikj@459: Output the configuration name of the system \`$me' is run on. erikj@459: erikj@459: Operation modes: erikj@459: -h, --help print this help, then exit erikj@459: -t, --time-stamp print date of last modification, then exit erikj@459: -v, --version print version number, then exit erikj@459: erikj@459: Report bugs and patches to ." erikj@459: erikj@459: version="\ erikj@459: GNU config.guess ($timestamp) erikj@459: erikj@459: Originally written by Per Bothner. ihse@794: Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, ihse@794: 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 ihse@794: Free Software Foundation, Inc. erikj@459: erikj@459: This is free software; see the source for copying conditions. There is NO erikj@459: warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." erikj@459: erikj@459: help=" erikj@459: Try \`$me --help' for more information." erikj@459: erikj@459: # Parse command line erikj@459: while test $# -gt 0 ; do erikj@459: case $1 in erikj@459: --time-stamp | --time* | -t ) erikj@459: echo "$timestamp" ; exit ;; erikj@459: --version | -v ) erikj@459: echo "$version" ; exit ;; erikj@459: --help | --h* | -h ) erikj@459: echo "$usage"; exit ;; erikj@459: -- ) # Stop option processing erikj@459: shift; break ;; erikj@459: - ) # Use stdin as input. erikj@459: break ;; erikj@459: -* ) erikj@459: echo "$me: invalid option $1$help" >&2 erikj@459: exit 1 ;; erikj@459: * ) erikj@459: break ;; erikj@459: esac erikj@459: done erikj@459: erikj@459: if test $# != 0; then erikj@459: echo "$me: too many arguments$help" >&2 erikj@459: exit 1 erikj@459: fi erikj@459: erikj@459: trap 'exit 1' 1 2 15 erikj@459: erikj@459: # CC_FOR_BUILD -- compiler used by this script. Note that the use of a erikj@459: # compiler to aid in system detection is discouraged as it requires erikj@459: # temporary files to be created and, as you can see below, it is a erikj@459: # headache to deal with in a portable fashion. erikj@459: erikj@459: # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still erikj@459: # use `HOST_CC' if defined, but it is deprecated. erikj@459: erikj@459: # Portable tmp directory creation inspired by the Autoconf team. erikj@459: erikj@459: set_cc_for_build=' erikj@459: trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; erikj@459: trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; erikj@459: : ${TMPDIR=/tmp} ; erikj@459: { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || erikj@459: { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || erikj@459: { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || erikj@459: { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; erikj@459: dummy=$tmp/dummy ; erikj@459: tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; erikj@459: case $CC_FOR_BUILD,$HOST_CC,$CC in erikj@459: ,,) echo "int x;" > $dummy.c ; erikj@459: for c in cc gcc c89 c99 ; do erikj@459: if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then erikj@459: CC_FOR_BUILD="$c"; break ; erikj@459: fi ; erikj@459: done ; erikj@459: if test x"$CC_FOR_BUILD" = x ; then erikj@459: CC_FOR_BUILD=no_compiler_found ; erikj@459: fi erikj@459: ;; erikj@459: ,,*) CC_FOR_BUILD=$CC ;; erikj@459: ,*,*) CC_FOR_BUILD=$HOST_CC ;; erikj@459: esac ; set_cc_for_build= ;' erikj@459: erikj@459: # This is needed to find uname on a Pyramid OSx when run in the BSD universe. erikj@459: # (ghazi@noc.rutgers.edu 1994-08-24) erikj@459: if (test -f /.attbin/uname) >/dev/null 2>&1 ; then erikj@459: PATH=$PATH:/.attbin ; export PATH erikj@459: fi erikj@459: erikj@459: UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown erikj@459: UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown erikj@459: UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown erikj@459: UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown erikj@459: erikj@459: # Note: order is significant - the case branches are not exclusive. erikj@459: erikj@459: case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in erikj@459: *:NetBSD:*:*) erikj@459: # NetBSD (nbsd) targets should (where applicable) match one or ihse@794: # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, erikj@459: # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently erikj@459: # switched to ELF, *-*-netbsd* would select the old erikj@459: # object file format. This provides both forward erikj@459: # compatibility and a consistent mechanism for selecting the erikj@459: # object file format. erikj@459: # erikj@459: # Note: NetBSD doesn't particularly care about the vendor erikj@459: # portion of the name. We always set it to "unknown". erikj@459: sysctl="sysctl -n hw.machine_arch" erikj@459: UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ erikj@459: /usr/sbin/$sysctl 2>/dev/null || echo unknown)` erikj@459: case "${UNAME_MACHINE_ARCH}" in erikj@459: armeb) machine=armeb-unknown ;; erikj@459: arm*) machine=arm-unknown ;; erikj@459: sh3el) machine=shl-unknown ;; erikj@459: sh3eb) machine=sh-unknown ;; erikj@459: sh5el) machine=sh5le-unknown ;; erikj@459: *) machine=${UNAME_MACHINE_ARCH}-unknown ;; erikj@459: esac erikj@459: # The Operating System including object format, if it has switched erikj@459: # to ELF recently, or will in the future. erikj@459: case "${UNAME_MACHINE_ARCH}" in erikj@459: arm*|i386|m68k|ns32k|sh3*|sparc|vax) erikj@459: eval $set_cc_for_build erikj@459: if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ ihse@794: | grep -q __ELF__ erikj@459: then erikj@459: # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). erikj@459: # Return netbsd for either. FIX? erikj@459: os=netbsd erikj@459: else erikj@459: os=netbsdelf erikj@459: fi erikj@459: ;; erikj@459: *) ihse@794: os=netbsd erikj@459: ;; erikj@459: esac erikj@459: # The OS release erikj@459: # Debian GNU/NetBSD machines have a different userland, and erikj@459: # thus, need a distinct triplet. However, they do not need erikj@459: # kernel version information, so it can be replaced with a erikj@459: # suitable tag, in the style of linux-gnu. erikj@459: case "${UNAME_VERSION}" in erikj@459: Debian*) erikj@459: release='-gnu' erikj@459: ;; erikj@459: *) erikj@459: release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` erikj@459: ;; erikj@459: esac erikj@459: # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: erikj@459: # contains redundant information, the shorter form: erikj@459: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. erikj@459: echo "${machine}-${os}${release}" erikj@459: exit ;; erikj@459: *:OpenBSD:*:*) erikj@459: UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` erikj@459: echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} erikj@459: exit ;; erikj@459: *:ekkoBSD:*:*) erikj@459: echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} erikj@459: exit ;; erikj@459: *:SolidBSD:*:*) erikj@459: echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} erikj@459: exit ;; erikj@459: macppc:MirBSD:*:*) erikj@459: echo powerpc-unknown-mirbsd${UNAME_RELEASE} erikj@459: exit ;; erikj@459: *:MirBSD:*:*) erikj@459: echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} erikj@459: exit ;; erikj@459: alpha:OSF1:*:*) erikj@459: case $UNAME_RELEASE in erikj@459: *4.0) erikj@459: UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` erikj@459: ;; erikj@459: *5.*) ihse@794: UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` erikj@459: ;; erikj@459: esac erikj@459: # According to Compaq, /usr/sbin/psrinfo has been available on erikj@459: # OSF/1 and Tru64 systems produced since 1995. I hope that erikj@459: # covers most systems running today. This code pipes the CPU erikj@459: # types through head -n 1, so we only detect the type of CPU 0. erikj@459: ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` erikj@459: case "$ALPHA_CPU_TYPE" in erikj@459: "EV4 (21064)") erikj@459: UNAME_MACHINE="alpha" ;; erikj@459: "EV4.5 (21064)") erikj@459: UNAME_MACHINE="alpha" ;; erikj@459: "LCA4 (21066/21068)") erikj@459: UNAME_MACHINE="alpha" ;; erikj@459: "EV5 (21164)") erikj@459: UNAME_MACHINE="alphaev5" ;; erikj@459: "EV5.6 (21164A)") erikj@459: UNAME_MACHINE="alphaev56" ;; erikj@459: "EV5.6 (21164PC)") erikj@459: UNAME_MACHINE="alphapca56" ;; erikj@459: "EV5.7 (21164PC)") erikj@459: UNAME_MACHINE="alphapca57" ;; erikj@459: "EV6 (21264)") erikj@459: UNAME_MACHINE="alphaev6" ;; erikj@459: "EV6.7 (21264A)") erikj@459: UNAME_MACHINE="alphaev67" ;; erikj@459: "EV6.8CB (21264C)") erikj@459: UNAME_MACHINE="alphaev68" ;; erikj@459: "EV6.8AL (21264B)") erikj@459: UNAME_MACHINE="alphaev68" ;; erikj@459: "EV6.8CX (21264D)") erikj@459: UNAME_MACHINE="alphaev68" ;; erikj@459: "EV6.9A (21264/EV69A)") erikj@459: UNAME_MACHINE="alphaev69" ;; erikj@459: "EV7 (21364)") erikj@459: UNAME_MACHINE="alphaev7" ;; erikj@459: "EV7.9 (21364A)") erikj@459: UNAME_MACHINE="alphaev79" ;; erikj@459: esac erikj@459: # A Pn.n version is a patched version. erikj@459: # A Vn.n version is a released version. erikj@459: # A Tn.n version is a released field test version. erikj@459: # A Xn.n version is an unreleased experimental baselevel. erikj@459: # 1.2 uses "1.2" for uname -r. erikj@459: echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ihse@794: # Reset EXIT trap before exiting to avoid spurious non-zero exit code. ihse@794: exitcode=$? ihse@794: trap '' 0 ihse@794: exit $exitcode ;; erikj@459: Alpha\ *:Windows_NT*:*) erikj@459: # How do we know it's Interix rather than the generic POSIX subsystem? erikj@459: # Should we change UNAME_MACHINE based on the output of uname instead erikj@459: # of the specific Alpha model? erikj@459: echo alpha-pc-interix erikj@459: exit ;; erikj@459: 21064:Windows_NT:50:3) erikj@459: echo alpha-dec-winnt3.5 erikj@459: exit ;; erikj@459: Amiga*:UNIX_System_V:4.0:*) erikj@459: echo m68k-unknown-sysv4 erikj@459: exit ;; erikj@459: *:[Aa]miga[Oo][Ss]:*:*) erikj@459: echo ${UNAME_MACHINE}-unknown-amigaos erikj@459: exit ;; erikj@459: *:[Mm]orph[Oo][Ss]:*:*) erikj@459: echo ${UNAME_MACHINE}-unknown-morphos erikj@459: exit ;; erikj@459: *:OS/390:*:*) erikj@459: echo i370-ibm-openedition erikj@459: exit ;; erikj@459: *:z/VM:*:*) erikj@459: echo s390-ibm-zvmoe erikj@459: exit ;; erikj@459: *:OS400:*:*) ihse@794: echo powerpc-ibm-os400 erikj@459: exit ;; erikj@459: arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) erikj@459: echo arm-acorn-riscix${UNAME_RELEASE} erikj@459: exit ;; erikj@459: arm:riscos:*:*|arm:RISCOS:*:*) erikj@459: echo arm-unknown-riscos erikj@459: exit ;; erikj@459: SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) erikj@459: echo hppa1.1-hitachi-hiuxmpp erikj@459: exit ;; erikj@459: Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) erikj@459: # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. erikj@459: if test "`(/bin/universe) 2>/dev/null`" = att ; then erikj@459: echo pyramid-pyramid-sysv3 erikj@459: else erikj@459: echo pyramid-pyramid-bsd erikj@459: fi erikj@459: exit ;; erikj@459: NILE*:*:*:dcosx) erikj@459: echo pyramid-pyramid-svr4 erikj@459: exit ;; erikj@459: DRS?6000:unix:4.0:6*) erikj@459: echo sparc-icl-nx6 erikj@459: exit ;; erikj@459: DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) erikj@459: case `/usr/bin/uname -p` in erikj@459: sparc) echo sparc-icl-nx7; exit ;; erikj@459: esac ;; ihse@794: s390x:SunOS:*:*) ihse@794: echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ihse@794: exit ;; erikj@459: sun4H:SunOS:5.*:*) erikj@459: echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` erikj@459: exit ;; erikj@459: sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) erikj@459: echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` erikj@459: exit ;; ihse@794: i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) ihse@794: echo i386-pc-auroraux${UNAME_RELEASE} ihse@794: exit ;; erikj@459: i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) ihse@794: eval $set_cc_for_build ihse@794: SUN_ARCH="i386" ihse@794: # If there is a compiler, see if it is configured for 64-bit objects. ihse@794: # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. ihse@794: # This test works for both compilers. ihse@794: if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ihse@794: if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ ihse@794: (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ihse@794: grep IS_64BIT_ARCH >/dev/null ihse@794: then ihse@794: SUN_ARCH="x86_64" ihse@794: fi ihse@794: fi ihse@794: echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` erikj@459: exit ;; erikj@459: sun4*:SunOS:6*:*) erikj@459: # According to config.sub, this is the proper way to canonicalize erikj@459: # SunOS6. Hard to guess exactly what SunOS6 will be like, but erikj@459: # it's likely to be more like Solaris than SunOS4. erikj@459: echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` erikj@459: exit ;; erikj@459: sun4*:SunOS:*:*) erikj@459: case "`/usr/bin/arch -k`" in erikj@459: Series*|S4*) erikj@459: UNAME_RELEASE=`uname -v` erikj@459: ;; erikj@459: esac erikj@459: # Japanese Language versions have a version number like `4.1.3-JL'. erikj@459: echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` erikj@459: exit ;; erikj@459: sun3*:SunOS:*:*) erikj@459: echo m68k-sun-sunos${UNAME_RELEASE} erikj@459: exit ;; erikj@459: sun*:*:4.2BSD:*) erikj@459: UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` erikj@459: test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 erikj@459: case "`/bin/arch`" in erikj@459: sun3) erikj@459: echo m68k-sun-sunos${UNAME_RELEASE} erikj@459: ;; erikj@459: sun4) erikj@459: echo sparc-sun-sunos${UNAME_RELEASE} erikj@459: ;; erikj@459: esac erikj@459: exit ;; erikj@459: aushp:SunOS:*:*) erikj@459: echo sparc-auspex-sunos${UNAME_RELEASE} erikj@459: exit ;; erikj@459: # The situation for MiNT is a little confusing. The machine name erikj@459: # can be virtually everything (everything which is not erikj@459: # "atarist" or "atariste" at least should have a processor erikj@459: # > m68000). The system name ranges from "MiNT" over "FreeMiNT" erikj@459: # to the lowercase version "mint" (or "freemint"). Finally erikj@459: # the system name "TOS" denotes a system which is actually not erikj@459: # MiNT. But MiNT is downward compatible to TOS, so this should erikj@459: # be no problem. erikj@459: atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) ihse@794: echo m68k-atari-mint${UNAME_RELEASE} erikj@459: exit ;; erikj@459: atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) erikj@459: echo m68k-atari-mint${UNAME_RELEASE} ihse@794: exit ;; erikj@459: *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) ihse@794: echo m68k-atari-mint${UNAME_RELEASE} erikj@459: exit ;; erikj@459: milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) ihse@794: echo m68k-milan-mint${UNAME_RELEASE} ihse@794: exit ;; erikj@459: hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) ihse@794: echo m68k-hades-mint${UNAME_RELEASE} ihse@794: exit ;; erikj@459: *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) ihse@794: echo m68k-unknown-mint${UNAME_RELEASE} ihse@794: exit ;; erikj@459: m68k:machten:*:*) erikj@459: echo m68k-apple-machten${UNAME_RELEASE} erikj@459: exit ;; erikj@459: powerpc:machten:*:*) erikj@459: echo powerpc-apple-machten${UNAME_RELEASE} erikj@459: exit ;; erikj@459: RISC*:Mach:*:*) erikj@459: echo mips-dec-mach_bsd4.3 erikj@459: exit ;; erikj@459: RISC*:ULTRIX:*:*) erikj@459: echo mips-dec-ultrix${UNAME_RELEASE} erikj@459: exit ;; erikj@459: VAX*:ULTRIX*:*:*) erikj@459: echo vax-dec-ultrix${UNAME_RELEASE} erikj@459: exit ;; erikj@459: 2020:CLIX:*:* | 2430:CLIX:*:*) erikj@459: echo clipper-intergraph-clix${UNAME_RELEASE} erikj@459: exit ;; erikj@459: mips:*:*:UMIPS | mips:*:*:RISCos) erikj@459: eval $set_cc_for_build erikj@459: sed 's/^ //' << EOF >$dummy.c erikj@459: #ifdef __cplusplus erikj@459: #include /* for printf() prototype */ erikj@459: int main (int argc, char *argv[]) { erikj@459: #else erikj@459: int main (argc, argv) int argc; char *argv[]; { erikj@459: #endif erikj@459: #if defined (host_mips) && defined (MIPSEB) erikj@459: #if defined (SYSTYPE_SYSV) erikj@459: printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); erikj@459: #endif erikj@459: #if defined (SYSTYPE_SVR4) erikj@459: printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); erikj@459: #endif erikj@459: #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) erikj@459: printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); erikj@459: #endif erikj@459: #endif erikj@459: exit (-1); erikj@459: } erikj@459: EOF erikj@459: $CC_FOR_BUILD -o $dummy $dummy.c && erikj@459: dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && erikj@459: SYSTEM_NAME=`$dummy $dummyarg` && erikj@459: { echo "$SYSTEM_NAME"; exit; } erikj@459: echo mips-mips-riscos${UNAME_RELEASE} erikj@459: exit ;; erikj@459: Motorola:PowerMAX_OS:*:*) erikj@459: echo powerpc-motorola-powermax erikj@459: exit ;; erikj@459: Motorola:*:4.3:PL8-*) erikj@459: echo powerpc-harris-powermax erikj@459: exit ;; erikj@459: Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) erikj@459: echo powerpc-harris-powermax erikj@459: exit ;; erikj@459: Night_Hawk:Power_UNIX:*:*) erikj@459: echo powerpc-harris-powerunix erikj@459: exit ;; erikj@459: m88k:CX/UX:7*:*) erikj@459: echo m88k-harris-cxux7 erikj@459: exit ;; erikj@459: m88k:*:4*:R4*) erikj@459: echo m88k-motorola-sysv4 erikj@459: exit ;; erikj@459: m88k:*:3*:R3*) erikj@459: echo m88k-motorola-sysv3 erikj@459: exit ;; erikj@459: AViiON:dgux:*:*) ihse@794: # DG/UX returns AViiON for all architectures ihse@794: UNAME_PROCESSOR=`/usr/bin/uname -p` erikj@459: if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] erikj@459: then erikj@459: if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ erikj@459: [ ${TARGET_BINARY_INTERFACE}x = x ] erikj@459: then erikj@459: echo m88k-dg-dgux${UNAME_RELEASE} erikj@459: else erikj@459: echo m88k-dg-dguxbcs${UNAME_RELEASE} erikj@459: fi erikj@459: else erikj@459: echo i586-dg-dgux${UNAME_RELEASE} erikj@459: fi ihse@794: exit ;; erikj@459: M88*:DolphinOS:*:*) # DolphinOS (SVR3) erikj@459: echo m88k-dolphin-sysv3 erikj@459: exit ;; erikj@459: M88*:*:R3*:*) erikj@459: # Delta 88k system running SVR3 erikj@459: echo m88k-motorola-sysv3 erikj@459: exit ;; erikj@459: XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) erikj@459: echo m88k-tektronix-sysv3 erikj@459: exit ;; erikj@459: Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) erikj@459: echo m68k-tektronix-bsd erikj@459: exit ;; erikj@459: *:IRIX*:*:*) erikj@459: echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` erikj@459: exit ;; erikj@459: ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. erikj@459: echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id erikj@459: exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' erikj@459: i*86:AIX:*:*) erikj@459: echo i386-ibm-aix erikj@459: exit ;; erikj@459: ia64:AIX:*:*) erikj@459: if [ -x /usr/bin/oslevel ] ; then erikj@459: IBM_REV=`/usr/bin/oslevel` erikj@459: else erikj@459: IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} erikj@459: fi erikj@459: echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} erikj@459: exit ;; erikj@459: *:AIX:2:3) erikj@459: if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then erikj@459: eval $set_cc_for_build erikj@459: sed 's/^ //' << EOF >$dummy.c erikj@459: #include erikj@459: erikj@459: main() erikj@459: { erikj@459: if (!__power_pc()) erikj@459: exit(1); erikj@459: puts("powerpc-ibm-aix3.2.5"); erikj@459: exit(0); erikj@459: } erikj@459: EOF erikj@459: if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` erikj@459: then erikj@459: echo "$SYSTEM_NAME" erikj@459: else erikj@459: echo rs6000-ibm-aix3.2.5 erikj@459: fi erikj@459: elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then erikj@459: echo rs6000-ibm-aix3.2.4 erikj@459: else erikj@459: echo rs6000-ibm-aix3.2 erikj@459: fi erikj@459: exit ;; ihse@794: *:AIX:*:[4567]) erikj@459: IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` erikj@459: if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then erikj@459: IBM_ARCH=rs6000 erikj@459: else erikj@459: IBM_ARCH=powerpc erikj@459: fi erikj@459: if [ -x /usr/bin/oslevel ] ; then erikj@459: IBM_REV=`/usr/bin/oslevel` erikj@459: else erikj@459: IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} erikj@459: fi erikj@459: echo ${IBM_ARCH}-ibm-aix${IBM_REV} erikj@459: exit ;; erikj@459: *:AIX:*:*) erikj@459: echo rs6000-ibm-aix erikj@459: exit ;; erikj@459: ibmrt:4.4BSD:*|romp-ibm:BSD:*) erikj@459: echo romp-ibm-bsd4.4 erikj@459: exit ;; erikj@459: ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and erikj@459: echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to erikj@459: exit ;; # report: romp-ibm BSD 4.3 erikj@459: *:BOSX:*:*) erikj@459: echo rs6000-bull-bosx erikj@459: exit ;; erikj@459: DPX/2?00:B.O.S.:*:*) erikj@459: echo m68k-bull-sysv3 erikj@459: exit ;; erikj@459: 9000/[34]??:4.3bsd:1.*:*) erikj@459: echo m68k-hp-bsd erikj@459: exit ;; erikj@459: hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) erikj@459: echo m68k-hp-bsd4.4 erikj@459: exit ;; erikj@459: 9000/[34678]??:HP-UX:*:*) erikj@459: HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` erikj@459: case "${UNAME_MACHINE}" in erikj@459: 9000/31? ) HP_ARCH=m68000 ;; erikj@459: 9000/[34]?? ) HP_ARCH=m68k ;; erikj@459: 9000/[678][0-9][0-9]) erikj@459: if [ -x /usr/bin/getconf ]; then erikj@459: sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` ihse@794: sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` ihse@794: case "${sc_cpu_version}" in ihse@794: 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 ihse@794: 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 ihse@794: 532) # CPU_PA_RISC2_0 ihse@794: case "${sc_kernel_bits}" in ihse@794: 32) HP_ARCH="hppa2.0n" ;; ihse@794: 64) HP_ARCH="hppa2.0w" ;; erikj@459: '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 ihse@794: esac ;; ihse@794: esac erikj@459: fi erikj@459: if [ "${HP_ARCH}" = "" ]; then erikj@459: eval $set_cc_for_build ihse@794: sed 's/^ //' << EOF >$dummy.c erikj@459: ihse@794: #define _HPUX_SOURCE ihse@794: #include ihse@794: #include erikj@459: ihse@794: int main () ihse@794: { ihse@794: #if defined(_SC_KERNEL_BITS) ihse@794: long bits = sysconf(_SC_KERNEL_BITS); ihse@794: #endif ihse@794: long cpu = sysconf (_SC_CPU_VERSION); erikj@459: ihse@794: switch (cpu) ihse@794: { ihse@794: case CPU_PA_RISC1_0: puts ("hppa1.0"); break; ihse@794: case CPU_PA_RISC1_1: puts ("hppa1.1"); break; ihse@794: case CPU_PA_RISC2_0: ihse@794: #if defined(_SC_KERNEL_BITS) ihse@794: switch (bits) ihse@794: { ihse@794: case 64: puts ("hppa2.0w"); break; ihse@794: case 32: puts ("hppa2.0n"); break; ihse@794: default: puts ("hppa2.0"); break; ihse@794: } break; ihse@794: #else /* !defined(_SC_KERNEL_BITS) */ ihse@794: puts ("hppa2.0"); break; ihse@794: #endif ihse@794: default: puts ("hppa1.0"); break; ihse@794: } ihse@794: exit (0); ihse@794: } erikj@459: EOF erikj@459: (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` erikj@459: test -z "$HP_ARCH" && HP_ARCH=hppa erikj@459: fi ;; erikj@459: esac erikj@459: if [ ${HP_ARCH} = "hppa2.0w" ] erikj@459: then erikj@459: eval $set_cc_for_build erikj@459: erikj@459: # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating erikj@459: # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler erikj@459: # generating 64-bit code. GNU and HP use different nomenclature: erikj@459: # erikj@459: # $ CC_FOR_BUILD=cc ./config.guess erikj@459: # => hppa2.0w-hp-hpux11.23 erikj@459: # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess erikj@459: # => hppa64-hp-hpux11.23 erikj@459: erikj@459: if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | ihse@794: grep -q __LP64__ erikj@459: then erikj@459: HP_ARCH="hppa2.0w" erikj@459: else erikj@459: HP_ARCH="hppa64" erikj@459: fi erikj@459: fi erikj@459: echo ${HP_ARCH}-hp-hpux${HPUX_REV} erikj@459: exit ;; erikj@459: ia64:HP-UX:*:*) erikj@459: HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` erikj@459: echo ia64-hp-hpux${HPUX_REV} erikj@459: exit ;; erikj@459: 3050*:HI-UX:*:*) erikj@459: eval $set_cc_for_build erikj@459: sed 's/^ //' << EOF >$dummy.c erikj@459: #include erikj@459: int erikj@459: main () erikj@459: { erikj@459: long cpu = sysconf (_SC_CPU_VERSION); erikj@459: /* The order matters, because CPU_IS_HP_MC68K erroneously returns erikj@459: true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct erikj@459: results, however. */ erikj@459: if (CPU_IS_PA_RISC (cpu)) erikj@459: { erikj@459: switch (cpu) erikj@459: { erikj@459: case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; erikj@459: case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; erikj@459: case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; erikj@459: default: puts ("hppa-hitachi-hiuxwe2"); break; erikj@459: } erikj@459: } erikj@459: else if (CPU_IS_HP_MC68K (cpu)) erikj@459: puts ("m68k-hitachi-hiuxwe2"); erikj@459: else puts ("unknown-hitachi-hiuxwe2"); erikj@459: exit (0); erikj@459: } erikj@459: EOF erikj@459: $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && erikj@459: { echo "$SYSTEM_NAME"; exit; } erikj@459: echo unknown-hitachi-hiuxwe2 erikj@459: exit ;; erikj@459: 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) erikj@459: echo hppa1.1-hp-bsd erikj@459: exit ;; erikj@459: 9000/8??:4.3bsd:*:*) erikj@459: echo hppa1.0-hp-bsd erikj@459: exit ;; erikj@459: *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) erikj@459: echo hppa1.0-hp-mpeix erikj@459: exit ;; erikj@459: hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) erikj@459: echo hppa1.1-hp-osf erikj@459: exit ;; erikj@459: hp8??:OSF1:*:*) erikj@459: echo hppa1.0-hp-osf erikj@459: exit ;; erikj@459: i*86:OSF1:*:*) erikj@459: if [ -x /usr/sbin/sysversion ] ; then erikj@459: echo ${UNAME_MACHINE}-unknown-osf1mk erikj@459: else erikj@459: echo ${UNAME_MACHINE}-unknown-osf1 erikj@459: fi erikj@459: exit ;; erikj@459: parisc*:Lites*:*:*) erikj@459: echo hppa1.1-hp-lites erikj@459: exit ;; erikj@459: C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) erikj@459: echo c1-convex-bsd ihse@794: exit ;; erikj@459: C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) erikj@459: if getsysinfo -f scalar_acc erikj@459: then echo c32-convex-bsd erikj@459: else echo c2-convex-bsd erikj@459: fi ihse@794: exit ;; erikj@459: C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) erikj@459: echo c34-convex-bsd ihse@794: exit ;; erikj@459: C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) erikj@459: echo c38-convex-bsd ihse@794: exit ;; erikj@459: C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) erikj@459: echo c4-convex-bsd ihse@794: exit ;; erikj@459: CRAY*Y-MP:*:*:*) erikj@459: echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' erikj@459: exit ;; erikj@459: CRAY*[A-Z]90:*:*:*) erikj@459: echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ erikj@459: | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ erikj@459: -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ erikj@459: -e 's/\.[^.]*$/.X/' erikj@459: exit ;; erikj@459: CRAY*TS:*:*:*) erikj@459: echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' erikj@459: exit ;; erikj@459: CRAY*T3E:*:*:*) erikj@459: echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' erikj@459: exit ;; erikj@459: CRAY*SV1:*:*:*) erikj@459: echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' erikj@459: exit ;; erikj@459: *:UNICOS/mp:*:*) erikj@459: echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' erikj@459: exit ;; erikj@459: F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) erikj@459: FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ihse@794: FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ihse@794: FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` ihse@794: echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" ihse@794: exit ;; erikj@459: 5000:UNIX_System_V:4.*:*) ihse@794: FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ihse@794: FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` ihse@794: echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" erikj@459: exit ;; erikj@459: i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) erikj@459: echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} erikj@459: exit ;; erikj@459: sparc*:BSD/OS:*:*) erikj@459: echo sparc-unknown-bsdi${UNAME_RELEASE} erikj@459: exit ;; erikj@459: *:BSD/OS:*:*) erikj@459: echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} erikj@459: exit ;; erikj@459: *:FreeBSD:*:*) ihse@794: UNAME_PROCESSOR=`/usr/bin/uname -p` ihse@794: case ${UNAME_PROCESSOR} in erikj@459: amd64) erikj@459: echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; erikj@459: *) ihse@794: echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; erikj@459: esac erikj@459: exit ;; erikj@459: i*:CYGWIN*:*) erikj@459: echo ${UNAME_MACHINE}-pc-cygwin erikj@459: exit ;; erikj@459: *:MINGW*:*) erikj@459: echo ${UNAME_MACHINE}-pc-mingw32 erikj@459: exit ;; ihse@794: i*:MSYS*:*) ihse@794: echo ${UNAME_MACHINE}-pc-msys ihse@794: exit ;; erikj@459: i*:windows32*:*) ihse@794: # uname -m includes "-pc" on this system. ihse@794: echo ${UNAME_MACHINE}-mingw32 erikj@459: exit ;; erikj@459: i*:PW*:*) erikj@459: echo ${UNAME_MACHINE}-pc-pw32 erikj@459: exit ;; ihse@794: *:Interix*:*) ihse@794: case ${UNAME_MACHINE} in erikj@459: x86) erikj@459: echo i586-pc-interix${UNAME_RELEASE} erikj@459: exit ;; ihse@794: authenticamd | genuineintel | EM64T) erikj@459: echo x86_64-unknown-interix${UNAME_RELEASE} erikj@459: exit ;; erikj@459: IA64) erikj@459: echo ia64-unknown-interix${UNAME_RELEASE} erikj@459: exit ;; erikj@459: esac ;; erikj@459: [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) erikj@459: echo i${UNAME_MACHINE}-pc-mks erikj@459: exit ;; ihse@794: 8664:Windows_NT:*) ihse@794: echo x86_64-pc-mks ihse@794: exit ;; erikj@459: i*:Windows_NT*:* | Pentium*:Windows_NT*:*) erikj@459: # How do we know it's Interix rather than the generic POSIX subsystem? erikj@459: # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we erikj@459: # UNAME_MACHINE based on the output of uname instead of i386? erikj@459: echo i586-pc-interix erikj@459: exit ;; erikj@459: i*:UWIN*:*) erikj@459: echo ${UNAME_MACHINE}-pc-uwin erikj@459: exit ;; erikj@459: amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) erikj@459: echo x86_64-unknown-cygwin erikj@459: exit ;; erikj@459: p*:CYGWIN*:*) erikj@459: echo powerpcle-unknown-cygwin erikj@459: exit ;; erikj@459: prep*:SunOS:5.*:*) erikj@459: echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` erikj@459: exit ;; erikj@459: *:GNU:*:*) erikj@459: # the GNU system erikj@459: echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` erikj@459: exit ;; erikj@459: *:GNU/*:*:*) erikj@459: # other systems with GNU libc and userland erikj@459: echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu erikj@459: exit ;; erikj@459: i*86:Minix:*:*) erikj@459: echo ${UNAME_MACHINE}-pc-minix erikj@459: exit ;; ihse@794: aarch64:Linux:*:*) ihse@794: echo ${UNAME_MACHINE}-unknown-linux-gnu ihse@794: exit ;; ihse@794: aarch64_be:Linux:*:*) ihse@794: UNAME_MACHINE=aarch64_be ihse@794: echo ${UNAME_MACHINE}-unknown-linux-gnu ihse@794: exit ;; ihse@794: alpha:Linux:*:*) ihse@794: case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ihse@794: EV5) UNAME_MACHINE=alphaev5 ;; ihse@794: EV56) UNAME_MACHINE=alphaev56 ;; ihse@794: PCA56) UNAME_MACHINE=alphapca56 ;; ihse@794: PCA57) UNAME_MACHINE=alphapca56 ;; ihse@794: EV6) UNAME_MACHINE=alphaev6 ;; ihse@794: EV67) UNAME_MACHINE=alphaev67 ;; ihse@794: EV68*) UNAME_MACHINE=alphaev68 ;; ihse@794: esac ihse@794: objdump --private-headers /bin/sh | grep -q ld.so.1 ihse@794: if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi ihse@794: echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ihse@794: exit ;; erikj@459: arm*:Linux:*:*) erikj@459: eval $set_cc_for_build erikj@459: if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ erikj@459: | grep -q __ARM_EABI__ erikj@459: then erikj@459: echo ${UNAME_MACHINE}-unknown-linux-gnu erikj@459: else ihse@794: if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ ihse@794: | grep -q __ARM_PCS_VFP ihse@794: then ihse@794: echo ${UNAME_MACHINE}-unknown-linux-gnueabi ihse@794: else ihse@794: echo ${UNAME_MACHINE}-unknown-linux-gnueabihf ihse@794: fi erikj@459: fi erikj@459: exit ;; erikj@459: avr32*:Linux:*:*) erikj@459: echo ${UNAME_MACHINE}-unknown-linux-gnu erikj@459: exit ;; erikj@459: cris:Linux:*:*) ihse@794: echo ${UNAME_MACHINE}-axis-linux-gnu erikj@459: exit ;; erikj@459: crisv32:Linux:*:*) ihse@794: echo ${UNAME_MACHINE}-axis-linux-gnu erikj@459: exit ;; erikj@459: frv:Linux:*:*) ihse@794: echo ${UNAME_MACHINE}-unknown-linux-gnu ihse@794: exit ;; ihse@794: hexagon:Linux:*:*) ihse@794: echo ${UNAME_MACHINE}-unknown-linux-gnu ihse@794: exit ;; ihse@794: i*86:Linux:*:*) ihse@794: LIBC=gnu ihse@794: eval $set_cc_for_build ihse@794: sed 's/^ //' << EOF >$dummy.c ihse@794: #ifdef __dietlibc__ ihse@794: LIBC=dietlibc ihse@794: #endif ihse@794: EOF ihse@794: eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ihse@794: echo "${UNAME_MACHINE}-pc-linux-${LIBC}" erikj@459: exit ;; erikj@459: ia64:Linux:*:*) erikj@459: echo ${UNAME_MACHINE}-unknown-linux-gnu erikj@459: exit ;; erikj@459: m32r*:Linux:*:*) erikj@459: echo ${UNAME_MACHINE}-unknown-linux-gnu erikj@459: exit ;; erikj@459: m68*:Linux:*:*) erikj@459: echo ${UNAME_MACHINE}-unknown-linux-gnu erikj@459: exit ;; ihse@794: mips:Linux:*:* | mips64:Linux:*:*) erikj@459: eval $set_cc_for_build erikj@459: sed 's/^ //' << EOF >$dummy.c erikj@459: #undef CPU ihse@794: #undef ${UNAME_MACHINE} ihse@794: #undef ${UNAME_MACHINE}el erikj@459: #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ihse@794: CPU=${UNAME_MACHINE}el erikj@459: #else erikj@459: #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) ihse@794: CPU=${UNAME_MACHINE} erikj@459: #else erikj@459: CPU= erikj@459: #endif erikj@459: #endif erikj@459: EOF ihse@794: eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` erikj@459: test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } erikj@459: ;; erikj@459: or32:Linux:*:*) ihse@794: echo ${UNAME_MACHINE}-unknown-linux-gnu erikj@459: exit ;; ihse@794: padre:Linux:*:*) ihse@794: echo sparc-unknown-linux-gnu erikj@459: exit ;; ihse@794: parisc64:Linux:*:* | hppa64:Linux:*:*) ihse@794: echo hppa64-unknown-linux-gnu erikj@459: exit ;; erikj@459: parisc:Linux:*:* | hppa:Linux:*:*) erikj@459: # Look for CPU level erikj@459: case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in erikj@459: PA7*) echo hppa1.1-unknown-linux-gnu ;; erikj@459: PA8*) echo hppa2.0-unknown-linux-gnu ;; erikj@459: *) echo hppa-unknown-linux-gnu ;; erikj@459: esac erikj@459: exit ;; ihse@794: ppc64:Linux:*:*) ihse@794: echo powerpc64-unknown-linux-gnu ihse@794: exit ;; ihse@794: ppc:Linux:*:*) ihse@794: echo powerpc-unknown-linux-gnu erikj@459: exit ;; erikj@459: s390:Linux:*:* | s390x:Linux:*:*) erikj@459: echo ${UNAME_MACHINE}-ibm-linux erikj@459: exit ;; erikj@459: sh64*:Linux:*:*) ihse@794: echo ${UNAME_MACHINE}-unknown-linux-gnu erikj@459: exit ;; erikj@459: sh*:Linux:*:*) erikj@459: echo ${UNAME_MACHINE}-unknown-linux-gnu erikj@459: exit ;; erikj@459: sparc:Linux:*:* | sparc64:Linux:*:*) erikj@459: echo ${UNAME_MACHINE}-unknown-linux-gnu erikj@459: exit ;; ihse@794: tile*:Linux:*:*) ihse@794: echo ${UNAME_MACHINE}-unknown-linux-gnu ihse@794: exit ;; erikj@459: vax:Linux:*:*) erikj@459: echo ${UNAME_MACHINE}-dec-linux-gnu erikj@459: exit ;; erikj@459: x86_64:Linux:*:*) ihse@794: echo ${UNAME_MACHINE}-unknown-linux-gnu erikj@459: exit ;; erikj@459: xtensa*:Linux:*:*) ihse@794: echo ${UNAME_MACHINE}-unknown-linux-gnu erikj@459: exit ;; erikj@459: i*86:DYNIX/ptx:4*:*) erikj@459: # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. erikj@459: # earlier versions are messed up and put the nodename in both erikj@459: # sysname and nodename. erikj@459: echo i386-sequent-sysv4 erikj@459: exit ;; erikj@459: i*86:UNIX_SV:4.2MP:2.*) ihse@794: # Unixware is an offshoot of SVR4, but it has its own version ihse@794: # number series starting with 2... ihse@794: # I am not positive that other SVR4 systems won't match this, erikj@459: # I just have to hope. -- rms. ihse@794: # Use sysv4.2uw... so that sysv4* matches it. erikj@459: echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} erikj@459: exit ;; erikj@459: i*86:OS/2:*:*) erikj@459: # If we were able to find `uname', then EMX Unix compatibility erikj@459: # is probably installed. erikj@459: echo ${UNAME_MACHINE}-pc-os2-emx erikj@459: exit ;; erikj@459: i*86:XTS-300:*:STOP) erikj@459: echo ${UNAME_MACHINE}-unknown-stop erikj@459: exit ;; erikj@459: i*86:atheos:*:*) erikj@459: echo ${UNAME_MACHINE}-unknown-atheos erikj@459: exit ;; erikj@459: i*86:syllable:*:*) erikj@459: echo ${UNAME_MACHINE}-pc-syllable erikj@459: exit ;; ihse@794: i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) erikj@459: echo i386-unknown-lynxos${UNAME_RELEASE} erikj@459: exit ;; erikj@459: i*86:*DOS:*:*) erikj@459: echo ${UNAME_MACHINE}-pc-msdosdjgpp erikj@459: exit ;; erikj@459: i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) erikj@459: UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` erikj@459: if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then erikj@459: echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} erikj@459: else erikj@459: echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} erikj@459: fi erikj@459: exit ;; erikj@459: i*86:*:5:[678]*) ihse@794: # UnixWare 7.x, OpenUNIX and OpenServer 6. erikj@459: case `/bin/uname -X | grep "^Machine"` in erikj@459: *486*) UNAME_MACHINE=i486 ;; erikj@459: *Pentium) UNAME_MACHINE=i586 ;; erikj@459: *Pent*|*Celeron) UNAME_MACHINE=i686 ;; erikj@459: esac erikj@459: echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} erikj@459: exit ;; erikj@459: i*86:*:3.2:*) erikj@459: if test -f /usr/options/cb.name; then erikj@459: UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then erikj@459: UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` erikj@459: (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 erikj@459: (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ erikj@459: && UNAME_MACHINE=i586 erikj@459: (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ erikj@459: && UNAME_MACHINE=i686 erikj@459: (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ erikj@459: && UNAME_MACHINE=i686 erikj@459: echo ${UNAME_MACHINE}-pc-sco$UNAME_REL erikj@459: else erikj@459: echo ${UNAME_MACHINE}-pc-sysv32 erikj@459: fi erikj@459: exit ;; erikj@459: pc:*:*:*) erikj@459: # Left here for compatibility: ihse@794: # uname -m prints for DJGPP always 'pc', but it prints nothing about ihse@794: # the processor, so we play safe by assuming i586. ihse@794: # Note: whatever this is, it MUST be the same as what config.sub ihse@794: # prints for the "djgpp" host, or else GDB configury will decide that ihse@794: # this is a cross-build. ihse@794: echo i586-pc-msdosdjgpp ihse@794: exit ;; erikj@459: Intel:Mach:3*:*) erikj@459: echo i386-pc-mach3 erikj@459: exit ;; erikj@459: paragon:*:*:*) erikj@459: echo i860-intel-osf1 erikj@459: exit ;; erikj@459: i860:*:4.*:*) # i860-SVR4 erikj@459: if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then erikj@459: echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 erikj@459: else # Add other i860-SVR4 vendors below as they are discovered. erikj@459: echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 erikj@459: fi erikj@459: exit ;; erikj@459: mini*:CTIX:SYS*5:*) erikj@459: # "miniframe" erikj@459: echo m68010-convergent-sysv erikj@459: exit ;; erikj@459: mc68k:UNIX:SYSTEM5:3.51m) erikj@459: echo m68k-convergent-sysv erikj@459: exit ;; erikj@459: M680?0:D-NIX:5.3:*) erikj@459: echo m68k-diab-dnix erikj@459: exit ;; erikj@459: M68*:*:R3V[5678]*:*) erikj@459: test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; erikj@459: 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) erikj@459: OS_REL='' erikj@459: test -r /etc/.relid \ erikj@459: && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` erikj@459: /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ erikj@459: && { echo i486-ncr-sysv4.3${OS_REL}; exit; } erikj@459: /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ erikj@459: && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; erikj@459: 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) ihse@794: /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ihse@794: && { echo i486-ncr-sysv4; exit; } ;; ihse@794: NCR*:*:4.2:* | MPRAS*:*:4.2:*) ihse@794: OS_REL='.3' ihse@794: test -r /etc/.relid \ ihse@794: && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` ihse@794: /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ihse@794: && { echo i486-ncr-sysv4.3${OS_REL}; exit; } ihse@794: /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ ihse@794: && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ihse@794: /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ ihse@794: && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; erikj@459: m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) erikj@459: echo m68k-unknown-lynxos${UNAME_RELEASE} erikj@459: exit ;; erikj@459: mc68030:UNIX_System_V:4.*:*) erikj@459: echo m68k-atari-sysv4 erikj@459: exit ;; erikj@459: TSUNAMI:LynxOS:2.*:*) erikj@459: echo sparc-unknown-lynxos${UNAME_RELEASE} erikj@459: exit ;; erikj@459: rs6000:LynxOS:2.*:*) erikj@459: echo rs6000-unknown-lynxos${UNAME_RELEASE} erikj@459: exit ;; ihse@794: PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) erikj@459: echo powerpc-unknown-lynxos${UNAME_RELEASE} erikj@459: exit ;; erikj@459: SM[BE]S:UNIX_SV:*:*) erikj@459: echo mips-dde-sysv${UNAME_RELEASE} erikj@459: exit ;; erikj@459: RM*:ReliantUNIX-*:*:*) erikj@459: echo mips-sni-sysv4 erikj@459: exit ;; erikj@459: RM*:SINIX-*:*:*) erikj@459: echo mips-sni-sysv4 erikj@459: exit ;; erikj@459: *:SINIX-*:*:*) erikj@459: if uname -p 2>/dev/null >/dev/null ; then erikj@459: UNAME_MACHINE=`(uname -p) 2>/dev/null` erikj@459: echo ${UNAME_MACHINE}-sni-sysv4 erikj@459: else erikj@459: echo ns32k-sni-sysv erikj@459: fi erikj@459: exit ;; ihse@794: PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort ihse@794: # says ihse@794: echo i586-unisys-sysv4 ihse@794: exit ;; erikj@459: *:UNIX_System_V:4*:FTX*) erikj@459: # From Gerald Hewes . erikj@459: # How about differentiating between stratus architectures? -djm erikj@459: echo hppa1.1-stratus-sysv4 erikj@459: exit ;; erikj@459: *:*:*:FTX*) erikj@459: # From seanf@swdc.stratus.com. erikj@459: echo i860-stratus-sysv4 erikj@459: exit ;; erikj@459: i*86:VOS:*:*) erikj@459: # From Paul.Green@stratus.com. erikj@459: echo ${UNAME_MACHINE}-stratus-vos erikj@459: exit ;; erikj@459: *:VOS:*:*) erikj@459: # From Paul.Green@stratus.com. erikj@459: echo hppa1.1-stratus-vos erikj@459: exit ;; erikj@459: mc68*:A/UX:*:*) erikj@459: echo m68k-apple-aux${UNAME_RELEASE} erikj@459: exit ;; erikj@459: news*:NEWS-OS:6*:*) erikj@459: echo mips-sony-newsos6 erikj@459: exit ;; erikj@459: R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) erikj@459: if [ -d /usr/nec ]; then ihse@794: echo mips-nec-sysv${UNAME_RELEASE} erikj@459: else ihse@794: echo mips-unknown-sysv${UNAME_RELEASE} erikj@459: fi ihse@794: exit ;; erikj@459: BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. erikj@459: echo powerpc-be-beos erikj@459: exit ;; erikj@459: BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. erikj@459: echo powerpc-apple-beos erikj@459: exit ;; erikj@459: BePC:BeOS:*:*) # BeOS running on Intel PC compatible. erikj@459: echo i586-pc-beos erikj@459: exit ;; ihse@794: BePC:Haiku:*:*) # Haiku running on Intel PC compatible. ihse@794: echo i586-pc-haiku ihse@794: exit ;; erikj@459: SX-4:SUPER-UX:*:*) erikj@459: echo sx4-nec-superux${UNAME_RELEASE} erikj@459: exit ;; erikj@459: SX-5:SUPER-UX:*:*) erikj@459: echo sx5-nec-superux${UNAME_RELEASE} erikj@459: exit ;; erikj@459: SX-6:SUPER-UX:*:*) erikj@459: echo sx6-nec-superux${UNAME_RELEASE} erikj@459: exit ;; erikj@459: SX-7:SUPER-UX:*:*) erikj@459: echo sx7-nec-superux${UNAME_RELEASE} erikj@459: exit ;; erikj@459: SX-8:SUPER-UX:*:*) erikj@459: echo sx8-nec-superux${UNAME_RELEASE} erikj@459: exit ;; erikj@459: SX-8R:SUPER-UX:*:*) erikj@459: echo sx8r-nec-superux${UNAME_RELEASE} erikj@459: exit ;; erikj@459: Power*:Rhapsody:*:*) erikj@459: echo powerpc-apple-rhapsody${UNAME_RELEASE} erikj@459: exit ;; erikj@459: *:Rhapsody:*:*) erikj@459: echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} erikj@459: exit ;; erikj@459: *:Darwin:*:*) erikj@459: UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown erikj@459: case $UNAME_PROCESSOR in ihse@794: i386) ihse@794: eval $set_cc_for_build ihse@794: if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ihse@794: if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ ihse@794: (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ihse@794: grep IS_64BIT_ARCH >/dev/null ihse@794: then ihse@794: UNAME_PROCESSOR="x86_64" ihse@794: fi ihse@794: fi ;; erikj@459: unknown) UNAME_PROCESSOR=powerpc ;; erikj@459: esac erikj@459: echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} erikj@459: exit ;; erikj@459: *:procnto*:*:* | *:QNX:[0123456789]*:*) erikj@459: UNAME_PROCESSOR=`uname -p` erikj@459: if test "$UNAME_PROCESSOR" = "x86"; then erikj@459: UNAME_PROCESSOR=i386 erikj@459: UNAME_MACHINE=pc erikj@459: fi erikj@459: echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} erikj@459: exit ;; erikj@459: *:QNX:*:4*) erikj@459: echo i386-pc-qnx erikj@459: exit ;; ihse@794: NEO-?:NONSTOP_KERNEL:*:*) ihse@794: echo neo-tandem-nsk${UNAME_RELEASE} ihse@794: exit ;; erikj@459: NSE-?:NONSTOP_KERNEL:*:*) erikj@459: echo nse-tandem-nsk${UNAME_RELEASE} erikj@459: exit ;; erikj@459: NSR-?:NONSTOP_KERNEL:*:*) erikj@459: echo nsr-tandem-nsk${UNAME_RELEASE} erikj@459: exit ;; erikj@459: *:NonStop-UX:*:*) erikj@459: echo mips-compaq-nonstopux erikj@459: exit ;; erikj@459: BS2000:POSIX*:*:*) erikj@459: echo bs2000-siemens-sysv erikj@459: exit ;; erikj@459: DS/*:UNIX_System_V:*:*) erikj@459: echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} erikj@459: exit ;; erikj@459: *:Plan9:*:*) erikj@459: # "uname -m" is not consistent, so use $cputype instead. 386 erikj@459: # is converted to i386 for consistency with other x86 erikj@459: # operating systems. erikj@459: if test "$cputype" = "386"; then erikj@459: UNAME_MACHINE=i386 erikj@459: else erikj@459: UNAME_MACHINE="$cputype" erikj@459: fi erikj@459: echo ${UNAME_MACHINE}-unknown-plan9 erikj@459: exit ;; erikj@459: *:TOPS-10:*:*) erikj@459: echo pdp10-unknown-tops10 erikj@459: exit ;; erikj@459: *:TENEX:*:*) erikj@459: echo pdp10-unknown-tenex erikj@459: exit ;; erikj@459: KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) erikj@459: echo pdp10-dec-tops20 erikj@459: exit ;; erikj@459: XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) erikj@459: echo pdp10-xkl-tops20 erikj@459: exit ;; erikj@459: *:TOPS-20:*:*) erikj@459: echo pdp10-unknown-tops20 erikj@459: exit ;; erikj@459: *:ITS:*:*) erikj@459: echo pdp10-unknown-its erikj@459: exit ;; erikj@459: SEI:*:*:SEIUX) ihse@794: echo mips-sei-seiux${UNAME_RELEASE} erikj@459: exit ;; erikj@459: *:DragonFly:*:*) erikj@459: echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` erikj@459: exit ;; erikj@459: *:*VMS:*:*) ihse@794: UNAME_MACHINE=`(uname -p) 2>/dev/null` erikj@459: case "${UNAME_MACHINE}" in erikj@459: A*) echo alpha-dec-vms ; exit ;; erikj@459: I*) echo ia64-dec-vms ; exit ;; erikj@459: V*) echo vax-dec-vms ; exit ;; erikj@459: esac ;; erikj@459: *:XENIX:*:SysV) erikj@459: echo i386-pc-xenix erikj@459: exit ;; erikj@459: i*86:skyos:*:*) erikj@459: echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' erikj@459: exit ;; erikj@459: i*86:rdos:*:*) erikj@459: echo ${UNAME_MACHINE}-pc-rdos erikj@459: exit ;; ihse@794: i*86:AROS:*:*) ihse@794: echo ${UNAME_MACHINE}-pc-aros ihse@794: exit ;; ihse@794: x86_64:VMkernel:*:*) ihse@794: echo ${UNAME_MACHINE}-unknown-esx ihse@794: exit ;; erikj@459: esac erikj@459: erikj@459: #echo '(No uname command or uname output not recognized.)' 1>&2 erikj@459: #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 erikj@459: erikj@459: eval $set_cc_for_build erikj@459: cat >$dummy.c < erikj@459: # include erikj@459: #endif erikj@459: main () erikj@459: { erikj@459: #if defined (sony) erikj@459: #if defined (MIPSEB) erikj@459: /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, erikj@459: I don't know.... */ erikj@459: printf ("mips-sony-bsd\n"); exit (0); erikj@459: #else erikj@459: #include erikj@459: printf ("m68k-sony-newsos%s\n", erikj@459: #ifdef NEWSOS4 ihse@794: "4" erikj@459: #else ihse@794: "" erikj@459: #endif ihse@794: ); exit (0); erikj@459: #endif erikj@459: #endif erikj@459: erikj@459: #if defined (__arm) && defined (__acorn) && defined (__unix) erikj@459: printf ("arm-acorn-riscix\n"); exit (0); erikj@459: #endif erikj@459: erikj@459: #if defined (hp300) && !defined (hpux) erikj@459: printf ("m68k-hp-bsd\n"); exit (0); erikj@459: #endif erikj@459: erikj@459: #if defined (NeXT) erikj@459: #if !defined (__ARCHITECTURE__) erikj@459: #define __ARCHITECTURE__ "m68k" erikj@459: #endif erikj@459: int version; erikj@459: version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; erikj@459: if (version < 4) erikj@459: printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); erikj@459: else erikj@459: printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); erikj@459: exit (0); erikj@459: #endif erikj@459: erikj@459: #if defined (MULTIMAX) || defined (n16) erikj@459: #if defined (UMAXV) erikj@459: printf ("ns32k-encore-sysv\n"); exit (0); erikj@459: #else erikj@459: #if defined (CMU) erikj@459: printf ("ns32k-encore-mach\n"); exit (0); erikj@459: #else erikj@459: printf ("ns32k-encore-bsd\n"); exit (0); erikj@459: #endif erikj@459: #endif erikj@459: #endif erikj@459: erikj@459: #if defined (__386BSD__) erikj@459: printf ("i386-pc-bsd\n"); exit (0); erikj@459: #endif erikj@459: erikj@459: #if defined (sequent) erikj@459: #if defined (i386) erikj@459: printf ("i386-sequent-dynix\n"); exit (0); erikj@459: #endif erikj@459: #if defined (ns32000) erikj@459: printf ("ns32k-sequent-dynix\n"); exit (0); erikj@459: #endif erikj@459: #endif erikj@459: erikj@459: #if defined (_SEQUENT_) erikj@459: struct utsname un; erikj@459: erikj@459: uname(&un); erikj@459: erikj@459: if (strncmp(un.version, "V2", 2) == 0) { erikj@459: printf ("i386-sequent-ptx2\n"); exit (0); erikj@459: } erikj@459: if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ erikj@459: printf ("i386-sequent-ptx1\n"); exit (0); erikj@459: } erikj@459: printf ("i386-sequent-ptx\n"); exit (0); erikj@459: erikj@459: #endif erikj@459: erikj@459: #if defined (vax) erikj@459: # if !defined (ultrix) erikj@459: # include erikj@459: # if defined (BSD) erikj@459: # if BSD == 43 erikj@459: printf ("vax-dec-bsd4.3\n"); exit (0); erikj@459: # else erikj@459: # if BSD == 199006 erikj@459: printf ("vax-dec-bsd4.3reno\n"); exit (0); erikj@459: # else erikj@459: printf ("vax-dec-bsd\n"); exit (0); erikj@459: # endif erikj@459: # endif erikj@459: # else erikj@459: printf ("vax-dec-bsd\n"); exit (0); erikj@459: # endif erikj@459: # else erikj@459: printf ("vax-dec-ultrix\n"); exit (0); erikj@459: # endif erikj@459: #endif erikj@459: erikj@459: #if defined (alliant) && defined (i860) erikj@459: printf ("i860-alliant-bsd\n"); exit (0); erikj@459: #endif erikj@459: erikj@459: exit (1); erikj@459: } erikj@459: EOF erikj@459: erikj@459: $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && erikj@459: { echo "$SYSTEM_NAME"; exit; } erikj@459: erikj@459: # Apollos put the system type in the environment. erikj@459: erikj@459: test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } erikj@459: erikj@459: # Convex versions that predate uname can use getsysinfo(1) erikj@459: erikj@459: if [ -x /usr/convex/getsysinfo ] erikj@459: then erikj@459: case `getsysinfo -f cpu_type` in erikj@459: c1*) erikj@459: echo c1-convex-bsd erikj@459: exit ;; erikj@459: c2*) erikj@459: if getsysinfo -f scalar_acc erikj@459: then echo c32-convex-bsd erikj@459: else echo c2-convex-bsd erikj@459: fi erikj@459: exit ;; erikj@459: c34*) erikj@459: echo c34-convex-bsd erikj@459: exit ;; erikj@459: c38*) erikj@459: echo c38-convex-bsd erikj@459: exit ;; erikj@459: c4*) erikj@459: echo c4-convex-bsd erikj@459: exit ;; erikj@459: esac erikj@459: fi erikj@459: erikj@459: cat >&2 < in order to provide the needed erikj@459: information to handle your system. erikj@459: erikj@459: config.guess timestamp = $timestamp erikj@459: erikj@459: uname -m = `(uname -m) 2>/dev/null || echo unknown` erikj@459: uname -r = `(uname -r) 2>/dev/null || echo unknown` erikj@459: uname -s = `(uname -s) 2>/dev/null || echo unknown` erikj@459: uname -v = `(uname -v) 2>/dev/null || echo unknown` erikj@459: erikj@459: /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` erikj@459: /bin/uname -X = `(/bin/uname -X) 2>/dev/null` erikj@459: erikj@459: hostinfo = `(hostinfo) 2>/dev/null` erikj@459: /bin/universe = `(/bin/universe) 2>/dev/null` erikj@459: /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` erikj@459: /bin/arch = `(/bin/arch) 2>/dev/null` erikj@459: /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` erikj@459: /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` erikj@459: erikj@459: UNAME_MACHINE = ${UNAME_MACHINE} erikj@459: UNAME_RELEASE = ${UNAME_RELEASE} erikj@459: UNAME_SYSTEM = ${UNAME_SYSTEM} erikj@459: UNAME_VERSION = ${UNAME_VERSION} erikj@459: EOF erikj@459: erikj@459: exit 1 erikj@459: erikj@459: # Local variables: erikj@459: # eval: (add-hook 'write-file-hooks 'time-stamp) erikj@459: # time-stamp-start: "timestamp='" erikj@459: # time-stamp-format: "%:y-%02m-%02d" erikj@459: # time-stamp-end: "'" erikj@459: # End: