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