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