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