config.sub revision 27702724
127702724Smrg#! /bin/sh 227702724Smrg# Configuration validation subroutine script. 327702724Smrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 427702724Smrg# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 527702724Smrg 627702724Smrgtimestamp='2006-02-23' 727702724Smrg 827702724Smrg# This file is (in principle) common to ALL GNU software. 927702724Smrg# The presence of a machine in this file suggests that SOME GNU software 1027702724Smrg# can handle that machine. It does not imply ALL GNU software can. 1127702724Smrg# 1227702724Smrg# This file is free software; you can redistribute it and/or modify 1327702724Smrg# it under the terms of the GNU General Public License as published by 1427702724Smrg# the Free Software Foundation; either version 2 of the License, or 1527702724Smrg# (at your option) any later version. 1627702724Smrg# 1727702724Smrg# This program is distributed in the hope that it will be useful, 1827702724Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 1927702724Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2027702724Smrg# GNU General Public License for more details. 2127702724Smrg# 2227702724Smrg# You should have received a copy of the GNU General Public License 2327702724Smrg# along with this program; if not, write to the Free Software 2427702724Smrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 2527702724Smrg# 02110-1301, USA. 2627702724Smrg# 2727702724Smrg# As a special exception to the GNU General Public License, if you 2827702724Smrg# distribute this file as part of a program that contains a 2927702724Smrg# configuration script generated by Autoconf, you may include it under 3027702724Smrg# the same distribution terms that you use for the rest of that program. 3127702724Smrg 3227702724Smrg 3327702724Smrg# Please send patches to <config-patches@gnu.org>. Submit a context 3427702724Smrg# diff and a properly formatted ChangeLog entry. 3527702724Smrg# 3627702724Smrg# Configuration subroutine to validate and canonicalize a configuration type. 3727702724Smrg# Supply the specified configuration type as an argument. 3827702724Smrg# If it is invalid, we print an error message on stderr and exit with code 1. 3927702724Smrg# Otherwise, we print the canonical config type on stdout and succeed. 4027702724Smrg 4127702724Smrg# This file is supposed to be the same for all GNU packages 4227702724Smrg# and recognize all the CPU types, system types and aliases 4327702724Smrg# that are meaningful with *any* GNU software. 4427702724Smrg# Each package is responsible for reporting which valid configurations 4527702724Smrg# it does not support. The user should be able to distinguish 4627702724Smrg# a failure to support a valid configuration from a meaningless 4727702724Smrg# configuration. 4827702724Smrg 4927702724Smrg# The goal of this file is to map all the various variations of a given 5027702724Smrg# machine specification into a single specification in the form: 5127702724Smrg# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 5227702724Smrg# or in some cases, the newer four-part form: 5327702724Smrg# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 5427702724Smrg# It is wrong to echo any other type of specification. 5527702724Smrg 5627702724Smrgme=`echo "$0" | sed -e 's,.*/,,'` 5727702724Smrg 5827702724Smrgusage="\ 5927702724SmrgUsage: $0 [OPTION] CPU-MFR-OPSYS 6027702724Smrg $0 [OPTION] ALIAS 6127702724Smrg 6227702724SmrgCanonicalize a configuration name. 6327702724Smrg 6427702724SmrgOperation modes: 6527702724Smrg -h, --help print this help, then exit 6627702724Smrg -t, --time-stamp print date of last modification, then exit 6727702724Smrg -v, --version print version number, then exit 6827702724Smrg 6927702724SmrgReport bugs and patches to <config-patches@gnu.org>." 7027702724Smrg 7127702724Smrgversion="\ 7227702724SmrgGNU config.sub ($timestamp) 7327702724Smrg 7427702724SmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 7527702724SmrgFree Software Foundation, Inc. 7627702724Smrg 7727702724SmrgThis is free software; see the source for copying conditions. There is NO 7827702724Smrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 7927702724Smrg 8027702724Smrghelp=" 8127702724SmrgTry \`$me --help' for more information." 8227702724Smrg 8327702724Smrg# Parse command line 8427702724Smrgwhile test $# -gt 0 ; do 8527702724Smrg case $1 in 8627702724Smrg --time-stamp | --time* | -t ) 8727702724Smrg echo "$timestamp" ; exit ;; 8827702724Smrg --version | -v ) 8927702724Smrg echo "$version" ; exit ;; 9027702724Smrg --help | --h* | -h ) 9127702724Smrg echo "$usage"; exit ;; 9227702724Smrg -- ) # Stop option processing 9327702724Smrg shift; break ;; 9427702724Smrg - ) # Use stdin as input. 9527702724Smrg break ;; 9627702724Smrg -* ) 9727702724Smrg echo "$me: invalid option $1$help" 9827702724Smrg exit 1 ;; 9927702724Smrg 10027702724Smrg *local*) 10127702724Smrg # First pass through any local machine types. 10227702724Smrg echo $1 10327702724Smrg exit ;; 10427702724Smrg 10527702724Smrg * ) 10627702724Smrg break ;; 10727702724Smrg esac 10827702724Smrgdone 10927702724Smrg 11027702724Smrgcase $# in 11127702724Smrg 0) echo "$me: missing argument$help" >&2 11227702724Smrg exit 1;; 11327702724Smrg 1) ;; 11427702724Smrg *) echo "$me: too many arguments$help" >&2 11527702724Smrg exit 1;; 11627702724Smrgesac 11727702724Smrg 11827702724Smrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 11927702724Smrg# Here we must recognize all the valid KERNEL-OS combinations. 12027702724Smrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 12127702724Smrgcase $maybe_os in 12227702724Smrg nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ 12327702724Smrg uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ 12427702724Smrg storm-chaos* | os2-emx* | rtmk-nova*) 12527702724Smrg os=-$maybe_os 12627702724Smrg basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 12727702724Smrg ;; 12827702724Smrg *) 12927702724Smrg basic_machine=`echo $1 | sed 's/-[^-]*$//'` 13027702724Smrg if [ $basic_machine != $1 ] 13127702724Smrg then os=`echo $1 | sed 's/.*-/-/'` 13227702724Smrg else os=; fi 13327702724Smrg ;; 13427702724Smrgesac 13527702724Smrg 13627702724Smrg### Let's recognize common machines as not being operating systems so 13727702724Smrg### that things like config.sub decstation-3100 work. We also 13827702724Smrg### recognize some manufacturers as not being operating systems, so we 13927702724Smrg### can provide default operating systems below. 14027702724Smrgcase $os in 14127702724Smrg -sun*os*) 14227702724Smrg # Prevent following clause from handling this invalid input. 14327702724Smrg ;; 14427702724Smrg -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 14527702724Smrg -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 14627702724Smrg -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 14727702724Smrg -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 14827702724Smrg -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 14927702724Smrg -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 15027702724Smrg -apple | -axis | -knuth | -cray) 15127702724Smrg os= 15227702724Smrg basic_machine=$1 15327702724Smrg ;; 15427702724Smrg -sim | -cisco | -oki | -wec | -winbond) 15527702724Smrg os= 15627702724Smrg basic_machine=$1 15727702724Smrg ;; 15827702724Smrg -scout) 15927702724Smrg ;; 16027702724Smrg -wrs) 16127702724Smrg os=-vxworks 16227702724Smrg basic_machine=$1 16327702724Smrg ;; 16427702724Smrg -chorusos*) 16527702724Smrg os=-chorusos 16627702724Smrg basic_machine=$1 16727702724Smrg ;; 16827702724Smrg -chorusrdb) 16927702724Smrg os=-chorusrdb 17027702724Smrg basic_machine=$1 17127702724Smrg ;; 17227702724Smrg -hiux*) 17327702724Smrg os=-hiuxwe2 17427702724Smrg ;; 17527702724Smrg -sco6) 17627702724Smrg os=-sco5v6 17727702724Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 17827702724Smrg ;; 17927702724Smrg -sco5) 18027702724Smrg os=-sco3.2v5 18127702724Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 18227702724Smrg ;; 18327702724Smrg -sco4) 18427702724Smrg os=-sco3.2v4 18527702724Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 18627702724Smrg ;; 18727702724Smrg -sco3.2.[4-9]*) 18827702724Smrg os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 18927702724Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 19027702724Smrg ;; 19127702724Smrg -sco3.2v[4-9]*) 19227702724Smrg # Don't forget version if it is 3.2v4 or newer. 19327702724Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 19427702724Smrg ;; 19527702724Smrg -sco5v6*) 19627702724Smrg # Don't forget version if it is 3.2v4 or newer. 19727702724Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 19827702724Smrg ;; 19927702724Smrg -sco*) 20027702724Smrg os=-sco3.2v2 20127702724Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 20227702724Smrg ;; 20327702724Smrg -udk*) 20427702724Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 20527702724Smrg ;; 20627702724Smrg -isc) 20727702724Smrg os=-isc2.2 20827702724Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 20927702724Smrg ;; 21027702724Smrg -clix*) 21127702724Smrg basic_machine=clipper-intergraph 21227702724Smrg ;; 21327702724Smrg -isc*) 21427702724Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 21527702724Smrg ;; 21627702724Smrg -lynx*) 21727702724Smrg os=-lynxos 21827702724Smrg ;; 21927702724Smrg -ptx*) 22027702724Smrg basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 22127702724Smrg ;; 22227702724Smrg -windowsnt*) 22327702724Smrg os=`echo $os | sed -e 's/windowsnt/winnt/'` 22427702724Smrg ;; 22527702724Smrg -psos*) 22627702724Smrg os=-psos 22727702724Smrg ;; 22827702724Smrg -mint | -mint[0-9]*) 22927702724Smrg basic_machine=m68k-atari 23027702724Smrg os=-mint 23127702724Smrg ;; 23227702724Smrgesac 23327702724Smrg 23427702724Smrg# Decode aliases for certain CPU-COMPANY combinations. 23527702724Smrgcase $basic_machine in 23627702724Smrg # Recognize the basic CPU types without company name. 23727702724Smrg # Some are omitted here because they have special meanings below. 23827702724Smrg 1750a | 580 \ 23927702724Smrg | a29k \ 24027702724Smrg | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 24127702724Smrg | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 24227702724Smrg | am33_2.0 \ 24327702724Smrg | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ 24427702724Smrg | bfin \ 24527702724Smrg | c4x | clipper \ 24627702724Smrg | d10v | d30v | dlx | dsp16xx \ 24727702724Smrg | fr30 | frv \ 24827702724Smrg | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 24927702724Smrg | i370 | i860 | i960 | ia64 \ 25027702724Smrg | ip2k | iq2000 \ 25127702724Smrg | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \ 25227702724Smrg | mips | mipsbe | mipseb | mipsel | mipsle \ 25327702724Smrg | mips16 \ 25427702724Smrg | mips64 | mips64el \ 25527702724Smrg | mips64vr | mips64vrel \ 25627702724Smrg | mips64orion | mips64orionel \ 25727702724Smrg | mips64vr4100 | mips64vr4100el \ 25827702724Smrg | mips64vr4300 | mips64vr4300el \ 25927702724Smrg | mips64vr5000 | mips64vr5000el \ 26027702724Smrg | mips64vr5900 | mips64vr5900el \ 26127702724Smrg | mipsisa32 | mipsisa32el \ 26227702724Smrg | mipsisa32r2 | mipsisa32r2el \ 26327702724Smrg | mipsisa64 | mipsisa64el \ 26427702724Smrg | mipsisa64r2 | mipsisa64r2el \ 26527702724Smrg | mipsisa64sb1 | mipsisa64sb1el \ 26627702724Smrg | mipsisa64sr71k | mipsisa64sr71kel \ 26727702724Smrg | mipstx39 | mipstx39el \ 26827702724Smrg | mn10200 | mn10300 \ 26927702724Smrg | mt \ 27027702724Smrg | msp430 \ 27127702724Smrg | nios | nios2 \ 27227702724Smrg | ns16k | ns32k \ 27327702724Smrg | or32 \ 27427702724Smrg | pdp10 | pdp11 | pj | pjl \ 27527702724Smrg | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 27627702724Smrg | pyramid \ 27727702724Smrg | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ 27827702724Smrg | sh64 | sh64le \ 27927702724Smrg | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ 28027702724Smrg | sparcv8 | sparcv9 | sparcv9b \ 28127702724Smrg | strongarm \ 28227702724Smrg | tahoe | thumb | tic4x | tic80 | tron \ 28327702724Smrg | v850 | v850e \ 28427702724Smrg | we32k \ 28527702724Smrg | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ 28627702724Smrg | z8k) 28727702724Smrg basic_machine=$basic_machine-unknown 28827702724Smrg ;; 28927702724Smrg m32c) 29027702724Smrg basic_machine=$basic_machine-unknown 29127702724Smrg ;; 29227702724Smrg m6811 | m68hc11 | m6812 | m68hc12) 29327702724Smrg # Motorola 68HC11/12. 29427702724Smrg basic_machine=$basic_machine-unknown 29527702724Smrg os=-none 29627702724Smrg ;; 29727702724Smrg m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 29827702724Smrg ;; 29927702724Smrg ms1) 30027702724Smrg basic_machine=mt-unknown 30127702724Smrg ;; 30227702724Smrg 30327702724Smrg # We use `pc' rather than `unknown' 30427702724Smrg # because (1) that's what they normally are, and 30527702724Smrg # (2) the word "unknown" tends to confuse beginning users. 30627702724Smrg i*86 | x86_64) 30727702724Smrg basic_machine=$basic_machine-pc 30827702724Smrg ;; 30927702724Smrg # Object if more than one company name word. 31027702724Smrg *-*-*) 31127702724Smrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 31227702724Smrg exit 1 31327702724Smrg ;; 31427702724Smrg # Recognize the basic CPU types with company name. 31527702724Smrg 580-* \ 31627702724Smrg | a29k-* \ 31727702724Smrg | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 31827702724Smrg | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 31927702724Smrg | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 32027702724Smrg | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 32127702724Smrg | avr-* \ 32227702724Smrg | bfin-* | bs2000-* \ 32327702724Smrg | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 32427702724Smrg | clipper-* | craynv-* | cydra-* \ 32527702724Smrg | d10v-* | d30v-* | dlx-* \ 32627702724Smrg | elxsi-* \ 32727702724Smrg | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ 32827702724Smrg | h8300-* | h8500-* \ 32927702724Smrg | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 33027702724Smrg | i*86-* | i860-* | i960-* | ia64-* \ 33127702724Smrg | ip2k-* | iq2000-* \ 33227702724Smrg | m32r-* | m32rle-* \ 33327702724Smrg | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 33427702724Smrg | m88110-* | m88k-* | maxq-* | mcore-* \ 33527702724Smrg | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 33627702724Smrg | mips16-* \ 33727702724Smrg | mips64-* | mips64el-* \ 33827702724Smrg | mips64vr-* | mips64vrel-* \ 33927702724Smrg | mips64orion-* | mips64orionel-* \ 34027702724Smrg | mips64vr4100-* | mips64vr4100el-* \ 34127702724Smrg | mips64vr4300-* | mips64vr4300el-* \ 34227702724Smrg | mips64vr5000-* | mips64vr5000el-* \ 34327702724Smrg | mips64vr5900-* | mips64vr5900el-* \ 34427702724Smrg | mipsisa32-* | mipsisa32el-* \ 34527702724Smrg | mipsisa32r2-* | mipsisa32r2el-* \ 34627702724Smrg | mipsisa64-* | mipsisa64el-* \ 34727702724Smrg | mipsisa64r2-* | mipsisa64r2el-* \ 34827702724Smrg | mipsisa64sb1-* | mipsisa64sb1el-* \ 34927702724Smrg | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 35027702724Smrg | mipstx39-* | mipstx39el-* \ 35127702724Smrg | mmix-* \ 35227702724Smrg | mt-* \ 35327702724Smrg | msp430-* \ 35427702724Smrg | nios-* | nios2-* \ 35527702724Smrg | none-* | np1-* | ns16k-* | ns32k-* \ 35627702724Smrg | orion-* \ 35727702724Smrg | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 35827702724Smrg | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 35927702724Smrg | pyramid-* \ 36027702724Smrg | romp-* | rs6000-* \ 36127702724Smrg | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ 36227702724Smrg | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 36327702724Smrg | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ 36427702724Smrg | sparclite-* \ 36527702724Smrg | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ 36627702724Smrg | tahoe-* | thumb-* \ 36727702724Smrg | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 36827702724Smrg | tron-* \ 36927702724Smrg | v850-* | v850e-* | vax-* \ 37027702724Smrg | we32k-* \ 37127702724Smrg | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ 37227702724Smrg | xstormy16-* | xtensa-* \ 37327702724Smrg | ymp-* \ 37427702724Smrg | z8k-*) 37527702724Smrg ;; 37627702724Smrg m32c-*) 37727702724Smrg ;; 37827702724Smrg # Recognize the various machine names and aliases which stand 37927702724Smrg # for a CPU type and a company and sometimes even an OS. 38027702724Smrg 386bsd) 38127702724Smrg basic_machine=i386-unknown 38227702724Smrg os=-bsd 38327702724Smrg ;; 38427702724Smrg 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 38527702724Smrg basic_machine=m68000-att 38627702724Smrg ;; 38727702724Smrg 3b*) 38827702724Smrg basic_machine=we32k-att 38927702724Smrg ;; 39027702724Smrg a29khif) 39127702724Smrg basic_machine=a29k-amd 39227702724Smrg os=-udi 39327702724Smrg ;; 39427702724Smrg abacus) 39527702724Smrg basic_machine=abacus-unknown 39627702724Smrg ;; 39727702724Smrg adobe68k) 39827702724Smrg basic_machine=m68010-adobe 39927702724Smrg os=-scout 40027702724Smrg ;; 40127702724Smrg alliant | fx80) 40227702724Smrg basic_machine=fx80-alliant 40327702724Smrg ;; 40427702724Smrg altos | altos3068) 40527702724Smrg basic_machine=m68k-altos 40627702724Smrg ;; 40727702724Smrg am29k) 40827702724Smrg basic_machine=a29k-none 40927702724Smrg os=-bsd 41027702724Smrg ;; 41127702724Smrg amd64) 41227702724Smrg basic_machine=x86_64-pc 41327702724Smrg ;; 41427702724Smrg amd64-*) 41527702724Smrg basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 41627702724Smrg ;; 41727702724Smrg amdahl) 41827702724Smrg basic_machine=580-amdahl 41927702724Smrg os=-sysv 42027702724Smrg ;; 42127702724Smrg amiga | amiga-*) 42227702724Smrg basic_machine=m68k-unknown 42327702724Smrg ;; 42427702724Smrg amigaos | amigados) 42527702724Smrg basic_machine=m68k-unknown 42627702724Smrg os=-amigaos 42727702724Smrg ;; 42827702724Smrg amigaunix | amix) 42927702724Smrg basic_machine=m68k-unknown 43027702724Smrg os=-sysv4 43127702724Smrg ;; 43227702724Smrg apollo68) 43327702724Smrg basic_machine=m68k-apollo 43427702724Smrg os=-sysv 43527702724Smrg ;; 43627702724Smrg apollo68bsd) 43727702724Smrg basic_machine=m68k-apollo 43827702724Smrg os=-bsd 43927702724Smrg ;; 44027702724Smrg aux) 44127702724Smrg basic_machine=m68k-apple 44227702724Smrg os=-aux 44327702724Smrg ;; 44427702724Smrg balance) 44527702724Smrg basic_machine=ns32k-sequent 44627702724Smrg os=-dynix 44727702724Smrg ;; 44827702724Smrg c90) 44927702724Smrg basic_machine=c90-cray 45027702724Smrg os=-unicos 45127702724Smrg ;; 45227702724Smrg convex-c1) 45327702724Smrg basic_machine=c1-convex 45427702724Smrg os=-bsd 45527702724Smrg ;; 45627702724Smrg convex-c2) 45727702724Smrg basic_machine=c2-convex 45827702724Smrg os=-bsd 45927702724Smrg ;; 46027702724Smrg convex-c32) 46127702724Smrg basic_machine=c32-convex 46227702724Smrg os=-bsd 46327702724Smrg ;; 46427702724Smrg convex-c34) 46527702724Smrg basic_machine=c34-convex 46627702724Smrg os=-bsd 46727702724Smrg ;; 46827702724Smrg convex-c38) 46927702724Smrg basic_machine=c38-convex 47027702724Smrg os=-bsd 47127702724Smrg ;; 47227702724Smrg cray | j90) 47327702724Smrg basic_machine=j90-cray 47427702724Smrg os=-unicos 47527702724Smrg ;; 47627702724Smrg craynv) 47727702724Smrg basic_machine=craynv-cray 47827702724Smrg os=-unicosmp 47927702724Smrg ;; 48027702724Smrg cr16c) 48127702724Smrg basic_machine=cr16c-unknown 48227702724Smrg os=-elf 48327702724Smrg ;; 48427702724Smrg crds | unos) 48527702724Smrg basic_machine=m68k-crds 48627702724Smrg ;; 48727702724Smrg crisv32 | crisv32-* | etraxfs*) 48827702724Smrg basic_machine=crisv32-axis 48927702724Smrg ;; 49027702724Smrg cris | cris-* | etrax*) 49127702724Smrg basic_machine=cris-axis 49227702724Smrg ;; 49327702724Smrg crx) 49427702724Smrg basic_machine=crx-unknown 49527702724Smrg os=-elf 49627702724Smrg ;; 49727702724Smrg da30 | da30-*) 49827702724Smrg basic_machine=m68k-da30 49927702724Smrg ;; 50027702724Smrg decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 50127702724Smrg basic_machine=mips-dec 50227702724Smrg ;; 50327702724Smrg decsystem10* | dec10*) 50427702724Smrg basic_machine=pdp10-dec 50527702724Smrg os=-tops10 50627702724Smrg ;; 50727702724Smrg decsystem20* | dec20*) 50827702724Smrg basic_machine=pdp10-dec 50927702724Smrg os=-tops20 51027702724Smrg ;; 51127702724Smrg delta | 3300 | motorola-3300 | motorola-delta \ 51227702724Smrg | 3300-motorola | delta-motorola) 51327702724Smrg basic_machine=m68k-motorola 51427702724Smrg ;; 51527702724Smrg delta88) 51627702724Smrg basic_machine=m88k-motorola 51727702724Smrg os=-sysv3 51827702724Smrg ;; 51927702724Smrg djgpp) 52027702724Smrg basic_machine=i586-pc 52127702724Smrg os=-msdosdjgpp 52227702724Smrg ;; 52327702724Smrg dpx20 | dpx20-*) 52427702724Smrg basic_machine=rs6000-bull 52527702724Smrg os=-bosx 52627702724Smrg ;; 52727702724Smrg dpx2* | dpx2*-bull) 52827702724Smrg basic_machine=m68k-bull 52927702724Smrg os=-sysv3 53027702724Smrg ;; 53127702724Smrg ebmon29k) 53227702724Smrg basic_machine=a29k-amd 53327702724Smrg os=-ebmon 53427702724Smrg ;; 53527702724Smrg elxsi) 53627702724Smrg basic_machine=elxsi-elxsi 53727702724Smrg os=-bsd 53827702724Smrg ;; 53927702724Smrg encore | umax | mmax) 54027702724Smrg basic_machine=ns32k-encore 54127702724Smrg ;; 54227702724Smrg es1800 | OSE68k | ose68k | ose | OSE) 54327702724Smrg basic_machine=m68k-ericsson 54427702724Smrg os=-ose 54527702724Smrg ;; 54627702724Smrg fx2800) 54727702724Smrg basic_machine=i860-alliant 54827702724Smrg ;; 54927702724Smrg genix) 55027702724Smrg basic_machine=ns32k-ns 55127702724Smrg ;; 55227702724Smrg gmicro) 55327702724Smrg basic_machine=tron-gmicro 55427702724Smrg os=-sysv 55527702724Smrg ;; 55627702724Smrg go32) 55727702724Smrg basic_machine=i386-pc 55827702724Smrg os=-go32 55927702724Smrg ;; 56027702724Smrg h3050r* | hiux*) 56127702724Smrg basic_machine=hppa1.1-hitachi 56227702724Smrg os=-hiuxwe2 56327702724Smrg ;; 56427702724Smrg h8300hms) 56527702724Smrg basic_machine=h8300-hitachi 56627702724Smrg os=-hms 56727702724Smrg ;; 56827702724Smrg h8300xray) 56927702724Smrg basic_machine=h8300-hitachi 57027702724Smrg os=-xray 57127702724Smrg ;; 57227702724Smrg h8500hms) 57327702724Smrg basic_machine=h8500-hitachi 57427702724Smrg os=-hms 57527702724Smrg ;; 57627702724Smrg harris) 57727702724Smrg basic_machine=m88k-harris 57827702724Smrg os=-sysv3 57927702724Smrg ;; 58027702724Smrg hp300-*) 58127702724Smrg basic_machine=m68k-hp 58227702724Smrg ;; 58327702724Smrg hp300bsd) 58427702724Smrg basic_machine=m68k-hp 58527702724Smrg os=-bsd 58627702724Smrg ;; 58727702724Smrg hp300hpux) 58827702724Smrg basic_machine=m68k-hp 58927702724Smrg os=-hpux 59027702724Smrg ;; 59127702724Smrg hp3k9[0-9][0-9] | hp9[0-9][0-9]) 59227702724Smrg basic_machine=hppa1.0-hp 59327702724Smrg ;; 59427702724Smrg hp9k2[0-9][0-9] | hp9k31[0-9]) 59527702724Smrg basic_machine=m68000-hp 59627702724Smrg ;; 59727702724Smrg hp9k3[2-9][0-9]) 59827702724Smrg basic_machine=m68k-hp 59927702724Smrg ;; 60027702724Smrg hp9k6[0-9][0-9] | hp6[0-9][0-9]) 60127702724Smrg basic_machine=hppa1.0-hp 60227702724Smrg ;; 60327702724Smrg hp9k7[0-79][0-9] | hp7[0-79][0-9]) 60427702724Smrg basic_machine=hppa1.1-hp 60527702724Smrg ;; 60627702724Smrg hp9k78[0-9] | hp78[0-9]) 60727702724Smrg # FIXME: really hppa2.0-hp 60827702724Smrg basic_machine=hppa1.1-hp 60927702724Smrg ;; 61027702724Smrg hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 61127702724Smrg # FIXME: really hppa2.0-hp 61227702724Smrg basic_machine=hppa1.1-hp 61327702724Smrg ;; 61427702724Smrg hp9k8[0-9][13679] | hp8[0-9][13679]) 61527702724Smrg basic_machine=hppa1.1-hp 61627702724Smrg ;; 61727702724Smrg hp9k8[0-9][0-9] | hp8[0-9][0-9]) 61827702724Smrg basic_machine=hppa1.0-hp 61927702724Smrg ;; 62027702724Smrg hppa-next) 62127702724Smrg os=-nextstep3 62227702724Smrg ;; 62327702724Smrg hppaosf) 62427702724Smrg basic_machine=hppa1.1-hp 62527702724Smrg os=-osf 62627702724Smrg ;; 62727702724Smrg hppro) 62827702724Smrg basic_machine=hppa1.1-hp 62927702724Smrg os=-proelf 63027702724Smrg ;; 63127702724Smrg i370-ibm* | ibm*) 63227702724Smrg basic_machine=i370-ibm 63327702724Smrg ;; 63427702724Smrg# I'm not sure what "Sysv32" means. Should this be sysv3.2? 63527702724Smrg i*86v32) 63627702724Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 63727702724Smrg os=-sysv32 63827702724Smrg ;; 63927702724Smrg i*86v4*) 64027702724Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 64127702724Smrg os=-sysv4 64227702724Smrg ;; 64327702724Smrg i*86v) 64427702724Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 64527702724Smrg os=-sysv 64627702724Smrg ;; 64727702724Smrg i*86sol2) 64827702724Smrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 64927702724Smrg os=-solaris2 65027702724Smrg ;; 65127702724Smrg i386mach) 65227702724Smrg basic_machine=i386-mach 65327702724Smrg os=-mach 65427702724Smrg ;; 65527702724Smrg i386-vsta | vsta) 65627702724Smrg basic_machine=i386-unknown 65727702724Smrg os=-vsta 65827702724Smrg ;; 65927702724Smrg iris | iris4d) 66027702724Smrg basic_machine=mips-sgi 66127702724Smrg case $os in 66227702724Smrg -irix*) 66327702724Smrg ;; 66427702724Smrg *) 66527702724Smrg os=-irix4 66627702724Smrg ;; 66727702724Smrg esac 66827702724Smrg ;; 66927702724Smrg isi68 | isi) 67027702724Smrg basic_machine=m68k-isi 67127702724Smrg os=-sysv 67227702724Smrg ;; 67327702724Smrg m88k-omron*) 67427702724Smrg basic_machine=m88k-omron 67527702724Smrg ;; 67627702724Smrg magnum | m3230) 67727702724Smrg basic_machine=mips-mips 67827702724Smrg os=-sysv 67927702724Smrg ;; 68027702724Smrg merlin) 68127702724Smrg basic_machine=ns32k-utek 68227702724Smrg os=-sysv 68327702724Smrg ;; 68427702724Smrg mingw32) 68527702724Smrg basic_machine=i386-pc 68627702724Smrg os=-mingw32 68727702724Smrg ;; 68827702724Smrg miniframe) 68927702724Smrg basic_machine=m68000-convergent 69027702724Smrg ;; 69127702724Smrg *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 69227702724Smrg basic_machine=m68k-atari 69327702724Smrg os=-mint 69427702724Smrg ;; 69527702724Smrg mips3*-*) 69627702724Smrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 69727702724Smrg ;; 69827702724Smrg mips3*) 69927702724Smrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 70027702724Smrg ;; 70127702724Smrg monitor) 70227702724Smrg basic_machine=m68k-rom68k 70327702724Smrg os=-coff 70427702724Smrg ;; 70527702724Smrg morphos) 70627702724Smrg basic_machine=powerpc-unknown 70727702724Smrg os=-morphos 70827702724Smrg ;; 70927702724Smrg msdos) 71027702724Smrg basic_machine=i386-pc 71127702724Smrg os=-msdos 71227702724Smrg ;; 71327702724Smrg ms1-*) 71427702724Smrg basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 71527702724Smrg ;; 71627702724Smrg mvs) 71727702724Smrg basic_machine=i370-ibm 71827702724Smrg os=-mvs 71927702724Smrg ;; 72027702724Smrg ncr3000) 72127702724Smrg basic_machine=i486-ncr 72227702724Smrg os=-sysv4 72327702724Smrg ;; 72427702724Smrg netbsd386) 72527702724Smrg basic_machine=i386-unknown 72627702724Smrg os=-netbsd 72727702724Smrg ;; 72827702724Smrg netwinder) 72927702724Smrg basic_machine=armv4l-rebel 73027702724Smrg os=-linux 73127702724Smrg ;; 73227702724Smrg news | news700 | news800 | news900) 73327702724Smrg basic_machine=m68k-sony 73427702724Smrg os=-newsos 73527702724Smrg ;; 73627702724Smrg news1000) 73727702724Smrg basic_machine=m68030-sony 73827702724Smrg os=-newsos 73927702724Smrg ;; 74027702724Smrg news-3600 | risc-news) 74127702724Smrg basic_machine=mips-sony 74227702724Smrg os=-newsos 74327702724Smrg ;; 74427702724Smrg necv70) 74527702724Smrg basic_machine=v70-nec 74627702724Smrg os=-sysv 74727702724Smrg ;; 74827702724Smrg next | m*-next ) 74927702724Smrg basic_machine=m68k-next 75027702724Smrg case $os in 75127702724Smrg -nextstep* ) 75227702724Smrg ;; 75327702724Smrg -ns2*) 75427702724Smrg os=-nextstep2 75527702724Smrg ;; 75627702724Smrg *) 75727702724Smrg os=-nextstep3 75827702724Smrg ;; 75927702724Smrg esac 76027702724Smrg ;; 76127702724Smrg nh3000) 76227702724Smrg basic_machine=m68k-harris 76327702724Smrg os=-cxux 76427702724Smrg ;; 76527702724Smrg nh[45]000) 76627702724Smrg basic_machine=m88k-harris 76727702724Smrg os=-cxux 76827702724Smrg ;; 76927702724Smrg nindy960) 77027702724Smrg basic_machine=i960-intel 77127702724Smrg os=-nindy 77227702724Smrg ;; 77327702724Smrg mon960) 77427702724Smrg basic_machine=i960-intel 77527702724Smrg os=-mon960 77627702724Smrg ;; 77727702724Smrg nonstopux) 77827702724Smrg basic_machine=mips-compaq 77927702724Smrg os=-nonstopux 78027702724Smrg ;; 78127702724Smrg np1) 78227702724Smrg basic_machine=np1-gould 78327702724Smrg ;; 78427702724Smrg nsr-tandem) 78527702724Smrg basic_machine=nsr-tandem 78627702724Smrg ;; 78727702724Smrg op50n-* | op60c-*) 78827702724Smrg basic_machine=hppa1.1-oki 78927702724Smrg os=-proelf 79027702724Smrg ;; 79127702724Smrg openrisc | openrisc-*) 79227702724Smrg basic_machine=or32-unknown 79327702724Smrg ;; 79427702724Smrg os400) 79527702724Smrg basic_machine=powerpc-ibm 79627702724Smrg os=-os400 79727702724Smrg ;; 79827702724Smrg OSE68000 | ose68000) 79927702724Smrg basic_machine=m68000-ericsson 80027702724Smrg os=-ose 80127702724Smrg ;; 80227702724Smrg os68k) 80327702724Smrg basic_machine=m68k-none 80427702724Smrg os=-os68k 80527702724Smrg ;; 80627702724Smrg pa-hitachi) 80727702724Smrg basic_machine=hppa1.1-hitachi 80827702724Smrg os=-hiuxwe2 80927702724Smrg ;; 81027702724Smrg paragon) 81127702724Smrg basic_machine=i860-intel 81227702724Smrg os=-osf 81327702724Smrg ;; 81427702724Smrg pbd) 81527702724Smrg basic_machine=sparc-tti 81627702724Smrg ;; 81727702724Smrg pbb) 81827702724Smrg basic_machine=m68k-tti 81927702724Smrg ;; 82027702724Smrg pc532 | pc532-*) 82127702724Smrg basic_machine=ns32k-pc532 82227702724Smrg ;; 82327702724Smrg pc98) 82427702724Smrg basic_machine=i386-pc 82527702724Smrg ;; 82627702724Smrg pc98-*) 82727702724Smrg basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 82827702724Smrg ;; 82927702724Smrg pentium | p5 | k5 | k6 | nexgen | viac3) 83027702724Smrg basic_machine=i586-pc 83127702724Smrg ;; 83227702724Smrg pentiumpro | p6 | 6x86 | athlon | athlon_*) 83327702724Smrg basic_machine=i686-pc 83427702724Smrg ;; 83527702724Smrg pentiumii | pentium2 | pentiumiii | pentium3) 83627702724Smrg basic_machine=i686-pc 83727702724Smrg ;; 83827702724Smrg pentium4) 83927702724Smrg basic_machine=i786-pc 84027702724Smrg ;; 84127702724Smrg pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 84227702724Smrg basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 84327702724Smrg ;; 84427702724Smrg pentiumpro-* | p6-* | 6x86-* | athlon-*) 84527702724Smrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 84627702724Smrg ;; 84727702724Smrg pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 84827702724Smrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 84927702724Smrg ;; 85027702724Smrg pentium4-*) 85127702724Smrg basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 85227702724Smrg ;; 85327702724Smrg pn) 85427702724Smrg basic_machine=pn-gould 85527702724Smrg ;; 85627702724Smrg power) basic_machine=power-ibm 85727702724Smrg ;; 85827702724Smrg ppc) basic_machine=powerpc-unknown 85927702724Smrg ;; 86027702724Smrg ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 86127702724Smrg ;; 86227702724Smrg ppcle | powerpclittle | ppc-le | powerpc-little) 86327702724Smrg basic_machine=powerpcle-unknown 86427702724Smrg ;; 86527702724Smrg ppcle-* | powerpclittle-*) 86627702724Smrg basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 86727702724Smrg ;; 86827702724Smrg ppc64) basic_machine=powerpc64-unknown 86927702724Smrg ;; 87027702724Smrg ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 87127702724Smrg ;; 87227702724Smrg ppc64le | powerpc64little | ppc64-le | powerpc64-little) 87327702724Smrg basic_machine=powerpc64le-unknown 87427702724Smrg ;; 87527702724Smrg ppc64le-* | powerpc64little-*) 87627702724Smrg basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 87727702724Smrg ;; 87827702724Smrg ps2) 87927702724Smrg basic_machine=i386-ibm 88027702724Smrg ;; 88127702724Smrg pw32) 88227702724Smrg basic_machine=i586-unknown 88327702724Smrg os=-pw32 88427702724Smrg ;; 88527702724Smrg rdos) 88627702724Smrg basic_machine=i386-pc 88727702724Smrg os=-rdos 88827702724Smrg ;; 88927702724Smrg rom68k) 89027702724Smrg basic_machine=m68k-rom68k 89127702724Smrg os=-coff 89227702724Smrg ;; 89327702724Smrg rm[46]00) 89427702724Smrg basic_machine=mips-siemens 89527702724Smrg ;; 89627702724Smrg rtpc | rtpc-*) 89727702724Smrg basic_machine=romp-ibm 89827702724Smrg ;; 89927702724Smrg s390 | s390-*) 90027702724Smrg basic_machine=s390-ibm 90127702724Smrg ;; 90227702724Smrg s390x | s390x-*) 90327702724Smrg basic_machine=s390x-ibm 90427702724Smrg ;; 90527702724Smrg sa29200) 90627702724Smrg basic_machine=a29k-amd 90727702724Smrg os=-udi 90827702724Smrg ;; 90927702724Smrg sb1) 91027702724Smrg basic_machine=mipsisa64sb1-unknown 91127702724Smrg ;; 91227702724Smrg sb1el) 91327702724Smrg basic_machine=mipsisa64sb1el-unknown 91427702724Smrg ;; 91527702724Smrg sei) 91627702724Smrg basic_machine=mips-sei 91727702724Smrg os=-seiux 91827702724Smrg ;; 91927702724Smrg sequent) 92027702724Smrg basic_machine=i386-sequent 92127702724Smrg ;; 92227702724Smrg sh) 92327702724Smrg basic_machine=sh-hitachi 92427702724Smrg os=-hms 92527702724Smrg ;; 92627702724Smrg sh64) 92727702724Smrg basic_machine=sh64-unknown 92827702724Smrg ;; 92927702724Smrg sparclite-wrs | simso-wrs) 93027702724Smrg basic_machine=sparclite-wrs 93127702724Smrg os=-vxworks 93227702724Smrg ;; 93327702724Smrg sps7) 93427702724Smrg basic_machine=m68k-bull 93527702724Smrg os=-sysv2 93627702724Smrg ;; 93727702724Smrg spur) 93827702724Smrg basic_machine=spur-unknown 93927702724Smrg ;; 94027702724Smrg st2000) 94127702724Smrg basic_machine=m68k-tandem 94227702724Smrg ;; 94327702724Smrg stratus) 94427702724Smrg basic_machine=i860-stratus 94527702724Smrg os=-sysv4 94627702724Smrg ;; 94727702724Smrg sun2) 94827702724Smrg basic_machine=m68000-sun 94927702724Smrg ;; 95027702724Smrg sun2os3) 95127702724Smrg basic_machine=m68000-sun 95227702724Smrg os=-sunos3 95327702724Smrg ;; 95427702724Smrg sun2os4) 95527702724Smrg basic_machine=m68000-sun 95627702724Smrg os=-sunos4 95727702724Smrg ;; 95827702724Smrg sun3os3) 95927702724Smrg basic_machine=m68k-sun 96027702724Smrg os=-sunos3 96127702724Smrg ;; 96227702724Smrg sun3os4) 96327702724Smrg basic_machine=m68k-sun 96427702724Smrg os=-sunos4 96527702724Smrg ;; 96627702724Smrg sun4os3) 96727702724Smrg basic_machine=sparc-sun 96827702724Smrg os=-sunos3 96927702724Smrg ;; 97027702724Smrg sun4os4) 97127702724Smrg basic_machine=sparc-sun 97227702724Smrg os=-sunos4 97327702724Smrg ;; 97427702724Smrg sun4sol2) 97527702724Smrg basic_machine=sparc-sun 97627702724Smrg os=-solaris2 97727702724Smrg ;; 97827702724Smrg sun3 | sun3-*) 97927702724Smrg basic_machine=m68k-sun 98027702724Smrg ;; 98127702724Smrg sun4) 98227702724Smrg basic_machine=sparc-sun 98327702724Smrg ;; 98427702724Smrg sun386 | sun386i | roadrunner) 98527702724Smrg basic_machine=i386-sun 98627702724Smrg ;; 98727702724Smrg sv1) 98827702724Smrg basic_machine=sv1-cray 98927702724Smrg os=-unicos 99027702724Smrg ;; 99127702724Smrg symmetry) 99227702724Smrg basic_machine=i386-sequent 99327702724Smrg os=-dynix 99427702724Smrg ;; 99527702724Smrg t3e) 99627702724Smrg basic_machine=alphaev5-cray 99727702724Smrg os=-unicos 99827702724Smrg ;; 99927702724Smrg t90) 100027702724Smrg basic_machine=t90-cray 100127702724Smrg os=-unicos 100227702724Smrg ;; 100327702724Smrg tic54x | c54x*) 100427702724Smrg basic_machine=tic54x-unknown 100527702724Smrg os=-coff 100627702724Smrg ;; 100727702724Smrg tic55x | c55x*) 100827702724Smrg basic_machine=tic55x-unknown 100927702724Smrg os=-coff 101027702724Smrg ;; 101127702724Smrg tic6x | c6x*) 101227702724Smrg basic_machine=tic6x-unknown 101327702724Smrg os=-coff 101427702724Smrg ;; 101527702724Smrg tx39) 101627702724Smrg basic_machine=mipstx39-unknown 101727702724Smrg ;; 101827702724Smrg tx39el) 101927702724Smrg basic_machine=mipstx39el-unknown 102027702724Smrg ;; 102127702724Smrg toad1) 102227702724Smrg basic_machine=pdp10-xkl 102327702724Smrg os=-tops20 102427702724Smrg ;; 102527702724Smrg tower | tower-32) 102627702724Smrg basic_machine=m68k-ncr 102727702724Smrg ;; 102827702724Smrg tpf) 102927702724Smrg basic_machine=s390x-ibm 103027702724Smrg os=-tpf 103127702724Smrg ;; 103227702724Smrg udi29k) 103327702724Smrg basic_machine=a29k-amd 103427702724Smrg os=-udi 103527702724Smrg ;; 103627702724Smrg ultra3) 103727702724Smrg basic_machine=a29k-nyu 103827702724Smrg os=-sym1 103927702724Smrg ;; 104027702724Smrg v810 | necv810) 104127702724Smrg basic_machine=v810-nec 104227702724Smrg os=-none 104327702724Smrg ;; 104427702724Smrg vaxv) 104527702724Smrg basic_machine=vax-dec 104627702724Smrg os=-sysv 104727702724Smrg ;; 104827702724Smrg vms) 104927702724Smrg basic_machine=vax-dec 105027702724Smrg os=-vms 105127702724Smrg ;; 105227702724Smrg vpp*|vx|vx-*) 105327702724Smrg basic_machine=f301-fujitsu 105427702724Smrg ;; 105527702724Smrg vxworks960) 105627702724Smrg basic_machine=i960-wrs 105727702724Smrg os=-vxworks 105827702724Smrg ;; 105927702724Smrg vxworks68) 106027702724Smrg basic_machine=m68k-wrs 106127702724Smrg os=-vxworks 106227702724Smrg ;; 106327702724Smrg vxworks29k) 106427702724Smrg basic_machine=a29k-wrs 106527702724Smrg os=-vxworks 106627702724Smrg ;; 106727702724Smrg w65*) 106827702724Smrg basic_machine=w65-wdc 106927702724Smrg os=-none 107027702724Smrg ;; 107127702724Smrg w89k-*) 107227702724Smrg basic_machine=hppa1.1-winbond 107327702724Smrg os=-proelf 107427702724Smrg ;; 107527702724Smrg xbox) 107627702724Smrg basic_machine=i686-pc 107727702724Smrg os=-mingw32 107827702724Smrg ;; 107927702724Smrg xps | xps100) 108027702724Smrg basic_machine=xps100-honeywell 108127702724Smrg ;; 108227702724Smrg ymp) 108327702724Smrg basic_machine=ymp-cray 108427702724Smrg os=-unicos 108527702724Smrg ;; 108627702724Smrg z8k-*-coff) 108727702724Smrg basic_machine=z8k-unknown 108827702724Smrg os=-sim 108927702724Smrg ;; 109027702724Smrg none) 109127702724Smrg basic_machine=none-none 109227702724Smrg os=-none 109327702724Smrg ;; 109427702724Smrg 109527702724Smrg# Here we handle the default manufacturer of certain CPU types. It is in 109627702724Smrg# some cases the only manufacturer, in others, it is the most popular. 109727702724Smrg w89k) 109827702724Smrg basic_machine=hppa1.1-winbond 109927702724Smrg ;; 110027702724Smrg op50n) 110127702724Smrg basic_machine=hppa1.1-oki 110227702724Smrg ;; 110327702724Smrg op60c) 110427702724Smrg basic_machine=hppa1.1-oki 110527702724Smrg ;; 110627702724Smrg romp) 110727702724Smrg basic_machine=romp-ibm 110827702724Smrg ;; 110927702724Smrg mmix) 111027702724Smrg basic_machine=mmix-knuth 111127702724Smrg ;; 111227702724Smrg rs6000) 111327702724Smrg basic_machine=rs6000-ibm 111427702724Smrg ;; 111527702724Smrg vax) 111627702724Smrg basic_machine=vax-dec 111727702724Smrg ;; 111827702724Smrg pdp10) 111927702724Smrg # there are many clones, so DEC is not a safe bet 112027702724Smrg basic_machine=pdp10-unknown 112127702724Smrg ;; 112227702724Smrg pdp11) 112327702724Smrg basic_machine=pdp11-dec 112427702724Smrg ;; 112527702724Smrg we32k) 112627702724Smrg basic_machine=we32k-att 112727702724Smrg ;; 112827702724Smrg sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) 112927702724Smrg basic_machine=sh-unknown 113027702724Smrg ;; 113127702724Smrg sparc | sparcv8 | sparcv9 | sparcv9b) 113227702724Smrg basic_machine=sparc-sun 113327702724Smrg ;; 113427702724Smrg cydra) 113527702724Smrg basic_machine=cydra-cydrome 113627702724Smrg ;; 113727702724Smrg orion) 113827702724Smrg basic_machine=orion-highlevel 113927702724Smrg ;; 114027702724Smrg orion105) 114127702724Smrg basic_machine=clipper-highlevel 114227702724Smrg ;; 114327702724Smrg mac | mpw | mac-mpw) 114427702724Smrg basic_machine=m68k-apple 114527702724Smrg ;; 114627702724Smrg pmac | pmac-mpw) 114727702724Smrg basic_machine=powerpc-apple 114827702724Smrg ;; 114927702724Smrg *-unknown) 115027702724Smrg # Make sure to match an already-canonicalized machine name. 115127702724Smrg ;; 115227702724Smrg *) 115327702724Smrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 115427702724Smrg exit 1 115527702724Smrg ;; 115627702724Smrgesac 115727702724Smrg 115827702724Smrg# Here we canonicalize certain aliases for manufacturers. 115927702724Smrgcase $basic_machine in 116027702724Smrg *-digital*) 116127702724Smrg basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 116227702724Smrg ;; 116327702724Smrg *-commodore*) 116427702724Smrg basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 116527702724Smrg ;; 116627702724Smrg *) 116727702724Smrg ;; 116827702724Smrgesac 116927702724Smrg 117027702724Smrg# Decode manufacturer-specific aliases for certain operating systems. 117127702724Smrg 117227702724Smrgif [ x"$os" != x"" ] 117327702724Smrgthen 117427702724Smrgcase $os in 117527702724Smrg # First match some system type aliases 117627702724Smrg # that might get confused with valid system types. 117727702724Smrg # -solaris* is a basic system type, with this one exception. 117827702724Smrg -solaris1 | -solaris1.*) 117927702724Smrg os=`echo $os | sed -e 's|solaris1|sunos4|'` 118027702724Smrg ;; 118127702724Smrg -solaris) 118227702724Smrg os=-solaris2 118327702724Smrg ;; 118427702724Smrg -svr4*) 118527702724Smrg os=-sysv4 118627702724Smrg ;; 118727702724Smrg -unixware*) 118827702724Smrg os=-sysv4.2uw 118927702724Smrg ;; 119027702724Smrg -gnu/linux*) 119127702724Smrg os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 119227702724Smrg ;; 119327702724Smrg # First accept the basic system types. 119427702724Smrg # The portable systems comes first. 119527702724Smrg # Each alternative MUST END IN A *, to match a version number. 119627702724Smrg # -sysv* is not here because it comes later, after sysvr4. 119727702724Smrg -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 119827702724Smrg | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ 119927702724Smrg | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ 120027702724Smrg | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 120127702724Smrg | -aos* \ 120227702724Smrg | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 120327702724Smrg | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 120427702724Smrg | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 120527702724Smrg | -openbsd* | -solidbsd* \ 120627702724Smrg | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 120727702724Smrg | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 120827702724Smrg | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 120927702724Smrg | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 121027702724Smrg | -chorusos* | -chorusrdb* \ 121127702724Smrg | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 121227702724Smrg | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ 121327702724Smrg | -uxpv* | -beos* | -mpeix* | -udk* \ 121427702724Smrg | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 121527702724Smrg | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 121627702724Smrg | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 121727702724Smrg | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 121827702724Smrg | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 121927702724Smrg | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 122027702724Smrg | -skyos* | -haiku* | -rdos*) 122127702724Smrg # Remember, each alternative MUST END IN *, to match a version number. 122227702724Smrg ;; 122327702724Smrg -qnx*) 122427702724Smrg case $basic_machine in 122527702724Smrg x86-* | i*86-*) 122627702724Smrg ;; 122727702724Smrg *) 122827702724Smrg os=-nto$os 122927702724Smrg ;; 123027702724Smrg esac 123127702724Smrg ;; 123227702724Smrg -nto-qnx*) 123327702724Smrg ;; 123427702724Smrg -nto*) 123527702724Smrg os=`echo $os | sed -e 's|nto|nto-qnx|'` 123627702724Smrg ;; 123727702724Smrg -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 123827702724Smrg | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 123927702724Smrg | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 124027702724Smrg ;; 124127702724Smrg -mac*) 124227702724Smrg os=`echo $os | sed -e 's|mac|macos|'` 124327702724Smrg ;; 124427702724Smrg -linux-dietlibc) 124527702724Smrg os=-linux-dietlibc 124627702724Smrg ;; 124727702724Smrg -linux*) 124827702724Smrg os=`echo $os | sed -e 's|linux|linux-gnu|'` 124927702724Smrg ;; 125027702724Smrg -sunos5*) 125127702724Smrg os=`echo $os | sed -e 's|sunos5|solaris2|'` 125227702724Smrg ;; 125327702724Smrg -sunos6*) 125427702724Smrg os=`echo $os | sed -e 's|sunos6|solaris3|'` 125527702724Smrg ;; 125627702724Smrg -opened*) 125727702724Smrg os=-openedition 125827702724Smrg ;; 125927702724Smrg -os400*) 126027702724Smrg os=-os400 126127702724Smrg ;; 126227702724Smrg -wince*) 126327702724Smrg os=-wince 126427702724Smrg ;; 126527702724Smrg -osfrose*) 126627702724Smrg os=-osfrose 126727702724Smrg ;; 126827702724Smrg -osf*) 126927702724Smrg os=-osf 127027702724Smrg ;; 127127702724Smrg -utek*) 127227702724Smrg os=-bsd 127327702724Smrg ;; 127427702724Smrg -dynix*) 127527702724Smrg os=-bsd 127627702724Smrg ;; 127727702724Smrg -acis*) 127827702724Smrg os=-aos 127927702724Smrg ;; 128027702724Smrg -atheos*) 128127702724Smrg os=-atheos 128227702724Smrg ;; 128327702724Smrg -syllable*) 128427702724Smrg os=-syllable 128527702724Smrg ;; 128627702724Smrg -386bsd) 128727702724Smrg os=-bsd 128827702724Smrg ;; 128927702724Smrg -ctix* | -uts*) 129027702724Smrg os=-sysv 129127702724Smrg ;; 129227702724Smrg -nova*) 129327702724Smrg os=-rtmk-nova 129427702724Smrg ;; 129527702724Smrg -ns2 ) 129627702724Smrg os=-nextstep2 129727702724Smrg ;; 129827702724Smrg -nsk*) 129927702724Smrg os=-nsk 130027702724Smrg ;; 130127702724Smrg # Preserve the version number of sinix5. 130227702724Smrg -sinix5.*) 130327702724Smrg os=`echo $os | sed -e 's|sinix|sysv|'` 130427702724Smrg ;; 130527702724Smrg -sinix*) 130627702724Smrg os=-sysv4 130727702724Smrg ;; 130827702724Smrg -tpf*) 130927702724Smrg os=-tpf 131027702724Smrg ;; 131127702724Smrg -triton*) 131227702724Smrg os=-sysv3 131327702724Smrg ;; 131427702724Smrg -oss*) 131527702724Smrg os=-sysv3 131627702724Smrg ;; 131727702724Smrg -svr4) 131827702724Smrg os=-sysv4 131927702724Smrg ;; 132027702724Smrg -svr3) 132127702724Smrg os=-sysv3 132227702724Smrg ;; 132327702724Smrg -sysvr4) 132427702724Smrg os=-sysv4 132527702724Smrg ;; 132627702724Smrg # This must come after -sysvr4. 132727702724Smrg -sysv*) 132827702724Smrg ;; 132927702724Smrg -ose*) 133027702724Smrg os=-ose 133127702724Smrg ;; 133227702724Smrg -es1800*) 133327702724Smrg os=-ose 133427702724Smrg ;; 133527702724Smrg -xenix) 133627702724Smrg os=-xenix 133727702724Smrg ;; 133827702724Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 133927702724Smrg os=-mint 134027702724Smrg ;; 134127702724Smrg -aros*) 134227702724Smrg os=-aros 134327702724Smrg ;; 134427702724Smrg -kaos*) 134527702724Smrg os=-kaos 134627702724Smrg ;; 134727702724Smrg -zvmoe) 134827702724Smrg os=-zvmoe 134927702724Smrg ;; 135027702724Smrg -none) 135127702724Smrg ;; 135227702724Smrg *) 135327702724Smrg # Get rid of the `-' at the beginning of $os. 135427702724Smrg os=`echo $os | sed 's/[^-]*-//'` 135527702724Smrg echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 135627702724Smrg exit 1 135727702724Smrg ;; 135827702724Smrgesac 135927702724Smrgelse 136027702724Smrg 136127702724Smrg# Here we handle the default operating systems that come with various machines. 136227702724Smrg# The value should be what the vendor currently ships out the door with their 136327702724Smrg# machine or put another way, the most popular os provided with the machine. 136427702724Smrg 136527702724Smrg# Note that if you're going to try to match "-MANUFACTURER" here (say, 136627702724Smrg# "-sun"), then you have to tell the case statement up towards the top 136727702724Smrg# that MANUFACTURER isn't an operating system. Otherwise, code above 136827702724Smrg# will signal an error saying that MANUFACTURER isn't an operating 136927702724Smrg# system, and we'll never get to this point. 137027702724Smrg 137127702724Smrgcase $basic_machine in 137227702724Smrg *-acorn) 137327702724Smrg os=-riscix1.2 137427702724Smrg ;; 137527702724Smrg arm*-rebel) 137627702724Smrg os=-linux 137727702724Smrg ;; 137827702724Smrg arm*-semi) 137927702724Smrg os=-aout 138027702724Smrg ;; 138127702724Smrg c4x-* | tic4x-*) 138227702724Smrg os=-coff 138327702724Smrg ;; 138427702724Smrg # This must come before the *-dec entry. 138527702724Smrg pdp10-*) 138627702724Smrg os=-tops20 138727702724Smrg ;; 138827702724Smrg pdp11-*) 138927702724Smrg os=-none 139027702724Smrg ;; 139127702724Smrg *-dec | vax-*) 139227702724Smrg os=-ultrix4.2 139327702724Smrg ;; 139427702724Smrg m68*-apollo) 139527702724Smrg os=-domain 139627702724Smrg ;; 139727702724Smrg i386-sun) 139827702724Smrg os=-sunos4.0.2 139927702724Smrg ;; 140027702724Smrg m68000-sun) 140127702724Smrg os=-sunos3 140227702724Smrg # This also exists in the configure program, but was not the 140327702724Smrg # default. 140427702724Smrg # os=-sunos4 140527702724Smrg ;; 140627702724Smrg m68*-cisco) 140727702724Smrg os=-aout 140827702724Smrg ;; 140927702724Smrg mips*-cisco) 141027702724Smrg os=-elf 141127702724Smrg ;; 141227702724Smrg mips*-*) 141327702724Smrg os=-elf 141427702724Smrg ;; 141527702724Smrg or32-*) 141627702724Smrg os=-coff 141727702724Smrg ;; 141827702724Smrg *-tti) # must be before sparc entry or we get the wrong os. 141927702724Smrg os=-sysv3 142027702724Smrg ;; 142127702724Smrg sparc-* | *-sun) 142227702724Smrg os=-sunos4.1.1 142327702724Smrg ;; 142427702724Smrg *-be) 142527702724Smrg os=-beos 142627702724Smrg ;; 142727702724Smrg *-haiku) 142827702724Smrg os=-haiku 142927702724Smrg ;; 143027702724Smrg *-ibm) 143127702724Smrg os=-aix 143227702724Smrg ;; 143327702724Smrg *-knuth) 143427702724Smrg os=-mmixware 143527702724Smrg ;; 143627702724Smrg *-wec) 143727702724Smrg os=-proelf 143827702724Smrg ;; 143927702724Smrg *-winbond) 144027702724Smrg os=-proelf 144127702724Smrg ;; 144227702724Smrg *-oki) 144327702724Smrg os=-proelf 144427702724Smrg ;; 144527702724Smrg *-hp) 144627702724Smrg os=-hpux 144727702724Smrg ;; 144827702724Smrg *-hitachi) 144927702724Smrg os=-hiux 145027702724Smrg ;; 145127702724Smrg i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 145227702724Smrg os=-sysv 145327702724Smrg ;; 145427702724Smrg *-cbm) 145527702724Smrg os=-amigaos 145627702724Smrg ;; 145727702724Smrg *-dg) 145827702724Smrg os=-dgux 145927702724Smrg ;; 146027702724Smrg *-dolphin) 146127702724Smrg os=-sysv3 146227702724Smrg ;; 146327702724Smrg m68k-ccur) 146427702724Smrg os=-rtu 146527702724Smrg ;; 146627702724Smrg m88k-omron*) 146727702724Smrg os=-luna 146827702724Smrg ;; 146927702724Smrg *-next ) 147027702724Smrg os=-nextstep 147127702724Smrg ;; 147227702724Smrg *-sequent) 147327702724Smrg os=-ptx 147427702724Smrg ;; 147527702724Smrg *-crds) 147627702724Smrg os=-unos 147727702724Smrg ;; 147827702724Smrg *-ns) 147927702724Smrg os=-genix 148027702724Smrg ;; 148127702724Smrg i370-*) 148227702724Smrg os=-mvs 148327702724Smrg ;; 148427702724Smrg *-next) 148527702724Smrg os=-nextstep3 148627702724Smrg ;; 148727702724Smrg *-gould) 148827702724Smrg os=-sysv 148927702724Smrg ;; 149027702724Smrg *-highlevel) 149127702724Smrg os=-bsd 149227702724Smrg ;; 149327702724Smrg *-encore) 149427702724Smrg os=-bsd 149527702724Smrg ;; 149627702724Smrg *-sgi) 149727702724Smrg os=-irix 149827702724Smrg ;; 149927702724Smrg *-siemens) 150027702724Smrg os=-sysv4 150127702724Smrg ;; 150227702724Smrg *-masscomp) 150327702724Smrg os=-rtu 150427702724Smrg ;; 150527702724Smrg f30[01]-fujitsu | f700-fujitsu) 150627702724Smrg os=-uxpv 150727702724Smrg ;; 150827702724Smrg *-rom68k) 150927702724Smrg os=-coff 151027702724Smrg ;; 151127702724Smrg *-*bug) 151227702724Smrg os=-coff 151327702724Smrg ;; 151427702724Smrg *-apple) 151527702724Smrg os=-macos 151627702724Smrg ;; 151727702724Smrg *-atari*) 151827702724Smrg os=-mint 151927702724Smrg ;; 152027702724Smrg *) 152127702724Smrg os=-none 152227702724Smrg ;; 152327702724Smrgesac 152427702724Smrgfi 152527702724Smrg 152627702724Smrg# Here we handle the case where we know the os, and the CPU type, but not the 152727702724Smrg# manufacturer. We pick the logical manufacturer. 152827702724Smrgvendor=unknown 152927702724Smrgcase $basic_machine in 153027702724Smrg *-unknown) 153127702724Smrg case $os in 153227702724Smrg -riscix*) 153327702724Smrg vendor=acorn 153427702724Smrg ;; 153527702724Smrg -sunos*) 153627702724Smrg vendor=sun 153727702724Smrg ;; 153827702724Smrg -aix*) 153927702724Smrg vendor=ibm 154027702724Smrg ;; 154127702724Smrg -beos*) 154227702724Smrg vendor=be 154327702724Smrg ;; 154427702724Smrg -hpux*) 154527702724Smrg vendor=hp 154627702724Smrg ;; 154727702724Smrg -mpeix*) 154827702724Smrg vendor=hp 154927702724Smrg ;; 155027702724Smrg -hiux*) 155127702724Smrg vendor=hitachi 155227702724Smrg ;; 155327702724Smrg -unos*) 155427702724Smrg vendor=crds 155527702724Smrg ;; 155627702724Smrg -dgux*) 155727702724Smrg vendor=dg 155827702724Smrg ;; 155927702724Smrg -luna*) 156027702724Smrg vendor=omron 156127702724Smrg ;; 156227702724Smrg -genix*) 156327702724Smrg vendor=ns 156427702724Smrg ;; 156527702724Smrg -mvs* | -opened*) 156627702724Smrg vendor=ibm 156727702724Smrg ;; 156827702724Smrg -os400*) 156927702724Smrg vendor=ibm 157027702724Smrg ;; 157127702724Smrg -ptx*) 157227702724Smrg vendor=sequent 157327702724Smrg ;; 157427702724Smrg -tpf*) 157527702724Smrg vendor=ibm 157627702724Smrg ;; 157727702724Smrg -vxsim* | -vxworks* | -windiss*) 157827702724Smrg vendor=wrs 157927702724Smrg ;; 158027702724Smrg -aux*) 158127702724Smrg vendor=apple 158227702724Smrg ;; 158327702724Smrg -hms*) 158427702724Smrg vendor=hitachi 158527702724Smrg ;; 158627702724Smrg -mpw* | -macos*) 158727702724Smrg vendor=apple 158827702724Smrg ;; 158927702724Smrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 159027702724Smrg vendor=atari 159127702724Smrg ;; 159227702724Smrg -vos*) 159327702724Smrg vendor=stratus 159427702724Smrg ;; 159527702724Smrg esac 159627702724Smrg basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 159727702724Smrg ;; 159827702724Smrgesac 159927702724Smrg 160027702724Smrgecho $basic_machine$os 160127702724Smrgexit 160227702724Smrg 160327702724Smrg# Local variables: 160427702724Smrg# eval: (add-hook 'write-file-hooks 'time-stamp) 160527702724Smrg# time-stamp-start: "timestamp='" 160627702724Smrg# time-stamp-format: "%:y-%02m-%02d" 160727702724Smrg# time-stamp-end: "'" 160827702724Smrg# End: 1609