config.sub
author Sam Lantinga <slouken@libsdl.org>
Thu, 08 Oct 2009 07:08:45 +0000
changeset 220 e59707061bde
parent 192 cee9f4af8db0
child 455 71f9ee6eaa9d
child 597 85d1fcc58846
permissions -rwxr-xr-x
Update config.guess and config.sub
slouken@0
     1
#! /bin/sh
slouken@16
     2
# Configuration validation subroutine script.
patmandin@112
     3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
slouken@220
     4
#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
slouken@192
     5
#   Free Software Foundation, Inc.
slouken@2
     6
slouken@220
     7
timestamp='2009-10-07'
slouken@2
     8
slouken@0
     9
# This file is (in principle) common to ALL GNU software.
slouken@0
    10
# The presence of a machine in this file suggests that SOME GNU software
slouken@0
    11
# can handle that machine.  It does not imply ALL GNU software can.
slouken@0
    12
#
slouken@0
    13
# This file is free software; you can redistribute it and/or modify
slouken@0
    14
# it under the terms of the GNU General Public License as published by
slouken@0
    15
# the Free Software Foundation; either version 2 of the License, or
slouken@0
    16
# (at your option) any later version.
slouken@0
    17
#
slouken@0
    18
# This program is distributed in the hope that it will be useful,
slouken@0
    19
# but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@0
    20
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
slouken@0
    21
# GNU General Public License for more details.
slouken@0
    22
#
slouken@0
    23
# You should have received a copy of the GNU General Public License
slouken@0
    24
# along with this program; if not, write to the Free Software
slouken@182
    25
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
slouken@182
    26
# 02110-1301, USA.
slouken@182
    27
#
slouken@0
    28
# As a special exception to the GNU General Public License, if you
slouken@0
    29
# distribute this file as part of a program that contains a
slouken@0
    30
# configuration script generated by Autoconf, you may include it under
slouken@0
    31
# the same distribution terms that you use for the rest of that program.
slouken@0
    32
slouken@182
    33
patmandin@112
    34
# Please send patches to <config-patches@gnu.org>.  Submit a context
slouken@220
    35
# diff and a properly formatted GNU ChangeLog entry.
slouken@2
    36
#
slouken@0
    37
# Configuration subroutine to validate and canonicalize a configuration type.
slouken@0
    38
# Supply the specified configuration type as an argument.
slouken@0
    39
# If it is invalid, we print an error message on stderr and exit with code 1.
slouken@0
    40
# Otherwise, we print the canonical config type on stdout and succeed.
slouken@0
    41
slouken@220
    42
# You can get the latest version of this script from:
slouken@220
    43
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
slouken@220
    44
slouken@0
    45
# This file is supposed to be the same for all GNU packages
slouken@0
    46
# and recognize all the CPU types, system types and aliases
slouken@0
    47
# that are meaningful with *any* GNU software.
slouken@0
    48
# Each package is responsible for reporting which valid configurations
slouken@0
    49
# it does not support.  The user should be able to distinguish
slouken@0
    50
# a failure to support a valid configuration from a meaningless
slouken@0
    51
# configuration.
slouken@0
    52
slouken@0
    53
# The goal of this file is to map all the various variations of a given
slouken@0
    54
# machine specification into a single specification in the form:
slouken@0
    55
#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
slouken@0
    56
# or in some cases, the newer four-part form:
slouken@0
    57
#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
slouken@0
    58
# It is wrong to echo any other type of specification.
slouken@0
    59
slouken@2
    60
me=`echo "$0" | sed -e 's,.*/,,'`
slouken@0
    61
slouken@2
    62
usage="\
slouken@2
    63
Usage: $0 [OPTION] CPU-MFR-OPSYS
slouken@2
    64
       $0 [OPTION] ALIAS
slouken@2
    65
slouken@2
    66
Canonicalize a configuration name.
slouken@2
    67
slouken@2
    68
Operation modes:
slouken@16
    69
  -h, --help         print this help, then exit
slouken@16
    70
  -t, --time-stamp   print date of last modification, then exit
slouken@16
    71
  -v, --version      print version number, then exit
slouken@16
    72
slouken@16
    73
Report bugs and patches to <config-patches@gnu.org>."
slouken@16
    74
slouken@16
    75
version="\
slouken@16
    76
GNU config.sub ($timestamp)
slouken@16
    77
slouken@192
    78
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
slouken@192
    79
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
slouken@16
    80
slouken@16
    81
This is free software; see the source for copying conditions.  There is NO
slouken@16
    82
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
slouken@2
    83
slouken@2
    84
help="
slouken@2
    85
