1219820Sjeff#! /bin/sh 2219820Sjeff# Configuration validation subroutine script. 3219820Sjeff# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4219820Sjeff# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 5219820Sjeff 6219820Sjefftimestamp='2005-07-08' 7219820Sjeff 8219820Sjeff# This file is (in principle) common to ALL GNU software. 9219820Sjeff# The presence of a machine in this file suggests that SOME GNU software 10219820Sjeff# can handle that machine. It does not imply ALL GNU software can. 11219820Sjeff# 12219820Sjeff# This file is free software; you can redistribute it and/or modify 13219820Sjeff# it under the terms of the GNU General Public License as published by 14219820Sjeff# the Free Software Foundation; either version 2 of the License, or 15219820Sjeff# (at your option) any later version. 16219820Sjeff# 17219820Sjeff# This program is distributed in the hope that it will be useful, 18219820Sjeff# but WITHOUT ANY WARRANTY; without even the implied warranty of 19219820Sjeff# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20219820Sjeff# GNU General Public License for more details. 21219820Sjeff# 22219820Sjeff# You should have received a copy of the GNU General Public License 23219820Sjeff# along with this program; if not, write to the Free Software 24219820Sjeff# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 25219820Sjeff# 02110-1301, USA. 26219820Sjeff# 27219820Sjeff# As a special exception to the GNU General Public License, if you 28219820Sjeff# distribute this file as part of a program that contains a 29219820Sjeff# configuration script generated by Autoconf, you may include it under 30219820Sjeff# the same distribution terms that you use for the rest of that program. 31219820Sjeff 32219820Sjeff 33219820Sjeff# Please send patches to <config-patches@gnu.org>. Submit a context 34219820Sjeff# diff and a properly formatted ChangeLog entry. 35219820Sjeff# 36219820Sjeff# Configuration subroutine to validate and canonicalize a configuration type. 37219820Sjeff# Supply the specified configuration type as an argument. 38219820Sjeff# If it is invalid, we print an error message on stderr and exit with code 1. 39219820Sjeff# Otherwise, we print the canonical config type on stdout and succeed. 40219820Sjeff 41219820Sjeff# This file is supposed to be the same for all GNU packages 42219820Sjeff# and recognize all the CPU types, system types and aliases 43219820Sjeff# that are meaningful with *any* GNU software. 44219820Sjeff# Each package is responsible for reporting which valid configurations 45219820Sjeff# it does not support. The user should be able to distinguish 46219820Sjeff# a failure to support a valid configuration from a meaningless 47219820Sjeff# configuration. 48219820Sjeff 49219820Sjeff# The goal of this file is to map all the various variations of a given 50219820Sjeff# machine specification into a single specification in the form: 51219820Sjeff# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 52219820Sjeff# or in some cases, the newer four-part form: 53219820Sjeff# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 54219820Sjeff# It is wrong to echo any other type of specification. 55219820Sjeff 56219820Sjeffme=`echo "$0" | sed -e 's,.*/,,'` 57219820Sjeff 58219820Sjeffusage="\ 59219820SjeffUsage: $0 [OPTION] CPU-MFR-OPSYS 60219820Sjeff $0 [OPTION] ALIAS 61219820Sjeff 62219820SjeffCanonicalize a configuration name. 63219820Sjeff 64219820SjeffOperation modes: 65219820Sjeff -h, --help print this help, then exit 66219820Sjeff -t, --time-stamp print date of last modification, then exit 67219820Sjeff -v, --version print version number, then exit 68219820Sjeff 69219820SjeffReport bugs and patches to <config-patches@gnu.org>." 70219820Sjeff 71219820Sjeffversion="\ 72219820SjeffGNU config.sub ($timestamp) 73219820Sjeff 74219820SjeffCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 75219820SjeffFree Software Foundation, Inc. 76219820Sjeff 77219820SjeffThis is free software; see the source for copying conditions. There is NO 78219820Sjeffwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 79219820Sjeff 80219820Sjeffhelp=" 81219820SjeffTry \`$me --help' for more information." 82219820Sjeff 83219820Sjeff# Parse command line 84219820Sjeffwhile test $# -gt 0 ; do 85219820Sjeff case $1 in 86219820Sjeff --time-stamp | --time* | -t ) 87219820Sjeff echo "$timestamp" ; exit ;; 88219820Sjeff --version | -v ) 89219820Sjeff echo "$version" ; exit ;; 90219820Sjeff --help | --h* | -h ) 91219820Sjeff echo "$usage"; exit ;; 92219820Sjeff -- ) # Stop option processing 93219820Sjeff shift; break ;; 94219820Sjeff - ) # Use stdin as input. 95219820Sjeff break ;; 96219820Sjeff -* ) 97219820Sjeff echo "$me: invalid option $1$help" 98219820Sjeff exit 1 ;; 99219820Sjeff 100219820Sjeff *local*) 101219820Sjeff # First pass through any local machine types. 102219820Sjeff echo $1 103219820Sjeff exit ;; 104219820Sjeff 105219820Sjeff * ) 106219820Sjeff break ;; 107219820Sjeff esac 108219820Sjeffdone 109219820Sjeff 110219820Sjeffcase $# in 111219820Sjeff 0) echo "$me: missing argument$help" >&2 112219820Sjeff exit 1;; 113219820Sjeff 1) ;; 114219820Sjeff *) echo "$me: too many arguments$help" >&2 115219820Sjeff exit 1;; 116219820Sjeffesac 117219820Sjeff 118219820Sjeff# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 119219820Sjeff# Here we must recognize all the valid KERNEL-OS combinations. 120219820Sjeffmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 121219820Sjeffcase $maybe_os in 122219820Sjeff nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ 123219820Sjeff kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) 124219820Sjeff os=-$maybe_os 125219820Sjeff basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 126219820Sjeff ;; 127219820Sjeff *) 128219820Sjeff basic_machine=`echo $1 | sed 's/-[^-]*$//'` 129219820Sjeff if [ $basic_machine != $1 ] 130219820Sjeff then os=`echo $1 | sed 's/.*-/-/'` 131219820Sjeff else os=; fi 132219820Sjeff ;; 133219820Sjeffesac 134219820Sjeff 135219820Sjeff### Let's recognize common machines as not being operating systems so 136219820Sjeff### that things like config.sub decstation-3100 work. We also 137219820Sjeff### recognize some manufacturers as not being operating systems, so we 138219820Sjeff### can provide default operating systems below. 139219820Sjeffcase $os in 140219820Sjeff -sun*os*) 141219820Sjeff # Prevent following clause from handling this invalid input. 142219820Sjeff ;; 143219820Sjeff -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 144219820Sjeff -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 145219820Sjeff -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 146219820Sjeff -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 147219820Sjeff -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 148219820Sjeff -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 149219820Sjeff -apple | -axis | -knuth | -cray) 150219820Sjeff os= 151219820Sjeff basic_machine=$1 152219820Sjeff ;; 153219820Sjeff -sim | -cisco | -oki | -wec | -winbond) 154219820Sjeff os= 155219820Sjeff basic_machine=$1 156219820Sjeff ;; 157219820Sjeff -scout) 158219820Sjeff ;; 159219820Sjeff -wrs) 160219820Sjeff os=-vxworks 161219820Sjeff basic_machine=$1 162219820Sjeff ;; 163219820Sjeff -chorusos*) 164219820Sjeff os=-chorusos 165219820Sjeff basic_machine=$1 166219820Sjeff ;; 167219820Sjeff -chorusrdb) 168219820Sjeff os=-chorusrdb 169219820Sjeff basic_machine=$1 170219820Sjeff ;; 171219820Sjeff -hiux*) 172219820Sjeff os=-hiuxwe2 173219820Sjeff ;; 174219820Sjeff -sco5) 175219820Sjeff os=-sco3.2v5 176219820Sjeff basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 177219820Sjeff ;; 178219820Sjeff -sco4) 179219820Sjeff os=-sco3.2v4 180219820Sjeff basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 181219820Sjeff ;; 182219820Sjeff -sco3.2.[4-9]*) 183219820Sjeff os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 184219820Sjeff basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 185219820Sjeff ;; 186219820Sjeff -sco3.2v[4-9]*) 187219820Sjeff # Don't forget version if it is 3.2v4 or newer. 188219820Sjeff basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 189219820Sjeff ;; 190219820Sjeff -sco*) 191219820Sjeff os=-sco3.2v2 192219820Sjeff basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 193219820Sjeff ;; 194219820Sjeff -udk*) 195219820Sjeff basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 196219820Sjeff ;; 197219820Sjeff -isc) 198219820Sjeff os=-isc2.2 199219820Sjeff basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 200219820Sjeff ;; 201219820Sjeff -clix*) 202219820Sjeff basic_machine=clipper-intergraph 203219820Sjeff ;; 204219820Sjeff -isc*) 205219820Sjeff basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 206219820Sjeff ;; 207219820Sjeff -lynx*) 208219820Sjeff os=-lynxos 209219820Sjeff ;; 210219820Sjeff -ptx*) 211219820Sjeff basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 212219820Sjeff ;; 213219820Sjeff -windowsnt*) 214219820Sjeff os=`echo $os | sed -e 's/windowsnt/winnt/'` 215219820Sjeff ;; 216219820Sjeff -psos*) 217219820Sjeff os=-psos 218219820Sjeff ;; 219219820Sjeff -mint | -mint[0-9]*) 220219820Sjeff basic_machine=m68k-atari 221219820Sjeff os=-mint 222219820Sjeff ;; 223219820Sjeffesac 224219820Sjeff 225219820Sjeff# Decode aliases for certain CPU-COMPANY combinations. 226219820Sjeffcase $basic_machine in 227219820Sjeff # Recognize the basic CPU types without company name. 228219820Sjeff # Some are omitted here because they have special meanings below. 229219820Sjeff 1750a | 580 \ 230219820Sjeff | a29k \ 231219820Sjeff | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 232219820Sjeff | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 233219820Sjeff | am33_2.0 \ 234219820Sjeff | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ 235219820Sjeff | bfin \ 236219820Sjeff | c4x | clipper \ 237219820Sjeff | d10v | d30v | dlx | dsp16xx \ 238219820Sjeff | fr30 | frv \ 239219820Sjeff | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 240219820Sjeff | i370 | i860 | i960 | ia64 \ 241219820Sjeff | ip2k | iq2000 \ 242219820Sjeff | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ 243219820Sjeff | mips | mipsbe | mipseb | mipsel | mipsle \ 244219820Sjeff | mips16 \ 245219820Sjeff | mips64 | mips64el \ 246219820Sjeff | mips64vr | mips64vrel \ 247219820Sjeff | mips64orion | mips64orionel \ 248219820Sjeff | mips64vr4100 | mips64vr4100el \ 249219820Sjeff | mips64vr4300 | mips64vr4300el \ 250219820Sjeff | mips64vr5000 | mips64vr5000el \ 251219820Sjeff | mips64vr5900 | mips64vr5900el \ 252219820Sjeff | mipsisa32 | mipsisa32el \ 253219820Sjeff | mipsisa32r2 | mipsisa32r2el \ 254219820Sjeff | mipsisa64 | mipsisa64el \ 255219820Sjeff | mipsisa64r2 | mipsisa64r2el \ 256219820Sjeff | mipsisa64sb1 | mipsisa64sb1el \ 257219820Sjeff | mipsisa64sr71k | mipsisa64sr71kel \ 258219820Sjeff | mipstx39 | mipstx39el \ 259219820Sjeff | mn10200 | mn10300 \ 260219820Sjeff | ms1 \ 261219820Sjeff | msp430 \ 262219820Sjeff | ns16k | ns32k \ 263219820Sjeff | or32 \ 264219820Sjeff | pdp10 | pdp11 | pj | pjl \ 265219820Sjeff | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 266219820Sjeff | pyramid \ 267219820Sjeff | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ 268219820Sjeff | sh64 | sh64le \ 269219820Sjeff | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ 270219820Sjeff | sparcv8 | sparcv9 | sparcv9b \ 271219820Sjeff | strongarm \ 272219820Sjeff | tahoe | thumb | tic4x | tic80 | tron \ 273219820Sjeff | v850 | v850e \ 274219820Sjeff | we32k \ 275219820Sjeff | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ 276219820Sjeff | z8k) 277219820Sjeff basic_machine=$basic_machine-unknown 278219820Sjeff ;; 279219820Sjeff m32c) 280219820Sjeff basic_machine=$basic_machine-unknown 281219820Sjeff ;; 282219820Sjeff m6811 | m68hc11 | m6812 | m68hc12) 283219820Sjeff # Motorola 68HC11/12. 284219820Sjeff basic_machine=$basic_machine-unknown 285219820Sjeff os=-none 286219820Sjeff ;; 287219820Sjeff m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 288219820Sjeff ;; 289219820Sjeff 290219820Sjeff # We use `pc' rather than `unknown' 291219820Sjeff # because (1) that's what they normally are, and 292219820Sjeff # (2) the word "unknown" tends to confuse beginning users. 293219820Sjeff i*86 | x86_64) 294219820Sjeff basic_machine=$basic_machine-pc 295219820Sjeff ;; 296219820Sjeff # Object if more than one company name word. 297219820Sjeff *-*-*) 298219820Sjeff echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 299219820Sjeff exit 1 300219820Sjeff ;; 301219820Sjeff # Recognize the basic CPU types with company name. 302219820Sjeff 580-* \ 303219820Sjeff | a29k-* \ 304219820Sjeff | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 305219820Sjeff | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 306219820Sjeff | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 307219820Sjeff | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 308219820Sjeff | avr-* \ 309219820Sjeff | bfin-* | bs2000-* \ 310219820Sjeff | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 311219820Sjeff | clipper-* | craynv-* | cydra-* \ 312219820Sjeff | d10v-* | d30v-* | dlx-* \ 313219820Sjeff | elxsi-* \ 314219820Sjeff | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ 315219820Sjeff | h8300-* | h8500-* \ 316219820Sjeff | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 317219820Sjeff | i*86-* | i860-* | i960-* | ia64-* \ 318219820Sjeff | ip2k-* | iq2000-* \ 319219820Sjeff | m32r-* | m32rle-* \ 320219820Sjeff | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 321219820Sjeff | m88110-* | m88k-* | maxq-* | mcore-* \ 322219820Sjeff | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 323219820Sjeff | mips16-* \ 324219820Sjeff | mips64-* | mips64el-* \ 325219820Sjeff | mips64vr-* | mips64vrel-* \ 326219820Sjeff | mips64orion-* | mips64orionel-* \ 327219820Sjeff | mips64vr4100-* | mips64vr4100el-* \ 328219820Sjeff | mips64vr4300-* | mips64vr4300el-* \ 329219820Sjeff | mips64vr5000-* | mips64vr5000el-* \ 330219820Sjeff | mips64vr5900-* | mips64vr5900el-* \ 331219820Sjeff | mipsisa32-* | mipsisa32el-* \ 332219820Sjeff | mipsisa32r2-* | mipsisa32r2el-* \ 333219820Sjeff | mipsisa64-* | mipsisa64el-* \ 334219820Sjeff | mipsisa64r2-* | mipsisa64r2el-* \ 335219820Sjeff | mipsisa64sb1-* | mipsisa64sb1el-* \ 336219820Sjeff | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 337219820Sjeff | mipstx39-* | mipstx39el-* \ 338219820Sjeff | mmix-* \ 339219820Sjeff | ms1-* \ 340219820Sjeff | msp430-* \ 341219820Sjeff | none-* | np1-* | ns16k-* | ns32k-* \ 342219820Sjeff | orion-* \ 343219820Sjeff | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 344219820Sjeff | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 345219820Sjeff | pyramid-* \ 346219820Sjeff | romp-* | rs6000-* \ 347219820Sjeff | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ 348219820Sjeff | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 349219820Sjeff | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ 350219820Sjeff | sparclite-* \ 351219820Sjeff | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ 352219820Sjeff | tahoe-* | thumb-* \ 353219820Sjeff | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 354219820Sjeff | tron-* \ 355219820Sjeff | v850-* | v850e-* | vax-* \ 356219820Sjeff | we32k-* \ 357219820Sjeff | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ 358219820Sjeff | xstormy16-* | xtensa-* \ 359219820Sjeff | ymp-* \ 360219820Sjeff | z8k-*) 361219820Sjeff ;; 362219820Sjeff m32c-*) 363219820Sjeff ;; 364219820Sjeff # Recognize the various machine names and aliases which stand 365219820Sjeff # for a CPU type and a company and sometimes even an OS. 366219820Sjeff 386bsd) 367219820Sjeff basic_machine=i386-unknown 368219820Sjeff os=-bsd 369219820Sjeff ;; 370219820Sjeff 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 371219820Sjeff basic_machine=m68000-att 372219820Sjeff ;; 373219820Sjeff 3b*) 374219820Sjeff basic_machine=we32k-att 375219820Sjeff ;; 376219820Sjeff a29khif) 377219820Sjeff basic_machine=a29k-amd 378219820Sjeff os=-udi 379219820Sjeff ;; 380219820Sjeff abacus) 381219820Sjeff basic_machine=abacus-unknown 382219820Sjeff ;; 383219820Sjeff adobe68k) 384219820Sjeff basic_machine=m68010-adobe 385219820Sjeff os=-scout 386219820Sjeff ;; 387219820Sjeff alliant | fx80) 388219820Sjeff basic_machine=fx80-alliant 389219820Sjeff ;; 390219820Sjeff altos | altos3068) 391219820Sjeff basic_machine=m68k-altos 392219820Sjeff ;; 393219820Sjeff am29k) 394219820Sjeff basic_machine=a29k-none 395219820Sjeff os=-bsd 396219820Sjeff ;; 397219820Sjeff amd64) 398219820Sjeff basic_machine=x86_64-pc 399219820Sjeff ;; 400219820Sjeff amd64-*) 401219820Sjeff basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 402219820Sjeff ;; 403219820Sjeff amdahl) 404219820Sjeff basic_machine=580-amdahl 405219820Sjeff os=-sysv 406219820Sjeff ;; 407219820Sjeff amiga | amiga-*) 408219820Sjeff basic_machine=m68k-unknown 409219820Sjeff ;; 410219820Sjeff amigaos | amigados) 411219820Sjeff basic_machine=m68k-unknown 412219820Sjeff os=-amigaos 413219820Sjeff ;; 414219820Sjeff amigaunix | amix) 415219820Sjeff basic_machine=m68k-unknown 416219820Sjeff os=-sysv4 417219820Sjeff ;; 418219820Sjeff apollo68) 419219820Sjeff basic_machine=m68k-apollo 420219820Sjeff os=-sysv 421219820Sjeff ;; 422219820Sjeff apollo68bsd) 423219820Sjeff basic_machine=m68k-apollo 424219820Sjeff os=-bsd 425219820Sjeff ;; 426219820Sjeff aux) 427219820Sjeff basic_machine=m68k-apple 428219820Sjeff os=-aux 429219820Sjeff ;; 430219820Sjeff balance) 431219820Sjeff basic_machine=ns32k-sequent 432219820Sjeff os=-dynix 433219820Sjeff ;; 434219820Sjeff c90) 435219820Sjeff basic_machine=c90-cray 436219820Sjeff os=-unicos 437219820Sjeff ;; 438219820Sjeff convex-c1) 439219820Sjeff basic_machine=c1-convex 440219820Sjeff os=-bsd 441219820Sjeff ;; 442219820Sjeff convex-c2) 443219820Sjeff basic_machine=c2-convex 444219820Sjeff os=-bsd 445219820Sjeff ;; 446219820Sjeff convex-c32) 447219820Sjeff basic_machine=c32-convex 448219820Sjeff os=-bsd 449219820Sjeff ;; 450219820Sjeff convex-c34) 451219820Sjeff basic_machine=c34-convex 452219820Sjeff os=-bsd 453219820Sjeff ;; 454219820Sjeff convex-c38) 455219820Sjeff basic_machine=c38-convex 456219820Sjeff os=-bsd 457219820Sjeff ;; 458219820Sjeff cray | j90) 459219820Sjeff basic_machine=j90-cray 460219820Sjeff os=-unicos 461219820Sjeff ;; 462219820Sjeff craynv) 463219820Sjeff basic_machine=craynv-cray 464219820Sjeff os=-unicosmp 465219820Sjeff ;; 466219820Sjeff cr16c) 467219820Sjeff basic_machine=cr16c-unknown 468219820Sjeff os=-elf 469219820Sjeff ;; 470219820Sjeff crds | unos) 471219820Sjeff basic_machine=m68k-crds 472219820Sjeff ;; 473219820Sjeff crisv32 | crisv32-* | etraxfs*) 474219820Sjeff basic_machine=crisv32-axis 475219820Sjeff ;; 476219820Sjeff cris | cris-* | etrax*) 477219820Sjeff basic_machine=cris-axis 478219820Sjeff ;; 479219820Sjeff crx) 480219820Sjeff basic_machine=crx-unknown 481219820Sjeff os=-elf 482219820Sjeff ;; 483219820Sjeff da30 | da30-*) 484219820Sjeff basic_machine=m68k-da30 485219820Sjeff ;; 486219820Sjeff decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 487219820Sjeff basic_machine=mips-dec 488219820Sjeff ;; 489219820Sjeff decsystem10* | dec10*) 490219820Sjeff basic_machine=pdp10-dec 491219820Sjeff os=-tops10 492219820Sjeff ;; 493219820Sjeff decsystem20* | dec20*) 494219820Sjeff basic_machine=pdp10-dec 495219820Sjeff os=-tops20 496219820Sjeff ;; 497219820Sjeff delta | 3300 | motorola-3300 | motorola-delta \ 498219820Sjeff | 3300-motorola | delta-motorola) 499219820Sjeff basic_machine=m68k-motorola 500219820Sjeff ;; 501219820Sjeff delta88) 502219820Sjeff basic_machine=m88k-motorola 503219820Sjeff os=-sysv3 504219820Sjeff ;; 505219820Sjeff djgpp) 506219820Sjeff basic_machine=i586-pc 507219820Sjeff os=-msdosdjgpp 508219820Sjeff ;; 509219820Sjeff dpx20 | dpx20-*) 510219820Sjeff basic_machine=rs6000-bull 511219820Sjeff os=-bosx 512219820Sjeff ;; 513219820Sjeff dpx2* | dpx2*-bull) 514219820Sjeff basic_machine=m68k-bull 515219820Sjeff os=-sysv3 516219820Sjeff ;; 517219820Sjeff ebmon29k) 518219820Sjeff basic_machine=a29k-amd 519219820Sjeff os=-ebmon 520219820Sjeff ;; 521219820Sjeff elxsi) 522219820Sjeff basic_machine=elxsi-elxsi 523219820Sjeff os=-bsd 524219820Sjeff ;; 525219820Sjeff encore | umax | mmax) 526219820Sjeff basic_machine=ns32k-encore 527219820Sjeff ;; 528219820Sjeff es1800 | OSE68k | ose68k | ose | OSE) 529219820Sjeff basic_machine=m68k-ericsson 530219820Sjeff os=-ose 531219820Sjeff ;; 532219820Sjeff fx2800) 533219820Sjeff basic_machine=i860-alliant 534219820Sjeff ;; 535219820Sjeff genix) 536219820Sjeff basic_machine=ns32k-ns 537219820Sjeff ;; 538219820Sjeff gmicro) 539219820Sjeff basic_machine=tron-gmicro 540219820Sjeff os=-sysv 541219820Sjeff ;; 542219820Sjeff go32) 543219820Sjeff basic_machine=i386-pc 544219820Sjeff os=-go32 545219820Sjeff ;; 546219820Sjeff h3050r* | hiux*) 547219820Sjeff basic_machine=hppa1.1-hitachi 548219820Sjeff os=-hiuxwe2 549219820Sjeff ;; 550219820Sjeff h8300hms) 551219820Sjeff basic_machine=h8300-hitachi 552219820Sjeff os=-hms 553219820Sjeff ;; 554219820Sjeff h8300xray) 555219820Sjeff basic_machine=h8300-hitachi 556219820Sjeff os=-xray 557219820Sjeff ;; 558219820Sjeff h8500hms) 559219820Sjeff basic_machine=h8500-hitachi 560219820Sjeff os=-hms 561219820Sjeff ;; 562219820Sjeff harris) 563219820Sjeff basic_machine=m88k-harris 564219820Sjeff os=-sysv3 565219820Sjeff ;; 566219820Sjeff hp300-*) 567219820Sjeff basic_machine=m68k-hp 568219820Sjeff ;; 569219820Sjeff hp300bsd) 570219820Sjeff basic_machine=m68k-hp 571219820Sjeff os=-bsd 572219820Sjeff ;; 573219820Sjeff hp300hpux) 574219820Sjeff basic_machine=m68k-hp 575219820Sjeff os=-hpux 576219820Sjeff ;; 577219820Sjeff hp3k9[0-9][0-9] | hp9[0-9][0-9]) 578219820Sjeff basic_machine=hppa1.0-hp 579219820Sjeff ;; 580219820Sjeff hp9k2[0-9][0-9] | hp9k31[0-9]) 581219820Sjeff basic_machine=m68000-hp 582219820Sjeff ;; 583219820Sjeff hp9k3[2-9][0-9]) 584219820Sjeff basic_machine=m68k-hp 585219820Sjeff ;; 586219820Sjeff hp9k6[0-9][0-9] | hp6[0-9][0-9]) 587219820Sjeff basic_machine=hppa1.0-hp 588219820Sjeff ;; 589219820Sjeff hp9k7[0-79][0-9] | hp7[0-79][0-9]) 590219820Sjeff basic_machine=hppa1.1-hp 591219820Sjeff ;; 592219820Sjeff hp9k78[0-9] | hp78[0-9]) 593219820Sjeff # FIXME: really hppa2.0-hp 594219820Sjeff basic_machine=hppa1.1-hp 595219820Sjeff ;; 596219820Sjeff hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 597219820Sjeff # FIXME: really hppa2.0-hp 598219820Sjeff basic_machine=hppa1.1-hp 599219820Sjeff ;; 600219820Sjeff hp9k8[0-9][13679] | hp8[0-9][13679]) 601219820Sjeff basic_machine=hppa1.1-hp 602219820Sjeff ;; 603219820Sjeff hp9k8[0-9][0-9] | hp8[0-9][0-9]) 604219820Sjeff basic_machine=hppa1.0-hp 605219820Sjeff ;; 606219820Sjeff hppa-next) 607219820Sjeff os=-nextstep3 608219820Sjeff ;; 609219820Sjeff hppaosf) 610219820Sjeff basic_machine=hppa1.1-hp 611219820Sjeff os=-osf 612219820Sjeff ;; 613219820Sjeff hppro) 614219820Sjeff basic_machine=hppa1.1-hp 615219820Sjeff os=-proelf 616219820Sjeff ;; 617219820Sjeff i370-ibm* | ibm*) 618219820Sjeff basic_machine=i370-ibm 619219820Sjeff ;; 620219820Sjeff# I'm not sure what "Sysv32" means. Should this be sysv3.2? 621219820Sjeff i*86v32) 622219820Sjeff basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 623219820Sjeff os=-sysv32 624219820Sjeff ;; 625219820Sjeff i*86v4*) 626219820Sjeff basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 627219820Sjeff os=-sysv4 628219820Sjeff ;; 629219820Sjeff i*86v) 630219820Sjeff basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 631219820Sjeff os=-sysv 632219820Sjeff ;; 633219820Sjeff i*86sol2) 634219820Sjeff basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 635219820Sjeff os=-solaris2 636219820Sjeff ;; 637219820Sjeff i386mach) 638219820Sjeff basic_machine=i386-mach 639219820Sjeff os=-mach 640219820Sjeff ;; 641219820Sjeff i386-vsta | vsta) 642219820Sjeff basic_machine=i386-unknown 643219820Sjeff os=-vsta 644219820Sjeff ;; 645219820Sjeff iris | iris4d) 646219820Sjeff basic_machine=mips-sgi 647219820Sjeff case $os in 648219820Sjeff -irix*) 649219820Sjeff ;; 650219820Sjeff *) 651219820Sjeff os=-irix4 652219820Sjeff ;; 653219820Sjeff esac 654219820Sjeff ;; 655219820Sjeff isi68 | isi) 656219820Sjeff basic_machine=m68k-isi 657219820Sjeff os=-sysv 658219820Sjeff ;; 659219820Sjeff m88k-omron*) 660219820Sjeff basic_machine=m88k-omron 661219820Sjeff ;; 662219820Sjeff magnum | m3230) 663219820Sjeff basic_machine=mips-mips 664219820Sjeff os=-sysv 665219820Sjeff ;; 666219820Sjeff merlin) 667219820Sjeff basic_machine=ns32k-utek 668219820Sjeff os=-sysv 669219820Sjeff ;; 670219820Sjeff mingw32) 671219820Sjeff basic_machine=i386-pc 672219820Sjeff os=-mingw32 673219820Sjeff ;; 674219820Sjeff miniframe) 675219820Sjeff basic_machine=m68000-convergent 676219820Sjeff ;; 677219820Sjeff *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 678219820Sjeff basic_machine=m68k-atari 679219820Sjeff os=-mint 680219820Sjeff ;; 681219820Sjeff mips3*-*) 682219820Sjeff basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 683219820Sjeff ;; 684219820Sjeff mips3*) 685219820Sjeff basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 686219820Sjeff ;; 687219820Sjeff monitor) 688219820Sjeff basic_machine=m68k-rom68k 689219820Sjeff os=-coff 690219820Sjeff ;; 691219820Sjeff morphos) 692219820Sjeff basic_machine=powerpc-unknown 693219820Sjeff os=-morphos 694219820Sjeff ;; 695219820Sjeff msdos) 696219820Sjeff basic_machine=i386-pc 697219820Sjeff os=-msdos 698219820Sjeff ;; 699219820Sjeff mvs) 700219820Sjeff basic_machine=i370-ibm 701219820Sjeff os=-mvs 702219820Sjeff ;; 703219820Sjeff ncr3000) 704219820Sjeff basic_machine=i486-ncr 705219820Sjeff os=-sysv4 706219820Sjeff ;; 707219820Sjeff netbsd386) 708219820Sjeff basic_machine=i386-unknown 709219820Sjeff os=-netbsd 710219820Sjeff ;; 711219820Sjeff netwinder) 712219820Sjeff basic_machine=armv4l-rebel 713219820Sjeff os=-linux 714219820Sjeff ;; 715219820Sjeff news | news700 | news800 | news900) 716219820Sjeff basic_machine=m68k-sony 717219820Sjeff os=-newsos 718219820Sjeff ;; 719219820Sjeff news1000) 720219820Sjeff basic_machine=m68030-sony 721219820Sjeff os=-newsos 722219820Sjeff ;; 723219820Sjeff news-3600 | risc-news) 724219820Sjeff basic_machine=mips-sony 725219820Sjeff os=-newsos 726219820Sjeff ;; 727219820Sjeff necv70) 728219820Sjeff basic_machine=v70-nec 729219820Sjeff os=-sysv 730219820Sjeff ;; 731219820Sjeff next | m*-next ) 732219820Sjeff basic_machine=m68k-next 733219820Sjeff case $os in 734219820Sjeff -nextstep* ) 735219820Sjeff ;; 736219820Sjeff -ns2*) 737219820Sjeff os=-nextstep2 738219820Sjeff ;; 739219820Sjeff *) 740219820Sjeff os=-nextstep3 741219820Sjeff ;; 742219820Sjeff esac 743219820Sjeff ;; 744219820Sjeff nh3000) 745219820Sjeff basic_machine=m68k-harris 746219820Sjeff os=-cxux 747219820Sjeff ;; 748219820Sjeff nh[45]000) 749219820Sjeff basic_machine=m88k-harris 750219820Sjeff os=-cxux 751219820Sjeff ;; 752219820Sjeff nindy960) 753219820Sjeff basic_machine=i960-intel 754219820Sjeff os=-nindy 755219820Sjeff ;; 756219820Sjeff mon960) 757219820Sjeff basic_machine=i960-intel 758219820Sjeff os=-mon960 759219820Sjeff ;; 760219820Sjeff nonstopux) 761219820Sjeff basic_machine=mips-compaq 762219820Sjeff os=-nonstopux 763219820Sjeff ;; 764219820Sjeff np1) 765219820Sjeff basic_machine=np1-gould 766219820Sjeff ;; 767219820Sjeff nsr-tandem) 768219820Sjeff basic_machine=nsr-tandem 769219820Sjeff ;; 770219820Sjeff op50n-* | op60c-*) 771219820Sjeff basic_machine=hppa1.1-oki 772219820Sjeff os=-proelf 773219820Sjeff ;; 774219820Sjeff openrisc | openrisc-*) 775219820Sjeff basic_machine=or32-unknown 776219820Sjeff ;; 777219820Sjeff os400) 778219820Sjeff basic_machine=powerpc-ibm 779219820Sjeff os=-os400 780219820Sjeff ;; 781219820Sjeff OSE68000 | ose68000) 782219820Sjeff basic_machine=m68000-ericsson 783219820Sjeff os=-ose 784219820Sjeff ;; 785219820Sjeff os68k) 786219820Sjeff basic_machine=m68k-none 787219820Sjeff os=-os68k 788219820Sjeff ;; 789219820Sjeff pa-hitachi) 790219820Sjeff basic_machine=hppa1.1-hitachi 791219820Sjeff os=-hiuxwe2 792219820Sjeff ;; 793219820Sjeff paragon) 794219820Sjeff basic_machine=i860-intel 795219820Sjeff os=-osf 796219820Sjeff ;; 797219820Sjeff pbd) 798219820Sjeff basic_machine=sparc-tti 799219820Sjeff ;; 800219820Sjeff pbb) 801219820Sjeff basic_machine=m68k-tti 802219820Sjeff ;; 803219820Sjeff pc532 | pc532-*) 804219820Sjeff basic_machine=ns32k-pc532 805219820Sjeff ;; 806219820Sjeff pentium | p5 | k5 | k6 | nexgen | viac3) 807219820Sjeff basic_machine=i586-pc 808219820Sjeff ;; 809219820Sjeff pentiumpro | p6 | 6x86 | athlon | athlon_*) 810219820Sjeff basic_machine=i686-pc 811219820Sjeff ;; 812219820Sjeff pentiumii | pentium2 | pentiumiii | pentium3) 813219820Sjeff basic_machine=i686-pc 814219820Sjeff ;; 815219820Sjeff pentium4) 816219820Sjeff basic_machine=i786-pc 817219820Sjeff ;; 818219820Sjeff pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 819219820Sjeff basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 820219820Sjeff ;; 821219820Sjeff pentiumpro-* | p6-* | 6x86-* | athlon-*) 822219820Sjeff basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 823219820Sjeff ;; 824219820Sjeff pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 825219820Sjeff basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 826219820Sjeff ;; 827219820Sjeff pentium4-*) 828219820Sjeff basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 829219820Sjeff ;; 830219820Sjeff pn) 831219820Sjeff basic_machine=pn-gould 832219820Sjeff ;; 833219820Sjeff power) basic_machine=power-ibm 834219820Sjeff ;; 835219820Sjeff ppc) basic_machine=powerpc-unknown 836219820Sjeff ;; 837219820Sjeff ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 838219820Sjeff ;; 839219820Sjeff ppcle | powerpclittle | ppc-le | powerpc-little) 840219820Sjeff basic_machine=powerpcle-unknown 841219820Sjeff ;; 842219820Sjeff ppcle-* | powerpclittle-*) 843219820Sjeff basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 844219820Sjeff ;; 845219820Sjeff ppc64) basic_machine=powerpc64-unknown 846219820Sjeff ;; 847219820Sjeff ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 848219820Sjeff ;; 849219820Sjeff ppc64le | powerpc64little | ppc64-le | powerpc64-little) 850219820Sjeff basic_machine=powerpc64le-unknown 851219820Sjeff ;; 852219820Sjeff ppc64le-* | powerpc64little-*) 853219820Sjeff basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 854219820Sjeff ;; 855219820Sjeff ps2) 856219820Sjeff basic_machine=i386-ibm 857219820Sjeff ;; 858219820Sjeff pw32) 859219820Sjeff basic_machine=i586-unknown 860219820Sjeff os=-pw32 861219820Sjeff ;; 862219820Sjeff rom68k) 863219820Sjeff basic_machine=m68k-rom68k 864219820Sjeff os=-coff 865219820Sjeff ;; 866219820Sjeff rm[46]00) 867219820Sjeff basic_machine=mips-siemens 868219820Sjeff ;; 869219820Sjeff rtpc | rtpc-*) 870219820Sjeff basic_machine=romp-ibm 871219820Sjeff ;; 872219820Sjeff s390 | s390-*) 873219820Sjeff basic_machine=s390-ibm 874219820Sjeff ;; 875219820Sjeff s390x | s390x-*) 876219820Sjeff basic_machine=s390x-ibm 877219820Sjeff ;; 878219820Sjeff sa29200) 879219820Sjeff basic_machine=a29k-amd 880219820Sjeff os=-udi 881219820Sjeff ;; 882219820Sjeff sb1) 883219820Sjeff basic_machine=mipsisa64sb1-unknown 884219820Sjeff ;; 885219820Sjeff sb1el) 886219820Sjeff basic_machine=mipsisa64sb1el-unknown 887219820Sjeff ;; 888219820Sjeff sei) 889219820Sjeff basic_machine=mips-sei 890219820Sjeff os=-seiux 891219820Sjeff ;; 892219820Sjeff sequent) 893219820Sjeff basic_machine=i386-sequent 894219820Sjeff ;; 895219820Sjeff sh) 896219820Sjeff basic_machine=sh-hitachi 897219820Sjeff os=-hms 898219820Sjeff ;; 899219820Sjeff sh64) 900219820Sjeff basic_machine=sh64-unknown 901219820Sjeff ;; 902219820Sjeff sparclite-wrs | simso-wrs) 903219820Sjeff basic_machine=sparclite-wrs 904219820Sjeff os=-vxworks 905219820Sjeff ;; 906219820Sjeff sps7) 907219820Sjeff basic_machine=m68k-bull 908219820Sjeff os=-sysv2 909219820Sjeff ;; 910219820Sjeff spur) 911219820Sjeff basic_machine=spur-unknown 912219820Sjeff ;; 913219820Sjeff st2000) 914219820Sjeff basic_machine=m68k-tandem 915219820Sjeff ;; 916219820Sjeff stratus) 917219820Sjeff basic_machine=i860-stratus 918219820Sjeff os=-sysv4 919219820Sjeff ;; 920219820Sjeff sun2) 921219820Sjeff basic_machine=m68000-sun 922219820Sjeff ;; 923219820Sjeff sun2os3) 924219820Sjeff basic_machine=m68000-sun 925219820Sjeff os=-sunos3 926219820Sjeff ;; 927219820Sjeff sun2os4) 928219820Sjeff basic_machine=m68000-sun 929219820Sjeff os=-sunos4 930219820Sjeff ;; 931219820Sjeff sun3os3) 932219820Sjeff basic_machine=m68k-sun 933219820Sjeff os=-sunos3 934219820Sjeff ;; 935219820Sjeff sun3os4) 936219820Sjeff basic_machine=m68k-sun 937219820Sjeff os=-sunos4 938219820Sjeff ;; 939219820Sjeff sun4os3) 940219820Sjeff basic_machine=sparc-sun 941219820Sjeff os=-sunos3 942219820Sjeff ;; 943219820Sjeff sun4os4) 944219820Sjeff basic_machine=sparc-sun 945219820Sjeff os=-sunos4 946219820Sjeff ;; 947219820Sjeff sun4sol2) 948219820Sjeff basic_machine=sparc-sun 949219820Sjeff os=-solaris2 950219820Sjeff ;; 951219820Sjeff sun3 | sun3-*) 952219820Sjeff basic_machine=m68k-sun 953219820Sjeff ;; 954219820Sjeff sun4) 955219820Sjeff basic_machine=sparc-sun 956219820Sjeff ;; 957219820Sjeff sun386 | sun386i | roadrunner) 958219820Sjeff basic_machine=i386-sun 959219820Sjeff ;; 960219820Sjeff sv1) 961219820Sjeff basic_machine=sv1-cray 962219820Sjeff os=-unicos 963219820Sjeff ;; 964219820Sjeff symmetry) 965219820Sjeff basic_machine=i386-sequent 966219820Sjeff os=-dynix 967219820Sjeff ;; 968219820Sjeff t3e) 969219820Sjeff basic_machine=alphaev5-cray 970219820Sjeff os=-unicos 971219820Sjeff ;; 972219820Sjeff t90) 973219820Sjeff basic_machine=t90-cray 974219820Sjeff os=-unicos 975219820Sjeff ;; 976219820Sjeff tic54x | c54x*) 977219820Sjeff basic_machine=tic54x-unknown 978219820Sjeff os=-coff 979219820Sjeff ;; 980219820Sjeff tic55x | c55x*) 981219820Sjeff basic_machine=tic55x-unknown 982219820Sjeff os=-coff 983219820Sjeff ;; 984219820Sjeff tic6x | c6x*) 985219820Sjeff basic_machine=tic6x-unknown 986219820Sjeff os=-coff 987219820Sjeff ;; 988219820Sjeff tx39) 989219820Sjeff basic_machine=mipstx39-unknown 990219820Sjeff ;; 991219820Sjeff tx39el) 992219820Sjeff basic_machine=mipstx39el-unknown 993219820Sjeff ;; 994219820Sjeff toad1) 995219820Sjeff basic_machine=pdp10-xkl 996219820Sjeff os=-tops20 997219820Sjeff ;; 998219820Sjeff tower | tower-32) 999219820Sjeff basic_machine=m68k-ncr 1000219820Sjeff ;; 1001219820Sjeff tpf) 1002219820Sjeff basic_machine=s390x-ibm 1003219820Sjeff os=-tpf 1004219820Sjeff ;; 1005219820Sjeff udi29k) 1006219820Sjeff basic_machine=a29k-amd 1007219820Sjeff os=-udi 1008219820Sjeff ;; 1009219820Sjeff ultra3) 1010219820Sjeff basic_machine=a29k-nyu 1011219820Sjeff os=-sym1 1012219820Sjeff ;; 1013219820Sjeff v810 | necv810) 1014219820Sjeff basic_machine=v810-nec 1015219820Sjeff os=-none 1016219820Sjeff ;; 1017219820Sjeff vaxv) 1018219820Sjeff basic_machine=vax-dec 1019219820Sjeff os=-sysv 1020219820Sjeff ;; 1021219820Sjeff vms) 1022219820Sjeff basic_machine=vax-dec 1023219820Sjeff os=-vms 1024219820Sjeff ;; 1025219820Sjeff vpp*|vx|vx-*) 1026219820Sjeff basic_machine=f301-fujitsu 1027219820Sjeff ;; 1028219820Sjeff vxworks960) 1029219820Sjeff basic_machine=i960-wrs 1030219820Sjeff os=-vxworks 1031219820Sjeff ;; 1032219820Sjeff vxworks68) 1033219820Sjeff basic_machine=m68k-wrs 1034219820Sjeff os=-vxworks 1035219820Sjeff ;; 1036219820Sjeff vxworks29k) 1037219820Sjeff basic_machine=a29k-wrs 1038219820Sjeff os=-vxworks 1039219820Sjeff ;; 1040219820Sjeff w65*) 1041219820Sjeff basic_machine=w65-wdc 1042219820Sjeff os=-none 1043219820Sjeff ;; 1044219820Sjeff w89k-*) 1045219820Sjeff basic_machine=hppa1.1-winbond 1046219820Sjeff os=-proelf 1047219820Sjeff ;; 1048219820Sjeff xbox) 1049219820Sjeff basic_machine=i686-pc 1050219820Sjeff os=-mingw32 1051219820Sjeff ;; 1052219820Sjeff xps | xps100) 1053219820Sjeff basic_machine=xps100-honeywell 1054219820Sjeff ;; 1055219820Sjeff ymp) 1056219820Sjeff basic_machine=ymp-cray 1057219820Sjeff os=-unicos 1058219820Sjeff ;; 1059219820Sjeff z8k-*-coff) 1060219820Sjeff basic_machine=z8k-unknown 1061219820Sjeff os=-sim 1062219820Sjeff ;; 1063219820Sjeff none) 1064219820Sjeff basic_machine=none-none 1065219820Sjeff os=-none 1066219820Sjeff ;; 1067219820Sjeff 1068219820Sjeff# Here we handle the default manufacturer of certain CPU types. It is in 1069219820Sjeff# some cases the only manufacturer, in others, it is the most popular. 1070219820Sjeff w89k) 1071219820Sjeff basic_machine=hppa1.1-winbond 1072219820Sjeff ;; 1073219820Sjeff op50n) 1074219820Sjeff basic_machine=hppa1.1-oki 1075219820Sjeff ;; 1076219820Sjeff op60c) 1077219820Sjeff basic_machine=hppa1.1-oki 1078219820Sjeff ;; 1079219820Sjeff romp) 1080219820Sjeff basic_machine=romp-ibm 1081219820Sjeff ;; 1082219820Sjeff mmix) 1083219820Sjeff basic_machine=mmix-knuth 1084219820Sjeff ;; 1085219820Sjeff rs6000) 1086219820Sjeff basic_machine=rs6000-ibm 1087219820Sjeff ;; 1088219820Sjeff vax) 1089219820Sjeff basic_machine=vax-dec 1090219820Sjeff ;; 1091219820Sjeff pdp10) 1092219820Sjeff # there are many clones, so DEC is not a safe bet 1093219820Sjeff basic_machine=pdp10-unknown 1094219820Sjeff ;; 1095219820Sjeff pdp11) 1096219820Sjeff basic_machine=pdp11-dec 1097219820Sjeff ;; 1098219820Sjeff we32k) 1099219820Sjeff basic_machine=we32k-att 1100219820Sjeff ;; 1101219820Sjeff sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) 1102219820Sjeff basic_machine=sh-unknown 1103219820Sjeff ;; 1104219820Sjeff sparc | sparcv8 | sparcv9 | sparcv9b) 1105219820Sjeff basic_machine=sparc-sun 1106219820Sjeff ;; 1107219820Sjeff cydra) 1108219820Sjeff basic_machine=cydra-cydrome 1109219820Sjeff ;; 1110219820Sjeff orion) 1111219820Sjeff basic_machine=orion-highlevel 1112219820Sjeff ;; 1113219820Sjeff orion105) 1114219820Sjeff basic_machine=clipper-highlevel 1115219820Sjeff ;; 1116219820Sjeff mac | mpw | mac-mpw) 1117219820Sjeff basic_machine=m68k-apple 1118219820Sjeff ;; 1119219820Sjeff pmac | pmac-mpw) 1120219820Sjeff basic_machine=powerpc-apple 1121219820Sjeff ;; 1122219820Sjeff *-unknown) 1123219820Sjeff # Make sure to match an already-canonicalized machine name. 1124219820Sjeff ;; 1125219820Sjeff *) 1126219820Sjeff echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 1127219820Sjeff exit 1 1128219820Sjeff ;; 1129219820Sjeffesac 1130219820Sjeff 1131219820Sjeff# Here we canonicalize certain aliases for manufacturers. 1132219820Sjeffcase $basic_machine in 1133219820Sjeff *-digital*) 1134219820Sjeff basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 1135219820Sjeff ;; 1136219820Sjeff *-commodore*) 1137219820Sjeff basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 1138219820Sjeff ;; 1139219820Sjeff *) 1140219820Sjeff ;; 1141219820Sjeffesac 1142219820Sjeff 1143219820Sjeff# Decode manufacturer-specific aliases for certain operating systems. 1144219820Sjeff 1145219820Sjeffif [ x"$os" != x"" ] 1146219820Sjeffthen 1147219820Sjeffcase $os in 1148219820Sjeff # First match some system type aliases 1149219820Sjeff # that might get confused with valid system types. 1150219820Sjeff # -solaris* is a basic system type, with this one exception. 1151219820Sjeff -solaris1 | -solaris1.*) 1152219820Sjeff os=`echo $os | sed -e 's|solaris1|sunos4|'` 1153219820Sjeff ;; 1154219820Sjeff -solaris) 1155219820Sjeff os=-solaris2 1156219820Sjeff ;; 1157219820Sjeff -svr4*) 1158219820Sjeff os=-sysv4 1159219820Sjeff ;; 1160219820Sjeff -unixware*) 1161219820Sjeff os=-sysv4.2uw 1162219820Sjeff ;; 1163219820Sjeff -gnu/linux*) 1164219820Sjeff os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 1165219820Sjeff ;; 1166219820Sjeff # First accept the basic system types. 1167219820Sjeff # The portable systems comes first. 1168219820Sjeff # Each alternative MUST END IN A *, to match a version number. 1169219820Sjeff # -sysv* is not here because it comes later, after sysvr4. 1170219820Sjeff -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 1171219820Sjeff | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ 1172219820Sjeff | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ 1173219820Sjeff | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 1174219820Sjeff | -aos* \ 1175219820Sjeff | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1176219820Sjeff | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1177219820Sjeff | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ 1178219820Sjeff | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 1179219820Sjeff | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 1180219820Sjeff | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1181219820Sjeff | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1182219820Sjeff | -chorusos* | -chorusrdb* \ 1183219820Sjeff | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1184219820Sjeff | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ 1185219820Sjeff | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1186219820Sjeff | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1187219820Sjeff | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1188219820Sjeff | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1189219820Sjeff | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1190219820Sjeff | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 1191219820Sjeff | -skyos* | -haiku*) 1192219820Sjeff # Remember, each alternative MUST END IN *, to match a version number. 1193219820Sjeff ;; 1194219820Sjeff -qnx*) 1195219820Sjeff case $basic_machine in 1196219820Sjeff x86-* | i*86-*) 1197219820Sjeff ;; 1198219820Sjeff *) 1199219820Sjeff os=-nto$os 1200219820Sjeff ;; 1201219820Sjeff esac 1202219820Sjeff ;; 1203219820Sjeff -nto-qnx*) 1204219820Sjeff ;; 1205219820Sjeff -nto*) 1206219820Sjeff os=`echo $os | sed -e 's|nto|nto-qnx|'` 1207219820Sjeff ;; 1208219820Sjeff -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 1209219820Sjeff | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 1210219820Sjeff | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 1211219820Sjeff ;; 1212219820Sjeff -mac*) 1213219820Sjeff os=`echo $os | sed -e 's|mac|macos|'` 1214219820Sjeff ;; 1215219820Sjeff -linux-dietlibc) 1216219820Sjeff os=-linux-dietlibc 1217219820Sjeff ;; 1218219820Sjeff -linux*) 1219219820Sjeff os=`echo $os | sed -e 's|linux|linux-gnu|'` 1220219820Sjeff ;; 1221219820Sjeff -sunos5*) 1222219820Sjeff os=`echo $os | sed -e 's|sunos5|solaris2|'` 1223219820Sjeff ;; 1224219820Sjeff -sunos6*) 1225219820Sjeff os=`echo $os | sed -e 's|sunos6|solaris3|'` 1226219820Sjeff ;; 1227219820Sjeff -opened*) 1228219820Sjeff os=-openedition 1229219820Sjeff ;; 1230219820Sjeff -os400*) 1231219820Sjeff os=-os400 1232219820Sjeff ;; 1233219820Sjeff -wince*) 1234219820Sjeff os=-wince 1235219820Sjeff ;; 1236219820Sjeff -osfrose*) 1237219820Sjeff os=-osfrose 1238219820Sjeff ;; 1239219820Sjeff -osf*) 1240219820Sjeff os=-osf 1241219820Sjeff ;; 1242219820Sjeff -utek*) 1243219820Sjeff os=-bsd 1244219820Sjeff ;; 1245219820Sjeff -dynix*) 1246219820Sjeff os=-bsd 1247219820Sjeff ;; 1248219820Sjeff -acis*) 1249219820Sjeff os=-aos 1250219820Sjeff ;; 1251219820Sjeff -atheos*) 1252219820Sjeff os=-atheos 1253219820Sjeff ;; 1254219820Sjeff -syllable*) 1255219820Sjeff os=-syllable 1256219820Sjeff ;; 1257219820Sjeff -386bsd) 1258219820Sjeff os=-bsd 1259219820Sjeff ;; 1260219820Sjeff -ctix* | -uts*) 1261219820Sjeff os=-sysv 1262219820Sjeff ;; 1263219820Sjeff -nova*) 1264219820Sjeff os=-rtmk-nova 1265219820Sjeff ;; 1266219820Sjeff -ns2 ) 1267219820Sjeff os=-nextstep2 1268219820Sjeff ;; 1269219820Sjeff -nsk*) 1270219820Sjeff os=-nsk 1271219820Sjeff ;; 1272219820Sjeff # Preserve the version number of sinix5. 1273219820Sjeff -sinix5.*) 1274219820Sjeff os=`echo $os | sed -e 's|sinix|sysv|'` 1275219820Sjeff ;; 1276219820Sjeff -sinix*) 1277219820Sjeff os=-sysv4 1278219820Sjeff ;; 1279219820Sjeff -tpf*) 1280219820Sjeff os=-tpf 1281219820Sjeff ;; 1282219820Sjeff -triton*) 1283219820Sjeff os=-sysv3 1284219820Sjeff ;; 1285219820Sjeff -oss*) 1286219820Sjeff os=-sysv3 1287219820Sjeff ;; 1288219820Sjeff -svr4) 1289219820Sjeff os=-sysv4 1290219820Sjeff ;; 1291219820Sjeff -svr3) 1292219820Sjeff os=-sysv3 1293219820Sjeff ;; 1294219820Sjeff -sysvr4) 1295219820Sjeff os=-sysv4 1296219820Sjeff ;; 1297219820Sjeff # This must come after -sysvr4. 1298219820Sjeff -sysv*) 1299219820Sjeff ;; 1300219820Sjeff -ose*) 1301219820Sjeff os=-ose 1302219820Sjeff ;; 1303219820Sjeff -es1800*) 1304219820Sjeff os=-ose 1305219820Sjeff ;; 1306219820Sjeff -xenix) 1307219820Sjeff os=-xenix 1308219820Sjeff ;; 1309219820Sjeff -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1310219820Sjeff os=-mint 1311219820Sjeff ;; 1312219820Sjeff -aros*) 1313219820Sjeff os=-aros 1314219820Sjeff ;; 1315219820Sjeff -kaos*) 1316219820Sjeff os=-kaos 1317219820Sjeff ;; 1318219820Sjeff -zvmoe) 1319219820Sjeff os=-zvmoe 1320219820Sjeff ;; 1321219820Sjeff -none) 1322219820Sjeff ;; 1323219820Sjeff *) 1324219820Sjeff # Get rid of the `-' at the beginning of $os. 1325219820Sjeff os=`echo $os | sed 's/[^-]*-//'` 1326219820Sjeff echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 1327219820Sjeff exit 1 1328219820Sjeff ;; 1329219820Sjeffesac 1330219820Sjeffelse 1331219820Sjeff 1332219820Sjeff# Here we handle the default operating systems that come with various machines. 1333219820Sjeff# The value should be what the vendor currently ships out the door with their 1334219820Sjeff# machine or put another way, the most popular os provided with the machine. 1335219820Sjeff 1336219820Sjeff# Note that if you're going to try to match "-MANUFACTURER" here (say, 1337219820Sjeff# "-sun"), then you have to tell the case statement up towards the top 1338219820Sjeff# that MANUFACTURER isn't an operating system. Otherwise, code above 1339219820Sjeff# will signal an error saying that MANUFACTURER isn't an operating 1340219820Sjeff# system, and we'll never get to this point. 1341219820Sjeff 1342219820Sjeffcase $basic_machine in 1343219820Sjeff *-acorn) 1344219820Sjeff os=-riscix1.2 1345219820Sjeff ;; 1346219820Sjeff arm*-rebel) 1347219820Sjeff os=-linux 1348219820Sjeff ;; 1349219820Sjeff arm*-semi) 1350219820Sjeff os=-aout 1351219820Sjeff ;; 1352219820Sjeff c4x-* | tic4x-*) 1353219820Sjeff os=-coff 1354219820Sjeff ;; 1355219820Sjeff # This must come before the *-dec entry. 1356219820Sjeff pdp10-*) 1357219820Sjeff os=-tops20 1358219820Sjeff ;; 1359219820Sjeff pdp11-*) 1360219820Sjeff os=-none 1361219820Sjeff ;; 1362219820Sjeff *-dec | vax-*) 1363219820Sjeff os=-ultrix4.2 1364219820Sjeff ;; 1365219820Sjeff m68*-apollo) 1366219820Sjeff os=-domain 1367219820Sjeff ;; 1368219820Sjeff i386-sun) 1369219820Sjeff os=-sunos4.0.2 1370219820Sjeff ;; 1371219820Sjeff m68000-sun) 1372219820Sjeff os=-sunos3 1373219820Sjeff # This also exists in the configure program, but was not the 1374219820Sjeff # default. 1375219820Sjeff # os=-sunos4 1376219820Sjeff ;; 1377219820Sjeff m68*-cisco) 1378219820Sjeff os=-aout 1379219820Sjeff ;; 1380219820Sjeff mips*-cisco) 1381219820Sjeff os=-elf 1382219820Sjeff ;; 1383219820Sjeff mips*-*) 1384219820Sjeff os=-elf 1385219820Sjeff ;; 1386219820Sjeff or32-*) 1387219820Sjeff os=-coff 1388219820Sjeff ;; 1389219820Sjeff *-tti) # must be before sparc entry or we get the wrong os. 1390219820Sjeff os=-sysv3 1391219820Sjeff ;; 1392219820Sjeff sparc-* | *-sun) 1393219820Sjeff os=-sunos4.1.1 1394219820Sjeff ;; 1395219820Sjeff *-be) 1396219820Sjeff os=-beos 1397219820Sjeff ;; 1398219820Sjeff *-haiku) 1399219820Sjeff os=-haiku 1400219820Sjeff ;; 1401219820Sjeff *-ibm) 1402219820Sjeff os=-aix 1403219820Sjeff ;; 1404219820Sjeff *-knuth) 1405219820Sjeff os=-mmixware 1406219820Sjeff ;; 1407219820Sjeff *-wec) 1408219820Sjeff os=-proelf 1409219820Sjeff ;; 1410219820Sjeff *-winbond) 1411219820Sjeff os=-proelf 1412219820Sjeff ;; 1413219820Sjeff *-oki) 1414219820Sjeff os=-proelf 1415219820Sjeff ;; 1416219820Sjeff *-hp) 1417219820Sjeff os=-hpux 1418219820Sjeff ;; 1419219820Sjeff *-hitachi) 1420219820Sjeff os=-hiux 1421219820Sjeff ;; 1422219820Sjeff i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 1423219820Sjeff os=-sysv 1424219820Sjeff ;; 1425219820Sjeff *-cbm) 1426219820Sjeff os=-amigaos 1427219820Sjeff ;; 1428219820Sjeff *-dg) 1429219820Sjeff os=-dgux 1430219820Sjeff ;; 1431219820Sjeff *-dolphin) 1432219820Sjeff os=-sysv3 1433219820Sjeff ;; 1434219820Sjeff m68k-ccur) 1435219820Sjeff os=-rtu 1436219820Sjeff ;; 1437219820Sjeff m88k-omron*) 1438219820Sjeff os=-luna 1439219820Sjeff ;; 1440219820Sjeff *-next ) 1441219820Sjeff os=-nextstep 1442219820Sjeff ;; 1443219820Sjeff *-sequent) 1444219820Sjeff os=-ptx 1445219820Sjeff ;; 1446219820Sjeff *-crds) 1447219820Sjeff os=-unos 1448219820Sjeff ;; 1449219820Sjeff *-ns) 1450219820Sjeff os=-genix 1451219820Sjeff ;; 1452219820Sjeff i370-*) 1453219820Sjeff os=-mvs 1454219820Sjeff ;; 1455219820Sjeff *-next) 1456219820Sjeff os=-nextstep3 1457219820Sjeff ;; 1458219820Sjeff *-gould) 1459219820Sjeff os=-sysv 1460219820Sjeff ;; 1461219820Sjeff *-highlevel) 1462219820Sjeff os=-bsd 1463219820Sjeff ;; 1464219820Sjeff *-encore) 1465219820Sjeff os=-bsd 1466219820Sjeff ;; 1467219820Sjeff *-sgi) 1468219820Sjeff os=-irix 1469219820Sjeff ;; 1470219820Sjeff *-siemens) 1471219820Sjeff os=-sysv4 1472219820Sjeff ;; 1473219820Sjeff *-masscomp) 1474219820Sjeff os=-rtu 1475219820Sjeff ;; 1476219820Sjeff f30[01]-fujitsu | f700-fujitsu) 1477219820Sjeff os=-uxpv 1478219820Sjeff ;; 1479219820Sjeff *-rom68k) 1480219820Sjeff os=-coff 1481219820Sjeff ;; 1482219820Sjeff *-*bug) 1483219820Sjeff os=-coff 1484219820Sjeff ;; 1485219820Sjeff *-apple) 1486219820Sjeff os=-macos 1487219820Sjeff ;; 1488219820Sjeff *-atari*) 1489219820Sjeff os=-mint 1490219820Sjeff ;; 1491219820Sjeff *) 1492219820Sjeff os=-none 1493219820Sjeff ;; 1494219820Sjeffesac 1495219820Sjefffi 1496219820Sjeff 1497219820Sjeff# Here we handle the case where we know the os, and the CPU type, but not the 1498219820Sjeff# manufacturer. We pick the logical manufacturer. 1499219820Sjeffvendor=unknown 1500219820Sjeffcase $basic_machine in 1501219820Sjeff *-unknown) 1502219820Sjeff case $os in 1503219820Sjeff -riscix*) 1504219820Sjeff vendor=acorn 1505219820Sjeff ;; 1506219820Sjeff -sunos*) 1507219820Sjeff vendor=sun 1508219820Sjeff ;; 1509219820Sjeff -aix*) 1510219820Sjeff vendor=ibm 1511219820Sjeff ;; 1512219820Sjeff -beos*) 1513219820Sjeff vendor=be 1514219820Sjeff ;; 1515219820Sjeff -hpux*) 1516219820Sjeff vendor=hp 1517219820Sjeff ;; 1518219820Sjeff -mpeix*) 1519219820Sjeff vendor=hp 1520219820Sjeff ;; 1521219820Sjeff -hiux*) 1522219820Sjeff vendor=hitachi 1523219820Sjeff ;; 1524219820Sjeff -unos*) 1525219820Sjeff vendor=crds 1526219820Sjeff ;; 1527219820Sjeff -dgux*) 1528219820Sjeff vendor=dg 1529219820Sjeff ;; 1530219820Sjeff -luna*) 1531219820Sjeff vendor=omron 1532219820Sjeff ;; 1533219820Sjeff -genix*) 1534219820Sjeff vendor=ns 1535219820Sjeff ;; 1536219820Sjeff -mvs* | -opened*) 1537219820Sjeff vendor=ibm 1538219820Sjeff ;; 1539219820Sjeff -os400*) 1540219820Sjeff vendor=ibm 1541219820Sjeff ;; 1542219820Sjeff -ptx*) 1543219820Sjeff vendor=sequent 1544219820Sjeff ;; 1545219820Sjeff -tpf*) 1546219820Sjeff vendor=ibm 1547219820Sjeff ;; 1548219820Sjeff -vxsim* | -vxworks* | -windiss*) 1549219820Sjeff vendor=wrs 1550219820Sjeff ;; 1551219820Sjeff -aux*) 1552219820Sjeff vendor=apple 1553219820Sjeff ;; 1554219820Sjeff -hms*) 1555219820Sjeff vendor=hitachi 1556219820Sjeff ;; 1557219820Sjeff -mpw* | -macos*) 1558219820Sjeff vendor=apple 1559219820Sjeff ;; 1560219820Sjeff -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1561219820Sjeff vendor=atari 1562219820Sjeff ;; 1563219820Sjeff -vos*) 1564219820Sjeff vendor=stratus 1565219820Sjeff ;; 1566219820Sjeff esac 1567219820Sjeff basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 1568219820Sjeff ;; 1569219820Sjeffesac 1570219820Sjeff 1571219820Sjeffecho $basic_machine$os 1572219820Sjeffexit 1573219820Sjeff 1574219820Sjeff# Local variables: 1575219820Sjeff# eval: (add-hook 'write-file-hooks 'time-stamp) 1576219820Sjeff# time-stamp-start: "timestamp='" 1577219820Sjeff# time-stamp-format: "%:y-%02m-%02d" 1578219820Sjeff# time-stamp-end: "'" 1579219820Sjeff# End: 1580