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