roentgen b75cab
#! /bin/sh
roentgen b75cab
# Configuration validation subroutine script.
roentgen b75cab
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
roentgen b75cab
#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
roentgen b75cab
#   Free Software Foundation, Inc.
roentgen b75cab
roentgen b75cab
timestamp='2008-01-16'
roentgen b75cab
roentgen b75cab
# This file is (in principle) common to ALL GNU software.
roentgen b75cab
# The presence of a machine in this file suggests that SOME GNU software
roentgen b75cab
# can handle that machine.  It does not imply ALL GNU software can.
roentgen b75cab
#
roentgen b75cab
# This file is free software; you can redistribute it and/or modify
roentgen b75cab
# it under the terms of the GNU General Public License as published by
roentgen b75cab
# the Free Software Foundation; either version 2 of the License, or
roentgen b75cab
# (at your option) any later version.
roentgen b75cab
#
roentgen b75cab
# This program is distributed in the hope that it will be useful,
roentgen b75cab
# but WITHOUT ANY WARRANTY; without even the implied warranty of
roentgen b75cab
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
roentgen b75cab
# GNU General Public License for more details.
roentgen b75cab
#
roentgen b75cab
# You should have received a copy of the GNU General Public License
roentgen b75cab
# along with this program; if not, write to the Free Software
roentgen b75cab
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
roentgen b75cab
# 02110-1301, USA.
roentgen b75cab
#
roentgen b75cab
# As a special exception to the GNU General Public License, if you
roentgen b75cab
# distribute this file as part of a program that contains a
roentgen b75cab
# configuration script generated by Autoconf, you may include it under
roentgen b75cab
# the same distribution terms that you use for the rest of that program.
roentgen b75cab
roentgen b75cab
roentgen b75cab
# Please send patches to <config-patches@gnu.org>.  Submit a context</config-patches@gnu.org>
roentgen b75cab
# diff and a properly formatted ChangeLog entry.
roentgen b75cab
#
roentgen b75cab
# Configuration subroutine to validate and canonicalize a configuration type.
roentgen b75cab
# Supply the specified configuration type as an argument.
roentgen b75cab
# If it is invalid, we print an error message on stderr and exit with code 1.
roentgen b75cab
# Otherwise, we print the canonical config type on stdout and succeed.
roentgen b75cab
roentgen b75cab
# This file is supposed to be the same for all GNU packages
roentgen b75cab
# and recognize all the CPU types, system types and aliases
roentgen b75cab
# that are meaningful with *any* GNU software.
roentgen b75cab
# Each package is responsible for reporting which valid configurations
roentgen b75cab
# it does not support.  The user should be able to distinguish
roentgen b75cab
# a failure to support a valid configuration from a meaningless
roentgen b75cab
# configuration.
roentgen b75cab
roentgen b75cab
# The goal of this file is to map all the various variations of a given
roentgen b75cab
# machine specification into a single specification in the form:
roentgen b75cab
#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
roentgen b75cab
# or in some cases, the newer four-part form:
roentgen b75cab
#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
roentgen b75cab
# It is wrong to echo any other type of specification.
roentgen b75cab
roentgen b75cab
me=`echo "$0" | sed -e 's,.*/,,'`
roentgen b75cab
roentgen b75cab
usage="\
roentgen b75cab
Usage: $0 [OPTION] CPU-MFR-OPSYS
roentgen b75cab
       $0 [OPTION] ALIAS
roentgen b75cab
roentgen b75cab
Canonicalize a configuration name.
roentgen b75cab
roentgen b75cab
Operation modes:
roentgen b75cab
  -h, --help         print this help, then exit
roentgen b75cab
  -t, --time-stamp   print date of last modification, then exit
roentgen b75cab
  -v, --version      print version number, then exit
roentgen b75cab
roentgen b75cab
Report bugs and patches to <config-patches@gnu.org>."</config-patches@gnu.org>
roentgen b75cab
roentgen b75cab
version="\
roentgen b75cab
GNU config.sub ($timestamp)
roentgen b75cab
roentgen b75cab
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
roentgen b75cab
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
roentgen b75cab
roentgen b75cab
This is free software; see the source for copying conditions.  There is NO
roentgen b75cab
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
roentgen b75cab
roentgen b75cab
help="
roentgen b75cab
Try \`$me --help' for more information."
roentgen b75cab
roentgen b75cab
# Parse command line
roentgen b75cab
while test $# -gt 0 ; do
roentgen b75cab
  case $1 in
roentgen b75cab
    --time-stamp | --time* | -t )
roentgen b75cab
       echo "$timestamp" ; exit ;;
roentgen b75cab
    --version | -v )
roentgen b75cab
       echo "$version" ; exit ;;
roentgen b75cab
    --help | --h* | -h )
roentgen b75cab
       echo "$usage"; exit ;;
roentgen b75cab
    -- )     # Stop option processing
roentgen b75cab
       shift; break ;;
roentgen b75cab
    - )	# Use stdin as input.
roentgen b75cab
       break ;;
roentgen b75cab
    -* )
roentgen b75cab
       echo "$me: invalid option $1$help"
roentgen b75cab
       exit 1 ;;
roentgen b75cab
roentgen b75cab
    *local*)
roentgen b75cab
       # First pass through any local machine types.
roentgen b75cab
       echo $1
roentgen b75cab
       exit ;;
roentgen b75cab
roentgen b75cab
    * )
roentgen b75cab
       break ;;
roentgen b75cab
  esac
roentgen b75cab
done
roentgen b75cab
roentgen b75cab
case $# in
roentgen b75cab
 0) echo "$me: missing argument$help" >&2
roentgen b75cab
    exit 1;;
roentgen b75cab
 1) ;;
roentgen b75cab
 *) echo "$me: too many arguments$help" >&2
roentgen b75cab
    exit 1;;
roentgen b75cab
esac
roentgen b75cab
roentgen b75cab
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
roentgen b75cab
# Here we must recognize all the valid KERNEL-OS combinations.
roentgen b75cab
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
roentgen b75cab
case $maybe_os in
roentgen b75cab
  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
roentgen b75cab
  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
roentgen b75cab
  storm-chaos* | os2-emx* | rtmk-nova*)
roentgen b75cab
    os=-$maybe_os
roentgen b75cab
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
roentgen b75cab
    ;;
roentgen b75cab
  *)
roentgen b75cab
    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
roentgen b75cab
    if [ $basic_machine != $1 ]
roentgen b75cab
    then os=`echo $1 | sed 's/.*-/-/'`
roentgen b75cab
    else os=; fi
roentgen b75cab
    ;;
roentgen b75cab
esac
roentgen b75cab
roentgen b75cab
### Let's recognize common machines as not being operating systems so
roentgen b75cab
### that things like config.sub decstation-3100 work.  We also
roentgen b75cab
### recognize some manufacturers as not being operating systems, so we
roentgen b75cab
### can provide default operating systems below.
roentgen b75cab
case $os in
roentgen b75cab
	-sun*os*)
roentgen b75cab
		# Prevent following clause from handling this invalid input.
roentgen b75cab
		;;
roentgen b75cab
	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
roentgen b75cab
	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
roentgen b75cab
	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
roentgen b75cab
	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
roentgen b75cab
	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
roentgen b75cab
	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
roentgen b75cab
	-apple | -axis | -knuth | -cray)
roentgen b75cab
		os=
roentgen b75cab
		basic_machine=$1
roentgen b75cab
		;;
roentgen b75cab
	-sim | -cisco | -oki | -wec | -winbond)
roentgen b75cab
		os=
roentgen b75cab
		basic_machine=$1
roentgen b75cab
		;;
roentgen b75cab
	-scout)
roentgen b75cab
		;;
roentgen b75cab
	-wrs)
roentgen b75cab
		os=-vxworks
roentgen b75cab
		basic_machine=$1
roentgen b75cab
		;;
roentgen b75cab
	-chorusos*)
roentgen b75cab
		os=-chorusos
roentgen b75cab
		basic_machine=$1
roentgen b75cab
		;;
roentgen b75cab
 	-chorusrdb)
roentgen b75cab
 		os=-chorusrdb
roentgen b75cab
		basic_machine=$1
roentgen b75cab
 		;;
roentgen b75cab
	-hiux*)
roentgen b75cab
		os=-hiuxwe2
roentgen b75cab
		;;
roentgen b75cab
	-sco6)
roentgen b75cab
		os=-sco5v6
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
roentgen b75cab
		;;
roentgen b75cab
	-sco5)
roentgen b75cab
		os=-sco3.2v5
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
roentgen b75cab
		;;
roentgen b75cab
	-sco4)
roentgen b75cab
		os=-sco3.2v4
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
roentgen b75cab
		;;
roentgen b75cab
	-sco3.2.[4-9]*)
roentgen b75cab
		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
roentgen b75cab
		;;
roentgen b75cab
	-sco3.2v[4-9]*)
roentgen b75cab
		# Don't forget version if it is 3.2v4 or newer.
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
roentgen b75cab
		;;
roentgen b75cab
	-sco5v6*)
roentgen b75cab
		# Don't forget version if it is 3.2v4 or newer.
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
roentgen b75cab
		;;
roentgen b75cab
	-sco*)
roentgen b75cab
		os=-sco3.2v2
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
roentgen b75cab
		;;
roentgen b75cab
	-udk*)
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
roentgen b75cab
		;;
roentgen b75cab
	-isc)
roentgen b75cab
		os=-isc2.2
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
roentgen b75cab
		;;
roentgen b75cab
	-clix*)
roentgen b75cab
		basic_machine=clipper-intergraph
roentgen b75cab
		;;
roentgen b75cab
	-isc*)
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
roentgen b75cab
		;;
roentgen b75cab
	-lynx*)
roentgen b75cab
		os=-lynxos
roentgen b75cab
		;;
roentgen b75cab
	-ptx*)
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
roentgen b75cab
		;;
roentgen b75cab
	-windowsnt*)
roentgen b75cab
		os=`echo $os | sed -e 's/windowsnt/winnt/'`
roentgen b75cab
		;;
roentgen b75cab
	-psos*)
roentgen b75cab
		os=-psos
roentgen b75cab
		;;
roentgen b75cab
	-mint | -mint[0-9]*)
roentgen b75cab
		basic_machine=m68k-atari
roentgen b75cab
		os=-mint
roentgen b75cab
		;;
roentgen b75cab
esac
roentgen b75cab
roentgen b75cab
# Decode aliases for certain CPU-COMPANY combinations.
roentgen b75cab
case $basic_machine in
roentgen b75cab
	# Recognize the basic CPU types without company name.
roentgen b75cab
	# Some are omitted here because they have special meanings below.
roentgen b75cab
	1750a | 580 \
roentgen b75cab
	| a29k \
roentgen b75cab
	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
roentgen b75cab
	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
roentgen b75cab
	| am33_2.0 \
roentgen b75cab
	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
roentgen b75cab
	| bfin \
roentgen b75cab
	| c4x | clipper \
roentgen b75cab
	| d10v | d30v | dlx | dsp16xx \
roentgen b75cab
	| fido | fr30 | frv \
roentgen b75cab
	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
roentgen b75cab
	| i370 | i860 | i960 | ia64 \
roentgen b75cab
	| ip2k | iq2000 \
roentgen b75cab
	| m32c | m32r | m32rle | m68000 | m68k | m88k \
roentgen b75cab
	| maxq | mb | microblaze | mcore | mep \
roentgen b75cab
	| mips | mipsbe | mipseb | mipsel | mipsle \
roentgen b75cab
	| mips16 \
roentgen b75cab
	| mips64 | mips64el \
roentgen b75cab
	| mips64vr | mips64vrel \
roentgen b75cab
	| mips64orion | mips64orionel \
roentgen b75cab
	| mips64vr4100 | mips64vr4100el \
roentgen b75cab
	| mips64vr4300 | mips64vr4300el \
roentgen b75cab
	| mips64vr5000 | mips64vr5000el \
roentgen b75cab
	| mips64vr5900 | mips64vr5900el \
roentgen b75cab
	| mipsisa32 | mipsisa32el \
roentgen b75cab
	| mipsisa32r2 | mipsisa32r2el \
roentgen b75cab
	| mipsisa64 | mipsisa64el \
roentgen b75cab
	| mipsisa64r2 | mipsisa64r2el \
roentgen b75cab
	| mipsisa64sb1 | mipsisa64sb1el \
roentgen b75cab
	| mipsisa64sr71k | mipsisa64sr71kel \
roentgen b75cab
	| mipstx39 | mipstx39el \
roentgen b75cab
	| mn10200 | mn10300 \
roentgen b75cab
	| mt \
roentgen b75cab
	| msp430 \
roentgen b75cab
	| nios | nios2 \
roentgen b75cab
	| ns16k | ns32k \
roentgen b75cab
	| or32 \
roentgen b75cab
	| pdp10 | pdp11 | pj | pjl \
roentgen b75cab
	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
roentgen b75cab
	| pyramid \
roentgen b75cab
	| score \
roentgen b75cab
	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
roentgen b75cab
	| sh64 | sh64le \
roentgen b75cab
	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
roentgen b75cab
	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
roentgen b75cab
	| spu | strongarm \
roentgen b75cab
	| tahoe | thumb | tic4x | tic80 | tron \
roentgen b75cab
	| v850 | v850e \
roentgen b75cab
	| we32k \
roentgen b75cab
	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
roentgen b75cab
	| z8k)
roentgen b75cab
		basic_machine=$basic_machine-unknown
roentgen b75cab
		;;
roentgen b75cab
	m6811 | m68hc11 | m6812 | m68hc12)
roentgen b75cab
		# Motorola 68HC11/12.
roentgen b75cab
		basic_machine=$basic_machine-unknown
roentgen b75cab
		os=-none
roentgen b75cab
		;;
roentgen b75cab
	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
roentgen b75cab
		;;
roentgen b75cab
	ms1)
roentgen b75cab
		basic_machine=mt-unknown
roentgen b75cab
		;;
roentgen b75cab
roentgen b75cab
	# We use `pc' rather than `unknown'