Try \`$me --help' for more information."
slouken@2
    86
slouken@2
    87
# Parse command line
slouken@2
    88
while test $# -gt 0 ; do
slouken@16
    89
  case $1 in
slouken@16
    90
    --time-stamp | --time* | -t )
slouken@182
    91
       echo "$timestamp" ; exit ;;
slouken@16
    92
    --version | -v )
slouken@182
    93
       echo "$version" ; exit ;;
slouken@2
    94
    --help | --h* | -h )
slouken@182
    95
       echo "$usage"; exit ;;
slouken@2
    96
    -- )     # Stop option processing
slouken@2
    97
       shift; break ;;
slouken@2
    98
    - )	# Use stdin as input.
slouken@2
    99
       break ;;
slouken@2
   100
    -* )
slouken@16
   101
       echo "$me: invalid option $1$help"
slouken@2
   102
       exit 1 ;;
slouken@2
   103
slouken@2
   104
    *local*)
slouken@2
   105
       # First pass through any local machine types.
slouken@2
   106
       echo $1
slouken@182
   107
       exit ;;
slouken@2
   108
slouken@2
   109
    * )
slouken@2
   110
       break ;;
slouken@2
   111
  esac
slouken@2
   112
done
slouken@2
   113
slouken@2
   114
case $# in
slouken@2
   115
 0) echo "$me: missing argument$help" >&2
slouken@2
   116
    exit 1;;
slouken@2
   117
 1) ;;
slouken@2
   118
 *) echo "$me: too many arguments$help" >&2
slouken@2
   119
    exit 1;;
slouken@0
   120
esac
slouken@0
   121
slouken@0
   122
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
slouken@0
   123
# Here we must recognize all the valid KERNEL-OS combinations.
slouken@0
   124
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
slouken@0
   125
case $maybe_os in
slouken@182
   126
  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
slouken@182
   127
  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
slouken@192
   128
  kopensolaris*-gnu* | \
slouken@182
   129
  storm-chaos* | os2-emx* | rtmk-nova*)
slouken@0
   130
    os=-$maybe_os
slouken@0
   131
    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
slouken@0
   132
    ;;
slouken@0
   133
  *)
slouken@0
   134
    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
slouken@0
   135
    if [ $basic_machine != $1 ]
slouken@0
   136
    then os=`echo $1 | sed 's/.*-/-/'`
slouken@0
   137
    else os=; fi
slouken@0
   138
    ;;
slouken@0
   139
esac
slouken@0
   140
slouken@0
   141
### Let's recognize common machines as not being operating systems so
slouken@0
   142
### that things like config.sub decstation-3100 work.  We also
slouken@0
   143
### recognize some manufacturers as not being operating systems, so we
slouken@0
   144
### can provide default operating systems below.
slouken@0
   145
case $os in
slouken@0
   146
	-sun*os*)
slouken@0
   147
		# Prevent following clause from handling this invalid input.
slouken@0
   148
		;;
slouken@0
   149
	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
slouken@0
   150
	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
slouken@0
   151
	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
slouken@0
   152
	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
slouken@0
   153
	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
slouken@0
   154
	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
slouken@220
   155
	-apple | -axis | -knuth | -cray | -microblaze)
slouken@0
   156
		os=
slouken@0
   157
		basic_machine=$1
slouken@0
   158
		;;
slouken@220
   159
        -bluegene*)
slouken@220
   160
	        os=-cnk
slouken@220
   161
		;;
slouken@0
   162
	-sim | -cisco | -oki | -wec | -winbond)
slouken@0
   163
		os=
slouken@0
   164
		basic_machine=$1
slouken@0
   165
		;;
slouken@0
   166
	-scout)
slouken@0
   167
		;;
slouken@0
   168
	-wrs)
slouken@2
   169
		os=-vxworks
slouken@0
   170
		basic_machine=$1
slouken@0
   171
		;;
patmandin@112
   172
	-chorusos*)
patmandin@112
   173
		os=-chorusos
patmandin@112
   174
		basic_machine=$1
patmandin@112
   175
		;;
patmandin@112
   176
 	-chorusrdb)
patmandin@112
   177
 		os=-chorusrdb
patmandin@112
   178
		basic_machine=$1
patmandin@112
   179
 		;;
slouken@0
   180
	-hiux*)
slouken@0
   181
		os=-hiuxwe2
slouken@0
   182
		;;
slouken@182
   183
	-sco6)
slouken@182
   184
		os=-sco5v6
slouken@182
   185
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
slouken@182
   186
		;;
slouken@0
   187
	-sco5)
slouken@0
   188
		os=-sco3.2v5
slouken@0
   189
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
slouken@0
   190
		;;
slouken@0
   191
	-sco4)
slouken@0
   192
		os=-sco3.2v4
slouken@0
   193
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
slouken@0
   194
		;;
slouken@0
   195
	-sco3.2.[4-9]*)
slouken@0
   196
		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
slouken@0
   197
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
slouken@0
   198
		;;
slouken@0
   199
	-sco3.2v[4-9]*)
slouken@0
   200
		# Don't forget version if it is 3.2v4 or newer.
slouken@0
   201
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
slouken@0
   202
		;;
slouken@182
   203
	-sco5v6*)
slouken@182
   204
		# Don't forget version if it is 3.2v4 or newer.
slouken@182
   205
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
slouken@182
   206
		;;
slouken@0
   207
	-sco*)
slouken@0
   208
		os=-sco3.2v2
slouken@0
   209
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
slouken@0
   210
		;;
slouken@0
   211
	-udk*)
slouken@0
   212
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
slouken@0
   213
		;;
slouken@0
   214
	-isc)
slouken@0
   215
		os=-isc2.2
slouken@0
   216
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
slouken@0
   217
		;;
slouken@0
   218
	-clix*)
slouken@0
   219
		basic_machine=clipper-intergraph
slouken@0
   220
		;;
slouken@0
   221
	-isc*)
slouken@0
   222
		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
slouken@0
   223
		;;
slouken@0
   224
	-lynx*)
slouken@0
   225
		os=-lynxos
slouken@0
   226
		;;
slouken@0
   227
	-ptx*)
slouken@0
   228
		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
slouken@0
   229
		;;
slouken@0
   230
	-windowsnt*)
slouken@0
   231
		os=`echo $os | sed -e 's/windowsnt/winnt/'`
slouken@0
   232
		;;
slouken@0
   233
	-psos*)
slouken@0
   234
		os=-psos
slouken@0
   235
		;;
slouken@2
   236
	-mint | -mint[0-9]*)
slouken@2
   237
		basic_machine=m68k-atari
slouken@2
   238
		os=-mint
slouken@2
   239
		;;
slouken@0
   240
esac
slouken@0
   241
slouken@0
   242
# Decode aliases for certain CPU-COMPANY combinations.
slouken@0
   243
case $basic_machine in
slouken@0
   244
	# Recognize the basic CPU types without company name.
slouken@0
   245
	# Some are omitted here because they have special meanings below.
patmandin@112
   246
	1750a | 580 \
patmandin@112
   247
	| a29k \
patmandin@112
   248
	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
patmandin@112
   249
	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
slouken@182
   250
	| am33_2.0 \
slouken@182
   251
	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
slouken@182
   252
	| bfin \
slouken@182
   253
	| c4x | clipper \
patmandin@112
   254
	| d10v | d30v | dlx | dsp16xx \
slouken@182
   255
	| fido | fr30 | frv \
patmandin@112
   256
	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
patmandin@112
   257
	| i370 | i860 | i960 | ia64 \
slouken@182
   258
	| ip2k | iq2000 \
slouken@192
   259
	| lm32 \
slouken@182
   260
	| m32c | m32r | m32rle | m68000 | m68k | m88k \
slouken@192
   261
	| maxq | mb | microblaze | mcore | mep | metag \
patmandin@112
   262
	| mips | mipsbe | mipseb | mipsel | mipsle \
patmandin@112
   263
	| mips16 \
patmandin@112
   264
	| mips64 | mips64el \
slouken@192
   265
	| mips64octeon | mips64octeonel \
slouken@192
   266
	| mips64orion | mips64orionel \
slouken@192
   267
	| mips64r5900 | mips64r5900el \
patmandin@112
   268
	| mips64vr | mips64vrel \
patmandin@112
   269
	| mips64vr4100 | mips64vr4100el \
patmandin@112
   270
	| mips64vr4300 | mips64vr4300el \
patmandin@112
   271
	| mips64vr5000 | mips64vr5000el \
slouken@182
   272
	| mips64vr5900 | mips64vr5900el \
patmandin@112
   273
	| mipsisa32 | mipsisa32el \
patmandin@112
   274
	| mipsisa32r2 | mipsisa32r2el \
patmandin@112
   275
	| mipsisa64 | mipsisa64el \
slouken@182
   276
	| mipsisa64r2 | mipsisa64r2el \
patmandin@112
   277
	| mipsisa64sb1 | mipsisa64sb1el \
patmandin@112
   278
	| mipsisa64sr71k | mipsisa64sr71kel \
patmandin@112
   279
	| mipstx39 | mipstx39el \
patmandin@112
   280
	| mn10200 | mn10300 \
slouken@220
   281
	| moxie \
slouken@182
   282
	| mt \
patmandin@112
   283
	| msp430 \
slouken@182
   284
	| nios | nios2 \
patmandin@112
   285
	| ns16k | ns32k \
slouken@182
   286
	| or32 \
patmandin@112
   287
	| pdp10 | pdp11 | pj | pjl \
patmandin@112
   288
	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
patmandin@112
   289
	| pyramid \
slouken@220
   290
	| rx \
slouken@182
   291
	| score \
slouken@192
   292
	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
patmandin@112
   293
	| sh64 | sh64le \
slouken@182
   294
	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
slouken@182
   295
	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
slouken@182
   296
	| spu | strongarm \
slouken@182
   297
	| tahoe | thumb | tic4x | tic80 | tron \
patmandin@112
   298
	| v850 | v850e \
patmandin@112
   299
	| we32k \
slouken@182
   300
	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
slouken@192
   301
	| z8k | z80)
slouken@0
   302
		basic_machine=$basic_machine-unknown
slouken@0
   303
		;;
slouken@220
   304
	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
slouken@2
   305
		# Motorola 68HC11/12.
slouken@2
   306
		basic_machine=$basic_machine-unknown
slouken@2
   307
		os=-none
slouken@2
   308
		;;
patmandin@112
   309
	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
slouken@0
   310
		;;
slouken@182
   311
	ms1)
slouken@182
   312
		basic_machine=mt-unknown
slouken@182
   313
		;;
slouken@0
   314
slouken@0
   315
	# We use `pc' rather than `unknown'
slouken@0
   316
	# because (1) that's what they normally are, and
slouken@0
   317
	# (2) the word "unknown" tends to confuse beginning users.
patmandin@112
   318
	i*86 | x86_64)
slouken@0
   319
	  basic_machine=$basic_machine-pc
slouken@0
   320
	  ;;
slouken@0
   321
	# Object if more than one company name word.
slouken@0
   322
	*-*-*)
slouken@0
   323
		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
slouken@0
   324
		exit 1
slouken@0
   325
		;;
slouken@0
   326
	# Recognize the basic CPU types with company name.
patmandin@112
   327
	580-* \
patmandin@112
   328
	| a29k-* \
patmandin@112
   329
	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
patmandin@112
   330
	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
patmandin@112
   331
	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
patmandin@112
   332
	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
slouken@182
   333
	| avr-* | avr32-* \
slouken@182
   334
	| bfin-* | bs2000-* \
patmandin@112
   335
	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
slouken@182
   336
	| clipper-* | craynv-* | cydra-* \
patmandin@112
   337
	| d10v-* | d30v-* | dlx-* \
patmandin@112
   338
	| elxsi-* \
slouken@182
   339
	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
patmandin@112
   340
	| h8300-* | h8500-* \
patmandin@112
   341
	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
patmandin@112
   342
	| i*86-* | i860-* | i960-* | ia64-* \
slouken@182
   343
	| ip2k-* | iq2000-* \
slouken@192
   344
	| lm32-* \
slouken@182
   345
	| m32c-* | m32r-* | m32rle-* \
patmandin@112
   346
	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
slouken@220
   347
	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
patmandin@112
   348
	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
patmandin@112
   349
	| mips16-* \
patmandin@112
   350
	| mips64-* | mips64el-* \
slouken@192
   351
	| mips64octeon-* | mips64octeonel-* \
slouken@192
   352
	| mips64orion-* | mips64orionel-* \
slouken@192
   353
	| mips64r5900-* | mips64r5900el-* \
patmandin@112
   354
	| mips64vr-* | mips64vrel-* \
patmandin@112
   355
	| mips64vr4100-* | mips64vr4100el-* \
patmandin@112
   356
	| mips64vr4300-* | mips64vr4300el-* \
patmandin@112
   357
	| mips64vr5000-* | mips64vr5000el-* \
slouken@182
   358
	| mips64vr5900-* | mips64vr5900el-* \
patmandin@112
   359
	| mipsisa32-* | mipsisa32el-* \
patmandin@112
   360
	| mipsisa32r2-* | mipsisa32r2el-* \
patmandin@112
   361
	| mipsisa64-* | mipsisa64el-* \
slouken@182
   362
	| mipsisa64r2-* | mipsisa64r2el-* \
patmandin@112
   363
	| mipsisa64sb1-* | mipsisa64sb1el-* \
patmandin@112
   364
	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
patmandin@112
   365
	| mipstx39-* | mipstx39el-* \
slouken@182
   366
	| mmix-* \
slouken@182
   367
	| mt-* \
patmandin@112
   368
	| msp430-* \
slouken@182
   369
	| nios-* | nios2-* \
slouken@182
   370
	| none-* | np1-* | ns16k-* | ns32k-* \
patmandin@112
   371
	| orion-* \
patmandin@112
   372
	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
patmandin@112
   373
	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
patmandin@112
   374
	| pyramid-* \
slouken@220
   375
	| romp-* | rs6000-* | rx-* \
slouken@192
   376
	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
patmandin@112
   377
	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
slouken@182
   378
	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
slouken@182
   379
	| sparclite-* \
slouken@182
   380
	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
patmandin@112
   381
	| tahoe-* | thumb-* \
slouken@192
   382
	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
patmandin@112
   383
	| tron-* \
patmandin@112
   384
	| v850-* | v850e-* | vax-* \
patmandin@112
   385
	| we32k-* \
slouken@182
   386
	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
slouken@182
   387
	| xstormy16-* | xtensa*-* \
patmandin@112
   388
	| ymp-* \
slouken@192
   389
	| z8k-* | z80-*)
slouken@0
   390
		;;
slouken@182
   391
	# Recognize the basic CPU types without company name, with glob match.
slouken@182
   392
	xtensa*)
slouken@182
   393
		basic_machine=$basic_machine-unknown
slouken@182
   394
		;;
