2007-10-17 19:59:37 -04:00
|
|
|
#! /bin/sh
|
|
|
|
# Attempt to guess a canonical system name.
|
|
|
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
2007-10-25 17:43:40 -04:00
|
|
|
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
2007-10-17 19:59:37 -04:00
|
|
|
|
2007-10-25 17:43:40 -04:00
|
|
|
timestamp='2005-07-08'
|
2007-10-17 19:59:37 -04:00
|
|
|
|
|
|
|
# This file is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful, but
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
2007-10-25 17:43:40 -04:00
|
|
|
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
|
|
|
# 02110-1301, USA.
|
2007-10-17 19:59:37 -04:00
|
|
|
#
|
|
|
|
# As a special exception to the GNU General Public License, if you
|
|
|
|
# distribute this file as part of a program that contains a
|
|
|
|
# configuration script generated by Autoconf, you may include it under
|
|
|
|
# the same distribution terms that you use for the rest of that program.
|
|
|
|
|
2007-10-25 17:43:40 -04:00
|
|
|
|
2007-10-17 19:59:37 -04:00
|
|
|
# Originally written by Per Bothner <per@bothner.com>.
|
|
|
|
# Please send patches to <config-patches@gnu.org>. Submit a context
|
|
|
|
# diff and a properly formatted ChangeLog entry.
|
|
|
|
#
|
|
|
|
# This script attempts to guess a canonical system name similar to
|
|
|
|
# config.sub. If it succeeds, it prints the system name on stdout, and
|
|
|
|
# exits with 0. Otherwise, it exits with 1.
|
|
|
|
#
|
|
|
|
# The plan is that this can be called by configure scripts if you
|
|
|
|
# don't specify an explicit build system type.
|
|
|
|
|
|
|
|
me=`echo "$0" | sed -e 's,.*/,,'`
|
|
|
|
|
|
|
|
usage="\
|
|
|
|
Usage: $0 [OPTION]
|
|
|
|
|
|
|
|
Output the configuration name of the system \`$me' is run on.
|
|
|
|
|
|
|
|
Operation modes:
|
|
|
|
-h, --help print this help, then exit
|
|
|
|
-t, --time-stamp print date of last modification, then exit
|
|
|
|
-v, --version print version number, then exit
|
|
|
|
|
|
|
|
Report bugs and patches to <config-patches@gnu.org>."
|
|
|
|
|
|
|
|
version="\
|
|
|
|
GNU config.guess ($timestamp)
|
|
|
|
|
|
|
|
Originally written by Per Bothner.
|
2007-10-25 17:43:40 -04:00
|
|
|
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
2007-10-17 19:59:37 -04:00
|
|
|
Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
This is free software; see the source for copying conditions. There is NO
|
|
|
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
|
|
|
|
|
|
|
help="
|
|
|
|
Try \`$me --help' for more information."
|
|
|
|
|
|
|
|
# Parse command line
|
|
|
|
while test $# -gt 0 ; do
|
|
|
|
case $1 in
|
|
|
|
--time-stamp | --time* | -t )
|
2007-10-25 17:43:40 -04:00
|
|
|
echo "$timestamp" ; exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
--version | -v )
|
2007-10-25 17:43:40 -04:00
|
|
|
echo "$version" ; exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
--help | --h* | -h )
|
2007-10-25 17:43:40 -04:00
|
|
|
echo "$usage"; exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
-- ) # Stop option processing
|
|
|
|
shift; break ;;
|
|
|
|
- ) # Use stdin as input.
|
|
|
|
break ;;
|
|
|
|
-* )
|
|
|
|
echo "$me: invalid option $1$help" >&2
|
|
|
|
exit 1 ;;
|
|
|
|
* )
|
|
|
|
break ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
if test $# != 0; then
|
|
|
|
echo "$me: too many arguments$help" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
trap 'exit 1' 1 2 15
|
|
|
|
|
|
|
|
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
|
|
|
|
# compiler to aid in system detection is discouraged as it requires
|
|
|
|
# temporary files to be created and, as you can see below, it is a
|
|
|
|
# headache to deal with in a portable fashion.
|
|
|
|
|
|
|
|
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
|
|
|
# use `HOST_CC' if defined, but it is deprecated.
|
|
|
|
|
2007-10-25 17:43:40 -04:00
|
|
|
# Portable tmp directory creation inspired by the Autoconf team.
|
2007-10-17 19:59:37 -04:00
|
|
|
|
2007-10-25 17:43:40 -04:00
|
|
|
set_cc_for_build='
|
|
|
|
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
|
|
|
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
|
|
|
: ${TMPDIR=/tmp} ;
|
|
|
|
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
|
|
|
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
|
|
|
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
|
|
|
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
|
|
|
dummy=$tmp/dummy ;
|
|
|
|
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
2007-10-17 19:59:37 -04:00
|
|
|
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
|
|
|
,,) echo "int x;" > $dummy.c ;
|
|
|
|
for c in cc gcc c89 c99 ; do
|
2007-10-25 17:43:40 -04:00
|
|
|
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
|
2007-10-17 19:59:37 -04:00
|
|
|
CC_FOR_BUILD="$c"; break ;
|
|
|
|
fi ;
|
|
|
|
done ;
|
|
|
|
if test x"$CC_FOR_BUILD" = x ; then
|
|
|
|
CC_FOR_BUILD=no_compiler_found ;
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
,,*) CC_FOR_BUILD=$CC ;;
|
|
|
|
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
2007-10-25 17:43:40 -04:00
|
|
|
esac ; set_cc_for_build= ;'
|
2007-10-17 19:59:37 -04:00
|
|
|
|
|
|
|
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
|
|
|
# (ghazi@noc.rutgers.edu 1994-08-24)
|
|
|
|
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
|
|
|
|
PATH=$PATH:/.attbin ; export PATH
|
|
|
|
fi
|
|
|
|
|
|
|
|
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
|
|
|
|
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
|
|
|
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
|
|
|
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
|
|
|
|
|
|
|
# Note: order is significant - the case branches are not exclusive.
|
|
|
|
|
|
|
|
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|
|
|
*:NetBSD:*:*)
|
|
|
|
# NetBSD (nbsd) targets should (where applicable) match one or
|
|
|
|
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
|
|
|
|
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
|
|
|
|
# switched to ELF, *-*-netbsd* would select the old
|
|
|
|
# object file format. This provides both forward
|
|
|
|
# compatibility and a consistent mechanism for selecting the
|
|
|
|
# object file format.
|
|
|
|
#
|
|
|
|
# Note: NetBSD doesn't particularly care about the vendor
|
|
|
|
# portion of the name. We always set it to "unknown".
|
|
|
|
sysctl="sysctl -n hw.machine_arch"
|
|
|
|
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
|
|
|
|
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
|
|
|
|
case "${UNAME_MACHINE_ARCH}" in
|
|
|
|
armeb) machine=armeb-unknown ;;
|
|
|
|
arm*) machine=arm-unknown ;;
|
|
|
|
sh3el) machine=shl-unknown ;;
|
|
|
|
sh3eb) machine=sh-unknown ;;
|
|
|
|
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
|
|
|
esac
|
|
|
|
# The Operating System including object format, if it has switched
|
|
|
|
# to ELF recently, or will in the future.
|
|
|
|
case "${UNAME_MACHINE_ARCH}" in
|
|
|
|
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
|
|
|
eval $set_cc_for_build
|
|
|
|
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
|
|
|
| grep __ELF__ >/dev/null
|
|
|
|
then
|
|
|
|
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
|
|
|
|
# Return netbsd for either. FIX?
|
|
|
|
os=netbsd
|
|
|
|
else
|
|
|
|
os=netbsdelf
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
os=netbsd
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
# The OS release
|
2007-10-25 17:43:40 -04:00
|
|
|
# Debian GNU/NetBSD machines have a different userland, and
|
|
|
|
# thus, need a distinct triplet. However, they do not need
|
|
|
|
# kernel version information, so it can be replaced with a
|
|
|
|
# suitable tag, in the style of linux-gnu.
|
|
|
|
case "${UNAME_VERSION}" in
|
|
|
|
Debian*)
|
|
|
|
release='-gnu'
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
|
|
|
;;
|
|
|
|
esac
|
2007-10-17 19:59:37 -04:00
|
|
|
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
|
|
|
# contains redundant information, the shorter form:
|
|
|
|
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
|
|
|
echo "${machine}-${os}${release}"
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
*:OpenBSD:*:*)
|
2007-10-25 17:43:40 -04:00
|
|
|
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
|
|
|
|
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
|
|
|
|
exit ;;
|
|
|
|
*:ekkoBSD:*:*)
|
|
|
|
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
|
|
|
exit ;;
|
|
|
|
macppc:MirBSD:*:*)
|
|
|
|
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
|
|
|
|
exit ;;
|
|
|
|
*:MirBSD:*:*)
|
|
|
|
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
alpha:OSF1:*:*)
|
2007-10-25 17:43:40 -04:00
|
|
|
case $UNAME_RELEASE in
|
|
|
|
*4.0)
|
2007-10-17 19:59:37 -04:00
|
|
|
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
2007-10-25 17:43:40 -04:00
|
|
|
;;
|
|
|
|
*5.*)
|
|
|
|
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
# According to Compaq, /usr/sbin/psrinfo has been available on
|
|
|
|
# OSF/1 and Tru64 systems produced since 1995. I hope that
|
|
|
|
# covers most systems running today. This code pipes the CPU
|
|
|
|
# types through head -n 1, so we only detect the type of CPU 0.
|
|
|
|
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
|
|
|
|
case "$ALPHA_CPU_TYPE" in
|
|
|
|
"EV4 (21064)")
|
|
|
|
UNAME_MACHINE="alpha" ;;
|
|
|
|
"EV4.5 (21064)")
|
|
|
|
UNAME_MACHINE="alpha" ;;
|
|
|
|
"LCA4 (21066/21068)")
|
|
|
|
UNAME_MACHINE="alpha" ;;
|
|
|
|
"EV5 (21164)")
|
|
|
|
UNAME_MACHINE="alphaev5" ;;
|
|
|
|
"EV5.6 (21164A)")
|
|
|
|
UNAME_MACHINE="alphaev56" ;;
|
|
|
|
"EV5.6 (21164PC)")
|
|
|
|
UNAME_MACHINE="alphapca56" ;;
|
|
|
|
"EV5.7 (21164PC)")
|
|
|
|
UNAME_MACHINE="alphapca57" ;;
|
|
|
|
"EV6 (21264)")
|
|
|
|
UNAME_MACHINE="alphaev6" ;;
|
|
|
|
"EV6.7 (21264A)")
|
|
|
|
UNAME_MACHINE="alphaev67" ;;
|
|
|
|
"EV6.8CB (21264C)")
|
|
|
|
UNAME_MACHINE="alphaev68" ;;
|
|
|
|
"EV6.8AL (21264B)")
|
|
|
|
UNAME_MACHINE="alphaev68" ;;
|
|
|
|
"EV6.8CX (21264D)")
|
|
|
|
UNAME_MACHINE="alphaev68" ;;
|
|
|
|
"EV6.9A (21264/EV69A)")
|
|
|
|
UNAME_MACHINE="alphaev69" ;;
|
|
|
|
"EV7 (21364)")
|
|
|
|
UNAME_MACHINE="alphaev7" ;;
|
|
|
|
"EV7.9 (21364A)")
|
|
|
|
UNAME_MACHINE="alphaev79" ;;
|
|
|
|
esac
|
|
|
|
# A Pn.n version is a patched version.
|
2007-10-17 19:59:37 -04:00
|
|
|
# A Vn.n version is a released version.
|
|
|
|
# A Tn.n version is a released field test version.
|
|
|
|
# A Xn.n version is an unreleased experimental baselevel.
|
|
|
|
# 1.2 uses "1.2" for uname -r.
|
2007-10-25 17:43:40 -04:00
|
|
|
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
Alpha\ *:Windows_NT*:*)
|
|
|
|
# How do we know it's Interix rather than the generic POSIX subsystem?
|
|
|
|
# Should we change UNAME_MACHINE based on the output of uname instead
|
|
|
|
# of the specific Alpha model?
|
|
|
|
echo alpha-pc-interix
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
21064:Windows_NT:50:3)
|
|
|
|
echo alpha-dec-winnt3.5
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
Amiga*:UNIX_System_V:4.0:*)
|
|
|
|
echo m68k-unknown-sysv4
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
*:[Aa]miga[Oo][Ss]:*:*)
|
|
|
|
echo ${UNAME_MACHINE}-unknown-amigaos
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
*:[Mm]orph[Oo][Ss]:*:*)
|
|
|
|
echo ${UNAME_MACHINE}-unknown-morphos
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
*:OS/390:*:*)
|
|
|
|
echo i370-ibm-openedition
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
|
|
|
*:z/VM:*:*)
|
|
|
|
echo s390-ibm-zvmoe
|
|
|
|
exit ;;
|
|
|
|
*:OS400:*:*)
|
|
|
|
echo powerpc-ibm-os400
|
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
|
|
|
echo arm-acorn-riscix${UNAME_RELEASE}
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
|
|
|
arm:riscos:*:*|arm:RISCOS:*:*)
|
|
|
|
echo arm-unknown-riscos
|
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
|
|
|
|
echo hppa1.1-hitachi-hiuxmpp
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
|
|
|
|
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
|
|
|
|
if test "`(/bin/universe) 2>/dev/null`" = att ; then
|
|
|
|
echo pyramid-pyramid-sysv3
|
|
|
|
else
|
|
|
|
echo pyramid-pyramid-bsd
|
|
|
|
fi
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
NILE*:*:*:dcosx)
|
|
|
|
echo pyramid-pyramid-svr4
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
|
|
|
DRS?6000:unix:4.0:6*)
|
|
|
|
echo sparc-icl-nx6
|
|
|
|
exit ;;
|
|
|
|
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
|
2007-10-17 19:59:37 -04:00
|
|
|
case `/usr/bin/uname -p` in
|
2007-10-25 17:43:40 -04:00
|
|
|
sparc) echo sparc-icl-nx7; exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
esac ;;
|
|
|
|
sun4H:SunOS:5.*:*)
|
|
|
|
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
|
|
|
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
i86pc:SunOS:5.*:*)
|
|
|
|
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
sun4*:SunOS:6*:*)
|
|
|
|
# According to config.sub, this is the proper way to canonicalize
|
|
|
|
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
|
|
|
|
# it's likely to be more like Solaris than SunOS4.
|
|
|
|
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
sun4*:SunOS:*:*)
|
|
|
|
case "`/usr/bin/arch -k`" in
|
|
|
|
Series*|S4*)
|
|
|
|
UNAME_RELEASE=`uname -v`
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
# Japanese Language versions have a version number like `4.1.3-JL'.
|
|
|
|
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
sun3*:SunOS:*:*)
|
|
|
|
echo m68k-sun-sunos${UNAME_RELEASE}
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
sun*:*:4.2BSD:*)
|
|
|
|
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
|
|
|
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
|
|
|
case "`/bin/arch`" in
|
|
|
|
sun3)
|
|
|
|
echo m68k-sun-sunos${UNAME_RELEASE}
|
|
|
|
;;
|
|
|
|
sun4)
|
|
|
|
echo sparc-sun-sunos${UNAME_RELEASE}
|
|
|
|
;;
|
|
|
|
esac
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
aushp:SunOS:*:*)
|
|
|
|
echo sparc-auspex-sunos${UNAME_RELEASE}
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
# The situation for MiNT is a little confusing. The machine name
|
|
|
|
# can be virtually everything (everything which is not
|
|
|
|
# "atarist" or "atariste" at least should have a processor
|
|
|
|
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
|
|
|
|
# to the lowercase version "mint" (or "freemint"). Finally
|
|
|
|
# the system name "TOS" denotes a system which is actually not
|
|
|
|
# MiNT. But MiNT is downward compatible to TOS, so this should
|
|
|
|
# be no problem.
|
|
|
|
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
|
|
|
|
echo m68k-atari-mint${UNAME_RELEASE}
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
|
|
|
|
echo m68k-atari-mint${UNAME_RELEASE}
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
|
|
|
|
echo m68k-atari-mint${UNAME_RELEASE}
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
|
|
|
|
echo m68k-milan-mint${UNAME_RELEASE}
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
|
|
|
|
echo m68k-hades-mint${UNAME_RELEASE}
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
|
|
|
echo m68k-unknown-mint${UNAME_RELEASE}
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
|
|
|
m68k:machten:*:*)
|
|
|
|
echo m68k-apple-machten${UNAME_RELEASE}
|
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
powerpc:machten:*:*)
|
|
|
|
echo powerpc-apple-machten${UNAME_RELEASE}
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
RISC*:Mach:*:*)
|
|
|
|
echo mips-dec-mach_bsd4.3
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
RISC*:ULTRIX:*:*)
|
|
|
|
echo mips-dec-ultrix${UNAME_RELEASE}
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
VAX*:ULTRIX*:*:*)
|
|
|
|
echo vax-dec-ultrix${UNAME_RELEASE}
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
2020:CLIX:*:* | 2430:CLIX:*:*)
|
|
|
|
echo clipper-intergraph-clix${UNAME_RELEASE}
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
mips:*:*:UMIPS | mips:*:*:RISCos)
|
|
|
|
eval $set_cc_for_build
|
|
|
|
sed 's/^ //' << EOF >$dummy.c
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#include <stdio.h> /* for printf() prototype */
|
|
|
|
int main (int argc, char *argv[]) {
|
|
|
|
#else
|
|
|
|
int main (argc, argv) int argc; char *argv[]; {
|
|
|
|
#endif
|
|
|
|
#if defined (host_mips) && defined (MIPSEB)
|
|
|
|
#if defined (SYSTYPE_SYSV)
|
|
|
|
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
|
|
|
|
#endif
|
|
|
|
#if defined (SYSTYPE_SVR4)
|
|
|
|
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
|
|
|
|
#endif
|
|
|
|
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
|
|
|
|
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
exit (-1);
|
|
|
|
}
|
|
|
|
EOF
|
2007-10-25 17:43:40 -04:00
|
|
|
$CC_FOR_BUILD -o $dummy $dummy.c &&
|
|
|
|
dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
|
|
|
|
SYSTEM_NAME=`$dummy $dummyarg` &&
|
|
|
|
{ echo "$SYSTEM_NAME"; exit; }
|
2007-10-17 19:59:37 -04:00
|
|
|
echo mips-mips-riscos${UNAME_RELEASE}
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
Motorola:PowerMAX_OS:*:*)
|
|
|
|
echo powerpc-motorola-powermax
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
|
|
|
Motorola:*:4.3:PL8-*)
|
|
|
|
echo powerpc-harris-powermax
|
|
|
|
exit ;;
|
|
|
|
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
|
2007-10-17 19:59:37 -04:00
|
|
|
echo powerpc-harris-powermax
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
Night_Hawk:Power_UNIX:*:*)
|
|
|
|
echo powerpc-harris-powerunix
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
m88k:CX/UX:7*:*)
|
|
|
|
echo m88k-harris-cxux7
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
m88k:*:4*:R4*)
|
|
|
|
echo m88k-motorola-sysv4
|
2007-10-25 17:43:40 -04:00
|
|
|
exit ;;
|
2007-10-17 19:59:37 -04:00
|
|
|
m88k:*:3*:R3*)
|
|
|
|
echo m88k-motorola-sysv3
|
2007-10-25 17:43:40 -04:00
|
|