config.sub revision 16fd1166
16df26cacSmrg#! /bin/sh
26df26cacSmrg# Configuration validation subroutine script.
36df26cacSmrg#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
46df26cacSmrg#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
56df26cacSmrg#   Inc.
66df26cacSmrg
716fd1166Smrgtimestamp='2007-04-29'
86df26cacSmrg
96df26cacSmrg# This file is (in principle) common to ALL GNU software.
106df26cacSmrg# The presence of a machine in this file suggests that SOME GNU software
116df26cacSmrg# can handle that machine.  It does not imply ALL GNU software can.
126df26cacSmrg#
136df26cacSmrg# This file is free software; you can redistribute it and/or modify
146df26cacSmrg# it under the terms of the GNU General Public License as published by
156df26cacSmrg# the Free Software Foundation; either version 2 of the License, or
166df26cacSmrg# (at your option) any later version.
176df26cacSmrg#
186df26cacSmrg# This program is distributed in the hope that it will be useful,
196df26cacSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
206df26cacSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
216df26cacSmrg# GNU General Public License for more details.
226df26cacSmrg#
236df26cacSmrg# You should have received a copy of the GNU General Public License
246df26cacSmrg# along with this program; if not, write to the Free Software
256df26cacSmrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
266df26cacSmrg# 02110-1301, USA.
276df26cacSmrg#
286df26cacSmrg# As a special exception to the GNU General Public License, if you
296df26cacSmrg# distribute this file as part of a program that contains a
306df26cacSmrg# configuration script generated by Autoconf, you may include it under
316df26cacSmrg# the same distribution terms that you use for the rest of that program.
326df26cacSmrg
336df26cacSmrg
346df26cacSmrg# Please send patches to <config-patches@gnu.org>.  Submit a context
356df26cacSmrg# diff and a properly formatted ChangeLog entry.
366df26cacSmrg#
376df26cacSmrg# Configuration subroutine to validate and canonicalize a configuration type.
386df26cacSmrg# Supply the specified configuration type as an argument.
396df26cacSmrg# If it is invalid, we print an error message on stderr and exit with code 1.
406df26cacSmrg# Otherwise, we print the canonical config type on stdout and succeed.
416df26cacSmrg
426df26cacSmrg# This file is supposed to be the same for all GNU packages
436df26cacSmrg# and recognize all the CPU types, system types and aliases
446df26cacSmrg# that are meaningful with *any* GNU software.
456df26cacSmrg# Each package is responsible for reporting which valid configurations
466df26cacSmrg# it does not support.  The user should be able to distinguish
476df26cacSmrg# a failure to support a valid configuration from a meaningless
486df26cacSmrg# configuration.
496df26cacSmrg
506df26cacSmrg# The goal of this file is to map all the various variations of a given
516df26cacSmrg# machine specification into a single specification in the form:
526df26cacSmrg#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
536df26cacSmrg# or in some cases, the newer four-part form:
546df26cacSmrg#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
556df26cacSmrg# It is wrong to echo any other type of specification.
566df26cacSmrg
576df26cacSmrgme=`echo "$0" | sed -e 's,.*/,,'`
586df26cacSmrg
596df26cacSmrgusage="\
606df26cacSmrgUsage: $0 [OPTION] CPU-MFR-OPSYS
616df26cacSmrg       $0 [OPTION] ALIAS
626df26cacSmrg
636df26cacSmrgCanonicalize a configuration name.
646df26cacSmrg
656df26cacSmrgOperation modes:
666df26cacSmrg  -h, --help         print this help, then exit
676df26cacSmrg  -t, --time-stamp   print date of last modification, then exit
686df26cacSmrg  -v, --version      print version number, then exit
696df26cacSmrg
706df26cacSmrgReport bugs and patches to <config-patches@gnu.org>."
716df26cacSmrg
726df26cacSmrgversion="\
736df26cacSmrgGNU config.sub ($timestamp)
746df26cacSmrg
756df26cacSmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
766df26cacSmrgFree Software Foundation, Inc.
776df26cacSmrg
786df26cacSmrgThis is free software; see the source for copying conditions.  There is NO
796df26cacSmrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
806df26cacSmrg
816df26cacSmrghelp="
826df26cacSmrgTry \`$me --help' for more information."
836df26cacSmrg
846df26cacSmrg# Parse command line
856df26cacSmrgwhile test $# -gt 0 ; do
866df26cacSmrg  case $1 in
876df26cacSmrg    --time-stamp | --time* | -t )
886df26cacSmrg       echo "$timestamp" ; exit ;;
896df26cacSmrg    --version | -v )
906df26cacSmrg       echo "$version" ; exit ;;
916df26cacSmrg    --help | --h* | -h )
926df26cacSmrg       echo "$usage"; exit ;;
936df26cacSmrg    -- )     # Stop option processing
946df26cacSmrg       shift; break ;;
956df26cacSmrg    - )	# Use stdin as input.
966df26cacSmrg       break ;;
976df26cacSmrg    -* )
986df26cacSmrg       echo "$me: invalid option $1$help"
996df26cacSmrg       exit 1 ;;
1006df26cacSmrg
1016df26cacSmrg    *local*)
1026df26cacSmrg       # First pass through any local machine types.
1036df26cacSmrg       echo $1
1046df26cacSmrg       exit ;;
1056df26cacSmrg
1066df26cacSmrg    * )
1076df26cacSmrg       break ;;
1086df26cacSmrg  esac
1096df26cacSmrgdone
1106df26cacSmrg
1116df26cacSmrgcase $# in
1126df26cacSmrg 0) echo "$me: missing argument$help" >&2
1136df26cacSmrg    exit 1;;
1146df26cacSmrg 1) ;;
1156df26cacSmrg *) echo "$me: too many arguments$help" >&2
1166df26cacSmrg    exit 1;;
1176df26cacSmrgesac
1186df26cacSmrg
1196df26cacSmrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
1206df26cacSmrg# Here we must recognize all the valid KERNEL-OS combinations.
1216df26cacSmrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
1226df26cacSmrgcase $maybe_os in
1236df26cacSmrg  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
1246df26cacSmrg  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
1256df26cacSmrg  storm-chaos* | os2-emx* | rtmk-nova*)
1266df26cacSmrg    os=-$maybe_os
1276df26cacSmrg    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
1286df26cacSmrg    ;;
1296df26cacSmrg  *)
1306df26cacSmrg    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
1316df26cacSmrg    if [ $basic_machine != $1 ]
1326df26cacSmrg    then os=`echo $1 | sed 's/.*-/-/'`
1336df26cacSmrg    else os=; fi
1346df26cacSmrg    ;;
1356df26cacSmrgesac
1366df26cacSmrg
1376df26cacSmrg### Let's recognize common machines as not being operating systems so
1386df26cacSmrg### that things like config.sub decstation-3100 work.  We also
1396df26cacSmrg### recognize some manufacturers as not being operating systems, so we
1406df26cacSmrg### can provide default operating systems below.
1416df26cacSmrgcase $os in
1426df26cacSmrg	-sun*os*)
1436df26cacSmrg		# Prevent following clause from handling this invalid input.
1446df26cacSmrg		;;
1456df26cacSmrg	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
1466df26cacSmrg	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
1476df26cacSmrg	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
1486df26cacSmrg	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
1496df26cacSmrg	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
1506df26cacSmrg	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
1516df26cacSmrg	-apple | -axis | -knuth | -cray)
1526df26cacSmrg		os=
1536df26cacSmrg		basic_machine=$1
1546df26cacSmrg		;;
1556df26cacSmrg	-sim | -cisco | -oki | -wec | -winbond)
1566df26cacSmrg		os=
1576df26cacSmrg		basic_machine=$1
1586df26cacSmrg		;;
1596df26cacSmrg	-scout)
1606df26cacSmrg		;;
1616df26cacSmrg	-wrs)
1626df26cacSmrg		os=-vxworks
1636df26cacSmrg		basic_machine=$1
1646df26cacSmrg		;;
1656df26cacSmrg	-chorusos*)
1666df26cacSmrg		os=-chorusos
1676df26cacSmrg		basic_machine=$1
1686df26cacSmrg		;;
1696df26cacSmrg 	-chorusrdb)
1706df26cacSmrg 		os=-chorusrdb
1716df26cacSmrg		basic_machine=$1
1726df26cacSmrg 		;;
1736df26cacSmrg	-hiux*)
1746df26cacSmrg		os=-hiuxwe2
1756df26cacSmrg		;;
1766df26cacSmrg	-sco6)
1776df26cacSmrg		os=-sco5v6
1786df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1796df26cacSmrg		;;
1806df26cacSmrg	-sco5)
1816df26cacSmrg		os=-sco3.2v5
1826df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1836df26cacSmrg		;;
1846df26cacSmrg	-sco4)
1856df26cacSmrg		os=-sco3.2v4
1866df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1876df26cacSmrg		;;
1886df26cacSmrg	-sco3.2.[4-9]*)
1896df26cacSmrg		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
1906df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1916df26cacSmrg		;;
1926df26cacSmrg	-sco3.2v[4-9]*)
1936df26cacSmrg		# Don't forget version if it is 3.2v4 or newer.
1946df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1956df26cacSmrg		;;
1966df26cacSmrg	-sco5v6*)
1976df26cacSmrg		# Don't forget version if it is 3.2v4 or newer.
1986df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
1996df26cacSmrg		;;
2006df26cacSmrg	-sco*)
2016df26cacSmrg		os=-sco3.2v2
2026df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2036df26cacSmrg		;;
2046df26cacSmrg	-udk*)
2056df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2066df26cacSmrg		;;
2076df26cacSmrg	-isc)
2086df26cacSmrg		os=-isc2.2
2096df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2106df26cacSmrg		;;
2116df26cacSmrg	-clix*)
2126df26cacSmrg		basic_machine=clipper-intergraph
2136df26cacSmrg		;;
2146df26cacSmrg	-isc*)
2156df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
2166df26cacSmrg		;;
2176df26cacSmrg	-lynx*)
2186df26cacSmrg		os=-lynxos
2196df26cacSmrg		;;
2206df26cacSmrg	-ptx*)
2216df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
2226df26cacSmrg		;;
2236df26cacSmrg	-windowsnt*)
2246df26cacSmrg		os=`echo $os | sed -e 's/windowsnt/winnt/'`
2256df26cacSmrg		;;
2266df26cacSmrg	-psos*)
2276df26cacSmrg		os=-psos
2286df26cacSmrg		;;
2296df26cacSmrg	-mint | -mint[0-9]*)
2306df26cacSmrg		basic_machine=m68k-atari
2316df26cacSmrg		os=-mint
2326df26cacSmrg		;;
2336df26cacSmrgesac
2346df26cacSmrg
2356df26cacSmrg# Decode aliases for certain CPU-COMPANY combinations.
2366df26cacSmrgcase $basic_machine in
2376df26cacSmrg	# Recognize the basic CPU types without company name.
2386df26cacSmrg	# Some are omitted here because they have special meanings below.
2396df26cacSmrg	1750a | 580 \
2406df26cacSmrg	| a29k \
2416df26cacSmrg	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
2426df26cacSmrg	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
2436df26cacSmrg	| am33_2.0 \
2446df26cacSmrg	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
2456df26cacSmrg	| bfin \
2466df26cacSmrg	| c4x | clipper \
2476df26cacSmrg	| d10v | d30v | dlx | dsp16xx \
24816fd1166Smrg	| fido | fr30 | frv \
2496df26cacSmrg	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
2506df26cacSmrg	| i370 | i860 | i960 | ia64 \
2516df26cacSmrg	| ip2k | iq2000 \
2526df26cacSmrg	| m32c | m32r | m32rle | m68000 | m68k | m88k \
25316fd1166Smrg	| maxq | mb | microblaze | mcore | mep \
2546df26cacSmrg	| mips | mipsbe | mipseb | mipsel | mipsle \
2556df26cacSmrg	| mips16 \
2566df26cacSmrg	| mips64 | mips64el \
2576df26cacSmrg	| mips64vr | mips64vrel \
2586df26cacSmrg	| mips64orion | mips64orionel \
2596df26cacSmrg	| mips64vr4100 | mips64vr4100el \
2606df26cacSmrg	| mips64vr4300 | mips64vr4300el \
2616df26cacSmrg	| mips64vr5000 | mips64vr5000el \
2626df26cacSmrg	| mips64vr5900 | mips64vr5900el \
2636df26cacSmrg	| mipsisa32 | mipsisa32el \
2646df26cacSmrg	| mipsisa32r2 | mipsisa32r2el \
2656df26cacSmrg	| mipsisa64 | mipsisa64el \
2666df26cacSmrg	| mipsisa64r2 | mipsisa64r2el \
2676df26cacSmrg	| mipsisa64sb1 | mipsisa64sb1el \
2686df26cacSmrg	| mipsisa64sr71k | mipsisa64sr71kel \
2696df26cacSmrg	| mipstx39 | mipstx39el \
2706df26cacSmrg	| mn10200 | mn10300 \
2716df26cacSmrg	| mt \
2726df26cacSmrg	| msp430 \
2736df26cacSmrg	| nios | nios2 \
2746df26cacSmrg	| ns16k | ns32k \
2756df26cacSmrg	| or32 \
2766df26cacSmrg	| pdp10 | pdp11 | pj | pjl \
2776df26cacSmrg	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
2786df26cacSmrg	| pyramid \
2796df26cacSmrg	| score \
2806df26cacSmrg	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
2816df26cacSmrg	| sh64 | sh64le \
2826df26cacSmrg	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
2836df26cacSmrg	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
2846df26cacSmrg	| spu | strongarm \
2856df26cacSmrg	| tahoe | thumb | tic4x | tic80 | tron \
2866df26cacSmrg	| v850 | v850e \
2876df26cacSmrg	| we32k \
2886df26cacSmrg	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
2896df26cacSmrg	| z8k)
2906df26cacSmrg		basic_machine=$basic_machine-unknown
2916df26cacSmrg		;;
2926df26cacSmrg	m6811 | m68hc11 | m6812 | m68hc12)
2936df26cacSmrg		# Motorola 68HC11/12.
2946df26cacSmrg		basic_machine=$basic_machine-unknown
2956df26cacSmrg		os=-none
2966df26cacSmrg		;;
2976df26cacSmrg	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
2986df26cacSmrg		;;
2996df26cacSmrg	ms1)
3006df26cacSmrg		basic_machine=mt-unknown
3016df26cacSmrg		;;
3026df26cacSmrg
3036df26cacSmrg	# We use `pc' rather than `unknown'
3046df26cacSmrg	# because (1) that's what they normally are, and
3056df26cacSmrg	# (2) the word "unknown" tends to confuse beginning users.
3066df26cacSmrg	i*86 | x86_64)
3076df26cacSmrg	  basic_machine=$basic_machine-pc
3086df26cacSmrg	  ;;
3096df26cacSmrg	# Object if more than one company name word.
3106df26cacSmrg	*-*-*)
3116df26cacSmrg		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
3126df26cacSmrg		exit 1
3136df26cacSmrg		;;
3146df26cacSmrg	# Recognize the basic CPU types with company name.
3156df26cacSmrg	580-* \
3166df26cacSmrg	| a29k-* \
3176df26cacSmrg	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
3186df26cacSmrg	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
3196df26cacSmrg	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
3206df26cacSmrg	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
3216df26cacSmrg	| avr-* | avr32-* \
3226df26cacSmrg	| bfin-* | bs2000-* \
3236df26cacSmrg	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
3246df26cacSmrg	| clipper-* | craynv-* | cydra-* \
3256df26cacSmrg	| d10v-* | d30v-* | dlx-* \
3266df26cacSmrg	| elxsi-* \
32716fd1166Smrg	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
3286df26cacSmrg	| h8300-* | h8500-* \
3296df26cacSmrg	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
3306df26cacSmrg	| i*86-* | i860-* | i960-* | ia64-* \
3316df26cacSmrg	| ip2k-* | iq2000-* \
3326df26cacSmrg	| m32c-* | m32r-* | m32rle-* \
3336df26cacSmrg	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
3346df26cacSmrg	| m88110-* | m88k-* | maxq-* | mcore-* \
3356df26cacSmrg	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
3366df26cacSmrg	| mips16-* \
3376df26cacSmrg	| mips64-* | mips64el-* \
3386df26cacSmrg	| mips64vr-* | mips64vrel-* \
3396df26cacSmrg	| mips64orion-* | mips64orionel-* \
3406df26cacSmrg	| mips64vr4100-* | mips64vr4100el-* \
3416df26cacSmrg	| mips64vr4300-* | mips64vr4300el-* \
3426df26cacSmrg	| mips64vr5000-* | mips64vr5000el-* \
3436df26cacSmrg	| mips64vr5900-* | mips64vr5900el-* \
3446df26cacSmrg	| mipsisa32-* | mipsisa32el-* \
3456df26cacSmrg	| mipsisa32r2-* | mipsisa32r2el-* \
3466df26cacSmrg	| mipsisa64-* | mipsisa64el-* \
3476df26cacSmrg	| mipsisa64r2-* | mipsisa64r2el-* \
3486df26cacSmrg	| mipsisa64sb1-* | mipsisa64sb1el-* \
3496df26cacSmrg	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
3506df26cacSmrg	| mipstx39-* | mipstx39el-* \
3516df26cacSmrg	| mmix-* \
3526df26cacSmrg	| mt-* \
3536df26cacSmrg	| msp430-* \
3546df26cacSmrg	| nios-* | nios2-* \
3556df26cacSmrg	| none-* | np1-* | ns16k-* | ns32k-* \
3566df26cacSmrg	| orion-* \
3576df26cacSmrg	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
3586df26cacSmrg	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
3596df26cacSmrg	| pyramid-* \
3606df26cacSmrg	| romp-* | rs6000-* \
3616df26cacSmrg	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
3626df26cacSmrg	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
3636df26cacSmrg	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
3646df26cacSmrg	| sparclite-* \
3656df26cacSmrg	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
3666df26cacSmrg	| tahoe-* | thumb-* \
3676df26cacSmrg	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
3686df26cacSmrg	| tron-* \
3696df26cacSmrg	| v850-* | v850e-* | vax-* \
3706df26cacSmrg	| we32k-* \
3716df26cacSmrg	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
3726df26cacSmrg	| xstormy16-* | xtensa-* \
3736df26cacSmrg	| ymp-* \
3746df26cacSmrg	| z8k-*)
3756df26cacSmrg		;;
3766df26cacSmrg	# Recognize the various machine names and aliases which stand
3776df26cacSmrg	# for a CPU type and a company and sometimes even an OS.
3786df26cacSmrg	386bsd)
3796df26cacSmrg		basic_machine=i386-unknown
3806df26cacSmrg		os=-bsd
3816df26cacSmrg		;;
3826df26cacSmrg	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
3836df26cacSmrg		basic_machine=m68000-att
3846df26cacSmrg		;;
3856df26cacSmrg	3b*)
3866df26cacSmrg		basic_machine=we32k-att
3876df26cacSmrg		;;
3886df26cacSmrg	a29khif)
3896df26cacSmrg		basic_machine=a29k-amd
3906df26cacSmrg		os=-udi
3916df26cacSmrg		;;
3926df26cacSmrg    	abacus)
3936df26cacSmrg		basic_machine=abacus-unknown
3946df26cacSmrg		;;
3956df26cacSmrg	adobe68k)
3966df26cacSmrg		basic_machine=m68010-adobe
3976df26cacSmrg		os=-scout
3986df26cacSmrg		;;
3996df26cacSmrg	alliant | fx80)
4006df26cacSmrg		basic_machine=fx80-alliant
4016df26cacSmrg		;;
4026df26cacSmrg	altos | altos3068)
4036df26cacSmrg		basic_machine=m68k-altos
4046df26cacSmrg		;;
4056df26cacSmrg	am29k)
4066df26cacSmrg		basic_machine=a29k-none
4076df26cacSmrg		os=-bsd
4086df26cacSmrg		;;
4096df26cacSmrg	amd64)
4106df26cacSmrg		basic_machine=x86_64-pc
4116df26cacSmrg		;;
4126df26cacSmrg	amd64-*)
4136df26cacSmrg		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
4146df26cacSmrg		;;
4156df26cacSmrg	amdahl)
4166df26cacSmrg		basic_machine=580-amdahl
4176df26cacSmrg		os=-sysv
4186df26cacSmrg		;;
4196df26cacSmrg	amiga | amiga-*)
4206df26cacSmrg		basic_machine=m68k-unknown
4216df26cacSmrg		;;
4226df26cacSmrg	amigaos | amigados)
4236df26cacSmrg		basic_machine=m68k-unknown
4246df26cacSmrg		os=-amigaos
4256df26cacSmrg		;;
4266df26cacSmrg	amigaunix | amix)
4276df26cacSmrg		basic_machine=m68k-unknown
4286df26cacSmrg		os=-sysv4
4296df26cacSmrg		;;
4306df26cacSmrg	apollo68)
4316df26cacSmrg		basic_machine=m68k-apollo
4326df26cacSmrg		os=-sysv
4336df26cacSmrg		;;
4346df26cacSmrg	apollo68bsd)
4356df26cacSmrg		basic_machine=m68k-apollo
4366df26cacSmrg		os=-bsd
4376df26cacSmrg		;;
4386df26cacSmrg	aux)
4396df26cacSmrg		basic_machine=m68k-apple
4406df26cacSmrg		os=-aux
4416df26cacSmrg		;;
4426df26cacSmrg	balance)
4436df26cacSmrg		basic_machine=ns32k-sequent
4446df26cacSmrg		os=-dynix
4456df26cacSmrg		;;
4466df26cacSmrg	c90)
4476df26cacSmrg		basic_machine=c90-cray
4486df26cacSmrg		os=-unicos
4496df26cacSmrg		;;
4506df26cacSmrg	convex-c1)
4516df26cacSmrg		basic_machine=c1-convex
4526df26cacSmrg		os=-bsd
4536df26cacSmrg		;;
4546df26cacSmrg	convex-c2)
4556df26cacSmrg		basic_machine=c2-convex
4566df26cacSmrg		os=-bsd
4576df26cacSmrg		;;
4586df26cacSmrg	convex-c32)
4596df26cacSmrg		basic_machine=c32-convex
4606df26cacSmrg		os=-bsd
4616df26cacSmrg		;;
4626df26cacSmrg	convex-c34)
4636df26cacSmrg		basic_machine=c34-convex
4646df26cacSmrg		os=-bsd
4656df26cacSmrg		;;
4666df26cacSmrg	convex-c38)
4676df26cacSmrg		basic_machine=c38-convex
4686df26cacSmrg		os=-bsd
4696df26cacSmrg		;;
4706df26cacSmrg	cray | j90)
4716df26cacSmrg		basic_machine=j90-cray
4726df26cacSmrg		os=-unicos
4736df26cacSmrg		;;
4746df26cacSmrg	craynv)
4756df26cacSmrg		basic_machine=craynv-cray
4766df26cacSmrg		os=-unicosmp
4776df26cacSmrg		;;
4786df26cacSmrg	cr16c)
4796df26cacSmrg		basic_machine=cr16c-unknown
4806df26cacSmrg		os=-elf
4816df26cacSmrg		;;
4826df26cacSmrg	crds | unos)
4836df26cacSmrg		basic_machine=m68k-crds
4846df26cacSmrg		;;
4856df26cacSmrg	crisv32 | crisv32-* | etraxfs*)
4866df26cacSmrg		basic_machine=crisv32-axis
4876df26cacSmrg		;;
4886df26cacSmrg	cris | cris-* | etrax*)
4896df26cacSmrg		basic_machine=cris-axis
4906df26cacSmrg		;;
4916df26cacSmrg	crx)
4926df26cacSmrg		basic_machine=crx-unknown
4936df26cacSmrg		os=-elf
4946df26cacSmrg		;;
4956df26cacSmrg	da30 | da30-*)
4966df26cacSmrg		basic_machine=m68k-da30
4976df26cacSmrg		;;
4986df26cacSmrg	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
4996df26cacSmrg		basic_machine=mips-dec
5006df26cacSmrg		;;
5016df26cacSmrg	decsystem10* | dec10*)
5026df26cacSmrg		basic_machine=pdp10-dec
5036df26cacSmrg		os=-tops10
5046df26cacSmrg		;;
5056df26cacSmrg	decsystem20* | dec20*)
5066df26cacSmrg		basic_machine=pdp10-dec
5076df26cacSmrg		os=-tops20
5086df26cacSmrg		;;
5096df26cacSmrg	delta | 3300 | motorola-3300 | motorola-delta \
5106df26cacSmrg	      | 3300-motorola | delta-motorola)
5116df26cacSmrg		basic_machine=m68k-motorola
5126df26cacSmrg		;;
5136df26cacSmrg	delta88)
5146df26cacSmrg		basic_machine=m88k-motorola
5156df26cacSmrg		os=-sysv3
5166df26cacSmrg		;;
5176df26cacSmrg	djgpp)
5186df26cacSmrg		basic_machine=i586-pc
5196df26cacSmrg		os=-msdosdjgpp
5206df26cacSmrg		;;
5216df26cacSmrg	dpx20 | dpx20-*)
5226df26cacSmrg		basic_machine=rs6000-bull
5236df26cacSmrg		os=-bosx
5246df26cacSmrg		;;
5256df26cacSmrg	dpx2* | dpx2*-bull)
5266df26cacSmrg		basic_machine=m68k-bull
5276df26cacSmrg		os=-sysv3
5286df26cacSmrg		;;
5296df26cacSmrg	ebmon29k)
5306df26cacSmrg		basic_machine=a29k-amd
5316df26cacSmrg		os=-ebmon
5326df26cacSmrg		;;
5336df26cacSmrg	elxsi)
5346df26cacSmrg		basic_machine=elxsi-elxsi
5356df26cacSmrg		os=-bsd
5366df26cacSmrg		;;
5376df26cacSmrg	encore | umax | mmax)
5386df26cacSmrg		basic_machine=ns32k-encore
5396df26cacSmrg		;;
5406df26cacSmrg	es1800 | OSE68k | ose68k | ose | OSE)
5416df26cacSmrg		basic_machine=m68k-ericsson
5426df26cacSmrg		os=-ose
5436df26cacSmrg		;;
5446df26cacSmrg	fx2800)
5456df26cacSmrg		basic_machine=i860-alliant
5466df26cacSmrg		;;
5476df26cacSmrg	genix)
5486df26cacSmrg		basic_machine=ns32k-ns
5496df26cacSmrg		;;
5506df26cacSmrg	gmicro)
5516df26cacSmrg		basic_machine=tron-gmicro
5526df26cacSmrg		os=-sysv
5536df26cacSmrg		;;
5546df26cacSmrg	go32)
5556df26cacSmrg		basic_machine=i386-pc
5566df26cacSmrg		os=-go32
5576df26cacSmrg		;;
5586df26cacSmrg	h3050r* | hiux*)
5596df26cacSmrg		basic_machine=hppa1.1-hitachi
5606df26cacSmrg		os=-hiuxwe2
5616df26cacSmrg		;;
5626df26cacSmrg	h8300hms)
5636df26cacSmrg		basic_machine=h8300-hitachi
5646df26cacSmrg		os=-hms
5656df26cacSmrg		;;
5666df26cacSmrg	h8300xray)
5676df26cacSmrg		basic_machine=h8300-hitachi
5686df26cacSmrg		os=-xray
5696df26cacSmrg		;;
5706df26cacSmrg	h8500hms)
5716df26cacSmrg		basic_machine=h8500-hitachi
5726df26cacSmrg		os=-hms
5736df26cacSmrg		;;
5746df26cacSmrg	harris)
5756df26cacSmrg		basic_machine=m88k-harris
5766df26cacSmrg		os=-sysv3
5776df26cacSmrg		;;
5786df26cacSmrg	hp300-*)
5796df26cacSmrg		basic_machine=m68k-hp
5806df26cacSmrg		;;
5816df26cacSmrg	hp300bsd)
5826df26cacSmrg		basic_machine=m68k-hp
5836df26cacSmrg		os=-bsd
5846df26cacSmrg		;;
5856df26cacSmrg	hp300hpux)
5866df26cacSmrg		basic_machine=m68k-hp
5876df26cacSmrg		os=-hpux
5886df26cacSmrg		;;
5896df26cacSmrg	hp3k9[0-9][0-9] | hp9[0-9][0-9])
5906df26cacSmrg		basic_machine=hppa1.0-hp
5916df26cacSmrg		;;
5926df26cacSmrg	hp9k2[0-9][0-9] | hp9k31[0-9])
5936df26cacSmrg		basic_machine=m68000-hp
5946df26cacSmrg		;;
5956df26cacSmrg	hp9k3[2-9][0-9])
5966df26cacSmrg		basic_machine=m68k-hp
5976df26cacSmrg		;;
5986df26cacSmrg	hp9k6[0-9][0-9] | hp6[0-9][0-9])
5996df26cacSmrg		basic_machine=hppa1.0-hp
6006df26cacSmrg		;;
6016df26cacSmrg	hp9k7[0-79][0-9] | hp7[0-79][0-9])
6026df26cacSmrg		basic_machine=hppa1.1-hp
6036df26cacSmrg		;;
6046df26cacSmrg	hp9k78[0-9] | hp78[0-9])
6056df26cacSmrg		# FIXME: really hppa2.0-hp
6066df26cacSmrg		basic_machine=hppa1.1-hp
6076df26cacSmrg		;;
6086df26cacSmrg	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
6096df26cacSmrg		# FIXME: really hppa2.0-hp
6106df26cacSmrg		basic_machine=hppa1.1-hp
6116df26cacSmrg		;;
6126df26cacSmrg	hp9k8[0-9][13679] | hp8[0-9][13679])
6136df26cacSmrg		basic_machine=hppa1.1-hp
6146df26cacSmrg		;;
6156df26cacSmrg	hp9k8[0-9][0-9] | hp8[0-9][0-9])
6166df26cacSmrg		basic_machine=hppa1.0-hp
6176df26cacSmrg		;;
6186df26cacSmrg	hppa-next)
6196df26cacSmrg		os=-nextstep3
6206df26cacSmrg		;;
6216df26cacSmrg	hppaosf)
6226df26cacSmrg		basic_machine=hppa1.1-hp
6236df26cacSmrg		os=-osf
6246df26cacSmrg		;;
6256df26cacSmrg	hppro)
6266df26cacSmrg		basic_machine=hppa1.1-hp
6276df26cacSmrg		os=-proelf
6286df26cacSmrg		;;
6296df26cacSmrg	i370-ibm* | ibm*)
6306df26cacSmrg		basic_machine=i370-ibm
6316df26cacSmrg		;;
6326df26cacSmrg# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
6336df26cacSmrg	i*86v32)
6346df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
6356df26cacSmrg		os=-sysv32
6366df26cacSmrg		;;
6376df26cacSmrg	i*86v4*)
6386df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
6396df26cacSmrg		os=-sysv4
6406df26cacSmrg		;;
6416df26cacSmrg	i*86v)
6426df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
6436df26cacSmrg		os=-sysv
6446df26cacSmrg		;;
6456df26cacSmrg	i*86sol2)
6466df26cacSmrg		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
6476df26cacSmrg		os=-solaris2
6486df26cacSmrg		;;
6496df26cacSmrg	i386mach)
6506df26cacSmrg		basic_machine=i386-mach
6516df26cacSmrg		os=-mach
6526df26cacSmrg		;;
6536df26cacSmrg	i386-vsta | vsta)
6546df26cacSmrg		basic_machine=i386-unknown
6556df26cacSmrg		os=-vsta
6566df26cacSmrg		;;
6576df26cacSmrg	iris | iris4d)
6586df26cacSmrg		basic_machine=mips-sgi
6596df26cacSmrg		case $os in
6606df26cacSmrg		    -irix*)
6616df26cacSmrg			;;
6626df26cacSmrg		    *)
6636df26cacSmrg			os=-irix4
6646df26cacSmrg			;;
6656df26cacSmrg		esac
6666df26cacSmrg		;;
6676df26cacSmrg	isi68 | isi)
6686df26cacSmrg		basic_machine=m68k-isi
6696df26cacSmrg		os=-sysv
6706df26cacSmrg		;;
6716df26cacSmrg	m88k-omron*)
6726df26cacSmrg		basic_machine=m88k-omron
6736df26cacSmrg		;;
6746df26cacSmrg	magnum | m3230)
6756df26cacSmrg		basic_machine=mips-mips
6766df26cacSmrg		os=-sysv
6776df26cacSmrg		;;
6786df26cacSmrg	merlin)
6796df26cacSmrg		basic_machine=ns32k-utek
6806df26cacSmrg		os=-sysv
6816df26cacSmrg		;;
6826df26cacSmrg	mingw32)
6836df26cacSmrg		basic_machine=i386-pc
6846df26cacSmrg		os=-mingw32
6856df26cacSmrg		;;
68616fd1166Smrg	mingw32ce)
68716fd1166Smrg		basic_machine=arm-unknown
68816fd1166Smrg		os=-mingw32ce
68916fd1166Smrg		;;
6906df26cacSmrg	miniframe)
6916df26cacSmrg		basic_machine=m68000-convergent
6926df26cacSmrg		;;
6936df26cacSmrg	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
6946df26cacSmrg		basic_machine=m68k-atari
6956df26cacSmrg		os=-mint
6966df26cacSmrg		;;
6976df26cacSmrg	mips3*-*)
6986df26cacSmrg		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
6996df26cacSmrg		;;
7006df26cacSmrg	mips3*)
7016df26cacSmrg		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
7026df26cacSmrg		;;
7036df26cacSmrg	monitor)
7046df26cacSmrg		basic_machine=m68k-rom68k
7056df26cacSmrg		os=-coff
7066df26cacSmrg		;;
7076df26cacSmrg	morphos)
7086df26cacSmrg		basic_machine=powerpc-unknown
7096df26cacSmrg		os=-morphos
7106df26cacSmrg		;;
7116df26cacSmrg	msdos)
7126df26cacSmrg		basic_machine=i386-pc
7136df26cacSmrg		os=-msdos
7146df26cacSmrg		;;
7156df26cacSmrg	ms1-*)
7166df26cacSmrg		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
7176df26cacSmrg		;;
7186df26cacSmrg	mvs)
7196df26cacSmrg		basic_machine=i370-ibm
7206df26cacSmrg		os=-mvs
7216df26cacSmrg		;;
7226df26cacSmrg	ncr3000)
7236df26cacSmrg		basic_machine=i486-ncr
7246df26cacSmrg		os=-sysv4
7256df26cacSmrg		;;
7266df26cacSmrg	netbsd386)
7276df26cacSmrg		basic_machine=i386-unknown
7286df26cacSmrg		os=-netbsd
7296df26cacSmrg		;;
7306df26cacSmrg	netwinder)
7316df26cacSmrg		basic_machine=armv4l-rebel
7326df26cacSmrg		os=-linux
7336df26cacSmrg		;;
7346df26cacSmrg	news | news700 | news800 | news900)
7356df26cacSmrg		basic_machine=m68k-sony
7366df26cacSmrg		os=-newsos
7376df26cacSmrg		;;
7386df26cacSmrg	news1000)
7396df26cacSmrg		basic_machine=m68030-sony
7406df26cacSmrg		os=-newsos
7416df26cacSmrg		;;
7426df26cacSmrg	news-3600 | risc-news)
7436df26cacSmrg		basic_machine=mips-sony
7446df26cacSmrg		os=-newsos
7456df26cacSmrg		;;
7466df26cacSmrg	necv70)
7476df26cacSmrg		basic_machine=v70-nec
7486df26cacSmrg		os=-sysv
7496df26cacSmrg		;;
7506df26cacSmrg	next | m*-next )
7516df26cacSmrg		basic_machine=m68k-next
7526df26cacSmrg		case $os in
7536df26cacSmrg		    -nextstep* )
7546df26cacSmrg			;;
7556df26cacSmrg		    -ns2*)
7566df26cacSmrg		      os=-nextstep2
7576df26cacSmrg			;;
7586df26cacSmrg		    *)
7596df26cacSmrg		      os=-nextstep3
7606df26cacSmrg			;;
7616df26cacSmrg		esac
7626df26cacSmrg		;;
7636df26cacSmrg	nh3000)
7646df26cacSmrg		basic_machine=m68k-harris
7656df26cacSmrg		os=-cxux
7666df26cacSmrg		;;
7676df26cacSmrg	nh[45]000)
7686df26cacSmrg		basic_machine=m88k-harris
7696df26cacSmrg		os=-cxux
7706df26cacSmrg		;;
7716df26cacSmrg	nindy960)
7726df26cacSmrg		basic_machine=i960-intel
7736df26cacSmrg		os=-nindy
7746df26cacSmrg		;;
7756df26cacSmrg	mon960)
7766df26cacSmrg		basic_machine=i960-intel
7776df26cacSmrg		os=-mon960
7786df26cacSmrg		;;
7796df26cacSmrg	nonstopux)
7806df26cacSmrg		basic_machine=mips-compaq
7816df26cacSmrg		os=-nonstopux
7826df26cacSmrg		;;
7836df26cacSmrg	np1)
7846df26cacSmrg		basic_machine=np1-gould
7856df26cacSmrg		;;
7866df26cacSmrg	nsr-tandem)
7876df26cacSmrg		basic_machine=nsr-tandem
7886df26cacSmrg		;;
7896df26cacSmrg	op50n-* | op60c-*)
7906df26cacSmrg		basic_machine=hppa1.1-oki
7916df26cacSmrg		os=-proelf
7926df26cacSmrg		;;
7936df26cacSmrg	openrisc | openrisc-*)
7946df26cacSmrg		basic_machine=or32-unknown
7956df26cacSmrg		;;
7966df26cacSmrg	os400)
7976df26cacSmrg		basic_machine=powerpc-ibm
7986df26cacSmrg		os=-os400
7996df26cacSmrg		;;
8006df26cacSmrg	OSE68000 | ose68000)
8016df26cacSmrg		basic_machine=m68000-ericsson
8026df26cacSmrg		os=-ose
8036df26cacSmrg		;;
8046df26cacSmrg	os68k)
8056df26cacSmrg		basic_machine=m68k-none
8066df26cacSmrg		os=-os68k
8076df26cacSmrg		;;
8086df26cacSmrg	pa-hitachi)
8096df26cacSmrg		basic_machine=hppa1.1-hitachi
8106df26cacSmrg		os=-hiuxwe2
8116df26cacSmrg		;;
8126df26cacSmrg	paragon)
8136df26cacSmrg		basic_machine=i860-intel
8146df26cacSmrg		os=-osf
8156df26cacSmrg		;;
8166df26cacSmrg	pbd)
8176df26cacSmrg		basic_machine=sparc-tti
8186df26cacSmrg		;;
8196df26cacSmrg	pbb)
8206df26cacSmrg		basic_machine=m68k-tti
8216df26cacSmrg		;;
8226df26cacSmrg	pc532 | pc532-*)
8236df26cacSmrg		basic_machine=ns32k-pc532
8246df26cacSmrg		;;
8256df26cacSmrg	pc98)
8266df26cacSmrg		basic_machine=i386-pc
8276df26cacSmrg		;;
8286df26cacSmrg	pc98-*)
8296df26cacSmrg		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
8306df26cacSmrg		;;
8316df26cacSmrg	pentium | p5 | k5 | k6 | nexgen | viac3)
8326df26cacSmrg		basic_machine=i586-pc
8336df26cacSmrg		;;
8346df26cacSmrg	pentiumpro | p6 | 6x86 | athlon | athlon_*)
8356df26cacSmrg		basic_machine=i686-pc
8366df26cacSmrg		;;
8376df26cacSmrg	pentiumii | pentium2 | pentiumiii | pentium3)
8386df26cacSmrg		basic_machine=i686-pc
8396df26cacSmrg		;;
8406df26cacSmrg	pentium4)
8416df26cacSmrg		basic_machine=i786-pc
8426df26cacSmrg		;;
8436df26cacSmrg	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
8446df26cacSmrg		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
8456df26cacSmrg		;;
8466df26cacSmrg	pentiumpro-* | p6-* | 6x86-* | athlon-*)
8476df26cacSmrg		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
8486df26cacSmrg		;;
8496df26cacSmrg	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
8506df26cacSmrg		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
8516df26cacSmrg		;;
8526df26cacSmrg	pentium4-*)
8536df26cacSmrg		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
8546df26cacSmrg		;;
8556df26cacSmrg	pn)
8566df26cacSmrg		basic_machine=pn-gould
8576df26cacSmrg		;;
8586df26cacSmrg	power)	basic_machine=power-ibm
8596df26cacSmrg		;;
8606df26cacSmrg	ppc)	basic_machine=powerpc-unknown
8616df26cacSmrg		;;
8626df26cacSmrg	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
8636df26cacSmrg		;;
8646df26cacSmrg	ppcle | powerpclittle | ppc-le | powerpc-little)
8656df26cacSmrg		basic_machine=powerpcle-unknown
8666df26cacSmrg		;;
8676df26cacSmrg	ppcle-* | powerpclittle-*)
8686df26cacSmrg		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
8696df26cacSmrg		;;
8706df26cacSmrg	ppc64)	basic_machine=powerpc64-unknown
8716df26cacSmrg		;;
8726df26cacSmrg	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
8736df26cacSmrg		;;
8746df26cacSmrg	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
8756df26cacSmrg		basic_machine=powerpc64le-unknown
8766df26cacSmrg		;;
8776df26cacSmrg	ppc64le-* | powerpc64little-*)
8786df26cacSmrg		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
8796df26cacSmrg		;;
8806df26cacSmrg	ps2)
8816df26cacSmrg		basic_machine=i386-ibm
8826df26cacSmrg		;;
8836df26cacSmrg	pw32)
8846df26cacSmrg		basic_machine=i586-unknown
8856df26cacSmrg		os=-pw32
8866df26cacSmrg		;;
8876df26cacSmrg	rdos)
8886df26cacSmrg		basic_machine=i386-pc
8896df26cacSmrg		os=-rdos
8906df26cacSmrg		;;
8916df26cacSmrg	rom68k)
8926df26cacSmrg		basic_machine=m68k-rom68k
8936df26cacSmrg		os=-coff
8946df26cacSmrg		;;
8956df26cacSmrg	rm[46]00)
8966df26cacSmrg		basic_machine=mips-siemens
8976df26cacSmrg		;;
8986df26cacSmrg	rtpc | rtpc-*)
8996df26cacSmrg		basic_machine=romp-ibm
9006df26cacSmrg		;;
9016df26cacSmrg	s390 | s390-*)
9026df26cacSmrg		basic_machine=s390-ibm
9036df26cacSmrg		;;
9046df26cacSmrg	s390x | s390x-*)
9056df26cacSmrg		basic_machine=s390x-ibm
9066df26cacSmrg		;;
9076df26cacSmrg	sa29200)
9086df26cacSmrg		basic_machine=a29k-amd
9096df26cacSmrg		os=-udi
9106df26cacSmrg		;;
9116df26cacSmrg	sb1)
9126df26cacSmrg		basic_machine=mipsisa64sb1-unknown
9136df26cacSmrg		;;
9146df26cacSmrg	sb1el)
9156df26cacSmrg		basic_machine=mipsisa64sb1el-unknown
9166df26cacSmrg		;;
9176df26cacSmrg	sde)
9186df26cacSmrg		basic_machine=mipsisa32-sde
9196df26cacSmrg		os=-elf
9206df26cacSmrg		;;
9216df26cacSmrg	sei)
9226df26cacSmrg		basic_machine=mips-sei
9236df26cacSmrg		os=-seiux
9246df26cacSmrg		;;
9256df26cacSmrg	sequent)
9266df26cacSmrg		basic_machine=i386-sequent
9276df26cacSmrg		;;
9286df26cacSmrg	sh)
9296df26cacSmrg		basic_machine=sh-hitachi
9306df26cacSmrg		os=-hms
9316df26cacSmrg		;;
93216fd1166Smrg	sh5el)
93316fd1166Smrg		basic_machine=sh5le-unknown
93416fd1166Smrg		;;
9356df26cacSmrg	sh64)
9366df26cacSmrg		basic_machine=sh64-unknown
9376df26cacSmrg		;;
9386df26cacSmrg	sparclite-wrs | simso-wrs)
9396df26cacSmrg		basic_machine=sparclite-wrs
9406df26cacSmrg		os=-vxworks
9416df26cacSmrg		;;
9426df26cacSmrg	sps7)
9436df26cacSmrg		basic_machine=m68k-bull
9446df26cacSmrg		os=-sysv2
9456df26cacSmrg		;;
9466df26cacSmrg	spur)
9476df26cacSmrg		basic_machine=spur-unknown
9486df26cacSmrg		;;
9496df26cacSmrg	st2000)
9506df26cacSmrg		basic_machine=m68k-tandem
9516df26cacSmrg		;;
9526df26cacSmrg	stratus)
9536df26cacSmrg		basic_machine=i860-stratus
9546df26cacSmrg		os=-sysv4
9556df26cacSmrg		;;
9566df26cacSmrg	sun2)
9576df26cacSmrg		basic_machine=m68000-sun
9586df26cacSmrg		;;
9596df26cacSmrg	sun2os3)
9606df26cacSmrg		basic_machine=m68000-sun
9616df26cacSmrg		os=-sunos3
9626df26cacSmrg		;;
9636df26cacSmrg	sun2os4)
9646df26cacSmrg		basic_machine=m68000-sun
9656df26cacSmrg		os=-sunos4
9666df26cacSmrg		;;
9676df26cacSmrg	sun3os3)
9686df26cacSmrg		basic_machine=m68k-sun
9696df26cacSmrg		os=-sunos3
9706df26cacSmrg		;;
9716df26cacSmrg	sun3os4)
9726df26cacSmrg		basic_machine=m68k-sun
9736df26cacSmrg		os=-sunos4
9746df26cacSmrg		;;
9756df26cacSmrg	sun4os3)
9766df26cacSmrg		basic_machine=sparc-sun
9776df26cacSmrg		os=-sunos3
9786df26cacSmrg		;;
9796df26cacSmrg	sun4os4)
9806df26cacSmrg		basic_machine=sparc-sun
9816df26cacSmrg		os=-sunos4
9826df26cacSmrg		;;
9836df26cacSmrg	sun4sol2)
9846df26cacSmrg		basic_machine=sparc-sun
9856df26cacSmrg		os=-solaris2
9866df26cacSmrg		;;
9876df26cacSmrg	sun3 | sun3-*)
9886df26cacSmrg		basic_machine=m68k-sun
9896df26cacSmrg		;;
9906df26cacSmrg	sun4)
9916df26cacSmrg		basic_machine=sparc-sun
9926df26cacSmrg		;;
9936df26cacSmrg	sun386 | sun386i | roadrunner)
9946df26cacSmrg		basic_machine=i386-sun
9956df26cacSmrg		;;
9966df26cacSmrg	sv1)
9976df26cacSmrg		basic_machine=sv1-cray
9986df26cacSmrg		os=-unicos
9996df26cacSmrg		;;
10006df26cacSmrg	symmetry)
10016df26cacSmrg		basic_machine=i386-sequent
10026df26cacSmrg		os=-dynix
10036df26cacSmrg		;;
10046df26cacSmrg	t3e)
10056df26cacSmrg		basic_machine=alphaev5-cray
10066df26cacSmrg		os=-unicos
10076df26cacSmrg		;;
10086df26cacSmrg	t90)
10096df26cacSmrg		basic_machine=t90-cray
10106df26cacSmrg		os=-unicos
10116df26cacSmrg		;;
10126df26cacSmrg	tic54x | c54x*)
10136df26cacSmrg		basic_machine=tic54x-unknown
10146df26cacSmrg		os=-coff
10156df26cacSmrg		;;
10166df26cacSmrg	tic55x | c55x*)
10176df26cacSmrg		basic_machine=tic55x-unknown
10186df26cacSmrg		os=-coff
10196df26cacSmrg		;;
10206df26cacSmrg	tic6x | c6x*)
10216df26cacSmrg		basic_machine=tic6x-unknown
10226df26cacSmrg		os=-coff
10236df26cacSmrg		;;
10246df26cacSmrg	tx39)
10256df26cacSmrg		basic_machine=mipstx39-unknown
10266df26cacSmrg		;;
10276df26cacSmrg	tx39el)
10286df26cacSmrg		basic_machine=mipstx39el-unknown
10296df26cacSmrg		;;
10306df26cacSmrg	toad1)
10316df26cacSmrg		basic_machine=pdp10-xkl
10326df26cacSmrg		os=-tops20
10336df26cacSmrg		;;
10346df26cacSmrg	tower | tower-32)
10356df26cacSmrg		basic_machine=m68k-ncr
10366df26cacSmrg		;;
10376df26cacSmrg	tpf)
10386df26cacSmrg		basic_machine=s390x-ibm
10396df26cacSmrg		os=-tpf
10406df26cacSmrg		;;
10416df26cacSmrg	udi29k)
10426df26cacSmrg		basic_machine=a29k-amd
10436df26cacSmrg		os=-udi
10446df26cacSmrg		;;
10456df26cacSmrg	ultra3)
10466df26cacSmrg		basic_machine=a29k-nyu
10476df26cacSmrg		os=-sym1
10486df26cacSmrg		;;
10496df26cacSmrg	v810 | necv810)
10506df26cacSmrg		basic_machine=v810-nec
10516df26cacSmrg		os=-none
10526df26cacSmrg		;;
10536df26cacSmrg	vaxv)
10546df26cacSmrg		basic_machine=vax-dec
10556df26cacSmrg		os=-sysv
10566df26cacSmrg		;;
10576df26cacSmrg	vms)
10586df26cacSmrg		basic_machine=vax-dec
10596df26cacSmrg		os=-vms
10606df26cacSmrg		;;
10616df26cacSmrg	vpp*|vx|vx-*)
10626df26cacSmrg		basic_machine=f301-fujitsu
10636df26cacSmrg		;;
10646df26cacSmrg	vxworks960)
10656df26cacSmrg		basic_machine=i960-wrs
10666df26cacSmrg		os=-vxworks
10676df26cacSmrg		;;
10686df26cacSmrg	vxworks68)
10696df26cacSmrg		basic_machine=m68k-wrs
10706df26cacSmrg		os=-vxworks
10716df26cacSmrg		;;
10726df26cacSmrg	vxworks29k)
10736df26cacSmrg		basic_machine=a29k-wrs
10746df26cacSmrg		os=-vxworks
10756df26cacSmrg		;;
10766df26cacSmrg	w65*)
10776df26cacSmrg		basic_machine=w65-wdc
10786df26cacSmrg		os=-none
10796df26cacSmrg		;;
10806df26cacSmrg	w89k-*)
10816df26cacSmrg		basic_machine=hppa1.1-winbond
10826df26cacSmrg		os=-proelf
10836df26cacSmrg		;;
10846df26cacSmrg	xbox)
10856df26cacSmrg		basic_machine=i686-pc
10866df26cacSmrg		os=-mingw32
10876df26cacSmrg		;;
10886df26cacSmrg	xps | xps100)
10896df26cacSmrg		basic_machine=xps100-honeywell
10906df26cacSmrg		;;
10916df26cacSmrg	ymp)
10926df26cacSmrg		basic_machine=ymp-cray
10936df26cacSmrg		os=-unicos
10946df26cacSmrg		;;
10956df26cacSmrg	z8k-*-coff)
10966df26cacSmrg		basic_machine=z8k-unknown
10976df26cacSmrg		os=-sim
10986df26cacSmrg		;;
10996df26cacSmrg	none)
11006df26cacSmrg		basic_machine=none-none
11016df26cacSmrg		os=-none
11026df26cacSmrg		;;
11036df26cacSmrg
11046df26cacSmrg# Here we handle the default manufacturer of certain CPU types.  It is in
11056df26cacSmrg# some cases the only manufacturer, in others, it is the most popular.
11066df26cacSmrg	w89k)
11076df26cacSmrg		basic_machine=hppa1.1-winbond
11086df26cacSmrg		;;
11096df26cacSmrg	op50n)
11106df26cacSmrg		basic_machine=hppa1.1-oki
11116df26cacSmrg		;;
11126df26cacSmrg	op60c)
11136df26cacSmrg		basic_machine=hppa1.1-oki
11146df26cacSmrg		;;
11156df26cacSmrg	romp)
11166df26cacSmrg		basic_machine=romp-ibm
11176df26cacSmrg		;;
11186df26cacSmrg	mmix)
11196df26cacSmrg		basic_machine=mmix-knuth
11206df26cacSmrg		;;
11216df26cacSmrg	rs6000)
11226df26cacSmrg		basic_machine=rs6000-ibm
11236df26cacSmrg		;;
11246df26cacSmrg	vax)
11256df26cacSmrg		basic_machine=vax-dec
11266df26cacSmrg		;;
11276df26cacSmrg	pdp10)
11286df26cacSmrg		# there are many clones, so DEC is not a safe bet
11296df26cacSmrg		basic_machine=pdp10-unknown
11306df26cacSmrg		;;
11316df26cacSmrg	pdp11)
11326df26cacSmrg		basic_machine=pdp11-dec
11336df26cacSmrg		;;
11346df26cacSmrg	we32k)
11356df26cacSmrg		basic_machine=we32k-att
11366df26cacSmrg		;;
11376df26cacSmrg	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
11386df26cacSmrg		basic_machine=sh-unknown
11396df26cacSmrg		;;
11406df26cacSmrg	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
11416df26cacSmrg		basic_machine=sparc-sun
11426df26cacSmrg		;;
11436df26cacSmrg	cydra)
11446df26cacSmrg		basic_machine=cydra-cydrome
11456df26cacSmrg		;;
11466df26cacSmrg	orion)
11476df26cacSmrg		basic_machine=orion-highlevel
11486df26cacSmrg		;;
11496df26cacSmrg	orion105)
11506df26cacSmrg		basic_machine=clipper-highlevel
11516df26cacSmrg		;;
11526df26cacSmrg	mac | mpw | mac-mpw)
11536df26cacSmrg		basic_machine=m68k-apple
11546df26cacSmrg		;;
11556df26cacSmrg	pmac | pmac-mpw)
11566df26cacSmrg		basic_machine=powerpc-apple
11576df26cacSmrg		;;
11586df26cacSmrg	*-unknown)
11596df26cacSmrg		# Make sure to match an already-canonicalized machine name.
11606df26cacSmrg		;;
11616df26cacSmrg	*)
11626df26cacSmrg		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
11636df26cacSmrg		exit 1
11646df26cacSmrg		;;
11656df26cacSmrgesac
11666df26cacSmrg
11676df26cacSmrg# Here we canonicalize certain aliases for manufacturers.
11686df26cacSmrgcase $basic_machine in
11696df26cacSmrg	*-digital*)
11706df26cacSmrg		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
11716df26cacSmrg		;;
11726df26cacSmrg	*-commodore*)
11736df26cacSmrg		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
11746df26cacSmrg		;;
11756df26cacSmrg	*)
11766df26cacSmrg		;;
11776df26cacSmrgesac
11786df26cacSmrg
11796df26cacSmrg# Decode manufacturer-specific aliases for certain operating systems.
11806df26cacSmrg
11816df26cacSmrgif [ x"$os" != x"" ]
11826df26cacSmrgthen
11836df26cacSmrgcase $os in
11846df26cacSmrg        # First match some system type aliases
11856df26cacSmrg        # that might get confused with valid system types.
11866df26cacSmrg	# -solaris* is a basic system type, with this one exception.
11876df26cacSmrg	-solaris1 | -solaris1.*)
11886df26cacSmrg		os=`echo $os | sed -e 's|solaris1|sunos4|'`
11896df26cacSmrg		;;
11906df26cacSmrg	-solaris)
11916df26cacSmrg		os=-solaris2
11926df26cacSmrg		;;
11936df26cacSmrg	-svr4*)
11946df26cacSmrg		os=-sysv4
11956df26cacSmrg		;;
11966df26cacSmrg	-unixware*)
11976df26cacSmrg		os=-sysv4.2uw
11986df26cacSmrg		;;
11996df26cacSmrg	-gnu/linux*)
12006df26cacSmrg		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
12016df26cacSmrg		;;
12026df26cacSmrg	# First accept the basic system types.
12036df26cacSmrg	# The portable systems comes first.
12046df26cacSmrg	# Each alternative MUST END IN A *, to match a version number.
12056df26cacSmrg	# -sysv* is not here because it comes later, after sysvr4.
12066df26cacSmrg	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
12076df26cacSmrg	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
12086df26cacSmrg	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
12096df26cacSmrg	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
12106df26cacSmrg	      | -aos* \
12116df26cacSmrg	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
12126df26cacSmrg	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
12136df26cacSmrg	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
12146df26cacSmrg	      | -openbsd* | -solidbsd* \
12156df26cacSmrg	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
12166df26cacSmrg	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
12176df26cacSmrg	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
12186df26cacSmrg	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
12196df26cacSmrg	      | -chorusos* | -chorusrdb* \
12206df26cacSmrg	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
12216df26cacSmrg	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
12226df26cacSmrg	      | -uxpv* | -beos* | -mpeix* | -udk* \
12236df26cacSmrg	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
12246df26cacSmrg	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
12256df26cacSmrg	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
12266df26cacSmrg	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
12276df26cacSmrg	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
12286df26cacSmrg	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
122916fd1166Smrg	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
12306df26cacSmrg	# Remember, each alternative MUST END IN *, to match a version number.
12316df26cacSmrg		;;
12326df26cacSmrg	-qnx*)
12336df26cacSmrg		case $basic_machine in
12346df26cacSmrg		    x86-* | i*86-*)
12356df26cacSmrg			;;
12366df26cacSmrg		    *)
12376df26cacSmrg			os=-nto$os
12386df26cacSmrg			;;
12396df26cacSmrg		esac
12406df26cacSmrg		;;
12416df26cacSmrg	-nto-qnx*)
12426df26cacSmrg		;;
12436df26cacSmrg	-nto*)
12446df26cacSmrg		os=`echo $os | sed -e 's|nto|nto-qnx|'`
12456df26cacSmrg		;;
12466df26cacSmrg	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
12476df26cacSmrg	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
12486df26cacSmrg	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
12496df26cacSmrg		;;
12506df26cacSmrg	-mac*)
12516df26cacSmrg		os=`echo $os | sed -e 's|mac|macos|'`
12526df26cacSmrg		;;
12536df26cacSmrg	-linux-dietlibc)
12546df26cacSmrg		os=-linux-dietlibc
12556df26cacSmrg		;;
12566df26cacSmrg	-linux*)
12576df26cacSmrg		os=`echo $os | sed -e 's|linux|linux-gnu|'`
12586df26cacSmrg		;;
12596df26cacSmrg	-sunos5*)
12606df26cacSmrg		os=`echo $os | sed -e 's|sunos5|solaris2|'`
12616df26cacSmrg		;;
12626df26cacSmrg	-sunos6*)
12636df26cacSmrg		os=`echo $os | sed -e 's|sunos6|solaris3|'`
12646df26cacSmrg		;;
12656df26cacSmrg	-opened*)
12666df26cacSmrg		os=-openedition
12676df26cacSmrg		;;
12686df26cacSmrg        -os400*)
12696df26cacSmrg		os=-os400
12706df26cacSmrg		;;
12716df26cacSmrg	-wince*)
12726df26cacSmrg		os=-wince
12736df26cacSmrg		;;
12746df26cacSmrg	-osfrose*)
12756df26cacSmrg		os=-osfrose
12766df26cacSmrg		;;
12776df26cacSmrg	-osf*)
12786df26cacSmrg		os=-osf
12796df26cacSmrg		;;
12806df26cacSmrg	-utek*)
12816df26cacSmrg		os=-bsd
12826df26cacSmrg		;;
12836df26cacSmrg	-dynix*)
12846df26cacSmrg		os=-bsd
12856df26cacSmrg		;;
12866df26cacSmrg	-acis*)
12876df26cacSmrg		os=-aos
12886df26cacSmrg		;;
12896df26cacSmrg	-atheos*)
12906df26cacSmrg		os=-atheos
12916df26cacSmrg		;;
12926df26cacSmrg	-syllable*)
12936df26cacSmrg		os=-syllable
12946df26cacSmrg		;;
12956df26cacSmrg	-386bsd)
12966df26cacSmrg		os=-bsd
12976df26cacSmrg		;;
12986df26cacSmrg	-ctix* | -uts*)
12996df26cacSmrg		os=-sysv
13006df26cacSmrg		;;
13016df26cacSmrg	-nova*)
13026df26cacSmrg		os=-rtmk-nova
13036df26cacSmrg		;;
13046df26cacSmrg	-ns2 )
13056df26cacSmrg		os=-nextstep2
13066df26cacSmrg		;;
13076df26cacSmrg	-nsk*)
13086df26cacSmrg		os=-nsk
13096df26cacSmrg		;;
13106df26cacSmrg	# Preserve the version number of sinix5.
13116df26cacSmrg	-sinix5.*)
13126df26cacSmrg		os=`echo $os | sed -e 's|sinix|sysv|'`
13136df26cacSmrg		;;
13146df26cacSmrg	-sinix*)
13156df26cacSmrg		os=-sysv4
13166df26cacSmrg		;;
13176df26cacSmrg        -tpf*)
13186df26cacSmrg		os=-tpf
13196df26cacSmrg		;;
13206df26cacSmrg	-triton*)
13216df26cacSmrg		os=-sysv3
13226df26cacSmrg		;;
13236df26cacSmrg	-oss*)
13246df26cacSmrg		os=-sysv3
13256df26cacSmrg		;;
13266df26cacSmrg	-svr4)
13276df26cacSmrg		os=-sysv4
13286df26cacSmrg		;;
13296df26cacSmrg	-svr3)
13306df26cacSmrg		os=-sysv3
13316df26cacSmrg		;;
13326df26cacSmrg	-sysvr4)
13336df26cacSmrg		os=-sysv4
13346df26cacSmrg		;;
13356df26cacSmrg	# This must come after -sysvr4.
13366df26cacSmrg	-sysv*)
13376df26cacSmrg		;;
13386df26cacSmrg	-ose*)
13396df26cacSmrg		os=-ose
13406df26cacSmrg		;;
13416df26cacSmrg	-es1800*)
13426df26cacSmrg		os=-ose
13436df26cacSmrg		;;
13446df26cacSmrg	-xenix)
13456df26cacSmrg		os=-xenix
13466df26cacSmrg		;;
13476df26cacSmrg	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
13486df26cacSmrg		os=-mint
13496df26cacSmrg		;;
13506df26cacSmrg	-aros*)
13516df26cacSmrg		os=-aros
13526df26cacSmrg		;;
13536df26cacSmrg	-kaos*)
13546df26cacSmrg		os=-kaos
13556df26cacSmrg		;;
13566df26cacSmrg	-zvmoe)
13576df26cacSmrg		os=-zvmoe
13586df26cacSmrg		;;
13596df26cacSmrg	-none)
13606df26cacSmrg		;;
13616df26cacSmrg	*)
13626df26cacSmrg		# Get rid of the `-' at the beginning of $os.
13636df26cacSmrg		os=`echo $os | sed 's/[^-]*-//'`
13646df26cacSmrg		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
13656df26cacSmrg		exit 1
13666df26cacSmrg		;;
13676df26cacSmrgesac
13686df26cacSmrgelse
13696df26cacSmrg
13706df26cacSmrg# Here we handle the default operating systems that come with various machines.
13716df26cacSmrg# The value should be what the vendor currently ships out the door with their
13726df26cacSmrg# machine or put another way, the most popular os provided with the machine.
13736df26cacSmrg
13746df26cacSmrg# Note that if you're going to try to match "-MANUFACTURER" here (say,
13756df26cacSmrg# "-sun"), then you have to tell the case statement up towards the top
13766df26cacSmrg# that MANUFACTURER isn't an operating system.  Otherwise, code above
13776df26cacSmrg# will signal an error saying that MANUFACTURER isn't an operating
13786df26cacSmrg# system, and we'll never get to this point.
13796df26cacSmrg
13806df26cacSmrgcase $basic_machine in
13816df26cacSmrg        score-*)
13826df26cacSmrg		os=-elf
13836df26cacSmrg		;;
13846df26cacSmrg        spu-*)
13856df26cacSmrg		os=-elf
13866df26cacSmrg		;;
13876df26cacSmrg	*-acorn)
13886df26cacSmrg		os=-riscix1.2
13896df26cacSmrg		;;
13906df26cacSmrg	arm*-rebel)
13916df26cacSmrg		os=-linux
13926df26cacSmrg		;;
13936df26cacSmrg	arm*-semi)
13946df26cacSmrg		os=-aout
13956df26cacSmrg		;;
13966df26cacSmrg        c4x-* | tic4x-*)
13976df26cacSmrg        	os=-coff
13986df26cacSmrg		;;
13996df26cacSmrg	# This must come before the *-dec entry.
14006df26cacSmrg	pdp10-*)
14016df26cacSmrg		os=-tops20
14026df26cacSmrg		;;
14036df26cacSmrg	pdp11-*)
14046df26cacSmrg		os=-none
14056df26cacSmrg		;;
14066df26cacSmrg	*-dec | vax-*)
14076df26cacSmrg		os=-ultrix4.2
14086df26cacSmrg		;;
14096df26cacSmrg	m68*-apollo)
14106df26cacSmrg		os=-domain
14116df26cacSmrg		;;
14126df26cacSmrg	i386-sun)
14136df26cacSmrg		os=-sunos4.0.2
14146df26cacSmrg		;;
14156df26cacSmrg	m68000-sun)
14166df26cacSmrg		os=-sunos3
14176df26cacSmrg		# This also exists in the configure program, but was not the
14186df26cacSmrg		# default.
14196df26cacSmrg		# os=-sunos4
14206df26cacSmrg		;;
14216df26cacSmrg	m68*-cisco)
14226df26cacSmrg		os=-aout
14236df26cacSmrg		;;
142416fd1166Smrg        mep-*)
142516fd1166Smrg		os=-elf
142616fd1166Smrg		;;
14276df26cacSmrg	mips*-cisco)
14286df26cacSmrg		os=-elf
14296df26cacSmrg		;;
14306df26cacSmrg	mips*-*)
14316df26cacSmrg		os=-elf
14326df26cacSmrg		;;
14336df26cacSmrg	or32-*)
14346df26cacSmrg		os=-coff
14356df26cacSmrg		;;
14366df26cacSmrg	*-tti)	# must be before sparc entry or we get the wrong os.
14376df26cacSmrg		os=-sysv3
14386df26cacSmrg		;;
14396df26cacSmrg	sparc-* | *-sun)
14406df26cacSmrg		os=-sunos4.1.1
14416df26cacSmrg		;;
14426df26cacSmrg	*-be)
14436df26cacSmrg		os=-beos
14446df26cacSmrg		;;
14456df26cacSmrg	*-haiku)
14466df26cacSmrg		os=-haiku
14476df26cacSmrg		;;
14486df26cacSmrg	*-ibm)
14496df26cacSmrg		os=-aix
14506df26cacSmrg		;;
14516df26cacSmrg    	*-knuth)
14526df26cacSmrg		os=-mmixware
14536df26cacSmrg		;;
14546df26cacSmrg	*-wec)
14556df26cacSmrg		os=-proelf
14566df26cacSmrg		;;
14576df26cacSmrg	*-winbond)
14586df26cacSmrg		os=-proelf
14596df26cacSmrg		;;
14606df26cacSmrg	*-oki)
14616df26cacSmrg		os=-proelf
14626df26cacSmrg		;;
14636df26cacSmrg	*-hp)
14646df26cacSmrg		os=-hpux
14656df26cacSmrg		;;
14666df26cacSmrg	*-hitachi)
14676df26cacSmrg		os=-hiux
14686df26cacSmrg		;;
14696df26cacSmrg	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
14706df26cacSmrg		os=-sysv
14716df26cacSmrg		;;
14726df26cacSmrg	*-cbm)
14736df26cacSmrg		os=-amigaos
14746df26cacSmrg		;;
14756df26cacSmrg	*-dg)
14766df26cacSmrg		os=-dgux
14776df26cacSmrg		;;
14786df26cacSmrg	*-dolphin)
14796df26cacSmrg		os=-sysv3
14806df26cacSmrg		;;
14816df26cacSmrg	m68k-ccur)
14826df26cacSmrg		os=-rtu
14836df26cacSmrg		;;
14846df26cacSmrg	m88k-omron*)
14856df26cacSmrg		os=-luna
14866df26cacSmrg		;;
14876df26cacSmrg	*-next )
14886df26cacSmrg		os=-nextstep
14896df26cacSmrg		;;
14906df26cacSmrg	*-sequent)
14916df26cacSmrg		os=-ptx
14926df26cacSmrg		;;
14936df26cacSmrg	*-crds)
14946df26cacSmrg		os=-unos
14956df26cacSmrg		;;
14966df26cacSmrg	*-ns)
14976df26cacSmrg		os=-genix
14986df26cacSmrg		;;
14996df26cacSmrg	i370-*)
15006df26cacSmrg		os=-mvs
15016df26cacSmrg		;;
15026df26cacSmrg	*-next)
15036df26cacSmrg		os=-nextstep3
15046df26cacSmrg		;;
15056df26cacSmrg	*-gould)
15066df26cacSmrg		os=-sysv
15076df26cacSmrg		;;
15086df26cacSmrg	*-highlevel)
15096df26cacSmrg		os=-bsd
15106df26cacSmrg		;;
15116df26cacSmrg	*-encore)
15126df26cacSmrg		os=-bsd
15136df26cacSmrg		;;
15146df26cacSmrg	*-sgi)
15156df26cacSmrg		os=-irix
15166df26cacSmrg		;;
15176df26cacSmrg	*-siemens)
15186df26cacSmrg		os=-sysv4
15196df26cacSmrg		;;
15206df26cacSmrg	*-masscomp)
15216df26cacSmrg		os=-rtu
15226df26cacSmrg		;;
15236df26cacSmrg	f30[01]-fujitsu | f700-fujitsu)
15246df26cacSmrg		os=-uxpv
15256df26cacSmrg		;;
15266df26cacSmrg	*-rom68k)
15276df26cacSmrg		os=-coff
15286df26cacSmrg		;;
15296df26cacSmrg	*-*bug)
15306df26cacSmrg		os=-coff
15316df26cacSmrg		;;
15326df26cacSmrg	*-apple)
15336df26cacSmrg		os=-macos
15346df26cacSmrg		;;
15356df26cacSmrg	*-atari*)
15366df26cacSmrg		os=-mint
15376df26cacSmrg		;;
15386df26cacSmrg	*)
15396df26cacSmrg		os=-none
15406df26cacSmrg		;;
15416df26cacSmrgesac
15426df26cacSmrgfi
15436df26cacSmrg
15446df26cacSmrg# Here we handle the case where we know the os, and the CPU type, but not the
15456df26cacSmrg# manufacturer.  We pick the logical manufacturer.
15466df26cacSmrgvendor=unknown
15476df26cacSmrgcase $basic_machine in
15486df26cacSmrg	*-unknown)
15496df26cacSmrg		case $os in
15506df26cacSmrg			-riscix*)
15516df26cacSmrg				vendor=acorn
15526df26cacSmrg				;;
15536df26cacSmrg			-sunos*)
15546df26cacSmrg				vendor=sun
15556df26cacSmrg				;;
15566df26cacSmrg			-aix*)
15576df26cacSmrg				vendor=ibm
15586df26cacSmrg				;;
15596df26cacSmrg			-beos*)
15606df26cacSmrg				vendor=be
15616df26cacSmrg				;;
15626df26cacSmrg			-hpux*)
15636df26cacSmrg				vendor=hp
15646df26cacSmrg				;;
15656df26cacSmrg			-mpeix*)
15666df26cacSmrg				vendor=hp
15676df26cacSmrg				;;
15686df26cacSmrg			-hiux*)
15696df26cacSmrg				vendor=hitachi
15706df26cacSmrg				;;
15716df26cacSmrg			-unos*)
15726df26cacSmrg				vendor=crds
15736df26cacSmrg				;;
15746df26cacSmrg			-dgux*)
15756df26cacSmrg				vendor=dg
15766df26cacSmrg				;;
15776df26cacSmrg			-luna*)
15786df26cacSmrg				vendor=omron
15796df26cacSmrg				;;
15806df26cacSmrg			-genix*)
15816df26cacSmrg				vendor=ns
15826df26cacSmrg				;;
15836df26cacSmrg			-mvs* | -opened*)
15846df26cacSmrg				vendor=ibm
15856df26cacSmrg				;;
15866df26cacSmrg			-os400*)
15876df26cacSmrg				vendor=ibm
15886df26cacSmrg				;;
15896df26cacSmrg			-ptx*)
15906df26cacSmrg				vendor=sequent
15916df26cacSmrg				;;
15926df26cacSmrg			-tpf*)
15936df26cacSmrg				vendor=ibm
15946df26cacSmrg				;;
15956df26cacSmrg			-vxsim* | -vxworks* | -windiss*)
15966df26cacSmrg				vendor=wrs
15976df26cacSmrg				;;
15986df26cacSmrg			-aux*)
15996df26cacSmrg				vendor=apple
16006df26cacSmrg				;;
16016df26cacSmrg			-hms*)
16026df26cacSmrg				vendor=hitachi
16036df26cacSmrg				;;
16046df26cacSmrg			-mpw* | -macos*)
16056df26cacSmrg				vendor=apple
16066df26cacSmrg				;;
16076df26cacSmrg			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
16086df26cacSmrg				vendor=atari
16096df26cacSmrg				;;
16106df26cacSmrg			-vos*)
16116df26cacSmrg				vendor=stratus
16126df26cacSmrg				;;
16136df26cacSmrg		esac
16146df26cacSmrg		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
16156df26cacSmrg		;;
16166df26cacSmrgesac
16176df26cacSmrg
16186df26cacSmrgecho $basic_machine$os
16196df26cacSmrgexit
16206df26cacSmrg
16216df26cacSmrg# Local variables:
16226df26cacSmrg# eval: (add-hook 'write-file-hooks 'time-stamp)
16236df26cacSmrg# time-stamp-start: "timestamp='"
16246df26cacSmrg# time-stamp-format: "%:y-%02m-%02d"
16256df26cacSmrg# time-stamp-end: "'"
16266df26cacSmrg# End:
1627