OSDN Git Service

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