1156283Srwatson#! /bin/sh 2156283Srwatson# Configuration validation subroutine script. 3156283Srwatson# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4156283Srwatson# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 5156283Srwatson 6156283Srwatsontimestamp='2003-07-04' 7156283Srwatson 8156283Srwatson# This file is (in principle) common to ALL GNU software. 9156283Srwatson# The presence of a machine in this file suggests that SOME GNU software 10156283Srwatson# can handle that machine. It does not imply ALL GNU software can. 11156283Srwatson# 12156283Srwatson# This file is free software; you can redistribute it and/or modify 13156283Srwatson# it under the terms of the GNU General Public License as published by 14156283Srwatson# the Free Software Foundation; either version 2 of the License, or 15156283Srwatson# (at your option) any later version. 16156283Srwatson# 17156283Srwatson# This program is distributed in the hope that it will be useful, 18156283Srwatson# but WITHOUT ANY WARRANTY; without even the implied warranty of 19156283Srwatson# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20156283Srwatson# GNU General Public License for more details. 21156283Srwatson# 22156283Srwatson# You should have received a copy of the GNU General Public License 23156283Srwatson# along with this program; if not, write to the Free Software 24156283Srwatson# Foundation, Inc., 59 Temple Place - Suite 330, 25156283Srwatson# Boston, MA 02111-1307, USA. 26156283Srwatson 27156283Srwatson# As a special exception to the GNU General Public License, if you 28156283Srwatson# distribute this file as part of a program that contains a 29156283Srwatson# configuration script generated by Autoconf, you may include it under 30156283Srwatson# the same distribution terms that you use for the rest of that program. 31156283Srwatson 32156283Srwatson# Please send patches to <config-patches@gnu.org>. Submit a context 33156283Srwatson# diff and a properly formatted ChangeLog entry. 34156283Srwatson# 35156283Srwatson# Configuration subroutine to validate and canonicalize a configuration type. 36156283Srwatson# Supply the specified configuration type as an argument. 37156283Srwatson# If it is invalid, we print an error message on stderr and exit with code 1. 38156283Srwatson# Otherwise, we print the canonical config type on stdout and succeed. 39156283Srwatson 40156283Srwatson# This file is supposed to be the same for all GNU packages 41156283Srwatson# and recognize all the CPU types, system types and aliases 42156283Srwatson# that are meaningful with *any* GNU software. 43156283Srwatson# Each package is responsible for reporting which valid configurations 44156283Srwatson# it does not support. The user should be able to distinguish 45156283Srwatson# a failure to support a valid configuration from a meaningless 46156283Srwatson# configuration. 47156283Srwatson 48156283Srwatson# The goal of this file is to map all the various variations of a given 49156283Srwatson# machine specification into a single specification in the form: 50156283Srwatson# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 51156283Srwatson# or in some cases, the newer four-part form: 52156283Srwatson# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 53156283Srwatson# It is wrong to echo any other type of specification. 54156283Srwatson 55156283Srwatsonme=`echo "$0" | sed -e 's,.*/,,'` 56156283Srwatson 57156283Srwatsonusage="\ 58156283SrwatsonUsage: $0 [OPTION] CPU-MFR-OPSYS 59156283Srwatson $0 [OPTION] ALIAS 60156283Srwatson 61156283SrwatsonCanonicalize a configuration name. 62156283Srwatson 63156283SrwatsonOperation modes: 64156283Srwatson -h, --help print this help, then exit 65156283Srwatson -t, --time-stamp print date of last modification, then exit 66156283Srwatson -v, --version print version number, then exit 67156283Srwatson 68156283SrwatsonReport bugs and patches to <config-patches@gnu.org>." 69156283Srwatson 70156283Srwatsonversion="\ 71156283SrwatsonGNU config.sub ($timestamp) 72156283Srwatson 73156283SrwatsonCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 74156283SrwatsonFree Software Foundation, Inc. 75156283Srwatson 76156283SrwatsonThis is free software; see the source for copying conditions. There is NO 77156283Srwatsonwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 78156283Srwatson 79156283Srwatsonhelp=" 80156283SrwatsonTry \`$me --help' for more information." 81156283Srwatson 82156283Srwatson# Parse command line 83156283Srwatsonwhile test $# -gt 0 ; do 84156283Srwatson case $1 in 85156283Srwatson --time-stamp | --time* | -t ) 86156283Srwatson echo "$timestamp" ; exit 0 ;; 87156283Srwatson --version | -v ) 88156283Srwatson echo "$version" ; exit 0 ;; 89156283Srwatson --help | --h* | -h ) 90156283Srwatson echo "$usage"; exit 0 ;; 91156283Srwatson -- ) # Stop option processing 92156283Srwatson shift; break ;; 93156283Srwatson - ) # Use stdin as input. 94156283Srwatson break ;; 95156283Srwatson -* ) 96156283Srwatson echo "$me: invalid option $1$help" 97156283Srwatson exit 1 ;; 98156283Srwatson 99156283Srwatson *local*) 100156283Srwatson # First pass through any local machine types. 101156283Srwatson echo $1 102156283Srwatson exit 0;; 103156283Srwatson 104156283Srwatson * ) 105156283Srwatson break ;; 106156283Srwatson esac 107156283Srwatsondone 108156283Srwatson 109156283Srwatsoncase $# in 110156283Srwatson 0) echo "$me: missing argument$help" >&2 111156283Srwatson exit 1;; 112156283Srwatson 1) ;; 113156283Srwatson *) echo "$me: too many arguments$help" >&2 114156283Srwatson exit 1;; 115156283Srwatsonesac 116156283Srwatson 117156283Srwatson# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 118156283Srwatson# Here we must recognize all the valid KERNEL-OS combinations. 119156283Srwatsonmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 120156283Srwatsoncase $maybe_os in 121156283Srwatson nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) 122156283Srwatson os=-$maybe_os 123156283Srwatson basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 124156283Srwatson ;; 125156283Srwatson *) 126156283Srwatson basic_machine=`echo $1 | sed 's/-[^-]*$//'` 127156283Srwatson if [ $basic_machine != $1 ] 128156283Srwatson then os=`echo $1 | sed 's/.*-/-/'` 129156283Srwatson else os=; fi 130156283Srwatson ;; 131156283Srwatsonesac 132156283Srwatson 133156283Srwatson### Let's recognize common machines as not being operating systems so 134156283Srwatson### that things like config.sub decstation-3100 work. We also 135156283Srwatson### recognize some manufacturers as not being operating systems, so we 136156283Srwatson### can provide default operating systems below. 137156283Srwatsoncase $os in 138156283Srwatson -sun*os*) 139156283Srwatson # Prevent following clause from handling this invalid input. 140156283Srwatson ;; 141156283Srwatson -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 142156283Srwatson -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 143156283Srwatson -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 144156283Srwatson -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 145156283Srwatson -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 146156283Srwatson -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 147156283Srwatson -apple | -axis) 148156283Srwatson os= 149156283Srwatson basic_machine=$1 150156283Srwatson ;; 151156283Srwatson -sim | -cisco | -oki | -wec | -winbond) 152156283Srwatson os= 153156283Srwatson basic_machine=$1 154156283Srwatson ;; 155156283Srwatson -scout) 156156283Srwatson ;; 157156283Srwatson -wrs) 158156283Srwatson os=-vxworks 159156283Srwatson basic_machine=$1 160156283Srwatson ;; 161156283Srwatson -chorusos*) 162156283Srwatson os=-chorusos 163156283Srwatson basic_machine=$1 164156283Srwatson ;; 165156283Srwatson -chorusrdb) 166156283Srwatson os=-chorusrdb 167156283Srwatson basic_machine=$1 168156283Srwatson ;; 169156283Srwatson -hiux*) 170156283Srwatson os=-hiuxwe2 171156283Srwatson ;; 172156283Srwatson -sco5) 173156283Srwatson os=-sco3.2v5 174156283Srwatson basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 175156283Srwatson ;; 176156283Srwatson -sco4) 177156283Srwatson os=-sco3.2v4 178156283Srwatson basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 179156283Srwatson ;; 180156283Srwatson -sco3.2.[4-9]*) 181156283Srwatson os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 182156283Srwatson basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 183156283Srwatson ;; 184156283Srwatson -sco3.2v[4-9]*) 185156283Srwatson # Don't forget version if it is 3.2v4 or newer. 186156283Srwatson basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 187156283Srwatson ;; 188156283Srwatson -sco*) 189156283Srwatson os=-sco3.2v2 190156283Srwatson basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 191156283Srwatson ;; 192156283Srwatson -udk*) 193156283Srwatson basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 194156283Srwatson ;; 195156283Srwatson -isc) 196156283Srwatson os=-isc2.2 197156283Srwatson basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 198156283Srwatson ;; 199156283Srwatson -clix*) 200156283Srwatson basic_machine=clipper-intergraph 201156283Srwatson ;; 202156283Srwatson -isc*) 203156283Srwatson basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 204156283Srwatson ;; 205156283Srwatson -lynx*) 206156283Srwatson os=-lynxos 207156283Srwatson ;; 208156283Srwatson -ptx*) 209156283Srwatson basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 210156283Srwatson ;; 211156283Srwatson -windowsnt*) 212156283Srwatson os=`echo $os | sed -e 's/windowsnt/winnt/'` 213156283Srwatson ;; 214156283Srwatson -psos*) 215156283Srwatson os=-psos 216156283Srwatson ;; 217156283Srwatson -mint | -mint[0-9]*) 218156283Srwatson basic_machine=m68k-atari 219156283Srwatson os=-mint 220156283Srwatson ;; 221156283Srwatsonesac 222156283Srwatson 223156283Srwatson# Decode aliases for certain CPU-COMPANY combinations. 224156283Srwatsoncase $basic_machine in 225156283Srwatson # Recognize the basic CPU types without company name. 226156283Srwatson # Some are omitted here because they have special meanings below. 227156283Srwatson 1750a | 580 \ 228156283Srwatson | a29k \ 229156283Srwatson | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 230156283Srwatson | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 231156283Srwatson | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ 232156283Srwatson | c4x | clipper \ 233156283Srwatson | d10v | d30v | dlx | dsp16xx \ 234156283Srwatson | fr30 | frv \ 235156283Srwatson | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 236156283Srwatson | i370 | i860 | i960 | ia64 \ 237156283Srwatson | ip2k \ 238156283Srwatson | m32r | m68000 | m68k | m88k | mcore \ 239156283Srwatson | mips | mipsbe | mipseb | mipsel | mipsle \ 240156283Srwatson | mips16 \ 241156283Srwatson | mips64 | mips64el \ 242156283Srwatson | mips64vr | mips64vrel \ 243156283Srwatson | mips64orion | mips64orionel \ 244156283Srwatson | mips64vr4100 | mips64vr4100el \ 245156283Srwatson | mips64vr4300 | mips64vr4300el \ 246156283Srwatson | mips64vr5000 | mips64vr5000el \ 247156283Srwatson | mipsisa32 | mipsisa32el \ 248156283Srwatson | mipsisa32r2 | mipsisa32r2el \ 249156283Srwatson | mipsisa64 | mipsisa64el \ 250156283Srwatson | mipsisa64sb1 | mipsisa64sb1el \ 251156283Srwatson | mipsisa64sr71k | mipsisa64sr71kel \ 252156283Srwatson | mipstx39 | mipstx39el \ 253156283Srwatson | mn10200 | mn10300 \ 254156283Srwatson | msp430 \ 255156283Srwatson | ns16k | ns32k \ 256156283Srwatson | openrisc | or32 \ 257156283Srwatson | pdp10 | pdp11 | pj | pjl \ 258156283Srwatson | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 259156283Srwatson | pyramid \ 260156283Srwatson | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ 261156283Srwatson | sh64 | sh64le \ 262156283Srwatson | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ 263156283Srwatson | strongarm \ 264156283Srwatson | tahoe | thumb | tic4x | tic80 | tron \ 265156283Srwatson | v850 | v850e \ 266156283Srwatson | we32k \ 267156283Srwatson | x86 | xscale | xstormy16 | xtensa \ 268156283Srwatson | z8k) 269156283Srwatson basic_machine=$basic_machine-unknown 270156283Srwatson ;; 271156283Srwatson m6811 | m68hc11 | m6812 | m68hc12) 272156283Srwatson # Motorola 68HC11/12. 273156283Srwatson basic_machine=$basic_machine-unknown 274156283Srwatson os=-none 275156283Srwatson ;; 276156283Srwatson m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 277156283Srwatson ;; 278156283Srwatson 279156283Srwatson # We use `pc' rather than `unknown' 280156283Srwatson # because (1) that's what they normally are, and 281156283Srwatson # (2) the word "unknown" tends to confuse beginning users. 282156283Srwatson i*86 | x86_64) 283156283Srwatson basic_machine=$basic_machine-pc 284156283Srwatson ;; 285156283Srwatson # Object if more than one company name word. 286156283Srwatson *-*-*) 287156283Srwatson echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 288156283Srwatson exit 1 289156283Srwatson ;; 290156283Srwatson # Recognize the basic CPU types with company name. 291156283Srwatson 580-* \ 292156283Srwatson | a29k-* \ 293156283Srwatson | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 294156283Srwatson | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 295156283Srwatson | alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* \ 296156283Srwatson | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 297156283Srwatson | avr-* \ 298156283Srwatson | bs2000-* \ 299156283Srwatson | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 300156283Srwatson | clipper-* | cydra-* \ 301156283Srwatson | d10v-* | d30v-* | dlx-* \ 302156283Srwatson | elxsi-* \ 303156283Srwatson | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ 304156283Srwatson | h8300-* | h8500-* \ 305156283Srwatson | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 306156283Srwatson | i*86-* | i860-* | i960-* | ia64-* \ 307156283Srwatson | ip2k-* \ 308156283Srwatson | m32r-* \ 309156283Srwatson | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 310156283Srwatson | m88110-* | m88k-* | mcore-* \ 311156283Srwatson | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 312156283Srwatson | mips16-* \ 313156283Srwatson | mips64-* | mips64el-* \ 314156283Srwatson | mips64vr-* | mips64vrel-* \ 315156283Srwatson | mips64orion-* | mips64orionel-* \ 316156283Srwatson | mips64vr4100-* | mips64vr4100el-* \ 317156283Srwatson | mips64vr4300-* | mips64vr4300el-* \ 318156283Srwatson | mips64vr5000-* | mips64vr5000el-* \ 319156283Srwatson | mipsisa32-* | mipsisa32el-* \ 320156283Srwatson | mipsisa32r2-* | mipsisa32r2el-* \ 321156283Srwatson | mipsisa64-* | mipsisa64el-* \ 322156283Srwatson | mipsisa64sb1-* | mipsisa64sb1el-* \ 323156283Srwatson | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 324156283Srwatson | mipstx39-* | mipstx39el-* \ 325156283Srwatson | msp430-* \ 326156283Srwatson | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ 327156283Srwatson | orion-* \ 328156283Srwatson | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 329156283Srwatson | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 330156283Srwatson | pyramid-* \ 331156283Srwatson | romp-* | rs6000-* \ 332156283Srwatson | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ 333156283Srwatson | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 334156283Srwatson | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ 335156283Srwatson | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ 336156283Srwatson | tahoe-* | thumb-* \ 337156283Srwatson | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 338156283Srwatson | tron-* \ 339156283Srwatson | v850-* | v850e-* | vax-* \ 340156283Srwatson | we32k-* \ 341156283Srwatson | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ 342156283Srwatson | xtensa-* \ 343156283Srwatson | ymp-* \ 344156283Srwatson | z8k-*) 345156283Srwatson ;; 346156283Srwatson # Recognize the various machine names and aliases which stand 347156283Srwatson # for a CPU type and a company and sometimes even an OS. 348156283Srwatson 386bsd) 349156283Srwatson basic_machine=i386-unknown 350156283Srwatson os=-bsd 351156283Srwatson ;; 352156283Srwatson 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 353156283Srwatson basic_machine=m68000-att 354156283Srwatson ;; 355156283Srwatson 3b*) 356156283Srwatson basic_machine=we32k-att 357156283Srwatson ;; 358156283Srwatson a29khif) 359156283Srwatson basic_machine=a29k-amd 360156283Srwatson os=-udi 361156283Srwatson ;; 362156283Srwatson adobe68k) 363156283Srwatson basic_machine=m68010-adobe 364156283Srwatson os=-scout 365156283Srwatson ;; 366156283Srwatson alliant | fx80) 367156283Srwatson basic_machine=fx80-alliant 368156283Srwatson ;; 369156283Srwatson altos | altos3068) 370156283Srwatson basic_machine=m68k-altos 371156283Srwatson ;; 372156283Srwatson am29k) 373156283Srwatson basic_machine=a29k-none 374156283Srwatson os=-bsd 375156283Srwatson ;; 376156283Srwatson amd64) 377156283Srwatson basic_machine=x86_64-pc 378156283Srwatson ;; 379156283Srwatson amdahl) 380156283Srwatson basic_machine=580-amdahl 381156283Srwatson os=-sysv 382156283Srwatson ;; 383156283Srwatson amiga | amiga-*) 384156283Srwatson basic_machine=m68k-unknown 385156283Srwatson ;; 386156283Srwatson amigaos | amigados) 387156283Srwatson basic_machine=m68k-unknown 388156283Srwatson os=-amigaos 389156283Srwatson ;; 390156283Srwatson amigaunix | amix) 391156283Srwatson basic_machine=m68k-unknown 392156283Srwatson os=-sysv4 393156283Srwatson ;; 394156283Srwatson apollo68) 395156283Srwatson basic_machine=m68k-apollo 396156283Srwatson os=-sysv 397156283Srwatson ;; 398156283Srwatson apollo68bsd) 399156283Srwatson basic_machine=m68k-apollo 400156283Srwatson os=-bsd 401156283Srwatson ;; 402156283Srwatson aux) 403156283Srwatson basic_machine=m68k-apple 404156283Srwatson os=-aux 405156283Srwatson ;; 406156283Srwatson balance) 407156283Srwatson basic_machine=ns32k-sequent 408156283Srwatson os=-dynix 409156283Srwatson ;; 410156283Srwatson c90) 411156283Srwatson basic_machine=c90-cray 412156283Srwatson os=-unicos 413156283Srwatson ;; 414156283Srwatson convex-c1) 415156283Srwatson basic_machine=c1-convex 416156283Srwatson os=-bsd 417156283Srwatson ;; 418156283Srwatson convex-c2) 419156283Srwatson basic_machine=c2-convex 420156283Srwatson os=-bsd 421156283Srwatson ;; 422156283Srwatson convex-c32) 423156283Srwatson basic_machine=c32-convex 424156283Srwatson os=-bsd 425156283Srwatson ;; 426156283Srwatson convex-c34) 427156283Srwatson basic_machine=c34-convex 428156283Srwatson os=-bsd 429156283Srwatson ;; 430156283Srwatson convex-c38) 431156283Srwatson basic_machine=c38-convex 432156283Srwatson os=-bsd 433156283Srwatson ;; 434156283Srwatson cray | j90) 435156283Srwatson basic_machine=j90-cray 436156283Srwatson os=-unicos 437156283Srwatson ;; 438156283Srwatson crds | unos) 439156283Srwatson basic_machine=m68k-crds 440156283Srwatson ;; 441156283Srwatson cris | cris-* | etrax*) 442156283Srwatson basic_machine=cris-axis 443156283Srwatson ;; 444156283Srwatson da30 | da30-*) 445156283Srwatson basic_machine=m68k-da30 446156283Srwatson ;; 447156283Srwatson decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 448156283Srwatson basic_machine=mips-dec 449156283Srwatson ;; 450156283Srwatson decsystem10* | dec10*) 451156283Srwatson basic_machine=pdp10-dec 452156283Srwatson os=-tops10 453156283Srwatson ;; 454156283Srwatson decsystem20* | dec20*) 455156283Srwatson basic_machine=pdp10-dec 456156283Srwatson os=-tops20 457156283Srwatson ;; 458156283Srwatson delta | 3300 | motorola-3300 | motorola-delta \ 459156283Srwatson | 3300-motorola | delta-motorola) 460156283Srwatson basic_machine=m68k-motorola 461156283Srwatson ;; 462156283Srwatson delta88) 463156283Srwatson basic_machine=m88k-motorola 464156283Srwatson os=-sysv3 465156283Srwatson ;; 466156283Srwatson dpx20 | dpx20-*) 467156283Srwatson basic_machine=rs6000-bull 468156283Srwatson os=-bosx 469156283Srwatson ;; 470156283Srwatson dpx2* | dpx2*-bull) 471156283Srwatson basic_machine=m68k-bull 472156283Srwatson os=-sysv3 473156283Srwatson ;; 474156283Srwatson ebmon29k) 475156283Srwatson basic_machine=a29k-amd 476156283Srwatson os=-ebmon 477156283Srwatson ;; 478156283Srwatson elxsi) 479156283Srwatson basic_machine=elxsi-elxsi 480156283Srwatson os=-bsd 481156283Srwatson ;; 482156283Srwatson encore | umax | mmax) 483156283Srwatson basic_machine=ns32k-encore 484156283Srwatson ;; 485156283Srwatson es1800 | OSE68k | ose68k | ose | OSE) 486156283Srwatson basic_machine=m68k-ericsson 487156283Srwatson os=-ose 488156283Srwatson ;; 489156283Srwatson fx2800) 490156283Srwatson basic_machine=i860-alliant 491156283Srwatson ;; 492156283Srwatson genix) 493156283Srwatson basic_machine=ns32k-ns 494156283Srwatson ;; 495156283Srwatson gmicro) 496156283Srwatson basic_machine=tron-gmicro 497156283Srwatson os=-sysv 498156283Srwatson ;; 499156283Srwatson go32) 500156283Srwatson basic_machine=i386-pc 501156283Srwatson os=-go32 502156283Srwatson ;; 503156283Srwatson h3050r* | hiux*) 504156283Srwatson basic_machine=hppa1.1-hitachi 505156283Srwatson os=-hiuxwe2 506156283Srwatson ;; 507156283Srwatson h8300hms) 508156283Srwatson basic_machine=h8300-hitachi 509156283Srwatson os=-hms 510156283Srwatson ;; 511156283Srwatson h8300xray) 512156283Srwatson basic_machine=h8300-hitachi 513156283Srwatson os=-xray 514156283Srwatson ;; 515156283Srwatson h8500hms) 516156283Srwatson basic_machine=h8500-hitachi 517156283Srwatson os=-hms 518156283Srwatson ;; 519156283Srwatson harris) 520156283Srwatson basic_machine=m88k-harris 521156283Srwatson os=-sysv3 522156283Srwatson ;; 523156283Srwatson hp300-*) 524156283Srwatson basic_machine=m68k-hp 525156283Srwatson ;; 526156283Srwatson hp300bsd) 527156283Srwatson basic_machine=m68k-hp 528156283Srwatson os=-bsd 529156283Srwatson ;; 530156283Srwatson hp300hpux) 531156283Srwatson basic_machine=m68k-hp 532156283Srwatson os=-hpux 533156283Srwatson ;; 534156283Srwatson hp3k9[0-9][0-9] | hp9[0-9][0-9]) 535156283Srwatson basic_machine=hppa1.0-hp 536156283Srwatson ;; 537156283Srwatson hp9k2[0-9][0-9] | hp9k31[0-9]) 538156283Srwatson basic_machine=m68000-hp 539156283Srwatson ;; 540156283Srwatson hp9k3[2-9][0-9]) 541156283Srwatson basic_machine=m68k-hp 542156283Srwatson ;; 543156283Srwatson hp9k6[0-9][0-9] | hp6[0-9][0-9]) 544156283Srwatson basic_machine=hppa1.0-hp 545156283Srwatson ;; 546156283Srwatson hp9k7[0-79][0-9] | hp7[0-79][0-9]) 547156283Srwatson basic_machine=hppa1.1-hp 548156283Srwatson ;; 549156283Srwatson hp9k78[0-9] | hp78[0-9]) 550156283Srwatson # FIXME: really hppa2.0-hp 551156283Srwatson basic_machine=hppa1.1-hp 552156283Srwatson ;; 553156283Srwatson hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 554156283Srwatson # FIXME: really hppa2.0-hp 555156283Srwatson basic_machine=hppa1.1-hp 556156283Srwatson ;; 557156283Srwatson hp9k8[0-9][13679] | hp8[0-9][13679]) 558156283Srwatson basic_machine=hppa1.1-hp 559156283Srwatson ;; 560156283Srwatson hp9k8[0-9][0-9] | hp8[0-9][0-9]) 561156283Srwatson basic_machine=hppa1.0-hp 562156283Srwatson ;; 563156283Srwatson hppa-next) 564156283Srwatson os=-nextstep3 565156283Srwatson ;; 566156283Srwatson hppaosf) 567156283Srwatson basic_machine=hppa1.1-hp 568156283Srwatson os=-osf 569156283Srwatson ;; 570156283Srwatson hppro) 571156283Srwatson basic_machine=hppa1.1-hp 572156283Srwatson os=-proelf 573156283Srwatson ;; 574156283Srwatson i370-ibm* | ibm*) 575156283Srwatson basic_machine=i370-ibm 576156283Srwatson ;; 577156283Srwatson# I'm not sure what "Sysv32" means. Should this be sysv3.2? 578156283Srwatson i*86v32) 579156283Srwatson basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 580156283Srwatson os=-sysv32 581156283Srwatson ;; 582156283Srwatson i*86v4*) 583156283Srwatson basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 584156283Srwatson os=-sysv4 585156283Srwatson ;; 586156283Srwatson i*86v) 587156283Srwatson basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 588156283Srwatson os=-sysv 589156283Srwatson ;; 590156283Srwatson i*86sol2) 591156283Srwatson basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 592156283Srwatson os=-solaris2 593156283Srwatson ;; 594156283Srwatson i386mach) 595156283Srwatson basic_machine=i386-mach 596156283Srwatson os=-mach 597156283Srwatson ;; 598156283Srwatson i386-vsta | vsta) 599156283Srwatson basic_machine=i386-unknown 600156283Srwatson os=-vsta 601156283Srwatson ;; 602156283Srwatson iris | iris4d) 603156283Srwatson basic_machine=mips-sgi 604156283Srwatson case $os in 605156283Srwatson -irix*) 606156283Srwatson ;; 607156283Srwatson *) 608156283Srwatson os=-irix4 609156283Srwatson ;; 610156283Srwatson esac 611156283Srwatson ;; 612156283Srwatson isi68 | isi) 613156283Srwatson basic_machine=m68k-isi 614156283Srwatson os=-sysv 615156283Srwatson ;; 616156283Srwatson m88k-omron*) 617156283Srwatson basic_machine=m88k-omron 618156283Srwatson ;; 619156283Srwatson magnum | m3230) 620156283Srwatson basic_machine=mips-mips 621156283Srwatson os=-sysv 622156283Srwatson ;; 623156283Srwatson merlin) 624156283Srwatson basic_machine=ns32k-utek 625156283Srwatson os=-sysv 626156283Srwatson ;; 627156283Srwatson mingw32) 628156283Srwatson basic_machine=i386-pc 629156283Srwatson os=-mingw32 630156283Srwatson ;; 631156283Srwatson miniframe) 632156283Srwatson basic_machine=m68000-convergent 633156283Srwatson ;; 634156283Srwatson *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 635156283Srwatson basic_machine=m68k-atari 636156283Srwatson os=-mint 637156283Srwatson ;; 638156283Srwatson mips3*-*) 639156283Srwatson basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 640156283Srwatson ;; 641156283Srwatson mips3*) 642156283Srwatson basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 643156283Srwatson ;; 644156283Srwatson mmix*) 645156283Srwatson basic_machine=mmix-knuth 646156283Srwatson os=-mmixware 647156283Srwatson ;; 648156283Srwatson monitor) 649156283Srwatson basic_machine=m68k-rom68k 650156283Srwatson os=-coff 651156283Srwatson ;; 652156283Srwatson morphos) 653156283Srwatson basic_machine=powerpc-unknown 654156283Srwatson os=-morphos 655156283Srwatson ;; 656156283Srwatson msdos) 657156283Srwatson basic_machine=i386-pc 658156283Srwatson os=-msdos 659156283Srwatson ;; 660156283Srwatson mvs) 661156283Srwatson basic_machine=i370-ibm 662156283Srwatson os=-mvs 663156283Srwatson ;; 664156283Srwatson ncr3000) 665156283Srwatson basic_machine=i486-ncr 666156283Srwatson os=-sysv4 667156283Srwatson ;; 668156283Srwatson netbsd386) 669156283Srwatson basic_machine=i386-unknown 670156283Srwatson os=-netbsd 671156283Srwatson ;; 672156283Srwatson netwinder) 673156283Srwatson basic_machine=armv4l-rebel 674156283Srwatson os=-linux 675156283Srwatson ;; 676156283Srwatson news | news700 | news800 | news900) 677156283Srwatson basic_machine=m68k-sony 678156283Srwatson os=-newsos 679156283Srwatson ;; 680156283Srwatson news1000) 681156283Srwatson basic_machine=m68030-sony 682156283Srwatson os=-newsos 683156283Srwatson ;; 684156283Srwatson news-3600 | risc-news) 685156283Srwatson basic_machine=mips-sony 686156283Srwatson os=-newsos 687156283Srwatson ;; 688156283Srwatson necv70) 689156283Srwatson basic_machine=v70-nec 690156283Srwatson os=-sysv 691156283Srwatson ;; 692156283Srwatson next | m*-next ) 693156283Srwatson basic_machine=m68k-next 694156283Srwatson case $os in 695156283Srwatson -nextstep* ) 696156283Srwatson ;; 697156283Srwatson -ns2*) 698156283Srwatson os=-nextstep2 699156283Srwatson ;; 700156283Srwatson *) 701156283Srwatson os=-nextstep3 702156283Srwatson ;; 703156283Srwatson esac 704156283Srwatson ;; 705156283Srwatson nh3000) 706156283Srwatson basic_machine=m68k-harris 707156283Srwatson os=-cxux 708156283Srwatson ;; 709156283Srwatson nh[45]000) 710156283Srwatson basic_machine=m88k-harris 711156283Srwatson os=-cxux 712156283Srwatson ;; 713156283Srwatson nindy960) 714156283Srwatson basic_machine=i960-intel 715156283Srwatson os=-nindy 716156283Srwatson ;; 717156283Srwatson mon960) 718156283Srwatson basic_machine=i960-intel 719156283Srwatson os=-mon960 720156283Srwatson ;; 721156283Srwatson nonstopux) 722156283Srwatson basic_machine=mips-compaq 723156283Srwatson os=-nonstopux 724156283Srwatson ;; 725156283Srwatson np1) 726156283Srwatson basic_machine=np1-gould 727156283Srwatson ;; 728156283Srwatson nv1) 729156283Srwatson basic_machine=nv1-cray 730156283Srwatson os=-unicosmp 731156283Srwatson ;; 732156283Srwatson nsr-tandem) 733156283Srwatson basic_machine=nsr-tandem 734156283Srwatson ;; 735156283Srwatson op50n-* | op60c-*) 736156283Srwatson basic_machine=hppa1.1-oki 737156283Srwatson os=-proelf 738156283Srwatson ;; 739156283Srwatson or32 | or32-*) 740156283Srwatson basic_machine=or32-unknown 741156283Srwatson os=-coff 742156283Srwatson ;; 743156283Srwatson OSE68000 | ose68000) 744156283Srwatson basic_machine=m68000-ericsson 745156283Srwatson os=-ose 746156283Srwatson ;; 747156283Srwatson os68k) 748156283Srwatson basic_machine=m68k-none 749156283Srwatson os=-os68k 750156283Srwatson ;; 751156283Srwatson pa-hitachi) 752156283Srwatson basic_machine=hppa1.1-hitachi 753156283Srwatson os=-hiuxwe2 754156283Srwatson ;; 755156283Srwatson paragon) 756156283Srwatson basic_machine=i860-intel 757156283Srwatson os=-osf 758156283Srwatson ;; 759156283Srwatson pbd) 760156283Srwatson basic_machine=sparc-tti 761156283Srwatson ;; 762156283Srwatson pbb) 763156283Srwatson basic_machine=m68k-tti 764156283Srwatson ;; 765156283Srwatson pc532 | pc532-*) 766156283Srwatson basic_machine=ns32k-pc532 767156283Srwatson ;; 768156283Srwatson pentium | p5 | k5 | k6 | nexgen | viac3) 769156283Srwatson basic_machine=i586-pc 770156283Srwatson ;; 771156283Srwatson pentiumpro | p6 | 6x86 | athlon | athlon_*) 772156283Srwatson basic_machine=i686-pc 773156283Srwatson ;; 774156283Srwatson pentiumii | pentium2 | pentiumiii | pentium3) 775156283Srwatson basic_machine=i686-pc 776156283Srwatson ;; 777156283Srwatson pentium4) 778156283Srwatson basic_machine=i786-pc 779156283Srwatson ;; 780156283Srwatson pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 781156283Srwatson basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 782156283Srwatson ;; 783156283Srwatson pentiumpro-* | p6-* | 6x86-* | athlon-*) 784156283Srwatson basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 785156283Srwatson ;; 786156283Srwatson pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 787156283Srwatson basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 788156283Srwatson ;; 789156283Srwatson pentium4-*) 790156283Srwatson basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 791156283Srwatson ;; 792156283Srwatson pn) 793156283Srwatson basic_machine=pn-gould 794156283Srwatson ;; 795156283Srwatson power) basic_machine=power-ibm 796156283Srwatson ;; 797156283Srwatson ppc) basic_machine=powerpc-unknown 798156283Srwatson ;; 799156283Srwatson ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 800156283Srwatson ;; 801156283Srwatson ppcle | powerpclittle | ppc-le | powerpc-little) 802156283Srwatson basic_machine=powerpcle-unknown 803156283Srwatson ;; 804156283Srwatson ppcle-* | powerpclittle-*) 805156283Srwatson basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 806156283Srwatson ;; 807156283Srwatson ppc64) basic_machine=powerpc64-unknown 808156283Srwatson ;; 809156283Srwatson ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 810156283Srwatson ;; 811156283Srwatson ppc64le | powerpc64little | ppc64-le | powerpc64-little) 812156283Srwatson basic_machine=powerpc64le-unknown 813156283Srwatson ;; 814156283Srwatson ppc64le-* | powerpc64little-*) 815156283Srwatson basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 816156283Srwatson ;; 817156283Srwatson ps2) 818156283Srwatson basic_machine=i386-ibm 819156283Srwatson ;; 820156283Srwatson pw32) 821156283Srwatson basic_machine=i586-unknown 822156283Srwatson os=-pw32 823156283Srwatson ;; 824156283Srwatson rom68k) 825156283Srwatson basic_machine=m68k-rom68k 826156283Srwatson os=-coff 827156283Srwatson ;; 828156283Srwatson rm[46]00) 829156283Srwatson basic_machine=mips-siemens 830156283Srwatson ;; 831156283Srwatson rtpc | rtpc-*) 832156283Srwatson basic_machine=romp-ibm 833156283Srwatson ;; 834156283Srwatson s390 | s390-*) 835156283Srwatson basic_machine=s390-ibm 836156283Srwatson ;; 837156283Srwatson s390x | s390x-*) 838156283Srwatson basic_machine=s390x-ibm 839156283Srwatson ;; 840156283Srwatson sa29200) 841156283Srwatson basic_machine=a29k-amd 842156283Srwatson os=-udi 843156283Srwatson ;; 844156283Srwatson sb1) 845156283Srwatson basic_machine=mipsisa64sb1-unknown 846156283Srwatson ;; 847156283Srwatson sb1el) 848156283Srwatson basic_machine=mipsisa64sb1el-unknown 849156283Srwatson ;; 850156283Srwatson sei) 851156283Srwatson basic_machine=mips-sei 852156283Srwatson os=-seiux 853156283Srwatson ;; 854156283Srwatson sequent) 855156283Srwatson basic_machine=i386-sequent 856156283Srwatson ;; 857156283Srwatson sh) 858156283Srwatson basic_machine=sh-hitachi 859156283Srwatson os=-hms 860156283Srwatson ;; 861156283Srwatson sh64) 862156283Srwatson basic_machine=sh64-unknown 863156283Srwatson ;; 864156283Srwatson sparclite-wrs | simso-wrs) 865156283Srwatson basic_machine=sparclite-wrs 866156283Srwatson os=-vxworks 867156283Srwatson ;; 868156283Srwatson sps7) 869156283Srwatson basic_machine=m68k-bull 870156283Srwatson os=-sysv2 871156283Srwatson ;; 872156283Srwatson spur) 873156283Srwatson basic_machine=spur-unknown 874156283Srwatson ;; 875156283Srwatson st2000) 876156283Srwatson basic_machine=m68k-tandem 877156283Srwatson ;; 878156283Srwatson stratus) 879156283Srwatson basic_machine=i860-stratus 880156283Srwatson os=-sysv4 881156283Srwatson ;; 882156283Srwatson sun2) 883156283Srwatson basic_machine=m68000-sun 884156283Srwatson ;; 885156283Srwatson sun2os3) 886156283Srwatson basic_machine=m68000-sun 887156283Srwatson os=-sunos3 888156283Srwatson ;; 889156283Srwatson sun2os4) 890156283Srwatson basic_machine=m68000-sun 891156283Srwatson os=-sunos4 892156283Srwatson ;; 893156283Srwatson sun3os3) 894156283Srwatson basic_machine=m68k-sun 895156283Srwatson os=-sunos3 896156283Srwatson ;; 897156283Srwatson sun3os4) 898156283Srwatson basic_machine=m68k-sun 899156283Srwatson os=-sunos4 900156283Srwatson ;; 901156283Srwatson sun4os3) 902156283Srwatson basic_machine=sparc-sun 903156283Srwatson os=-sunos3 904156283Srwatson ;; 905156283Srwatson sun4os4) 906156283Srwatson basic_machine=sparc-sun 907156283Srwatson os=-sunos4 908156283Srwatson ;; 909156283Srwatson sun4sol2) 910156283Srwatson basic_machine=sparc-sun 911156283Srwatson os=-solaris2 912156283Srwatson ;; 913156283Srwatson sun3 | sun3-*) 914156283Srwatson basic_machine=m68k-sun 915156283Srwatson ;; 916156283Srwatson sun4) 917156283Srwatson basic_machine=sparc-sun 918156283Srwatson ;; 919156283Srwatson sun386 | sun386i | roadrunner) 920156283Srwatson basic_machine=i386-sun 921156283Srwatson ;; 922156283Srwatson sv1) 923156283Srwatson basic_machine=sv1-cray 924156283Srwatson os=-unicos 925156283Srwatson ;; 926156283Srwatson symmetry) 927156283Srwatson basic_machine=i386-sequent 928156283Srwatson os=-dynix 929156283Srwatson ;; 930156283Srwatson t3e) 931156283Srwatson basic_machine=alphaev5-cray 932156283Srwatson os=-unicos 933156283Srwatson ;; 934156283Srwatson t90) 935156283Srwatson basic_machine=t90-cray 936156283Srwatson os=-unicos 937156283Srwatson ;; 938156283Srwatson tic54x | c54x*) 939156283Srwatson basic_machine=tic54x-unknown 940156283Srwatson os=-coff 941156283Srwatson ;; 942156283Srwatson tic55x | c55x*) 943156283Srwatson basic_machine=tic55x-unknown 944156283Srwatson os=-coff 945156283Srwatson ;; 946156283Srwatson tic6x | c6x*) 947156283Srwatson basic_machine=tic6x-unknown 948156283Srwatson os=-coff 949156283Srwatson ;; 950156283Srwatson tx39) 951156283Srwatson basic_machine=mipstx39-unknown 952156283Srwatson ;; 953156283Srwatson tx39el) 954156283Srwatson basic_machine=mipstx39el-unknown 955156283Srwatson ;; 956156283Srwatson toad1) 957156283Srwatson basic_machine=pdp10-xkl 958156283Srwatson os=-tops20 959156283Srwatson ;; 960156283Srwatson tower | tower-32) 961156283Srwatson basic_machine=m68k-ncr 962156283Srwatson ;; 963156283Srwatson udi29k) 964156283Srwatson basic_machine=a29k-amd 965156283Srwatson os=-udi 966156283Srwatson ;; 967156283Srwatson ultra3) 968156283Srwatson basic_machine=a29k-nyu 969156283Srwatson os=-sym1 970156283Srwatson ;; 971156283Srwatson v810 | necv810) 972156283Srwatson basic_machine=v810-nec 973156283Srwatson os=-none 974156283Srwatson ;; 975156283Srwatson vaxv) 976156283Srwatson basic_machine=vax-dec 977156283Srwatson os=-sysv 978156283Srwatson ;; 979156283Srwatson vms) 980156283Srwatson basic_machine=vax-dec 981156283Srwatson os=-vms 982156283Srwatson ;; 983156283Srwatson vpp*|vx|vx-*) 984156283Srwatson basic_machine=f301-fujitsu 985156283Srwatson ;; 986156283Srwatson vxworks960) 987156283Srwatson basic_machine=i960-wrs 988156283Srwatson os=-vxworks 989156283Srwatson ;; 990156283Srwatson vxworks68) 991156283Srwatson basic_machine=m68k-wrs 992156283Srwatson os=-vxworks 993156283Srwatson ;; 994156283Srwatson vxworks29k) 995156283Srwatson basic_machine=a29k-wrs 996156283Srwatson os=-vxworks 997156283Srwatson ;; 998156283Srwatson w65*) 999156283Srwatson basic_machine=w65-wdc 1000156283Srwatson os=-none 1001156283Srwatson ;; 1002156283Srwatson w89k-*) 1003156283Srwatson basic_machine=hppa1.1-winbond 1004156283Srwatson os=-proelf 1005156283Srwatson ;; 1006156283Srwatson xps | xps100) 1007156283Srwatson basic_machine=xps100-honeywell 1008156283Srwatson ;; 1009156283Srwatson ymp) 1010156283Srwatson basic_machine=ymp-cray 1011156283Srwatson os=-unicos 1012156283Srwatson ;; 1013156283Srwatson z8k-*-coff) 1014156283Srwatson basic_machine=z8k-unknown 1015156283Srwatson os=-sim 1016156283Srwatson ;; 1017156283Srwatson none) 1018156283Srwatson basic_machine=none-none 1019156283Srwatson os=-none 1020156283Srwatson ;; 1021156283Srwatson 1022156283Srwatson# Here we handle the default manufacturer of certain CPU types. It is in 1023156283Srwatson# some cases the only manufacturer, in others, it is the most popular. 1024156283Srwatson w89k) 1025156283Srwatson basic_machine=hppa1.1-winbond 1026156283Srwatson ;; 1027156283Srwatson op50n) 1028156283Srwatson basic_machine=hppa1.1-oki 1029156283Srwatson ;; 1030156283Srwatson op60c) 1031156283Srwatson basic_machine=hppa1.1-oki 1032156283Srwatson ;; 1033156283Srwatson romp) 1034156283Srwatson basic_machine=romp-ibm 1035156283Srwatson ;; 1036156283Srwatson rs6000) 1037156283Srwatson basic_machine=rs6000-ibm 1038156283Srwatson ;; 1039156283Srwatson vax) 1040156283Srwatson basic_machine=vax-dec 1041156283Srwatson ;; 1042156283Srwatson pdp10) 1043156283Srwatson # there are many clones, so DEC is not a safe bet 1044156283Srwatson basic_machine=pdp10-unknown 1045156283Srwatson ;; 1046156283Srwatson pdp11) 1047156283Srwatson basic_machine=pdp11-dec 1048156283Srwatson ;; 1049156283Srwatson we32k) 1050156283Srwatson basic_machine=we32k-att 1051156283Srwatson ;; 1052156283Srwatson sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) 1053156283Srwatson basic_machine=sh-unknown 1054156283Srwatson ;; 1055156283Srwatson sh64) 1056156283Srwatson basic_machine=sh64-unknown 1057156283Srwatson ;; 1058156283Srwatson sparc | sparcv9 | sparcv9b) 1059156283Srwatson basic_machine=sparc-sun 1060156283Srwatson ;; 1061156283Srwatson cydra) 1062156283Srwatson basic_machine=cydra-cydrome 1063156283Srwatson ;; 1064156283Srwatson orion) 1065156283Srwatson basic_machine=orion-highlevel 1066156283Srwatson ;; 1067156283Srwatson orion105) 1068156283Srwatson basic_machine=clipper-highlevel 1069156283Srwatson ;; 1070156283Srwatson mac | mpw | mac-mpw) 1071156283Srwatson basic_machine=m68k-apple 1072156283Srwatson ;; 1073156283Srwatson pmac | pmac-mpw) 1074156283Srwatson basic_machine=powerpc-apple 1075156283Srwatson ;; 1076156283Srwatson *-unknown) 1077156283Srwatson # Make sure to match an already-canonicalized machine name. 1078156283Srwatson ;; 1079156283Srwatson *) 1080156283Srwatson echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 1081156283Srwatson exit 1 1082156283Srwatson ;; 1083156283Srwatsonesac 1084156283Srwatson 1085156283Srwatson# Here we canonicalize certain aliases for manufacturers. 1086156283Srwatsoncase $basic_machine in 1087156283Srwatson *-digital*) 1088156283Srwatson basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 1089156283Srwatson ;; 1090156283Srwatson *-commodore*) 1091156283Srwatson basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 1092156283Srwatson ;; 1093156283Srwatson *) 1094156283Srwatson ;; 1095156283Srwatsonesac 1096156283Srwatson 1097156283Srwatson# Decode manufacturer-specific aliases for certain operating systems. 1098156283Srwatson 1099156283Srwatsonif [ x"$os" != x"" ] 1100156283Srwatsonthen 1101156283Srwatsoncase $os in 1102156283Srwatson # First match some system type aliases 1103156283Srwatson # that might get confused with valid system types. 1104156283Srwatson # -solaris* is a basic system type, with this one exception. 1105156283Srwatson -solaris1 | -solaris1.*) 1106156283Srwatson os=`echo $os | sed -e 's|solaris1|sunos4|'` 1107156283Srwatson ;; 1108156283Srwatson -solaris) 1109156283Srwatson os=-solaris2 1110156283Srwatson ;; 1111156283Srwatson -svr4*) 1112156283Srwatson os=-sysv4 1113156283Srwatson ;; 1114156283Srwatson -unixware*) 1115156283Srwatson os=-sysv4.2uw 1116156283Srwatson ;; 1117156283Srwatson -gnu/linux*) 1118156283Srwatson os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 1119156283Srwatson ;; 1120156283Srwatson # First accept the basic system types. 1121156283Srwatson # The portable systems comes first. 1122156283Srwatson # Each alternative MUST END IN A *, to match a version number. 1123156283Srwatson # -sysv* is not here because it comes later, after sysvr4. 1124156283Srwatson -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1125156283Srwatson | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ 1126156283Srwatson | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ 1127156283Srwatson | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1128156283Srwatson | -aos* \ 1129156283Srwatson | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1130156283Srwatson | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1131156283Srwatson | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ 1132156283Srwatson | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1133156283Srwatson | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1134156283Srwatson | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1135156283Srwatson | -chorusos* | -chorusrdb* \ 1136156283Srwatson | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1137156283Srwatson | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ 1138156283Srwatson | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1139156283Srwatson | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1140156283Srwatson | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1141156283Srwatson | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1142156283Srwatson | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1143156283Srwatson | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) 1144156283Srwatson # Remember, each alternative MUST END IN *, to match a version number. 1145156283Srwatson ;; 1146156283Srwatson -qnx*) 1147156283Srwatson case $basic_machine in 1148156283Srwatson x86-* | i*86-*) 1149156283Srwatson ;; 1150156283Srwatson *) 1151156283Srwatson os=-nto$os 1152156283Srwatson ;; 1153156283Srwatson esac 1154156283Srwatson ;; 1155156283Srwatson -nto-qnx*) 1156156283Srwatson ;; 1157156283Srwatson -nto*) 1158156283Srwatson os=`echo $os | sed -e 's|nto|nto-qnx|'` 1159156283Srwatson ;; 1160156283Srwatson -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 1161156283Srwatson | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ 1162156283Srwatson | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1163156283Srwatson ;; 1164156283Srwatson -mac*) 1165156283Srwatson os=`echo $os | sed -e 's|mac|macos|'` 1166156283Srwatson ;; 1167156283Srwatson -linux*) 1168156283Srwatson os=`echo $os | sed -e 's|linux|linux-gnu|'` 1169156283Srwatson ;; 1170156283Srwatson -sunos5*) 1171156283Srwatson os=`echo $os | sed -e 's|sunos5|solaris2|'` 1172156283Srwatson ;; 1173156283Srwatson -sunos6*) 1174156283Srwatson os=`echo $os | sed -e 's|sunos6|solaris3|'` 1175156283Srwatson ;; 1176156283Srwatson -opened*) 1177156283Srwatson os=-openedition 1178156283Srwatson ;; 1179156283Srwatson -wince*) 1180156283Srwatson os=-wince 1181156283Srwatson ;; 1182156283Srwatson -osfrose*) 1183156283Srwatson os=-osfrose 1184156283Srwatson ;; 1185156283Srwatson -osf*) 1186156283Srwatson os=-osf 1187156283Srwatson ;; 1188156283Srwatson -utek*) 1189156283Srwatson os=-bsd 1190156283Srwatson ;; 1191156283Srwatson -dynix*) 1192156283Srwatson os=-bsd 1193156283Srwatson ;; 1194156283Srwatson -acis*) 1195156283Srwatson os=-aos 1196156283Srwatson ;; 1197156283Srwatson -atheos*) 1198156283Srwatson os=-atheos 1199156283Srwatson ;; 1200156283Srwatson -386bsd) 1201156283Srwatson os=-bsd 1202156283Srwatson ;; 1203156283Srwatson -ctix* | -uts*) 1204156283Srwatson os=-sysv 1205156283Srwatson ;; 1206156283Srwatson -nova*) 1207156283Srwatson os=-rtmk-nova 1208156283Srwatson ;; 1209156283Srwatson -ns2 ) 1210156283Srwatson os=-nextstep2 1211156283Srwatson ;; 1212156283Srwatson -nsk*) 1213156283Srwatson os=-nsk 1214156283Srwatson ;; 1215156283Srwatson # Preserve the version number of sinix5. 1216156283Srwatson -sinix5.*) 1217156283Srwatson os=`echo $os | sed -e 's|sinix|sysv|'` 1218156283Srwatson ;; 1219156283Srwatson -sinix*) 1220156283Srwatson os=-sysv4 1221156283Srwatson ;; 1222156283Srwatson -triton*) 1223156283Srwatson os=-sysv3 1224156283Srwatson ;; 1225156283Srwatson -oss*) 1226156283Srwatson os=-sysv3 1227156283Srwatson ;; 1228156283Srwatson -svr4) 1229156283Srwatson os=-sysv4 1230156283Srwatson ;; 1231156283Srwatson -svr3) 1232156283Srwatson os=-sysv3 1233156283Srwatson ;; 1234156283Srwatson -sysvr4) 1235156283Srwatson os=-sysv4 1236156283Srwatson ;; 1237156283Srwatson # This must come after -sysvr4. 1238156283Srwatson -sysv*) 1239156283Srwatson ;; 1240156283Srwatson -ose*) 1241156283Srwatson os=-ose 1242156283Srwatson ;; 1243156283Srwatson -es1800*) 1244156283Srwatson os=-ose 1245156283Srwatson ;; 1246156283Srwatson -xenix) 1247156283Srwatson os=-xenix 1248156283Srwatson ;; 1249156283Srwatson -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1250156283Srwatson os=-mint 1251156283Srwatson ;; 1252156283Srwatson -aros*) 1253156283Srwatson os=-aros 1254156283Srwatson ;; 1255156283Srwatson -kaos*) 1256156283Srwatson os=-kaos 1257156283Srwatson ;; 1258156283Srwatson -none) 1259156283Srwatson ;; 1260156283Srwatson *) 1261156283Srwatson # Get rid of the `-' at the beginning of $os. 1262156283Srwatson os=`echo $os | sed 's/[^-]*-//'` 1263156283Srwatson echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 1264156283Srwatson exit 1 1265156283Srwatson ;; 1266156283Srwatsonesac 1267156283Srwatsonelse 1268156283Srwatson 1269156283Srwatson# Here we handle the default operating systems that come with various machines. 1270156283Srwatson# The value should be what the vendor currently ships out the door with their 1271156283Srwatson# machine or put another way, the most popular os provided with the machine. 1272156283Srwatson 1273156283Srwatson# Note that if you're going to try to match "-MANUFACTURER" here (say, 1274156283Srwatson# "-sun"), then you have to tell the case statement up towards the top 1275156283Srwatson# that MANUFACTURER isn't an operating system. Otherwise, code above 1276156283Srwatson# will signal an error saying that MANUFACTURER isn't an operating 1277156283Srwatson# system, and we'll never get to this point. 1278156283Srwatson 1279156283Srwatsoncase $basic_machine in 1280156283Srwatson *-acorn) 1281156283Srwatson os=-riscix1.2 1282156283Srwatson ;; 1283156283Srwatson arm*-rebel) 1284156283Srwatson os=-linux 1285156283Srwatson ;; 1286156283Srwatson arm*-semi) 1287156283Srwatson os=-aout 1288156283Srwatson ;; 1289156283Srwatson c4x-* | tic4x-*) 1290156283Srwatson os=-coff 1291156283Srwatson ;; 1292156283Srwatson # This must come before the *-dec entry. 1293156283Srwatson pdp10-*) 1294156283Srwatson os=-tops20 1295156283Srwatson ;; 1296156283Srwatson pdp11-*) 1297156283Srwatson os=-none 1298156283Srwatson ;; 1299156283Srwatson *-dec | vax-*) 1300156283Srwatson os=-ultrix4.2 1301156283Srwatson ;; 1302156283Srwatson m68*-apollo) 1303156283Srwatson os=-domain 1304156283Srwatson ;; 1305156283Srwatson i386-sun) 1306156283Srwatson os=-sunos4.0.2 1307156283Srwatson ;; 1308156283Srwatson m68000-sun) 1309156283Srwatson os=-sunos3 1310156283Srwatson # This also exists in the configure program, but was not the 1311156283Srwatson # default. 1312156283Srwatson # os=-sunos4 1313156283Srwatson ;; 1314156283Srwatson m68*-cisco) 1315156283Srwatson os=-aout 1316156283Srwatson ;; 1317156283Srwatson mips*-cisco) 1318156283Srwatson os=-elf 1319156283Srwatson ;; 1320156283Srwatson mips*-*) 1321156283Srwatson os=-elf 1322156283Srwatson ;; 1323156283Srwatson or32-*) 1324156283Srwatson os=-coff 1325156283Srwatson ;; 1326156283Srwatson *-tti) # must be before sparc entry or we get the wrong os. 1327156283Srwatson os=-sysv3 1328156283Srwatson ;; 1329156283Srwatson sparc-* | *-sun) 1330156283Srwatson os=-sunos4.1.1 1331156283Srwatson ;; 1332156283Srwatson *-be) 1333156283Srwatson os=-beos 1334156283Srwatson ;; 1335156283Srwatson *-ibm) 1336156283Srwatson os=-aix 1337156283Srwatson ;; 1338156283Srwatson *-wec) 1339156283Srwatson os=-proelf 1340156283Srwatson ;; 1341156283Srwatson *-winbond) 1342156283Srwatson os=-proelf 1343156283Srwatson ;; 1344156283Srwatson *-oki) 1345156283Srwatson os=-proelf 1346156283Srwatson ;; 1347156283Srwatson *-hp) 1348156283Srwatson os=-hpux 1349156283Srwatson ;; 1350156283Srwatson *-hitachi) 1351156283Srwatson os=-hiux 1352156283Srwatson ;; 1353156283Srwatson i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 1354156283Srwatson os=-sysv 1355156283Srwatson ;; 1356156283Srwatson *-cbm) 1357156283Srwatson os=-amigaos 1358156283Srwatson ;; 1359156283Srwatson *-dg) 1360156283Srwatson os=-dgux 1361156283Srwatson ;; 1362156283Srwatson *-dolphin) 1363156283Srwatson os=-sysv3 1364156283Srwatson ;; 1365156283Srwatson m68k-ccur) 1366156283Srwatson os=-rtu 1367156283Srwatson ;; 1368156283Srwatson m88k-omron*) 1369156283Srwatson os=-luna 1370156283Srwatson ;; 1371156283Srwatson *-next ) 1372156283Srwatson os=-nextstep 1373156283Srwatson ;; 1374156283Srwatson *-sequent) 1375156283Srwatson os=-ptx 1376156283Srwatson ;; 1377156283Srwatson *-crds) 1378156283Srwatson os=-unos 1379156283Srwatson ;; 1380156283Srwatson *-ns) 1381156283Srwatson os=-genix 1382156283Srwatson ;; 1383156283Srwatson i370-*) 1384156283Srwatson os=-mvs 1385156283Srwatson ;; 1386156283Srwatson *-next) 1387156283Srwatson os=-nextstep3 1388156283Srwatson ;; 1389156283Srwatson *-gould) 1390156283Srwatson os=-sysv 1391156283Srwatson ;; 1392156283Srwatson *-highlevel) 1393156283Srwatson os=-bsd 1394156283Srwatson ;; 1395156283Srwatson *-encore) 1396156283Srwatson os=-bsd 1397156283Srwatson ;; 1398156283Srwatson *-sgi) 1399156283Srwatson os=-irix 1400156283Srwatson ;; 1401156283Srwatson *-siemens) 1402156283Srwatson os=-sysv4 1403156283Srwatson ;; 1404156283Srwatson *-masscomp) 1405156283Srwatson os=-rtu 1406156283Srwatson ;; 1407156283Srwatson f30[01]-fujitsu | f700-fujitsu) 1408156283Srwatson os=-uxpv 1409156283Srwatson ;; 1410156283Srwatson *-rom68k) 1411156283Srwatson os=-coff 1412156283Srwatson ;; 1413156283Srwatson *-*bug) 1414156283Srwatson os=-coff 1415156283Srwatson ;; 1416156283Srwatson *-apple) 1417156283Srwatson os=-macos 1418156283Srwatson ;; 1419156283Srwatson *-atari*) 1420156283Srwatson os=-mint 1421156283Srwatson ;; 1422156283Srwatson *) 1423156283Srwatson os=-none 1424156283Srwatson ;; 1425156283Srwatsonesac 1426156283Srwatsonfi 1427156283Srwatson 1428156283Srwatson# Here we handle the case where we know the os, and the CPU type, but not the 1429156283Srwatson# manufacturer. We pick the logical manufacturer. 1430156283Srwatsonvendor=unknown 1431156283Srwatsoncase $basic_machine in 1432156283Srwatson *-unknown) 1433156283Srwatson case $os in 1434156283Srwatson -riscix*) 1435156283Srwatson vendor=acorn 1436156283Srwatson ;; 1437156283Srwatson -sunos*) 1438156283Srwatson vendor=sun 1439156283Srwatson ;; 1440156283Srwatson -aix*) 1441156283Srwatson vendor=ibm 1442156283Srwatson ;; 1443156283Srwatson -beos*) 1444156283Srwatson vendor=be 1445156283Srwatson ;; 1446156283Srwatson -hpux*) 1447156283Srwatson vendor=hp 1448156283Srwatson ;; 1449156283Srwatson -mpeix*) 1450156283Srwatson vendor=hp 1451156283Srwatson ;; 1452156283Srwatson -hiux*) 1453156283Srwatson vendor=hitachi 1454156283Srwatson ;; 1455156283Srwatson -unos*) 1456156283Srwatson vendor=crds 1457156283Srwatson ;; 1458156283Srwatson -dgux*) 1459156283Srwatson vendor=dg 1460156283Srwatson ;; 1461156283Srwatson -luna*) 1462156283Srwatson vendor=omron 1463156283Srwatson ;; 1464156283Srwatson -genix*) 1465156283Srwatson vendor=ns 1466156283Srwatson ;; 1467156283Srwatson -mvs* | -opened*) 1468156283Srwatson vendor=ibm 1469156283Srwatson ;; 1470156283Srwatson -ptx*) 1471156283Srwatson vendor=sequent 1472156283Srwatson ;; 1473156283Srwatson -vxsim* | -vxworks* | -windiss*) 1474156283Srwatson vendor=wrs 1475156283Srwatson ;; 1476156283Srwatson -aux*) 1477156283Srwatson vendor=apple 1478156283Srwatson ;; 1479156283Srwatson -hms*) 1480156283Srwatson vendor=hitachi 1481156283Srwatson ;; 1482156283Srwatson -mpw* | -macos*) 1483156283Srwatson vendor=apple 1484156283Srwatson ;; 1485156283Srwatson -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1486156283Srwatson vendor=atari 1487156283Srwatson ;; 1488156283Srwatson -vos*) 1489156283Srwatson vendor=stratus 1490156283Srwatson ;; 1491156283Srwatson esac 1492156283Srwatson basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 1493156283Srwatson ;; 1494156283Srwatsonesac 1495156283Srwatson 1496156283Srwatsonecho $basic_machine$os 1497156283Srwatsonexit 0 1498156283Srwatson 1499156283Srwatson# Local variables: 1500156283Srwatson# eval: (add-hook 'write-file-hooks 'time-stamp) 1501156283Srwatson# time-stamp-start: "timestamp='" 1502156283Srwatson# time-stamp-format: "%:y-%02m-%02d" 1503156283Srwatson# time-stamp-end: "'" 1504156283Srwatson# End: 1505