config.sub revision 1a30de1f
11a30de1fSmrg#! /bin/sh 21a30de1fSmrg# Configuration validation subroutine script. 31a30de1fSmrg# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 41a30de1fSmrg# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, 51a30de1fSmrg# Inc. 61a30de1fSmrg 71a30de1fSmrgtimestamp='2006-09-20' 81a30de1fSmrg 91a30de1fSmrg# This file is (in principle) common to ALL GNU software. 101a30de1fSmrg# The presence of a machine in this file suggests that SOME GNU software 111a30de1fSmrg# can handle that machine. It does not imply ALL GNU software can. 121a30de1fSmrg# 131a30de1fSmrg# This file is free software; you can redistribute it and/or modify 141a30de1fSmrg# it under the terms of the GNU General Public License as published by 151a30de1fSmrg# the Free Software Foundation; either version 2 of the License, or 161a30de1fSmrg# (at your option) any later version. 171a30de1fSmrg# 181a30de1fSmrg# This program is distributed in the hope that it will be useful, 191a30de1fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 201a30de1fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 211a30de1fSmrg# GNU General Public License for more details. 221a30de1fSmrg# 231a30de1fSmrg# You should have received a copy of the GNU General Public License 241a30de1fSmrg# along with this program; if not, write to the Free Software 251a30de1fSmrg# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 261a30de1fSmrg# 02110-1301, USA. 271a30de1fSmrg# 281a30de1fSmrg# As a special exception to the GNU General Public License, if you 291a30de1fSmrg# distribute this file as part of a program that contains a 301a30de1fSmrg# configuration script generated by Autoconf, you may include it under 311a30de1fSmrg# the same distribution terms that you use for the rest of that program. 321a30de1fSmrg 331a30de1fSmrg 341a30de1fSmrg# Please send patches to <config-patches@gnu.org>. Submit a context 351a30de1fSmrg# diff and a properly formatted ChangeLog entry. 361a30de1fSmrg# 371a30de1fSmrg# Configuration subroutine to validate and canonicalize a configuration type. 381a30de1fSmrg# Supply the specified configuration type as an argument. 391a30de1fSmrg# If it is invalid, we print an error message on stderr and exit with code 1. 401a30de1fSmrg# Otherwise, we print the canonical config type on stdout and succeed. 411a30de1fSmrg 421a30de1fSmrg# This file is supposed to be the same for all GNU packages 431a30de1fSmrg# and recognize all the CPU types, system types and aliases 441a30de1fSmrg# that are meaningful with *any* GNU software. 451a30de1fSmrg# Each package is responsible for reporting which valid configurations 461a30de1fSmrg# it does not support. The user should be able to distinguish 471a30de1fSmrg# a failure to support a valid configuration from a meaningless 481a30de1fSmrg# configuration. 491a30de1fSmrg 501a30de1fSmrg# The goal of this file is to map all the various variations of a given 511a30de1fSmrg# machine specification into a single specification in the form: 521a30de1fSmrg# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 531a30de1fSmrg# or in some cases, the newer four-part form: 541a30de1fSmrg# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 551a30de1fSmrg# It is wrong to echo any other type of specification. 561a30de1fSmrg 571a30de1fSmrgme=`echo "$0" | sed -e 's,.*/,,'` 581a30de1fSmrg 591a30de1fSmrgusage="\ 601a30de1fSmrgUsage: $0 [OPTION] CPU-MFR-OPSYS 611a30de1fSmrg $0 [OPTION] ALIAS 621a30de1fSmrg 631a30de1fSmrgCanonicalize a configuration name. 641a30de1fSmrg 651a30de1fSmrgOperation modes: 661a30de1fSmrg -h, --help print this help, then exit 671a30de1fSmrg -t, --time-stamp print date of last modification, then exit 681a30de1fSmrg -v, --version print version number, then exit 691a30de1fSmrg 701a30de1fSmrgReport bugs and patches to <config-patches@gnu.org>." 711a30de1fSmrg 721a30de1fSmrgversion="\ 731a30de1fSmrgGNU config.sub ($timestamp) 741a30de1fSmrg 751a30de1fSmrgCopyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 761a30de1fSmrgFree Software Foundation, Inc. 771a30de1fSmrg 781a30de1fSmrgThis is free software; see the source for copying conditions. There is NO 791a30de1fSmrgwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 801a30de1fSmrg 811a30de1fSmrghelp=" 821a30de1fSmrgTry \`$me --help' for more information." 831a30de1fSmrg 841a30de1fSmrg# Parse command line 851a30de1fSmrgwhile test $# -gt 0 ; do 861a30de1fSmrg case $1 in 871a30de1fSmrg --time-stamp | --time* | -t ) 881a30de1fSmrg echo "$timestamp" ; exit ;; 891a30de1fSmrg --version | -v ) 901a30de1fSmrg echo "$version" ; exit ;; 911a30de1fSmrg --help | --h* | -h ) 921a30de1fSmrg echo "$usage"; exit ;; 931a30de1fSmrg -- ) # Stop option processing 941a30de1fSmrg shift; break ;; 951a30de1fSmrg - ) # Use stdin as input. 961a30de1fSmrg break ;; 971a30de1fSmrg -* ) 981a30de1fSmrg echo "$me: invalid option $1$help" 991a30de1fSmrg exit 1 ;; 1001a30de1fSmrg 1011a30de1fSmrg *local*) 1021a30de1fSmrg # First pass through any local machine types. 1031a30de1fSmrg echo $1 1041a30de1fSmrg exit ;; 1051a30de1fSmrg 1061a30de1fSmrg * ) 1071a30de1fSmrg break ;; 1081a30de1fSmrg esac 1091a30de1fSmrgdone 1101a30de1fSmrg 1111a30de1fSmrgcase $# in 1121a30de1fSmrg 0) echo "$me: missing argument$help" >&2 1131a30de1fSmrg exit 1;; 1141a30de1fSmrg 1) ;; 1151a30de1fSmrg *) echo "$me: too many arguments$help" >&2 1161a30de1fSmrg exit 1;; 1171a30de1fSmrgesac 1181a30de1fSmrg 1191a30de1fSmrg# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). 1201a30de1fSmrg# Here we must recognize all the valid KERNEL-OS combinations. 1211a30de1fSmrgmaybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 1221a30de1fSmrgcase $maybe_os in 1231a30de1fSmrg nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ 1241a30de1fSmrg uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ 1251a30de1fSmrg storm-chaos* | os2-emx* | rtmk-nova*) 1261a30de1fSmrg os=-$maybe_os 1271a30de1fSmrg basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 1281a30de1fSmrg ;; 1291a30de1fSmrg *) 1301a30de1fSmrg basic_machine=`echo $1 | sed 's/-[^-]*$//'` 1311a30de1fSmrg if [ $basic_machine != $1 ] 1321a30de1fSmrg then os=`echo $1 | sed 's/.*-/-/'` 1331a30de1fSmrg else os=; fi 1341a30de1fSmrg ;; 1351a30de1fSmrgesac 1361a30de1fSmrg 1371a30de1fSmrg### Let's recognize common machines as not being operating systems so 1381a30de1fSmrg### that things like config.sub decstation-3100 work. We also 1391a30de1fSmrg### recognize some manufacturers as not being operating systems, so we 1401a30de1fSmrg### can provide default operating systems below. 1411a30de1fSmrgcase $os in 1421a30de1fSmrg -sun*os*) 1431a30de1fSmrg # Prevent following clause from handling this invalid input. 1441a30de1fSmrg ;; 1451a30de1fSmrg -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ 1461a30de1fSmrg -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ 1471a30de1fSmrg -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ 1481a30de1fSmrg -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ 1491a30de1fSmrg -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 1501a30de1fSmrg -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 1511a30de1fSmrg -apple | -axis | -knuth | -cray) 1521a30de1fSmrg os= 1531a30de1fSmrg basic_machine=$1 1541a30de1fSmrg ;; 1551a30de1fSmrg -sim | -cisco | -oki | -wec | -winbond) 1561a30de1fSmrg os= 1571a30de1fSmrg basic_machine=$1 1581a30de1fSmrg ;; 1591a30de1fSmrg -scout) 1601a30de1fSmrg ;; 1611a30de1fSmrg -wrs) 1621a30de1fSmrg os=-vxworks 1631a30de1fSmrg basic_machine=$1 1641a30de1fSmrg ;; 1651a30de1fSmrg -chorusos*) 1661a30de1fSmrg os=-chorusos 1671a30de1fSmrg basic_machine=$1 1681a30de1fSmrg ;; 1691a30de1fSmrg -chorusrdb) 1701a30de1fSmrg os=-chorusrdb 1711a30de1fSmrg basic_machine=$1 1721a30de1fSmrg ;; 1731a30de1fSmrg -hiux*) 1741a30de1fSmrg os=-hiuxwe2 1751a30de1fSmrg ;; 1761a30de1fSmrg -sco6) 1771a30de1fSmrg os=-sco5v6 1781a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 1791a30de1fSmrg ;; 1801a30de1fSmrg -sco5) 1811a30de1fSmrg os=-sco3.2v5 1821a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 1831a30de1fSmrg ;; 1841a30de1fSmrg -sco4) 1851a30de1fSmrg os=-sco3.2v4 1861a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 1871a30de1fSmrg ;; 1881a30de1fSmrg -sco3.2.[4-9]*) 1891a30de1fSmrg os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` 1901a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 1911a30de1fSmrg ;; 1921a30de1fSmrg -sco3.2v[4-9]*) 1931a30de1fSmrg # Don't forget version if it is 3.2v4 or newer. 1941a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 1951a30de1fSmrg ;; 1961a30de1fSmrg -sco5v6*) 1971a30de1fSmrg # Don't forget version if it is 3.2v4 or newer. 1981a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 1991a30de1fSmrg ;; 2001a30de1fSmrg -sco*) 2011a30de1fSmrg os=-sco3.2v2 2021a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 2031a30de1fSmrg ;; 2041a30de1fSmrg -udk*) 2051a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 2061a30de1fSmrg ;; 2071a30de1fSmrg -isc) 2081a30de1fSmrg os=-isc2.2 2091a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 2101a30de1fSmrg ;; 2111a30de1fSmrg -clix*) 2121a30de1fSmrg basic_machine=clipper-intergraph 2131a30de1fSmrg ;; 2141a30de1fSmrg -isc*) 2151a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 2161a30de1fSmrg ;; 2171a30de1fSmrg -lynx*) 2181a30de1fSmrg os=-lynxos 2191a30de1fSmrg ;; 2201a30de1fSmrg -ptx*) 2211a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` 2221a30de1fSmrg ;; 2231a30de1fSmrg -windowsnt*) 2241a30de1fSmrg os=`echo $os | sed -e 's/windowsnt/winnt/'` 2251a30de1fSmrg ;; 2261a30de1fSmrg -psos*) 2271a30de1fSmrg os=-psos 2281a30de1fSmrg ;; 2291a30de1fSmrg -mint | -mint[0-9]*) 2301a30de1fSmrg basic_machine=m68k-atari 2311a30de1fSmrg os=-mint 2321a30de1fSmrg ;; 2331a30de1fSmrgesac 2341a30de1fSmrg 2351a30de1fSmrg# Decode aliases for certain CPU-COMPANY combinations. 2361a30de1fSmrgcase $basic_machine in 2371a30de1fSmrg # Recognize the basic CPU types without company name. 2381a30de1fSmrg # Some are omitted here because they have special meanings below. 2391a30de1fSmrg 1750a | 580 \ 2401a30de1fSmrg | a29k \ 2411a30de1fSmrg | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 2421a30de1fSmrg | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 2431a30de1fSmrg | am33_2.0 \ 2441a30de1fSmrg | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ 2451a30de1fSmrg | bfin \ 2461a30de1fSmrg | c4x | clipper \ 2471a30de1fSmrg | d10v | d30v | dlx | dsp16xx \ 2481a30de1fSmrg | fr30 | frv \ 2491a30de1fSmrg | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 2501a30de1fSmrg | i370 | i860 | i960 | ia64 \ 2511a30de1fSmrg | ip2k | iq2000 \ 2521a30de1fSmrg | m32c | m32r | m32rle | m68000 | m68k | m88k \ 2531a30de1fSmrg | maxq | mb | microblaze | mcore \ 2541a30de1fSmrg | mips | mipsbe | mipseb | mipsel | mipsle \ 2551a30de1fSmrg | mips16 \ 2561a30de1fSmrg | mips64 | mips64el \ 2571a30de1fSmrg | mips64vr | mips64vrel \ 2581a30de1fSmrg | mips64orion | mips64orionel \ 2591a30de1fSmrg | mips64vr4100 | mips64vr4100el \ 2601a30de1fSmrg | mips64vr4300 | mips64vr4300el \ 2611a30de1fSmrg | mips64vr5000 | mips64vr5000el \ 2621a30de1fSmrg | mips64vr5900 | mips64vr5900el \ 2631a30de1fSmrg | mipsisa32 | mipsisa32el \ 2641a30de1fSmrg | mipsisa32r2 | mipsisa32r2el \ 2651a30de1fSmrg | mipsisa64 | mipsisa64el \ 2661a30de1fSmrg | mipsisa64r2 | mipsisa64r2el \ 2671a30de1fSmrg | mipsisa64sb1 | mipsisa64sb1el \ 2681a30de1fSmrg | mipsisa64sr71k | mipsisa64sr71kel \ 2691a30de1fSmrg | mipstx39 | mipstx39el \ 2701a30de1fSmrg | mn10200 | mn10300 \ 2711a30de1fSmrg | mt \ 2721a30de1fSmrg | msp430 \ 2731a30de1fSmrg | nios | nios2 \ 2741a30de1fSmrg | ns16k | ns32k \ 2751a30de1fSmrg | or32 \ 2761a30de1fSmrg | pdp10 | pdp11 | pj | pjl \ 2771a30de1fSmrg | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 2781a30de1fSmrg | pyramid \ 2791a30de1fSmrg | score \ 2801a30de1fSmrg | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 2811a30de1fSmrg | sh64 | sh64le \ 2821a30de1fSmrg | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 2831a30de1fSmrg | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 2841a30de1fSmrg | spu | strongarm \ 2851a30de1fSmrg | tahoe | thumb | tic4x | tic80 | tron \ 2861a30de1fSmrg | v850 | v850e \ 2871a30de1fSmrg | we32k \ 2881a30de1fSmrg | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ 2891a30de1fSmrg | z8k) 2901a30de1fSmrg basic_machine=$basic_machine-unknown 2911a30de1fSmrg ;; 2921a30de1fSmrg m6811 | m68hc11 | m6812 | m68hc12) 2931a30de1fSmrg # Motorola 68HC11/12. 2941a30de1fSmrg basic_machine=$basic_machine-unknown 2951a30de1fSmrg os=-none 2961a30de1fSmrg ;; 2971a30de1fSmrg m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 2981a30de1fSmrg ;; 2991a30de1fSmrg ms1) 3001a30de1fSmrg basic_machine=mt-unknown 3011a30de1fSmrg ;; 3021a30de1fSmrg 3031a30de1fSmrg # We use `pc' rather than `unknown' 3041a30de1fSmrg # because (1) that's what they normally are, and 3051a30de1fSmrg # (2) the word "unknown" tends to confuse beginning users. 3061a30de1fSmrg i*86 | x86_64) 3071a30de1fSmrg basic_machine=$basic_machine-pc 3081a30de1fSmrg ;; 3091a30de1fSmrg # Object if more than one company name word. 3101a30de1fSmrg *-*-*) 3111a30de1fSmrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 3121a30de1fSmrg exit 1 3131a30de1fSmrg ;; 3141a30de1fSmrg # Recognize the basic CPU types with company name. 3151a30de1fSmrg 580-* \ 3161a30de1fSmrg | a29k-* \ 3171a30de1fSmrg | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 3181a30de1fSmrg | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 3191a30de1fSmrg | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 3201a30de1fSmrg | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 3211a30de1fSmrg | avr-* | avr32-* \ 3221a30de1fSmrg | bfin-* | bs2000-* \ 3231a30de1fSmrg | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 3241a30de1fSmrg | clipper-* | craynv-* | cydra-* \ 3251a30de1fSmrg | d10v-* | d30v-* | dlx-* \ 3261a30de1fSmrg | elxsi-* \ 3271a30de1fSmrg | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ 3281a30de1fSmrg | h8300-* | h8500-* \ 3291a30de1fSmrg | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 3301a30de1fSmrg | i*86-* | i860-* | i960-* | ia64-* \ 3311a30de1fSmrg | ip2k-* | iq2000-* \ 3321a30de1fSmrg | m32c-* | m32r-* | m32rle-* \ 3331a30de1fSmrg | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 3341a30de1fSmrg | m88110-* | m88k-* | maxq-* | mcore-* \ 3351a30de1fSmrg | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 3361a30de1fSmrg | mips16-* \ 3371a30de1fSmrg | mips64-* | mips64el-* \ 3381a30de1fSmrg | mips64vr-* | mips64vrel-* \ 3391a30de1fSmrg | mips64orion-* | mips64orionel-* \ 3401a30de1fSmrg | mips64vr4100-* | mips64vr4100el-* \ 3411a30de1fSmrg | mips64vr4300-* | mips64vr4300el-* \ 3421a30de1fSmrg | mips64vr5000-* | mips64vr5000el-* \ 3431a30de1fSmrg | mips64vr5900-* | mips64vr5900el-* \ 3441a30de1fSmrg | mipsisa32-* | mipsisa32el-* \ 3451a30de1fSmrg | mipsisa32r2-* | mipsisa32r2el-* \ 3461a30de1fSmrg | mipsisa64-* | mipsisa64el-* \ 3471a30de1fSmrg | mipsisa64r2-* | mipsisa64r2el-* \ 3481a30de1fSmrg | mipsisa64sb1-* | mipsisa64sb1el-* \ 3491a30de1fSmrg | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 3501a30de1fSmrg | mipstx39-* | mipstx39el-* \ 3511a30de1fSmrg | mmix-* \ 3521a30de1fSmrg | mt-* \ 3531a30de1fSmrg | msp430-* \ 3541a30de1fSmrg | nios-* | nios2-* \ 3551a30de1fSmrg | none-* | np1-* | ns16k-* | ns32k-* \ 3561a30de1fSmrg | orion-* \ 3571a30de1fSmrg | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 3581a30de1fSmrg | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 3591a30de1fSmrg | pyramid-* \ 3601a30de1fSmrg | romp-* | rs6000-* \ 3611a30de1fSmrg | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 3621a30de1fSmrg | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 3631a30de1fSmrg | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 3641a30de1fSmrg | sparclite-* \ 3651a30de1fSmrg | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ 3661a30de1fSmrg | tahoe-* | thumb-* \ 3671a30de1fSmrg | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 3681a30de1fSmrg | tron-* \ 3691a30de1fSmrg | v850-* | v850e-* | vax-* \ 3701a30de1fSmrg | we32k-* \ 3711a30de1fSmrg | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ 3721a30de1fSmrg | xstormy16-* | xtensa-* \ 3731a30de1fSmrg | ymp-* \ 3741a30de1fSmrg | z8k-*) 3751a30de1fSmrg ;; 3761a30de1fSmrg # Recognize the various machine names and aliases which stand 3771a30de1fSmrg # for a CPU type and a company and sometimes even an OS. 3781a30de1fSmrg 386bsd) 3791a30de1fSmrg basic_machine=i386-unknown 3801a30de1fSmrg os=-bsd 3811a30de1fSmrg ;; 3821a30de1fSmrg 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) 3831a30de1fSmrg basic_machine=m68000-att 3841a30de1fSmrg ;; 3851a30de1fSmrg 3b*) 3861a30de1fSmrg basic_machine=we32k-att 3871a30de1fSmrg ;; 3881a30de1fSmrg a29khif) 3891a30de1fSmrg basic_machine=a29k-amd 3901a30de1fSmrg os=-udi 3911a30de1fSmrg ;; 3921a30de1fSmrg abacus) 3931a30de1fSmrg basic_machine=abacus-unknown 3941a30de1fSmrg ;; 3951a30de1fSmrg adobe68k) 3961a30de1fSmrg basic_machine=m68010-adobe 3971a30de1fSmrg os=-scout 3981a30de1fSmrg ;; 3991a30de1fSmrg alliant | fx80) 4001a30de1fSmrg basic_machine=fx80-alliant 4011a30de1fSmrg ;; 4021a30de1fSmrg altos | altos3068) 4031a30de1fSmrg basic_machine=m68k-altos 4041a30de1fSmrg ;; 4051a30de1fSmrg am29k) 4061a30de1fSmrg basic_machine=a29k-none 4071a30de1fSmrg os=-bsd 4081a30de1fSmrg ;; 4091a30de1fSmrg amd64) 4101a30de1fSmrg basic_machine=x86_64-pc 4111a30de1fSmrg ;; 4121a30de1fSmrg amd64-*) 4131a30de1fSmrg basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 4141a30de1fSmrg ;; 4151a30de1fSmrg amdahl) 4161a30de1fSmrg basic_machine=580-amdahl 4171a30de1fSmrg os=-sysv 4181a30de1fSmrg ;; 4191a30de1fSmrg amiga | amiga-*) 4201a30de1fSmrg basic_machine=m68k-unknown 4211a30de1fSmrg ;; 4221a30de1fSmrg amigaos | amigados) 4231a30de1fSmrg basic_machine=m68k-unknown 4241a30de1fSmrg os=-amigaos 4251a30de1fSmrg ;; 4261a30de1fSmrg amigaunix | amix) 4271a30de1fSmrg basic_machine=m68k-unknown 4281a30de1fSmrg os=-sysv4 4291a30de1fSmrg ;; 4301a30de1fSmrg apollo68) 4311a30de1fSmrg basic_machine=m68k-apollo 4321a30de1fSmrg os=-sysv 4331a30de1fSmrg ;; 4341a30de1fSmrg apollo68bsd) 4351a30de1fSmrg basic_machine=m68k-apollo 4361a30de1fSmrg os=-bsd 4371a30de1fSmrg ;; 4381a30de1fSmrg aux) 4391a30de1fSmrg basic_machine=m68k-apple 4401a30de1fSmrg os=-aux 4411a30de1fSmrg ;; 4421a30de1fSmrg balance) 4431a30de1fSmrg basic_machine=ns32k-sequent 4441a30de1fSmrg os=-dynix 4451a30de1fSmrg ;; 4461a30de1fSmrg c90) 4471a30de1fSmrg basic_machine=c90-cray 4481a30de1fSmrg os=-unicos 4491a30de1fSmrg ;; 4501a30de1fSmrg convex-c1) 4511a30de1fSmrg basic_machine=c1-convex 4521a30de1fSmrg os=-bsd 4531a30de1fSmrg ;; 4541a30de1fSmrg convex-c2) 4551a30de1fSmrg basic_machine=c2-convex 4561a30de1fSmrg os=-bsd 4571a30de1fSmrg ;; 4581a30de1fSmrg convex-c32) 4591a30de1fSmrg basic_machine=c32-convex 4601a30de1fSmrg os=-bsd 4611a30de1fSmrg ;; 4621a30de1fSmrg convex-c34) 4631a30de1fSmrg basic_machine=c34-convex 4641a30de1fSmrg os=-bsd 4651a30de1fSmrg ;; 4661a30de1fSmrg convex-c38) 4671a30de1fSmrg basic_machine=c38-convex 4681a30de1fSmrg os=-bsd 4691a30de1fSmrg ;; 4701a30de1fSmrg cray | j90) 4711a30de1fSmrg basic_machine=j90-cray 4721a30de1fSmrg os=-unicos 4731a30de1fSmrg ;; 4741a30de1fSmrg craynv) 4751a30de1fSmrg basic_machine=craynv-cray 4761a30de1fSmrg os=-unicosmp 4771a30de1fSmrg ;; 4781a30de1fSmrg cr16c) 4791a30de1fSmrg basic_machine=cr16c-unknown 4801a30de1fSmrg os=-elf 4811a30de1fSmrg ;; 4821a30de1fSmrg crds | unos) 4831a30de1fSmrg basic_machine=m68k-crds 4841a30de1fSmrg ;; 4851a30de1fSmrg crisv32 | crisv32-* | etraxfs*) 4861a30de1fSmrg basic_machine=crisv32-axis 4871a30de1fSmrg ;; 4881a30de1fSmrg cris | cris-* | etrax*) 4891a30de1fSmrg basic_machine=cris-axis 4901a30de1fSmrg ;; 4911a30de1fSmrg crx) 4921a30de1fSmrg basic_machine=crx-unknown 4931a30de1fSmrg os=-elf 4941a30de1fSmrg ;; 4951a30de1fSmrg da30 | da30-*) 4961a30de1fSmrg basic_machine=m68k-da30 4971a30de1fSmrg ;; 4981a30de1fSmrg decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) 4991a30de1fSmrg basic_machine=mips-dec 5001a30de1fSmrg ;; 5011a30de1fSmrg decsystem10* | dec10*) 5021a30de1fSmrg basic_machine=pdp10-dec 5031a30de1fSmrg os=-tops10 5041a30de1fSmrg ;; 5051a30de1fSmrg decsystem20* | dec20*) 5061a30de1fSmrg basic_machine=pdp10-dec 5071a30de1fSmrg os=-tops20 5081a30de1fSmrg ;; 5091a30de1fSmrg delta | 3300 | motorola-3300 | motorola-delta \ 5101a30de1fSmrg | 3300-motorola | delta-motorola) 5111a30de1fSmrg basic_machine=m68k-motorola 5121a30de1fSmrg ;; 5131a30de1fSmrg delta88) 5141a30de1fSmrg basic_machine=m88k-motorola 5151a30de1fSmrg os=-sysv3 5161a30de1fSmrg ;; 5171a30de1fSmrg djgpp) 5181a30de1fSmrg basic_machine=i586-pc 5191a30de1fSmrg os=-msdosdjgpp 5201a30de1fSmrg ;; 5211a30de1fSmrg dpx20 | dpx20-*) 5221a30de1fSmrg basic_machine=rs6000-bull 5231a30de1fSmrg os=-bosx 5241a30de1fSmrg ;; 5251a30de1fSmrg dpx2* | dpx2*-bull) 5261a30de1fSmrg basic_machine=m68k-bull 5271a30de1fSmrg os=-sysv3 5281a30de1fSmrg ;; 5291a30de1fSmrg ebmon29k) 5301a30de1fSmrg basic_machine=a29k-amd 5311a30de1fSmrg os=-ebmon 5321a30de1fSmrg ;; 5331a30de1fSmrg elxsi) 5341a30de1fSmrg basic_machine=elxsi-elxsi 5351a30de1fSmrg os=-bsd 5361a30de1fSmrg ;; 5371a30de1fSmrg encore | umax | mmax) 5381a30de1fSmrg basic_machine=ns32k-encore 5391a30de1fSmrg ;; 5401a30de1fSmrg es1800 | OSE68k | ose68k | ose | OSE) 5411a30de1fSmrg basic_machine=m68k-ericsson 5421a30de1fSmrg os=-ose 5431a30de1fSmrg ;; 5441a30de1fSmrg fx2800) 5451a30de1fSmrg basic_machine=i860-alliant 5461a30de1fSmrg ;; 5471a30de1fSmrg genix) 5481a30de1fSmrg basic_machine=ns32k-ns 5491a30de1fSmrg ;; 5501a30de1fSmrg gmicro) 5511a30de1fSmrg basic_machine=tron-gmicro 5521a30de1fSmrg os=-sysv 5531a30de1fSmrg ;; 5541a30de1fSmrg go32) 5551a30de1fSmrg basic_machine=i386-pc 5561a30de1fSmrg os=-go32 5571a30de1fSmrg ;; 5581a30de1fSmrg h3050r* | hiux*) 5591a30de1fSmrg basic_machine=hppa1.1-hitachi 5601a30de1fSmrg os=-hiuxwe2 5611a30de1fSmrg ;; 5621a30de1fSmrg h8300hms) 5631a30de1fSmrg basic_machine=h8300-hitachi 5641a30de1fSmrg os=-hms 5651a30de1fSmrg ;; 5661a30de1fSmrg h8300xray) 5671a30de1fSmrg basic_machine=h8300-hitachi 5681a30de1fSmrg os=-xray 5691a30de1fSmrg ;; 5701a30de1fSmrg h8500hms) 5711a30de1fSmrg basic_machine=h8500-hitachi 5721a30de1fSmrg os=-hms 5731a30de1fSmrg ;; 5741a30de1fSmrg harris) 5751a30de1fSmrg basic_machine=m88k-harris 5761a30de1fSmrg os=-sysv3 5771a30de1fSmrg ;; 5781a30de1fSmrg hp300-*) 5791a30de1fSmrg basic_machine=m68k-hp 5801a30de1fSmrg ;; 5811a30de1fSmrg hp300bsd) 5821a30de1fSmrg basic_machine=m68k-hp 5831a30de1fSmrg os=-bsd 5841a30de1fSmrg ;; 5851a30de1fSmrg hp300hpux) 5861a30de1fSmrg basic_machine=m68k-hp 5871a30de1fSmrg os=-hpux 5881a30de1fSmrg ;; 5891a30de1fSmrg hp3k9[0-9][0-9] | hp9[0-9][0-9]) 5901a30de1fSmrg basic_machine=hppa1.0-hp 5911a30de1fSmrg ;; 5921a30de1fSmrg hp9k2[0-9][0-9] | hp9k31[0-9]) 5931a30de1fSmrg basic_machine=m68000-hp 5941a30de1fSmrg ;; 5951a30de1fSmrg hp9k3[2-9][0-9]) 5961a30de1fSmrg basic_machine=m68k-hp 5971a30de1fSmrg ;; 5981a30de1fSmrg hp9k6[0-9][0-9] | hp6[0-9][0-9]) 5991a30de1fSmrg basic_machine=hppa1.0-hp 6001a30de1fSmrg ;; 6011a30de1fSmrg hp9k7[0-79][0-9] | hp7[0-79][0-9]) 6021a30de1fSmrg basic_machine=hppa1.1-hp 6031a30de1fSmrg ;; 6041a30de1fSmrg hp9k78[0-9] | hp78[0-9]) 6051a30de1fSmrg # FIXME: really hppa2.0-hp 6061a30de1fSmrg basic_machine=hppa1.1-hp 6071a30de1fSmrg ;; 6081a30de1fSmrg hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) 6091a30de1fSmrg # FIXME: really hppa2.0-hp 6101a30de1fSmrg basic_machine=hppa1.1-hp 6111a30de1fSmrg ;; 6121a30de1fSmrg hp9k8[0-9][13679] | hp8[0-9][13679]) 6131a30de1fSmrg basic_machine=hppa1.1-hp 6141a30de1fSmrg ;; 6151a30de1fSmrg hp9k8[0-9][0-9] | hp8[0-9][0-9]) 6161a30de1fSmrg basic_machine=hppa1.0-hp 6171a30de1fSmrg ;; 6181a30de1fSmrg hppa-next) 6191a30de1fSmrg os=-nextstep3 6201a30de1fSmrg ;; 6211a30de1fSmrg hppaosf) 6221a30de1fSmrg basic_machine=hppa1.1-hp 6231a30de1fSmrg os=-osf 6241a30de1fSmrg ;; 6251a30de1fSmrg hppro) 6261a30de1fSmrg basic_machine=hppa1.1-hp 6271a30de1fSmrg os=-proelf 6281a30de1fSmrg ;; 6291a30de1fSmrg i370-ibm* | ibm*) 6301a30de1fSmrg basic_machine=i370-ibm 6311a30de1fSmrg ;; 6321a30de1fSmrg# I'm not sure what "Sysv32" means. Should this be sysv3.2? 6331a30de1fSmrg i*86v32) 6341a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 6351a30de1fSmrg os=-sysv32 6361a30de1fSmrg ;; 6371a30de1fSmrg i*86v4*) 6381a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 6391a30de1fSmrg os=-sysv4 6401a30de1fSmrg ;; 6411a30de1fSmrg i*86v) 6421a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 6431a30de1fSmrg os=-sysv 6441a30de1fSmrg ;; 6451a30de1fSmrg i*86sol2) 6461a30de1fSmrg basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 6471a30de1fSmrg os=-solaris2 6481a30de1fSmrg ;; 6491a30de1fSmrg i386mach) 6501a30de1fSmrg basic_machine=i386-mach 6511a30de1fSmrg os=-mach 6521a30de1fSmrg ;; 6531a30de1fSmrg i386-vsta | vsta) 6541a30de1fSmrg basic_machine=i386-unknown 6551a30de1fSmrg os=-vsta 6561a30de1fSmrg ;; 6571a30de1fSmrg iris | iris4d) 6581a30de1fSmrg basic_machine=mips-sgi 6591a30de1fSmrg case $os in 6601a30de1fSmrg -irix*) 6611a30de1fSmrg ;; 6621a30de1fSmrg *) 6631a30de1fSmrg os=-irix4 6641a30de1fSmrg ;; 6651a30de1fSmrg esac 6661a30de1fSmrg ;; 6671a30de1fSmrg isi68 | isi) 6681a30de1fSmrg basic_machine=m68k-isi 6691a30de1fSmrg os=-sysv 6701a30de1fSmrg ;; 6711a30de1fSmrg m88k-omron*) 6721a30de1fSmrg basic_machine=m88k-omron 6731a30de1fSmrg ;; 6741a30de1fSmrg magnum | m3230) 6751a30de1fSmrg basic_machine=mips-mips 6761a30de1fSmrg os=-sysv 6771a30de1fSmrg ;; 6781a30de1fSmrg merlin) 6791a30de1fSmrg basic_machine=ns32k-utek 6801a30de1fSmrg os=-sysv 6811a30de1fSmrg ;; 6821a30de1fSmrg mingw32) 6831a30de1fSmrg basic_machine=i386-pc 6841a30de1fSmrg os=-mingw32 6851a30de1fSmrg ;; 6861a30de1fSmrg miniframe) 6871a30de1fSmrg basic_machine=m68000-convergent 6881a30de1fSmrg ;; 6891a30de1fSmrg *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) 6901a30de1fSmrg basic_machine=m68k-atari 6911a30de1fSmrg os=-mint 6921a30de1fSmrg ;; 6931a30de1fSmrg mips3*-*) 6941a30de1fSmrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` 6951a30de1fSmrg ;; 6961a30de1fSmrg mips3*) 6971a30de1fSmrg basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 6981a30de1fSmrg ;; 6991a30de1fSmrg monitor) 7001a30de1fSmrg basic_machine=m68k-rom68k 7011a30de1fSmrg os=-coff 7021a30de1fSmrg ;; 7031a30de1fSmrg morphos) 7041a30de1fSmrg basic_machine=powerpc-unknown 7051a30de1fSmrg os=-morphos 7061a30de1fSmrg ;; 7071a30de1fSmrg msdos) 7081a30de1fSmrg basic_machine=i386-pc 7091a30de1fSmrg os=-msdos 7101a30de1fSmrg ;; 7111a30de1fSmrg ms1-*) 7121a30de1fSmrg basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 7131a30de1fSmrg ;; 7141a30de1fSmrg mvs) 7151a30de1fSmrg basic_machine=i370-ibm 7161a30de1fSmrg os=-mvs 7171a30de1fSmrg ;; 7181a30de1fSmrg ncr3000) 7191a30de1fSmrg basic_machine=i486-ncr 7201a30de1fSmrg os=-sysv4 7211a30de1fSmrg ;; 7221a30de1fSmrg netbsd386) 7231a30de1fSmrg basic_machine=i386-unknown 7241a30de1fSmrg os=-netbsd 7251a30de1fSmrg ;; 7261a30de1fSmrg netwinder) 7271a30de1fSmrg basic_machine=armv4l-rebel 7281a30de1fSmrg os=-linux 7291a30de1fSmrg ;; 7301a30de1fSmrg news | news700 | news800 | news900) 7311a30de1fSmrg basic_machine=m68k-sony 7321a30de1fSmrg os=-newsos 7331a30de1fSmrg ;; 7341a30de1fSmrg news1000) 7351a30de1fSmrg basic_machine=m68030-sony 7361a30de1fSmrg os=-newsos 7371a30de1fSmrg ;; 7381a30de1fSmrg news-3600 | risc-news) 7391a30de1fSmrg basic_machine=mips-sony 7401a30de1fSmrg os=-newsos 7411a30de1fSmrg ;; 7421a30de1fSmrg necv70) 7431a30de1fSmrg basic_machine=v70-nec 7441a30de1fSmrg os=-sysv 7451a30de1fSmrg ;; 7461a30de1fSmrg next | m*-next ) 7471a30de1fSmrg basic_machine=m68k-next 7481a30de1fSmrg case $os in 7491a30de1fSmrg -nextstep* ) 7501a30de1fSmrg ;; 7511a30de1fSmrg -ns2*) 7521a30de1fSmrg os=-nextstep2 7531a30de1fSmrg ;; 7541a30de1fSmrg *) 7551a30de1fSmrg os=-nextstep3 7561a30de1fSmrg ;; 7571a30de1fSmrg esac 7581a30de1fSmrg ;; 7591a30de1fSmrg nh3000) 7601a30de1fSmrg basic_machine=m68k-harris 7611a30de1fSmrg os=-cxux 7621a30de1fSmrg ;; 7631a30de1fSmrg nh[45]000) 7641a30de1fSmrg basic_machine=m88k-harris 7651a30de1fSmrg os=-cxux 7661a30de1fSmrg ;; 7671a30de1fSmrg nindy960) 7681a30de1fSmrg basic_machine=i960-intel 7691a30de1fSmrg os=-nindy 7701a30de1fSmrg ;; 7711a30de1fSmrg mon960) 7721a30de1fSmrg basic_machine=i960-intel 7731a30de1fSmrg os=-mon960 7741a30de1fSmrg ;; 7751a30de1fSmrg nonstopux) 7761a30de1fSmrg basic_machine=mips-compaq 7771a30de1fSmrg os=-nonstopux 7781a30de1fSmrg ;; 7791a30de1fSmrg np1) 7801a30de1fSmrg basic_machine=np1-gould 7811a30de1fSmrg ;; 7821a30de1fSmrg nsr-tandem) 7831a30de1fSmrg basic_machine=nsr-tandem 7841a30de1fSmrg ;; 7851a30de1fSmrg op50n-* | op60c-*) 7861a30de1fSmrg basic_machine=hppa1.1-oki 7871a30de1fSmrg os=-proelf 7881a30de1fSmrg ;; 7891a30de1fSmrg openrisc | openrisc-*) 7901a30de1fSmrg basic_machine=or32-unknown 7911a30de1fSmrg ;; 7921a30de1fSmrg os400) 7931a30de1fSmrg basic_machine=powerpc-ibm 7941a30de1fSmrg os=-os400 7951a30de1fSmrg ;; 7961a30de1fSmrg OSE68000 | ose68000) 7971a30de1fSmrg basic_machine=m68000-ericsson 7981a30de1fSmrg os=-ose 7991a30de1fSmrg ;; 8001a30de1fSmrg os68k) 8011a30de1fSmrg basic_machine=m68k-none 8021a30de1fSmrg os=-os68k 8031a30de1fSmrg ;; 8041a30de1fSmrg pa-hitachi) 8051a30de1fSmrg basic_machine=hppa1.1-hitachi 8061a30de1fSmrg os=-hiuxwe2 8071a30de1fSmrg ;; 8081a30de1fSmrg paragon) 8091a30de1fSmrg basic_machine=i860-intel 8101a30de1fSmrg os=-osf 8111a30de1fSmrg ;; 8121a30de1fSmrg pbd) 8131a30de1fSmrg basic_machine=sparc-tti 8141a30de1fSmrg ;; 8151a30de1fSmrg pbb) 8161a30de1fSmrg basic_machine=m68k-tti 8171a30de1fSmrg ;; 8181a30de1fSmrg pc532 | pc532-*) 8191a30de1fSmrg basic_machine=ns32k-pc532 8201a30de1fSmrg ;; 8211a30de1fSmrg pc98) 8221a30de1fSmrg basic_machine=i386-pc 8231a30de1fSmrg ;; 8241a30de1fSmrg pc98-*) 8251a30de1fSmrg basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 8261a30de1fSmrg ;; 8271a30de1fSmrg pentium | p5 | k5 | k6 | nexgen | viac3) 8281a30de1fSmrg basic_machine=i586-pc 8291a30de1fSmrg ;; 8301a30de1fSmrg pentiumpro | p6 | 6x86 | athlon | athlon_*) 8311a30de1fSmrg basic_machine=i686-pc 8321a30de1fSmrg ;; 8331a30de1fSmrg pentiumii | pentium2 | pentiumiii | pentium3) 8341a30de1fSmrg basic_machine=i686-pc 8351a30de1fSmrg ;; 8361a30de1fSmrg pentium4) 8371a30de1fSmrg basic_machine=i786-pc 8381a30de1fSmrg ;; 8391a30de1fSmrg pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) 8401a30de1fSmrg basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` 8411a30de1fSmrg ;; 8421a30de1fSmrg pentiumpro-* | p6-* | 6x86-* | athlon-*) 8431a30de1fSmrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 8441a30de1fSmrg ;; 8451a30de1fSmrg pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 8461a30de1fSmrg basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 8471a30de1fSmrg ;; 8481a30de1fSmrg pentium4-*) 8491a30de1fSmrg basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 8501a30de1fSmrg ;; 8511a30de1fSmrg pn) 8521a30de1fSmrg basic_machine=pn-gould 8531a30de1fSmrg ;; 8541a30de1fSmrg power) basic_machine=power-ibm 8551a30de1fSmrg ;; 8561a30de1fSmrg ppc) basic_machine=powerpc-unknown 8571a30de1fSmrg ;; 8581a30de1fSmrg ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 8591a30de1fSmrg ;; 8601a30de1fSmrg ppcle | powerpclittle | ppc-le | powerpc-little) 8611a30de1fSmrg basic_machine=powerpcle-unknown 8621a30de1fSmrg ;; 8631a30de1fSmrg ppcle-* | powerpclittle-*) 8641a30de1fSmrg basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` 8651a30de1fSmrg ;; 8661a30de1fSmrg ppc64) basic_machine=powerpc64-unknown 8671a30de1fSmrg ;; 8681a30de1fSmrg ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` 8691a30de1fSmrg ;; 8701a30de1fSmrg ppc64le | powerpc64little | ppc64-le | powerpc64-little) 8711a30de1fSmrg basic_machine=powerpc64le-unknown 8721a30de1fSmrg ;; 8731a30de1fSmrg ppc64le-* | powerpc64little-*) 8741a30de1fSmrg basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` 8751a30de1fSmrg ;; 8761a30de1fSmrg ps2) 8771a30de1fSmrg basic_machine=i386-ibm 8781a30de1fSmrg ;; 8791a30de1fSmrg pw32) 8801a30de1fSmrg basic_machine=i586-unknown 8811a30de1fSmrg os=-pw32 8821a30de1fSmrg ;; 8831a30de1fSmrg rdos) 8841a30de1fSmrg basic_machine=i386-pc 8851a30de1fSmrg os=-rdos 8861a30de1fSmrg ;; 8871a30de1fSmrg rom68k) 8881a30de1fSmrg basic_machine=m68k-rom68k 8891a30de1fSmrg os=-coff 8901a30de1fSmrg ;; 8911a30de1fSmrg rm[46]00) 8921a30de1fSmrg basic_machine=mips-siemens 8931a30de1fSmrg ;; 8941a30de1fSmrg rtpc | rtpc-*) 8951a30de1fSmrg basic_machine=romp-ibm 8961a30de1fSmrg ;; 8971a30de1fSmrg s390 | s390-*) 8981a30de1fSmrg basic_machine=s390-ibm 8991a30de1fSmrg ;; 9001a30de1fSmrg s390x | s390x-*) 9011a30de1fSmrg basic_machine=s390x-ibm 9021a30de1fSmrg ;; 9031a30de1fSmrg sa29200) 9041a30de1fSmrg basic_machine=a29k-amd 9051a30de1fSmrg os=-udi 9061a30de1fSmrg ;; 9071a30de1fSmrg sb1) 9081a30de1fSmrg basic_machine=mipsisa64sb1-unknown 9091a30de1fSmrg ;; 9101a30de1fSmrg sb1el) 9111a30de1fSmrg basic_machine=mipsisa64sb1el-unknown 9121a30de1fSmrg ;; 9131a30de1fSmrg sde) 9141a30de1fSmrg basic_machine=mipsisa32-sde 9151a30de1fSmrg os=-elf 9161a30de1fSmrg ;; 9171a30de1fSmrg sei) 9181a30de1fSmrg basic_machine=mips-sei 9191a30de1fSmrg os=-seiux 9201a30de1fSmrg ;; 9211a30de1fSmrg sequent) 9221a30de1fSmrg basic_machine=i386-sequent 9231a30de1fSmrg ;; 9241a30de1fSmrg sh) 9251a30de1fSmrg basic_machine=sh-hitachi 9261a30de1fSmrg os=-hms 9271a30de1fSmrg ;; 9281a30de1fSmrg sh64) 9291a30de1fSmrg basic_machine=sh64-unknown 9301a30de1fSmrg ;; 9311a30de1fSmrg sparclite-wrs | simso-wrs) 9321a30de1fSmrg basic_machine=sparclite-wrs 9331a30de1fSmrg os=-vxworks 9341a30de1fSmrg ;; 9351a30de1fSmrg sps7) 9361a30de1fSmrg basic_machine=m68k-bull 9371a30de1fSmrg os=-sysv2 9381a30de1fSmrg ;; 9391a30de1fSmrg spur) 9401a30de1fSmrg basic_machine=spur-unknown 9411a30de1fSmrg ;; 9421a30de1fSmrg st2000) 9431a30de1fSmrg basic_machine=m68k-tandem 9441a30de1fSmrg ;; 9451a30de1fSmrg stratus) 9461a30de1fSmrg basic_machine=i860-stratus 9471a30de1fSmrg os=-sysv4 9481a30de1fSmrg ;; 9491a30de1fSmrg sun2) 9501a30de1fSmrg basic_machine=m68000-sun 9511a30de1fSmrg ;; 9521a30de1fSmrg sun2os3) 9531a30de1fSmrg basic_machine=m68000-sun 9541a30de1fSmrg os=-sunos3 9551a30de1fSmrg ;; 9561a30de1fSmrg sun2os4) 9571a30de1fSmrg basic_machine=m68000-sun 9581a30de1fSmrg os=-sunos4 9591a30de1fSmrg ;; 9601a30de1fSmrg sun3os3) 9611a30de1fSmrg basic_machine=m68k-sun 9621a30de1fSmrg os=-sunos3 9631a30de1fSmrg ;; 9641a30de1fSmrg sun3os4) 9651a30de1fSmrg basic_machine=m68k-sun 9661a30de1fSmrg os=-sunos4 9671a30de1fSmrg ;; 9681a30de1fSmrg sun4os3) 9691a30de1fSmrg basic_machine=sparc-sun 9701a30de1fSmrg os=-sunos3 9711a30de1fSmrg ;; 9721a30de1fSmrg sun4os4) 9731a30de1fSmrg basic_machine=sparc-sun 9741a30de1fSmrg os=-sunos4 9751a30de1fSmrg ;; 9761a30de1fSmrg sun4sol2) 9771a30de1fSmrg basic_machine=sparc-sun 9781a30de1fSmrg os=-solaris2 9791a30de1fSmrg ;; 9801a30de1fSmrg sun3 | sun3-*) 9811a30de1fSmrg basic_machine=m68k-sun 9821a30de1fSmrg ;; 9831a30de1fSmrg sun4) 9841a30de1fSmrg basic_machine=sparc-sun 9851a30de1fSmrg ;; 9861a30de1fSmrg sun386 | sun386i | roadrunner) 9871a30de1fSmrg basic_machine=i386-sun 9881a30de1fSmrg ;; 9891a30de1fSmrg sv1) 9901a30de1fSmrg basic_machine=sv1-cray 9911a30de1fSmrg os=-unicos 9921a30de1fSmrg ;; 9931a30de1fSmrg symmetry) 9941a30de1fSmrg basic_machine=i386-sequent 9951a30de1fSmrg os=-dynix 9961a30de1fSmrg ;; 9971a30de1fSmrg t3e) 9981a30de1fSmrg basic_machine=alphaev5-cray 9991a30de1fSmrg os=-unicos 10001a30de1fSmrg ;; 10011a30de1fSmrg t90) 10021a30de1fSmrg basic_machine=t90-cray 10031a30de1fSmrg os=-unicos 10041a30de1fSmrg ;; 10051a30de1fSmrg tic54x | c54x*) 10061a30de1fSmrg basic_machine=tic54x-unknown 10071a30de1fSmrg os=-coff 10081a30de1fSmrg ;; 10091a30de1fSmrg tic55x | c55x*) 10101a30de1fSmrg basic_machine=tic55x-unknown 10111a30de1fSmrg os=-coff 10121a30de1fSmrg ;; 10131a30de1fSmrg tic6x | c6x*) 10141a30de1fSmrg basic_machine=tic6x-unknown 10151a30de1fSmrg os=-coff 10161a30de1fSmrg ;; 10171a30de1fSmrg tx39) 10181a30de1fSmrg basic_machine=mipstx39-unknown 10191a30de1fSmrg ;; 10201a30de1fSmrg tx39el) 10211a30de1fSmrg basic_machine=mipstx39el-unknown 10221a30de1fSmrg ;; 10231a30de1fSmrg toad1) 10241a30de1fSmrg basic_machine=pdp10-xkl 10251a30de1fSmrg os=-tops20 10261a30de1fSmrg ;; 10271a30de1fSmrg tower | tower-32) 10281a30de1fSmrg basic_machine=m68k-ncr 10291a30de1fSmrg ;; 10301a30de1fSmrg tpf) 10311a30de1fSmrg basic_machine=s390x-ibm 10321a30de1fSmrg os=-tpf 10331a30de1fSmrg ;; 10341a30de1fSmrg udi29k) 10351a30de1fSmrg basic_machine=a29k-amd 10361a30de1fSmrg os=-udi 10371a30de1fSmrg ;; 10381a30de1fSmrg ultra3) 10391a30de1fSmrg basic_machine=a29k-nyu 10401a30de1fSmrg os=-sym1 10411a30de1fSmrg ;; 10421a30de1fSmrg v810 | necv810) 10431a30de1fSmrg basic_machine=v810-nec 10441a30de1fSmrg os=-none 10451a30de1fSmrg ;; 10461a30de1fSmrg vaxv) 10471a30de1fSmrg basic_machine=vax-dec 10481a30de1fSmrg os=-sysv 10491a30de1fSmrg ;; 10501a30de1fSmrg vms) 10511a30de1fSmrg basic_machine=vax-dec 10521a30de1fSmrg os=-vms 10531a30de1fSmrg ;; 10541a30de1fSmrg vpp*|vx|vx-*) 10551a30de1fSmrg basic_machine=f301-fujitsu 10561a30de1fSmrg ;; 10571a30de1fSmrg vxworks960) 10581a30de1fSmrg basic_machine=i960-wrs 10591a30de1fSmrg os=-vxworks 10601a30de1fSmrg ;; 10611a30de1fSmrg vxworks68) 10621a30de1fSmrg basic_machine=m68k-wrs 10631a30de1fSmrg os=-vxworks 10641a30de1fSmrg ;; 10651a30de1fSmrg vxworks29k) 10661a30de1fSmrg basic_machine=a29k-wrs 10671a30de1fSmrg os=-vxworks 10681a30de1fSmrg ;; 10691a30de1fSmrg w65*) 10701a30de1fSmrg basic_machine=w65-wdc 10711a30de1fSmrg os=-none 10721a30de1fSmrg ;; 10731a30de1fSmrg w89k-*) 10741a30de1fSmrg basic_machine=hppa1.1-winbond 10751a30de1fSmrg os=-proelf 10761a30de1fSmrg ;; 10771a30de1fSmrg xbox) 10781a30de1fSmrg basic_machine=i686-pc 10791a30de1fSmrg os=-mingw32 10801a30de1fSmrg ;; 10811a30de1fSmrg xps | xps100) 10821a30de1fSmrg basic_machine=xps100-honeywell 10831a30de1fSmrg ;; 10841a30de1fSmrg ymp) 10851a30de1fSmrg basic_machine=ymp-cray 10861a30de1fSmrg os=-unicos 10871a30de1fSmrg ;; 10881a30de1fSmrg z8k-*-coff) 10891a30de1fSmrg basic_machine=z8k-unknown 10901a30de1fSmrg os=-sim 10911a30de1fSmrg ;; 10921a30de1fSmrg none) 10931a30de1fSmrg basic_machine=none-none 10941a30de1fSmrg os=-none 10951a30de1fSmrg ;; 10961a30de1fSmrg 10971a30de1fSmrg# Here we handle the default manufacturer of certain CPU types. It is in 10981a30de1fSmrg# some cases the only manufacturer, in others, it is the most popular. 10991a30de1fSmrg w89k) 11001a30de1fSmrg basic_machine=hppa1.1-winbond 11011a30de1fSmrg ;; 11021a30de1fSmrg op50n) 11031a30de1fSmrg basic_machine=hppa1.1-oki 11041a30de1fSmrg ;; 11051a30de1fSmrg op60c) 11061a30de1fSmrg basic_machine=hppa1.1-oki 11071a30de1fSmrg ;; 11081a30de1fSmrg romp) 11091a30de1fSmrg basic_machine=romp-ibm 11101a30de1fSmrg ;; 11111a30de1fSmrg mmix) 11121a30de1fSmrg basic_machine=mmix-knuth 11131a30de1fSmrg ;; 11141a30de1fSmrg rs6000) 11151a30de1fSmrg basic_machine=rs6000-ibm 11161a30de1fSmrg ;; 11171a30de1fSmrg vax) 11181a30de1fSmrg basic_machine=vax-dec 11191a30de1fSmrg ;; 11201a30de1fSmrg pdp10) 11211a30de1fSmrg # there are many clones, so DEC is not a safe bet 11221a30de1fSmrg basic_machine=pdp10-unknown 11231a30de1fSmrg ;; 11241a30de1fSmrg pdp11) 11251a30de1fSmrg basic_machine=pdp11-dec 11261a30de1fSmrg ;; 11271a30de1fSmrg we32k) 11281a30de1fSmrg basic_machine=we32k-att 11291a30de1fSmrg ;; 11301a30de1fSmrg sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) 11311a30de1fSmrg basic_machine=sh-unknown 11321a30de1fSmrg ;; 11331a30de1fSmrg sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 11341a30de1fSmrg basic_machine=sparc-sun 11351a30de1fSmrg ;; 11361a30de1fSmrg cydra) 11371a30de1fSmrg basic_machine=cydra-cydrome 11381a30de1fSmrg ;; 11391a30de1fSmrg orion) 11401a30de1fSmrg basic_machine=orion-highlevel 11411a30de1fSmrg ;; 11421a30de1fSmrg orion105) 11431a30de1fSmrg basic_machine=clipper-highlevel 11441a30de1fSmrg ;; 11451a30de1fSmrg mac | mpw | mac-mpw) 11461a30de1fSmrg basic_machine=m68k-apple 11471a30de1fSmrg ;; 11481a30de1fSmrg pmac | pmac-mpw) 11491a30de1fSmrg basic_machine=powerpc-apple 11501a30de1fSmrg ;; 11511a30de1fSmrg *-unknown) 11521a30de1fSmrg # Make sure to match an already-canonicalized machine name. 11531a30de1fSmrg ;; 11541a30de1fSmrg *) 11551a30de1fSmrg echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 11561a30de1fSmrg exit 1 11571a30de1fSmrg ;; 11581a30de1fSmrgesac 11591a30de1fSmrg 11601a30de1fSmrg# Here we canonicalize certain aliases for manufacturers. 11611a30de1fSmrgcase $basic_machine in 11621a30de1fSmrg *-digital*) 11631a30de1fSmrg basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` 11641a30de1fSmrg ;; 11651a30de1fSmrg *-commodore*) 11661a30de1fSmrg basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` 11671a30de1fSmrg ;; 11681a30de1fSmrg *) 11691a30de1fSmrg ;; 11701a30de1fSmrgesac 11711a30de1fSmrg 11721a30de1fSmrg# Decode manufacturer-specific aliases for certain operating systems. 11731a30de1fSmrg 11741a30de1fSmrgif [ x"$os" != x"" ] 11751a30de1fSmrgthen 11761a30de1fSmrgcase $os in 11771a30de1fSmrg # First match some system type aliases 11781a30de1fSmrg # that might get confused with valid system types. 11791a30de1fSmrg # -solaris* is a basic system type, with this one exception. 11801a30de1fSmrg -solaris1 | -solaris1.*) 11811a30de1fSmrg os=`echo $os | sed -e 's|solaris1|sunos4|'` 11821a30de1fSmrg ;; 11831a30de1fSmrg -solaris) 11841a30de1fSmrg os=-solaris2 11851a30de1fSmrg ;; 11861a30de1fSmrg -svr4*) 11871a30de1fSmrg os=-sysv4 11881a30de1fSmrg ;; 11891a30de1fSmrg -unixware*) 11901a30de1fSmrg os=-sysv4.2uw 11911a30de1fSmrg ;; 11921a30de1fSmrg -gnu/linux*) 11931a30de1fSmrg os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` 11941a30de1fSmrg ;; 11951a30de1fSmrg # First accept the basic system types. 11961a30de1fSmrg # The portable systems comes first. 11971a30de1fSmrg # Each alternative MUST END IN A *, to match a version number. 11981a30de1fSmrg # -sysv* is not here because it comes later, after sysvr4. 11991a30de1fSmrg -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 12001a30de1fSmrg | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ 12011a30de1fSmrg | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ 12021a30de1fSmrg | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 12031a30de1fSmrg | -aos* \ 12041a30de1fSmrg | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 12051a30de1fSmrg | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 12061a30de1fSmrg | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 12071a30de1fSmrg | -openbsd* | -solidbsd* \ 12081a30de1fSmrg | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 12091a30de1fSmrg | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 12101a30de1fSmrg | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 12111a30de1fSmrg | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 12121a30de1fSmrg | -chorusos* | -chorusrdb* \ 12131a30de1fSmrg | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 12141a30de1fSmrg | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ 12151a30de1fSmrg | -uxpv* | -beos* | -mpeix* | -udk* \ 12161a30de1fSmrg | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 12171a30de1fSmrg | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 12181a30de1fSmrg | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 12191a30de1fSmrg | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 12201a30de1fSmrg | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 12211a30de1fSmrg | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 12221a30de1fSmrg | -skyos* | -haiku* | -rdos* | -toppers*) 12231a30de1fSmrg # Remember, each alternative MUST END IN *, to match a version number. 12241a30de1fSmrg ;; 12251a30de1fSmrg -qnx*) 12261a30de1fSmrg case $basic_machine in 12271a30de1fSmrg x86-* | i*86-*) 12281a30de1fSmrg ;; 12291a30de1fSmrg *) 12301a30de1fSmrg os=-nto$os 12311a30de1fSmrg ;; 12321a30de1fSmrg esac 12331a30de1fSmrg ;; 12341a30de1fSmrg -nto-qnx*) 12351a30de1fSmrg ;; 12361a30de1fSmrg -nto*) 12371a30de1fSmrg os=`echo $os | sed -e 's|nto|nto-qnx|'` 12381a30de1fSmrg ;; 12391a30de1fSmrg -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 12401a30de1fSmrg | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 12411a30de1fSmrg | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 12421a30de1fSmrg ;; 12431a30de1fSmrg -mac*) 12441a30de1fSmrg os=`echo $os | sed -e 's|mac|macos|'` 12451a30de1fSmrg ;; 12461a30de1fSmrg -linux-dietlibc) 12471a30de1fSmrg os=-linux-dietlibc 12481a30de1fSmrg ;; 12491a30de1fSmrg -linux*) 12501a30de1fSmrg os=`echo $os | sed -e 's|linux|linux-gnu|'` 12511a30de1fSmrg ;; 12521a30de1fSmrg -sunos5*) 12531a30de1fSmrg os=`echo $os | sed -e 's|sunos5|solaris2|'` 12541a30de1fSmrg ;; 12551a30de1fSmrg -sunos6*) 12561a30de1fSmrg os=`echo $os | sed -e 's|sunos6|solaris3|'` 12571a30de1fSmrg ;; 12581a30de1fSmrg -opened*) 12591a30de1fSmrg os=-openedition 12601a30de1fSmrg ;; 12611a30de1fSmrg -os400*) 12621a30de1fSmrg os=-os400 12631a30de1fSmrg ;; 12641a30de1fSmrg -wince*) 12651a30de1fSmrg os=-wince 12661a30de1fSmrg ;; 12671a30de1fSmrg -osfrose*) 12681a30de1fSmrg os=-osfrose 12691a30de1fSmrg ;; 12701a30de1fSmrg -osf*) 12711a30de1fSmrg os=-osf 12721a30de1fSmrg ;; 12731a30de1fSmrg -utek*) 12741a30de1fSmrg os=-bsd 12751a30de1fSmrg ;; 12761a30de1fSmrg -dynix*) 12771a30de1fSmrg os=-bsd 12781a30de1fSmrg ;; 12791a30de1fSmrg -acis*) 12801a30de1fSmrg os=-aos 12811a30de1fSmrg ;; 12821a30de1fSmrg -atheos*) 12831a30de1fSmrg os=-atheos 12841a30de1fSmrg ;; 12851a30de1fSmrg -syllable*) 12861a30de1fSmrg os=-syllable 12871a30de1fSmrg ;; 12881a30de1fSmrg -386bsd) 12891a30de1fSmrg os=-bsd 12901a30de1fSmrg ;; 12911a30de1fSmrg -ctix* | -uts*) 12921a30de1fSmrg os=-sysv 12931a30de1fSmrg ;; 12941a30de1fSmrg -nova*) 12951a30de1fSmrg os=-rtmk-nova 12961a30de1fSmrg ;; 12971a30de1fSmrg -ns2 ) 12981a30de1fSmrg os=-nextstep2 12991a30de1fSmrg ;; 13001a30de1fSmrg -nsk*) 13011a30de1fSmrg os=-nsk 13021a30de1fSmrg ;; 13031a30de1fSmrg # Preserve the version number of sinix5. 13041a30de1fSmrg -sinix5.*) 13051a30de1fSmrg os=`echo $os | sed -e 's|sinix|sysv|'` 13061a30de1fSmrg ;; 13071a30de1fSmrg -sinix*) 13081a30de1fSmrg os=-sysv4 13091a30de1fSmrg ;; 13101a30de1fSmrg -tpf*) 13111a30de1fSmrg os=-tpf 13121a30de1fSmrg ;; 13131a30de1fSmrg -triton*) 13141a30de1fSmrg os=-sysv3 13151a30de1fSmrg ;; 13161a30de1fSmrg -oss*) 13171a30de1fSmrg os=-sysv3 13181a30de1fSmrg ;; 13191a30de1fSmrg -svr4) 13201a30de1fSmrg os=-sysv4 13211a30de1fSmrg ;; 13221a30de1fSmrg -svr3) 13231a30de1fSmrg os=-sysv3 13241a30de1fSmrg ;; 13251a30de1fSmrg -sysvr4) 13261a30de1fSmrg os=-sysv4 13271a30de1fSmrg ;; 13281a30de1fSmrg # This must come after -sysvr4. 13291a30de1fSmrg -sysv*) 13301a30de1fSmrg ;; 13311a30de1fSmrg -ose*) 13321a30de1fSmrg os=-ose 13331a30de1fSmrg ;; 13341a30de1fSmrg -es1800*) 13351a30de1fSmrg os=-ose 13361a30de1fSmrg ;; 13371a30de1fSmrg -xenix) 13381a30de1fSmrg os=-xenix 13391a30de1fSmrg ;; 13401a30de1fSmrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 13411a30de1fSmrg os=-mint 13421a30de1fSmrg ;; 13431a30de1fSmrg -aros*) 13441a30de1fSmrg os=-aros 13451a30de1fSmrg ;; 13461a30de1fSmrg -kaos*) 13471a30de1fSmrg os=-kaos 13481a30de1fSmrg ;; 13491a30de1fSmrg -zvmoe) 13501a30de1fSmrg os=-zvmoe 13511a30de1fSmrg ;; 13521a30de1fSmrg -none) 13531a30de1fSmrg ;; 13541a30de1fSmrg *) 13551a30de1fSmrg # Get rid of the `-' at the beginning of $os. 13561a30de1fSmrg os=`echo $os | sed 's/[^-]*-//'` 13571a30de1fSmrg echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 13581a30de1fSmrg exit 1 13591a30de1fSmrg ;; 13601a30de1fSmrgesac 13611a30de1fSmrgelse 13621a30de1fSmrg 13631a30de1fSmrg# Here we handle the default operating systems that come with various machines. 13641a30de1fSmrg# The value should be what the vendor currently ships out the door with their 13651a30de1fSmrg# machine or put another way, the most popular os provided with the machine. 13661a30de1fSmrg 13671a30de1fSmrg# Note that if you're going to try to match "-MANUFACTURER" here (say, 13681a30de1fSmrg# "-sun"), then you have to tell the case statement up towards the top 13691a30de1fSmrg# that MANUFACTURER isn't an operating system. Otherwise, code above 13701a30de1fSmrg# will signal an error saying that MANUFACTURER isn't an operating 13711a30de1fSmrg# system, and we'll never get to this point. 13721a30de1fSmrg 13731a30de1fSmrgcase $basic_machine in 13741a30de1fSmrg score-*) 13751a30de1fSmrg os=-elf 13761a30de1fSmrg ;; 13771a30de1fSmrg spu-*) 13781a30de1fSmrg os=-elf 13791a30de1fSmrg ;; 13801a30de1fSmrg *-acorn) 13811a30de1fSmrg os=-riscix1.2 13821a30de1fSmrg ;; 13831a30de1fSmrg arm*-rebel) 13841a30de1fSmrg os=-linux 13851a30de1fSmrg ;; 13861a30de1fSmrg arm*-semi) 13871a30de1fSmrg os=-aout 13881a30de1fSmrg ;; 13891a30de1fSmrg c4x-* | tic4x-*) 13901a30de1fSmrg os=-coff 13911a30de1fSmrg ;; 13921a30de1fSmrg # This must come before the *-dec entry. 13931a30de1fSmrg pdp10-*) 13941a30de1fSmrg os=-tops20 13951a30de1fSmrg ;; 13961a30de1fSmrg pdp11-*) 13971a30de1fSmrg os=-none 13981a30de1fSmrg ;; 13991a30de1fSmrg *-dec | vax-*) 14001a30de1fSmrg os=-ultrix4.2 14011a30de1fSmrg ;; 14021a30de1fSmrg m68*-apollo) 14031a30de1fSmrg os=-domain 14041a30de1fSmrg ;; 14051a30de1fSmrg i386-sun) 14061a30de1fSmrg os=-sunos4.0.2 14071a30de1fSmrg ;; 14081a30de1fSmrg m68000-sun) 14091a30de1fSmrg os=-sunos3 14101a30de1fSmrg # This also exists in the configure program, but was not the 14111a30de1fSmrg # default. 14121a30de1fSmrg # os=-sunos4 14131a30de1fSmrg ;; 14141a30de1fSmrg m68*-cisco) 14151a30de1fSmrg os=-aout 14161a30de1fSmrg ;; 14171a30de1fSmrg mips*-cisco) 14181a30de1fSmrg os=-elf 14191a30de1fSmrg ;; 14201a30de1fSmrg mips*-*) 14211a30de1fSmrg os=-elf 14221a30de1fSmrg ;; 14231a30de1fSmrg or32-*) 14241a30de1fSmrg os=-coff 14251a30de1fSmrg ;; 14261a30de1fSmrg *-tti) # must be before sparc entry or we get the wrong os. 14271a30de1fSmrg os=-sysv3 14281a30de1fSmrg ;; 14291a30de1fSmrg sparc-* | *-sun) 14301a30de1fSmrg os=-sunos4.1.1 14311a30de1fSmrg ;; 14321a30de1fSmrg *-be) 14331a30de1fSmrg os=-beos 14341a30de1fSmrg ;; 14351a30de1fSmrg *-haiku) 14361a30de1fSmrg os=-haiku 14371a30de1fSmrg ;; 14381a30de1fSmrg *-ibm) 14391a30de1fSmrg os=-aix 14401a30de1fSmrg ;; 14411a30de1fSmrg *-knuth) 14421a30de1fSmrg os=-mmixware 14431a30de1fSmrg ;; 14441a30de1fSmrg *-wec) 14451a30de1fSmrg os=-proelf 14461a30de1fSmrg ;; 14471a30de1fSmrg *-winbond) 14481a30de1fSmrg os=-proelf 14491a30de1fSmrg ;; 14501a30de1fSmrg *-oki) 14511a30de1fSmrg os=-proelf 14521a30de1fSmrg ;; 14531a30de1fSmrg *-hp) 14541a30de1fSmrg os=-hpux 14551a30de1fSmrg ;; 14561a30de1fSmrg *-hitachi) 14571a30de1fSmrg os=-hiux 14581a30de1fSmrg ;; 14591a30de1fSmrg i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) 14601a30de1fSmrg os=-sysv 14611a30de1fSmrg ;; 14621a30de1fSmrg *-cbm) 14631a30de1fSmrg os=-amigaos 14641a30de1fSmrg ;; 14651a30de1fSmrg *-dg) 14661a30de1fSmrg os=-dgux 14671a30de1fSmrg ;; 14681a30de1fSmrg *-dolphin) 14691a30de1fSmrg os=-sysv3 14701a30de1fSmrg ;; 14711a30de1fSmrg m68k-ccur) 14721a30de1fSmrg os=-rtu 14731a30de1fSmrg ;; 14741a30de1fSmrg m88k-omron*) 14751a30de1fSmrg os=-luna 14761a30de1fSmrg ;; 14771a30de1fSmrg *-next ) 14781a30de1fSmrg os=-nextstep 14791a30de1fSmrg ;; 14801a30de1fSmrg *-sequent) 14811a30de1fSmrg os=-ptx 14821a30de1fSmrg ;; 14831a30de1fSmrg *-crds) 14841a30de1fSmrg os=-unos 14851a30de1fSmrg ;; 14861a30de1fSmrg *-ns) 14871a30de1fSmrg os=-genix 14881a30de1fSmrg ;; 14891a30de1fSmrg i370-*) 14901a30de1fSmrg os=-mvs 14911a30de1fSmrg ;; 14921a30de1fSmrg *-next) 14931a30de1fSmrg os=-nextstep3 14941a30de1fSmrg ;; 14951a30de1fSmrg *-gould) 14961a30de1fSmrg os=-sysv 14971a30de1fSmrg ;; 14981a30de1fSmrg *-highlevel) 14991a30de1fSmrg os=-bsd 15001a30de1fSmrg ;; 15011a30de1fSmrg *-encore) 15021a30de1fSmrg os=-bsd 15031a30de1fSmrg ;; 15041a30de1fSmrg *-sgi) 15051a30de1fSmrg os=-irix 15061a30de1fSmrg ;; 15071a30de1fSmrg *-siemens) 15081a30de1fSmrg os=-sysv4 15091a30de1fSmrg ;; 15101a30de1fSmrg *-masscomp) 15111a30de1fSmrg os=-rtu 15121a30de1fSmrg ;; 15131a30de1fSmrg f30[01]-fujitsu | f700-fujitsu) 15141a30de1fSmrg os=-uxpv 15151a30de1fSmrg ;; 15161a30de1fSmrg *-rom68k) 15171a30de1fSmrg os=-coff 15181a30de1fSmrg ;; 15191a30de1fSmrg *-*bug) 15201a30de1fSmrg os=-coff 15211a30de1fSmrg ;; 15221a30de1fSmrg *-apple) 15231a30de1fSmrg os=-macos 15241a30de1fSmrg ;; 15251a30de1fSmrg *-atari*) 15261a30de1fSmrg os=-mint 15271a30de1fSmrg ;; 15281a30de1fSmrg *) 15291a30de1fSmrg os=-none 15301a30de1fSmrg ;; 15311a30de1fSmrgesac 15321a30de1fSmrgfi 15331a30de1fSmrg 15341a30de1fSmrg# Here we handle the case where we know the os, and the CPU type, but not the 15351a30de1fSmrg# manufacturer. We pick the logical manufacturer. 15361a30de1fSmrgvendor=unknown 15371a30de1fSmrgcase $basic_machine in 15381a30de1fSmrg *-unknown) 15391a30de1fSmrg case $os in 15401a30de1fSmrg -riscix*) 15411a30de1fSmrg vendor=acorn 15421a30de1fSmrg ;; 15431a30de1fSmrg -sunos*) 15441a30de1fSmrg vendor=sun 15451a30de1fSmrg ;; 15461a30de1fSmrg -aix*) 15471a30de1fSmrg vendor=ibm 15481a30de1fSmrg ;; 15491a30de1fSmrg -beos*) 15501a30de1fSmrg vendor=be 15511a30de1fSmrg ;; 15521a30de1fSmrg -hpux*) 15531a30de1fSmrg vendor=hp 15541a30de1fSmrg ;; 15551a30de1fSmrg -mpeix*) 15561a30de1fSmrg vendor=hp 15571a30de1fSmrg ;; 15581a30de1fSmrg -hiux*) 15591a30de1fSmrg vendor=hitachi 15601a30de1fSmrg ;; 15611a30de1fSmrg -unos*) 15621a30de1fSmrg vendor=crds 15631a30de1fSmrg ;; 15641a30de1fSmrg -dgux*) 15651a30de1fSmrg vendor=dg 15661a30de1fSmrg ;; 15671a30de1fSmrg -luna*) 15681a30de1fSmrg vendor=omron 15691a30de1fSmrg ;; 15701a30de1fSmrg -genix*) 15711a30de1fSmrg vendor=ns 15721a30de1fSmrg ;; 15731a30de1fSmrg -mvs* | -opened*) 15741a30de1fSmrg vendor=ibm 15751a30de1fSmrg ;; 15761a30de1fSmrg -os400*) 15771a30de1fSmrg vendor=ibm 15781a30de1fSmrg ;; 15791a30de1fSmrg -ptx*) 15801a30de1fSmrg vendor=sequent 15811a30de1fSmrg ;; 15821a30de1fSmrg -tpf*) 15831a30de1fSmrg vendor=ibm 15841a30de1fSmrg ;; 15851a30de1fSmrg -vxsim* | -vxworks* | -windiss*) 15861a30de1fSmrg vendor=wrs 15871a30de1fSmrg ;; 15881a30de1fSmrg -aux*) 15891a30de1fSmrg vendor=apple 15901a30de1fSmrg ;; 15911a30de1fSmrg -hms*) 15921a30de1fSmrg vendor=hitachi 15931a30de1fSmrg ;; 15941a30de1fSmrg -mpw* | -macos*) 15951a30de1fSmrg vendor=apple 15961a30de1fSmrg ;; 15971a30de1fSmrg -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 15981a30de1fSmrg vendor=atari 15991a30de1fSmrg ;; 16001a30de1fSmrg -vos*) 16011a30de1fSmrg vendor=stratus 16021a30de1fSmrg ;; 16031a30de1fSmrg esac 16041a30de1fSmrg basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` 16051a30de1fSmrg ;; 16061a30de1fSmrgesac 16071a30de1fSmrg 16081a30de1fSmrgecho $basic_machine$os 16091a30de1fSmrgexit 16101a30de1fSmrg 16111a30de1fSmrg# Local variables: 16121a30de1fSmrg# eval: (add-hook 'write-file-hooks 'time-stamp) 16131a30de1fSmrg# time-stamp-start: "timestamp='" 16141a30de1fSmrg# time-stamp-format: "%:y-%02m-%02d" 16151a30de1fSmrg# time-stamp-end: "'" 16161a30de1fSmrg# End: 1617