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