roentgen b75cab
	# because (1) that's what they normally are, and
roentgen b75cab
	# (2) the word "unknown" tends to confuse beginning users.
roentgen b75cab
	i*86 | x86_64)
roentgen b75cab
	  basic_machine=$basic_machine-pc
roentgen b75cab
	  ;;
roentgen b75cab
	# Object if more than one company name word.
roentgen b75cab
	*-*-*)
roentgen b75cab
		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
roentgen b75cab
		exit 1
roentgen b75cab
		;;
roentgen b75cab
	# Recognize the basic CPU types with company name.
roentgen b75cab
	580-* \
roentgen b75cab
	| a29k-* \
roentgen b75cab
	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
roentgen b75cab
	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
roentgen b75cab
	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
roentgen b75cab
	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
roentgen b75cab
	| avr-* | avr32-* \
roentgen b75cab
	| bfin-* | bs2000-* \
roentgen b75cab
	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
roentgen b75cab
	| clipper-* | craynv-* | cydra-* \
roentgen b75cab
	| d10v-* | d30v-* | dlx-* \
roentgen b75cab
	| elxsi-* \
roentgen b75cab
	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
roentgen b75cab
	| h8300-* | h8500-* \
roentgen b75cab
	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
roentgen b75cab
	| i*86-* | i860-* | i960-* | ia64-* \
roentgen b75cab
	| ip2k-* | iq2000-* \
roentgen b75cab
	| m32c-* | m32r-* | m32rle-* \
roentgen b75cab
	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
roentgen b75cab
	| m88110-* | m88k-* | maxq-* | mcore-* \
roentgen b75cab
	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
roentgen b75cab
	| mips16-* \
roentgen b75cab
	| mips64-* | mips64el-* \
roentgen b75cab
	| mips64vr-* | mips64vrel-* \
roentgen b75cab
	| mips64orion-* | mips64orionel-* \
roentgen b75cab
	| mips64vr4100-* | mips64vr4100el-* \
roentgen b75cab
	| mips64vr4300-* | mips64vr4300el-* \
roentgen b75cab
	| mips64vr5000-* | mips64vr5000el-* \
roentgen b75cab
	| mips64vr5900-* | mips64vr5900el-* \
roentgen b75cab
	| mipsisa32-* | mipsisa32el-* \
roentgen b75cab
	| mipsisa32r2-* | mipsisa32r2el-* \
roentgen b75cab
	| mipsisa64-* | mipsisa64el-* \
roentgen b75cab
	| mipsisa64r2-* | mipsisa64r2el-* \
roentgen b75cab
	| mipsisa64sb1-* | mipsisa64sb1el-* \
roentgen b75cab
	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
roentgen b75cab
	| mipstx39-* | mipstx39el-* \
roentgen b75cab
	| mmix-* \
roentgen b75cab
	| mt-* \
roentgen b75cab
	| msp430-* \
roentgen b75cab
	| nios-* | nios2-* \
roentgen b75cab
	| none-* | np1-* | ns16k-* | ns32k-* \
roentgen b75cab
	| orion-* \
roentgen b75cab
	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
roentgen b75cab
	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
roentgen b75cab
	| pyramid-* \
roentgen b75cab
	| romp-* | rs6000-* \
roentgen b75cab
	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
roentgen b75cab
	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
roentgen b75cab
	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
roentgen b75cab
	| sparclite-* \
roentgen b75cab
	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
roentgen b75cab
	| tahoe-* | thumb-* \
roentgen b75cab
	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
roentgen b75cab
	| tron-* \
roentgen b75cab
	| v850-* | v850e-* | vax-* \
roentgen b75cab
	| we32k-* \
roentgen b75cab
	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
roentgen b75cab
	| xstormy16-* | xtensa*-* \
roentgen b75cab
	| ymp-* \
roentgen b75cab
	| z8k-*)
roentgen b75cab
		;;
roentgen b75cab
	# Recognize the basic CPU types without company name, with glob match.
