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