Blame config.sub

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