Blame ld10k1/config.sub

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