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