slouken@0
   395
	# Recognize the various machine names and aliases which stand
slouken@0
   396
	# for a CPU type and a company and sometimes even an OS.
slouken@0
   397
	386bsd)
slouken@0
   398
		basic_machine=i386-unknown
slouken@0
   399
		os=-bsd
slouken@0
   400
		;;
slouken@0
   401
	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
slouken@0
   402
		basic_machine=m68000-att
slouken@0
   403
		;;
slouken@0
   404
	3b*)
slouken@0
   405
		basic_machine=we32k-att
slouken@0
   406
		;;
slouken@0
   407
	a29khif)
slouken@0
   408
		basic_machine=a29k-amd
slouken@0
   409
		os=-udi
slouken@0
   410
		;;
slouken@182
   411
    	abacus)
slouken@182
   412
		basic_machine=abacus-unknown
slouken@182
   413
		;;
slouken@0
   414
	adobe68k)
slouken@0
   415
		basic_machine=m68010-adobe
slouken@0
   416
		os=-scout
slouken@0
   417
		;;
slouken@0
   418
	alliant | fx80)
slouken@0
   419
		basic_machine=fx80-alliant
slouken@0
   420
		;;
slouken@0
   421
	altos | altos3068)
slouken@0
   422
		basic_machine=m68k-altos
slouken@0
   423
		;;
slouken@0
   424
	am29k)
slouken@0
   425
		basic_machine=a29k-none
slouken@0
   426
		os=-bsd
slouken@0
   427
		;;
slouken@182
   428
	amd64)
slouken@182
   429
		basic_machine=x86_64-pc
slouken@182
   430
		;;
slouken@182
   431
	amd64-*)
slouken@182
   432
		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
slouken@182
   433
		;;
slouken@0
   434
	amdahl)
slouken@0
   435
		basic_machine=580-amdahl
slouken@0
   436
		os=-sysv
slouken@0
   437
		;;
slouken@0
   438
	amiga | amiga-*)
slouken@2
   439
		basic_machine=m68k-unknown
slouken@0
   440
		;;
slouken@0
   441
	amigaos | amigados)
slouken@2
   442
		basic_machine=m68k-unknown
slouken@0
   443
		os=-amigaos
slouken@0
   444
		;;
slouken@0
   445
	amigaunix | amix)
slouken@2
   446
		basic_machine=m68k-unknown
slouken@0
   447
		os=-sysv4
slouken@0
   448
		;;
slouken@0
   449
	apollo68)
slouken@0
   450
		basic_machine=m68k-apollo
slouken@0
   451
		os=-sysv
slouken@0
   452
		;;
slouken@0
   453
	apollo68bsd)
slouken@0
   454
		basic_machine=m68k-apollo
slouken@0
   455
		os=-bsd
slouken@0
   456
		;;
slouken@192
   457
	aros)
slouken@192
   458
		basic_machine=i386-pc
slouken@192
   459
		os=-aros
slouken@192
   460
		;;
slouken@0
   461
	aux)
slouken@0
   462
		basic_machine=m68k-apple
slouken@0
   463
		os=-aux
slouken@0
   464
		;;
slouken@0
   465
	balance)
slouken@0
   466
		basic_machine=ns32k-sequent
slouken@0
   467
		os=-dynix
slouken@0
   468
		;;
slouken@182
   469
	blackfin)
slouken@182
   470
		basic_machine=bfin-unknown
slouken@182
   471
		os=-linux
slouken@182
   472
		;;
slouken@182
   473
	blackfin-*)
slouken@182
   474
		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
slouken@182
   475
		os=-linux
slouken@182
   476
		;;
slouken@220
   477
	bluegene*)
slouken@220
   478
		basic_machine=powerpc-ibm
slouken@220
   479
		os=-cnk
slouken@220
   480
		;;
patmandin@112
   481
	c90)
patmandin@112
   482
		basic_machine=c90-cray
patmandin@112
   483
		os=-unicos
patmandin@112
   484
		;;
slouken@192
   485
        cegcc)
slouken@192
   486
		basic_machine=arm-unknown
slouken@192
   487
		os=-cegcc
slouken@192
   488
		;;
slouken@0
   489
	convex-c1)
slouken@0
   490
		basic_machine=c1-convex
slouken@0
   491
		os=-bsd
slouken@0
   492
		;;
slouken@0
   493
	convex-c2)
slouken@0
   494
		basic_machine=c2-convex
slouken@0
   495
		os=-bsd
slouken@0
   496
		;;
slouken@0
   497
	convex-c32)
slouken@0
   498
		basic_machine=c32-convex
slouken@0
   499
		os=-bsd
slouken@0
   500
		;;
slouken@0
   501
	convex-c34)
slouken@0
   502
		basic_machine=c34-convex
slouken@0
   503
		os=-bsd
slouken@0
   504
		;;
slouken@0
   505
	convex-c38)
slouken@0
   506
		basic_machine=c38-convex
slouken@0
   507
		os=-bsd
slouken@0
   508
		;;
patmandin@112
   509
	cray | j90)
patmandin@112
   510
		basic_machine=j90-cray
slouken@0
   511
		os=-unicos
slouken@0
   512
		;;
slouken@182
   513
	craynv)
slouken@182
   514
		basic_machine=craynv-cray
slouken@182
   515
		os=-unicosmp
slouken@182
   516
		;;
slouken@182
   517
	cr16)
slouken@182
   518
		basic_machine=cr16-unknown
slouken@182
   519
		os=-elf
slouken@182
   520
		;;
slouken@0
   521
	crds | unos)
slouken@0
   522
		basic_machine=m68k-crds
slouken@0
   523
		;;
slouken@182
   524
	crisv32 | crisv32-* | etraxfs*)
slouken@182
   525
		basic_machine=crisv32-axis
slouken@182
   526
		;;
slouken@2
   527
	cris | cris-* | etrax*)
slouken@2
   528
		basic_machine=cris-axis
slouken@2
   529
		;;
slouken@182
   530
	crx)
slouken@182
   531
		basic_machine=crx-unknown
slouken@182
   532
		os=-elf
slouken@182
   533
		;;
slouken@0
   534
	da30 | da30-*)
slouken@0
   535
		basic_machine=m68k-da30
slouken@0
   536
		;;
slouken@0
   537
	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
slouken@0
   538
		basic_machine=mips-dec
slouken@0
   539
		;;
patmandin@112
   540
	decsystem10* | dec10*)
patmandin@112
   541
		basic_machine=pdp10-dec
patmandin@112
   542
		os=-tops10
patmandin@112
   543
		;;
patmandin@112
   544
	decsystem20* | dec20*)
patmandin@112
   545
		basic_machine=pdp10-dec
patmandin@112
   546
		os=-tops20
patmandin@112
   547
		;;
slouken@0
   548
	delta | 3300 | motorola-3300 | motorola-delta \
slouken@0
   549
	      | 3300-motorola | delta-motorola)
slouken@0
   550
		basic_machine=m68k-motorola
slouken@0
   551
		;;
slouken@0
   552
	delta88)
slouken@0
   553
		basic_machine=m88k-motorola
slouken@0
   554
		os=-sysv3
slouken@0
   555
		;;
slouken@192
   556
	dicos)
slouken@192
   557
		basic_machine=i686-pc
slouken@192
   558
		os=-dicos
slouken@192
   559
		;;
slouken@182
   560
	djgpp)
slouken@182
   561
		basic_machine=i586-pc
slouken@182
   562
		os=-msdosdjgpp
slouken@182
   563
		;;
slouken@0
   564
	dpx20 | dpx20-*)
slouken@0
   565
		basic_machine=rs6000-bull
slouken@0
   566
		os=-bosx
slouken@0
   567
		;;
slouken@0
   568
	dpx2* | dpx2*-bull)
slouken@0
   569
		basic_machine=m68k-bull
slouken@0
   570
		os=-sysv3
slouken@0
   571
		;;
slouken@0
   572
	ebmon29k)
slouken@0
   573
		basic_machine=a29k-amd
slouken@0
   574
		os=-ebmon
slouken@0
   575
		;;
slouken@0
   576
	elxsi)
slouken@0
   577
		basic_machine=elxsi-elxsi
slouken@0
   578
		os=-bsd
slouken@0
   579
		;;
slouken@0
   580
	encore | umax | mmax)
slouken@0
   581
		basic_machine=ns32k-encore
slouken@0
   582
		;;
slouken@0
   583
	es1800 | OSE68k | ose68k | ose | OSE)
slouken@0
   584
		basic_machine=m68k-ericsson
slouken@0
   585
		os=-ose
slouken@0
   586
		;;
slouken@0
   587
	fx2800)
slouken@0
   588
		basic_machine=i860-alliant
slouken@0
   589
		;;
slouken@0
   590
	genix)
slouken@0
   591
		basic_machine=ns32k-ns
slouken@0
   592
		;;
slouken@0
   593
	gmicro)
slouken@0
   594
		basic_machine=tron-gmicro
slouken@0
   595
		os=-sysv
slouken@0
   596
		;;
patmandin@112
   597
	go32)
patmandin@112
   598
		basic_machine=i386-pc
patmandin@112
   599
		os=-go32
patmandin@112
   600
		;;
slouken@0
   601
	h3050r* | hiux*)
slouken@0
   602
		basic_machine=hppa1.1-hitachi
slouken@0
   603
		os=-hiuxwe2
slouken@0
   604
		;;
slouken@0
   605
	h8300hms)
slouken@0
   606
		basic_machine=h8300-hitachi
slouken@0
   607
		os=-hms
slouken@0
   608
		;;
slouken@0
   609
	h8300xray)
slouken@0
   610
		basic_machine=h8300-hitachi
slouken@0
   611
		os=-xray
slouken@0
   612
		;;
