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