roentgen b75cab
	xtensa*)
roentgen b75cab
		basic_machine=$basic_machine-unknown
roentgen b75cab
		;;
roentgen b75cab
	# Recognize the various machine names and aliases which stand
roentgen b75cab
	# for a CPU type and a company and sometimes even an OS.
roentgen b75cab
	386bsd)
roentgen b75cab
		basic_machine=i386-unknown
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
roentgen b75cab
		basic_machine=m68000-att
roentgen b75cab
		;;
roentgen b75cab
	3b*)
roentgen b75cab
		basic_machine=we32k-att
roentgen b75cab
		;;
roentgen b75cab
	a29khif)
roentgen b75cab
		basic_machine=a29k-amd
roentgen b75cab
		os=-udi
roentgen b75cab
		;;
roentgen b75cab
    	abacus)
roentgen b75cab
		basic_machine=abacus-unknown
roentgen b75cab
		;;
roentgen b75cab
	adobe68k)
roentgen b75cab
		basic_machine=m68010-adobe
roentgen b75cab
		os=-scout
roentgen b75cab
		;;
roentgen b75cab
	alliant | fx80)
roentgen b75cab
		basic_machine=fx80-alliant
roentgen b75cab
		;;
roentgen b75cab
	altos | altos3068)
roentgen b75cab
		basic_machine=m68k-altos
roentgen b75cab
		;;
roentgen b75cab
	am29k)
roentgen b75cab
		basic_machine=a29k-none
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	amd64)
roentgen b75cab
		basic_machine=x86_64-pc
roentgen b75cab
		;;
roentgen b75cab
	amd64-*)
roentgen b75cab
		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
roentgen b75cab
		;;
roentgen b75cab
	amdahl)
roentgen b75cab
		basic_machine=580-amdahl
roentgen b75cab
		os=-sysv
roentgen b75cab
		;;
roentgen b75cab
	amiga | amiga-*)
roentgen b75cab
		basic_machine=m68k-unknown
roentgen b75cab
		;;
roentgen b75cab
	amigaos | amigados)
roentgen b75cab
		basic_machine=m68k-unknown
roentgen b75cab
		os=-amigaos
roentgen b75cab
		;;
roentgen b75cab
	amigaunix | amix)
roentgen b75cab
		basic_machine=m68k-unknown
roentgen b75cab
		os=-sysv4
roentgen b75cab
		;;
roentgen b75cab
	apollo68)
roentgen b75cab
		basic_machine=m68k-apollo
roentgen b75cab
		os=-sysv
roentgen b75cab
		;;
roentgen b75cab
	apollo68bsd)
roentgen b75cab
		basic_machine=m68k-apollo
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	aux)
roentgen b75cab
		basic_machine=m68k-apple
roentgen b75cab
		os=-aux
roentgen b75cab
		;;
roentgen b75cab
	balance)
roentgen b75cab
		basic_machine=ns32k-sequent
roentgen b75cab
		os=-dynix
roentgen b75cab
		;;
roentgen b75cab
	blackfin)
roentgen b75cab
		basic_machine=bfin-unknown
roentgen b75cab
		os=-linux
roentgen b75cab
		;;
roentgen b75cab
	blackfin-*)
roentgen b75cab
		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
roentgen b75cab
		os=-linux
roentgen b75cab
		;;
roentgen b75cab
	c90)
roentgen b75cab
		basic_machine=c90-cray
roentgen b75cab
		os=-unicos
roentgen b75cab
		;;
roentgen b75cab
	convex-c1)
roentgen b75cab
		basic_machine=c1-convex
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	convex-c2)
roentgen b75cab
		basic_machine=c2-convex
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	convex-c32)
roentgen b75cab
		basic_machine=c32-convex
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	convex-c34)
roentgen b75cab
		basic_machine=c34-convex
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	convex-c38)
roentgen b75cab
		basic_machine=c38-convex
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	cray | j90)
roentgen b75cab
		basic_machine=j90-cray
roentgen b75cab
		os=-unicos
roentgen b75cab
		;;
roentgen b75cab
	craynv)
roentgen b75cab
		basic_machine=craynv-cray
roentgen b75cab
		os=-unicosmp
roentgen b75cab
		;;
roentgen b75cab
	cr16)
roentgen b75cab
		basic_machine=cr16-unknown
roentgen b75cab
		os=-elf
roentgen b75cab
		;;
roentgen b75cab
	crds | unos)
roentgen b75cab
		basic_machine=m68k-crds
roentgen b75cab
		;;
roentgen b75cab
	crisv32 | crisv32-* | etraxfs*)
roentgen b75cab
		basic_machine=crisv32-axis
roentgen b75cab
		;;
roentgen b75cab
	cris | cris-* | etrax*)
roentgen b75cab
		basic_machine=cris-axis
roentgen b75cab
		;;
roentgen b75cab
	crx)
roentgen b75cab
		basic_machine=crx-unknown
roentgen b75cab
		os=-elf
roentgen b75cab
		;;
roentgen b75cab
	da30 | da30-*)
roentgen b75cab
		basic_machine=m68k-da30
roentgen b75cab
		;;
roentgen b75cab
	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
roentgen b75cab
		basic_machine=mips-dec
roentgen b75cab
		;;
roentgen b75cab
	decsystem10* | dec10*)
roentgen b75cab
		basic_machine=pdp10-dec
roentgen b75cab
		os=-tops10
roentgen b75cab
		;;
roentgen b75cab
	decsystem20* | dec20*)
roentgen b75cab
		basic_machine=pdp10-dec
roentgen b75cab
		os=-tops20
roentgen b75cab
		;;
roentgen b75cab
	delta | 3300 | motorola-3300 | motorola-delta \
roentgen b75cab
	      | 3300-motorola | delta-motorola)
roentgen b75cab
		basic_machine=m68k-motorola
roentgen b75cab
		;;
roentgen b75cab
	delta88)
roentgen b75cab
		basic_machine=m88k-motorola
roentgen b75cab
		os=-sysv3
roentgen b75cab
		;;
roentgen b75cab
	djgpp)
roentgen b75cab
		basic_machine=i586-pc
roentgen b75cab
		os=-msdosdjgpp
roentgen b75cab
		;;
roentgen b75cab
	dpx20 | dpx20-*)
roentgen b75cab
		basic_machine=rs6000-bull
roentgen b75cab
		os=-bosx
roentgen b75cab
		;;
roentgen b75cab
	dpx2* | dpx2*-bull)
roentgen b75cab
		basic_machine=m68k-bull
roentgen b75cab
		os=-sysv3
roentgen b75cab
		;;
roentgen b75cab
	ebmon29k)
roentgen b75cab
		basic_machine=a29k-amd
roentgen b75cab
		os=-ebmon
roentgen b75cab
		;;
roentgen b75cab
	elxsi)
roentgen b75cab
		basic_machine=elxsi-elxsi
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	encore | umax | mmax)
roentgen b75cab
		basic_machine=ns32k-encore
roentgen b75cab
		;;
roentgen b75cab
	es1800 | OSE68k | ose68k | ose | OSE)
roentgen b75cab
		basic_machine=m68k-ericsson
roentgen b75cab
		os=-ose
roentgen b75cab
		;;
roentgen b75cab
	fx2800)
roentgen b75cab
		basic_machine=i860-alliant
roentgen b75cab
		;;
roentgen b75cab
	genix)
roentgen b75cab
		basic_machine=ns32k-ns
roentgen b75cab
		;;
roentgen b75cab
	gmicro)
roentgen b75cab
		basic_machine=tron-gmicro
roentgen b75cab
		os=-sysv
roentgen b75cab
		;;
roentgen b75cab
	go32)
roentgen b75cab
		basic_machine=i386-pc
roentgen b75cab
		os=-go32
roentgen b75cab
		;;
roentgen b75cab
	h3050r* | hiux*)
roentgen b75cab
		basic_machine=hppa1.1-hitachi
roentgen b75cab
		os=-hiuxwe2
roentgen b75cab
		;;
roentgen b75cab
	h8300hms)
roentgen b75cab
		basic_machine=h8300-hitachi
roentgen b75cab
		os=-hms
roentgen b75cab
		;;
roentgen b75cab
	h8300xray)
roentgen b75cab
		basic_machine=h8300-hitachi
roentgen b75cab
		os=-xray
roentgen b75cab
		;;
roentgen b75cab
	h8500hms)
roentgen b75cab
		basic_machine=h8500-hitachi
roentgen b75cab
		os=-hms
roentgen b75cab
		;;
roentgen b75cab
	harris)
roentgen b75cab
		basic_machine=m88k-harris
roentgen b75cab
		os=-sysv3
roentgen b75cab
		;;
roentgen b75cab
	hp300-*)
roentgen b75cab
		basic_machine=m68k-hp
roentgen b75cab
		;;
roentgen b75cab
	hp300bsd)
roentgen b75cab
		basic_machine=m68k-hp
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	hp300hpux)
roentgen b75cab
		basic_machine=m68k-hp
