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