OSDN Git Service

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