slouken@0
   613
	h8500hms)
slouken@0
   614
		basic_machine=h8500-hitachi
slouken@0
   615
		os=-hms
slouken@0
   616
		;;
slouken@0
   617
	harris)
slouken@0
   618
		basic_machine=m88k-harris
slouken@0
   619
		os=-sysv3
slouken@0
   620
		;;
slouken@0
   621
	hp300-*)
slouken@0
   622
		basic_machine=m68k-hp
slouken@0
   623
		;;
slouken@0
   624
	hp300bsd)
slouken@0
   625
		basic_machine=m68k-hp
slouken@0
   626
		os=-bsd
slouken@0
   627
		;;
slouken@0
   628
	hp300hpux)
slouken@0
   629
		basic_machine=m68k-hp
slouken@0
   630
		os=-hpux
slouken@0
   631
		;;
slouken@0
   632
	hp3k9[0-9][0-9] | hp9[0-9][0-9])
slouken@0
   633
		basic_machine=hppa1.0-hp
slouken@0
   634
		;;
slouken@0
   635
	hp9k2[0-9][0-9] | hp9k31[0-9])
slouken@0
   636
		basic_machine=m68000-hp
slouken@0
   637
		;;
slouken@0
   638
	hp9k3[2-9][0-9])
slouken@0
   639
		basic_machine=m68k-hp
slouken@0
   640
		;;
slouken@0
   641
	hp9k6[0-9][0-9] | hp6[0-9][0-9])
slouken@0
   642
		basic_machine=hppa1.0-hp
slouken@0
   643
		;;
slouken@0
   644
	hp9k7[0-79][0-9] | hp7[0-79][0-9])
slouken@0
   645
		basic_machine=hppa1.1-hp
slouken@0
   646
		;;
slouken@0
   647
	hp9k78[0-9] | hp78[0-9])
slouken@0
   648
		# FIXME: really hppa2.0-hp
slouken@0
   649
		basic_machine=hppa1.1-hp
slouken@0
   650
		;;
slouken@0
   651
	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
slouken@0
   652
		# FIXME: really hppa2.0-hp
slouken@0
   653
		basic_machine=hppa1.1-hp
slouken@0
   654
		;;
slouken@0
   655
	hp9k8[0-9][13679] | hp8[0-9][13679])
slouken@0
   656
		basic_machine=hppa1.1-hp
slouken@0
   657
		;;
slouken@0
   658
	hp9k8[0-9][0-9] | hp8[0-9][0-9])
slouken@0
   659
		basic_machine=hppa1.0-hp
slouken@0
   660
		;;
slouken@0
   661
	hppa-next)
slouken@0
   662
		os=-nextstep3
slouken@0
   663
		;;
slouken@0
   664
	hppaosf)
slouken@0
   665
		basic_machine=hppa1.1-hp
slouken@0
   666
		os=-osf
slouken@0
   667
		;;
slouken@0
   668
	hppro)
slouken@0
   669
		basic_machine=hppa1.1-hp
slouken@0
   670
		os=-proelf
slouken@0
   671
		;;
slouken@0
   672
	i370-ibm* | ibm*)
slouken@0
   673
		basic_machine=i370-ibm
slouken@0
   674
		;;
slouken@0
   675
# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
patmandin@112
   676
	i*86v32)
slouken@0
   677
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
slouken@0
   678
		os=-sysv32
slouken@0
   679
		;;
patmandin@112
   680
	i*86v4*)
slouken@0
   681
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
slouken@0
   682
		os=-sysv4
slouken@0
   683
		;;
patmandin@112
   684
	i*86v)
slouken@0
   685
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
slouken@0
   686
		os=-sysv
slouken@0
   687
		;;
patmandin@112
   688
	i*86sol2)
slouken@0
   689
		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
slouken@0
   690
		os=-solaris2
slouken@0
   691
		;;
slouken@0
   692
	i386mach)
slouken@0
   693
		basic_machine=i386-mach
slouken@0
   694
		os=-mach
slouken@0
   695
		;;
slouken@0
   696
	i386-vsta | vsta)
slouken@0
   697
		basic_machine=i386-unknown
slouken@0
   698
		os=-vsta
slouken@0
   699
		;;
slouken@0
   700
	iris | iris4d)
slouken@0
   701
		basic_machine=mips-sgi
slouken@0
   702
		case $os in
slouken@0
   703
		    -irix*)
slouken@0
   704
			;;
slouken@0
   705
		    *)
slouken@0
   706
			os=-irix4
slouken@0
   707
			;;
slouken@0
   708
		esac
slouken@0
   709
		;;
slouken@0
   710
	isi68 | isi)
slouken@0
   711
		basic_machine=m68k-isi
slouken@0
   712
		os=-sysv
slouken@0
   713
		;;
slouken@182
   714
	m68knommu)
slouken@182
   715
		basic_machine=m68k-unknown
slouken@182
   716
		os=-linux
slouken@182
   717
		;;
slouken@182
   718
	m68knommu-*)
slouken@182
   719
		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
slouken@182
   720
		os=-linux
slouken@182
   721
		;;
slouken@0
   722
	m88k-omron*)
slouken@0
   723
		basic_machine=m88k-omron
slouken@0
   724
		;;
slouken@0
   725
	magnum | m3230)
slouken@0
   726
		basic_machine=mips-mips
slouken@0
   727
		os=-sysv
slouken@0
   728
		;;
slouken@0
   729
	merlin)
slouken@0
   730
		basic_machine=ns32k-utek
slouken@0
   731
		os=-sysv
slouken@0
   732
		;;
slouken@220
   733
        microblaze)
slouken@220
   734
		basic_machine=microblaze-xilinx
slouken@220
   735
		;;
patmandin@112
   736
	mingw32)
patmandin@112
   737
		basic_machine=i386-pc
patmandin@112
   738
		os=-mingw32
patmandin@112
   739
		;;
slouken@182
   740
	mingw32ce)
slouken@182
   741
		basic_machine=arm-unknown
slouken@182
   742
		os=-mingw32ce
slouken@182
   743
		;;
slouken@0
   744
	miniframe)
slouken@0
   745
		basic_machine=m68000-convergent
slouken@0
   746
		;;
slouken@2
   747
	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
slouken@0
   748
		basic_machine=m68k-atari
slouken@0
   749
		os=-mint
slouken@0
   750
		;;
slouken@0
   751
	mips3*-*)
slouken@0
   752
		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
slouken@0
   753
		;;
slouken@0
   754
	mips3*)
slouken@0
   755
		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
slouken@0
   756
		;;
slouken@0
   757
	monitor)
slouken@0
   758
		basic_machine=m68k-rom68k
slouken@0
   759
		os=-coff
slouken@0
   760
		;;
patmandin@112
   761
	morphos)
patmandin@112
   762
		basic_machine=powerpc-unknown
patmandin@112
   763
		os=-morphos
patmandin@112
   764
		;;
slouken@0
   765
	msdos)
patmandin@112
   766
		basic_machine=i386-pc
slouken@0
   767
		os=-msdos
slouken@0
   768
		;;
slouken@182
   769
	ms1-*)
slouken@182
   770
		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
slouken@182
   771
		;;
slouken@2
   772
	mvs)
slouken@2
   773
		basic_machine=i370-ibm
slouken@2
   774
		os=-mvs
slouken@2
   775
		;;
slouken@0
   776
	ncr3000)
slouken@0
   777
		basic_machine=i486-ncr
slouken@0
   778
		os=-sysv4
slouken@0
   779
		;;
slouken@0
   780
	netbsd386)
slouken@0
   781
		basic_machine=i386-unknown
slouken@0
   782
		os=-netbsd
slouken@0
   783
		;;
slouken@0
   784
	netwinder)
slouken@2
   785
		basic_machine=armv4l-rebel
slouken@0
   786
		os=-linux
slouken@0
   787
		;;
slouken@0
   788
	news | news700 | news800 | news900)
slouken@0
   789
		basic_machine=m68k-sony
slouken@0
   790
		os=-newsos
slouken@0
   791
		;;
slouken@0
   792
	news1000)
slouken@0
   793
		basic_machine=m68030-sony
slouken@0
   794
		os=-newsos
slouken@0
   795
		;;
slouken@0
   796
	news-3600 | risc-news)
slouken@0
   797
		basic_machine=mips-sony
slouken@0
   798
		os=-newsos
slouken@0
   799
		;;
slouken@0
   800
	necv70)
slouken@0
   801
		basic_machine=v70-nec
slouken@0
   802
		os=-sysv
slouken@0
   803
		;;
slouken@0
   804
	next | m*-next )
slouken@0
   805
		basic_machine=m68k-next
slouken@0
   806
		case $os in
slouken@0
   807
		    -nextstep* )
slouken@0
   808
			;;
slouken@0
   809
		    -ns2*)
slouken@0
   810
		      os=-nextstep2
slouken@0
   811
			;;
slouken@0
   812
		    *)
slouken@0
   813
		      os=-nextstep3
slouken@0
   814
			;;
slouken@0
   815
		esac
slouken@0
   816
		;;
slouken@0
   817
	nh3000)
slouken@0
   818
		basic_machine=m68k-harris
slouken@0
   819
		os=-cxux
slouken@0
   820
		;;
slouken@0
   821
	nh[45]000)
slouken@0
   822
		basic_machine=m88k-harris
slouken@0
   823
		os=-cxux
slouken@0
   824
		;;
slouken@0
   825
	nindy960)
slouken@0
   826
		basic_machine=i960-intel
slouken@0
   827
		os=-nindy
slouken@0
   828
		;;
slouken@0
   829
	mon960)
slouken@0
   830
		basic_machine=i960-intel
slouken@0
   831
		os=-mon960
slouken@0
   832
		;;
