michael@0: #! /bin/sh michael@0: # Configuration validation subroutine script. michael@0: # Copyright 1992-2013 Free Software Foundation, Inc. michael@0: michael@0: timestamp='2013-08-10' michael@0: michael@0: # This file is free software; you can redistribute it and/or modify it michael@0: # under the terms of the GNU General Public License as published by michael@0: # the Free Software Foundation; either version 3 of the License, or michael@0: # (at your option) any later version. michael@0: # michael@0: # This program is distributed in the hope that it will be useful, but michael@0: # WITHOUT ANY WARRANTY; without even the implied warranty of michael@0: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU michael@0: # General Public License for more details. michael@0: # michael@0: # You should have received a copy of the GNU General Public License michael@0: # along with this program; if not, see . michael@0: # michael@0: # As a special exception to the GNU General Public License, if you michael@0: # distribute this file as part of a program that contains a michael@0: # configuration script generated by Autoconf, you may include it under michael@0: # the same distribution terms that you use for the rest of that michael@0: # program. This Exception is an additional permission under section 7 michael@0: # of the GNU General Public License, version 3 ("GPLv3"). michael@0: michael@0: michael@0: # Please send patches with a ChangeLog entry to config-patches@gnu.org. michael@0: # michael@0: # Configuration subroutine to validate and canonicalize a configuration type. michael@0: # Supply the specified configuration type as an argument. michael@0: # If it is invalid, we print an error message on stderr and exit with code 1. michael@0: # Otherwise, we print the canonical config type on stdout and succeed. michael@0: michael@0: # You can get the latest version of this script from: michael@0: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD michael@0: michael@0: # This file is supposed to be the same for all GNU packages michael@0: # and recognize all the CPU types, system types and aliases michael@0: # that are meaningful with *any* GNU software. michael@0: # Each package is responsible for reporting which valid configurations michael@0: # it does not support. The user should be able to distinguish michael@0: # a failure to support a valid configuration from a meaningless michael@0: # configuration. michael@0: michael@0: # The goal of this file is to map all the various variations of a given michael@0: # machine specification into a single specification in the form: michael@0: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM michael@0: # or in some cases, the newer four-part form: michael@0: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM michael@0: # It is wrong to echo any other type of specification. michael@0: michael@0: me=`echo "$0" | sed -e 's,.*/,,'` michael@0: michael@0: usage="\ michael@0: Usage: $0 [OPTION] CPU-MFR-OPSYS michael@0: $0 [OPTION] ALIAS michael@0: michael@0: Canonicalize a configuration name. michael@0: michael@0: Operation modes: michael@0: -h, --help print this help, then exit michael@0: -t, --time-stamp print date of last modification, then exit michael@0: -v, --version print version number, then exit michael@0: michael@0: Report bugs and patches to ." michael@0: michael@0: version="\ michael@0: GNU config.sub ($timestamp) michael@0: michael@0: Copyright 1992-2013 Free Software Foundation, Inc. michael@0: michael@0: This is free software; see the source for copying conditions. There is NO michael@0: warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." michael@0: michael@0: help=" michael@0: Try \`$me --help' for more information." michael@0: michael@0: # Parse command line michael@0: while test $# -gt 0 ; do michael@0: case $1 in michael@0: --time-stamp | --time* | -t ) michael@0: echo "$timestamp" ; exit ;; michael@0: --version | -v ) michael@0: echo "$version" ; exit ;; michael@0: --help | --h* | -h ) michael@0: echo "$usage"; exit ;; michael@0: -- ) # Stop option processing michael@0: shift; break ;; michael@0: - ) # Use stdin as input. michael@0: break ;; michael@0: -* ) michael@0: echo "$me: invalid option $1$help" michael@0: exit 1 ;; michael@0: michael@0: *local*) michael@0: # First pass through any local machine types. michael@0: echo $1 michael@0: exit ;; michael@0: michael@0: * ) michael@0: break ;; michael@0: esac michael@0: done michael@0: michael@0: case $# in michael@0: 0) echo "$me: missing argument$help" >&2 michael@0: exit 1;; michael@0: 1) ;; michael@0: *) echo "$me: too many arguments$help" >&2 michael@0: exit 1;; michael@0: esac michael@0: michael@0: # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). michael@0: # Here we must recognize all the valid KERNEL-OS combinations. michael@0: maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` michael@0: case $maybe_os in michael@0: nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ michael@0: linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ michael@0: knetbsd*-gnu* | netbsd*-gnu* | \ michael@0: kopensolaris*-gnu* | \ michael@0: storm-chaos* | os2-emx* | rtmk-nova*) michael@0: os=-$maybe_os michael@0: basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` michael@0: ;; michael@0: android-linux) michael@0: os=-linux-android michael@0: basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown michael@0: ;; michael@0: *) michael@0: basic_machine=`echo $1 | sed 's/-[^-]*$//'` michael@0: if [ $basic_machine != $1 ] michael@0: then os=`echo $1 | sed 's/.*-/-/'` michael@0: else os=; fi michael@0: ;; michael@0: esac michael@0: michael@0: ### Let's recognize common machines as not being operating systems so michael@0: ### that things like config.sub decstation-3100 work. We also michael@0: ### recognize some manufacturers as not being operating systems, so we michael@0: ### can provide default operating systems below. michael@0: case $os in michael@0: -sun*os*) michael@0: # Prevent following clause from handling this invalid input. michael@0: ;; michael@0: -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ michael@0: -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ michael@0: -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ michael@0: -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ michael@0: -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ michael@0: -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ michael@0: -apple | -axis | -knuth | -cray | -microblaze*) michael@0: os= michael@0: basic_machine=$1 michael@0: ;; michael@0: -bluegene*) michael@0: os=-cnk michael@0: ;; michael@0: -sim | -cisco | -oki | -wec | -winbond) michael@0: os= michael@0: basic_machine=$1 michael@0: ;; michael@0: -scout) michael@0: ;; michael@0: -wrs) michael@0: os=-vxworks michael@0: basic_machine=$1 michael@0: ;; michael@0: -chorusos*) michael@0: os=-chorusos michael@0: basic_machine=$1 michael@0: ;; michael@0: -chorusrdb) michael@0: os=-chorusrdb michael@0: basic_machine=$1 michael@0: ;; michael@0: -hiux*) michael@0: os=-hiuxwe2 michael@0: ;; michael@0: -sco6) michael@0: os=-sco5v6 michael@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` michael@0: ;; michael@0: -sco5) michael@0: os=-sco3.2v5 michael@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` michael@0: ;; michael@0: -sco4) michael@0: os=-sco3.2v4 michael@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` michael@0: ;; michael@0: -sco3.2.[4-9]*) michael@0: os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` michael@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` michael@0: ;; michael@0: -sco3.2v[4-9]*) michael@0: # Don't forget version if it is 3.2v4 or newer. michael@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` michael@0: ;; michael@0: -sco5v6*) michael@0: # Don't forget version if it is 3.2v4 or newer. michael@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` michael@0: ;; michael@0: -sco*) michael@0: os=-sco3.2v2 michael@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` michael@0: ;; michael@0: -udk*) michael@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` michael@0: ;; michael@0: -isc) michael@0: os=-isc2.2 michael@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` michael@0: ;; michael@0: -clix*) michael@0: basic_machine=clipper-intergraph michael@0: ;; michael@0: -isc*) michael@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` michael@0: ;; michael@0: -lynx*178) michael@0: os=-lynxos178 michael@0: ;; michael@0: -lynx*5) michael@0: os=-lynxos5 michael@0: ;; michael@0: -lynx*) michael@0: os=-lynxos michael@0: ;; michael@0: -ptx*) michael@0: basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` michael@0: ;; michael@0: -windowsnt*) michael@0: os=`echo $os | sed -e 's/windowsnt/winnt/'` michael@0: ;; michael@0: -psos*) michael@0: os=-psos michael@0: ;; michael@0: -mint | -mint[0-9]*) michael@0: basic_machine=m68k-atari michael@0: os=-mint michael@0: ;; michael@0: esac michael@0: michael@0: # Decode aliases for certain CPU-COMPANY combinations. michael@0: case $basic_machine in michael@0: # Recognize the basic CPU types without company name. michael@0: # Some are omitted here because they have special meanings below. michael@0: 1750a | 580 \ michael@0: | a29k \ michael@0: | aarch64 | aarch64_be \ michael@0: | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ michael@0: | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ michael@0: | am33_2.0 \ michael@0: | arc | arceb \ michael@0: | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ michael@0: | avr | avr32 \ michael@0: | be32 | be64 \ michael@0: | bfin \ michael@0: | c4x | c8051 | clipper \ michael@0: | d10v | d30v | dlx | dsp16xx \ michael@0: | epiphany \ michael@0: | fido | fr30 | frv \ michael@0: | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ michael@0: | hexagon \ michael@0: | i370 | i860 | i960 | ia64 \ michael@0: | ip2k | iq2000 \ michael@0: | le32 | le64 \ michael@0: | lm32 \ michael@0: | m32c | m32r | m32rle | m68000 | m68k | m88k \ michael@0: | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ michael@0: | mips | mipsbe | mipseb | mipsel | mipsle \ michael@0: | mips16 \ michael@0: | mips64 | mips64el \ michael@0: | mips64octeon | mips64octeonel \ michael@0: | mips64orion | mips64orionel \ michael@0: | mips64r5900 | mips64r5900el \ michael@0: | mips64vr | mips64vrel \ michael@0: | mips64vr4100 | mips64vr4100el \ michael@0: | mips64vr4300 | mips64vr4300el \ michael@0: | mips64vr5000 | mips64vr5000el \ michael@0: | mips64vr5900 | mips64vr5900el \ michael@0: | mipsisa32 | mipsisa32el \ michael@0: | mipsisa32r2 | mipsisa32r2el \ michael@0: | mipsisa64 | mipsisa64el \ michael@0: | mipsisa64r2 | mipsisa64r2el \ michael@0: | mipsisa64sb1 | mipsisa64sb1el \ michael@0: | mipsisa64sr71k | mipsisa64sr71kel \ michael@0: | mipsr5900 | mipsr5900el \ michael@0: | mipstx39 | mipstx39el \ michael@0: | mn10200 | mn10300 \ michael@0: | moxie \ michael@0: | mt \ michael@0: | msp430 \ michael@0: | nds32 | nds32le | nds32be \ michael@0: | nios | nios2 | nios2eb | nios2el \ michael@0: | ns16k | ns32k \ michael@0: | open8 \ michael@0: | or1k | or32 \ michael@0: | pdp10 | pdp11 | pj | pjl \ michael@0: | powerpc | powerpc64 | powerpc64le | powerpcle \ michael@0: | pyramid \ michael@0: | rl78 | rx \ michael@0: | score \ michael@0: | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ michael@0: | sh64 | sh64le \ michael@0: | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ michael@0: | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ michael@0: | spu \ michael@0: | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ michael@0: | ubicom32 \ michael@0: | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ michael@0: | we32k \ michael@0: | x86 | xc16x | xstormy16 | xtensa \ michael@0: | z8k | z80) michael@0: basic_machine=$basic_machine-unknown michael@0: ;; michael@0: c54x) michael@0: basic_machine=tic54x-unknown michael@0: ;; michael@0: c55x) michael@0: basic_machine=tic55x-unknown michael@0: ;; michael@0: c6x) michael@0: basic_machine=tic6x-unknown michael@0: ;; michael@0: m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) michael@0: basic_machine=$basic_machine-unknown michael@0: os=-none michael@0: ;; michael@0: m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) michael@0: ;; michael@0: ms1) michael@0: basic_machine=mt-unknown michael@0: ;; michael@0: michael@0: strongarm | thumb | xscale) michael@0: basic_machine=arm-unknown michael@0: ;; michael@0: xgate) michael@0: basic_machine=$basic_machine-unknown michael@0: os=-none michael@0: ;; michael@0: xscaleeb) michael@0: basic_machine=armeb-unknown michael@0: ;; michael@0: michael@0: xscaleel) michael@0: basic_machine=armel-unknown michael@0: ;; michael@0: michael@0: # We use `pc' rather than `unknown' michael@0: # because (1) that's what they normally are, and michael@0: # (2) the word "unknown" tends to confuse beginning users. michael@0: i*86 | x86_64) michael@0: basic_machine=$basic_machine-pc michael@0: ;; michael@0: # Object if more than one company name word. michael@0: *-*-*) michael@0: echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 michael@0: exit 1 michael@0: ;; michael@0: # Recognize the basic CPU types with company name. michael@0: 580-* \ michael@0: | a29k-* \ michael@0: | aarch64-* | aarch64_be-* \ michael@0: | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ michael@0: | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ michael@0: | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ michael@0: | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ michael@0: | avr-* | avr32-* \ michael@0: | be32-* | be64-* \ michael@0: | bfin-* | bs2000-* \ michael@0: | c[123]* | c30-* | [cjt]90-* | c4x-* \ michael@0: | c8051-* | clipper-* | craynv-* | cydra-* \ michael@0: | d10v-* | d30v-* | dlx-* \ michael@0: | elxsi-* \ michael@0: | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ michael@0: | h8300-* | h8500-* \ michael@0: | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ michael@0: | hexagon-* \ michael@0: | i*86-* | i860-* | i960-* | ia64-* \ michael@0: | ip2k-* | iq2000-* \ michael@0: | le32-* | le64-* \ michael@0: | lm32-* \ michael@0: | m32c-* | m32r-* | m32rle-* \ michael@0: | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ michael@0: | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ michael@0: | microblaze-* | microblazeel-* \ michael@0: | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ michael@0: | mips16-* \ michael@0: | mips64-* | mips64el-* \ michael@0: | mips64octeon-* | mips64octeonel-* \ michael@0: | mips64orion-* | mips64orionel-* \ michael@0: | mips64r5900-* | mips64r5900el-* \ michael@0: | mips64vr-* | mips64vrel-* \ michael@0: | mips64vr4100-* | mips64vr4100el-* \ michael@0: | mips64vr4300-* | mips64vr4300el-* \ michael@0: | mips64vr5000-* | mips64vr5000el-* \ michael@0: | mips64vr5900-* | mips64vr5900el-* \ michael@0: | mipsisa32-* | mipsisa32el-* \ michael@0: | mipsisa32r2-* | mipsisa32r2el-* \ michael@0: | mipsisa64-* | mipsisa64el-* \ michael@0: | mipsisa64r2-* | mipsisa64r2el-* \ michael@0: | mipsisa64sb1-* | mipsisa64sb1el-* \ michael@0: | mipsisa64sr71k-* | mipsisa64sr71kel-* \ michael@0: | mipsr5900-* | mipsr5900el-* \ michael@0: | mipstx39-* | mipstx39el-* \ michael@0: | mmix-* \ michael@0: | mt-* \ michael@0: | msp430-* \ michael@0: | nds32-* | nds32le-* | nds32be-* \ michael@0: | nios-* | nios2-* | nios2eb-* | nios2el-* \ michael@0: | none-* | np1-* | ns16k-* | ns32k-* \ michael@0: | open8-* \ michael@0: | orion-* \ michael@0: | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ michael@0: | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ michael@0: | pyramid-* \ michael@0: | rl78-* | romp-* | rs6000-* | rx-* \ michael@0: | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ michael@0: | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ michael@0: | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ michael@0: | sparclite-* \ michael@0: | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ michael@0: | tahoe-* \ michael@0: | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ michael@0: | tile*-* \ michael@0: | tron-* \ michael@0: | ubicom32-* \ michael@0: | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ michael@0: | vax-* \ michael@0: | we32k-* \ michael@0: | x86-* | x86_64-* | xc16x-* | xps100-* \ michael@0: | xstormy16-* | xtensa*-* \ michael@0: | ymp-* \ michael@0: | z8k-* | z80-*) michael@0: ;; michael@0: # Recognize the basic CPU types without company name, with glob match. michael@0: xtensa*) michael@0: basic_machine=$basic_machine-unknown michael@0: ;; michael@0: # Recognize the various machine names and aliases which stand michael@0: # for a CPU type and a company and sometimes even an OS. michael@0: 386bsd) michael@0: basic_machine=i386-unknown michael@0: os=-bsd michael@0: ;; michael@0: 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) michael@0: basic_machine=m68000-att michael@0: ;; michael@0: 3b*) michael@0: basic_machine=we32k-att michael@0: ;; michael@0: a29khif) michael@0: basic_machine=a29k-amd michael@0: os=-udi michael@0: ;; michael@0: abacus) michael@0: basic_machine=abacus-unknown michael@0: ;; michael@0: adobe68k) michael@0: basic_machine=m68010-adobe michael@0: os=-scout michael@0: ;; michael@0: alliant | fx80) michael@0: basic_machine=fx80-alliant michael@0: ;; michael@0: altos | altos3068) michael@0: basic_machine=m68k-altos michael@0: ;; michael@0: am29k) michael@0: basic_machine=a29k-none michael@0: os=-bsd michael@0: ;; michael@0: amd64) michael@0: basic_machine=x86_64-pc michael@0: ;; michael@0: amd64-*) michael@0: basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: ;; michael@0: amdahl) michael@0: basic_machine=580-amdahl michael@0: os=-sysv michael@0: ;; michael@0: amiga | amiga-*) michael@0: basic_machine=m68k-unknown michael@0: ;; michael@0: amigaos | amigados) michael@0: basic_machine=m68k-unknown michael@0: os=-amigaos michael@0: ;; michael@0: amigaunix | amix) michael@0: basic_machine=m68k-unknown michael@0: os=-sysv4 michael@0: ;; michael@0: apollo68) michael@0: basic_machine=m68k-apollo michael@0: os=-sysv michael@0: ;; michael@0: apollo68bsd) michael@0: basic_machine=m68k-apollo michael@0: os=-bsd michael@0: ;; michael@0: aros) michael@0: basic_machine=i386-pc michael@0: os=-aros michael@0: ;; michael@0: aux) michael@0: basic_machine=m68k-apple michael@0: os=-aux michael@0: ;; michael@0: balance) michael@0: basic_machine=ns32k-sequent michael@0: os=-dynix michael@0: ;; michael@0: blackfin) michael@0: basic_machine=bfin-unknown michael@0: os=-linux michael@0: ;; michael@0: blackfin-*) michael@0: basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: os=-linux michael@0: ;; michael@0: bluegene*) michael@0: basic_machine=powerpc-ibm michael@0: os=-cnk michael@0: ;; michael@0: c54x-*) michael@0: basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: ;; michael@0: c55x-*) michael@0: basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: ;; michael@0: c6x-*) michael@0: basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: ;; michael@0: c90) michael@0: basic_machine=c90-cray michael@0: os=-unicos michael@0: ;; michael@0: cegcc) michael@0: basic_machine=arm-unknown michael@0: os=-cegcc michael@0: ;; michael@0: convex-c1) michael@0: basic_machine=c1-convex michael@0: os=-bsd michael@0: ;; michael@0: convex-c2) michael@0: basic_machine=c2-convex michael@0: os=-bsd michael@0: ;; michael@0: convex-c32) michael@0: basic_machine=c32-convex michael@0: os=-bsd michael@0: ;; michael@0: convex-c34) michael@0: basic_machine=c34-convex michael@0: os=-bsd michael@0: ;; michael@0: convex-c38) michael@0: basic_machine=c38-convex michael@0: os=-bsd michael@0: ;; michael@0: cray | j90) michael@0: basic_machine=j90-cray michael@0: os=-unicos michael@0: ;; michael@0: craynv) michael@0: basic_machine=craynv-cray michael@0: os=-unicosmp michael@0: ;; michael@0: cr16 | cr16-*) michael@0: basic_machine=cr16-unknown michael@0: os=-elf michael@0: ;; michael@0: crds | unos) michael@0: basic_machine=m68k-crds michael@0: ;; michael@0: crisv32 | crisv32-* | etraxfs*) michael@0: basic_machine=crisv32-axis michael@0: ;; michael@0: cris | cris-* | etrax*) michael@0: basic_machine=cris-axis michael@0: ;; michael@0: crx) michael@0: basic_machine=crx-unknown michael@0: os=-elf michael@0: ;; michael@0: da30 | da30-*) michael@0: basic_machine=m68k-da30 michael@0: ;; michael@0: decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) michael@0: basic_machine=mips-dec michael@0: ;; michael@0: decsystem10* | dec10*) michael@0: basic_machine=pdp10-dec michael@0: os=-tops10 michael@0: ;; michael@0: decsystem20* | dec20*) michael@0: basic_machine=pdp10-dec michael@0: os=-tops20 michael@0: ;; michael@0: delta | 3300 | motorola-3300 | motorola-delta \ michael@0: | 3300-motorola | delta-motorola) michael@0: basic_machine=m68k-motorola michael@0: ;; michael@0: delta88) michael@0: basic_machine=m88k-motorola michael@0: os=-sysv3 michael@0: ;; michael@0: dicos) michael@0: basic_machine=i686-pc michael@0: os=-dicos michael@0: ;; michael@0: djgpp) michael@0: basic_machine=i586-pc michael@0: os=-msdosdjgpp michael@0: ;; michael@0: dpx20 | dpx20-*) michael@0: basic_machine=rs6000-bull michael@0: os=-bosx michael@0: ;; michael@0: dpx2* | dpx2*-bull) michael@0: basic_machine=m68k-bull michael@0: os=-sysv3 michael@0: ;; michael@0: ebmon29k) michael@0: basic_machine=a29k-amd michael@0: os=-ebmon michael@0: ;; michael@0: elxsi) michael@0: basic_machine=elxsi-elxsi michael@0: os=-bsd michael@0: ;; michael@0: encore | umax | mmax) michael@0: basic_machine=ns32k-encore michael@0: ;; michael@0: es1800 | OSE68k | ose68k | ose | OSE) michael@0: basic_machine=m68k-ericsson michael@0: os=-ose michael@0: ;; michael@0: fx2800) michael@0: basic_machine=i860-alliant michael@0: ;; michael@0: genix) michael@0: basic_machine=ns32k-ns michael@0: ;; michael@0: gmicro) michael@0: basic_machine=tron-gmicro michael@0: os=-sysv michael@0: ;; michael@0: go32) michael@0: basic_machine=i386-pc michael@0: os=-go32 michael@0: ;; michael@0: h3050r* | hiux*) michael@0: basic_machine=hppa1.1-hitachi michael@0: os=-hiuxwe2 michael@0: ;; michael@0: h8300hms) michael@0: basic_machine=h8300-hitachi michael@0: os=-hms michael@0: ;; michael@0: h8300xray) michael@0: basic_machine=h8300-hitachi michael@0: os=-xray michael@0: ;; michael@0: h8500hms) michael@0: basic_machine=h8500-hitachi michael@0: os=-hms michael@0: ;; michael@0: harris) michael@0: basic_machine=m88k-harris michael@0: os=-sysv3 michael@0: ;; michael@0: hp300-*) michael@0: basic_machine=m68k-hp michael@0: ;; michael@0: hp300bsd) michael@0: basic_machine=m68k-hp michael@0: os=-bsd michael@0: ;; michael@0: hp300hpux) michael@0: basic_machine=m68k-hp michael@0: os=-hpux michael@0: ;; michael@0: hp3k9[0-9][0-9] | hp9[0-9][0-9]) michael@0: basic_machine=hppa1.0-hp michael@0: ;; michael@0: hp9k2[0-9][0-9] | hp9k31[0-9]) michael@0: basic_machine=m68000-hp michael@0: ;; michael@0: hp9k3[2-9][0-9]) michael@0: basic_machine=m68k-hp michael@0: ;; michael@0: hp9k6[0-9][0-9] | hp6[0-9][0-9]) michael@0: basic_machine=hppa1.0-hp michael@0: ;; michael@0: hp9k7[0-79][0-9] | hp7[0-79][0-9]) michael@0: basic_machine=hppa1.1-hp michael@0: ;; michael@0: hp9k78[0-9] | hp78[0-9]) michael@0: # FIXME: really hppa2.0-hp michael@0: basic_machine=hppa1.1-hp michael@0: ;; michael@0: hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) michael@0: # FIXME: really hppa2.0-hp michael@0: basic_machine=hppa1.1-hp michael@0: ;; michael@0: hp9k8[0-9][13679] | hp8[0-9][13679]) michael@0: basic_machine=hppa1.1-hp michael@0: ;; michael@0: hp9k8[0-9][0-9] | hp8[0-9][0-9]) michael@0: basic_machine=hppa1.0-hp michael@0: ;; michael@0: hppa-next) michael@0: os=-nextstep3 michael@0: ;; michael@0: hppaosf) michael@0: basic_machine=hppa1.1-hp michael@0: os=-osf michael@0: ;; michael@0: hppro) michael@0: basic_machine=hppa1.1-hp michael@0: os=-proelf michael@0: ;; michael@0: i370-ibm* | ibm*) michael@0: basic_machine=i370-ibm michael@0: ;; michael@0: i*86v32) michael@0: basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` michael@0: os=-sysv32 michael@0: ;; michael@0: i*86v4*) michael@0: basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` michael@0: os=-sysv4 michael@0: ;; michael@0: i*86v) michael@0: basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` michael@0: os=-sysv michael@0: ;; michael@0: i*86sol2) michael@0: basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` michael@0: os=-solaris2 michael@0: ;; michael@0: i386mach) michael@0: basic_machine=i386-mach michael@0: os=-mach michael@0: ;; michael@0: i386-vsta | vsta) michael@0: basic_machine=i386-unknown michael@0: os=-vsta michael@0: ;; michael@0: iris | iris4d) michael@0: basic_machine=mips-sgi michael@0: case $os in michael@0: -irix*) michael@0: ;; michael@0: *) michael@0: os=-irix4 michael@0: ;; michael@0: esac michael@0: ;; michael@0: isi68 | isi) michael@0: basic_machine=m68k-isi michael@0: os=-sysv michael@0: ;; michael@0: m68knommu) michael@0: basic_machine=m68k-unknown michael@0: os=-linux michael@0: ;; michael@0: m68knommu-*) michael@0: basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: os=-linux michael@0: ;; michael@0: m88k-omron*) michael@0: basic_machine=m88k-omron michael@0: ;; michael@0: magnum | m3230) michael@0: basic_machine=mips-mips michael@0: os=-sysv michael@0: ;; michael@0: merlin) michael@0: basic_machine=ns32k-utek michael@0: os=-sysv michael@0: ;; michael@0: microblaze*) michael@0: basic_machine=microblaze-xilinx michael@0: ;; michael@0: mingw64) michael@0: basic_machine=x86_64-pc michael@0: os=-mingw64 michael@0: ;; michael@0: mingw32) michael@0: basic_machine=i686-pc michael@0: os=-mingw32 michael@0: ;; michael@0: mingw32ce) michael@0: basic_machine=arm-unknown michael@0: os=-mingw32ce michael@0: ;; michael@0: miniframe) michael@0: basic_machine=m68000-convergent michael@0: ;; michael@0: *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) michael@0: basic_machine=m68k-atari michael@0: os=-mint michael@0: ;; michael@0: mips3*-*) michael@0: basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` michael@0: ;; michael@0: mips3*) michael@0: basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown michael@0: ;; michael@0: monitor) michael@0: basic_machine=m68k-rom68k michael@0: os=-coff michael@0: ;; michael@0: morphos) michael@0: basic_machine=powerpc-unknown michael@0: os=-morphos michael@0: ;; michael@0: msdos) michael@0: basic_machine=i386-pc michael@0: os=-msdos michael@0: ;; michael@0: ms1-*) michael@0: basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` michael@0: ;; michael@0: msys) michael@0: basic_machine=i686-pc michael@0: os=-msys michael@0: ;; michael@0: mvs) michael@0: basic_machine=i370-ibm michael@0: os=-mvs michael@0: ;; michael@0: nacl) michael@0: basic_machine=le32-unknown michael@0: os=-nacl michael@0: ;; michael@0: ncr3000) michael@0: basic_machine=i486-ncr michael@0: os=-sysv4 michael@0: ;; michael@0: netbsd386) michael@0: basic_machine=i386-unknown michael@0: os=-netbsd michael@0: ;; michael@0: netwinder) michael@0: basic_machine=armv4l-rebel michael@0: os=-linux michael@0: ;; michael@0: news | news700 | news800 | news900) michael@0: basic_machine=m68k-sony michael@0: os=-newsos michael@0: ;; michael@0: news1000) michael@0: basic_machine=m68030-sony michael@0: os=-newsos michael@0: ;; michael@0: news-3600 | risc-news) michael@0: basic_machine=mips-sony michael@0: os=-newsos michael@0: ;; michael@0: necv70) michael@0: basic_machine=v70-nec michael@0: os=-sysv michael@0: ;; michael@0: next | m*-next ) michael@0: basic_machine=m68k-next michael@0: case $os in michael@0: -nextstep* ) michael@0: ;; michael@0: -ns2*) michael@0: os=-nextstep2 michael@0: ;; michael@0: *) michael@0: os=-nextstep3 michael@0: ;; michael@0: esac michael@0: ;; michael@0: nh3000) michael@0: basic_machine=m68k-harris michael@0: os=-cxux michael@0: ;; michael@0: nh[45]000) michael@0: basic_machine=m88k-harris michael@0: os=-cxux michael@0: ;; michael@0: nindy960) michael@0: basic_machine=i960-intel michael@0: os=-nindy michael@0: ;; michael@0: mon960) michael@0: basic_machine=i960-intel michael@0: os=-mon960 michael@0: ;; michael@0: nonstopux) michael@0: basic_machine=mips-compaq michael@0: os=-nonstopux michael@0: ;; michael@0: np1) michael@0: basic_machine=np1-gould michael@0: ;; michael@0: neo-tandem) michael@0: basic_machine=neo-tandem michael@0: ;; michael@0: nse-tandem) michael@0: basic_machine=nse-tandem michael@0: ;; michael@0: nsr-tandem) michael@0: basic_machine=nsr-tandem michael@0: ;; michael@0: op50n-* | op60c-*) michael@0: basic_machine=hppa1.1-oki michael@0: os=-proelf michael@0: ;; michael@0: openrisc | openrisc-*) michael@0: basic_machine=or32-unknown michael@0: ;; michael@0: os400) michael@0: basic_machine=powerpc-ibm michael@0: os=-os400 michael@0: ;; michael@0: OSE68000 | ose68000) michael@0: basic_machine=m68000-ericsson michael@0: os=-ose michael@0: ;; michael@0: os68k) michael@0: basic_machine=m68k-none michael@0: os=-os68k michael@0: ;; michael@0: pa-hitachi) michael@0: basic_machine=hppa1.1-hitachi michael@0: os=-hiuxwe2 michael@0: ;; michael@0: paragon) michael@0: basic_machine=i860-intel michael@0: os=-osf michael@0: ;; michael@0: parisc) michael@0: basic_machine=hppa-unknown michael@0: os=-linux michael@0: ;; michael@0: parisc-*) michael@0: basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: os=-linux michael@0: ;; michael@0: pbd) michael@0: basic_machine=sparc-tti michael@0: ;; michael@0: pbb) michael@0: basic_machine=m68k-tti michael@0: ;; michael@0: pc532 | pc532-*) michael@0: basic_machine=ns32k-pc532 michael@0: ;; michael@0: pc98) michael@0: basic_machine=i386-pc michael@0: ;; michael@0: pc98-*) michael@0: basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: ;; michael@0: pentium | p5 | k5 | k6 | nexgen | viac3) michael@0: basic_machine=i586-pc michael@0: ;; michael@0: pentiumpro | p6 | 6x86 | athlon | athlon_*) michael@0: basic_machine=i686-pc michael@0: ;; michael@0: pentiumii | pentium2 | pentiumiii | pentium3) michael@0: basic_machine=i686-pc michael@0: ;; michael@0: pentium4) michael@0: basic_machine=i786-pc michael@0: ;; michael@0: pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) michael@0: basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: ;; michael@0: pentiumpro-* | p6-* | 6x86-* | athlon-*) michael@0: basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: ;; michael@0: pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) michael@0: basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: ;; michael@0: pentium4-*) michael@0: basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: ;; michael@0: pn) michael@0: basic_machine=pn-gould michael@0: ;; michael@0: power) basic_machine=power-ibm michael@0: ;; michael@0: ppc | ppcbe) basic_machine=powerpc-unknown michael@0: ;; michael@0: ppc-* | ppcbe-*) michael@0: basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: ;; michael@0: ppcle | powerpclittle | ppc-le | powerpc-little) michael@0: basic_machine=powerpcle-unknown michael@0: ;; michael@0: ppcle-* | powerpclittle-*) michael@0: basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: ;; michael@0: ppc64) basic_machine=powerpc64-unknown michael@0: ;; michael@0: ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: ;; michael@0: ppc64le | powerpc64little | ppc64-le | powerpc64-little) michael@0: basic_machine=powerpc64le-unknown michael@0: ;; michael@0: ppc64le-* | powerpc64little-*) michael@0: basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: ;; michael@0: ps2) michael@0: basic_machine=i386-ibm michael@0: ;; michael@0: pw32) michael@0: basic_machine=i586-unknown michael@0: os=-pw32 michael@0: ;; michael@0: rdos | rdos64) michael@0: basic_machine=x86_64-pc michael@0: os=-rdos michael@0: ;; michael@0: rdos32) michael@0: basic_machine=i386-pc michael@0: os=-rdos michael@0: ;; michael@0: rom68k) michael@0: basic_machine=m68k-rom68k michael@0: os=-coff michael@0: ;; michael@0: rm[46]00) michael@0: basic_machine=mips-siemens michael@0: ;; michael@0: rtpc | rtpc-*) michael@0: basic_machine=romp-ibm michael@0: ;; michael@0: s390 | s390-*) michael@0: basic_machine=s390-ibm michael@0: ;; michael@0: s390x | s390x-*) michael@0: basic_machine=s390x-ibm michael@0: ;; michael@0: sa29200) michael@0: basic_machine=a29k-amd michael@0: os=-udi michael@0: ;; michael@0: sb1) michael@0: basic_machine=mipsisa64sb1-unknown michael@0: ;; michael@0: sb1el) michael@0: basic_machine=mipsisa64sb1el-unknown michael@0: ;; michael@0: sde) michael@0: basic_machine=mipsisa32-sde michael@0: os=-elf michael@0: ;; michael@0: sei) michael@0: basic_machine=mips-sei michael@0: os=-seiux michael@0: ;; michael@0: sequent) michael@0: basic_machine=i386-sequent michael@0: ;; michael@0: sh) michael@0: basic_machine=sh-hitachi michael@0: os=-hms michael@0: ;; michael@0: sh5el) michael@0: basic_machine=sh5le-unknown michael@0: ;; michael@0: sh64) michael@0: basic_machine=sh64-unknown michael@0: ;; michael@0: sparclite-wrs | simso-wrs) michael@0: basic_machine=sparclite-wrs michael@0: os=-vxworks michael@0: ;; michael@0: sps7) michael@0: basic_machine=m68k-bull michael@0: os=-sysv2 michael@0: ;; michael@0: spur) michael@0: basic_machine=spur-unknown michael@0: ;; michael@0: st2000) michael@0: basic_machine=m68k-tandem michael@0: ;; michael@0: stratus) michael@0: basic_machine=i860-stratus michael@0: os=-sysv4 michael@0: ;; michael@0: strongarm-* | thumb-*) michael@0: basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` michael@0: ;; michael@0: sun2) michael@0: basic_machine=m68000-sun michael@0: ;; michael@0: sun2os3) michael@0: basic_machine=m68000-sun michael@0: os=-sunos3 michael@0: ;; michael@0: sun2os4) michael@0: basic_machine=m68000-sun michael@0: os=-sunos4 michael@0: ;; michael@0: sun3os3) michael@0: basic_machine=m68k-sun michael@0: os=-sunos3 michael@0: ;; michael@0: sun3os4) michael@0: basic_machine=m68k-sun michael@0: os=-sunos4 michael@0: ;; michael@0: sun4os3) michael@0: basic_machine=sparc-sun michael@0: os=-sunos3 michael@0: ;; michael@0: sun4os4) michael@0: basic_machine=sparc-sun michael@0: os=-sunos4 michael@0: ;; michael@0: sun4sol2) michael@0: basic_machine=sparc-sun michael@0: os=-solaris2 michael@0: ;; michael@0: sun3 | sun3-*) michael@0: basic_machine=m68k-sun michael@0: ;; michael@0: sun4) michael@0: basic_machine=sparc-sun michael@0: ;; michael@0: sun386 | sun386i | roadrunner) michael@0: basic_machine=i386-sun michael@0: ;; michael@0: sv1) michael@0: basic_machine=sv1-cray michael@0: os=-unicos michael@0: ;; michael@0: symmetry) michael@0: basic_machine=i386-sequent michael@0: os=-dynix michael@0: ;; michael@0: t3e) michael@0: basic_machine=alphaev5-cray michael@0: os=-unicos michael@0: ;; michael@0: t90) michael@0: basic_machine=t90-cray michael@0: os=-unicos michael@0: ;; michael@0: tile*) michael@0: basic_machine=$basic_machine-unknown michael@0: os=-linux-gnu michael@0: ;; michael@0: tx39) michael@0: basic_machine=mipstx39-unknown michael@0: ;; michael@0: tx39el) michael@0: basic_machine=mipstx39el-unknown michael@0: ;; michael@0: toad1) michael@0: basic_machine=pdp10-xkl michael@0: os=-tops20 michael@0: ;; michael@0: tower | tower-32) michael@0: basic_machine=m68k-ncr michael@0: ;; michael@0: tpf) michael@0: basic_machine=s390x-ibm michael@0: os=-tpf michael@0: ;; michael@0: udi29k) michael@0: basic_machine=a29k-amd michael@0: os=-udi michael@0: ;; michael@0: ultra3) michael@0: basic_machine=a29k-nyu michael@0: os=-sym1 michael@0: ;; michael@0: v810 | necv810) michael@0: basic_machine=v810-nec michael@0: os=-none michael@0: ;; michael@0: vaxv) michael@0: basic_machine=vax-dec michael@0: os=-sysv michael@0: ;; michael@0: vms) michael@0: basic_machine=vax-dec michael@0: os=-vms michael@0: ;; michael@0: vpp*|vx|vx-*) michael@0: basic_machine=f301-fujitsu michael@0: ;; michael@0: vxworks960) michael@0: basic_machine=i960-wrs michael@0: os=-vxworks michael@0: ;; michael@0: vxworks68) michael@0: basic_machine=m68k-wrs michael@0: os=-vxworks michael@0: ;; michael@0: vxworks29k) michael@0: basic_machine=a29k-wrs michael@0: os=-vxworks michael@0: ;; michael@0: w65*) michael@0: basic_machine=w65-wdc michael@0: os=-none michael@0: ;; michael@0: w89k-*) michael@0: basic_machine=hppa1.1-winbond michael@0: os=-proelf michael@0: ;; michael@0: xbox) michael@0: basic_machine=i686-pc michael@0: os=-mingw32 michael@0: ;; michael@0: xps | xps100) michael@0: basic_machine=xps100-honeywell michael@0: ;; michael@0: xscale-* | xscalee[bl]-*) michael@0: basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` michael@0: ;; michael@0: ymp) michael@0: basic_machine=ymp-cray michael@0: os=-unicos michael@0: ;; michael@0: z8k-*-coff) michael@0: basic_machine=z8k-unknown michael@0: os=-sim michael@0: ;; michael@0: z80-*-coff) michael@0: basic_machine=z80-unknown michael@0: os=-sim michael@0: ;; michael@0: none) michael@0: basic_machine=none-none michael@0: os=-none michael@0: ;; michael@0: michael@0: # Here we handle the default manufacturer of certain CPU types. It is in michael@0: # some cases the only manufacturer, in others, it is the most popular. michael@0: w89k) michael@0: basic_machine=hppa1.1-winbond michael@0: ;; michael@0: op50n) michael@0: basic_machine=hppa1.1-oki michael@0: ;; michael@0: op60c) michael@0: basic_machine=hppa1.1-oki michael@0: ;; michael@0: romp) michael@0: basic_machine=romp-ibm michael@0: ;; michael@0: mmix) michael@0: basic_machine=mmix-knuth michael@0: ;; michael@0: rs6000) michael@0: basic_machine=rs6000-ibm michael@0: ;; michael@0: vax) michael@0: basic_machine=vax-dec michael@0: ;; michael@0: pdp10) michael@0: # there are many clones, so DEC is not a safe bet michael@0: basic_machine=pdp10-unknown michael@0: ;; michael@0: pdp11) michael@0: basic_machine=pdp11-dec michael@0: ;; michael@0: we32k) michael@0: basic_machine=we32k-att michael@0: ;; michael@0: sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) michael@0: basic_machine=sh-unknown michael@0: ;; michael@0: sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) michael@0: basic_machine=sparc-sun michael@0: ;; michael@0: cydra) michael@0: basic_machine=cydra-cydrome michael@0: ;; michael@0: orion) michael@0: basic_machine=orion-highlevel michael@0: ;; michael@0: orion105) michael@0: basic_machine=clipper-highlevel michael@0: ;; michael@0: mac | mpw | mac-mpw) michael@0: basic_machine=m68k-apple michael@0: ;; michael@0: pmac | pmac-mpw) michael@0: basic_machine=powerpc-apple michael@0: ;; michael@0: *-unknown) michael@0: # Make sure to match an already-canonicalized machine name. michael@0: ;; michael@0: *) michael@0: echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 michael@0: exit 1 michael@0: ;; michael@0: esac michael@0: michael@0: # Here we canonicalize certain aliases for manufacturers. michael@0: case $basic_machine in michael@0: *-digital*) michael@0: basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` michael@0: ;; michael@0: *-commodore*) michael@0: basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` michael@0: ;; michael@0: *) michael@0: ;; michael@0: esac michael@0: michael@0: # Decode manufacturer-specific aliases for certain operating systems. michael@0: michael@0: if [ x"$os" != x"" ] michael@0: then michael@0: case $os in michael@0: # First match some system type aliases michael@0: # that might get confused with valid system types. michael@0: # -solaris* is a basic system type, with this one exception. michael@0: -auroraux) michael@0: os=-auroraux michael@0: ;; michael@0: -solaris1 | -solaris1.*) michael@0: os=`echo $os | sed -e 's|solaris1|sunos4|'` michael@0: ;; michael@0: -solaris) michael@0: os=-solaris2 michael@0: ;; michael@0: -svr4*) michael@0: os=-sysv4 michael@0: ;; michael@0: -unixware*) michael@0: os=-sysv4.2uw michael@0: ;; michael@0: -gnu/linux*) michael@0: os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` michael@0: ;; michael@0: # First accept the basic system types. michael@0: # The portable systems comes first. michael@0: # Each alternative MUST END IN A *, to match a version number. michael@0: # -sysv* is not here because it comes later, after sysvr4. michael@0: -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ michael@0: | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ michael@0: | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ michael@0: | -sym* | -kopensolaris* | -plan9* \ michael@0: | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ michael@0: | -aos* | -aros* \ michael@0: | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ michael@0: | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ michael@0: | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ michael@0: | -bitrig* | -openbsd* | -solidbsd* \ michael@0: | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ michael@0: | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ michael@0: | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ michael@0: | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ michael@0: | -chorusos* | -chorusrdb* | -cegcc* \ michael@0: | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ michael@0: | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ michael@0: | -linux-newlib* | -linux-musl* | -linux-uclibc* \ michael@0: | -uxpv* | -beos* | -mpeix* | -udk* \ michael@0: | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ michael@0: | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ michael@0: | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ michael@0: | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ michael@0: | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ michael@0: | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ michael@0: | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) michael@0: # Remember, each alternative MUST END IN *, to match a version number. michael@0: ;; michael@0: -qnx*) michael@0: case $basic_machine in michael@0: x86-* | i*86-*) michael@0: ;; michael@0: *) michael@0: os=-nto$os michael@0: ;; michael@0: esac michael@0: ;; michael@0: -nto-qnx*) michael@0: ;; michael@0: -nto*) michael@0: os=`echo $os | sed -e 's|nto|nto-qnx|'` michael@0: ;; michael@0: -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ michael@0: | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ michael@0: | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) michael@0: ;; michael@0: -mac*) michael@0: os=`echo $os | sed -e 's|mac|macos|'` michael@0: ;; michael@0: -linux-dietlibc) michael@0: os=-linux-dietlibc michael@0: ;; michael@0: -linux*) michael@0: os=`echo $os | sed -e 's|linux|linux-gnu|'` michael@0: ;; michael@0: -sunos5*) michael@0: os=`echo $os | sed -e 's|sunos5|solaris2|'` michael@0: ;; michael@0: -sunos6*) michael@0: os=`echo $os | sed -e 's|sunos6|solaris3|'` michael@0: ;; michael@0: -opened*) michael@0: os=-openedition michael@0: ;; michael@0: -os400*) michael@0: os=-os400 michael@0: ;; michael@0: -wince*) michael@0: os=-wince michael@0: ;; michael@0: -osfrose*) michael@0: os=-osfrose michael@0: ;; michael@0: -osf*) michael@0: os=-osf michael@0: ;; michael@0: -utek*) michael@0: os=-bsd michael@0: ;; michael@0: -dynix*) michael@0: os=-bsd michael@0: ;; michael@0: -acis*) michael@0: os=-aos michael@0: ;; michael@0: -atheos*) michael@0: os=-atheos michael@0: ;; michael@0: -syllable*) michael@0: os=-syllable michael@0: ;; michael@0: -386bsd) michael@0: os=-bsd michael@0: ;; michael@0: -ctix* | -uts*) michael@0: os=-sysv michael@0: ;; michael@0: -nova*) michael@0: os=-rtmk-nova michael@0: ;; michael@0: -ns2 ) michael@0: os=-nextstep2 michael@0: ;; michael@0: -nsk*) michael@0: os=-nsk michael@0: ;; michael@0: # Preserve the version number of sinix5. michael@0: -sinix5.*) michael@0: os=`echo $os | sed -e 's|sinix|sysv|'` michael@0: ;; michael@0: -sinix*) michael@0: os=-sysv4 michael@0: ;; michael@0: -tpf*) michael@0: os=-tpf michael@0: ;; michael@0: -triton*) michael@0: os=-sysv3 michael@0: ;; michael@0: -oss*) michael@0: os=-sysv3 michael@0: ;; michael@0: -svr4) michael@0: os=-sysv4 michael@0: ;; michael@0: -svr3) michael@0: os=-sysv3 michael@0: ;; michael@0: -sysvr4) michael@0: os=-sysv4 michael@0: ;; michael@0: # This must come after -sysvr4. michael@0: -sysv*) michael@0: ;; michael@0: -ose*) michael@0: os=-ose michael@0: ;; michael@0: -es1800*) michael@0: os=-ose michael@0: ;; michael@0: -xenix) michael@0: os=-xenix michael@0: ;; michael@0: -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) michael@0: os=-mint michael@0: ;; michael@0: -aros*) michael@0: os=-aros michael@0: ;; michael@0: -zvmoe) michael@0: os=-zvmoe michael@0: ;; michael@0: -dicos*) michael@0: os=-dicos michael@0: ;; michael@0: -nacl*) michael@0: ;; michael@0: -none) michael@0: ;; michael@0: *) michael@0: # Get rid of the `-' at the beginning of $os. michael@0: os=`echo $os | sed 's/[^-]*-//'` michael@0: echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 michael@0: exit 1 michael@0: ;; michael@0: esac michael@0: else michael@0: michael@0: # Here we handle the default operating systems that come with various machines. michael@0: # The value should be what the vendor currently ships out the door with their michael@0: # machine or put another way, the most popular os provided with the machine. michael@0: michael@0: # Note that if you're going to try to match "-MANUFACTURER" here (say, michael@0: # "-sun"), then you have to tell the case statement up towards the top michael@0: # that MANUFACTURER isn't an operating system. Otherwise, code above michael@0: # will signal an error saying that MANUFACTURER isn't an operating michael@0: # system, and we'll never get to this point. michael@0: michael@0: case $basic_machine in michael@0: score-*) michael@0: os=-elf michael@0: ;; michael@0: spu-*) michael@0: os=-elf michael@0: ;; michael@0: *-acorn) michael@0: os=-riscix1.2 michael@0: ;; michael@0: arm*-rebel) michael@0: os=-linux michael@0: ;; michael@0: arm*-semi) michael@0: os=-aout michael@0: ;; michael@0: c4x-* | tic4x-*) michael@0: os=-coff michael@0: ;; michael@0: c8051-*) michael@0: os=-elf michael@0: ;; michael@0: hexagon-*) michael@0: os=-elf michael@0: ;; michael@0: tic54x-*) michael@0: os=-coff michael@0: ;; michael@0: tic55x-*) michael@0: os=-coff michael@0: ;; michael@0: tic6x-*) michael@0: os=-coff michael@0: ;; michael@0: # This must come before the *-dec entry. michael@0: pdp10-*) michael@0: os=-tops20 michael@0: ;; michael@0: pdp11-*) michael@0: os=-none michael@0: ;; michael@0: *-dec | vax-*) michael@0: os=-ultrix4.2 michael@0: ;; michael@0: m68*-apollo) michael@0: os=-domain michael@0: ;; michael@0: i386-sun) michael@0: os=-sunos4.0.2 michael@0: ;; michael@0: m68000-sun) michael@0: os=-sunos3 michael@0: ;; michael@0: m68*-cisco) michael@0: os=-aout michael@0: ;; michael@0: mep-*) michael@0: os=-elf michael@0: ;; michael@0: mips*-cisco) michael@0: os=-elf michael@0: ;; michael@0: mips*-*) michael@0: os=-elf michael@0: ;; michael@0: or1k-*) michael@0: os=-elf michael@0: ;; michael@0: or32-*) michael@0: os=-coff michael@0: ;; michael@0: *-tti) # must be before sparc entry or we get the wrong os. michael@0: os=-sysv3 michael@0: ;; michael@0: sparc-* | *-sun) michael@0: os=-sunos4.1.1 michael@0: ;; michael@0: *-be) michael@0: os=-beos michael@0: ;; michael@0: *-haiku) michael@0: os=-haiku michael@0: ;; michael@0: *-ibm) michael@0: os=-aix michael@0: ;; michael@0: *-knuth) michael@0: os=-mmixware michael@0: ;; michael@0: *-wec) michael@0: os=-proelf michael@0: ;; michael@0: *-winbond) michael@0: os=-proelf michael@0: ;; michael@0: *-oki) michael@0: os=-proelf michael@0: ;; michael@0: *-hp) michael@0: os=-hpux michael@0: ;; michael@0: *-hitachi) michael@0: os=-hiux michael@0: ;; michael@0: i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) michael@0: os=-sysv michael@0: ;; michael@0: *-cbm) michael@0: os=-amigaos michael@0: ;; michael@0: *-dg) michael@0: os=-dgux michael@0: ;; michael@0: *-dolphin) michael@0: os=-sysv3 michael@0: ;; michael@0: m68k-ccur) michael@0: os=-rtu michael@0: ;; michael@0: m88k-omron*) michael@0: os=-luna michael@0: ;; michael@0: *-next ) michael@0: os=-nextstep michael@0: ;; michael@0: *-sequent) michael@0: os=-ptx michael@0: ;; michael@0: *-crds) michael@0: os=-unos michael@0: ;; michael@0: *-ns) michael@0: os=-genix michael@0: ;; michael@0: i370-*) michael@0: os=-mvs michael@0: ;; michael@0: *-next) michael@0: os=-nextstep3 michael@0: ;; michael@0: *-gould) michael@0: os=-sysv michael@0: ;; michael@0: *-highlevel) michael@0: os=-bsd michael@0: ;; michael@0: *-encore) michael@0: os=-bsd michael@0: ;; michael@0: *-sgi) michael@0: os=-irix michael@0: ;; michael@0: *-siemens) michael@0: os=-sysv4 michael@0: ;; michael@0: *-masscomp) michael@0: os=-rtu michael@0: ;; michael@0: f30[01]-fujitsu | f700-fujitsu) michael@0: os=-uxpv michael@0: ;; michael@0: *-rom68k) michael@0: os=-coff michael@0: ;; michael@0: *-*bug) michael@0: os=-coff michael@0: ;; michael@0: *-apple) michael@0: os=-macos michael@0: ;; michael@0: *-atari*) michael@0: os=-mint michael@0: ;; michael@0: *) michael@0: os=-none michael@0: ;; michael@0: esac michael@0: fi michael@0: michael@0: # Here we handle the case where we know the os, and the CPU type, but not the michael@0: # manufacturer. We pick the logical manufacturer. michael@0: vendor=unknown michael@0: case $basic_machine in michael@0: *-unknown) michael@0: case $os in michael@0: -riscix*) michael@0: vendor=acorn michael@0: ;; michael@0: -sunos*) michael@0: vendor=sun michael@0: ;; michael@0: -cnk*|-aix*) michael@0: vendor=ibm michael@0: ;; michael@0: -beos*) michael@0: vendor=be michael@0: ;; michael@0: -hpux*) michael@0: vendor=hp michael@0: ;; michael@0: -mpeix*) michael@0: vendor=hp michael@0: ;; michael@0: -hiux*) michael@0: vendor=hitachi michael@0: ;; michael@0: -unos*) michael@0: vendor=crds michael@0: ;; michael@0: -dgux*) michael@0: vendor=dg michael@0: ;; michael@0: -luna*) michael@0: vendor=omron michael@0: ;; michael@0: -genix*) michael@0: vendor=ns michael@0: ;; michael@0: -mvs* | -opened*) michael@0: vendor=ibm michael@0: ;; michael@0: -os400*) michael@0: vendor=ibm michael@0: ;; michael@0: -ptx*) michael@0: vendor=sequent michael@0: ;; michael@0: -tpf*) michael@0: vendor=ibm michael@0: ;; michael@0: -vxsim* | -vxworks* | -windiss*) michael@0: vendor=wrs michael@0: ;; michael@0: -aux*) michael@0: vendor=apple michael@0: ;; michael@0: -hms*) michael@0: vendor=hitachi michael@0: ;; michael@0: -mpw* | -macos*) michael@0: vendor=apple michael@0: ;; michael@0: -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) michael@0: vendor=atari michael@0: ;; michael@0: -vos*) michael@0: vendor=stratus michael@0: ;; michael@0: esac michael@0: basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` michael@0: ;; michael@0: esac michael@0: michael@0: echo $basic_machine$os michael@0: exit michael@0: michael@0: # Local variables: michael@0: # eval: (add-hook 'write-file-hooks 'time-stamp) michael@0: # time-stamp-start: "timestamp='" michael@0: # time-stamp-format: "%:y-%02m-%02d" michael@0: # time-stamp-end: "'" michael@0: # End: