Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / file / dist / config.sub
blob5b2ab48217c3ca9127b5b0cdaa043b264c39c8cb
1 #! /bin/sh
3 # $NetBSD: config.sub,v 1.8 2006/10/29 23:52:55 wiz Exp $
5 # Configuration validation subroutine script.
6 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
7 # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
8 # Inc.
10 timestamp='2006-09-20'
12 # This file is (in principle) common to ALL GNU software.
13 # The presence of a machine in this file suggests that SOME GNU software
14 # can handle that machine. It does not imply ALL GNU software can.
16 # This file is free software; you can redistribute it and/or modify
17 # it under the terms of the GNU General Public License as published by
18 # the Free Software Foundation; either version 2 of the License, or
19 # (at your option) any later version.
21 # This program is distributed in the hope that it will be useful,
22 # but WITHOUT ANY WARRANTY; without even the implied warranty of
23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 # GNU General Public License for more details.
26 # You should have received a copy of the GNU General Public License
27 # along with this program; if not, write to the Free Software
28 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
29 # 02110-1301, USA.
31 # As a special exception to the GNU General Public License, if you
32 # distribute this file as part of a program that contains a
33 # configuration script generated by Autoconf, you may include it under
34 # the same distribution terms that you use for the rest of that program.
37 # Please send patches to <config-patches@gnu.org>. Submit a context
38 # diff and a properly formatted ChangeLog entry.
40 # Configuration subroutine to validate and canonicalize a configuration type.
41 # Supply the specified configuration type as an argument.
42 # If it is invalid, we print an error message on stderr and exit with code 1.
43 # Otherwise, we print the canonical config type on stdout and succeed.
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.
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.
60 me=`echo "$0" | sed -e 's,.*/,,'`
62 usage="\
63 Usage: $0 [OPTION] CPU-MFR-OPSYS
64 $0 [OPTION] ALIAS
66 Canonicalize a configuration name.
68 Operation 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
73 Report bugs and patches to <config-patches@gnu.org>."
75 version="\
76 GNU config.sub ($timestamp)
78 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
79 Free Software Foundation, Inc.
81 This is free software; see the source for copying conditions. There is NO
82 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
84 help="
85 Try \`$me --help' for more information."
87 # Parse command line
88 while test $# -gt 0 ; do
89 case $1 in
90 --time-stamp | --time* | -t )
91 echo "$timestamp" ; exit ;;
92 --version | -v )
93 echo "$version" ; exit ;;
94 --help | --h* | -h )
95 echo "$usage"; exit ;;
96 -- ) # Stop option processing
97 shift; break ;;
98 - ) # Use stdin as input.
99 break ;;
100 -* )
101 echo "$me: invalid option $1$help"
102 exit 1 ;;
104 *local*)
105 # First pass through any local machine types.
106 echo $1
107 exit ;;
110 break ;;
111 esac
112 done
114 case $# in
115 0) echo "$me: missing argument$help" >&2
116 exit 1;;
117 1) ;;
118 *) echo "$me: too many arguments$help" >&2
119 exit 1;;
120 esac
122 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
123 # Here we must recognize all the valid KERNEL-OS combinations.
124 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
125 case $maybe_os in
126 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
127 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
128 storm-chaos* | os2-emx* | rtmk-nova*)
129 os=-$maybe_os
130 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
133 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
134 if [ $basic_machine != $1 ]
135 then os=`echo $1 | sed 's/.*-/-/'`
136 else os=; fi
138 esac
140 ### Let's recognize common machines as not being operating systems so
141 ### that things like config.sub decstation-3100 work. We also
142 ### recognize some manufacturers as not being operating systems, so we
143 ### can provide default operating systems below.
144 case $os in
145 -sun*os*)
146 # Prevent following clause from handling this invalid input.
148 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
149 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
150 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
151 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
152 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
153 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
154 -apple | -axis | -knuth | -cray)
156 basic_machine=$1
158 -sim | -cisco | -oki | -wec | -winbond)
160 basic_machine=$1
162 -scout)
164 -wrs)
165 os=-vxworks
166 basic_machine=$1
168 -chorusos*)
169 os=-chorusos
170 basic_machine=$1
172 -chorusrdb)
173 os=-chorusrdb
174 basic_machine=$1
176 -hiux*)
177 os=-hiuxwe2
179 -sco6)
180 os=-sco5v6
181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
183 -sco5)
184 os=-sco3.2v5
185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
187 -sco4)
188 os=-sco3.2v4
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191 -sco3.2.[4-9]*)
192 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
193 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
195 -sco3.2v[4-9]*)
196 # Don't forget version if it is 3.2v4 or newer.
197 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
199 -sco5v6*)
200 # Don't forget version if it is 3.2v4 or newer.
201 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203 -sco*)
204 os=-sco3.2v2
205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
207 -udk*)
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
210 -isc)
211 os=-isc2.2
212 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
214 -clix*)
215 basic_machine=clipper-intergraph
217 -isc*)
218 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
220 -lynx*)
221 os=-lynxos
223 -ptx*)
224 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
226 -windowsnt*)
227 os=`echo $os | sed -e 's/windowsnt/winnt/'`
229 -psos*)
230 os=-psos
232 -mint | -mint[0-9]*)
233 basic_machine=m68k-atari
234 os=-mint
236 esac
238 # Decode aliases for certain CPU-COMPANY combinations.
239 case $basic_machine in
240 # Recognize the basic CPU types without company name.
241 # Some are omitted here because they have special meanings below.
242 1750a | 580 \
243 | a29k \
244 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
245 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
246 | am33_2.0 \
247 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
248 | bfin \
249 | c4x | clipper \
250 | d10v | d30v | dlx | dsp16xx \
251 | fr30 | frv \
252 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
253 | i370 | i860 | i960 | ia64 \
254 | ip2k | iq2000 \
255 | m32c | m32r | m32rle | m68000 | m68k | m88k \
256 | maxq | mb | microblaze | mcore \
257 | mips | mipsbe | mipseb | mipsel | mipsle \
258 | mips16 \
259 | mips64 | mips64el \
260 | mips64vr | mips64vrel \
261 | mips64orion | mips64orionel \
262 | mips64vr4100 | mips64vr4100el \
263 | mips64vr4300 | mips64vr4300el \
264 | mips64vr5000 | mips64vr5000el \
265 | mips64vr5900 | mips64vr5900el \
266 | mipsisa32 | mipsisa32el \
267 | mipsisa32r2 | mipsisa32r2el \
268 | mipsisa64 | mipsisa64el \
269 | mipsisa64r2 | mipsisa64r2el \
270 | mipsisa64sb1 | mipsisa64sb1el \
271 | mipsisa64sr71k | mipsisa64sr71kel \
272 | mipstx39 | mipstx39el \
273 | mn10200 | mn10300 \
274 | mt \
275 | msp430 \
276 | nios | nios2 \
277 | ns16k | ns32k \
278 | or32 \
279 | pdp10 | pdp11 | pj | pjl \
280 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
281 | pyramid \
282 | score \
283 | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
284 | sh64 | sh64le \
285 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
286 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
287 | spu | strongarm \
288 | tahoe | thumb | tic4x | tic80 | tron \
289 | v850 | v850e \
290 | we32k \
291 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
292 | z8k)
293 basic_machine=$basic_machine-unknown
295 m6811 | m68hc11 | m6812 | m68hc12)
296 # Motorola 68HC11/12.
297 basic_machine=$basic_machine-unknown
298 os=-none
300 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
302 ms1)
303 basic_machine=mt-unknown
306 # We use `pc' rather than `unknown'
307 # because (1) that's what they normally are, and
308 # (2) the word "unknown" tends to confuse beginning users.
309 i*86 | x86_64)
310 basic_machine=$basic_machine-pc
312 # Object if more than one company name word.
313 *-*-*)
314 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
315 exit 1
317 # Recognize the basic CPU types with company name.
318 580-* \
319 | a29k-* \
320 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
321 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
322 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
323 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
324 | avr-* | avr32-* \
325 | bfin-* | bs2000-* \
326 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
327 | clipper-* | craynv-* | cydra-* \
328 | d10v-* | d30v-* | dlx-* \
329 | elxsi-* \
330 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
331 | h8300-* | h8500-* \
332 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
333 | i*86-* | i860-* | i960-* | ia64-* \
334 | ip2k-* | iq2000-* \
335 | m32c-* | m32r-* | m32rle-* \
336 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
337 | m88110-* | m88k-* | maxq-* | mcore-* \
338 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
339 | mips16-* \
340 | mips64-* | mips64el-* \
341 | mips64vr-* | mips64vrel-* \
342 | mips64orion-* | mips64orionel-* \
343 | mips64vr4100-* | mips64vr4100el-* \
344 | mips64vr4300-* | mips64vr4300el-* \
345 | mips64vr5000-* | mips64vr5000el-* \
346 | mips64vr5900-* | mips64vr5900el-* \
347 | mipsisa32-* | mipsisa32el-* \
348 | mipsisa32r2-* | mipsisa32r2el-* \
349 | mipsisa64-* | mipsisa64el-* \
350 | mipsisa64r2-* | mipsisa64r2el-* \
351 | mipsisa64sb1-* | mipsisa64sb1el-* \
352 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
353 | mipstx39-* | mipstx39el-* \
354 | mmix-* \
355 | mt-* \
356 | msp430-* \
357 | nios-* | nios2-* \
358 | none-* | np1-* | ns16k-* | ns32k-* \
359 | orion-* \
360 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
361 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
362 | pyramid-* \
363 | romp-* | rs6000-* \
364 | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
365 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
366 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
367 | sparclite-* \
368 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
369 | tahoe-* | thumb-* \
370 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
371 | tron-* \
372 | v850-* | v850e-* | vax-* \
373 | we32k-* \
374 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
375 | xstormy16-* | xtensa-* \
376 | ymp-* \
377 | z8k-*)
379 # Recognize the various machine names and aliases which stand
380 # for a CPU type and a company and sometimes even an OS.
381 386bsd)
382 basic_machine=i386-unknown
383 os=-bsd
385 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
386 basic_machine=m68000-att
388 3b*)
389 basic_machine=we32k-att
391 a29khif)
392 basic_machine=a29k-amd
393 os=-udi
395 abacus)
396 basic_machine=abacus-unknown
398 adobe68k)
399 basic_machine=m68010-adobe
400 os=-scout
402 alliant | fx80)
403 basic_machine=fx80-alliant
405 altos | altos3068)
406 basic_machine=m68k-altos
408 am29k)
409 basic_machine=a29k-none
410 os=-bsd
412 amd64)
413 basic_machine=x86_64-pc
415 amd64-*)
416 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
418 amdahl)
419 basic_machine=580-amdahl
420 os=-sysv
422 amiga | amiga-*)
423 basic_machine=m68k-unknown
425 amigaos | amigados)
426 basic_machine=m68k-unknown
427 os=-amigaos
429 amigaunix | amix)
430 basic_machine=m68k-unknown
431 os=-sysv4
433 apollo68)
434 basic_machine=m68k-apollo
435 os=-sysv
437 apollo68bsd)
438 basic_machine=m68k-apollo
439 os=-bsd
441 aux)
442 basic_machine=m68k-apple
443 os=-aux
445 balance)
446 basic_machine=ns32k-sequent
447 os=-dynix
449 c90)
450 basic_machine=c90-cray
451 os=-unicos
453 convex-c1)
454 basic_machine=c1-convex
455 os=-bsd
457 convex-c2)
458 basic_machine=c2-convex
459 os=-bsd
461 convex-c32)
462 basic_machine=c32-convex
463 os=-bsd
465 convex-c34)
466 basic_machine=c34-convex
467 os=-bsd
469 convex-c38)
470 basic_machine=c38-convex
471 os=-bsd
473 cray | j90)
474 basic_machine=j90-cray
475 os=-unicos
477 craynv)
478 basic_machine=craynv-cray
479 os=-unicosmp
481 cr16c)
482 basic_machine=cr16c-unknown
483 os=-elf
485 crds | unos)
486 basic_machine=m68k-crds
488 crisv32 | crisv32-* | etraxfs*)
489 basic_machine=crisv32-axis
491 cris | cris-* | etrax*)
492 basic_machine=cris-axis
494 crx)
495 basic_machine=crx-unknown
496 os=-elf
498 da30 | da30-*)
499 basic_machine=m68k-da30
501 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
502 basic_machine=mips-dec
504 decsystem10* | dec10*)
505 basic_machine=pdp10-dec
506 os=-tops10
508 decsystem20* | dec20*)
509 basic_machine=pdp10-dec
510 os=-tops20
512 delta | 3300 | motorola-3300 | motorola-delta \
513 | 3300-motorola | delta-motorola)
514 basic_machine=m68k-motorola
516 delta88)
517 basic_machine=m88k-motorola
518 os=-sysv3
520 djgpp)
521 basic_machine=i586-pc
522 os=-msdosdjgpp
524 dpx20 | dpx20-*)
525 basic_machine=rs6000-bull
526 os=-bosx
528 dpx2* | dpx2*-bull)
529 basic_machine=m68k-bull
530 os=-sysv3
532 ebmon29k)
533 basic_machine=a29k-amd
534 os=-ebmon
536 elxsi)
537 basic_machine=elxsi-elxsi
538 os=-bsd
540 encore | umax | mmax)
541 basic_machine=ns32k-encore
543 es1800 | OSE68k | ose68k | ose | OSE)
544 basic_machine=m68k-ericsson
545 os=-ose
547 fx2800)
548 basic_machine=i860-alliant
550 genix)
551 basic_machine=ns32k-ns
553 gmicro)
554 basic_machine=tron-gmicro
555 os=-sysv
557 go32)
558 basic_machine=i386-pc
559 os=-go32
561 h3050r* | hiux*)
562 basic_machine=hppa1.1-hitachi
563 os=-hiuxwe2
565 h8300hms)
566 basic_machine=h8300-hitachi
567 os=-hms
569 h8300xray)
570 basic_machine=h8300-hitachi
571 os=-xray
573 h8500hms)
574 basic_machine=h8500-hitachi
575 os=-hms
577 harris)
578 basic_machine=m88k-harris
579 os=-sysv3
581 hp300-*)
582 basic_machine=m68k-hp
584 hp300bsd)
585 basic_machine=m68k-hp
586 os=-bsd
588 hp300hpux)
589 basic_machine=m68k-hp
590 os=-hpux
592 hp3k9[0-9][0-9] | hp9[0-9][0-9])
593 basic_machine=hppa1.0-hp
595 hp9k2[0-9][0-9] | hp9k31[0-9])
596 basic_machine=m68000-hp
598 hp9k3[2-9][0-9])
599 basic_machine=m68k-hp
601 hp9k6[0-9][0-9] | hp6[0-9][0-9])
602 basic_machine=hppa1.0-hp
604 hp9k7[0-79][0-9] | hp7[0-79][0-9])
605 basic_machine=hppa1.1-hp
607 hp9k78[0-9] | hp78[0-9])
608 # FIXME: really hppa2.0-hp
609 basic_machine=hppa1.1-hp
611 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
612 # FIXME: really hppa2.0-hp
613 basic_machine=hppa1.1-hp
615 hp9k8[0-9][13679] | hp8[0-9][13679])
616 basic_machine=hppa1.1-hp
618 hp9k8[0-9][0-9] | hp8[0-9][0-9])
619 basic_machine=hppa1.0-hp
621 hppa-next)
622 os=-nextstep3
624 hppaosf)
625 basic_machine=hppa1.1-hp
626 os=-osf
628 hppro)
629 basic_machine=hppa1.1-hp
630 os=-proelf
632 i370-ibm* | ibm*)
633 basic_machine=i370-ibm
635 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
636 i*86v32)
637 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
638 os=-sysv32
640 i*86v4*)
641 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
642 os=-sysv4
644 i*86v)
645 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
646 os=-sysv
648 i*86sol2)
649 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
650 os=-solaris2
652 i386mach)
653 basic_machine=i386-mach
654 os=-mach
656 i386-vsta | vsta)
657 basic_machine=i386-unknown
658 os=-vsta
660 iris | iris4d)
661 basic_machine=mips-sgi
662 case $os in
663 -irix*)
666 os=-irix4
668 esac
670 isi68 | isi)
671 basic_machine=m68k-isi
672 os=-sysv
674 m88k-omron*)
675 basic_machine=m88k-omron
677 magnum | m3230)
678 basic_machine=mips-mips
679 os=-sysv
681 merlin)
682 basic_machine=ns32k-utek
683 os=-sysv
685 mingw32)
686 basic_machine=i386-pc
687 os=-mingw32
689 miniframe)
690 basic_machine=m68000-convergent
692 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
693 basic_machine=m68k-atari
694 os=-mint
696 mips3*-*)
697 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
699 mips3*)
700 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
702 monitor)
703 basic_machine=m68k-rom68k
704 os=-coff
706 morphos)
707 basic_machine=powerpc-unknown
708 os=-morphos
710 msdos)
711 basic_machine=i386-pc
712 os=-msdos
714 ms1-*)
715 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
717 mvs)
718 basic_machine=i370-ibm
719 os=-mvs
721 ncr3000)
722 basic_machine=i486-ncr
723 os=-sysv4
725 netbsd386)
726 basic_machine=i386-unknown
727 os=-netbsd
729 netwinder)
730 basic_machine=armv4l-rebel
731 os=-linux
733 news | news700 | news800 | news900)
734 basic_machine=m68k-sony
735 os=-newsos
737 news1000)
738 basic_machine=m68030-sony
739 os=-newsos
741 news-3600 | risc-news)
742 basic_machine=mips-sony
743 os=-newsos
745 necv70)
746 basic_machine=v70-nec
747 os=-sysv
749 next | m*-next )
750 basic_machine=m68k-next
751 case $os in
752 -nextstep* )
754 -ns2*)
755 os=-nextstep2
758 os=-nextstep3
760 esac
762 nh3000)
763 basic_machine=m68k-harris
764 os=-cxux
766 nh[45]000)
767 basic_machine=m88k-harris
768 os=-cxux
770 nindy960)
771 basic_machine=i960-intel
772 os=-nindy
774 mon960)
775 basic_machine=i960-intel
776 os=-mon960
778 nonstopux)
779 basic_machine=mips-compaq
780 os=-nonstopux
782 np1)
783 basic_machine=np1-gould
785 nsr-tandem)
786 basic_machine=nsr-tandem
788 op50n-* | op60c-*)
789 basic_machine=hppa1.1-oki
790 os=-proelf
792 openrisc | openrisc-*)
793 basic_machine=or32-unknown
795 os400)
796 basic_machine=powerpc-ibm
797 os=-os400
799 OSE68000 | ose68000)
800 basic_machine=m68000-ericsson
801 os=-ose
803 os68k)
804 basic_machine=m68k-none
805 os=-os68k
807 pa-hitachi)
808 basic_machine=hppa1.1-hitachi
809 os=-hiuxwe2
811 paragon)
812 basic_machine=i860-intel
813 os=-osf
815 pbd)
816 basic_machine=sparc-tti
818 pbb)
819 basic_machine=m68k-tti
821 pc532 | pc532-*)
822 basic_machine=ns32k-pc532
824 pc98)
825 basic_machine=i386-pc
827 pc98-*)
828 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
830 pentium | p5 | k5 | k6 | nexgen | viac3)
831 basic_machine=i586-pc
833 pentiumpro | p6 | 6x86 | athlon | athlon_*)
834 basic_machine=i686-pc
836 pentiumii | pentium2 | pentiumiii | pentium3)
837 basic_machine=i686-pc
839 pentium4)
840 basic_machine=i786-pc
842 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
843 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
845 pentiumpro-* | p6-* | 6x86-* | athlon-*)
846 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
848 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
849 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
851 pentium4-*)
852 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
855 basic_machine=pn-gould
857 power) basic_machine=power-ibm
859 ppc) basic_machine=powerpc-unknown
861 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
863 ppcle | powerpclittle | ppc-le | powerpc-little)
864 basic_machine=powerpcle-unknown
866 ppcle-* | powerpclittle-*)
867 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
869 ppc64) basic_machine=powerpc64-unknown
871 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
873 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
874 basic_machine=powerpc64le-unknown
876 ppc64le-* | powerpc64little-*)
877 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
879 ps2)
880 basic_machine=i386-ibm
882 pw32)
883 basic_machine=i586-unknown
884 os=-pw32
886 rdos)
887 basic_machine=i386-pc
888 os=-rdos
890 rom68k)
891 basic_machine=m68k-rom68k
892 os=-coff
894 rm[46]00)
895 basic_machine=mips-siemens
897 rtpc | rtpc-*)
898 basic_machine=romp-ibm
900 s390 | s390-*)
901 basic_machine=s390-ibm
903 s390x | s390x-*)
904 basic_machine=s390x-ibm
906 sa29200)
907 basic_machine=a29k-amd
908 os=-udi
910 sb1)
911 basic_machine=mipsisa64sb1-unknown
913 sb1el)
914 basic_machine=mipsisa64sb1el-unknown
916 sde)
917 basic_machine=mipsisa32-sde
918 os=-elf
920 sei)
921 basic_machine=mips-sei
922 os=-seiux
924 sequent)
925 basic_machine=i386-sequent
928 basic_machine=sh-hitachi
929 os=-hms
931 sh5el)
932 basic_machine=sh5le-unknown
934 sh64)
935 basic_machine=sh64-unknown
937 sparclite-wrs | simso-wrs)
938 basic_machine=sparclite-wrs
939 os=-vxworks
941 sps7)
942 basic_machine=m68k-bull
943 os=-sysv2
945 spur)
946 basic_machine=spur-unknown
948 st2000)
949 basic_machine=m68k-tandem
951 stratus)
952 basic_machine=i860-stratus
953 os=-sysv4
955 sun2)
956 basic_machine=m68000-sun
958 sun2os3)
959 basic_machine=m68000-sun
960 os=-sunos3
962 sun2os4)
963 basic_machine=m68000-sun
964 os=-sunos4
966 sun3os3)
967 basic_machine=m68k-sun
968 os=-sunos3
970 sun3os4)
971 basic_machine=m68k-sun
972 os=-sunos4
974 sun4os3)
975 basic_machine=sparc-sun
976 os=-sunos3
978 sun4os4)
979 basic_machine=sparc-sun
980 os=-sunos4
982 sun4sol2)
983 basic_machine=sparc-sun
984 os=-solaris2
986 sun3 | sun3-*)
987 basic_machine=m68k-sun
989 sun4)
990 basic_machine=sparc-sun
992 sun386 | sun386i | roadrunner)
993 basic_machine=i386-sun
995 sv1)
996 basic_machine=sv1-cray
997 os=-unicos
999 symmetry)
1000 basic_machine=i386-sequent
1001 os=-dynix
1003 t3e)
1004 basic_machine=alphaev5-cray
1005 os=-unicos
1007 t90)
1008 basic_machine=t90-cray
1009 os=-unicos
1011 tic54x | c54x*)
1012 basic_machine=tic54x-unknown
1013 os=-coff
1015 tic55x | c55x*)
1016 basic_machine=tic55x-unknown
1017 os=-coff
1019 tic6x | c6x*)
1020 basic_machine=tic6x-unknown
1021 os=-coff
1023 tx39)
1024 basic_machine=mipstx39-unknown
1026 tx39el)
1027 basic_machine=mipstx39el-unknown
1029 toad1)
1030 basic_machine=pdp10-xkl
1031 os=-tops20
1033 tower | tower-32)
1034 basic_machine=m68k-ncr
1036 tpf)
1037 basic_machine=s390x-ibm
1038 os=-tpf
1040 udi29k)
1041 basic_machine=a29k-amd
1042 os=-udi
1044 ultra3)
1045 basic_machine=a29k-nyu
1046 os=-sym1
1048 v810 | necv810)
1049 basic_machine=v810-nec
1050 os=-none
1052 vaxv)
1053 basic_machine=vax-dec
1054 os=-sysv
1056 vms)
1057 basic_machine=vax-dec
1058 os=-vms
1060 vpp*|vx|vx-*)
1061 basic_machine=f301-fujitsu
1063 vxworks960)
1064 basic_machine=i960-wrs
1065 os=-vxworks
1067 vxworks68)
1068 basic_machine=m68k-wrs
1069 os=-vxworks
1071 vxworks29k)
1072 basic_machine=a29k-wrs
1073 os=-vxworks
1075 w65*)
1076 basic_machine=w65-wdc
1077 os=-none
1079 w89k-*)
1080 basic_machine=hppa1.1-winbond
1081 os=-proelf
1083 xbox)
1084 basic_machine=i686-pc
1085 os=-mingw32
1087 xps | xps100)
1088 basic_machine=xps100-honeywell
1090 ymp)
1091 basic_machine=ymp-cray
1092 os=-unicos
1094 z8k-*-coff)
1095 basic_machine=z8k-unknown
1096 os=-sim
1098 none)
1099 basic_machine=none-none
1100 os=-none
1103 # Here we handle the default manufacturer of certain CPU types. It is in
1104 # some cases the only manufacturer, in others, it is the most popular.
1105 w89k)
1106 basic_machine=hppa1.1-winbond
1108 op50n)
1109 basic_machine=hppa1.1-oki
1111 op60c)
1112 basic_machine=hppa1.1-oki
1114 romp)
1115 basic_machine=romp-ibm
1117 mmix)
1118 basic_machine=mmix-knuth
1120 rs6000)
1121 basic_machine=rs6000-ibm
1123 vax)
1124 basic_machine=vax-dec
1126 pdp10)
1127 # there are many clones, so DEC is not a safe bet
1128 basic_machine=pdp10-unknown
1130 pdp11)
1131 basic_machine=pdp11-dec
1133 we32k)
1134 basic_machine=we32k-att
1136 sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1137 basic_machine=sh-unknown
1139 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1140 basic_machine=sparc-sun
1142 cydra)
1143 basic_machine=cydra-cydrome
1145 orion)
1146 basic_machine=orion-highlevel
1148 orion105)
1149 basic_machine=clipper-highlevel
1151 mac | mpw | mac-mpw)
1152 basic_machine=m68k-apple
1154 pmac | pmac-mpw)
1155 basic_machine=powerpc-apple
1157 *-unknown)
1158 # Make sure to match an already-canonicalized machine name.
1161 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1162 exit 1
1164 esac
1166 # Here we canonicalize certain aliases for manufacturers.
1167 case $basic_machine in
1168 *-digital*)
1169 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1171 *-commodore*)
1172 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1176 esac
1178 # Decode manufacturer-specific aliases for certain operating systems.
1180 if [ x"$os" != x"" ]
1181 then
1182 case $os in
1183 # First match some system type aliases
1184 # that might get confused with valid system types.
1185 # -solaris* is a basic system type, with this one exception.
1186 -solaris1 | -solaris1.*)
1187 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1189 -solaris)
1190 os=-solaris2
1192 -svr4*)
1193 os=-sysv4
1195 -unixware*)
1196 os=-sysv4.2uw
1198 -gnu/linux*)
1199 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1201 # First accept the basic system types.
1202 # The portable systems comes first.
1203 # Each alternative MUST END IN A *, to match a version number.
1204 # -sysv* is not here because it comes later, after sysvr4.
1205 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1206 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1207 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1208 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1209 | -aos* \
1210 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1211 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1212 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1213 | -openbsd* | -solidbsd* \
1214 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1215 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1216 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1217 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1218 | -chorusos* | -chorusrdb* \
1219 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1220 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1221 | -uxpv* | -beos* | -mpeix* | -udk* \
1222 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1223 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1224 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1225 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1226 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1227 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1228 | -skyos* | -haiku* | -rdos* | -toppers*)
1229 # Remember, each alternative MUST END IN *, to match a version number.
1231 -qnx*)
1232 case $basic_machine in
1233 x86-* | i*86-*)
1236 os=-nto$os
1238 esac
1240 -nto-qnx*)
1242 -nto*)
1243 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1245 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1246 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1247 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1249 -mac*)
1250 os=`echo $os | sed -e 's|mac|macos|'`
1252 -linux-dietlibc)
1253 os=-linux-dietlibc
1255 -linux*)
1256 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1258 -sunos5*)
1259 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1261 -sunos6*)
1262 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1264 -opened*)
1265 os=-openedition
1267 -os400*)
1268 os=-os400
1270 -wince*)
1271 os=-wince
1273 -osfrose*)
1274 os=-osfrose
1276 -osf*)
1277 os=-osf
1279 -utek*)
1280 os=-bsd
1282 -dynix*)
1283 os=-bsd
1285 -acis*)
1286 os=-aos
1288 -atheos*)
1289 os=-atheos
1291 -syllable*)
1292 os=-syllable
1294 -386bsd)
1295 os=-bsd
1297 -ctix* | -uts*)
1298 os=-sysv
1300 -nova*)
1301 os=-rtmk-nova
1303 -ns2 )
1304 os=-nextstep2
1306 -nsk*)
1307 os=-nsk
1309 # Preserve the version number of sinix5.
1310 -sinix5.*)
1311 os=`echo $os | sed -e 's|sinix|sysv|'`
1313 -sinix*)
1314 os=-sysv4
1316 -tpf*)
1317 os=-tpf
1319 -triton*)
1320 os=-sysv3
1322 -oss*)
1323 os=-sysv3
1325 -svr4)
1326 os=-sysv4
1328 -svr3)
1329 os=-sysv3
1331 -sysvr4)
1332 os=-sysv4
1334 # This must come after -sysvr4.
1335 -sysv*)
1337 -ose*)
1338 os=-ose
1340 -es1800*)
1341 os=-ose
1343 -xenix)
1344 os=-xenix
1346 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1347 os=-mint
1349 -aros*)
1350 os=-aros
1352 -kaos*)
1353 os=-kaos
1355 -zvmoe)
1356 os=-zvmoe
1358 -none)
1361 # Get rid of the `-' at the beginning of $os.
1362 os=`echo $os | sed 's/[^-]*-//'`
1363 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1364 exit 1
1366 esac
1367 else
1369 # Here we handle the default operating systems that come with various machines.
1370 # The value should be what the vendor currently ships out the door with their
1371 # machine or put another way, the most popular os provided with the machine.
1373 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1374 # "-sun"), then you have to tell the case statement up towards the top
1375 # that MANUFACTURER isn't an operating system. Otherwise, code above
1376 # will signal an error saying that MANUFACTURER isn't an operating
1377 # system, and we'll never get to this point.
1379 case $basic_machine in
1380 score-*)
1381 os=-elf
1383 spu-*)
1384 os=-elf
1386 *-acorn)
1387 os=-riscix1.2
1389 arm*-rebel)
1390 os=-linux
1392 arm*-semi)
1393 os=-aout
1395 c4x-* | tic4x-*)
1396 os=-coff
1398 # This must come before the *-dec entry.
1399 pdp10-*)
1400 os=-tops20
1402 pdp11-*)
1403 os=-none
1405 *-dec | vax-*)
1406 os=-ultrix4.2
1408 m68*-apollo)
1409 os=-domain
1411 i386-sun)
1412 os=-sunos4.0.2
1414 m68000-sun)
1415 os=-sunos3
1416 # This also exists in the configure program, but was not the
1417 # default.
1418 # os=-sunos4
1420 m68*-cisco)
1421 os=-aout
1423 mips*-cisco)
1424 os=-elf
1426 mips*-*)
1427 os=-elf
1429 or32-*)
1430 os=-coff
1432 *-tti) # must be before sparc entry or we get the wrong os.
1433 os=-sysv3
1435 sparc-* | *-sun)
1436 os=-sunos4.1.1
1438 *-be)
1439 os=-beos
1441 *-haiku)
1442 os=-haiku
1444 *-ibm)
1445 os=-aix
1447 *-knuth)
1448 os=-mmixware
1450 *-wec)
1451 os=-proelf
1453 *-winbond)
1454 os=-proelf
1456 *-oki)
1457 os=-proelf
1459 *-hp)
1460 os=-hpux
1462 *-hitachi)
1463 os=-hiux
1465 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1466 os=-sysv
1468 *-cbm)
1469 os=-amigaos
1471 *-dg)
1472 os=-dgux
1474 *-dolphin)
1475 os=-sysv3
1477 m68k-ccur)
1478 os=-rtu
1480 m88k-omron*)
1481 os=-luna
1483 *-next )
1484 os=-nextstep
1486 *-sequent)
1487 os=-ptx
1489 *-crds)
1490 os=-unos
1492 *-ns)
1493 os=-genix
1495 i370-*)
1496 os=-mvs
1498 *-next)
1499 os=-nextstep3
1501 *-gould)
1502 os=-sysv
1504 *-highlevel)
1505 os=-bsd
1507 *-encore)
1508 os=-bsd
1510 *-sgi)
1511 os=-irix
1513 *-siemens)
1514 os=-sysv4
1516 *-masscomp)
1517 os=-rtu
1519 f30[01]-fujitsu | f700-fujitsu)
1520 os=-uxpv
1522 *-rom68k)
1523 os=-coff
1525 *-*bug)
1526 os=-coff
1528 *-apple)
1529 os=-macos
1531 *-atari*)
1532 os=-mint
1535 os=-none
1537 esac
1540 # Here we handle the case where we know the os, and the CPU type, but not the
1541 # manufacturer. We pick the logical manufacturer.
1542 vendor=unknown
1543 case $basic_machine in
1544 *-unknown)
1545 case $os in
1546 -riscix*)
1547 vendor=acorn
1549 -sunos*)
1550 vendor=sun
1552 -aix*)
1553 vendor=ibm
1555 -beos*)
1556 vendor=be
1558 -hpux*)
1559 vendor=hp
1561 -mpeix*)
1562 vendor=hp
1564 -hiux*)
1565 vendor=hitachi
1567 -unos*)
1568 vendor=crds
1570 -dgux*)
1571 vendor=dg
1573 -luna*)
1574 vendor=omron
1576 -genix*)
1577 vendor=ns
1579 -mvs* | -opened*)
1580 vendor=ibm
1582 -os400*)
1583 vendor=ibm
1585 -ptx*)
1586 vendor=sequent
1588 -tpf*)
1589 vendor=ibm
1591 -vxsim* | -vxworks* | -windiss*)
1592 vendor=wrs
1594 -aux*)
1595 vendor=apple
1597 -hms*)
1598 vendor=hitachi
1600 -mpw* | -macos*)
1601 vendor=apple
1603 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1604 vendor=atari
1606 -vos*)
1607 vendor=stratus
1609 esac
1610 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1612 esac
1614 echo $basic_machine$os
1615 exit
1617 # Local variables:
1618 # eval: (add-hook 'write-file-hooks 'time-stamp)
1619 # time-stamp-start: "timestamp='"
1620 # time-stamp-format: "%:y-%02m-%02d"
1621 # time-stamp-end: "'"
1622 # End: