OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / lib / Libnet / config.sub
1 #! /bin/sh
2 # Configuration validation subroutine script, version 1.1.
3 #   Copyright (C) 1991, 92, 93, 94, 95, 1996 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         -hiux*)
102                 os=-hiuxwe2
103                 ;;
104         -sco5)
105                 os=sco3.2v5
106                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
107                 ;;
108         -sco4)
109                 os=-sco3.2v4
110                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
111                 ;;
112         -sco3.2.[4-9]*)
113                 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
114                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
115                 ;;
116         -sco3.2v[4-9]*)
117                 # Don't forget version if it is 3.2v4 or newer.
118                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
119                 ;;
120         -sco*)
121                 os=-sco3.2v2
122                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
123                 ;;
124         -isc)
125                 os=-isc2.2
126                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
127                 ;;
128         -clix*)
129                 basic_machine=clipper-intergraph
130                 ;;
131         -isc*)
132                 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
133                 ;;
134         -lynx*)
135                 os=-lynxos
136                 ;;
137         -ptx*)
138                 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
139                 ;;
140         -windowsnt*)
141                 os=`echo $os | sed -e 's/windowsnt/winnt/'`
142                 ;;
143         -psos*)
144                 os=-psos
145                 ;;
146 esac
147
148 # Decode aliases for certain CPU-COMPANY combinations.
149 case $basic_machine in
150         # Recognize the basic CPU types without company name.
151         # Some are omitted here because they have special meanings below.
152         tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \
153                 | arme[lb] | pyramid \
154                 | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
155                 | alpha | we32k | ns16k | clipper | i370 | sh \
156                 | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
157                 | pdp11 | mips64el | mips64orion | mips64orionel \
158                 | sparc | sparclet | sparclite | sparc64)
159                 basic_machine=$basic_machine-unknown
160                 ;;
161         nios2 | nios2-* | nios2 | nios2-*)
162                 basic_machine=nios2-altera
163                 os=-linux
164                 ;;
165         # We use `pc' rather than `unknown'
166         # because (1) that's what they normally are, and
167         # (2) the word "unknown" tends to confuse beginning users.
168         i[3456]86)
169           basic_machine=$basic_machine-pc
170           ;;
171         # Object if more than one company name word.
172         *-*-*)
173                 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
174                 exit 1
175                 ;;
176         # Recognize the basic CPU types with company name.
177         vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
178               | sparc-* | ns32k-* | fx80-* | arm* | c[123]* \
179               | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
180               | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
181               | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
182               | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
183               | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
184               | mips64el-* | mips64orion-* | mips64orionel-* | f301-*)
185                 ;;
186         # Recognize the various machine names and aliases which stand
187         # for a CPU type and a company and sometimes even an OS.
188         3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
189                 basic_machine=m68000-att
190                 ;;
191         3b*)
192                 basic_machine=we32k-att
193                 ;;
194         alliant | fx80)
195                 basic_machine=fx80-alliant
196                 ;;
197         altos | altos3068)
198                 basic_machine=m68k-altos
199                 ;;
200         am29k)
201                 basic_machine=a29k-none
202                 os=-bsd
203                 ;;
204         amdahl)
205                 basic_machine=580-amdahl
206                 os=-sysv
207                 ;;
208         amiga | amiga-*)
209                 basic_machine=m68k-cbm
210                 ;;
211         amigados)
212                 basic_machine=m68k-cbm
213                 os=-amigados
214                 ;;
215         amigaunix | amix)
216                 basic_machine=m68k-cbm
217                 os=-sysv4
218                 ;;
219         apollo68)
220                 basic_machine=m68k-apollo
221                 os=-sysv
222                 ;;
223         aux)
224                 basic_machine=m68k-apple
225                 os=-aux
226                 ;;
227         balance)
228                 basic_machine=ns32k-sequent
229                 os=-dynix
230                 ;;
231         convex-c1)
232                 basic_machine=c1-convex
233                 os=-bsd
234                 ;;
235         convex-c2)
236                 basic_machine=c2-convex
237                 os=-bsd
238                 ;;
239         convex-c32)
240                 basic_machine=c32-convex
241                 os=-bsd
242                 ;;
243         convex-c34)
244                 basic_machine=c34-convex
245                 os=-bsd
246                 ;;
247         convex-c38)
248                 basic_machine=c38-convex
249                 os=-bsd
250                 ;;
251         cray | ymp)
252                 basic_machine=ymp-cray
253                 os=-unicos
254                 ;;
255         cray2)
256                 basic_machine=cray2-cray
257                 os=-unicos
258                 ;;
259         [ctj]90-cray)
260                 basic_machine=c90-cray
261                 os=-unicos
262                 ;;
263         crds | unos)
264                 basic_machine=m68k-crds
265                 ;;
266         da30 | da30-*)
267                 basic_machine=m68k-da30
268                 ;;
269         decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
270                 basic_machine=mips-dec
271                 ;;
272         delta | 3300 | motorola-3300 | motorola-delta \
273               | 3300-motorola | delta-motorola)
274                 basic_machine=m68k-motorola
275                 ;;
276         delta88)
277                 basic_machine=m88k-motorola
278                 os=-sysv3
279                 ;;
280         dpx20 | dpx20-*)
281                 basic_machine=rs6000-bull
282                 os=-bosx
283                 ;;
284         dpx2* | dpx2*-bull)
285                 basic_machine=m68k-bull
286                 os=-sysv3
287                 ;;
288         ebmon29k)
289                 basic_machine=a29k-amd
290                 os=-ebmon
291                 ;;
292         elxsi)
293                 basic_machine=elxsi-elxsi
294                 os=-bsd
295                 ;;
296         encore | umax | mmax)
297                 basic_machine=ns32k-encore
298                 ;;
299         fx2800)
300                 basic_machine=i860-alliant
301                 ;;
302         genix)
303                 basic_machine=ns32k-ns
304                 ;;
305         gmicro)
306                 basic_machine=tron-gmicro
307                 os=-sysv
308                 ;;
309         h3050r* | hiux*)
310                 basic_machine=hppa1.1-hitachi
311                 os=-hiuxwe2
312                 ;;
313         h8300hms)
314                 basic_machine=h8300-hitachi
315                 os=-hms
316                 ;;
317         harris)
318                 basic_machine=m88k-harris
319                 os=-sysv3
320                 ;;
321         hp300-*)
322                 basic_machine=m68k-hp
323                 ;;
324         hp300bsd)
325                 basic_machine=m68k-hp
326                 os=-bsd
327                 ;;
328         hp300hpux)
329                 basic_machine=m68k-hp
330                 os=-hpux
331                 ;;
332         hp9k2[0-9][0-9] | hp9k31[0-9])
333                 basic_machine=m68000-hp
334                 ;;
335         hp9k3[2-9][0-9])
336                 basic_machine=m68k-hp
337                 ;;
338         hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
339                 basic_machine=hppa1.1-hp
340                 ;;
341         hp9k8[0-9][0-9] | hp8[0-9][0-9])
342                 basic_machine=hppa1.0-hp
343                 ;;
344         hppa-next)
345                 os=-nextstep3
346                 ;;
347         i370-ibm* | ibm*)
348                 basic_machine=i370-ibm
349                 os=-mvs
350                 ;;
351 # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
352         i[3456]86v32)
353                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
354                 os=-sysv32
355                 ;;
356         i[3456]86v4*)
357                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
358                 os=-sysv4
359                 ;;
360         i[3456]86v)
361                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
362                 os=-sysv
363                 ;;
364         i[3456]86sol2)
365                 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
366                 os=-solaris2
367                 ;;
368         iris | iris4d)
369                 basic_machine=mips-sgi
370                 case $os in
371                     -irix*)
372                         ;;
373                     *)
374                         os=-irix4
375                         ;;
376                 esac
377                 ;;
378         isi68 | isi)
379                 basic_machine=m68k-isi
380                 os=-sysv
381                 ;;
382         m88k-omron*)
383                 basic_machine=m88k-omron
384                 ;;
385         magnum | m3230)
386                 basic_machine=mips-mips
387                 os=-sysv
388                 ;;
389         merlin)
390                 basic_machine=ns32k-utek
391                 os=-sysv
392                 ;;
393         miniframe)
394                 basic_machine=m68000-convergent
395                 ;;
396         mips3*-*)
397                 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
398                 ;;
399         mips3*)
400                 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
401                 ;;
402         ncr3000)
403                 basic_machine=i486-ncr
404                 os=-sysv4
405                 ;;
406         news | news700 | news800 | news900)
407                 basic_machine=m68k-sony
408                 os=-newsos
409                 ;;
410         news1000)
411                 basic_machine=m68030-sony
412                 os=-newsos
413                 ;;
414         news-3600 | risc-news)
415                 basic_machine=mips-sony
416                 os=-newsos
417                 ;;
418         next | m*-next )
419                 basic_machine=m68k-next
420                 case $os in
421                     -nextstep* )
422                         ;;
423                     -ns2*)
424                       os=-nextstep2
425                         ;;
426                     *)
427                       os=-nextstep3
428                         ;;
429                 esac
430                 ;;
431         nh3000)
432                 basic_machine=m68k-harris
433                 os=-cxux
434                 ;;
435         nh[45]000)
436                 basic_machine=m88k-harris
437                 os=-cxux
438                 ;;
439         nindy960)
440                 basic_machine=i960-intel
441                 os=-nindy
442                 ;;
443         np1)
444                 basic_machine=np1-gould
445                 ;;
446         pa-hitachi)
447                 basic_machine=hppa1.1-hitachi
448                 os=-hiuxwe2
449                 ;;
450         paragon)
451                 basic_machine=i860-intel
452                 os=-osf
453                 ;;
454         pbd)
455                 basic_machine=sparc-tti
456                 ;;
457         pbb)
458                 basic_machine=m68k-tti
459                 ;;
460         pc532 | pc532-*)
461                 basic_machine=ns32k-pc532
462                 ;;
463         pentium | p5)
464                 basic_machine=i586-intel
465                 ;;
466         pentiumpro | p6)
467                 basic_machine=i686-intel
468                 ;;
469         pentium-* | p5-*)
470                 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
471                 ;;
472         pentiumpro-* | p6-*)
473                 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
474                 ;;
475         k5)
476                 # We don't have specific support for AMD's K5 yet, so just call it a Pentium
477                 basic_machine=i586-amd
478                 ;;
479         nexen)
480                 # We don't have specific support for Nexgen yet, so just call it a Pentium
481                 basic_machine=i586-nexgen
482                 ;;
483         pn)
484                 basic_machine=pn-gould
485                 ;;
486         power)  basic_machine=rs6000-ibm
487                 ;;
488         ppc)    basic_machine=powerpc-unknown
489                 ;;
490         ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
491                 ;;
492         ppcle | powerpclittle | ppc-le | powerpc-little)
493                 basic_machine=powerpcle-unknown
494                 ;;
495         ppcle-* | powerpclittle-*)
496                 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
497                 ;;
498         ps2)
499                 basic_machine=i386-ibm
500                 ;;
501         rm[46]00)
502                 basic_machine=mips-siemens
503                 ;;
504         rtpc | rtpc-*)
505                 basic_machine=romp-ibm
506                 ;;
507         sequent)
508                 basic_machine=i386-sequent
509                 ;;
510         sh)
511                 basic_machine=sh-hitachi
512                 os=-hms
513                 ;;
514         sps7)
515                 basic_machine=m68k-bull
516                 os=-sysv2
517                 ;;
518         spur)
519                 basic_machine=spur-unknown
520                 ;;
521         sun2)
522                 basic_machine=m68000-sun
523                 ;;
524         sun2os3)
525                 basic_machine=m68000-sun
526                 os=-sunos3
527                 ;;
528         sun2os4)
529                 basic_machine=m68000-sun
530                 os=-sunos4
531                 ;;
532         sun3os3)
533                 basic_machine=m68k-sun
534                 os=-sunos3
535                 ;;
536         sun3os4)
537                 basic_machine=m68k-sun
538                 os=-sunos4
539                 ;;
540         sun4os3)
541                 basic_machine=sparc-sun
542                 os=-sunos3
543                 ;;
544         sun4os4)
545                 basic_machine=sparc-sun
546                 os=-sunos4
547                 ;;
548         sun4sol2)
549                 basic_machine=sparc-sun
550                 os=-solaris2
551                 ;;
552         sun3 | sun3-*)
553                 basic_machine=m68k-sun
554                 ;;
555         sun4)
556                 basic_machine=sparc-sun
557                 ;;
558         sun386 | sun386i | roadrunner)
559                 basic_machine=i386-sun
560                 ;;
561         symmetry)
562                 basic_machine=i386-sequent
563                 os=-dynix
564                 ;;
565         tower | tower-32)
566                 basic_machine=m68k-ncr
567                 ;;
568         udi29k)
569                 basic_machine=a29k-amd
570                 os=-udi
571                 ;;
572         ultra3)
573                 basic_machine=a29k-nyu
574                 os=-sym1
575                 ;;
576         vaxv)
577                 basic_machine=vax-dec
578                 os=-sysv
579                 ;;
580         vms)
581                 basic_machine=vax-dec
582                 os=-vms
583                 ;;
584        vpp*|vx|vx-*)
585                basic_machine=f301-fujitsu
586                ;;
587         vxworks960)
588                 basic_machine=i960-wrs
589                 os=-vxworks
590                 ;;
591         vxworks68)
592                 basic_machine=m68k-wrs
593                 os=-vxworks
594                 ;;
595         vxworks29k)
596                 basic_machine=a29k-wrs
597                 os=-vxworks
598                 ;;
599         xmp)
600                 basic_machine=xmp-cray
601                 os=-unicos
602                 ;;
603         xps | xps100)
604                 basic_machine=xps100-honeywell
605                 ;;
606         none)
607                 basic_machine=none-none
608                 os=-none
609                 ;;
610
611 # Here we handle the default manufacturer of certain CPU types.  It is in
612 # some cases the only manufacturer, in others, it is the most popular.
613         mips)
614                 basic_machine=mips-mips
615                 ;;
616         romp)
617                 basic_machine=romp-ibm
618                 ;;
619         rs6000)
620                 basic_machine=rs6000-ibm
621                 ;;
622         vax)
623                 basic_machine=vax-dec
624                 ;;
625         pdp11)
626                 basic_machine=pdp11-dec
627                 ;;
628         we32k)
629                 basic_machine=we32k-att
630                 ;;
631         sparc)
632                 basic_machine=sparc-sun
633                 ;;
634         cydra)
635                 basic_machine=cydra-cydrome
636                 ;;
637         orion)
638                 basic_machine=orion-highlevel
639                 ;;
640         orion105)
641                 basic_machine=clipper-highlevel
642                 ;;
643         *)
644                 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
645                 exit 1
646                 ;;
647 esac
648
649 # Here we canonicalize certain aliases for manufacturers.
650 case $basic_machine in
651         *-digital*)
652                 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
653                 ;;
654         *-commodore*)
655                 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
656                 ;;
657         *)
658                 ;;
659 esac
660
661 # Decode manufacturer-specific aliases for certain operating systems.
662
663 if [ x"$os" != x"" ]
664 then
665 case $os in
666         # First match some system type aliases
667         # that might get confused with valid system types.
668         # -solaris* is a basic system type, with this one exception.
669         -solaris1 | -solaris1.*)
670                 os=`echo $os | sed -e 's|solaris1|sunos4|'`
671                 ;;
672         -solaris)
673                 os=-solaris2
674                 ;;
675         -unixware* | svr4*)
676                 os=-sysv4
677                 ;;
678         -gnu/linux*)
679                 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
680                 ;;
681         # First accept the basic system types.
682         # The portable systems comes first.
683         # Each alternative MUST END IN A *, to match a version number.
684         # -sysv* is not here because it comes later, after sysvr4.
685         -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
686               | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
687               | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
688               | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
689               | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
690               | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
691               | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
692               | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
693               | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
694               | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
695               | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
696               | -linux-gnu* | -uxpv*)
697         # Remember, each alternative MUST END IN *, to match a version number.
698                 ;;
699         -linux*)
700                 os=`echo $os | sed -e 's|linux|linux-gnu|'`
701                 ;;
702         -sunos5*)
703                 os=`echo $os | sed -e 's|sunos5|solaris2|'`
704                 ;;
705         -sunos6*)
706                 os=`echo $os | sed -e 's|sunos6|solaris3|'`
707                 ;;
708         -osfrose*)
709                 os=-osfrose
710                 ;;
711         -osf*)
712                 os=-osf
713                 ;;
714         -utek*)
715                 os=-bsd
716                 ;;
717         -dynix*)
718                 os=-bsd
719                 ;;
720         -acis*)
721                 os=-aos
722                 ;;
723         -ctix* | -uts*)
724                 os=-sysv
725                 ;;
726         -ns2 )
727                 os=-nextstep2
728                 ;;
729         # Preserve the version number of sinix5.
730         -sinix5.*)
731                 os=`echo $os | sed -e 's|sinix|sysv|'`
732                 ;;
733         -sinix*)
734                 os=-sysv4
735                 ;;
736         -triton*)
737                 os=-sysv3
738                 ;;
739         -oss*)
740                 os=-sysv3
741                 ;;
742         -svr4)
743                 os=-sysv4
744                 ;;
745         -svr3)
746                 os=-sysv3
747                 ;;
748         -sysvr4)
749                 os=-sysv4
750                 ;;
751         # This must come after -sysvr4.
752         -sysv*)
753                 ;;
754         -xenix)
755                 os=-xenix
756                 ;;
757         -none)
758                 ;;
759         *)
760                 # Get rid of the `-' at the beginning of $os.
761                 os=`echo $os | sed 's/[^-]*-//'`
762                 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
763                 exit 1
764                 ;;
765 esac
766 else
767
768 # Here we handle the default operating systems that come with various machines.
769 # The value should be what the vendor currently ships out the door with their
770 # machine or put another way, the most popular os provided with the machine.
771
772 # Note that if you're going to try to match "-MANUFACTURER" here (say,
773 # "-sun"), then you have to tell the case statement up towards the top
774 # that MANUFACTURER isn't an operating system.  Otherwise, code above
775 # will signal an error saying that MANUFACTURER isn't an operating
776 # system, and we'll never get to this point.
777
778 case $basic_machine in
779         *-acorn)
780                 os=-riscix1.2
781                 ;;
782         arm*-semi)
783                 os=-aout
784                 ;;
785         pdp11-*)
786                 os=-none
787                 ;;
788         *-dec | vax-*)
789                 os=-ultrix4.2
790                 ;;
791         m68*-apollo)
792                 os=-domain
793                 ;;
794         i386-sun)
795                 os=-sunos4.0.2
796                 ;;
797         m68000-sun)
798                 os=-sunos3
799                 # This also exists in the configure program, but was not the
800                 # default.
801                 # os=-sunos4
802                 ;;
803         *-tti)  # must be before sparc entry or we get the wrong os.
804                 os=-sysv3
805                 ;;
806         sparc-* | *-sun)
807                 os=-sunos4.1.1
808                 ;;
809         *-ibm)
810                 os=-aix
811                 ;;
812         *-hp)
813                 os=-hpux
814                 ;;
815         *-hitachi)
816                 os=-hiux
817                 ;;
818         i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
819                 os=-sysv
820                 ;;
821         *-cbm)
822                 os=-amigados
823                 ;;
824         *-dg)
825                 os=-dgux
826                 ;;
827         *-dolphin)
828                 os=-sysv3
829                 ;;
830         m68k-ccur)
831                 os=-rtu
832                 ;;
833         m88k-omron*)
834                 os=-luna
835                 ;;
836         *-next )
837                 os=-nextstep
838                 ;;
839         *-sequent)
840                 os=-ptx
841                 ;;
842         *-crds)
843                 os=-unos
844                 ;;
845         *-ns)
846                 os=-genix
847                 ;;
848         i370-*)
849                 os=-mvs
850                 ;;
851         *-next)
852                 os=-nextstep3
853                 ;;
854         *-gould)
855                 os=-sysv
856                 ;;
857         *-highlevel)
858                 os=-bsd
859                 ;;
860         *-encore)
861                 os=-bsd
862                 ;;
863         *-sgi)
864                 os=-irix
865                 ;;
866         *-siemens)
867                 os=-sysv4
868                 ;;
869         *-masscomp)
870                 os=-rtu
871                 ;;
872         f301-fujitsu)
873                 os=-uxpv
874                 ;;
875         *)
876                 os=-none
877                 ;;
878 esac
879 fi
880
881 # Here we handle the case where we know the os, and the CPU type, but not the
882 # manufacturer.  We pick the logical manufacturer.
883 vendor=unknown
884 case $basic_machine in
885         *-unknown)
886                 case $os in
887                         -riscix*)
888                                 vendor=acorn
889                                 ;;
890                         -sunos*)
891                                 vendor=sun
892                                 ;;
893                         -aix*)
894                                 vendor=ibm
895                                 ;;
896                         -hpux*)
897                                 vendor=hp
898                                 ;;
899                         -hiux*)
900                                 vendor=hitachi
901                                 ;;
902                         -unos*)
903                                 vendor=crds
904                                 ;;
905                         -dgux*)
906                                 vendor=dg
907                                 ;;
908                         -luna*)
909                                 vendor=omron
910                                 ;;
911                         -genix*)
912                                 vendor=ns
913                                 ;;
914                         -mvs*)
915                                 vendor=ibm
916                                 ;;
917                         -ptx*)
918                                 vendor=sequent
919                                 ;;
920                         -vxsim* | -vxworks*)
921                                 vendor=wrs
922                                 ;;
923                         -aux*)
924                                 vendor=apple
925                                 ;;
926                 esac
927                 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
928                 ;;
929 esac
930
931 echo $basic_machine$os