roentgen b75cab
		os=-hpux
roentgen b75cab
		;;
roentgen b75cab
	hp3k9[0-9][0-9] | hp9[0-9][0-9])
roentgen b75cab
		basic_machine=hppa1.0-hp
roentgen b75cab
		;;
roentgen b75cab
	hp9k2[0-9][0-9] | hp9k31[0-9])
roentgen b75cab
		basic_machine=m68000-hp
roentgen b75cab
		;;
roentgen b75cab
	hp9k3[2-9][0-9])
roentgen b75cab
		basic_machine=m68k-hp
roentgen b75cab
		;;
roentgen b75cab
	hp9k6[0-9][0-9] | hp6[0-9][0-9])
roentgen b75cab
		basic_machine=hppa1.0-hp
roentgen b75cab
		;;
roentgen b75cab
	hp9k7[0-79][0-9] | hp7[0-79][0-9])
roentgen b75cab
		basic_machine=hppa1.1-hp
roentgen b75cab
		;;
roentgen b75cab
	hp9k78[0-9] | hp78[0-9])
roentgen b75cab
		# FIXME: really hppa2.0-hp
roentgen b75cab
		basic_machine=hppa1.1-hp
roentgen b75cab
		;;
roentgen b75cab
	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
roentgen b75cab
		# FIXME: really hppa2.0-hp
roentgen b75cab
		basic_machine=hppa1.1-hp
roentgen b75cab
		;;
roentgen b75cab
	hp9k8[0-9][13679] | hp8[0-9][13679])
roentgen b75cab
		basic_machine=hppa1.1-hp
roentgen b75cab
		;;
roentgen b75cab
	hp9k8[0-9][0-9] | hp8[0-9][0-9])
roentgen b75cab
		basic_machine=hppa1.0-hp
roentgen b75cab
		;;
roentgen b75cab
	hppa-next)
roentgen b75cab
		os=-nextstep3
roentgen b75cab
		;;
roentgen b75cab
	hppaosf)
roentgen b75cab
		basic_machine=hppa1.1-hp
roentgen b75cab
		os=-osf
roentgen b75cab
		;;
roentgen b75cab
	hppro)
roentgen b75cab
		basic_machine=hppa1.1-hp
roentgen b75cab
		os=-proelf
roentgen b75cab
		;;
roentgen b75cab
	i370-ibm* | ibm*)
roentgen b75cab
		basic_machine=i370-ibm
roentgen b75cab
		;;
roentgen b75cab
# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
roentgen b75cab
	i*86v32)
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
roentgen b75cab
		os=-sysv32
roentgen b75cab
		;;
roentgen b75cab
	i*86v4*)
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
roentgen b75cab
		os=-sysv4
roentgen b75cab
		;;
roentgen b75cab
	i*86v)
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
roentgen b75cab
		os=-sysv
roentgen b75cab
		;;
roentgen b75cab
	i*86sol2)
roentgen b75cab
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
roentgen b75cab
		os=-solaris2
roentgen b75cab
		;;
roentgen b75cab
	i386mach)
roentgen b75cab
		basic_machine=i386-mach
roentgen b75cab
		os=-mach
roentgen b75cab
		;;
roentgen b75cab
	i386-vsta | vsta)
roentgen b75cab
		basic_machine=i386-unknown
roentgen b75cab
		os=-vsta
roentgen b75cab
		;;
roentgen b75cab
	iris | iris4d)
roentgen b75cab
		basic_machine=mips-sgi
roentgen b75cab
		case $os in
roentgen b75cab
		    -irix*)
roentgen b75cab
			;;
roentgen b75cab
		    *)
roentgen b75cab
			os=-irix4
roentgen b75cab
			;;
roentgen b75cab
		esac
roentgen b75cab
		;;
roentgen b75cab
	isi68 | isi)
roentgen b75cab
		basic_machine=m68k-isi
roentgen b75cab
		os=-sysv
roentgen b75cab
		;;
roentgen b75cab
	m68knommu)
roentgen b75cab
		basic_machine=m68k-unknown
roentgen b75cab
		os=-linux
roentgen b75cab
		;;
roentgen b75cab
	m68knommu-*)
roentgen b75cab
		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
roentgen b75cab
		os=-linux
roentgen b75cab
		;;
roentgen b75cab
	m88k-omron*)
roentgen b75cab
		basic_machine=m88k-omron
roentgen b75cab
		;;
roentgen b75cab
	magnum | m3230)
roentgen b75cab
		basic_machine=mips-mips
roentgen b75cab
		os=-sysv
roentgen b75cab
		;;
roentgen b75cab
	merlin)
roentgen b75cab
		basic_machine=ns32k-utek
roentgen b75cab
		os=-sysv
roentgen b75cab
		;;
roentgen b75cab
	mingw32)
roentgen b75cab
		basic_machine=i386-pc
roentgen b75cab
		os=-mingw32
roentgen b75cab
		;;
roentgen b75cab
	mingw32ce)
roentgen b75cab
		basic_machine=arm-unknown
roentgen b75cab
		os=-mingw32ce
roentgen b75cab
		;;
roentgen b75cab
	miniframe)
roentgen b75cab
		basic_machine=m68000-convergent
roentgen b75cab
		;;
roentgen b75cab
	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
roentgen b75cab
		basic_machine=m68k-atari
roentgen b75cab
		os=-mint
roentgen b75cab
		;;
roentgen b75cab
	mips3*-*)
roentgen b75cab
		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
roentgen b75cab
		;;
roentgen b75cab
	mips3*)
roentgen b75cab
		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
roentgen b75cab
		;;
roentgen b75cab
	monitor)
roentgen b75cab
		basic_machine=m68k-rom68k
roentgen b75cab
		os=-coff
roentgen b75cab
		;;
roentgen b75cab
	morphos)
roentgen b75cab
		basic_machine=powerpc-unknown
roentgen b75cab
		os=-morphos
roentgen b75cab
		;;
roentgen b75cab
	msdos)
roentgen b75cab
		basic_machine=i386-pc
roentgen b75cab
		os=-msdos
roentgen b75cab
		;;
roentgen b75cab
	ms1-*)
roentgen b75cab
		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
roentgen b75cab
		;;
roentgen b75cab
	mvs)
roentgen b75cab
		basic_machine=i370-ibm
roentgen b75cab
		os=-mvs
roentgen b75cab
		;;
roentgen b75cab
	ncr3000)
roentgen b75cab
		basic_machine=i486-ncr
roentgen b75cab
		os=-sysv4
roentgen b75cab
		;;
roentgen b75cab
	netbsd386)
roentgen b75cab
		basic_machine=i386-unknown
roentgen b75cab
		os=-netbsd
roentgen b75cab
		;;
roentgen b75cab
	netwinder)
roentgen b75cab
		basic_machine=armv4l-rebel
roentgen b75cab
		os=-linux
roentgen b75cab
		;;
roentgen b75cab
	news | news700 | news800 | news900)
roentgen b75cab
		basic_machine=m68k-sony
roentgen b75cab
		os=-newsos
roentgen b75cab
		;;
roentgen b75cab
	news1000)
roentgen b75cab
		basic_machine=m68030-sony
roentgen b75cab
		os=-newsos
roentgen b75cab
		;;
roentgen b75cab
	news-3600 | risc-news)
roentgen b75cab
		basic_machine=mips-sony
roentgen b75cab
		os=-newsos
roentgen b75cab
		;;
roentgen b75cab
	necv70)
roentgen b75cab
		basic_machine=v70-nec
roentgen b75cab
		os=-sysv
roentgen b75cab
		;;
roentgen b75cab
	next | m*-next )
roentgen b75cab
		basic_machine=m68k-next
roentgen b75cab
		case $os in
roentgen b75cab
		    -nextstep* )
roentgen b75cab
			;;
roentgen b75cab
		    -ns2*)
roentgen b75cab
		      os=-nextstep2
roentgen b75cab
			;;
roentgen b75cab
		    *)
roentgen b75cab
		      os=-nextstep3
roentgen b75cab
			;;
roentgen b75cab
		esac
roentgen b75cab
		;;
roentgen b75cab
	nh3000)
roentgen b75cab
		basic_machine=m68k-harris
roentgen b75cab
		os=-cxux
roentgen b75cab
		;;
roentgen b75cab
	nh[45]000)
roentgen b75cab
		basic_machine=m88k-harris
roentgen b75cab
		os=-cxux
roentgen b75cab
		;;
roentgen b75cab
	nindy960)
roentgen b75cab
		basic_machine=i960-intel
roentgen b75cab
		os=-nindy
roentgen b75cab
		;;
roentgen b75cab
	mon960)
roentgen b75cab
		basic_machine=i960-intel
roentgen b75cab
		os=-mon960
roentgen b75cab
		;;
roentgen b75cab
	nonstopux)
roentgen b75cab
		basic_machine=mips-compaq
roentgen b75cab
		os=-nonstopux
roentgen b75cab
		;;
roentgen b75cab
	np1)
roentgen b75cab
		basic_machine=np1-gould
