scripts/config.sub
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Jun 23 22:52:13 2009 +0200 (2009-06-23)
changeset 1418 339c8a5c9797
parent 1309 8f5a412ba2ac
child 1511 3cf40e1f1ba6
permissions -rwxr-xr-x
[tools] Update config.guess and config.sub

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