slouken@16
   833
	nonstopux)
slouken@16
   834
		basic_machine=mips-compaq
slouken@16
   835
		os=-nonstopux
slouken@16
   836
		;;
slouken@0
   837
	np1)
slouken@0
   838
		basic_machine=np1-gould
slouken@0
   839
		;;
slouken@2
   840
	nsr-tandem)
slouken@2
   841
		basic_machine=nsr-tandem
slouken@2
   842
		;;
slouken@0
   843
	op50n-* | op60c-*)
slouken@0
   844
		basic_machine=hppa1.1-oki
slouken@0
   845
		os=-proelf
slouken@0
   846
		;;
slouken@182
   847
	openrisc | openrisc-*)
patmandin@112
   848
		basic_machine=or32-unknown
slouken@182
   849
		;;
slouken@182
   850
	os400)
slouken@182
   851
		basic_machine=powerpc-ibm
slouken@182
   852
		os=-os400
patmandin@112
   853
		;;
slouken@0
   854
	OSE68000 | ose68000)
slouken@0
   855
		basic_machine=m68000-ericsson
slouken@0
   856
		os=-ose
slouken@0
   857
		;;
slouken@0
   858
	os68k)
slouken@0
   859
		basic_machine=m68k-none
slouken@0
   860
		os=-os68k
slouken@0
   861
		;;
slouken@0
   862
	pa-hitachi)
slouken@0
   863
		basic_machine=hppa1.1-hitachi
slouken@0
   864
		os=-hiuxwe2
slouken@0
   865
		;;
slouken@0
   866
	paragon)
slouken@0
   867
		basic_machine=i860-intel
slouken@0
   868
		os=-osf
slouken@0
   869
		;;
slouken@182
   870
	parisc)
slouken@182
   871
		basic_machine=hppa-unknown
slouken@182
   872
		os=-linux
slouken@182
   873
		;;
slouken@182
   874
	parisc-*)
slouken@182
   875
		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
slouken@182
   876
		os=-linux
slouken@182
   877
		;;
slouken@0
   878
	pbd)
slouken@0
   879
		basic_machine=sparc-tti
slouken@0
   880
		;;
slouken@0
   881
	pbb)
slouken@0
   882
		basic_machine=m68k-tti
slouken@0
   883
		;;
patmandin@112
   884
	pc532 | pc532-*)
slouken@0
   885
		basic_machine=ns32k-pc532
slouken@0
   886
		;;
slouken@182
   887
	pc98)
slouken@182
   888
		basic_machine=i386-pc
slouken@182
   889
		;;
slouken@182
   890
	pc98-*)
slouken@182
   891
		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
slouken@182
   892
		;;
patmandin@112
   893
	pentium | p5 | k5 | k6 | nexgen | viac3)
slouken@0
   894
		basic_machine=i586-pc
slouken@0
   895
		;;
patmandin@112
   896
	pentiumpro | p6 | 6x86 | athlon | athlon_*)
slouken@0
   897
		basic_machine=i686-pc
slouken@0
   898
		;;
slouken@182
   899
	pentiumii | pentium2 | pentiumiii | pentium3)
slouken@16
   900
		basic_machine=i686-pc
slouken@0
   901
		;;
slouken@182
   902
	pentium4)
slouken@182
   903
		basic_machine=i786-pc
slouken@182
   904
		;;
patmandin@112
   905
	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
slouken@0
   906
		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
slouken@0
   907
		;;
slouken@2
   908
	pentiumpro-* | p6-* | 6x86-* | athlon-*)
slouken@0
   909
		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
slouken@0
   910
		;;
slouken@182
   911
	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
slouken@16
   912
		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
slouken@0
   913
		;;
slouken@182
   914
	pentium4-*)
slouken@182
   915
		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
slouken@182
   916
		;;
slouken@0
   917
	pn)
slouken@0
   918
		basic_machine=pn-gould
slouken@0
   919
		;;
slouken@16
   920
	power)	basic_machine=power-ibm
slouken@0
   921
		;;
slouken@0
   922
	ppc)	basic_machine=powerpc-unknown
patmandin@112
   923
		;;
slouken@0
   924
	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
slouken@0
   925
		;;
slouken@0
   926
	ppcle | powerpclittle | ppc-le | powerpc-little)
slouken@0
   927
		basic_machine=powerpcle-unknown
patmandin@112
   928
		;;
slouken@0
   929
	ppcle-* | powerpclittle-*)
slouken@0
   930
		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
slouken@0
   931
		;;
patmandin@112
   932
	ppc64)	basic_machine=powerpc64-unknown
patmandin@112
   933
		;;
patmandin@112
   934
	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
patmandin@112
   935
		;;
patmandin@112
   936
	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
patmandin@112
   937
		basic_machine=powerpc64le-unknown
patmandin@112
   938
		;;
patmandin@112
   939
	ppc64le-* | powerpc64little-*)
patmandin@112
   940
		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
patmandin@112
   941
		;;
slouken@0
   942
	ps2)
slouken@0
   943
		basic_machine=i386-ibm
slouken@0
   944
		;;
patmandin@112
   945
	pw32)
patmandin@112
   946
		basic_machine=i586-unknown
patmandin@112
   947
		os=-pw32
patmandin@112
   948
		;;
slouken@182
   949
	rdos)
slouken@182
   950
		basic_machine=i386-pc
slouken@182
   951
		os=-rdos
slouken@182
   952
		;;
slouken@0
   953
	rom68k)
slouken@0
   954
		basic_machine=m68k-rom68k
slouken@0
   955
		os=-coff
slouken@0
   956
		;;
slouken@0
   957
	rm[46]00)
slouken@0
   958
		basic_machine=mips-siemens
slouken@0
   959
		;;
slouken@0
   960
	rtpc | rtpc-*)
slouken@0
   961
		basic_machine=romp-ibm
slouken@0
   962
		;;
patmandin@112
   963
	s390 | s390-*)
patmandin@112
   964
		basic_machine=s390-ibm
patmandin@112
   965
		;;
patmandin@112
   966
	s390x | s390x-*)
patmandin@112
   967
		basic_machine=s390x-ibm
patmandin@112
   968
		;;
slouken@0
   969
	sa29200)
slouken@0
   970
		basic_machine=a29k-amd
slouken@0
   971
		os=-udi
slouken@0
   972
		;;
patmandin@112
   973
	sb1)
patmandin@112
   974
		basic_machine=mipsisa64sb1-unknown
patmandin@112
   975
		;;
patmandin@112
   976
	sb1el)
patmandin@112
   977
		basic_machine=mipsisa64sb1el-unknown
patmandin@112
   978
		;;
slouken@182
   979
	sde)
slouken@182
   980
		basic_machine=mipsisa32-sde
slouken@182
   981
		os=-elf
slouken@182
   982
		;;
slouken@182
   983
	sei)
slouken@182
   984
		basic_machine=mips-sei
slouken@182
   985
		os=-seiux
slouken@182
   986
		;;
slouken@0
   987
	sequent)
slouken@0
   988
		basic_machine=i386-sequent
slouken@0
   989
		;;
slouken@0
   990
	sh)
slouken@0
   991
		basic_machine=sh-hitachi
slouken@0
   992
		os=-hms
slouken@0
   993
		;;
slouken@182
   994
	sh5el)
slouken@182
   995
		basic_machine=sh5le-unknown
slouken@182
   996
		;;
slouken@182
   997
	sh64)
slouken@182
   998
		basic_machine=sh64-unknown
slouken@182
   999
		;;
patmandin@112
  1000
	sparclite-wrs | simso-wrs)
slouken@0
  1001
		basic_machine=sparclite-wrs
slouken@0
  1002
		os=-vxworks
slouken@0
  1003
		;;
slouken@0
  1004
	sps7)
slouken@0
  1005
		basic_machine=m68k-bull
slouken@0
  1006
		os=-sysv2
slouken@0
  1007
		;;
slouken@0
  1008
	spur)
slouken@0
  1009
		basic_machine=spur-unknown
slouken@0
  1010
		;;
slouken@0
  1011
	st2000)
slouken@0
  1012
		basic_machine=m68k-tandem
slouken@0
  1013
		;;
slouken@0
  1014
	stratus)
slouken@0
  1015
		basic_machine=i860-stratus
slouken@0
  1016
		os=-sysv4
slouken@0
  1017
		;;
slouken@0
  1018
	sun2)
slouken@0
  1019
		basic_machine=m68000-sun
slouken@0
  1020
		;;
slouken@0
  1021
	sun2os3)
slouken@0
  1022
		basic_machine=m68000-sun
slouken@0
  1023
		os=-sunos3
slouken@0
  1024
		;;
slouken@0
  1025
	sun2os4)
slouken@0
  1026
		basic_machine=m68000-sun
slouken@0
  1027
		os=-sunos4
slouken@0
  1028
		;;
slouken@0
  1029
	sun3os3)
slouken@0
  1030
		basic_machine=m68k-sun
slouken@0
  1031
		os=-sunos3
slouken@0
  1032
		;;
slouken@0
  1033
	sun3os4)
slouken@0
  1034
		basic_machine=m68k-sun
slouken@0
  1035
		os=-sunos4
slouken@0
  1036
		;;
slouken@0
  1037
	sun4os3)
slouken@0
  1038
		basic_machine=sparc-sun
slouken@0
  1039
		os=-sunos3
slouken@0
  1040
		;;
slouken@0
  1041
	sun4os4)
slouken@0
  1042
		basic_machine=sparc-sun
slouken@0
  1043
		os=-sunos4
slouken@0
  1044
		;;
slouken@0
  1045
	sun4sol2)
slouken@0
  1046
		basic_machine=sparc-sun
slouken@0
  1047
		os=-solaris2
slouken@0
  1048
		;;
