osloup / rpms / openjade

Forked from rpms/openjade a year ago
Clone

Blame SOURCES/config.sub

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