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