osloup / rpms / openjade

Forked from rpms/openjade a year ago
Clone

Blame SOURCES/config.sub

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