slouken@0
  1049
	sun3 | sun3-*)
slouken@0
  1050
		basic_machine=m68k-sun
slouken@0
  1051
		;;
slouken@0
  1052
	sun4)
slouken@0
  1053
		basic_machine=sparc-sun
slouken@0
  1054
		;;
slouken@0
  1055
	sun386 | sun386i | roadrunner)
slouken@0
  1056
		basic_machine=i386-sun
slouken@0
  1057
		;;
slouken@2
  1058
	sv1)
slouken@2
  1059
		basic_machine=sv1-cray
slouken@2
  1060
		os=-unicos
slouken@2
  1061
		;;
slouken@0
  1062
	symmetry)
slouken@0
  1063
		basic_machine=i386-sequent
slouken@0
  1064
		os=-dynix
slouken@0
  1065
		;;
slouken@0
  1066
	t3e)
patmandin@112
  1067
		basic_machine=alphaev5-cray
slouken@0
  1068
		os=-unicos
slouken@0
  1069
		;;
patmandin@112
  1070
	t90)
patmandin@112
  1071
		basic_machine=t90-cray
patmandin@112
  1072
		os=-unicos
patmandin@112
  1073
		;;
slouken@2
  1074
	tic54x | c54x*)
slouken@2
  1075
		basic_machine=tic54x-unknown
slouken@2
  1076
		os=-coff
slouken@2
  1077
		;;
patmandin@112
  1078
	tic55x | c55x*)
patmandin@112
  1079
		basic_machine=tic55x-unknown
patmandin@112
  1080
		os=-coff
patmandin@112
  1081
		;;
patmandin@112
  1082
	tic6x | c6x*)
patmandin@112
  1083
		basic_machine=tic6x-unknown
patmandin@112
  1084
		os=-coff
patmandin@112
  1085
		;;
slouken@192
  1086
	tile*)
slouken@192
  1087
		basic_machine=tile-unknown
slouken@192
  1088
		os=-linux-gnu
slouken@192
  1089
		;;
slouken@0
  1090
	tx39)
slouken@0
  1091
		basic_machine=mipstx39-unknown
slouken@0
  1092
		;;
slouken@0
  1093
	tx39el)
slouken@0
  1094
		basic_machine=mipstx39el-unknown
slouken@0
  1095
		;;
patmandin@112
  1096
	toad1)
patmandin@112
  1097
		basic_machine=pdp10-xkl
patmandin@112
  1098
		os=-tops20
patmandin@112
  1099
		;;
slouken@0
  1100
	tower | tower-32)
slouken@0
  1101
		basic_machine=m68k-ncr
slouken@0
  1102
		;;
slouken@182
  1103
	tpf)
slouken@182
  1104
		basic_machine=s390x-ibm
slouken@182
  1105
		os=-tpf
slouken@182
  1106
		;;
slouken@0
  1107
	udi29k)
slouken@0
  1108
		basic_machine=a29k-amd
slouken@0
  1109
		os=-udi
slouken@0
  1110
		;;
slouken@0
  1111
	ultra3)
slouken@0
  1112
		basic_machine=a29k-nyu
slouken@0
  1113
		os=-sym1
slouken@0
  1114
		;;
slouken@0
  1115
	v810 | necv810)
slouken@0
  1116
		basic_machine=v810-nec
slouken@0
  1117
		os=-none
slouken@0
  1118
		;;
slouken@0
  1119
	vaxv)
slouken@0
  1120
		basic_machine=vax-dec
slouken@0
  1121
		os=-sysv
slouken@0
  1122
		;;
slouken@0
  1123
	vms)
slouken@0
  1124
		basic_machine=vax-dec
slouken@0
  1125
		os=-vms
slouken@0
  1126
		;;
slouken@0
  1127
	vpp*|vx|vx-*)
patmandin@112
  1128
		basic_machine=f301-fujitsu
patmandin@112
  1129
		;;
slouken@0
  1130
	vxworks960)
slouken@0
  1131
		basic_machine=i960-wrs
slouken@0
  1132
		os=-vxworks
slouken@0
  1133
		;;
slouken@0
  1134
	vxworks68)
slouken@0
  1135
		basic_machine=m68k-wrs
slouken@0
  1136
		os=-vxworks
slouken@0
  1137
		;;
slouken@0
  1138
	vxworks29k)
slouken@0
  1139
		basic_machine=a29k-wrs
slouken@0
  1140
		os=-vxworks
slouken@0
  1141
		;;
slouken@0
  1142
	w65*)
slouken@0
  1143
		basic_machine=w65-wdc
slouken@0
  1144
		os=-none
slouken@0
  1145
		;;
slouken@0
  1146
	w89k-*)
slouken@0
  1147
		basic_machine=hppa1.1-winbond
slouken@0
  1148
		os=-proelf
slouken@0
  1149
		;;
slouken@182
  1150
	xbox)
slouken@182
  1151
		basic_machine=i686-pc
slouken@182
  1152
		os=-mingw32
slouken@182
  1153
		;;
patmandin@112
  1154
	xps | xps100)
patmandin@112
  1155
		basic_machine=xps100-honeywell
patmandin@112
  1156
		;;
patmandin@112
  1157
	ymp)
patmandin@112
  1158
		basic_machine=ymp-cray
slouken@0
  1159
		os=-unicos
slouken@0
  1160
		;;
slouken@0
  1161
	z8k-*-coff)
slouken@0
  1162
		basic_machine=z8k-unknown
slouken@0
  1163
		os=-sim
slouken@0
  1164
		;;
slouken@192
  1165
	z80-*-coff)
slouken@192
  1166
		basic_machine=z80-unknown
slouken@192
  1167
		os=-sim
slouken@192
  1168
		;;
slouken@0
  1169
	none)
slouken@0
  1170
		basic_machine=none-none
slouken@0
  1171
		os=-none
slouken@0
  1172
		;;
slouken@0
  1173
slouken@0
  1174
# Here we handle the default manufacturer of certain CPU types.  It is in
slouken@0
  1175
# some cases the only manufacturer, in others, it is the most popular.
slouken@0
  1176
	w89k)
slouken@0
  1177
		basic_machine=hppa1.1-winbond
slouken@0
  1178
		;;
slouken@0
  1179
	op50n)
slouken@0
  1180
		basic_machine=hppa1.1-oki
slouken@0
  1181
		;;
slouken@0
  1182
	op60c)
slouken@0
  1183
		basic_machine=hppa1.1-oki
slouken@0
  1184
		;;
slouken@0
  1185
	romp)
slouken@0
  1186
		basic_machine=romp-ibm
slouken@0
  1187
		;;
slouken@182
  1188
	mmix)
slouken@182
  1189
		basic_machine=mmix-knuth
slouken@182
  1190
		;;
slouken@0
  1191
	rs6000)
slouken@0
  1192
		basic_machine=rs6000-ibm
slouken@0
  1193
		;;
slouken@0
  1194
	vax)
slouken@0
  1195
		basic_machine=vax-dec
slouken@0
  1196
		;;
slouken@16
  1197
	pdp10)
slouken@16
  1198
		# there are many clones, so DEC is not a safe bet
slouken@16
  1199
		basic_machine=pdp10-unknown
slouken@16
  1200
		;;
slouken@0
  1201
	pdp11)
slouken@0
  1202
		basic_machine=pdp11-dec
slouken@0
  1203
		;;
slouken@0
  1204
	we32k)
slouken@0
  1205
		basic_machine=we32k-att
slouken@0
  1206
		;;
slouken@192
  1207
	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
slouken@16
  1208
		basic_machine=sh-unknown
slouken@2
  1209
		;;
slouken@182
  1210
	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
slouken@0
  1211
		basic_machine=sparc-sun
slouken@0
  1212
		;;
patmandin@112
  1213
	cydra)
slouken@0
  1214
		basic_machine=cydra-cydrome
slouken@0
  1215
		;;
slouken@0
  1216
	orion)
slouken@0
  1217
		basic_machine=orion-highlevel
slouken@0
  1218
		;;
slouken@0
  1219
	orion105)
slouken@0
  1220
		basic_machine=clipper-highlevel
slouken@0
  1221
		;;
slouken@0
  1222
	mac | mpw | mac-mpw)
slouken@0
  1223
		basic_machine=m68k-apple
slouken@0
  1224
		;;
slouken@0
  1225
	pmac | pmac-mpw)
slouken@0
  1226
		basic_machine=powerpc-apple
slouken@0
  1227
		;;
patmandin@112
  1228
	*-unknown)
patmandin@112
  1229
		# Make sure to match an already-canonicalized machine name.
slouken@0
  1230
		;;
slouken@0
  1231
	*)
slouken@0
  1232
		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
slouken@0
  1233
		exit 1
slouken@0
  1234
		;;
slouken@0
  1235
esac
slouken@0
  1236
slouken@0
  1237
# Here we canonicalize certain aliases for manufacturers.
slouken@0
  1238
case $basic_machine in
slouken@0
  1239
	*-digital*)
slouken@0
  1240
		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
slouken@0
  1241
		;;
slouken@0
  1242
	*-commodore*)
slouken@0
  1243
		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
slouken@0
  1244
		;;
slouken@0
  1245
	*)
slouken@0
  1246
		;;
slouken@0
  1247
esac
slouken@0
  1248
slouken@0
  1249
# Decode manufacturer-specific aliases for certain operating systems.
slouken@0
  1250
slouken@0
  1251
if [ x"$os" != x"" ]
slouken@0
  1252
then
slouken@0
  1253
case $os in
slouken@0
  1254
        # First match some system type aliases
slouken@0
  1255
        # that might get confused with valid system types.
slouken@0
  1256
	# -solaris* is a basic system type, with this one exception.
slouken@0
  1257
	-solaris1 | -solaris1.*)