roentgen b75cab
		;;
roentgen b75cab
	nsr-tandem)
roentgen b75cab
		basic_machine=nsr-tandem
roentgen b75cab
		;;
roentgen b75cab
	op50n-* | op60c-*)
roentgen b75cab
		basic_machine=hppa1.1-oki
roentgen b75cab
		os=-proelf
roentgen b75cab
		;;
roentgen b75cab
	openrisc | openrisc-*)
roentgen b75cab
		basic_machine=or32-unknown
roentgen b75cab
		;;
roentgen b75cab
	os400)
roentgen b75cab
		basic_machine=powerpc-ibm
roentgen b75cab
		os=-os400
roentgen b75cab
		;;
roentgen b75cab
	OSE68000 | ose68000)
roentgen b75cab
		basic_machine=m68000-ericsson
roentgen b75cab
		os=-ose
roentgen b75cab
		;;
roentgen b75cab
	os68k)
roentgen b75cab
		basic_machine=m68k-none
roentgen b75cab
		os=-os68k
roentgen b75cab
		;;
roentgen b75cab
	pa-hitachi)
roentgen b75cab
		basic_machine=hppa1.1-hitachi
roentgen b75cab
		os=-hiuxwe2
roentgen b75cab
		;;
roentgen b75cab
	paragon)
roentgen b75cab
		basic_machine=i860-intel
roentgen b75cab
		os=-osf
roentgen b75cab
		;;
roentgen b75cab
	parisc)
roentgen b75cab
		basic_machine=hppa-unknown
roentgen b75cab
		os=-linux
roentgen b75cab
		;;
roentgen b75cab
	parisc-*)
roentgen b75cab
		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
roentgen b75cab
		os=-linux
roentgen b75cab
		;;
roentgen b75cab
	pbd)
roentgen b75cab
		basic_machine=sparc-tti
roentgen b75cab
		;;
roentgen b75cab
	pbb)
roentgen b75cab
		basic_machine=m68k-tti
roentgen b75cab
		;;
roentgen b75cab
	pc532 | pc532-*)
roentgen b75cab
		basic_machine=ns32k-pc532
roentgen b75cab
		;;
roentgen b75cab
	pc98)
roentgen b75cab
		basic_machine=i386-pc
roentgen b75cab
		;;
roentgen b75cab
	pc98-*)
roentgen b75cab
		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
roentgen b75cab
		;;
roentgen b75cab
	pentium | p5 | k5 | k6 | nexgen | viac3)
roentgen b75cab
		basic_machine=i586-pc
roentgen b75cab
		;;
roentgen b75cab
	pentiumpro | p6 | 6x86 | athlon | athlon_*)
roentgen b75cab
		basic_machine=i686-pc
roentgen b75cab
		;;
roentgen b75cab
	pentiumii | pentium2 | pentiumiii | pentium3)
roentgen b75cab
		basic_machine=i686-pc
roentgen b75cab
		;;
roentgen b75cab
	pentium4)
roentgen b75cab
		basic_machine=i786-pc
roentgen b75cab
		;;
roentgen b75cab
	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
roentgen b75cab
		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
roentgen b75cab
		;;
roentgen b75cab
	pentiumpro-* | p6-* | 6x86-* | athlon-*)
roentgen b75cab
		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
roentgen b75cab
		;;
roentgen b75cab
	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
roentgen b75cab
		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
roentgen b75cab
		;;
roentgen b75cab
	pentium4-*)
roentgen b75cab
		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
roentgen b75cab
		;;
roentgen b75cab
	pn)
roentgen b75cab
		basic_machine=pn-gould
roentgen b75cab
		;;
roentgen b75cab
	power)	basic_machine=power-ibm
roentgen b75cab
		;;
roentgen b75cab
	ppc)	basic_machine=powerpc-unknown
roentgen b75cab
		;;
roentgen b75cab
	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
roentgen b75cab
		;;
roentgen b75cab
	ppcle | powerpclittle | ppc-le | powerpc-little)
roentgen b75cab
		basic_machine=powerpcle-unknown
roentgen b75cab
		;;
roentgen b75cab
	ppcle-* | powerpclittle-*)
roentgen b75cab
		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
roentgen b75cab
		;;
roentgen b75cab
	ppc64)	basic_machine=powerpc64-unknown
roentgen b75cab
		;;
roentgen b75cab
	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
roentgen b75cab
		;;
roentgen b75cab
	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
roentgen b75cab
		basic_machine=powerpc64le-unknown
roentgen b75cab
		;;
roentgen b75cab
	ppc64le-* | powerpc64little-*)
roentgen b75cab
		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
roentgen b75cab
		;;
roentgen b75cab
	ps2)
roentgen b75cab
		basic_machine=i386-ibm
roentgen b75cab
		;;
roentgen b75cab
	pw32)
roentgen b75cab
		basic_machine=i586-unknown
roentgen b75cab
		os=-pw32
roentgen b75cab
		;;
roentgen b75cab
	rdos)
roentgen b75cab
		basic_machine=i386-pc
roentgen b75cab
		os=-rdos
roentgen b75cab
		;;
roentgen b75cab
	rom68k)
roentgen b75cab
		basic_machine=m68k-rom68k
roentgen b75cab
		os=-coff
roentgen b75cab
		;;
roentgen b75cab
	rm[46]00)
roentgen b75cab
		basic_machine=mips-siemens
roentgen b75cab
		;;
roentgen b75cab
	rtpc | rtpc-*)
roentgen b75cab
		basic_machine=romp-ibm
roentgen b75cab
		;;
roentgen b75cab
	s390 | s390-*)
roentgen b75cab
		basic_machine=s390-ibm
roentgen b75cab
		;;
roentgen b75cab
	s390x | s390x-*)
roentgen b75cab
		basic_machine=s390x-ibm
roentgen b75cab
		;;
roentgen b75cab
	sa29200)
roentgen b75cab
		basic_machine=a29k-amd
roentgen b75cab
		os=-udi
roentgen b75cab
		;;
roentgen b75cab
	sb1)
roentgen b75cab
		basic_machine=mipsisa64sb1-unknown
roentgen b75cab
		;;
roentgen b75cab
	sb1el)
roentgen b75cab
		basic_machine=mipsisa64sb1el-unknown
roentgen b75cab
		;;
roentgen b75cab
	sde)
roentgen b75cab
		basic_machine=mipsisa32-sde
roentgen b75cab
		os=-elf
roentgen b75cab
		;;
roentgen b75cab
	sei)
roentgen b75cab
		basic_machine=mips-sei
roentgen b75cab
		os=-seiux
roentgen b75cab
		;;
roentgen b75cab
	sequent)
roentgen b75cab
		basic_machine=i386-sequent
roentgen b75cab
		;;
roentgen b75cab
	sh)
roentgen b75cab
		basic_machine=sh-hitachi
roentgen b75cab
		os=-hms
roentgen b75cab
		;;
roentgen b75cab
	sh5el)
roentgen b75cab
		basic_machine=sh5le-unknown
roentgen b75cab
		;;
roentgen b75cab
	sh64)
roentgen b75cab
		basic_machine=sh64-unknown
roentgen b75cab
		;;
roentgen b75cab
	sparclite-wrs | simso-wrs)
roentgen b75cab
		basic_machine=sparclite-wrs
roentgen b75cab
		os=-vxworks
roentgen b75cab
		;;
roentgen b75cab
	sps7)
roentgen b75cab
		basic_machine=m68k-bull
roentgen b75cab
		os=-sysv2
roentgen b75cab
		;;
roentgen b75cab
	spur)
roentgen b75cab
		basic_machine=spur-unknown
roentgen b75cab
		;;
roentgen b75cab
	st2000)
roentgen b75cab
		basic_machine=m68k-tandem
roentgen b75cab
		;;
roentgen b75cab
	stratus)
roentgen b75cab
		basic_machine=i860-stratus
roentgen b75cab
		os=-sysv4
roentgen b75cab
		;;
roentgen b75cab
	sun2)
roentgen b75cab
		basic_machine=m68000-sun
roentgen b75cab
		;;
roentgen b75cab
	sun2os3)
roentgen b75cab
		basic_machine=m68000-sun
roentgen b75cab
		os=-sunos3
roentgen b75cab
		;;
roentgen b75cab
	sun2os4)
roentgen b75cab
		basic_machine=m68000-sun
roentgen b75cab
		os=-sunos4
roentgen b75cab
		;;
roentgen b75cab
	sun3os3)
roentgen b75cab
		basic_machine=m68k-sun
roentgen b75cab
		os=-sunos3
roentgen b75cab
		;;
roentgen b75cab
	sun3os4)
roentgen b75cab
		basic_machine=m68k-sun
roentgen b75cab
		os=-sunos4
roentgen b75cab
		;;
roentgen b75cab
	sun4os3)
roentgen b75cab
		basic_machine=sparc-sun
roentgen b75cab
		os=-sunos3
roentgen b75cab
		;;
roentgen b75cab
	sun4os4)
roentgen b75cab
		basic_machine=sparc-sun
