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