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