roentgen b75cab
		os=-sunos4
roentgen b75cab
		;;
roentgen b75cab
	sun4sol2)
roentgen b75cab
		basic_machine=sparc-sun
roentgen b75cab
		os=-solaris2
roentgen b75cab
		;;
roentgen b75cab
	sun3 | sun3-*)
roentgen b75cab
		basic_machine=m68k-sun
roentgen b75cab
		;;
roentgen b75cab
	sun4)
roentgen b75cab
		basic_machine=sparc-sun
roentgen b75cab
		;;
roentgen b75cab
	sun386 | sun386i | roadrunner)
roentgen b75cab
		basic_machine=i386-sun
roentgen b75cab
		;;
roentgen b75cab
	sv1)
roentgen b75cab
		basic_machine=sv1-cray
roentgen b75cab
		os=-unicos
roentgen b75cab
		;;
roentgen b75cab
	symmetry)
roentgen b75cab
		basic_machine=i386-sequent
roentgen b75cab
		os=-dynix
roentgen b75cab
		;;
roentgen b75cab
	t3e)
roentgen b75cab
		basic_machine=alphaev5-cray
roentgen b75cab
		os=-unicos
roentgen b75cab
		;;
roentgen b75cab
	t90)
roentgen b75cab
		basic_machine=t90-cray
roentgen b75cab
		os=-unicos
roentgen b75cab
		;;
roentgen b75cab
	tic54x | c54x*)
roentgen b75cab
		basic_machine=tic54x-unknown
roentgen b75cab
		os=-coff
roentgen b75cab
		;;
roentgen b75cab
	tic55x | c55x*)
roentgen b75cab
		basic_machine=tic55x-unknown
roentgen b75cab
		os=-coff
roentgen b75cab
		;;
roentgen b75cab
	tic6x | c6x*)
roentgen b75cab
		basic_machine=tic6x-unknown
roentgen b75cab
		os=-coff
roentgen b75cab
		;;
roentgen b75cab
	tile*)
roentgen b75cab
		basic_machine=tile-unknown
roentgen b75cab
		os=-linux-gnu
roentgen b75cab
		;;
roentgen b75cab
	tx39)
roentgen b75cab
		basic_machine=mipstx39-unknown
roentgen b75cab
		;;
roentgen b75cab
	tx39el)
roentgen b75cab
		basic_machine=mipstx39el-unknown
roentgen b75cab
		;;
roentgen b75cab
	toad1)
roentgen b75cab
		basic_machine=pdp10-xkl
roentgen b75cab
		os=-tops20
roentgen b75cab
		;;
roentgen b75cab
	tower | tower-32)
roentgen b75cab
		basic_machine=m68k-ncr
roentgen b75cab
		;;
roentgen b75cab
	tpf)
roentgen b75cab
		basic_machine=s390x-ibm
roentgen b75cab
		os=-tpf
roentgen b75cab
		;;
roentgen b75cab
	udi29k)
roentgen b75cab
		basic_machine=a29k-amd
roentgen b75cab
		os=-udi
roentgen b75cab
		;;
roentgen b75cab
	ultra3)
roentgen b75cab
		basic_machine=a29k-nyu
roentgen b75cab
		os=-sym1
roentgen b75cab
		;;
roentgen b75cab
	v810 | necv810)
roentgen b75cab
		basic_machine=v810-nec
roentgen b75cab
		os=-none
roentgen b75cab
		;;
roentgen b75cab
	vaxv)
roentgen b75cab
		basic_machine=vax-dec
roentgen b75cab
		os=-sysv
roentgen b75cab
		;;
roentgen b75cab
	vms)
roentgen b75cab
		basic_machine=vax-dec
roentgen b75cab
		os=-vms
roentgen b75cab
		;;
roentgen b75cab
	vpp*|vx|vx-*)
roentgen b75cab
		basic_machine=f301-fujitsu
roentgen b75cab
		;;
roentgen b75cab
	vxworks960)
roentgen b75cab
		basic_machine=i960-wrs
roentgen b75cab
		os=-vxworks
roentgen b75cab
		;;
roentgen b75cab
	vxworks68)
roentgen b75cab
		basic_machine=m68k-wrs
roentgen b75cab
		os=-vxworks
roentgen b75cab
		;;
roentgen b75cab
	vxworks29k)
roentgen b75cab
		basic_machine=a29k-wrs
roentgen b75cab
		os=-vxworks
roentgen b75cab
		;;
roentgen b75cab
	w65*)
roentgen b75cab
		basic_machine=w65-wdc
roentgen b75cab
		os=-none
roentgen b75cab
		;;
roentgen b75cab
	w89k-*)
roentgen b75cab
		basic_machine=hppa1.1-winbond
roentgen b75cab
		os=-proelf
roentgen b75cab
		;;
roentgen b75cab
	xbox)
roentgen b75cab
		basic_machine=i686-pc
roentgen b75cab
		os=-mingw32
roentgen b75cab
		;;
roentgen b75cab
	xps | xps100)
roentgen b75cab
		basic_machine=xps100-honeywell
roentgen b75cab
		;;
roentgen b75cab
	ymp)
roentgen b75cab
		basic_machine=ymp-cray
roentgen b75cab
		os=-unicos
roentgen b75cab
		;;
roentgen b75cab
	z8k-*-coff)
roentgen b75cab
		basic_machine=z8k-unknown
roentgen b75cab
		os=-sim
roentgen b75cab
		;;
roentgen b75cab
	none)
roentgen b75cab
		basic_machine=none-none
roentgen b75cab
		os=-none
roentgen b75cab
		;;
roentgen b75cab
roentgen b75cab
# Here we handle the default manufacturer of certain CPU types.  It is in
roentgen b75cab
# some cases the only manufacturer, in others, it is the most popular.
roentgen b75cab
	w89k)
roentgen b75cab
		basic_machine=hppa1.1-winbond
roentgen b75cab
		;;
roentgen b75cab
	op50n)
roentgen b75cab
		basic_machine=hppa1.1-oki
roentgen b75cab
		;;
roentgen b75cab
	op60c)
roentgen b75cab
		basic_machine=hppa1.1-oki
roentgen b75cab
		;;
roentgen b75cab
	romp)
roentgen b75cab
		basic_machine=romp-ibm
roentgen b75cab
		;;
roentgen b75cab
	mmix)
roentgen b75cab
		basic_machine=mmix-knuth
roentgen b75cab
		;;
roentgen b75cab
	rs6000)
roentgen b75cab
		basic_machine=rs6000-ibm
roentgen b75cab
		;;
roentgen b75cab
	vax)
roentgen b75cab
		basic_machine=vax-dec
roentgen b75cab
		;;
roentgen b75cab
	pdp10)
roentgen b75cab
		# there are many clones, so DEC is not a safe bet
roentgen b75cab
		basic_machine=pdp10-unknown
roentgen b75cab
		;;
roentgen b75cab
	pdp11)
roentgen b75cab
		basic_machine=pdp11-dec
roentgen b75cab
		;;
roentgen b75cab
	we32k)
roentgen b75cab
		basic_machine=we32k-att
roentgen b75cab
		;;
roentgen b75cab
	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
roentgen b75cab
		basic_machine=sh-unknown
roentgen b75cab
		;;
roentgen b75cab
	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
roentgen b75cab
		basic_machine=sparc-sun
roentgen b75cab
		;;
roentgen b75cab
	cydra)
roentgen b75cab
		basic_machine=cydra-cydrome
roentgen b75cab
		;;
roentgen b75cab
	orion)
roentgen b75cab
		basic_machine=orion-highlevel
roentgen b75cab
		;;
roentgen b75cab
	orion105)
roentgen b75cab
		basic_machine=clipper-highlevel
roentgen b75cab
		;;
roentgen b75cab
	mac | mpw | mac-mpw)
roentgen b75cab
		basic_machine=m68k-apple
roentgen b75cab
		;;
roentgen b75cab
	pmac | pmac-mpw)
roentgen b75cab
		basic_machine=powerpc-apple
roentgen b75cab
		;;
roentgen b75cab
	*-unknown)
roentgen b75cab
		# Make sure to match an already-canonicalized machine name.
roentgen b75cab
		;;
roentgen b75cab
	*)
roentgen b75cab
		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
roentgen b75cab
		exit 1
roentgen b75cab
		;;
roentgen b75cab
esac
roentgen b75cab
roentgen b75cab
# Here we canonicalize certain aliases for manufacturers.
roentgen b75cab
case $basic_machine in
roentgen b75cab
	*-digital*)
roentgen b75cab
		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
roentgen b75cab
		;;
roentgen b75cab
	*-commodore*)
roentgen b75cab
		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
roentgen b75cab
		;;
roentgen b75cab
	*)
roentgen b75cab
		;;
roentgen b75cab
esac
roentgen b75cab
roentgen b75cab
# Decode manufacturer-specific aliases for certain operating systems.
roentgen b75cab
roentgen b75cab
if [ x"$os" != x"" ]
roentgen b75cab
then
roentgen b75cab
case $os in
roentgen b75cab
        # First match some system type aliases