slouken@0
  1258
		os=`echo $os | sed -e 's|solaris1|sunos4|'`
slouken@0
  1259
		;;
slouken@0
  1260
	-solaris)
slouken@0
  1261
		os=-solaris2
slouken@0
  1262
		;;
slouken@0
  1263
	-svr4*)
slouken@0
  1264
		os=-sysv4
slouken@0
  1265
		;;
slouken@0
  1266
	-unixware*)
slouken@0
  1267
		os=-sysv4.2uw
slouken@0
  1268
		;;
slouken@0
  1269
	-gnu/linux*)
slouken@0
  1270
		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
slouken@0
  1271
		;;
slouken@0
  1272
	# First accept the basic system types.
slouken@0
  1273
	# The portable systems comes first.
slouken@0
  1274
	# Each alternative MUST END IN A *, to match a version number.
slouken@0
  1275
	# -sysv* is not here because it comes later, after sysvr4.
slouken@0
  1276
	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
slouken@220
  1277
	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
slouken@0
  1278
	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
slouken@192
  1279
	      | -kopensolaris* \
slouken@0
  1280
	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
slouken@192
  1281
	      | -aos* | -aros* \
slouken@0
  1282
	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
slouken@0
  1283
	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
slouken@182
  1284
	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
slouken@182
  1285
	      | -openbsd* | -solidbsd* \
slouken@182
  1286
	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
slouken@182
  1287
	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
slouken@0
  1288
	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
slouken@0
  1289
	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
slouken@192
  1290
	      | -chorusos* | -chorusrdb* | -cegcc* \
slouken@0
  1291
	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
slouken@182
  1292
	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
slouken@182
  1293
	      | -uxpv* | -beos* | -mpeix* | -udk* \
patmandin@112
  1294
	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
slouken@16
  1295
	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
patmandin@112
  1296
	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
patmandin@112
  1297
	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
patmandin@112
  1298
	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
slouken@182
  1299
	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
slouken@220
  1300
	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
slouken@0
  1301
	# Remember, each alternative MUST END IN *, to match a version number.
slouken@0
  1302
		;;
slouken@2
  1303
	-qnx*)
slouken@2
  1304
		case $basic_machine in
patmandin@112
  1305
		    x86-* | i*86-*)
slouken@2
  1306
			;;
slouken@2
  1307
		    *)
slouken@2
  1308
			os=-nto$os
slouken@2
  1309
			;;
slouken@2
  1310
		esac
slouken@2
  1311
		;;
slouken@182
  1312
	-nto-qnx*)
slouken@182
  1313
		;;
slouken@2
  1314
	-nto*)
slouken@182
  1315
		os=`echo $os | sed -e 's|nto|nto-qnx|'`
slouken@2
  1316
		;;
slouken@0
  1317
	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
slouken@182
  1318
	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
slouken@2
  1319
	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
slouken@0
  1320
		;;
slouken@0
  1321
	-mac*)
slouken@0
  1322
		os=`echo $os | sed -e 's|mac|macos|'`
slouken@0
  1323
		;;
slouken@182
  1324
	-linux-dietlibc)
slouken@182
  1325
		os=-linux-dietlibc
slouken@182
  1326
		;;
slouken@0
  1327
	-linux*)
slouken@0
  1328
		os=`echo $os | sed -e 's|linux|linux-gnu|'`
slouken@0
  1329
		;;
slouken@0
  1330
	-sunos5*)
slouken@0
  1331
		os=`echo $os | sed -e 's|sunos5|solaris2|'`
slouken@0
  1332
		;;
slouken@0
  1333
	-sunos6*)
slouken@0
  1334
		os=`echo $os | sed -e 's|sunos6|solaris3|'`
slouken@0
  1335
		;;
slouken@2
  1336
	-opened*)
slouken@2
  1337
		os=-openedition
slouken@2
  1338
		;;
slouken@182
  1339
        -os400*)
slouken@182
  1340
		os=-os400
slouken@182
  1341
		;;
slouken@2
  1342
	-wince*)
slouken@2
  1343
		os=-wince
slouken@2
  1344
		;;
slouken@0
  1345
	-osfrose*)
slouken@0
  1346
		os=-osfrose
slouken@0
  1347
		;;
slouken@0
  1348
	-osf*)
slouken@0
  1349
		os=-osf
slouken@0
  1350
		;;
slouken@0
  1351
	-utek*)
slouken@0
  1352
		os=-bsd
slouken@0
  1353
		;;
slouken@0
  1354
	-dynix*)
slouken@0
  1355
		os=-bsd
slouken@0
  1356
		;;
slouken@0
  1357
	-acis*)
slouken@0
  1358
		os=-aos
slouken@0
  1359
		;;
patmandin@112
  1360
	-atheos*)
patmandin@112
  1361
		os=-atheos
patmandin@112
  1362
		;;
slouken@182
  1363
	-syllable*)
slouken@182
  1364
		os=-syllable
slouken@182
  1365
		;;
slouken@0
  1366
	-386bsd)
slouken@0
  1367
		os=-bsd
slouken@0
  1368
		;;
slouken@0
  1369
	-ctix* | -uts*)
slouken@0
  1370
		os=-sysv
slouken@0
  1371
		;;
patmandin@112
  1372
	-nova*)
patmandin@112
  1373
		os=-rtmk-nova
patmandin@112
  1374
		;;
slouken@0
  1375
	-ns2 )
patmandin@112
  1376
		os=-nextstep2
slouken@0
  1377
		;;
slouken@16
  1378
	-nsk*)
slouken@2
  1379
		os=-nsk
slouken@2
  1380
		;;
slouken@0
  1381
	# Preserve the version number of sinix5.
slouken@0
  1382
	-sinix5.*)
slouken@0
  1383
		os=`echo $os | sed -e 's|sinix|sysv|'`
slouken@0
  1384
		;;
slouken@0
  1385
	-sinix*)
slouken@0
  1386
		os=-sysv4
slouken@0
  1387
		;;
slouken@182
  1388
        -tpf*)
slouken@182
  1389
		os=-tpf
slouken@182
  1390
		;;
slouken@0
  1391
	-triton*)
slouken@0
  1392
		os=-sysv3
slouken@0
  1393
		;;
slouken@0
  1394
	-oss*)
slouken@0
  1395
		os=-sysv3
slouken@0
  1396
		;;
slouken@0
  1397
	-svr4)
slouken@0
  1398
		os=-sysv4
slouken@0
  1399
		;;
slouken@0
  1400
	-svr3)
slouken@0
  1401
		os=-sysv3
slouken@0
  1402
		;;
slouken@0
  1403
	-sysvr4)
slouken@0
  1404
		os=-sysv4
slouken@0
  1405
		;;
slouken@0
  1406
	# This must come after -sysvr4.
slouken@0
  1407
	-sysv*)
slouken@0
  1408
		;;
slouken@0
  1409
	-ose*)
slouken@0
  1410
		os=-ose
slouken@0
  1411
		;;
slouken@0
  1412
	-es1800*)
slouken@0
  1413
		os=-ose
slouken@0
  1414
		;;
slouken@0
  1415
	-xenix)
slouken@0
  1416
		os=-xenix
slouken@0
  1417
		;;
patmandin@112
  1418
	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
patmandin@112
  1419
		os=-mint
patmandin@112
  1420
		;;
patmandin@112
  1421
	-aros*)
patmandin@112
  1422
		os=-aros
patmandin@112
  1423
		;;
patmandin@112
  1424
	-kaos*)
patmandin@112
  1425
		os=-kaos
slouken@0
  1426
		;;
slouken@182
  1427
	-zvmoe)
slouken@182
  1428
		os=-zvmoe
slouken@182
  1429
		;;
slouken@192
  1430
	-dicos*)
slouken@192
  1431
		os=-dicos
slouken@192
  1432
		;;
slouken@0
  1433
	-none)
slouken@0
  1434
		;;
slouken@0
  1435
	*)
slouken@0
  1436
		# Get rid of the `-' at the beginning of $os.
slouken@0
  1437
		os=`echo $os | sed 's/[^-]*-//'`
slouken@0
  1438
		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
slouken@0
  1439
		exit 1
slouken@0
  1440
		;;
slouken@0
  1441
esac
slouken@0
  1442
else
slouken@0
  1443
slouken@0
  1444
# Here we handle the default operating systems that come with various machines.
slouken@0
  1445
# The value should be what the vendor currently ships out the door with their
slouken@0
  1446
# machine or put another way, the most popular os provided with the machine.
slouken@0
  1447
slouken@0
  1448
# Note that if you're going to try to match "-MANUFACTURER" here (say,
slouken@0
  1449
# "-sun"), then you have to tell the case statement up towards the top
slouken@0
  1450
# that MANUFACTURER isn't an operating system.  Otherwise, code above
slouken@0
  1451
# will signal an error saying that MANUFACTURER isn't an operating
slouken@0
  1452
# system, and we'll never get to this point.
slouken@0
  1453
slouken@0
  1454
case $basic_machine in
slouken@182
  1455
        score-*)
slouken@182
  1456
		os=-elf
slouken@182
  1457
		;;
slouken@182
  1458
        spu-*)
slouken@182
  1459
		os=-elf
slouken@182
  1460
		;;
slouken@0
  1461
	*-acorn)
slouken@0
  1462
		os=-riscix1.2
slouken@0
  1463
		;;
slouken@2
  1464
	arm*-rebel)
slouken@0
  1465
		os=-linux
slouken@0
  1466
		;;
slouken@0
  1467
	arm*-semi)
slouken@0
  1468
		os=-aout
slouken@0
  1469
		;;
slouken@182
  1470
        c4x-* | tic4x-*)
slouken@182
  1471
        	os=-coff
slouken@182
  1472
		;;
