source: gs3-extension/android-ndk/trunk/src/config-extra/config.sub@ 26768

Last change on this file since 26768 was 26768, checked in by davidb, 9 years ago

First cut at a Greenstone extension for compiling Greenstone using Android's NDK

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