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