roentgen b75cab
        # that might get confused with valid system types.
roentgen b75cab
	# -solaris* is a basic system type, with this one exception.
roentgen b75cab
	-solaris1 | -solaris1.*)
roentgen b75cab
		os=`echo $os | sed -e 's|solaris1|sunos4|'`
roentgen b75cab
		;;
roentgen b75cab
	-solaris)
roentgen b75cab
		os=-solaris2
roentgen b75cab
		;;
roentgen b75cab
	-svr4*)
roentgen b75cab
		os=-sysv4
roentgen b75cab
		;;
roentgen b75cab
	-unixware*)
roentgen b75cab
		os=-sysv4.2uw
roentgen b75cab
		;;
roentgen b75cab
	-gnu/linux*)
roentgen b75cab
		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
roentgen b75cab
		;;
roentgen b75cab
	# First accept the basic system types.
roentgen b75cab
	# The portable systems comes first.
roentgen b75cab
	# Each alternative MUST END IN A *, to match a version number.
roentgen b75cab
	# -sysv* is not here because it comes later, after sysvr4.
roentgen b75cab
	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
roentgen b75cab
	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
roentgen b75cab
	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
roentgen b75cab
	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
roentgen b75cab
	      | -aos* \
roentgen b75cab
	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
roentgen b75cab
	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
roentgen b75cab
	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
roentgen b75cab
	      | -openbsd* | -solidbsd* \
roentgen b75cab
	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
roentgen b75cab
	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
roentgen b75cab
	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
roentgen b75cab
	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
roentgen b75cab
	      | -chorusos* | -chorusrdb* \
roentgen b75cab
	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
roentgen b75cab
	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
roentgen b75cab
	      | -uxpv* | -beos* | -mpeix* | -udk* \
roentgen b75cab
	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
roentgen b75cab
	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
roentgen b75cab
	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
roentgen b75cab
	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
roentgen b75cab
	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
roentgen b75cab
	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
roentgen b75cab
	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
roentgen b75cab
	# Remember, each alternative MUST END IN *, to match a version number.
roentgen b75cab
		;;
roentgen b75cab
	-qnx*)
roentgen b75cab
		case $basic_machine in
roentgen b75cab
		    x86-* | i*86-*)
roentgen b75cab
			;;
roentgen b75cab
		    *)
roentgen b75cab
			os=-nto$os
roentgen b75cab
			;;
roentgen b75cab
		esac
roentgen b75cab
		;;
roentgen b75cab
	-nto-qnx*)
roentgen b75cab
		;;
roentgen b75cab
	-nto*)
roentgen b75cab
		os=`echo $os | sed -e 's|nto|nto-qnx|'`
roentgen b75cab
		;;
roentgen b75cab
	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
roentgen b75cab
	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
roentgen b75cab
	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
roentgen b75cab
		;;
roentgen b75cab
	-mac*)
roentgen b75cab
		os=`echo $os | sed -e 's|mac|macos|'`
roentgen b75cab
		;;
roentgen b75cab
	-linux-dietlibc)
roentgen b75cab
		os=-linux-dietlibc
roentgen b75cab
		;;
roentgen b75cab
	-linux*)
roentgen b75cab
		os=`echo $os | sed -e 's|linux|linux-gnu|'`
roentgen b75cab
		;;
roentgen b75cab
	-sunos5*)
roentgen b75cab
		os=`echo $os | sed -e 's|sunos5|solaris2|'`
roentgen b75cab
		;;
roentgen b75cab
	-sunos6*)
roentgen b75cab
		os=`echo $os | sed -e 's|sunos6|solaris3|'`
roentgen b75cab
		;;
roentgen b75cab
	-opened*)
roentgen b75cab
		os=-openedition
roentgen b75cab
		;;
roentgen b75cab
        -os400*)
roentgen b75cab
		os=-os400
roentgen b75cab
		;;
roentgen b75cab
	-wince*)
roentgen b75cab
		os=-wince
roentgen b75cab
		;;
roentgen b75cab
	-osfrose*)
roentgen b75cab
		os=-osfrose
roentgen b75cab
		;;
roentgen b75cab
	-osf*)
roentgen b75cab
		os=-osf
roentgen b75cab
		;;
roentgen b75cab
	-utek*)
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	-dynix*)
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	-acis*)
roentgen b75cab
		os=-aos
roentgen b75cab
		;;
roentgen b75cab
	-atheos*)
roentgen b75cab
		os=-atheos
roentgen b75cab
		;;
roentgen b75cab
	-syllable*)
roentgen b75cab
		os=-syllable
roentgen b75cab
		;;
roentgen b75cab
	-386bsd)
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	-ctix* | -uts*)
roentgen b75cab
		os=-sysv
roentgen b75cab
		;;
roentgen b75cab
	-nova*)
roentgen b75cab
		os=-rtmk-nova
roentgen b75cab
		;;
roentgen b75cab
	-ns2 )
roentgen b75cab
		os=-nextstep2
roentgen b75cab
		;;
roentgen b75cab
	-nsk*)
roentgen b75cab
		os=-nsk
roentgen b75cab
		;;
roentgen b75cab
	# Preserve the version number of sinix5.
roentgen b75cab
	-sinix5.*)
roentgen b75cab
		os=`echo $os | sed -e 's|sinix|sysv|'`
roentgen b75cab
		;;
roentgen b75cab
	-sinix*)
roentgen b75cab
		os=-sysv4
roentgen b75cab
		;;
roentgen b75cab
        -tpf*)
roentgen b75cab
		os=-tpf
roentgen b75cab
		;;
roentgen b75cab
	-triton*)
roentgen b75cab
		os=-sysv3
roentgen b75cab
		;;
roentgen b75cab
	-oss*)
roentgen b75cab
		os=-sysv3
roentgen b75cab
		;;
roentgen b75cab
	-svr4)
roentgen b75cab
		os=-sysv4
roentgen b75cab
		;;
roentgen b75cab
	-svr3)
roentgen b75cab
		os=-sysv3
roentgen b75cab
		;;
roentgen b75cab
	-sysvr4)
roentgen b75cab
		os=-sysv4
roentgen b75cab
		;;
roentgen b75cab
	# This must come after -sysvr4.
roentgen b75cab
	-sysv*)
roentgen b75cab
		;;
roentgen b75cab
	-ose*)
roentgen b75cab
		os=-ose
roentgen b75cab
		;;
roentgen b75cab
	-es1800*)
roentgen b75cab
		os=-ose
roentgen b75cab
		;;
roentgen b75cab
	-xenix)
roentgen b75cab
		os=-xenix
roentgen b75cab
		;;
roentgen b75cab
	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
roentgen b75cab
		os=-mint
roentgen b75cab
		;;
roentgen b75cab
	-aros*)
roentgen b75cab
		os=-aros
roentgen b75cab
		;;
roentgen b75cab
	-kaos*)
roentgen b75cab
		os=-kaos
roentgen b75cab
		;;
roentgen b75cab
	-zvmoe)
roentgen b75cab
		os=-zvmoe
roentgen b75cab
		;;
roentgen b75cab
	-none)
roentgen b75cab
		;;
roentgen b75cab
	*)
roentgen b75cab
		# Get rid of the `-' at the beginning of $os.
roentgen b75cab
		os=`echo $os | sed 's/[^-]*-//'`
roentgen b75cab
		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
roentgen b75cab
		exit 1
roentgen b75cab
		;;
roentgen b75cab
esac
roentgen b75cab
else
roentgen b75cab
roentgen b75cab
# Here we handle the default operating systems that come with various machines.
roentgen b75cab
# The value should be what the vendor currently ships out the door with their
roentgen b75cab
# machine or put another way, the most popular os provided with the machine.
roentgen b75cab
roentgen b75cab
# Note that if you're going to try to match "-MANUFACTURER" here (say,
roentgen b75cab
# "-sun"), then you have to tell the case statement up towards the top
roentgen b75cab
# that MANUFACTURER isn't an operating system.  Otherwise, code above
roentgen b75cab
# will signal an error saying that MANUFACTURER isn't an operating
roentgen b75cab
# system, and we'll never get to this point.
roentgen b75cab
roentgen b75cab
case $basic_machine in
roentgen b75cab
        score-*)
roentgen b75cab
		os=-elf
roentgen b75cab
		;;
roentgen b75cab
        spu-*)
roentgen b75cab
		os=-elf
roentgen b75cab
		;;
roentgen b75cab
	*-acorn)
roentgen b75cab
		os=-riscix1.2
roentgen b75cab
		;;
roentgen b75cab
	arm*-rebel)
roentgen b75cab
		os=-linux
roentgen b75cab
		;;
roentgen b75cab
	arm*-semi)
roentgen b75cab
		os=-aout
roentgen b75cab
		;;
roentgen b75cab
        c4x-* | tic4x-*)
roentgen b75cab
        	os=-coff
roentgen b75cab
		;;
roentgen b75cab
	# This must come before the *-dec entry.
