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