OSDN Git Service

Wed Jun 10 08:56:27 1998 John Carr <jfc@mit.edu>
[pf3gnuchains/gcc-fork.git] / config.sub
1 #! /bin/sh
2 # Configuration validation subroutine script, version 1.1.
3 #   Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
4 # This file is (in principle) common to ALL GNU software.
5 # The presence of a machine in this file suggests that SOME GNU software
6 # can handle that machine.  It does not imply ALL GNU software can.
7 #
8 # This file is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place - Suite 330,
21 # Boston, MA 02111-1307, USA.
22
23 # As a special exception to the GNU General Public License, if you
24 # distribute this file as part of a program that contains a
25 # configuration script generated by Autoconf, you may include it under
26 # the same distribution terms that you use for the rest of that program.
27
28 # Configuration subroutine to validate and canonicalize a configuration type.
29 # Supply the specified configuration type as an argument.
30 # If it is invalid, we print an error message on stderr and exit with code 1.
31 # Otherwise, we print the canonical config type on stdout and succeed.
32
33 # This file is supposed to be the same for all GNU packages
34 # and recognize all the CPU types, system types and aliases
35 # that are meaningful with *any* GNU software.
36 # Each package is responsible for reporting which valid configurations
37 # it does not support.  The user should be able to distinguish
38 # a failure to support a valid configuration from a meaningless
39 # configuration.
40
41 # The goal of this file is to map all the various variations of a given
42 # machine specification into a single specification in the form:
43 #       CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
44 # or in some cases, the newer four-part form:
45 #       CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
46 # It is wrong to echo any other type of specification.
47
48 if [ x$1 = x ]
49 then
50         echo Configuration name missing. 1>&2
51         echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
52         echo "or     $0 ALIAS" 1>&2
53         echo where ALIAS is a recognized configuration type. 1>&2
54         exit 1
55 fi
56
57 # First pass through any local machine types.
58 case $1 in
59         *local*)
60                 echo $1
61                 exit 0
62                 ;;
63         *)
64         ;;
65 esac
66
67 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
68 # Here we must recognize all the valid KERNEL-OS combinations.
69 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
70 case $maybe_os in
71   linux-gnu*)
72     os=-$maybe_os
73     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
74     ;;
75   *)
76     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
77     if [ $basic_machine != $1 ]
78     then os=`echo $1 | sed 's/.*-/-/'`
79     else os=; fi
80     ;;
81 esac
82
83 ### Let's recognize common machines as not being operating systems so
84 ### that things like config.sub decstation-3100 work.  We also
85 ### recognize some manufacturers as not being operating systems, so we
86 ### can provide default operating systems below.
87 case $os in
88         -sun*os*)
89                 # Prevent following clause from handling this invalid input.
90                 ;;
91         -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
92         -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
93         -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
94         -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
95         -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
96         -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
97         -apple)
98                 os=
99                 basic_machine=$1
100                 ;;
101         -sim | -cisco | -oki | -wec | -winbond )        # CYGNUS LOCAL
102                 os=
103                 basic_machine=$1
104                 ;;
105         -scout)                                         # CYGNUS LOCAL
106                 ;;
107         -wrs)                                           # CYGNUS LOCAL
108                 os=vxworks
109                 basic_machine=$1
110                 ;;
111         -hiux*)
112                 os=-hiuxwe2
113                 ;;
114         -sco5)
115                 os=-sco3.2v5
116                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
117                 ;;
118         -sco4)
119                 os=-sco3.2v4
120                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
121                 ;;
122         -sco3.2.[4-9]*)
123                 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
124                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
125                 ;;
126         -sco3.2v[4-9]*)
127                 # Don't forget version if it is 3.2v4 or newer.
128                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
129                 ;;
130         -sco*)
131                 os=-sco3.2v2
132                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
133                 ;;
134         -isc)
135                 os=-isc2.2
136                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
137                 ;;
138         -clix*)
139                 basic_machine=clipper-intergraph
140                 ;;
141         -isc*)
142                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
143                 ;;
144         -lynx*)
145                 os=-lynxos
146                 ;;
147         -ptx*)
148                 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
149                 ;;
150         -windowsnt*)
151                 os=`echo $os | sed -e 's/windowsnt/winnt/'`
152                 ;;
153         -psos*)
154                 os=-psos
155                 ;;
156 esac
157
158 # Decode aliases for certain CPU-COMPANY combinations.
159 case $basic_machine in
160         # Recognize the basic CPU types without company name.
161         # Some are omitted here because they have special meanings below.
162         tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
163                 | arme[lb] | pyramid | mn10200 | mn10300 \
164                 | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
165                 | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
166                 | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
167                 | 1750a | dsp16xx | pdp11 \
168                 | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
169                 | mipstx39 | mipstx39el \
170                 | sparc | sparclet | sparclite | sparc64 | v850)
171                 basic_machine=$basic_machine-unknown
172                 ;;
173         m88110 | m680[01234]0 | m683?2 | m68360 | z8k | v70 | h8500 | w65) # CYGNUS LOCAL
174                 basic_machine=$basic_machine-unknown
175                 ;;
176         thumb)
177                 basic_machine=$basic_machine-unknown
178                 ;;
179         mips64vr4300 | mips64vr4300el) # CYGNUS LOCAL jsmith/vr4300
180                 basic_machine=$basic_machine-unknown
181                 ;;
182         mips64vr4100 | mips64vr4100el) # CYGNUS LOCAL jsmith/vr4100
183                 basic_machine=$basic_machine-unknown
184                 ;;
185         mips64vr5000 | mips64vr5000el) # CYGNUS LOCAL ian/vr5000
186                 basic_machine=$basic_machine-unknown
187                 ;;
188         mips16) # CYGNUS LOCAL krk/mips16
189                 basic_machine=$basic_machine-unknown
190                 ;;
191         d10v)                           # CYGNUS LOCAL meissner/d10v
192                 basic_machine=$basic_machine-unknown
193                 ;;
194         # We use `pc' rather than `unknown'
195         # because (1) that's what they normally are, and
196         # (2) the word "unknown" tends to confuse beginning users.
197         i[3456]86)
198           basic_machine=$basic_machine-pc
199           ;;
200         # Object if more than one company name word.
201         *-*-*)
202                 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
203                 exit 1
204                 ;;
205         # Recognize the basic CPU types with company name.
206         vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
207               | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
208               | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
209               | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
210               | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
211               | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
212               | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
213               | xps100-* | clipper-* | orion-* \
214               | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
215               | sparc64-* | mips64-* | mipsel-* \
216               | mips64el-* | mips64orion-* | mips64orionel-* \
217               | mipstx39-* | mipstx39el-* \
218               | f301-*)
219                 ;;
220         m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # CYGNUS LOCAL
221                 ;;
222         thumb-*)
223                 ;;
224         mips64vr4300-* | mips64vr4300el-*) # CYGNUS LOCAL jsmith/vr4300
225                 ;;
226         mips64vr4100-* | mips64vr4100el-*) # CYGNUS LOCAL jsmith/vr4100
227                 ;;
228         mips16-*) # CYGNUS LOCAL krk/mips16
229                 ;;
230         # Recognize the various machine names and aliases which stand
231         # for a CPU type and a company and sometimes even an OS.
232         386bsd)                                         # CYGNUS LOCAL
233                 basic_machine=i386-unknown
234                 os=-bsd
235                 ;;
236         3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
237                 basic_machine=m68000-att
238                 ;;
239         3b*)
240                 basic_machine=we32k-att
241                 ;;
242         a29khif)                                        # CYGNUS LOCAL
243                 basic_machine=a29k-amd
244                 os=-udi
245                 ;;
246         adobe68k)                                       # CYGNUS LOCAL
247                 basic_machine=m68010-adobe
248                 os=-scout
249                 ;;
250         alliant | fx80)
251                 basic_machine=fx80-alliant
252                 ;;
253         altos | altos3068)
254                 basic_machine=m68k-altos
255                 ;;
256         am29k)
257                 basic_machine=a29k-none
258                 os=-bsd
259                 ;;
260         amdahl)
261                 basic_machine=580-amdahl
262                 os=-sysv
263                 ;;
264         amiga | amiga-*)
265                 basic_machine=m68k-cbm
266                 ;;
267         amigaos | amigados)
268                 basic_machine=m68k-cbm
269                 os=-amigaos
270                 ;;
271         amigaunix | amix)
272                 basic_machine=m68k-cbm
273                 os=-sysv4
274                 ;;
275         apollo68)
276                 basic_machine=m68k-apollo
277                 os=-sysv
278                 ;;
279         apollo68bsd)                                    # CYGNUS LOCAL
280                 basic_machine=m68k-apollo
281                 os=-bsd
282                 ;;
283         aux)
284                 basic_machine=m68k-apple
285                 os=-aux
286                 ;;
287         balance)
288                 basic_machine=ns32k-sequent
289                 os=-dynix
290                 ;;
291         convex-c1)
292                 basic_machine=c1-convex
293                 os=-bsd
294                 ;;
295         convex-c2)
296                 basic_machine=c2-convex
297                 os=-bsd
298                 ;;
299         convex-c32)
300                 basic_machine=c32-convex
301                 os=-bsd
302                 ;;
303         convex-c34)
304                 basic_machine=c34-convex
305                 os=-bsd
306                 ;;
307         convex-c38)
308                 basic_machine=c38-convex
309                 os=-bsd
310                 ;;
311         cray | ymp)
312                 basic_machine=ymp-cray
313                 os=-unicos
314                 ;;
315         cray2)
316                 basic_machine=cray2-cray
317                 os=-unicos
318                 ;;
319         [ctj]90-cray)
320                 basic_machine=c90-cray
321                 os=-unicos
322                 ;;
323         crds | unos)
324                 basic_machine=m68k-crds
325                 ;;
326         da30 | da30-*)
327                 basic_machine=m68k-da30
328                 ;;
329         decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
330                 basic_machine=mips-dec
331                 ;;
332         delta | 3300 | motorola-3300 | motorola-delta \
333               | 3300-motorola | delta-motorola)
334                 basic_machine=m68k-motorola
335                 ;;
336         delta88)
337                 basic_machine=m88k-motorola
338                 os=-sysv3
339                 ;;
340         dpx20 | dpx20-*)
341                 basic_machine=rs6000-bull
342                 os=-bosx
343                 ;;
344         dpx2* | dpx2*-bull)
345                 basic_machine=m68k-bull
346                 os=-sysv3
347                 ;;
348         ebmon29k)
349                 basic_machine=a29k-amd
350                 os=-ebmon
351                 ;;
352         elxsi)
353                 basic_machine=elxsi-elxsi
354                 os=-bsd
355                 ;;
356         encore | umax | mmax)
357                 basic_machine=ns32k-encore
358                 ;;
359         es1800 | OSE68k | ose68k | ose | OSE)           # CYGNUS LOCAL
360                 basic_machine=m68k-ericsson
361                 os=-ose
362                 ;;
363         fx2800)
364                 basic_machine=i860-alliant
365                 ;;
366         genix)
367                 basic_machine=ns32k-ns
368                 ;;
369         gmicro)
370                 basic_machine=tron-gmicro
371                 os=-sysv
372                 ;;
373         h3050r* | hiux*)
374                 basic_machine=hppa1.1-hitachi
375                 os=-hiuxwe2
376                 ;;
377         h8300hms)
378                 basic_machine=h8300-hitachi
379                 os=-hms
380                 ;;
381         h8300xray)                                      # CYGNUS LOCAL
382                 basic_machine=h8300-hitachi
383                 os=-xray
384                 ;;
385         h8500hms)                                       # CYGNUS LOCAL
386                 basic_machine=h8500-hitachi
387                 os=-hms
388                 ;;
389         harris)
390                 basic_machine=m88k-harris
391                 os=-sysv3
392                 ;;
393         hp300-*)
394                 basic_machine=m68k-hp
395                 ;;
396         hp300bsd)
397                 basic_machine=m68k-hp
398                 os=-bsd
399                 ;;
400         hp300hpux)
401                 basic_machine=m68k-hp
402                 os=-hpux
403                 ;;
404         w89k-*)                                         # CYGNUS LOCAL
405                 basic_machine=hppa1.1-winbond
406                 os=-proelf
407                 ;;
408         op50n-*)                                        # CYGNUS LOCAL
409                 basic_machine=hppa1.1-oki
410                 os=-proelf
411                 ;;
412         op60c-*)                                        # CYGNUS LOCAL
413                 basic_machine=hppa1.1-oki
414                 os=-proelf
415                 ;;
416         hppro)                                          # CYGNUS LOCAL
417                 basic_machine=hppa1.1-hp
418                 os=-proelf
419                 ;;
420         hp9k2[0-9][0-9] | hp9k31[0-9])
421                 basic_machine=m68000-hp
422                 ;;
423         hp9k3[2-9][0-9])
424                 basic_machine=m68k-hp
425                 ;;
426         hp9k6[0-9][0-9] | hp6[0-9][0-9] )
427                 basic_machine=hppa1.0-hp
428                 ;;
429         hp9k7[0-79][0-9] | hp7[0-79][0-9] )
430                 basic_machine=hppa1.1-hp
431                 ;;
432         hp9k78[0-9] | hp78[0-9] )
433                 # FIXME: really hppa2.0-hp
434                 basic_machine=hppa1.1-hp
435                 ;;
436         hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \
437         hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 )
438                 # FIXME: really hppa2.0-hp
439                 basic_machine=hppa1.1-hp
440                 ;;
441         hp9k8[0-9][13679] | hp8[0-9][13679] )
442                 basic_machine=hppa1.1-hp
443                 ;;
444         hp9k8[0-9][0-9] | hp8[0-9][0-9])
445                 basic_machine=hppa1.0-hp
446                 ;;
447         hppa-next)
448                 os=-nextstep3
449                 ;;
450         hppaosf)                                        # CYGNUS LOCAL
451                 basic_machine=hppa1.1-hp
452                 os=-osf
453                 ;;
454         i370-ibm* | ibm*)
455                 basic_machine=i370-ibm
456                 os=-mvs
457                 ;;
458 # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
459         i[3456]86v32)
460                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
461                 os=-sysv32
462                 ;;
463         i[3456]86v4*)
464                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
465                 os=-sysv4
466                 ;;
467         i[3456]86v)
468                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
469                 os=-sysv
470                 ;;
471         i[3456]86sol2)
472                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
473                 os=-solaris2
474                 ;;
475         i386mach)                                       # CYGNUS LOCAL
476                 basic_machine=i386-mach
477                 os=-mach
478                 ;;
479         i386-vsta | vsta)                               # CYGNUS LOCAL
480                 basic_machine=i386-unknown
481                 os=-vsta
482                 ;;
483         i386-go32 | go32)                               # CYGNUS LOCAL
484                 basic_machine=i386-unknown
485                 os=-go32
486                 ;;
487         i386-mingw32 | mingw32)
488                 basic_machine=i386-unknown
489                 os=-mingw32
490                 ;;
491         iris | iris4d)
492                 basic_machine=mips-sgi
493                 case $os in
494                     -irix*)
495                         ;;
496                     *)
497                         os=-irix4
498                         ;;
499                 esac
500                 ;;
501         isi68 | isi)
502                 basic_machine=m68k-isi
503                 os=-sysv
504                 ;;
505         m88k-omron*)
506                 basic_machine=m88k-omron
507                 ;;
508         magnum | m3230)
509                 basic_machine=mips-mips
510                 os=-sysv
511                 ;;
512         merlin)
513                 basic_machine=ns32k-utek
514                 os=-sysv
515                 ;;
516         miniframe)
517                 basic_machine=m68000-convergent
518                 ;;
519         mipsel*-linux*)
520                 basic_machine=mipsel-unknown
521                 os=-linux-gnu
522                 ;;
523         mips*-linux*)
524                 basic_machine=mips-unknown
525                 os=-linux-gnu
526                 ;;
527         mips3*-*)
528                 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
529                 ;;
530         mips3*)
531                 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
532                 ;;
533         monitor)                                        # CYGNUS LOCAL
534                 basic_machine=m68k-rom68k
535                 os=-coff
536                 ;;
537         msdos)                                          # CYGNUS LOCAL
538                 basic_machine=i386-unknown      
539                 os=-msdos
540                 ;;
541         ncr3000)
542                 basic_machine=i486-ncr
543                 os=-sysv4
544                 ;;
545         netbsd386)
546                 basic_machine=i386-unknown              # CYGNUS LOCAL
547                 os=-netbsd
548                 ;;
549         news | news700 | news800 | news900)
550                 basic_machine=m68k-sony
551                 os=-newsos
552                 ;;
553         news1000)
554                 basic_machine=m68030-sony
555                 os=-newsos
556                 ;;
557         news-3600 | risc-news)
558                 basic_machine=mips-sony
559                 os=-newsos
560                 ;;
561         necv70)                                         # CYGNUS LOCAL
562                 basic_machine=v70-nec
563                 os=-sysv
564                 ;;
565         next | m*-next )
566                 basic_machine=m68k-next
567                 case $os in
568                     -nextstep* )
569                         ;;
570                     -ns2*)
571                       os=-nextstep2
572                         ;;
573                     *)
574                       os=-nextstep3
575                         ;;
576                 esac
577                 ;;
578         nh3000)
579                 basic_machine=m68k-harris
580                 os=-cxux
581                 ;;
582         nh[45]000)
583                 basic_machine=m88k-harris
584                 os=-cxux
585                 ;;
586         nindy960)
587                 basic_machine=i960-intel
588                 os=-nindy
589                 ;;
590         mon960)                                         # CYGNUS LOCAL
591                 basic_machine=i960-intel
592                 os=-mon960
593                 ;;
594         np1)
595                 basic_machine=np1-gould
596                 ;;
597         OSE68000 | ose68000)                            # CYGNUS LOCAL
598                 basic_machine=m68000-ericsson
599                 os=-ose
600                 ;;
601         os68k)                                          # CYGNUS LOCAL
602                 basic_machine=m68k-none
603                 os=-os68k
604                 ;;
605         pa-hitachi)
606                 basic_machine=hppa1.1-hitachi
607                 os=-hiuxwe2
608                 ;;
609         paragon)
610                 basic_machine=i860-intel
611                 os=-osf
612                 ;;
613         pbd)
614                 basic_machine=sparc-tti
615                 ;;
616         pbb)
617                 basic_machine=m68k-tti
618                 ;;
619         pc532 | pc532-*)
620                 basic_machine=ns32k-pc532
621                 ;;
622         pentium | p5)
623                 basic_machine=i586-intel
624                 ;;
625         pentiumpro | p6)
626                 basic_machine=i686-intel
627                 ;;
628         pentium-* | p5-*)
629                 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
630                 ;;
631         pentiumpro-* | p6-*)
632                 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
633                 ;;
634         k5)
635                 # We don't have specific support for AMD's K5 yet, so just call it a Pentium
636                 basic_machine=i586-amd
637                 ;;
638         nexen)
639                 # We don't have specific support for Nexgen yet, so just call it a Pentium
640                 basic_machine=i586-nexgen
641                 ;;
642         pn)
643                 basic_machine=pn-gould
644                 ;;
645         power)  basic_machine=rs6000-ibm
646                 ;;
647         ppc)    basic_machine=powerpc-unknown
648                 ;;
649         ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
650                 ;;
651         ppcle | powerpclittle | ppc-le | powerpc-little)
652                 basic_machine=powerpcle-unknown
653                 ;;
654         ppcle-* | powerpclittle-*)
655                 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
656                 ;;
657         ps2)
658                 basic_machine=i386-ibm
659                 ;;
660         rom68k)                                         # CYGNUS LOCAL
661                 basic_machine=m68k-rom68k
662                 os=-coff
663                 ;;
664         rm[46]00)
665                 basic_machine=mips-siemens
666                 ;;
667         rtpc | rtpc-*)
668                 basic_machine=romp-ibm
669                 ;;
670         sa29200)                                        # CYGNUS LOCAL
671                 basic_machine=a29k-amd
672                 os=-udi
673                 ;;
674         sequent)
675                 basic_machine=i386-sequent
676                 ;;
677         sh)
678                 basic_machine=sh-hitachi
679                 os=-hms
680                 ;;
681         sparclite-wrs)                                  # CYGNUS LOCAL
682                 basic_machine=sparclite-wrs
683                 os=-vxworks
684                 ;;
685         sps7)
686                 basic_machine=m68k-bull
687                 os=-sysv2
688                 ;;
689         spur)
690                 basic_machine=spur-unknown
691                 ;;
692         st2000)                                         # CYGNUS LOCAL
693                 basic_machine=m68k-tandem
694                 ;;
695         stratus)                                        # CYGNUS LOCAL
696                 basic_machine=i860-stratus
697                 os=-sysv4
698                 ;;
699         sun2)
700                 basic_machine=m68000-sun
701                 ;;
702         sun2os3)
703                 basic_machine=m68000-sun
704                 os=-sunos3
705                 ;;
706         sun2os4)
707                 basic_machine=m68000-sun
708                 os=-sunos4
709                 ;;
710         sun3os3)
711                 basic_machine=m68k-sun
712                 os=-sunos3
713                 ;;
714         sun3os4)
715                 basic_machine=m68k-sun
716                 os=-sunos4
717                 ;;
718         sun4os3)
719                 basic_machine=sparc-sun
720                 os=-sunos3
721                 ;;
722         sun4os4)
723                 basic_machine=sparc-sun
724                 os=-sunos4
725                 ;;
726         sun4sol2)
727                 basic_machine=sparc-sun
728                 os=-solaris2
729                 ;;
730         sun3 | sun3-*)
731                 basic_machine=m68k-sun
732                 ;;
733         sun4)
734                 basic_machine=sparc-sun
735                 ;;
736         sun386 | sun386i | roadrunner)
737                 basic_machine=i386-sun
738                 ;;
739         symmetry)
740                 basic_machine=i386-sequent
741                 os=-dynix
742                 ;;
743         tx39)
744                 basic_machine=mipstx39-unknown
745                 ;;
746         tx39el)
747                 basic_machine=mipstx39el-unknown
748                 ;;
749         tower | tower-32)
750                 basic_machine=m68k-ncr
751                 ;;
752         udi29k)
753                 basic_machine=a29k-amd
754                 os=-udi
755                 ;;
756         ultra3)
757                 basic_machine=a29k-nyu
758                 os=-sym1
759                 ;;
760         v810 | necv810)                                 # CYGNUS LOCAL
761                 basic_machine=v810-nec
762                 os=-none
763                 ;;
764         vaxv)
765                 basic_machine=vax-dec
766                 os=-sysv
767                 ;;
768         vms)
769                 basic_machine=vax-dec
770                 os=-vms
771                 ;;
772         vpp*|vx|vx-*)
773                basic_machine=f301-fujitsu
774                ;;
775         vxworks960)
776                 basic_machine=i960-wrs
777                 os=-vxworks
778                 ;;
779         vxworks68)
780                 basic_machine=m68k-wrs
781                 os=-vxworks
782                 ;;
783         vxworks29k)
784                 basic_machine=a29k-wrs
785                 os=-vxworks
786                 ;;
787         w65*)                                           # CYGNUS LOCAL
788                 basic_machine=w65-wdc
789                 os=-none
790                 ;;
791         xmp)
792                 basic_machine=xmp-cray
793                 os=-unicos
794                 ;;
795         xps | xps100)
796                 basic_machine=xps100-honeywell
797                 ;;
798         z8k-*-coff)                                     # CYGNUS LOCAL
799                 basic_machine=z8k-unknown
800                 os=-sim
801                 ;;
802         none)
803                 basic_machine=none-none
804                 os=-none
805                 ;;
806
807 # Here we handle the default manufacturer of certain CPU types.  It is in
808 # some cases the only manufacturer, in others, it is the most popular.
809         w89k)                                           # CYGNUS LOCAL
810                 basic_machine=hppa1.1-winbond
811                 ;;
812         op50n)                                          # CYGNUS LOCAL
813                 basic_machine=hppa1.1-oki
814                 ;;
815         op60c)                                          # CYGNUS LOCAL
816                 basic_machine=hppa1.1-oki
817                 ;;
818         mips)
819                 if [ x$os = x-linux-gnu ]; then
820                         basic_machine=mips-unknown
821                 else
822                         basic_machine=mips-mips
823                 fi
824                 ;;
825         romp)
826                 basic_machine=romp-ibm
827                 ;;
828         rs6000)
829                 basic_machine=rs6000-ibm
830                 ;;
831         vax)
832                 basic_machine=vax-dec
833                 ;;
834         pdp11)
835                 basic_machine=pdp11-dec
836                 ;;
837         we32k)
838                 basic_machine=we32k-att
839                 ;;
840         sparc)
841                 basic_machine=sparc-sun
842                 ;;
843         cydra)
844                 basic_machine=cydra-cydrome
845                 ;;
846         orion)
847                 basic_machine=orion-highlevel
848                 ;;
849         orion105)
850                 basic_machine=clipper-highlevel
851                 ;;
852         mac | mpw | mac-mpw)                            # CYGNUS LOCAL
853                 basic_machine=m68k-apple
854                 ;;
855         pmac | pmac-mpw)                                # CYGNUS LOCAL
856                 basic_machine=powerpc-apple
857                 ;;
858         *)
859                 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
860                 exit 1
861                 ;;
862 esac
863
864 # Here we canonicalize certain aliases for manufacturers.
865 case $basic_machine in
866         *-digital*)
867                 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
868                 ;;
869         *-commodore*)
870                 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
871                 ;;
872         *)
873                 ;;
874 esac
875
876 # Decode manufacturer-specific aliases for certain operating systems.
877
878 if [ x"$os" != x"" ]
879 then
880 case $os in
881         # First match some system type aliases
882         # that might get confused with valid system types.
883         # -solaris* is a basic system type, with this one exception.
884         -solaris1 | -solaris1.*)
885                 os=`echo $os | sed -e 's|solaris1|sunos4|'`
886                 ;;
887         -solaris)
888                 os=-solaris2
889                 ;;
890         -unixware* | svr4*)
891                 os=-sysv4
892                 ;;
893         -gnu/linux*)
894                 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
895                 ;;
896         # First accept the basic system types.
897         # The portable systems comes first.
898         # Each alternative MUST END IN A *, to match a version number.
899         # -sysv* is not here because it comes later, after sysvr4.
900         -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
901               | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
902               | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
903               | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
904               | -aos* \
905               | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
906               | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
907               | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
908               | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
909               | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
910               | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
911               | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
912               | -mingw32* | -linux-gnu* | -uxpv*)
913         # Remember, each alternative MUST END IN *, to match a version number.
914                 ;;
915         # CYGNUS LOCAL
916         -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
917               | -windows* | -osx | -abug |  -netware* | -os9* | -beos* \
918               | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
919                 ;;
920         -mac*)
921                 os=`echo $os | sed -e 's|mac|macos|'`
922                 ;;
923         # END CYGNUS LOCAL
924         -linux*)
925                 os=`echo $os | sed -e 's|linux|linux-gnu|'`
926                 ;;
927         -sunos5*)
928                 os=`echo $os | sed -e 's|sunos5|solaris2|'`
929                 ;;
930         -sunos6*)
931                 os=`echo $os | sed -e 's|sunos6|solaris3|'`
932                 ;;
933         -osfrose*)
934                 os=-osfrose
935                 ;;
936         -osf*)
937                 os=-osf
938                 ;;
939         -utek*)
940                 os=-bsd
941                 ;;
942         -dynix*)
943                 os=-bsd
944                 ;;
945         -acis*)
946                 os=-aos
947                 ;;
948         -386bsd)                                        # CYGNUS LOCAL
949                 os=-bsd
950                 ;;
951         -ctix* | -uts*)
952                 os=-sysv
953                 ;;
954         -ns2 )
955                 os=-nextstep2
956                 ;;
957         # Preserve the version number of sinix5.
958         -sinix5.*)
959                 os=`echo $os | sed -e 's|sinix|sysv|'`
960                 ;;
961         -sinix*)
962                 os=-sysv4
963                 ;;
964         -triton*)
965                 os=-sysv3
966                 ;;
967         -oss*)
968                 os=-sysv3
969                 ;;
970         -svr4)
971                 os=-sysv4
972                 ;;
973         -svr3)
974                 os=-sysv3
975                 ;;
976         -sysvr4)
977                 os=-sysv4
978                 ;;
979         # This must come after -sysvr4.
980         -sysv*)
981                 ;;
982         -ose*)                                          # CYGNUS LOCAL
983                 os=-ose
984                 ;;
985         -es1800*)                                       # CYGNUS LOCAL
986                 os=-ose
987                 ;;
988         -xenix)
989                 os=-xenix
990                 ;;
991         -none)
992                 ;;
993         *)
994                 # Get rid of the `-' at the beginning of $os.
995                 os=`echo $os | sed 's/[^-]*-//'`
996                 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
997                 exit 1
998                 ;;
999 esac
1000 else
1001
1002 # Here we handle the default operating systems that come with various machines.
1003 # The value should be what the vendor currently ships out the door with their
1004 # machine or put another way, the most popular os provided with the machine.
1005
1006 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1007 # "-sun"), then you have to tell the case statement up towards the top
1008 # that MANUFACTURER isn't an operating system.  Otherwise, code above
1009 # will signal an error saying that MANUFACTURER isn't an operating
1010 # system, and we'll never get to this point.
1011
1012 case $basic_machine in
1013         *-acorn)
1014                 os=-riscix1.2
1015                 ;;
1016         arm*-semi)
1017                 os=-aout
1018                 ;;
1019         pdp11-*)
1020                 os=-none
1021                 ;;
1022         *-dec | vax-*)
1023                 os=-ultrix4.2
1024                 ;;
1025         m68*-apollo)
1026                 os=-domain
1027                 ;;
1028         i386-sun)
1029                 os=-sunos4.0.2
1030                 ;;
1031         m68000-sun)
1032                 os=-sunos3
1033                 # This also exists in the configure program, but was not the
1034                 # default.
1035                 # os=-sunos4
1036                 ;;
1037         m68*-cisco)                                     # CYGNUS LOCAL
1038                 os=-aout
1039                 ;;
1040         mips*-cisco)                                    # CYGNUS LOCAL
1041                 os=-elf
1042                 ;;
1043         mips*-*)                                        # CYGNUS LOCAL
1044                 os=-elf
1045                 ;;
1046         *-tti)  # must be before sparc entry or we get the wrong os.
1047                 os=-sysv3
1048                 ;;
1049         sparc-* | *-sun)
1050                 os=-sunos4.1.1
1051                 ;;
1052         *-be)                                           # CYGNUS LOCAL
1053                 os=-beos
1054                 ;;
1055         *-ibm)
1056                 os=-aix
1057                 ;;
1058         *-wec)                                          # CYGNUS LOCAL
1059                 os=-proelf
1060                 ;;
1061         *-winbond)                                      # CYGNUS LOCAL
1062                 os=-proelf
1063                 ;;
1064         *-oki)                                          # CYGNUS LOCAL
1065                 os=-proelf
1066                 ;;
1067         *-hp)
1068                 os=-hpux
1069                 ;;
1070         *-hitachi)
1071                 os=-hiux
1072                 ;;
1073         i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1074                 os=-sysv
1075                 ;;
1076         *-cbm)
1077                 os=-amigaos
1078                 ;;
1079         *-dg)
1080                 os=-dgux
1081                 ;;
1082         *-dolphin)
1083                 os=-sysv3
1084                 ;;
1085         m68k-ccur)
1086                 os=-rtu
1087                 ;;
1088         m88k-omron*)
1089                 os=-luna
1090                 ;;
1091         *-next )
1092                 os=-nextstep
1093                 ;;
1094         *-sequent)
1095                 os=-ptx
1096                 ;;
1097         *-crds)
1098                 os=-unos
1099                 ;;
1100         *-ns)
1101                 os=-genix
1102                 ;;
1103         i370-*)
1104                 os=-mvs
1105                 ;;
1106         *-next)
1107                 os=-nextstep3
1108                 ;;
1109         *-gould)
1110                 os=-sysv
1111                 ;;
1112         *-highlevel)
1113                 os=-bsd
1114                 ;;
1115         *-encore)
1116                 os=-bsd
1117                 ;;
1118         *-sgi)
1119                 os=-irix
1120                 ;;
1121         *-siemens)
1122                 os=-sysv4
1123                 ;;
1124         *-masscomp)
1125                 os=-rtu
1126                 ;;
1127         f301-fujitsu)
1128                 os=-uxpv
1129                 ;;
1130         *-rom68k)                                       # CYGNUS LOCAL
1131                 os=-coff
1132                 ;;
1133         *-*bug)                                         # CYGNUS LOCAL
1134                 os=-coff
1135                 ;;
1136         *-apple)                                        # CYGNUS LOCAL
1137                 os=-macos
1138                 ;;
1139         *)
1140                 os=-none
1141                 ;;
1142 esac
1143 fi
1144
1145 # Here we handle the case where we know the os, and the CPU type, but not the
1146 # manufacturer.  We pick the logical manufacturer.
1147 vendor=unknown
1148 case $basic_machine in
1149         *-unknown)
1150                 case $os in
1151                         -riscix*)
1152                                 vendor=acorn
1153                                 ;;
1154                         -sunos*)
1155                                 vendor=sun
1156                                 ;;
1157                         -aix*)
1158                                 vendor=ibm
1159                                 ;;
1160                         -beos*)                                         # CYGNUS LOCAL
1161                                 vendor=be
1162                                 ;;
1163                         -hpux*)
1164                                 vendor=hp
1165                                 ;;
1166                         -hiux*)
1167                                 vendor=hitachi
1168                                 ;;
1169                         -unos*)
1170                                 vendor=crds
1171                                 ;;
1172                         -dgux*)
1173                                 vendor=dg
1174                                 ;;
1175                         -luna*)
1176                                 vendor=omron
1177                                 ;;
1178                         -genix*)
1179                                 vendor=ns
1180                                 ;;
1181                         -mvs*)
1182                                 vendor=ibm
1183                                 ;;
1184                         -ptx*)
1185                                 vendor=sequent
1186                                 ;;
1187                         -vxsim* | -vxworks*)
1188                                 vendor=wrs
1189                                 ;;
1190                         -aux*)
1191                                 vendor=apple
1192                                 ;;
1193                         -hms*)                          # CYGNUS LOCAL
1194                                 vendor=hitachi
1195                                 ;;
1196                         -mpw* | -macos*)                # CYGNUS LOCAL
1197                                 vendor=apple
1198                                 ;;
1199                 esac
1200                 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1201                 ;;
1202 esac
1203
1204 echo $basic_machine$os