roentgen b75cab
	pdp10-*)
roentgen b75cab
		os=-tops20
roentgen b75cab
		;;
roentgen b75cab
	pdp11-*)
roentgen b75cab
		os=-none
roentgen b75cab
		;;
roentgen b75cab
	*-dec | vax-*)
roentgen b75cab
		os=-ultrix4.2
roentgen b75cab
		;;
roentgen b75cab
	m68*-apollo)
roentgen b75cab
		os=-domain
roentgen b75cab
		;;
roentgen b75cab
	i386-sun)
roentgen b75cab
		os=-sunos4.0.2
roentgen b75cab
		;;
roentgen b75cab
	m68000-sun)
roentgen b75cab
		os=-sunos3
roentgen b75cab
		# This also exists in the configure program, but was not the
roentgen b75cab
		# default.
roentgen b75cab
		# os=-sunos4
roentgen b75cab
		;;
roentgen b75cab
	m68*-cisco)
roentgen b75cab
		os=-aout
roentgen b75cab
		;;
roentgen b75cab
        mep-*)
roentgen b75cab
		os=-elf
roentgen b75cab
		;;
roentgen b75cab
	mips*-cisco)
roentgen b75cab
		os=-elf
roentgen b75cab
		;;
roentgen b75cab
	mips*-*)
roentgen b75cab
		os=-elf
roentgen b75cab
		;;
roentgen b75cab
	or32-*)
roentgen b75cab
		os=-coff
roentgen b75cab
		;;
roentgen b75cab
	*-tti)	# must be before sparc entry or we get the wrong os.
roentgen b75cab
		os=-sysv3
roentgen b75cab
		;;
roentgen b75cab
	sparc-* | *-sun)
roentgen b75cab
		os=-sunos4.1.1
roentgen b75cab
		;;
roentgen b75cab
	*-be)
roentgen b75cab
		os=-beos
roentgen b75cab
		;;
roentgen b75cab
	*-haiku)
roentgen b75cab
		os=-haiku
roentgen b75cab
		;;
roentgen b75cab
	*-ibm)
roentgen b75cab
		os=-aix
roentgen b75cab
		;;
roentgen b75cab
    	*-knuth)
roentgen b75cab
		os=-mmixware
roentgen b75cab
		;;
roentgen b75cab
	*-wec)
roentgen b75cab
		os=-proelf
roentgen b75cab
		;;
roentgen b75cab
	*-winbond)
roentgen b75cab
		os=-proelf
roentgen b75cab
		;;
roentgen b75cab
	*-oki)
roentgen b75cab
		os=-proelf
roentgen b75cab
		;;
roentgen b75cab
	*-hp)
roentgen b75cab
		os=-hpux
roentgen b75cab
		;;
roentgen b75cab
	*-hitachi)
roentgen b75cab
		os=-hiux
roentgen b75cab
		;;
roentgen b75cab
	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
roentgen b75cab
		os=-sysv
roentgen b75cab
		;;
roentgen b75cab
	*-cbm)
roentgen b75cab
		os=-amigaos
roentgen b75cab
		;;
roentgen b75cab
	*-dg)
roentgen b75cab
		os=-dgux
roentgen b75cab
		;;
roentgen b75cab
	*-dolphin)
roentgen b75cab
		os=-sysv3
roentgen b75cab
		;;
roentgen b75cab
	m68k-ccur)
roentgen b75cab
		os=-rtu
roentgen b75cab
		;;
roentgen b75cab
	m88k-omron*)
roentgen b75cab
		os=-luna
roentgen b75cab
		;;
roentgen b75cab
	*-next )
roentgen b75cab
		os=-nextstep
roentgen b75cab
		;;
roentgen b75cab
	*-sequent)
roentgen b75cab
		os=-ptx
roentgen b75cab
		;;
roentgen b75cab
	*-crds)
roentgen b75cab
		os=-unos
roentgen b75cab
		;;
roentgen b75cab
	*-ns)
roentgen b75cab
		os=-genix
roentgen b75cab
		;;
roentgen b75cab
	i370-*)
roentgen b75cab
		os=-mvs
roentgen b75cab
		;;
roentgen b75cab
	*-next)
roentgen b75cab
		os=-nextstep3
roentgen b75cab
		;;
roentgen b75cab
	*-gould)
roentgen b75cab
		os=-sysv
roentgen b75cab
		;;
roentgen b75cab
	*-highlevel)
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	*-encore)
roentgen b75cab
		os=-bsd
roentgen b75cab
		;;
roentgen b75cab
	*-sgi)
roentgen b75cab
		os=-irix
roentgen b75cab
		;;
roentgen b75cab
	*-siemens)
roentgen b75cab
		os=-sysv4
roentgen b75cab
		;;
roentgen b75cab
	*-masscomp)
roentgen b75cab
		os=-rtu
roentgen b75cab
		;;
roentgen b75cab
	f30[01]-fujitsu | f700-fujitsu)
roentgen b75cab
		os=-uxpv
roentgen b75cab
		;;
roentgen b75cab
	*-rom68k)
roentgen b75cab
		os=-coff
roentgen b75cab
		;;
roentgen b75cab
	*-*bug)
roentgen b75cab
		os=-coff
roentgen b75cab
		;;
roentgen b75cab
	*-apple)
roentgen b75cab
		os=-macos
roentgen b75cab
		;;
roentgen b75cab
	*-atari*)
roentgen b75cab
		os=-mint
roentgen b75cab
		;;
roentgen b75cab
	*)
roentgen b75cab
		os=-none
roentgen b75cab
		;;
roentgen b75cab
esac
roentgen b75cab
fi
roentgen b75cab
roentgen b75cab
# Here we handle the case where we know the os, and the CPU type, but not the
roentgen b75cab
# manufacturer.  We pick the logical manufacturer.
roentgen b75cab
vendor=unknown
roentgen b75cab
case $basic_machine in
roentgen b75cab
	*-unknown)
roentgen b75cab
		case $os in
roentgen b75cab
			-riscix*)
roentgen b75cab
				vendor=acorn
roentgen b75cab
				;;
roentgen b75cab
			-sunos*)
roentgen b75cab
				vendor=sun
roentgen b75cab
				;;
roentgen b75cab
			-aix*)
roentgen b75cab
				vendor=ibm
roentgen b75cab
				;;
roentgen b75cab
			-beos*)
roentgen b75cab
				vendor=be
roentgen b75cab
				;;
roentgen b75cab
			-hpux*)
roentgen b75cab
				vendor=hp
roentgen b75cab
				;;
roentgen b75cab
			-mpeix*)
roentgen b75cab
				vendor=hp
roentgen b75cab
				;;
roentgen b75cab
			-hiux*)
roentgen b75cab
				vendor=hitachi
roentgen b75cab
				;;
roentgen b75cab
			-unos*)
roentgen b75cab
				vendor=crds
roentgen b75cab
				;;
roentgen b75cab
			-dgux*)
roentgen b75cab
				vendor=dg
roentgen b75cab
				;;
roentgen b75cab
			-luna*)
roentgen b75cab
				vendor=omron
roentgen b75cab
				;;
roentgen b75cab
			-genix*)
roentgen b75cab
				vendor=ns
roentgen b75cab
				;;
roentgen b75cab
			-mvs* | -opened*)
roentgen b75cab
				vendor=ibm
roentgen b75cab
				;;
roentgen b75cab
			-os400*)
roentgen b75cab
				vendor=ibm
roentgen b75cab
				;;
roentgen b75cab
			-ptx*)
roentgen b75cab
				vendor=sequent
roentgen b75cab
				;;
roentgen b75cab
			-tpf*)
roentgen b75cab
				vendor=ibm
roentgen b75cab
				;;
roentgen b75cab
			-vxsim* | -vxworks* | -windiss*)
roentgen b75cab
				vendor=wrs
roentgen b75cab
				;;
roentgen b75cab
			-aux*)
roentgen b75cab
				vendor=apple
roentgen b75cab
				;;
roentgen b75cab
			-hms*)
roentgen b75cab
				vendor=hitachi
roentgen b75cab
				;;
roentgen b75cab
			-mpw* | -macos*)
roentgen b75cab
				vendor=apple
roentgen b75cab
				;;
roentgen b75cab
			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
roentgen b75cab
				vendor=atari
roentgen b75cab
				;;
roentgen b75cab
			-vos*)
roentgen b75cab
				vendor=stratus
roentgen b75cab
				;;
roentgen b75cab
		esac
roentgen b75cab
		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
roentgen b75cab
		;;
roentgen b75cab
esac
roentgen b75cab
roentgen b75cab
echo $basic_machine$os
roentgen b75cab
exit
roentgen b75cab
roentgen b75cab
# Local variables:
roentgen b75cab
# eval: (add-hook 'write-file-hooks 'time-stamp)
roentgen b75cab
# time-stamp-start: "timestamp='"
roentgen b75cab
# time-stamp-format: "%:y-%02m-%02d"
roentgen b75cab
# time-stamp-end: "'"
roentgen b75cab
# End: