- djm@cvs.openbsd.org 2008/06/30 12:16:02
[openssh-git.git] / config.sub
blob519f2cd0066c56a2f4ea646d4c8648561402a80a
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 Free Software Foundation, Inc.
6 timestamp='2005-05-12'
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.
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.
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.
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., 51 Franklin Street - Fifth Floor, Boston, MA
25 # 02110-1301, USA.
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.
33 # Please send patches to <config-patches@gnu.org>. Submit a context
34 # diff and a properly formatted ChangeLog entry.
36 # Configuration subroutine to validate and canonicalize a configuration type.
37 # Supply the specified configuration type as an argument.
38 # If it is invalid, we print an error message on stderr and exit with code 1.
39 # Otherwise, we print the canonical config type on stdout and succeed.
41 # This file is supposed to be the same for all GNU packages
42 # and recognize all the CPU types, system types and aliases
43 # that are meaningful with *any* GNU software.
44 # Each package is responsible for reporting which valid configurations
45 # it does not support. The user should be able to distinguish
46 # a failure to support a valid configuration from a meaningless
47 # configuration.
49 # The goal of this file is to map all the various variations of a given
50 # machine specification into a single specification in the form:
51 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
52 # or in some cases, the newer four-part form:
53 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
54 # It is wrong to echo any other type of specification.
56 me=`echo "$0" | sed -e 's,.*/,,'`
58 usage="\
59 Usage: $0 [OPTION] CPU-MFR-OPSYS
60 $0 [OPTION] ALIAS
62 Canonicalize a configuration name.
64 Operation modes:
65 -h, --help print this help, then exit
66 -t, --time-stamp print date of last modification, then exit
67 -v, --version print version number, then exit
69 Report bugs and patches to <config-patches@gnu.org>."
71 version="\
72 GNU config.sub ($timestamp)
74 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
75 Free Software Foundation, Inc.
77 This is free software; see the source for copying conditions. There is NO
78 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
80 help="
81 Try \`$me --help' for more information."
83 # Parse command line
84 while test $# -gt 0 ; do
85 case $1 in
86 --time-stamp | --time* | -t )
87 echo "$timestamp" ; exit ;;
88 --version | -v )
89 echo "$version" ; exit ;;
90 --help | --h* | -h )
91 echo "$usage"; exit ;;
92 -- ) # Stop option processing
93 shift; break ;;
94 - ) # Use stdin as input.
95 break ;;
96 -* )
97 echo "$me: invalid option $1$help"
98 exit 1 ;;
100 *local*)
101 # First pass through any local machine types.
102 echo $1
103 exit ;;
106 break ;;
107 esac
108 done
110 case $# in
111 0) echo "$me: missing argument$help" >&2
112 exit 1;;
113 1) ;;
114 *) echo "$me: too many arguments$help" >&2
115 exit 1;;
116 esac
118 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
119 # Here we must recognize all the valid KERNEL-OS combinations.
120 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
121 case $maybe_os in
122 nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
123 kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
124 os=-$maybe_os
125 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
128 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
129 if [ $basic_machine != $1 ]
130 then os=`echo $1 | sed 's/.*-/-/'`
131 else os=; fi
133 esac
135 ### Let's recognize common machines as not being operating systems so
136 ### that things like config.sub decstation-3100 work. We also
137 ### recognize some manufacturers as not being operating systems, so we
138 ### can provide default operating systems below.
139 case $os in
140 -sun*os*)
141 # Prevent following clause from handling this invalid input.
143 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
144 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
145 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
146 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
147 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
148 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
149 -apple | -axis | -knuth | -cray)
151 basic_machine=$1
153 -sim | -cisco | -oki | -wec | -winbond)
155 basic_machine=$1
157 -scout)
159 -wrs)
160 os=-vxworks
161 basic_machine=$1
163 -chorusos*)
164 os=-chorusos
165 basic_machine=$1
167 -chorusrdb)
168 os=-chorusrdb
169 basic_machine=$1
171 -hiux*)
172 os=-hiuxwe2
174 -sco5)
175 os=-sco3.2v5
176 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
178 -sco4)
179 os=-sco3.2v4
180 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
182 -sco3.2.[4-9]*)
183 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
184 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
186 -sco3.2v[4-9]*)
187 # Don't forget version if it is 3.2v4 or newer.
188 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
190 -sco*)
191 os=-sco3.2v2
192 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
194 -udk*)
195 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
197 -isc)
198 os=-isc2.2
199 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
201 -clix*)
202 basic_machine=clipper-intergraph
204 -isc*)
205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
207 -lynx*)
208 os=-lynxos
210 -ptx*)
211 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
213 -windowsnt*)
214 os=`echo $os | sed -e 's/windowsnt/winnt/'`
216 -psos*)
217 os=-psos
219 -mint | -mint[0-9]*)
220 basic_machine=m68k-atari
221 os=-mint
223 esac
225 # Decode aliases for certain CPU-COMPANY combinations.
226 case $basic_machine in
227 # Recognize the basic CPU types without company name.
228 # Some are omitted here because they have special meanings below.
229 1750a | 580 \
230 | a29k \
231 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
232 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
233 | am33_2.0 \
234 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
235 | bfin \
236 | c4x | clipper \
237 | d10v | d30v | dlx | dsp16xx \
238 | fr30 | frv \
239 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
240 | i370 | i860 | i960 | ia64 \
241 | ip2k | iq2000 \
242 | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
243 | mips | mipsbe | mipseb | mipsel | mipsle \
244 | mips16 \
245 | mips64 | mips64el \
246 | mips64vr | mips64vrel \
247 | mips64orion | mips64orionel \
248 | mips64vr4100 | mips64vr4100el \
249 | mips64vr4300 | mips64vr4300el \
250 | mips64vr5000 | mips64vr5000el \
251 | mipsisa32 | mipsisa32el \
252 | mipsisa32r2 | mipsisa32r2el \
253 | mipsisa64 | mipsisa64el \
254 | mipsisa64r2 | mipsisa64r2el \
255 | mipsisa64sb1 | mipsisa64sb1el \
256 | mipsisa64sr71k | mipsisa64sr71kel \
257 | mipstx39 | mipstx39el \
258 | mn10200 | mn10300 \
259 | msp430 \
260 | ns16k | ns32k \
261 | openrisc | or32 \
262 | pdp10 | pdp11 | pj | pjl \
263 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
264 | pyramid \
265 | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
266 | sh64 | sh64le \
267 | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
268 | sparcv8 | sparcv9 | sparcv9b \
269 | strongarm \
270 | tahoe | thumb | tic4x | tic80 | tron \
271 | v850 | v850e \
272 | we32k \
273 | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
274 | z8k)
275 basic_machine=$basic_machine-unknown
277 m6811 | m68hc11 | m6812 | m68hc12)
278 # Motorola 68HC11/12.
279 basic_machine=$basic_machine-unknown
280 os=-none
282 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
285 # We use `pc' rather than `unknown'
286 # because (1) that's what they normally are, and
287 # (2) the word "unknown" tends to confuse beginning users.
288 i*86 | x86_64)
289 basic_machine=$basic_machine-pc
291 # Object if more than one company name word.
292 *-*-*)
293 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
294 exit 1
296 # Recognize the basic CPU types with company name.
297 580-* \
298 | a29k-* \
299 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
300 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
301 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
302 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
303 | avr-* \
304 | bfin-* | bs2000-* \
305 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
306 | clipper-* | craynv-* | cydra-* \
307 | d10v-* | d30v-* | dlx-* \
308 | elxsi-* \
309 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
310 | h8300-* | h8500-* \
311 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
312 | i*86-* | i860-* | i960-* | ia64-* \
313 | ip2k-* | iq2000-* \
314 | m32r-* | m32rle-* \
315 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
316 | m88110-* | m88k-* | maxq-* | mcore-* \
317 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
318 | mips16-* \
319 | mips64-* | mips64el-* \
320 | mips64vr-* | mips64vrel-* \
321 | mips64orion-* | mips64orionel-* \
322 | mips64vr4100-* | mips64vr4100el-* \
323 | mips64vr4300-* | mips64vr4300el-* \
324 | mips64vr5000-* | mips64vr5000el-* \
325 | mipsisa32-* | mipsisa32el-* \
326 | mipsisa32r2-* | mipsisa32r2el-* \
327 | mipsisa64-* | mipsisa64el-* \
328 | mipsisa64r2-* | mipsisa64r2el-* \
329 | mipsisa64sb1-* | mipsisa64sb1el-* \
330 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
331 | mipstx39-* | mipstx39el-* \
332 | mmix-* \
333 | msp430-* \
334 | none-* | np1-* | ns16k-* | ns32k-* \
335 | orion-* \
336 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
337 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
338 | pyramid-* \
339 | romp-* | rs6000-* \
340 | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
341 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
342 | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
343 | sparclite-* \
344 | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
345 | tahoe-* | thumb-* \
346 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
347 | tron-* \
348 | v850-* | v850e-* | vax-* \
349 | we32k-* \
350 | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
351 | xstormy16-* | xtensa-* \
352 | ymp-* \
353 | z8k-*)
355 # Recognize the various machine names and aliases which stand
356 # for a CPU type and a company and sometimes even an OS.
357 386bsd)
358 basic_machine=i386-unknown
359 os=-bsd
361 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
362 basic_machine=m68000-att
364 3b*)
365 basic_machine=we32k-att
367 a29khif)
368 basic_machine=a29k-amd
369 os=-udi
371 abacus)
372 basic_machine=abacus-unknown
374 adobe68k)
375 basic_machine=m68010-adobe
376 os=-scout
378 alliant | fx80)
379 basic_machine=fx80-alliant
381 altos | altos3068)
382 basic_machine=m68k-altos
384 am29k)
385 basic_machine=a29k-none
386 os=-bsd
388 amd64)
389 basic_machine=x86_64-pc
391 amd64-*)
392 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
394 amdahl)
395 basic_machine=580-amdahl
396 os=-sysv
398 amiga | amiga-*)
399 basic_machine=m68k-unknown
401 amigaos | amigados)
402 basic_machine=m68k-unknown
403 os=-amigaos
405 amigaunix | amix)
406 basic_machine=m68k-unknown
407 os=-sysv4
409 apollo68)
410 basic_machine=m68k-apollo
411 os=-sysv
413 apollo68bsd)
414 basic_machine=m68k-apollo
415 os=-bsd
417 aux)
418 basic_machine=m68k-apple
419 os=-aux
421 balance)
422 basic_machine=ns32k-sequent
423 os=-dynix
425 c90)
426 basic_machine=c90-cray
427 os=-unicos
429 convex-c1)
430 basic_machine=c1-convex
431 os=-bsd
433 convex-c2)
434 basic_machine=c2-convex
435 os=-bsd
437 convex-c32)
438 basic_machine=c32-convex
439 os=-bsd
441 convex-c34)
442 basic_machine=c34-convex
443 os=-bsd
445 convex-c38)
446 basic_machine=c38-convex
447 os=-bsd
449 cray | j90)
450 basic_machine=j90-cray
451 os=-unicos
453 craynv)
454 basic_machine=craynv-cray
455 os=-unicosmp
457 cr16c)
458 basic_machine=cr16c-unknown
459 os=-elf
461 crds | unos)
462 basic_machine=m68k-crds
464 crisv32 | crisv32-* | etraxfs*)
465 basic_machine=crisv32-axis
467 cris | cris-* | etrax*)
468 basic_machine=cris-axis
470 crx)
471 basic_machine=crx-unknown
472 os=-elf
474 da30 | da30-*)
475 basic_machine=m68k-da30
477 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
478 basic_machine=mips-dec
480 decsystem10* | dec10*)
481 basic_machine=pdp10-dec
482 os=-tops10
484 decsystem20* | dec20*)
485 basic_machine=pdp10-dec
486 os=-tops20
488 delta | 3300 | motorola-3300 | motorola-delta \
489 | 3300-motorola | delta-motorola)
490 basic_machine=m68k-motorola
492 delta88)
493 basic_machine=m88k-motorola
494 os=-sysv3
496 djgpp)
497 basic_machine=i586-pc
498 os=-msdosdjgpp
500 dpx20 | dpx20-*)
501 basic_machine=rs6000-bull
502 os=-bosx
504 dpx2* | dpx2*-bull)
505 basic_machine=m68k-bull
506 os=-sysv3
508 ebmon29k)
509 basic_machine=a29k-amd
510 os=-ebmon
512 elxsi)
513 basic_machine=elxsi-elxsi
514 os=-bsd
516 encore | umax | mmax)
517 basic_machine=ns32k-encore
519 es1800 | OSE68k | ose68k | ose | OSE)
520 basic_machine=m68k-ericsson
521 os=-ose
523 fx2800)
524 basic_machine=i860-alliant
526 genix)
527 basic_machine=ns32k-ns
529 gmicro)
530 basic_machine=tron-gmicro
531 os=-sysv
533 go32)
534 basic_machine=i386-pc
535 os=-go32
537 h3050r* | hiux*)
538 basic_machine=hppa1.1-hitachi
539 os=-hiuxwe2
541 h8300hms)
542 basic_machine=h8300-hitachi
543 os=-hms
545 h8300xray)
546 basic_machine=h8300-hitachi
547 os=-xray
549 h8500hms)
550 basic_machine=h8500-hitachi
551 os=-hms
553 harris)
554 basic_machine=m88k-harris
555 os=-sysv3
557 hp300-*)
558 basic_machine=m68k-hp
560 hp300bsd)
561 basic_machine=m68k-hp
562 os=-bsd
564 hp300hpux)
565 basic_machine=m68k-hp
566 os=-hpux
568 hp3k9[0-9][0-9] | hp9[0-9][0-9])
569 basic_machine=hppa1.0-hp
571 hp9k2[0-9][0-9] | hp9k31[0-9])
572 basic_machine=m68000-hp
574 hp9k3[2-9][0-9])
575 basic_machine=m68k-hp
577 hp9k6[0-9][0-9] | hp6[0-9][0-9])
578 basic_machine=hppa1.0-hp
580 hp9k7[0-79][0-9] | hp7[0-79][0-9])
581 basic_machine=hppa1.1-hp
583 hp9k78[0-9] | hp78[0-9])
584 # FIXME: really hppa2.0-hp
585 basic_machine=hppa1.1-hp
587 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
588 # FIXME: really hppa2.0-hp
589 basic_machine=hppa1.1-hp
591 hp9k8[0-9][13679] | hp8[0-9][13679])
592 basic_machine=hppa1.1-hp
594 hp9k8[0-9][0-9] | hp8[0-9][0-9])
595 basic_machine=hppa1.0-hp
597 hppa-next)
598 os=-nextstep3
600 hppaosf)
601 basic_machine=hppa1.1-hp
602 os=-osf
604 hppro)
605 basic_machine=hppa1.1-hp
606 os=-proelf
608 i370-ibm* | ibm*)
609 basic_machine=i370-ibm
611 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
612 i*86v32)
613 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
614 os=-sysv32
616 i*86v4*)
617 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
618 os=-sysv4
620 i*86v)
621 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
622 os=-sysv
624 i*86sol2)
625 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
626 os=-solaris2
628 i386mach)
629 basic_machine=i386-mach
630 os=-mach
632 i386-vsta | vsta)
633 basic_machine=i386-unknown
634 os=-vsta
636 iris | iris4d)
637 basic_machine=mips-sgi
638 case $os in
639 -irix*)
642 os=-irix4
644 esac
646 isi68 | isi)
647 basic_machine=m68k-isi
648 os=-sysv
650 m88k-omron*)
651 basic_machine=m88k-omron
653 magnum | m3230)
654 basic_machine=mips-mips
655 os=-sysv
657 merlin)
658 basic_machine=ns32k-utek
659 os=-sysv
661 mingw32)
662 basic_machine=i386-pc
663 os=-mingw32
665 miniframe)
666 basic_machine=m68000-convergent
668 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
669 basic_machine=m68k-atari
670 os=-mint
672 mips3*-*)
673 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
675 mips3*)
676 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
678 monitor)
679 basic_machine=m68k-rom68k
680 os=-coff
682 morphos)
683 basic_machine=powerpc-unknown
684 os=-morphos
686 msdos)
687 basic_machine=i386-pc
688 os=-msdos
690 mvs)
691 basic_machine=i370-ibm
692 os=-mvs
694 ncr3000)
695 basic_machine=i486-ncr
696 os=-sysv4
698 netbsd386)
699 basic_machine=i386-unknown
700 os=-netbsd
702 netwinder)
703 basic_machine=armv4l-rebel
704 os=-linux
706 news | news700 | news800 | news900)
707 basic_machine=m68k-sony
708 os=-newsos
710 news1000)
711 basic_machine=m68030-sony
712 os=-newsos
714 news-3600 | risc-news)
715 basic_machine=mips-sony
716 os=-newsos
718 necv70)
719 basic_machine=v70-nec
720 os=-sysv
722 next | m*-next )
723 basic_machine=m68k-next
724 case $os in
725 -nextstep* )
727 -ns2*)
728 os=-nextstep2
731 os=-nextstep3
733 esac
735 nh3000)
736 basic_machine=m68k-harris
737 os=-cxux
739 nh[45]000)
740 basic_machine=m88k-harris
741 os=-cxux
743 nindy960)
744 basic_machine=i960-intel
745 os=-nindy
747 mon960)
748 basic_machine=i960-intel
749 os=-mon960
751 nonstopux)
752 basic_machine=mips-compaq
753 os=-nonstopux
755 np1)
756 basic_machine=np1-gould
758 nsr-tandem)
759 basic_machine=nsr-tandem
761 op50n-* | op60c-*)
762 basic_machine=hppa1.1-oki
763 os=-proelf
765 or32 | or32-*)
766 basic_machine=or32-unknown
767 os=-coff
769 os400)
770 basic_machine=powerpc-ibm
771 os=-os400
773 OSE68000 | ose68000)
774 basic_machine=m68000-ericsson
775 os=-ose
777 os68k)
778 basic_machine=m68k-none
779 os=-os68k
781 pa-hitachi)
782 basic_machine=hppa1.1-hitachi
783 os=-hiuxwe2
785 paragon)
786 basic_machine=i860-intel
787 os=-osf
789 pbd)
790 basic_machine=sparc-tti
792 pbb)
793 basic_machine=m68k-tti
795 pc532 | pc532-*)
796 basic_machine=ns32k-pc532
798 pentium | p5 | k5 | k6 | nexgen | viac3)
799 basic_machine=i586-pc
801 pentiumpro | p6 | 6x86 | athlon | athlon_*)
802 basic_machine=i686-pc
804 pentiumii | pentium2 | pentiumiii | pentium3)
805 basic_machine=i686-pc
807 pentium4)
808 basic_machine=i786-pc
810 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
811 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
813 pentiumpro-* | p6-* | 6x86-* | athlon-*)
814 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
816 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
817 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
819 pentium4-*)
820 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
823 basic_machine=pn-gould
825 power) basic_machine=power-ibm
827 ppc) basic_machine=powerpc-unknown
829 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
831 ppcle | powerpclittle | ppc-le | powerpc-little)
832 basic_machine=powerpcle-unknown
834 ppcle-* | powerpclittle-*)
835 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
837 ppc64) basic_machine=powerpc64-unknown
839 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
841 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
842 basic_machine=powerpc64le-unknown
844 ppc64le-* | powerpc64little-*)
845 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
847 ps2)
848 basic_machine=i386-ibm
850 pw32)
851 basic_machine=i586-unknown
852 os=-pw32
854 rom68k)
855 basic_machine=m68k-rom68k
856 os=-coff
858 rm[46]00)
859 basic_machine=mips-siemens
861 rtpc | rtpc-*)
862 basic_machine=romp-ibm
864 s390 | s390-*)
865 basic_machine=s390-ibm
867 s390x | s390x-*)
868 basic_machine=s390x-ibm
870 sa29200)
871 basic_machine=a29k-amd
872 os=-udi
874 sb1)
875 basic_machine=mipsisa64sb1-unknown
877 sb1el)
878 basic_machine=mipsisa64sb1el-unknown
880 sei)
881 basic_machine=mips-sei
882 os=-seiux
884 sequent)
885 basic_machine=i386-sequent
888 basic_machine=sh-hitachi
889 os=-hms
891 sh64)
892 basic_machine=sh64-unknown
894 sparclite-wrs | simso-wrs)
895 basic_machine=sparclite-wrs
896 os=-vxworks
898 sps7)
899 basic_machine=m68k-bull
900 os=-sysv2
902 spur)
903 basic_machine=spur-unknown
905 st2000)
906 basic_machine=m68k-tandem
908 stratus)
909 basic_machine=i860-stratus
910 os=-sysv4
912 sun2)
913 basic_machine=m68000-sun
915 sun2os3)
916 basic_machine=m68000-sun
917 os=-sunos3
919 sun2os4)
920 basic_machine=m68000-sun
921 os=-sunos4
923 sun3os3)
924 basic_machine=m68k-sun
925 os=-sunos3
927 sun3os4)
928 basic_machine=m68k-sun
929 os=-sunos4
931 sun4os3)
932 basic_machine=sparc-sun
933 os=-sunos3
935 sun4os4)
936 basic_machine=sparc-sun
937 os=-sunos4
939 sun4sol2)
940 basic_machine=sparc-sun
941 os=-solaris2
943 sun3 | sun3-*)
944 basic_machine=m68k-sun
946 sun4)
947 basic_machine=sparc-sun
949 sun386 | sun386i | roadrunner)
950 basic_machine=i386-sun
952 sv1)
953 basic_machine=sv1-cray
954 os=-unicos
956 symmetry)
957 basic_machine=i386-sequent
958 os=-dynix
960 t3e)
961 basic_machine=alphaev5-cray
962 os=-unicos
964 t90)
965 basic_machine=t90-cray
966 os=-unicos
968 tic54x | c54x*)
969 basic_machine=tic54x-unknown
970 os=-coff
972 tic55x | c55x*)
973 basic_machine=tic55x-unknown
974 os=-coff
976 tic6x | c6x*)
977 basic_machine=tic6x-unknown
978 os=-coff
980 tx39)
981 basic_machine=mipstx39-unknown
983 tx39el)
984 basic_machine=mipstx39el-unknown
986 toad1)
987 basic_machine=pdp10-xkl
988 os=-tops20
990 tower | tower-32)
991 basic_machine=m68k-ncr
993 tpf)
994 basic_machine=s390x-ibm
995 os=-tpf
997 udi29k)
998 basic_machine=a29k-amd
999 os=-udi
1001 ultra3)
1002 basic_machine=a29k-nyu
1003 os=-sym1
1005 v810 | necv810)
1006 basic_machine=v810-nec
1007 os=-none
1009 vaxv)
1010 basic_machine=vax-dec
1011 os=-sysv
1013 vms)
1014 basic_machine=vax-dec
1015 os=-vms
1017 vpp*|vx|vx-*)
1018 basic_machine=f301-fujitsu
1020 vxworks960)
1021 basic_machine=i960-wrs
1022 os=-vxworks
1024 vxworks68)
1025 basic_machine=m68k-wrs
1026 os=-vxworks
1028 vxworks29k)
1029 basic_machine=a29k-wrs
1030 os=-vxworks
1032 w65*)
1033 basic_machine=w65-wdc
1034 os=-none
1036 w89k-*)
1037 basic_machine=hppa1.1-winbond
1038 os=-proelf
1040 xbox)
1041 basic_machine=i686-pc
1042 os=-mingw32
1044 xps | xps100)
1045 basic_machine=xps100-honeywell
1047 ymp)
1048 basic_machine=ymp-cray
1049 os=-unicos
1051 z8k-*-coff)
1052 basic_machine=z8k-unknown
1053 os=-sim
1055 none)
1056 basic_machine=none-none
1057 os=-none
1060 # Here we handle the default manufacturer of certain CPU types. It is in
1061 # some cases the only manufacturer, in others, it is the most popular.
1062 w89k)
1063 basic_machine=hppa1.1-winbond
1065 op50n)
1066 basic_machine=hppa1.1-oki
1068 op60c)
1069 basic_machine=hppa1.1-oki
1071 romp)
1072 basic_machine=romp-ibm
1074 mmix)
1075 basic_machine=mmix-knuth
1077 rs6000)
1078 basic_machine=rs6000-ibm
1080 vax)
1081 basic_machine=vax-dec
1083 pdp10)
1084 # there are many clones, so DEC is not a safe bet
1085 basic_machine=pdp10-unknown
1087 pdp11)
1088 basic_machine=pdp11-dec
1090 we32k)
1091 basic_machine=we32k-att
1093 sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
1094 basic_machine=sh-unknown
1096 sh64)
1097 basic_machine=sh64-unknown
1099 sparc | sparcv8 | sparcv9 | sparcv9b)
1100 basic_machine=sparc-sun
1102 cydra)
1103 basic_machine=cydra-cydrome
1105 orion)
1106 basic_machine=orion-highlevel
1108 orion105)
1109 basic_machine=clipper-highlevel
1111 mac | mpw | mac-mpw)
1112 basic_machine=m68k-apple
1114 pmac | pmac-mpw)
1115 basic_machine=powerpc-apple
1117 *-unknown)
1118 # Make sure to match an already-canonicalized machine name.
1121 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1122 exit 1
1124 esac
1126 # Here we canonicalize certain aliases for manufacturers.
1127 case $basic_machine in
1128 *-digital*)
1129 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1131 *-commodore*)
1132 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1136 esac
1138 # Decode manufacturer-specific aliases for certain operating systems.
1140 if [ x"$os" != x"" ]
1141 then
1142 case $os in
1143 # First match some system type aliases
1144 # that might get confused with valid system types.
1145 # -solaris* is a basic system type, with this one exception.
1146 -solaris1 | -solaris1.*)
1147 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1149 -solaris)
1150 os=-solaris2
1152 -svr4*)
1153 os=-sysv4
1155 -unixware*)
1156 os=-sysv4.2uw
1158 -gnu/linux*)
1159 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1161 # First accept the basic system types.
1162 # The portable systems comes first.
1163 # Each alternative MUST END IN A *, to match a version number.
1164 # -sysv* is not here because it comes later, after sysvr4.
1165 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1166 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1167 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1168 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1169 | -aos* \
1170 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1171 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1172 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
1173 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1174 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1175 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1176 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1177 | -chorusos* | -chorusrdb* \
1178 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1179 | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
1180 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1181 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1182 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1183 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1184 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1185 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* | -skyos*)
1186 # Remember, each alternative MUST END IN *, to match a version number.
1188 -qnx*)
1189 case $basic_machine in
1190 x86-* | i*86-*)
1193 os=-nto$os
1195 esac
1197 -nto-qnx*)
1199 -nto*)
1200 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1202 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1203 | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
1204 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1206 -mac*)
1207 os=`echo $os | sed -e 's|mac|macos|'`
1209 -linux-dietlibc)
1210 os=-linux-dietlibc
1212 -linux*)
1213 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1215 -sunos5*)
1216 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1218 -sunos6*)
1219 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1221 -opened*)
1222 os=-openedition
1224 -os400*)
1225 os=-os400
1227 -wince*)
1228 os=-wince
1230 -osfrose*)
1231 os=-osfrose
1233 -osf*)
1234 os=-osf
1236 -utek*)
1237 os=-bsd
1239 -dynix*)
1240 os=-bsd
1242 -acis*)
1243 os=-aos
1245 -atheos*)
1246 os=-atheos
1248 -syllable*)
1249 os=-syllable
1251 -386bsd)
1252 os=-bsd
1254 -ctix* | -uts*)
1255 os=-sysv
1257 -nova*)
1258 os=-rtmk-nova
1260 -ns2 )
1261 os=-nextstep2
1263 -nsk*)
1264 os=-nsk
1266 # Preserve the version number of sinix5.
1267 -sinix5.*)
1268 os=`echo $os | sed -e 's|sinix|sysv|'`
1270 -sinix*)
1271 os=-sysv4
1273 -tpf*)
1274 os=-tpf
1276 -triton*)
1277 os=-sysv3
1279 -oss*)
1280 os=-sysv3
1282 -svr4)
1283 os=-sysv4
1285 -svr3)
1286 os=-sysv3
1288 -sysvr4)
1289 os=-sysv4
1291 # This must come after -sysvr4.
1292 -sysv*)
1294 -ose*)
1295 os=-ose
1297 -es1800*)
1298 os=-ose
1300 -xenix)
1301 os=-xenix
1303 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1304 os=-mint
1306 -aros*)
1307 os=-aros
1309 -kaos*)
1310 os=-kaos
1312 -zvmoe)
1313 os=-zvmoe
1315 -none)
1318 # Get rid of the `-' at the beginning of $os.
1319 os=`echo $os | sed 's/[^-]*-//'`
1320 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1321 exit 1
1323 esac
1324 else
1326 # Here we handle the default operating systems that come with various machines.
1327 # The value should be what the vendor currently ships out the door with their
1328 # machine or put another way, the most popular os provided with the machine.
1330 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1331 # "-sun"), then you have to tell the case statement up towards the top
1332 # that MANUFACTURER isn't an operating system. Otherwise, code above
1333 # will signal an error saying that MANUFACTURER isn't an operating
1334 # system, and we'll never get to this point.
1336 case $basic_machine in
1337 *-acorn)
1338 os=-riscix1.2
1340 arm*-rebel)
1341 os=-linux
1343 arm*-semi)
1344 os=-aout
1346 c4x-* | tic4x-*)
1347 os=-coff
1349 # This must come before the *-dec entry.
1350 pdp10-*)
1351 os=-tops20
1353 pdp11-*)
1354 os=-none
1356 *-dec | vax-*)
1357 os=-ultrix4.2
1359 m68*-apollo)
1360 os=-domain
1362 i386-sun)
1363 os=-sunos4.0.2
1365 m68000-sun)
1366 os=-sunos3
1367 # This also exists in the configure program, but was not the
1368 # default.
1369 # os=-sunos4
1371 m68*-cisco)
1372 os=-aout
1374 mips*-cisco)
1375 os=-elf
1377 mips*-*)
1378 os=-elf
1380 or32-*)
1381 os=-coff
1383 *-tti) # must be before sparc entry or we get the wrong os.
1384 os=-sysv3
1386 sparc-* | *-sun)
1387 os=-sunos4.1.1
1389 *-be)
1390 os=-beos
1392 *-ibm)
1393 os=-aix
1395 *-knuth)
1396 os=-mmixware
1398 *-wec)
1399 os=-proelf
1401 *-winbond)
1402 os=-proelf
1404 *-oki)
1405 os=-proelf
1407 *-hp)
1408 os=-hpux
1410 *-hitachi)
1411 os=-hiux
1413 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1414 os=-sysv
1416 *-cbm)
1417 os=-amigaos
1419 *-dg)
1420 os=-dgux
1422 *-dolphin)
1423 os=-sysv3
1425 m68k-ccur)
1426 os=-rtu
1428 m88k-omron*)
1429 os=-luna
1431 *-next )
1432 os=-nextstep
1434 *-sequent)
1435 os=-ptx
1437 *-crds)
1438 os=-unos
1440 *-ns)
1441 os=-genix
1443 i370-*)
1444 os=-mvs
1446 *-next)
1447 os=-nextstep3
1449 *-gould)
1450 os=-sysv
1452 *-highlevel)
1453 os=-bsd
1455 *-encore)
1456 os=-bsd
1458 *-sgi)
1459 os=-irix
1461 *-siemens)
1462 os=-sysv4
1464 *-masscomp)
1465 os=-rtu
1467 f30[01]-fujitsu | f700-fujitsu)
1468 os=-uxpv
1470 *-rom68k)
1471 os=-coff
1473 *-*bug)
1474 os=-coff
1476 *-apple)
1477 os=-macos
1479 *-atari*)
1480 os=-mint
1483 os=-none
1485 esac
1488 # Here we handle the case where we know the os, and the CPU type, but not the
1489 # manufacturer. We pick the logical manufacturer.
1490 vendor=unknown
1491 case $basic_machine in
1492 *-unknown)
1493 case $os in
1494 -riscix*)
1495 vendor=acorn
1497 -sunos*)
1498 vendor=sun
1500 -aix*)
1501 vendor=ibm
1503 -beos*)
1504 vendor=be
1506 -hpux*)
1507 vendor=hp
1509 -mpeix*)
1510 vendor=hp
1512 -hiux*)
1513 vendor=hitachi
1515 -unos*)
1516 vendor=crds
1518 -dgux*)
1519 vendor=dg
1521 -luna*)
1522 vendor=omron
1524 -genix*)
1525 vendor=ns
1527 -mvs* | -opened*)
1528 vendor=ibm
1530 -os400*)
1531 vendor=ibm
1533 -ptx*)
1534 vendor=sequent
1536 -tpf*)
1537 vendor=ibm
1539 -vxsim* | -vxworks* | -windiss*)
1540 vendor=wrs
1542 -aux*)
1543 vendor=apple
1545 -hms*)
1546 vendor=hitachi
1548 -mpw* | -macos*)
1549 vendor=apple
1551 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1552 vendor=atari
1554 -vos*)
1555 vendor=stratus
1557 esac
1558 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1560 esac
1562 echo $basic_machine$os
1563 exit
1565 # Local variables:
1566 # eval: (add-hook 'write-file-hooks 'time-stamp)
1567 # time-stamp-start: "timestamp='"
1568 # time-stamp-format: "%:y-%02m-%02d"
1569 # time-stamp-end: "'"
1570 # End: