blob: 519f2cd0066c56a2f4ea646d4c8648561402a80a [file] [log] [blame]
Damien Millerb405d612000-06-12 23:01:02 +10001#! /bin/sh
Damien Miller5bf5f2c2001-05-06 10:54:15 +10002# Configuration validation subroutine script.
Damien Millera7609f52002-07-25 14:40:22 +10003# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
Tim Rice5f707582005-06-01 19:57:45 -07004# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
Damien Millerb405d612000-06-12 23:01:02 +10005
Tim Rice5f707582005-06-01 19:57:45 -07006timestamp='2005-05-12'
Damien Millerb405d612000-06-12 23:01:02 +10007
8# This file is (in principle) common to ALL GNU software.
9# The presence of a machine in this file suggests that SOME GNU software
10# can handle that machine. It does not imply ALL GNU software can.
11#
12# This file is free software; you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by
14# the Free Software Foundation; either version 2 of the License, or
15# (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, write to the Free Software
Tim Rice5f707582005-06-01 19:57:45 -070024# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
25# 02110-1301, USA.
26#
Damien Millerb405d612000-06-12 23:01:02 +100027# As a special exception to the GNU General Public License, if you
28# distribute this file as part of a program that contains a
29# configuration script generated by Autoconf, you may include it under
30# the same distribution terms that you use for the rest of that program.
31
Tim Rice5f707582005-06-01 19:57:45 -070032
Damien Millera7609f52002-07-25 14:40:22 +100033# Please send patches to <config-patches@gnu.org>. Submit a context
34# diff and a properly formatted ChangeLog entry.
Damien Millerb405d612000-06-12 23:01:02 +100035#
36# Configuration subroutine to validate and canonicalize a configuration type.
37# Supply the specified configuration type as an argument.
38# If it is invalid, we print an error message on stderr and exit with code 1.
39# Otherwise, we print the canonical config type on stdout and succeed.
40
41# This file is supposed to be the same for all GNU packages
42# and recognize all the CPU types, system types and aliases
43# that are meaningful with *any* GNU software.
44# Each package is responsible for reporting which valid configurations
45# it does not support. The user should be able to distinguish
46# a failure to support a valid configuration from a meaningless
47# configuration.
48
49# The goal of this file is to map all the various variations of a given
50# machine specification into a single specification in the form:
51# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
52# or in some cases, the newer four-part form:
53# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
54# It is wrong to echo any other type of specification.
55
56me=`echo "$0" | sed -e 's,.*/,,'`
57
58usage="\
59Usage: $0 [OPTION] CPU-MFR-OPSYS
60 $0 [OPTION] ALIAS
61
62Canonicalize a configuration name.
63
64Operation modes:
Damien Miller5bf5f2c2001-05-06 10:54:15 +100065 -h, --help print this help, then exit
66 -t, --time-stamp print date of last modification, then exit
67 -v, --version print version number, then exit
68
69Report bugs and patches to <config-patches@gnu.org>."
70
71version="\
72GNU config.sub ($timestamp)
73
Tim Rice5f707582005-06-01 19:57:45 -070074Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Damien Miller5bf5f2c2001-05-06 10:54:15 +100075Free Software Foundation, Inc.
76
77This is free software; see the source for copying conditions. There is NO
78warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
Damien Millerb405d612000-06-12 23:01:02 +100079
80help="
81Try \`$me --help' for more information."
82
83# Parse command line
84while test $# -gt 0 ; do
Damien Miller5bf5f2c2001-05-06 10:54:15 +100085 case $1 in
86 --time-stamp | --time* | -t )
Tim Rice5f707582005-06-01 19:57:45 -070087 echo "$timestamp" ; exit ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +100088 --version | -v )
Tim Rice5f707582005-06-01 19:57:45 -070089 echo "$version" ; exit ;;
Damien Millerb405d612000-06-12 23:01:02 +100090 --help | --h* | -h )
Tim Rice5f707582005-06-01 19:57:45 -070091 echo "$usage"; exit ;;
Damien Millerb405d612000-06-12 23:01:02 +100092 -- ) # Stop option processing
93 shift; break ;;
94 - ) # Use stdin as input.
95 break ;;
96 -* )
Damien Miller5bf5f2c2001-05-06 10:54:15 +100097 echo "$me: invalid option $1$help"
Damien Millerb405d612000-06-12 23:01:02 +100098 exit 1 ;;
99
100 *local*)
101 # First pass through any local machine types.
102 echo $1
Tim Rice5f707582005-06-01 19:57:45 -0700103 exit ;;
Damien Millerb405d612000-06-12 23:01:02 +1000104
105 * )
106 break ;;
107 esac
108done
109
110case $# in
111 0) echo "$me: missing argument$help" >&2
112 exit 1;;
113 1) ;;
114 *) echo "$me: too many arguments$help" >&2
115 exit 1;;
116esac
117
118# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
119# Here we must recognize all the valid KERNEL-OS combinations.
120maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
121case $maybe_os in
Tim Rice5f707582005-06-01 19:57:45 -0700122 nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
123 kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
Damien Millerb405d612000-06-12 23:01:02 +1000124 os=-$maybe_os
125 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
126 ;;
127 *)
128 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
129 if [ $basic_machine != $1 ]
130 then os=`echo $1 | sed 's/.*-/-/'`
131 else os=; fi
132 ;;
133esac
134
135### Let's recognize common machines as not being operating systems so
136### that things like config.sub decstation-3100 work. We also
137### recognize some manufacturers as not being operating systems, so we
138### can provide default operating systems below.
139case $os in
140 -sun*os*)
141 # Prevent following clause from handling this invalid input.
142 ;;
143 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
144 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
145 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
146 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
147 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
148 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
Tim Rice5f707582005-06-01 19:57:45 -0700149 -apple | -axis | -knuth | -cray)
Damien Millerb405d612000-06-12 23:01:02 +1000150 os=
151 basic_machine=$1
152 ;;
153 -sim | -cisco | -oki | -wec | -winbond)
154 os=
155 basic_machine=$1
156 ;;
157 -scout)
158 ;;
159 -wrs)
160 os=-vxworks
161 basic_machine=$1
162 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000163 -chorusos*)
164 os=-chorusos
165 basic_machine=$1
166 ;;
Damien Miller752e4e62004-04-21 12:29:13 +1000167 -chorusrdb)
168 os=-chorusrdb
Damien Millera7609f52002-07-25 14:40:22 +1000169 basic_machine=$1
Damien Miller752e4e62004-04-21 12:29:13 +1000170 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000171 -hiux*)
172 os=-hiuxwe2
173 ;;
174 -sco5)
175 os=-sco3.2v5
176 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
177 ;;
178 -sco4)
179 os=-sco3.2v4
180 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
181 ;;
182 -sco3.2.[4-9]*)
183 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
184 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
185 ;;
186 -sco3.2v[4-9]*)
187 # Don't forget version if it is 3.2v4 or newer.
188 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
189 ;;
190 -sco*)
191 os=-sco3.2v2
192 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
193 ;;
194 -udk*)
195 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
196 ;;
197 -isc)
198 os=-isc2.2
199 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
200 ;;
201 -clix*)
202 basic_machine=clipper-intergraph
203 ;;
204 -isc*)
205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206 ;;
207 -lynx*)
208 os=-lynxos
209 ;;
210 -ptx*)
211 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
212 ;;
213 -windowsnt*)
214 os=`echo $os | sed -e 's/windowsnt/winnt/'`
215 ;;
216 -psos*)
217 os=-psos
218 ;;
219 -mint | -mint[0-9]*)
220 basic_machine=m68k-atari
221 os=-mint
222 ;;
223esac
224
225# Decode aliases for certain CPU-COMPANY combinations.
226case $basic_machine in
227 # Recognize the basic CPU types without company name.
228 # Some are omitted here because they have special meanings below.
Damien Millera7609f52002-07-25 14:40:22 +1000229 1750a | 580 \
230 | a29k \
231 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
232 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
Damien Miller752e4e62004-04-21 12:29:13 +1000233 | am33_2.0 \
Damien Millera7609f52002-07-25 14:40:22 +1000234 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
Tim Rice5f707582005-06-01 19:57:45 -0700235 | bfin \
Damien Millera7609f52002-07-25 14:40:22 +1000236 | c4x | clipper \
237 | d10v | d30v | dlx | dsp16xx \
238 | fr30 | frv \
239 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
240 | i370 | i860 | i960 | ia64 \
Damien Miller752e4e62004-04-21 12:29:13 +1000241 | ip2k | iq2000 \
Tim Rice5f707582005-06-01 19:57:45 -0700242 | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
Damien Millera7609f52002-07-25 14:40:22 +1000243 | mips | mipsbe | mipseb | mipsel | mipsle \
244 | mips16 \
245 | mips64 | mips64el \
Damien Miller752e4e62004-04-21 12:29:13 +1000246 | mips64vr | mips64vrel \
Damien Millera7609f52002-07-25 14:40:22 +1000247 | mips64orion | mips64orionel \
248 | mips64vr4100 | mips64vr4100el \
249 | mips64vr4300 | mips64vr4300el \
250 | mips64vr5000 | mips64vr5000el \
251 | mipsisa32 | mipsisa32el \
Damien Miller752e4e62004-04-21 12:29:13 +1000252 | mipsisa32r2 | mipsisa32r2el \
Damien Millera7609f52002-07-25 14:40:22 +1000253 | mipsisa64 | mipsisa64el \
Damien Miller752e4e62004-04-21 12:29:13 +1000254 | mipsisa64r2 | mipsisa64r2el \
Damien Millera7609f52002-07-25 14:40:22 +1000255 | mipsisa64sb1 | mipsisa64sb1el \
Damien Miller752e4e62004-04-21 12:29:13 +1000256 | mipsisa64sr71k | mipsisa64sr71kel \
Damien Millera7609f52002-07-25 14:40:22 +1000257 | mipstx39 | mipstx39el \
258 | mn10200 | mn10300 \
Damien Miller752e4e62004-04-21 12:29:13 +1000259 | msp430 \
Damien Millera7609f52002-07-25 14:40:22 +1000260 | ns16k | ns32k \
261 | openrisc | or32 \
262 | pdp10 | pdp11 | pj | pjl \
263 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
264 | pyramid \
Damien Miller752e4e62004-04-21 12:29:13 +1000265 | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
Damien Millera7609f52002-07-25 14:40:22 +1000266 | sh64 | sh64le \
Tim Rice5f707582005-06-01 19:57:45 -0700267 | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
268 | sparcv8 | sparcv9 | sparcv9b \
Damien Millera7609f52002-07-25 14:40:22 +1000269 | strongarm \
Damien Miller752e4e62004-04-21 12:29:13 +1000270 | tahoe | thumb | tic4x | tic80 | tron \
Damien Millera7609f52002-07-25 14:40:22 +1000271 | v850 | v850e \
272 | we32k \
Tim Rice5f707582005-06-01 19:57:45 -0700273 | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
Damien Millera7609f52002-07-25 14:40:22 +1000274 | z8k)
Damien Millerb405d612000-06-12 23:01:02 +1000275 basic_machine=$basic_machine-unknown
276 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000277 m6811 | m68hc11 | m6812 | m68hc12)
278 # Motorola 68HC11/12.
279 basic_machine=$basic_machine-unknown
280 os=-none
281 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000282 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
Damien Millerb405d612000-06-12 23:01:02 +1000283 ;;
284
285 # We use `pc' rather than `unknown'
286 # because (1) that's what they normally are, and
287 # (2) the word "unknown" tends to confuse beginning users.
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000288 i*86 | x86_64)
Damien Millerb405d612000-06-12 23:01:02 +1000289 basic_machine=$basic_machine-pc
290 ;;
291 # Object if more than one company name word.
292 *-*-*)
293 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
294 exit 1
295 ;;
296 # Recognize the basic CPU types with company name.
Damien Millera7609f52002-07-25 14:40:22 +1000297 580-* \
298 | a29k-* \
299 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
300 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
301 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
302 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
303 | avr-* \
Tim Rice5f707582005-06-01 19:57:45 -0700304 | bfin-* | bs2000-* \
Damien Miller752e4e62004-04-21 12:29:13 +1000305 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
Tim Rice5f707582005-06-01 19:57:45 -0700306 | clipper-* | craynv-* | cydra-* \
Damien Millera7609f52002-07-25 14:40:22 +1000307 | d10v-* | d30v-* | dlx-* \
308 | elxsi-* \
309 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
310 | h8300-* | h8500-* \
311 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
312 | i*86-* | i860-* | i960-* | ia64-* \
Damien Miller752e4e62004-04-21 12:29:13 +1000313 | ip2k-* | iq2000-* \
Tim Rice5f707582005-06-01 19:57:45 -0700314 | m32r-* | m32rle-* \
Damien Millera7609f52002-07-25 14:40:22 +1000315 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
Tim Rice5f707582005-06-01 19:57:45 -0700316 | m88110-* | m88k-* | maxq-* | mcore-* \
Damien Millera7609f52002-07-25 14:40:22 +1000317 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
318 | mips16-* \
319 | mips64-* | mips64el-* \
Damien Miller752e4e62004-04-21 12:29:13 +1000320 | mips64vr-* | mips64vrel-* \
Damien Millera7609f52002-07-25 14:40:22 +1000321 | mips64orion-* | mips64orionel-* \
322 | mips64vr4100-* | mips64vr4100el-* \
323 | mips64vr4300-* | mips64vr4300el-* \
324 | mips64vr5000-* | mips64vr5000el-* \
325 | mipsisa32-* | mipsisa32el-* \
Damien Miller752e4e62004-04-21 12:29:13 +1000326 | mipsisa32r2-* | mipsisa32r2el-* \
Damien Millera7609f52002-07-25 14:40:22 +1000327 | mipsisa64-* | mipsisa64el-* \
Damien Miller752e4e62004-04-21 12:29:13 +1000328 | mipsisa64r2-* | mipsisa64r2el-* \
Damien Millera7609f52002-07-25 14:40:22 +1000329 | mipsisa64sb1-* | mipsisa64sb1el-* \
Damien Miller752e4e62004-04-21 12:29:13 +1000330 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
331 | mipstx39-* | mipstx39el-* \
Tim Rice5f707582005-06-01 19:57:45 -0700332 | mmix-* \
Damien Miller752e4e62004-04-21 12:29:13 +1000333 | msp430-* \
Tim Rice5f707582005-06-01 19:57:45 -0700334 | none-* | np1-* | ns16k-* | ns32k-* \
Damien Millera7609f52002-07-25 14:40:22 +1000335 | orion-* \
336 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
337 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
338 | pyramid-* \
339 | romp-* | rs6000-* \
Damien Miller752e4e62004-04-21 12:29:13 +1000340 | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
Damien Millera7609f52002-07-25 14:40:22 +1000341 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
Tim Rice5f707582005-06-01 19:57:45 -0700342 | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
343 | sparclite-* \
344 | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
Damien Miller752e4e62004-04-21 12:29:13 +1000345 | tahoe-* | thumb-* \
346 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
347 | tron-* \
Damien Millera7609f52002-07-25 14:40:22 +1000348 | v850-* | v850e-* | vax-* \
349 | we32k-* \
Tim Rice5f707582005-06-01 19:57:45 -0700350 | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
351 | xstormy16-* | xtensa-* \
Damien Millera7609f52002-07-25 14:40:22 +1000352 | ymp-* \
353 | z8k-*)
Damien Millerb405d612000-06-12 23:01:02 +1000354 ;;
355 # Recognize the various machine names and aliases which stand
356 # for a CPU type and a company and sometimes even an OS.
357 386bsd)
358 basic_machine=i386-unknown
359 os=-bsd
360 ;;
361 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
362 basic_machine=m68000-att
363 ;;
364 3b*)
365 basic_machine=we32k-att
366 ;;
367 a29khif)
368 basic_machine=a29k-amd
369 os=-udi
370 ;;
Tim Rice5f707582005-06-01 19:57:45 -0700371 abacus)
372 basic_machine=abacus-unknown
373 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000374 adobe68k)
375 basic_machine=m68010-adobe
376 os=-scout
377 ;;
378 alliant | fx80)
379 basic_machine=fx80-alliant
380 ;;
381 altos | altos3068)
382 basic_machine=m68k-altos
383 ;;
384 am29k)
385 basic_machine=a29k-none
386 os=-bsd
387 ;;
Damien Miller752e4e62004-04-21 12:29:13 +1000388 amd64)
389 basic_machine=x86_64-pc
390 ;;
Tim Rice5f707582005-06-01 19:57:45 -0700391 amd64-*)
392 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
393 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000394 amdahl)
395 basic_machine=580-amdahl
396 os=-sysv
397 ;;
398 amiga | amiga-*)
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000399 basic_machine=m68k-unknown
Damien Millerb405d612000-06-12 23:01:02 +1000400 ;;
401 amigaos | amigados)
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000402 basic_machine=m68k-unknown
Damien Millerb405d612000-06-12 23:01:02 +1000403 os=-amigaos
404 ;;
405 amigaunix | amix)
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000406 basic_machine=m68k-unknown
Damien Millerb405d612000-06-12 23:01:02 +1000407 os=-sysv4
408 ;;
409 apollo68)
410 basic_machine=m68k-apollo
411 os=-sysv
412 ;;
413 apollo68bsd)
414 basic_machine=m68k-apollo
415 os=-bsd
416 ;;
417 aux)
418 basic_machine=m68k-apple
419 os=-aux
420 ;;
421 balance)
422 basic_machine=ns32k-sequent
423 os=-dynix
424 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000425 c90)
426 basic_machine=c90-cray
427 os=-unicos
428 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000429 convex-c1)
430 basic_machine=c1-convex
431 os=-bsd
432 ;;
433 convex-c2)
434 basic_machine=c2-convex
435 os=-bsd
436 ;;
437 convex-c32)
438 basic_machine=c32-convex
439 os=-bsd
440 ;;
441 convex-c34)
442 basic_machine=c34-convex
443 os=-bsd
444 ;;
445 convex-c38)
446 basic_machine=c38-convex
447 os=-bsd
448 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000449 cray | j90)
450 basic_machine=j90-cray
Damien Millerb405d612000-06-12 23:01:02 +1000451 os=-unicos
452 ;;
Tim Rice5f707582005-06-01 19:57:45 -0700453 craynv)
454 basic_machine=craynv-cray
455 os=-unicosmp
456 ;;
457 cr16c)
458 basic_machine=cr16c-unknown
459 os=-elf
460 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000461 crds | unos)
462 basic_machine=m68k-crds
463 ;;
Tim Rice5f707582005-06-01 19:57:45 -0700464 crisv32 | crisv32-* | etraxfs*)
465 basic_machine=crisv32-axis
466 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000467 cris | cris-* | etrax*)
468 basic_machine=cris-axis
469 ;;
Tim Rice5f707582005-06-01 19:57:45 -0700470 crx)
471 basic_machine=crx-unknown
472 os=-elf
473 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000474 da30 | da30-*)
475 basic_machine=m68k-da30
476 ;;
477 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
478 basic_machine=mips-dec
479 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000480 decsystem10* | dec10*)
481 basic_machine=pdp10-dec
482 os=-tops10
483 ;;
484 decsystem20* | dec20*)
485 basic_machine=pdp10-dec
486 os=-tops20
487 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000488 delta | 3300 | motorola-3300 | motorola-delta \
489 | 3300-motorola | delta-motorola)
490 basic_machine=m68k-motorola
491 ;;
492 delta88)
493 basic_machine=m88k-motorola
494 os=-sysv3
495 ;;
Tim Rice5f707582005-06-01 19:57:45 -0700496 djgpp)
497 basic_machine=i586-pc
498 os=-msdosdjgpp
499 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000500 dpx20 | dpx20-*)
501 basic_machine=rs6000-bull
502 os=-bosx
503 ;;
504 dpx2* | dpx2*-bull)
505 basic_machine=m68k-bull
506 os=-sysv3
507 ;;
508 ebmon29k)
509 basic_machine=a29k-amd
510 os=-ebmon
511 ;;
512 elxsi)
513 basic_machine=elxsi-elxsi
514 os=-bsd
515 ;;
516 encore | umax | mmax)
517 basic_machine=ns32k-encore
518 ;;
519 es1800 | OSE68k | ose68k | ose | OSE)
520 basic_machine=m68k-ericsson
521 os=-ose
522 ;;
523 fx2800)
524 basic_machine=i860-alliant
525 ;;
526 genix)
527 basic_machine=ns32k-ns
528 ;;
529 gmicro)
530 basic_machine=tron-gmicro
531 os=-sysv
532 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000533 go32)
534 basic_machine=i386-pc
535 os=-go32
536 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000537 h3050r* | hiux*)
538 basic_machine=hppa1.1-hitachi
539 os=-hiuxwe2
540 ;;
541 h8300hms)
542 basic_machine=h8300-hitachi
543 os=-hms
544 ;;
545 h8300xray)
546 basic_machine=h8300-hitachi
547 os=-xray
548 ;;
549 h8500hms)
550 basic_machine=h8500-hitachi
551 os=-hms
552 ;;
553 harris)
554 basic_machine=m88k-harris
555 os=-sysv3
556 ;;
557 hp300-*)
558 basic_machine=m68k-hp
559 ;;
560 hp300bsd)
561 basic_machine=m68k-hp
562 os=-bsd
563 ;;
564 hp300hpux)
565 basic_machine=m68k-hp
566 os=-hpux
567 ;;
568 hp3k9[0-9][0-9] | hp9[0-9][0-9])
569 basic_machine=hppa1.0-hp
570 ;;
571 hp9k2[0-9][0-9] | hp9k31[0-9])
572 basic_machine=m68000-hp
573 ;;
574 hp9k3[2-9][0-9])
575 basic_machine=m68k-hp
576 ;;
577 hp9k6[0-9][0-9] | hp6[0-9][0-9])
578 basic_machine=hppa1.0-hp
579 ;;
580 hp9k7[0-79][0-9] | hp7[0-79][0-9])
581 basic_machine=hppa1.1-hp
582 ;;
583 hp9k78[0-9] | hp78[0-9])
584 # FIXME: really hppa2.0-hp
585 basic_machine=hppa1.1-hp
586 ;;
587 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
588 # FIXME: really hppa2.0-hp
589 basic_machine=hppa1.1-hp
590 ;;
591 hp9k8[0-9][13679] | hp8[0-9][13679])
592 basic_machine=hppa1.1-hp
593 ;;
594 hp9k8[0-9][0-9] | hp8[0-9][0-9])
595 basic_machine=hppa1.0-hp
596 ;;
597 hppa-next)
598 os=-nextstep3
599 ;;
600 hppaosf)
601 basic_machine=hppa1.1-hp
602 os=-osf
603 ;;
604 hppro)
605 basic_machine=hppa1.1-hp
606 os=-proelf
607 ;;
608 i370-ibm* | ibm*)
609 basic_machine=i370-ibm
610 ;;
611# I'm not sure what "Sysv32" means. Should this be sysv3.2?
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000612 i*86v32)
Damien Millerb405d612000-06-12 23:01:02 +1000613 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
614 os=-sysv32
615 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000616 i*86v4*)
Damien Millerb405d612000-06-12 23:01:02 +1000617 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
618 os=-sysv4
619 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000620 i*86v)
Damien Millerb405d612000-06-12 23:01:02 +1000621 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
622 os=-sysv
623 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000624 i*86sol2)
Damien Millerb405d612000-06-12 23:01:02 +1000625 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
626 os=-solaris2
627 ;;
628 i386mach)
629 basic_machine=i386-mach
630 os=-mach
631 ;;
632 i386-vsta | vsta)
633 basic_machine=i386-unknown
634 os=-vsta
635 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000636 iris | iris4d)
637 basic_machine=mips-sgi
638 case $os in
639 -irix*)
640 ;;
641 *)
642 os=-irix4
643 ;;
644 esac
645 ;;
646 isi68 | isi)
647 basic_machine=m68k-isi
648 os=-sysv
649 ;;
650 m88k-omron*)
651 basic_machine=m88k-omron
652 ;;
653 magnum | m3230)
654 basic_machine=mips-mips
655 os=-sysv
656 ;;
657 merlin)
658 basic_machine=ns32k-utek
659 os=-sysv
660 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000661 mingw32)
662 basic_machine=i386-pc
663 os=-mingw32
664 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000665 miniframe)
666 basic_machine=m68000-convergent
667 ;;
668 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
669 basic_machine=m68k-atari
670 os=-mint
671 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000672 mips3*-*)
673 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
674 ;;
675 mips3*)
676 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
677 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000678 monitor)
679 basic_machine=m68k-rom68k
680 os=-coff
681 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000682 morphos)
683 basic_machine=powerpc-unknown
684 os=-morphos
685 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000686 msdos)
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000687 basic_machine=i386-pc
Damien Millerb405d612000-06-12 23:01:02 +1000688 os=-msdos
689 ;;
690 mvs)
691 basic_machine=i370-ibm
692 os=-mvs
693 ;;
694 ncr3000)
695 basic_machine=i486-ncr
696 os=-sysv4
697 ;;
698 netbsd386)
699 basic_machine=i386-unknown
700 os=-netbsd
701 ;;
702 netwinder)
703 basic_machine=armv4l-rebel
704 os=-linux
705 ;;
706 news | news700 | news800 | news900)
707 basic_machine=m68k-sony
708 os=-newsos
709 ;;
710 news1000)
711 basic_machine=m68030-sony
712 os=-newsos
713 ;;
714 news-3600 | risc-news)
715 basic_machine=mips-sony
716 os=-newsos
717 ;;
718 necv70)
719 basic_machine=v70-nec
720 os=-sysv
721 ;;
722 next | m*-next )
723 basic_machine=m68k-next
724 case $os in
725 -nextstep* )
726 ;;
727 -ns2*)
728 os=-nextstep2
729 ;;
730 *)
731 os=-nextstep3
732 ;;
733 esac
734 ;;
735 nh3000)
736 basic_machine=m68k-harris
737 os=-cxux
738 ;;
739 nh[45]000)
740 basic_machine=m88k-harris
741 os=-cxux
742 ;;
743 nindy960)
744 basic_machine=i960-intel
745 os=-nindy
746 ;;
747 mon960)
748 basic_machine=i960-intel
749 os=-mon960
750 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000751 nonstopux)
752 basic_machine=mips-compaq
753 os=-nonstopux
754 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000755 np1)
756 basic_machine=np1-gould
757 ;;
Damien Miller752e4e62004-04-21 12:29:13 +1000758 nsr-tandem)
759 basic_machine=nsr-tandem
Ben Lindstroma5a26482003-03-21 01:05:37 +0000760 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000761 op50n-* | op60c-*)
762 basic_machine=hppa1.1-oki
763 os=-proelf
764 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000765 or32 | or32-*)
766 basic_machine=or32-unknown
767 os=-coff
768 ;;
Tim Rice5f707582005-06-01 19:57:45 -0700769 os400)
770 basic_machine=powerpc-ibm
771 os=-os400
772 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000773 OSE68000 | ose68000)
774 basic_machine=m68000-ericsson
775 os=-ose
776 ;;
777 os68k)
778 basic_machine=m68k-none
779 os=-os68k
780 ;;
781 pa-hitachi)
782 basic_machine=hppa1.1-hitachi
783 os=-hiuxwe2
784 ;;
785 paragon)
786 basic_machine=i860-intel
787 os=-osf
788 ;;
789 pbd)
790 basic_machine=sparc-tti
791 ;;
792 pbb)
793 basic_machine=m68k-tti
794 ;;
Damien Millera8e06ce2003-11-21 23:48:55 +1100795 pc532 | pc532-*)
Damien Millerb405d612000-06-12 23:01:02 +1000796 basic_machine=ns32k-pc532
797 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000798 pentium | p5 | k5 | k6 | nexgen | viac3)
Damien Millerb405d612000-06-12 23:01:02 +1000799 basic_machine=i586-pc
800 ;;
Damien Miller752e4e62004-04-21 12:29:13 +1000801 pentiumpro | p6 | 6x86 | athlon | athlon_*)
Damien Millerb405d612000-06-12 23:01:02 +1000802 basic_machine=i686-pc
803 ;;
Damien Miller752e4e62004-04-21 12:29:13 +1000804 pentiumii | pentium2 | pentiumiii | pentium3)
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000805 basic_machine=i686-pc
Damien Millerb405d612000-06-12 23:01:02 +1000806 ;;
Damien Miller752e4e62004-04-21 12:29:13 +1000807 pentium4)
808 basic_machine=i786-pc
809 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000810 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
Damien Millerb405d612000-06-12 23:01:02 +1000811 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
812 ;;
813 pentiumpro-* | p6-* | 6x86-* | athlon-*)
814 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
815 ;;
Damien Miller752e4e62004-04-21 12:29:13 +1000816 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000817 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
Damien Millerb405d612000-06-12 23:01:02 +1000818 ;;
Damien Miller752e4e62004-04-21 12:29:13 +1000819 pentium4-*)
820 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
821 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000822 pn)
823 basic_machine=pn-gould
824 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000825 power) basic_machine=power-ibm
Damien Millerb405d612000-06-12 23:01:02 +1000826 ;;
827 ppc) basic_machine=powerpc-unknown
Damien Millera8e06ce2003-11-21 23:48:55 +1100828 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000829 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
830 ;;
831 ppcle | powerpclittle | ppc-le | powerpc-little)
832 basic_machine=powerpcle-unknown
Damien Millera8e06ce2003-11-21 23:48:55 +1100833 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000834 ppcle-* | powerpclittle-*)
835 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
836 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000837 ppc64) basic_machine=powerpc64-unknown
Damien Millera8e06ce2003-11-21 23:48:55 +1100838 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000839 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
840 ;;
841 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
842 basic_machine=powerpc64le-unknown
Damien Millera8e06ce2003-11-21 23:48:55 +1100843 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000844 ppc64le-* | powerpc64little-*)
845 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
846 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000847 ps2)
848 basic_machine=i386-ibm
849 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000850 pw32)
851 basic_machine=i586-unknown
852 os=-pw32
853 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000854 rom68k)
855 basic_machine=m68k-rom68k
856 os=-coff
857 ;;
858 rm[46]00)
859 basic_machine=mips-siemens
860 ;;
861 rtpc | rtpc-*)
862 basic_machine=romp-ibm
863 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000864 s390 | s390-*)
865 basic_machine=s390-ibm
866 ;;
867 s390x | s390x-*)
868 basic_machine=s390x-ibm
869 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000870 sa29200)
871 basic_machine=a29k-amd
872 os=-udi
873 ;;
Damien Miller752e4e62004-04-21 12:29:13 +1000874 sb1)
875 basic_machine=mipsisa64sb1-unknown
876 ;;
877 sb1el)
878 basic_machine=mipsisa64sb1el-unknown
879 ;;
880 sei)
881 basic_machine=mips-sei
882 os=-seiux
883 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000884 sequent)
885 basic_machine=i386-sequent
886 ;;
887 sh)
888 basic_machine=sh-hitachi
889 os=-hms
890 ;;
Damien Miller752e4e62004-04-21 12:29:13 +1000891 sh64)
892 basic_machine=sh64-unknown
893 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000894 sparclite-wrs | simso-wrs)
Damien Millerb405d612000-06-12 23:01:02 +1000895 basic_machine=sparclite-wrs
896 os=-vxworks
897 ;;
898 sps7)
899 basic_machine=m68k-bull
900 os=-sysv2
901 ;;
902 spur)
903 basic_machine=spur-unknown
904 ;;
905 st2000)
906 basic_machine=m68k-tandem
907 ;;
908 stratus)
909 basic_machine=i860-stratus
910 os=-sysv4
911 ;;
912 sun2)
913 basic_machine=m68000-sun
914 ;;
915 sun2os3)
916 basic_machine=m68000-sun
917 os=-sunos3
918 ;;
919 sun2os4)
920 basic_machine=m68000-sun
921 os=-sunos4
922 ;;
923 sun3os3)
924 basic_machine=m68k-sun
925 os=-sunos3
926 ;;
927 sun3os4)
928 basic_machine=m68k-sun
929 os=-sunos4
930 ;;
931 sun4os3)
932 basic_machine=sparc-sun
933 os=-sunos3
934 ;;
935 sun4os4)
936 basic_machine=sparc-sun
937 os=-sunos4
938 ;;
939 sun4sol2)
940 basic_machine=sparc-sun
941 os=-solaris2
942 ;;
943 sun3 | sun3-*)
944 basic_machine=m68k-sun
945 ;;
946 sun4)
947 basic_machine=sparc-sun
948 ;;
949 sun386 | sun386i | roadrunner)
950 basic_machine=i386-sun
951 ;;
Damien Millera8e06ce2003-11-21 23:48:55 +1100952 sv1)
Damien Millerb405d612000-06-12 23:01:02 +1000953 basic_machine=sv1-cray
954 os=-unicos
955 ;;
956 symmetry)
957 basic_machine=i386-sequent
958 os=-dynix
959 ;;
960 t3e)
Damien Millera7609f52002-07-25 14:40:22 +1000961 basic_machine=alphaev5-cray
962 os=-unicos
963 ;;
964 t90)
965 basic_machine=t90-cray
Damien Millerb405d612000-06-12 23:01:02 +1000966 os=-unicos
967 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +1000968 tic54x | c54x*)
969 basic_machine=tic54x-unknown
970 os=-coff
971 ;;
Damien Miller752e4e62004-04-21 12:29:13 +1000972 tic55x | c55x*)
973 basic_machine=tic55x-unknown
974 os=-coff
975 ;;
976 tic6x | c6x*)
977 basic_machine=tic6x-unknown
978 os=-coff
979 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000980 tx39)
981 basic_machine=mipstx39-unknown
982 ;;
983 tx39el)
984 basic_machine=mipstx39el-unknown
985 ;;
Damien Millera7609f52002-07-25 14:40:22 +1000986 toad1)
987 basic_machine=pdp10-xkl
988 os=-tops20
989 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000990 tower | tower-32)
991 basic_machine=m68k-ncr
992 ;;
Tim Rice5f707582005-06-01 19:57:45 -0700993 tpf)
994 basic_machine=s390x-ibm
995 os=-tpf
996 ;;
Damien Millerb405d612000-06-12 23:01:02 +1000997 udi29k)
998 basic_machine=a29k-amd
999 os=-udi
1000 ;;
1001 ultra3)
1002 basic_machine=a29k-nyu
1003 os=-sym1
1004 ;;
1005 v810 | necv810)
1006 basic_machine=v810-nec
1007 os=-none
1008 ;;
1009 vaxv)
1010 basic_machine=vax-dec
1011 os=-sysv
1012 ;;
1013 vms)
1014 basic_machine=vax-dec
1015 os=-vms
1016 ;;
1017 vpp*|vx|vx-*)
Damien Miller752e4e62004-04-21 12:29:13 +10001018 basic_machine=f301-fujitsu
1019 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001020 vxworks960)
1021 basic_machine=i960-wrs
1022 os=-vxworks
1023 ;;
1024 vxworks68)
1025 basic_machine=m68k-wrs
1026 os=-vxworks
1027 ;;
1028 vxworks29k)
1029 basic_machine=a29k-wrs
1030 os=-vxworks
1031 ;;
1032 w65*)
1033 basic_machine=w65-wdc
1034 os=-none
1035 ;;
1036 w89k-*)
1037 basic_machine=hppa1.1-winbond
1038 os=-proelf
1039 ;;
Tim Rice5f707582005-06-01 19:57:45 -07001040 xbox)
1041 basic_machine=i686-pc
1042 os=-mingw32
1043 ;;
Damien Millera8e06ce2003-11-21 23:48:55 +11001044 xps | xps100)
Damien Millerb405d612000-06-12 23:01:02 +10001045 basic_machine=xps100-honeywell
1046 ;;
Damien Millera7609f52002-07-25 14:40:22 +10001047 ymp)
1048 basic_machine=ymp-cray
1049 os=-unicos
1050 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001051 z8k-*-coff)
1052 basic_machine=z8k-unknown
1053 os=-sim
1054 ;;
1055 none)
1056 basic_machine=none-none
1057 os=-none
1058 ;;
1059
1060# Here we handle the default manufacturer of certain CPU types. It is in
1061# some cases the only manufacturer, in others, it is the most popular.
1062 w89k)
1063 basic_machine=hppa1.1-winbond
1064 ;;
1065 op50n)
1066 basic_machine=hppa1.1-oki
1067 ;;
1068 op60c)
1069 basic_machine=hppa1.1-oki
1070 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001071 romp)
1072 basic_machine=romp-ibm
1073 ;;
Tim Rice5f707582005-06-01 19:57:45 -07001074 mmix)
1075 basic_machine=mmix-knuth
1076 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001077 rs6000)
1078 basic_machine=rs6000-ibm
1079 ;;
1080 vax)
1081 basic_machine=vax-dec
1082 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +10001083 pdp10)
1084 # there are many clones, so DEC is not a safe bet
1085 basic_machine=pdp10-unknown
1086 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001087 pdp11)
1088 basic_machine=pdp11-dec
1089 ;;
1090 we32k)
1091 basic_machine=we32k-att
1092 ;;
Damien Miller752e4e62004-04-21 12:29:13 +10001093 sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
Damien Miller5bf5f2c2001-05-06 10:54:15 +10001094 basic_machine=sh-unknown
1095 ;;
Damien Millera7609f52002-07-25 14:40:22 +10001096 sh64)
1097 basic_machine=sh64-unknown
1098 ;;
Tim Rice5f707582005-06-01 19:57:45 -07001099 sparc | sparcv8 | sparcv9 | sparcv9b)
Damien Millerb405d612000-06-12 23:01:02 +10001100 basic_machine=sparc-sun
1101 ;;
Damien Millera8e06ce2003-11-21 23:48:55 +11001102 cydra)
Damien Millerb405d612000-06-12 23:01:02 +10001103 basic_machine=cydra-cydrome
1104 ;;
1105 orion)
1106 basic_machine=orion-highlevel
1107 ;;
1108 orion105)
1109 basic_machine=clipper-highlevel
1110 ;;
1111 mac | mpw | mac-mpw)
1112 basic_machine=m68k-apple
1113 ;;
1114 pmac | pmac-mpw)
1115 basic_machine=powerpc-apple
1116 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +10001117 *-unknown)
1118 # Make sure to match an already-canonicalized machine name.
1119 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001120 *)
1121 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1122 exit 1
1123 ;;
1124esac
1125
1126# Here we canonicalize certain aliases for manufacturers.
1127case $basic_machine in
1128 *-digital*)
1129 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1130 ;;
1131 *-commodore*)
1132 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1133 ;;
1134 *)
1135 ;;
1136esac
1137
1138# Decode manufacturer-specific aliases for certain operating systems.
1139
1140if [ x"$os" != x"" ]
1141then
1142case $os in
Damien Miller752e4e62004-04-21 12:29:13 +10001143 # First match some system type aliases
1144 # that might get confused with valid system types.
Damien Millerb405d612000-06-12 23:01:02 +10001145 # -solaris* is a basic system type, with this one exception.
1146 -solaris1 | -solaris1.*)
1147 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1148 ;;
1149 -solaris)
1150 os=-solaris2
1151 ;;
1152 -svr4*)
1153 os=-sysv4
1154 ;;
1155 -unixware*)
1156 os=-sysv4.2uw
1157 ;;
1158 -gnu/linux*)
1159 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1160 ;;
1161 # First accept the basic system types.
1162 # The portable systems comes first.
1163 # Each alternative MUST END IN A *, to match a version number.
1164 # -sysv* is not here because it comes later, after sysvr4.
1165 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1166 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1167 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1168 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1169 | -aos* \
1170 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1171 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
Tim Rice5f707582005-06-01 19:57:45 -07001172 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
1173 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1174 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
Damien Millerb405d612000-06-12 23:01:02 +10001175 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1176 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
Damien Millera7609f52002-07-25 14:40:22 +10001177 | -chorusos* | -chorusrdb* \
Damien Millerb405d612000-06-12 23:01:02 +10001178 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
Tim Rice5f707582005-06-01 19:57:45 -07001179 | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
Damien Miller752e4e62004-04-21 12:29:13 +10001180 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
Damien Miller5bf5f2c2001-05-06 10:54:15 +10001181 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
Damien Millera7609f52002-07-25 14:40:22 +10001182 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1183 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
Damien Miller752e4e62004-04-21 12:29:13 +10001184 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
Tim Rice5f707582005-06-01 19:57:45 -07001185 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* | -skyos*)
Damien Millerb405d612000-06-12 23:01:02 +10001186 # Remember, each alternative MUST END IN *, to match a version number.
1187 ;;
1188 -qnx*)
1189 case $basic_machine in
Damien Miller5bf5f2c2001-05-06 10:54:15 +10001190 x86-* | i*86-*)
Damien Millerb405d612000-06-12 23:01:02 +10001191 ;;
1192 *)
1193 os=-nto$os
1194 ;;
1195 esac
1196 ;;
Damien Miller752e4e62004-04-21 12:29:13 +10001197 -nto-qnx*)
1198 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001199 -nto*)
Damien Miller752e4e62004-04-21 12:29:13 +10001200 os=`echo $os | sed -e 's|nto|nto-qnx|'`
Damien Millerb405d612000-06-12 23:01:02 +10001201 ;;
1202 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1203 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
1204 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1205 ;;
1206 -mac*)
1207 os=`echo $os | sed -e 's|mac|macos|'`
1208 ;;
Damien Miller752e4e62004-04-21 12:29:13 +10001209 -linux-dietlibc)
1210 os=-linux-dietlibc
1211 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001212 -linux*)
1213 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1214 ;;
1215 -sunos5*)
1216 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1217 ;;
1218 -sunos6*)
1219 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1220 ;;
1221 -opened*)
1222 os=-openedition
1223 ;;
Tim Rice5f707582005-06-01 19:57:45 -07001224 -os400*)
1225 os=-os400
1226 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001227 -wince*)
1228 os=-wince
1229 ;;
1230 -osfrose*)
1231 os=-osfrose
1232 ;;
1233 -osf*)
1234 os=-osf
1235 ;;
1236 -utek*)
1237 os=-bsd
1238 ;;
1239 -dynix*)
1240 os=-bsd
1241 ;;
1242 -acis*)
1243 os=-aos
1244 ;;
Damien Millera7609f52002-07-25 14:40:22 +10001245 -atheos*)
1246 os=-atheos
1247 ;;
Tim Rice5f707582005-06-01 19:57:45 -07001248 -syllable*)
1249 os=-syllable
1250 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001251 -386bsd)
1252 os=-bsd
1253 ;;
1254 -ctix* | -uts*)
1255 os=-sysv
1256 ;;
Damien Millera7609f52002-07-25 14:40:22 +10001257 -nova*)
1258 os=-rtmk-nova
1259 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001260 -ns2 )
Damien Millera8e06ce2003-11-21 23:48:55 +11001261 os=-nextstep2
Damien Millerb405d612000-06-12 23:01:02 +10001262 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +10001263 -nsk*)
Damien Millerb405d612000-06-12 23:01:02 +10001264 os=-nsk
1265 ;;
1266 # Preserve the version number of sinix5.
1267 -sinix5.*)
1268 os=`echo $os | sed -e 's|sinix|sysv|'`
1269 ;;
1270 -sinix*)
1271 os=-sysv4
1272 ;;
Tim Rice5f707582005-06-01 19:57:45 -07001273 -tpf*)
1274 os=-tpf
1275 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001276 -triton*)
1277 os=-sysv3
1278 ;;
1279 -oss*)
1280 os=-sysv3
1281 ;;
1282 -svr4)
1283 os=-sysv4
1284 ;;
1285 -svr3)
1286 os=-sysv3
1287 ;;
1288 -sysvr4)
1289 os=-sysv4
1290 ;;
1291 # This must come after -sysvr4.
1292 -sysv*)
1293 ;;
1294 -ose*)
1295 os=-ose
1296 ;;
1297 -es1800*)
1298 os=-ose
1299 ;;
1300 -xenix)
1301 os=-xenix
1302 ;;
Damien Millera8e06ce2003-11-21 23:48:55 +11001303 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1304 os=-mint
Damien Millerb405d612000-06-12 23:01:02 +10001305 ;;
Damien Miller752e4e62004-04-21 12:29:13 +10001306 -aros*)
1307 os=-aros
1308 ;;
1309 -kaos*)
1310 os=-kaos
1311 ;;
Tim Rice5f707582005-06-01 19:57:45 -07001312 -zvmoe)
1313 os=-zvmoe
1314 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001315 -none)
1316 ;;
1317 *)
1318 # Get rid of the `-' at the beginning of $os.
1319 os=`echo $os | sed 's/[^-]*-//'`
1320 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1321 exit 1
1322 ;;
1323esac
1324else
1325
1326# Here we handle the default operating systems that come with various machines.
1327# The value should be what the vendor currently ships out the door with their
1328# machine or put another way, the most popular os provided with the machine.
1329
1330# Note that if you're going to try to match "-MANUFACTURER" here (say,
1331# "-sun"), then you have to tell the case statement up towards the top
1332# that MANUFACTURER isn't an operating system. Otherwise, code above
1333# will signal an error saying that MANUFACTURER isn't an operating
1334# system, and we'll never get to this point.
1335
1336case $basic_machine in
1337 *-acorn)
1338 os=-riscix1.2
1339 ;;
1340 arm*-rebel)
1341 os=-linux
1342 ;;
1343 arm*-semi)
1344 os=-aout
1345 ;;
Damien Miller752e4e62004-04-21 12:29:13 +10001346 c4x-* | tic4x-*)
1347 os=-coff
1348 ;;
Damien Millera7609f52002-07-25 14:40:22 +10001349 # This must come before the *-dec entry.
Damien Miller5bf5f2c2001-05-06 10:54:15 +10001350 pdp10-*)
1351 os=-tops20
1352 ;;
Damien Millera8e06ce2003-11-21 23:48:55 +11001353 pdp11-*)
Damien Millerb405d612000-06-12 23:01:02 +10001354 os=-none
1355 ;;
1356 *-dec | vax-*)
1357 os=-ultrix4.2
1358 ;;
1359 m68*-apollo)
1360 os=-domain
1361 ;;
1362 i386-sun)
1363 os=-sunos4.0.2
1364 ;;
1365 m68000-sun)
1366 os=-sunos3
1367 # This also exists in the configure program, but was not the
1368 # default.
1369 # os=-sunos4
1370 ;;
1371 m68*-cisco)
1372 os=-aout
1373 ;;
1374 mips*-cisco)
1375 os=-elf
1376 ;;
1377 mips*-*)
1378 os=-elf
1379 ;;
Damien Millera7609f52002-07-25 14:40:22 +10001380 or32-*)
1381 os=-coff
1382 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001383 *-tti) # must be before sparc entry or we get the wrong os.
1384 os=-sysv3
1385 ;;
1386 sparc-* | *-sun)
1387 os=-sunos4.1.1
1388 ;;
1389 *-be)
1390 os=-beos
1391 ;;
1392 *-ibm)
1393 os=-aix
1394 ;;
Tim Rice5f707582005-06-01 19:57:45 -07001395 *-knuth)
1396 os=-mmixware
1397 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001398 *-wec)
1399 os=-proelf
1400 ;;
1401 *-winbond)
1402 os=-proelf
1403 ;;
1404 *-oki)
1405 os=-proelf
1406 ;;
1407 *-hp)
1408 os=-hpux
1409 ;;
1410 *-hitachi)
1411 os=-hiux
1412 ;;
1413 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1414 os=-sysv
1415 ;;
1416 *-cbm)
1417 os=-amigaos
1418 ;;
1419 *-dg)
1420 os=-dgux
1421 ;;
1422 *-dolphin)
1423 os=-sysv3
1424 ;;
1425 m68k-ccur)
1426 os=-rtu
1427 ;;
1428 m88k-omron*)
1429 os=-luna
1430 ;;
1431 *-next )
1432 os=-nextstep
1433 ;;
1434 *-sequent)
1435 os=-ptx
1436 ;;
1437 *-crds)
1438 os=-unos
1439 ;;
1440 *-ns)
1441 os=-genix
1442 ;;
1443 i370-*)
1444 os=-mvs
1445 ;;
1446 *-next)
1447 os=-nextstep3
1448 ;;
Damien Millera8e06ce2003-11-21 23:48:55 +11001449 *-gould)
Damien Millerb405d612000-06-12 23:01:02 +10001450 os=-sysv
1451 ;;
Damien Millera8e06ce2003-11-21 23:48:55 +11001452 *-highlevel)
Damien Millerb405d612000-06-12 23:01:02 +10001453 os=-bsd
1454 ;;
1455 *-encore)
1456 os=-bsd
1457 ;;
Damien Millera8e06ce2003-11-21 23:48:55 +11001458 *-sgi)
Damien Millerb405d612000-06-12 23:01:02 +10001459 os=-irix
1460 ;;
Damien Millera8e06ce2003-11-21 23:48:55 +11001461 *-siemens)
Damien Millerb405d612000-06-12 23:01:02 +10001462 os=-sysv4
1463 ;;
1464 *-masscomp)
1465 os=-rtu
1466 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +10001467 f30[01]-fujitsu | f700-fujitsu)
Damien Millerb405d612000-06-12 23:01:02 +10001468 os=-uxpv
1469 ;;
1470 *-rom68k)
1471 os=-coff
1472 ;;
1473 *-*bug)
1474 os=-coff
1475 ;;
1476 *-apple)
1477 os=-macos
1478 ;;
1479 *-atari*)
1480 os=-mint
1481 ;;
1482 *)
1483 os=-none
1484 ;;
1485esac
1486fi
1487
1488# Here we handle the case where we know the os, and the CPU type, but not the
1489# manufacturer. We pick the logical manufacturer.
1490vendor=unknown
1491case $basic_machine in
1492 *-unknown)
1493 case $os in
1494 -riscix*)
1495 vendor=acorn
1496 ;;
1497 -sunos*)
1498 vendor=sun
1499 ;;
1500 -aix*)
1501 vendor=ibm
1502 ;;
1503 -beos*)
1504 vendor=be
1505 ;;
1506 -hpux*)
1507 vendor=hp
1508 ;;
1509 -mpeix*)
1510 vendor=hp
1511 ;;
1512 -hiux*)
1513 vendor=hitachi
1514 ;;
1515 -unos*)
1516 vendor=crds
1517 ;;
1518 -dgux*)
1519 vendor=dg
1520 ;;
1521 -luna*)
1522 vendor=omron
1523 ;;
1524 -genix*)
1525 vendor=ns
1526 ;;
1527 -mvs* | -opened*)
1528 vendor=ibm
1529 ;;
Tim Rice5f707582005-06-01 19:57:45 -07001530 -os400*)
1531 vendor=ibm
1532 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001533 -ptx*)
1534 vendor=sequent
1535 ;;
Tim Rice5f707582005-06-01 19:57:45 -07001536 -tpf*)
1537 vendor=ibm
1538 ;;
Damien Millera7609f52002-07-25 14:40:22 +10001539 -vxsim* | -vxworks* | -windiss*)
Damien Millerb405d612000-06-12 23:01:02 +10001540 vendor=wrs
1541 ;;
1542 -aux*)
1543 vendor=apple
1544 ;;
1545 -hms*)
1546 vendor=hitachi
1547 ;;
1548 -mpw* | -macos*)
1549 vendor=apple
1550 ;;
Damien Miller5bf5f2c2001-05-06 10:54:15 +10001551 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
Damien Millerb405d612000-06-12 23:01:02 +10001552 vendor=atari
1553 ;;
Damien Millera7609f52002-07-25 14:40:22 +10001554 -vos*)
1555 vendor=stratus
1556 ;;
Damien Millerb405d612000-06-12 23:01:02 +10001557 esac
1558 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1559 ;;
1560esac
1561
1562echo $basic_machine$os
Tim Rice5f707582005-06-01 19:57:45 -07001563exit
Damien Millerb405d612000-06-12 23:01:02 +10001564
1565# Local variables:
1566# eval: (add-hook 'write-file-hooks 'time-stamp)
Damien Miller5bf5f2c2001-05-06 10:54:15 +10001567# time-stamp-start: "timestamp='"
Damien Millerb405d612000-06-12 23:01:02 +10001568# time-stamp-format: "%:y-%02m-%02d"
1569# time-stamp-end: "'"
1570# End: