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