patmandin@112
  1473
	# This must come before the *-dec entry.
slouken@16
  1474
	pdp10-*)
slouken@16
  1475
		os=-tops20
slouken@16
  1476
		;;
patmandin@112
  1477
	pdp11-*)
slouken@0
  1478
		os=-none
slouken@0
  1479
		;;
slouken@0
  1480
	*-dec | vax-*)
slouken@0
  1481
		os=-ultrix4.2
slouken@0
  1482
		;;
slouken@0
  1483
	m68*-apollo)
slouken@0
  1484
		os=-domain
slouken@0
  1485
		;;
slouken@0
  1486
	i386-sun)
slouken@0
  1487
		os=-sunos4.0.2
slouken@0
  1488
		;;
slouken@0
  1489
	m68000-sun)
slouken@0
  1490
		os=-sunos3
slouken@0
  1491
		# This also exists in the configure program, but was not the
slouken@0
  1492
		# default.
slouken@0
  1493
		# os=-sunos4
slouken@0
  1494
		;;
slouken@0
  1495
	m68*-cisco)
slouken@0
  1496
		os=-aout
slouken@0
  1497
		;;
slouken@182
  1498
        mep-*)
slouken@182
  1499
		os=-elf
slouken@182
  1500
		;;
slouken@0
  1501
	mips*-cisco)
slouken@0
  1502
		os=-elf
slouken@0
  1503
		;;
slouken@0
  1504
	mips*-*)
slouken@0
  1505
		os=-elf
slouken@0
  1506
		;;
patmandin@112
  1507
	or32-*)
patmandin@112
  1508
		os=-coff
patmandin@112
  1509
		;;
slouken@0
  1510
	*-tti)	# must be before sparc entry or we get the wrong os.
slouken@0
  1511
		os=-sysv3
slouken@0
  1512
		;;
slouken@0
  1513
	sparc-* | *-sun)
slouken@0
  1514
		os=-sunos4.1.1
slouken@0
  1515
		;;
slouken@0
  1516
	*-be)
slouken@0
  1517
		os=-beos
slouken@0
  1518
		;;
slouken@182
  1519
	*-haiku)
slouken@182
  1520
		os=-haiku
slouken@182
  1521
		;;
slouken@0
  1522
	*-ibm)
slouken@0
  1523
		os=-aix
slouken@0
  1524
		;;
slouken@182
  1525
    	*-knuth)
slouken@182
  1526
		os=-mmixware
slouken@182
  1527
		;;
slouken@0
  1528
	*-wec)
slouken@0
  1529
		os=-proelf
slouken@0
  1530
		;;
slouken@0
  1531
	*-winbond)
slouken@0
  1532
		os=-proelf
slouken@0
  1533
		;;
slouken@0
  1534
	*-oki)
slouken@0
  1535
		os=-proelf
slouken@0
  1536
		;;
slouken@0
  1537
	*-hp)
slouken@0
  1538
		os=-hpux
slouken@0
  1539
		;;
slouken@0
  1540
	*-hitachi)
slouken@0
  1541
		os=-hiux
slouken@0
  1542
		;;
slouken@0
  1543
	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
slouken@0
  1544
		os=-sysv
slouken@0
  1545
		;;
slouken@0
  1546
	*-cbm)
slouken@0
  1547
		os=-amigaos
slouken@0
  1548
		;;
slouken@0
  1549
	*-dg)
slouken@0
  1550
		os=-dgux
slouken@0
  1551
		;;
slouken@0
  1552
	*-dolphin)
slouken@0
  1553
		os=-sysv3
slouken@0
  1554
		;;
slouken@0
  1555
	m68k-ccur)
slouken@0
  1556
		os=-rtu
slouken@0
  1557
		;;
slouken@0
  1558
	m88k-omron*)
slouken@0
  1559
		os=-luna
slouken@0
  1560
		;;
slouken@0
  1561
	*-next )
slouken@0
  1562
		os=-nextstep
slouken@0
  1563
		;;
slouken@0
  1564
	*-sequent)
slouken@0
  1565
		os=-ptx
slouken@0
  1566
		;;
slouken@0
  1567
	*-crds)
slouken@0
  1568
		os=-unos
slouken@0
  1569
		;;
slouken@0
  1570
	*-ns)
slouken@0
  1571
		os=-genix
slouken@0
  1572
		;;
slouken@0
  1573
	i370-*)
slouken@0
  1574
		os=-mvs
slouken@0
  1575
		;;
slouken@0
  1576
	*-next)
slouken@0
  1577
		os=-nextstep3
slouken@0
  1578
		;;
patmandin@112
  1579
	*-gould)
slouken@0
  1580
		os=-sysv
slouken@0
  1581
		;;
patmandin@112
  1582
	*-highlevel)
slouken@0
  1583
		os=-bsd
slouken@0
  1584
		;;
slouken@0
  1585
	*-encore)
slouken@0
  1586
		os=-bsd
slouken@0
  1587
		;;
patmandin@112
  1588
	*-sgi)
slouken@0
  1589
		os=-irix
slouken@0
  1590
		;;
patmandin@112
  1591
	*-siemens)
slouken@0
  1592
		os=-sysv4
slouken@0
  1593
		;;
slouken@0
  1594
	*-masscomp)
slouken@0
  1595
		os=-rtu
slouken@0
  1596
		;;
slouken@16
  1597
	f30[01]-fujitsu | f700-fujitsu)
slouken@0
  1598
		os=-uxpv
slouken@0
  1599
		;;
slouken@0
  1600
	*-rom68k)
slouken@0
  1601
		os=-coff
slouken@0
  1602
		;;
slouken@0
  1603
	*-*bug)
slouken@0
  1604
		os=-coff
slouken@0
  1605
		;;
slouken@0
  1606
	*-apple)
slouken@0
  1607
		os=-macos
slouken@0
  1608
		;;
slouken@0
  1609
	*-atari*)
slouken@0
  1610
		os=-mint
slouken@0
  1611
		;;
slouken@0
  1612
	*)
slouken@0
  1613
		os=-none
slouken@0
  1614
		;;
slouken@0
  1615
esac
slouken@0
  1616
fi
slouken@0
  1617
slouken@0
  1618
# Here we handle the case where we know the os, and the CPU type, but not the
slouken@0
  1619
# manufacturer.  We pick the logical manufacturer.
slouken@0
  1620
vendor=unknown
slouken@0
  1621
case $basic_machine in
slouken@0
  1622
	*-unknown)
slouken@0
  1623
		case $os in
slouken@0
  1624
			-riscix*)
slouken@0
  1625
				vendor=acorn
slouken@0
  1626
				;;
slouken@0
  1627
			-sunos*)
slouken@0
  1628
				vendor=sun
slouken@0
  1629
				;;
slouken@220
  1630
			-cnk*|-aix*)
slouken@0
  1631
				vendor=ibm
slouken@0
  1632
				;;
slouken@0
  1633
			-beos*)
slouken@0
  1634
				vendor=be
slouken@0
  1635
				;;
slouken@0
  1636
			-hpux*)
slouken@0
  1637
				vendor=hp
slouken@0
  1638
				;;
slouken@0
  1639
			-mpeix*)
slouken@0
  1640
				vendor=hp
slouken@0
  1641
				;;
slouken@0
  1642
			-hiux*)
slouken@0
  1643
				vendor=hitachi
slouken@0
  1644
				;;
slouken@0
  1645
			-unos*)
slouken@0
  1646
				vendor=crds
slouken@0
  1647
				;;
slouken@0
  1648
			-dgux*)
slouken@0
  1649
				vendor=dg
slouken@0
  1650
				;;
slouken@0
  1651
			-luna*)
slouken@0
  1652
				vendor=omron
slouken@0
  1653
				;;
slouken@0
  1654
			-genix*)
slouken@0
  1655
				vendor=ns
slouken@0
  1656
				;;
slouken@2
  1657
			-mvs* | -opened*)
slouken@0
  1658
				vendor=ibm
slouken@0
  1659
				;;
slouken@182
  1660
			-os400*)
slouken@182
  1661
				vendor=ibm
slouken@182
  1662
				;;
slouken@0
  1663
			-ptx*)
slouken@0
  1664
				vendor=sequent
slouken@0
  1665
				;;
slouken@182
  1666
			-tpf*)
slouken@182
  1667
				vendor=ibm
slouken@182
  1668
				;;
patmandin@112
  1669
			-vxsim* | -vxworks* | -windiss*)
slouken@0
  1670
				vendor=wrs
slouken@0
  1671
				;;
slouken@0
  1672
			-aux*)
slouken@0
  1673
				vendor=apple
slouken@0
  1674
				;;
slouken@0
  1675
			-hms*)
slouken@0
  1676
				vendor=hitachi
slouken@0
  1677
				;;
slouken@0
  1678
			-mpw* | -macos*)
slouken@0
  1679
				vendor=apple
slouken@0
  1680
				;;
slouken@16
  1681
			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
slouken@0
  1682
				vendor=atari
slouken@0
  1683
				;;
patmandin@112
  1684
			-vos*)
patmandin@112
  1685
				vendor=stratus
patmandin@112
  1686
				;;
slouken@0
  1687
		esac
slouken@0
  1688
		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
slouken@0
  1689
		;;
slouken@0
  1690
esac
slouken@0
  1691
slouken@0
  1692
echo $basic_machine$os
slouken@182
  1693
exit
slouken@2
  1694
slouken@2
  1695
# Local variables:
slouken@2
  1696
# eval: (add-hook 'write-file-hooks 'time-stamp)
slouken@16
  1697
# time-stamp-start: "timestamp='"
slouken@2
  1698
# time-stamp-format: "%:y-%02m-%02d"
slouken@2
  1699
# time-stamp-end: "'"
slouken@2
  1700
# End: