* config.sub: Use sysv3.2 not sysv32 for canonical OS
[external/binutils.git] / config.sub
1 #!/bin/sh
2 # Configuration validation subroutine script, version 1.1.
3 #   Copyright (C) 1991-1993 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., 675 Mass Ave, Cambridge, MA 02139, USA.
21
22
23 # Configuration subroutine to validate and canonicalize a configuration type.
24 # Supply the specified configuration type as an argument.
25 # If it is invalid, we print an error message on stderr and exit with code 1.
26 # Otherwise, we print the canonical config type on stdout and succeed.
27
28 # This file is supposed to be the same for all GNU packages
29 # and recognize all the CPU types, system types and aliases
30 # that are meaningful with *any* GNU software.
31 # Each package is responsible for reporting which valid configurations
32 # it does not support.  The user should be able to distinguish
33 # a failure to support a valid configuration from a meaningless
34 # configuration.
35
36 # The goal of this file is to map all the various variations of a given
37 # machine specification into a single specification in the form:
38 #       CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
39 # It is wrong to echo any other type of specification.
40
41 if [ x$1 = x ]
42 then
43         echo Configuration name missing. 1>&2
44         echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
45         echo "or     $0 ALIAS" 1>&2
46         echo where ALIAS is a recognized configuration type. 1>&2
47         exit 1
48 fi
49
50 # First pass through any local machine types.
51 case $1 in
52         *local*)
53                 echo $1
54                 exit 0
55                 ;;
56         *)
57         ;;
58 esac
59
60 # Separate what the user gave into CPU-COMPANY and OS (if any).
61 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
62 if [ $basic_machine != $1 ]
63 then os=`echo $1 | sed 's/.*-/-/'`
64 else os=; fi
65
66 ### Let's recognize common machines as not being operating systems so
67 ### that things like config.sub decstation-3100 work.  We also
68 ### recognize some manufacturers as not being operating systems, so we
69 ### can provide default operating systems below.
70 case $os in
71         -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
72         -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
73         -unicom* | -ibm* | -next* | -hp | -isi* | -apollo | -altos* | \
74         -convergent* | -ncr* | -news | -32* | -3600* | -3100* | \
75         -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
76         -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp)
77                 os=
78                 basic_machine=$1
79                 ;;
80         -scout)                                         # CYGNUS LOCAL
81                 ;;
82         -wrs)                                           # CYGNUS LOCAL
83                 os=vxworks
84                 basic_machine=$1
85                 ;;
86         -sco3.2v[4-9]*)
87                 # Don't forget version if it is 3.2v4 or newer.
88                 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
89                 ;;
90         -sco*)
91                 os=-sco3.2v2
92                 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
93                 ;;
94         -isc)
95                 os=-isc2.2
96                 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
97                 ;;
98         -isc*)
99                 basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
100                 ;;
101 esac
102
103 # Decode aliases for certain CPU-COMPANY combinations.
104 case $basic_machine in
105         # Recognize the basic CPU types with without company name.
106         # Some are omitted here because they have special meanings below.
107         tahoe | i[34]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \
108                 | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
109                 | alpha | we32k | ns16k | clipper | sparclite \
110                 | sparc | m680[01234]0 | m683?2 | z8k | v70 | h8500)# CYGNUS LOCAL
111                 basic_machine=$basic_machine-unknown
112                 ;;
113         # Recognize the basic CPU types with with company name.
114         vax-* | tahoe-* | i[34]86-* | i860-* | m68k-* | m68000-* | m88k-* \
115               | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
116               | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
117               | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
118               | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
119               | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
120               | m680[01234]0-* | m683?2-* | z8k-* | h8500-* | sh-*)     # CYGNUS LOCAL
121                 ;;
122         # Recognize the various machine names and aliases which stand
123         # for a CPU type and a company and sometimes even an OS.
124 # start-sanitize-v9
125         sparc64)                                        # CYGNUS LOCAL
126                 basic_machine=sparc64-sun
127                 os=-elf64i64p
128                 ;;
129         sparc64-*)                                      # CYGNUS LOCAL
130                 ;;
131 # end-sanitize-v9
132
133
134         dpx20 | dpx20-*)                                # CYGNUS LOCAL
135                 basic_machine=rs6000-bull
136                 os=-bosx
137                 ;;
138         vaxv)
139                 basic_machine=vax-dec
140                 os=-sysv
141                 ;;
142         vms)
143                 basic_machine=vax-dec
144                 os=-vms
145                 ;;
146         i386mach)                                       # CYGNUS LOCAL
147                 basic_machine=i386-mach
148                 os=-mach
149                 ;;
150         i[34]86v32)
151                 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
152                 os=-sysv3.2
153                 ;;
154         i[34]86v4*)
155                 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
156                 os=-sysv4
157                 ;;
158         i[34]86v)
159                 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
160                 os=-sysv
161                 ;;
162         i[34]86sol2)
163                 basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
164                 os=-solaris2
165                 ;;
166         go32 | i386-go32)                               # CYGNUS LOCAL
167                 basic_machine=i386-unknown
168                 os=-go32
169                 ;;
170         i386-linux* | linux)                            # CYGNUS LOCAL
171                 basic_machine=i386-unknown
172                 os=-linux
173                 ;;
174         386bsd)                                         # CYGNUS LOCAL
175                 basic_machine=i386-unknown
176                 os=-bsd
177                 ;;
178         spur)
179                 basic_machine=spur-unknown
180                 ;;
181         alliant | fx80)
182                 basic_machine=fx80-alliant
183                 ;;
184         convex-c1)
185                 basic_machine=c1-convex
186                 os=-bsd
187                 ;;
188         convex-c2)
189                 basic_machine=c2-convex
190                 os=-bsd
191                 ;;
192         convex-c32)
193                 basic_machine=c32-convex
194                 os=-bsd
195                 ;;
196         convex-c34)
197                 basic_machine=c34-convex
198                 os=-bsd
199                 ;;
200         convex-c38)
201                 basic_machine=c38-convex
202                 os=-bsd
203                 ;;
204         m88k-omron*)
205                 basic_machine=m88k-omron
206                 ;;
207         merlin)
208                 basic_machine=ns32k-utek
209                 os=-sysv
210                 ;;
211         crds | unos)
212                 basic_machine=m68k-crds
213                 ;;
214         elxsi)
215                 basic_machine=elxsi-elxsi
216                 os=-bsd
217                 ;;
218         encore | umax | mmax)
219                 basic_machine=ns32k-encore
220                 ;;
221         genix)
222                 basic_machine=ns32k-ns
223                 ;;
224         iris | iris4d | \
225         iris3 | iris4)                                  # CYGNUS LOCAL
226                 basic_machine=mips-sgi
227                 case $os in
228                     -irix*)
229                         ;;
230                     *)
231                         os=-irix4
232                         ;;
233                 esac
234                 ;;
235         news | news700 | news800 | news900)
236                 basic_machine=m68k-sony
237                 os=-newsos
238                 ;;
239         3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
240                 basic_machine=m68000-att
241                 ;;
242         3b*)
243                 basic_machine=we32k-att
244                 ;;
245         delta | 3300 | motorola-3300 | motorola-delta \
246               | 3300-motorola | delta-motorola)
247                 basic_machine=m68k-motorola
248                 ;;
249         balance)
250                 basic_machine=ns32k-sequent
251                 os=-dynix
252                 ;;
253         pc532)
254                 basic_machine=ns32k-pc532
255                 ;;
256         symmetry)
257                 basic_machine=i386-sequent
258                 os=-dynix
259                 ;;
260         sun2)
261                 basic_machine=m68000-sun
262                 ;;
263         sun2os3)
264                 basic_machine=m68000-sun
265                 os=-sunos3
266                 ;;
267         sun2os4)
268                 basic_machine=m68000-sun
269                 os=-sunos4
270                 ;;
271         sun3os3)
272                 basic_machine=m68k-sun
273                 os=-sunos3
274                 ;;
275         sun3os4)
276                 basic_machine=m68k-sun
277                 os=-sunos4
278                 ;;
279         sun4os3)
280                 basic_machine=sparc-sun
281                 os=-sunos3
282                 ;;
283         sun4os4)
284                 basic_machine=sparc-sun
285                 os=-sunos4
286                 ;;
287         sun4sol2)                                       # CYGNUS LOCAL
288                 basic_machine=sparc-sun
289                 os=-solaris2
290                 ;;
291         z8ksim)                                         # CYGNUS LOCAL
292                 basic_machine=z8k-zilog
293                 os=-sim
294                 ;;
295         z8k)                                            # CYGNUS LOCAL
296                 basic_machine=z8k-zilog
297                 ;;
298         sun3)
299                 basic_machine=m68k-sun
300                 ;;
301         sun4)
302                 basic_machine=sparc-sun
303                 ;;
304         msdos)                                          # CYGNUS LOCAL
305                 basic_machine=i386-unknown      
306                 os=-msdos
307                 ;;
308         pbd)
309                 basic_machine=sparc-tti
310                 ;;
311         pbb)
312                 basic_machine=m68k-tti
313                 ;;
314         sun386 | sun386i | roadrunner)
315                 basic_machine=i386-sun
316                 ;;
317         ps2)
318                 basic_machine=i386-ibm
319                 ;;
320         fx2800)
321                 basic_machine=i860-alliant
322                 ;;
323         next)
324                 basic_machine=m68k-next
325                 os=-bsd
326                 ;;
327         amiga)
328                 basic_machine=m68k-cbm
329                 ;;
330         amigados)
331                 basic_machine=m68k-cbm
332                 os=-amigados
333                 ;;
334         amigaunix | amix)
335                 basic_machine=m68k-cbm
336                 os=-sysv4
337                 ;;
338         hp9k3[2-9][0-9])
339                 basic_machine=m68k-hp
340                 ;;
341         hp9k31[0-9] | hp9k2[0-9][0-9])
342                 basic_machine=m68000-hp
343                 ;;
344         hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
345                 basic_machine=hppa1.1-hp
346                 ;;
347         hp9k8[0-9][0-9] | hp8[0-9][0-9])
348                 basic_machine=hppa1.0-hp
349                 ;;
350         isi68 | isi)
351                 basic_machine=m68k-isi
352                 os=-sysv
353                 ;;
354         apollo68)
355                 basic_machine=m68k-apollo
356                 os=-sysv
357                 ;;
358         apollo68bsd)                                    # CYGNUS LOCAL
359                 basic_machine=m68k-apollo
360                 os=-bsd
361                 ;;
362         altos | altos3068)
363                 basic_machine=m68k-altos
364                 ;;
365         miniframe)
366                 basic_machine=m68000-convergent
367                 ;;
368         tower | tower-32)
369                 basic_machine=m68k-ncr
370                 ;;
371         news-3600 | risc-news)
372                 basic_machine=mips-sony
373                 os=-newsos
374                 ;;
375         st2000)                                         # CYGNUS LOCAL
376                 basic_machine=m68k-tandem
377                 ;;
378         decstation | decstation-3100 | pmax | pmin | dec3100 | decstatn)
379                 basic_machine=mips-dec
380                 ;;
381         magnum | m3230)
382                 basic_machine=mips-mips
383                 os=-sysv
384                 ;;
385         gmicro)
386                 basic_machine=tron-gmicro
387                 os=-sysv
388                 ;;
389         rtpc | rtpc-*)
390                 basic_machine=romp-ibm
391                 ;;
392         am29k)
393                 basic_machine=a29k-none
394                 os=-bsd
395                 ;;
396         amdahl)
397                 basic_machine=580-amdahl
398                 os=-sysv
399                 ;;
400         stratus)                                        # CYGNUS LOCAL
401                 basic_machine=i860-stratus
402                 os=-sysv4
403                 ;;
404         cray | ymp)
405                 basic_machine=ymp-cray
406                 os=-unicos
407                 ;;
408         cray2)
409                 basic_machine=cray2-cray
410                 os=-unicos
411                 ;;
412         xmp)
413                 basic_machine=xmp-cray
414                 os=-unicos
415                 ;;
416         delta88)
417                 basic_machine=m88k-motorola
418                 os=-sysv3
419                 ;;
420         dpx2)
421                 basic_machine=m68k-bull
422                 os=-sysv
423                 ;;
424         ebmon29k)
425                 basic_machine=a29k-amd
426                 os=-ebmon
427                 ;;
428         h8300hms)                                       # CYGNUS LOCAL
429                 basic_machine=h8300-hitachi
430                 os=-hms
431                 ;;
432
433         sh)                                             # CYGNUS LOCAL
434                 basic_machine=sh-hitachi
435                 os=-hms
436                 ;;
437
438         h8500hms)                                       # CYGNUS LOCAL
439                 basic_machine=h8500-hitachi
440                 os=-hms
441                 ;;
442         h8300xray)                                      # CYGNUS LOCAL
443                 basic_machine=h8300-hitachi
444                 os=-xray
445                 ;;
446         h8300hds)
447                 basic_machine=h8300-hitachi
448                 os=-hds
449                 ;;
450         udi29k)                                         # CYGNUS LOCAL
451                 basic_machine=a29k-amd
452                 os=-udi
453                 ;;
454         a29khif)                                        # CYGNUS LOCAL
455                 basic_machine=a29k-amd
456                 os=-udi
457                 ;;
458         sa29200)                                        # CYGNUS LOCAL
459                 basic_machine=a29k-amd
460                 os=-udi
461                 ;;
462         harris)
463                 basic_machine=m88k-harris
464                 os=-sysv3
465                 ;;
466         hp300bsd)
467                 basic_machine=m68k-hp
468                 os=-bsd
469                 ;;
470         hp300hpux)
471                 basic_machine=m68k-hp
472                 os=-hpux
473                 ;;
474         hp9k2[0-9][0-9] | hp9k31[0-9])
475                 basic_machine=m68000-hp
476                 os=-hpux
477                 ;;
478         hp9k3[2-9][0-9])
479                 basic_machine=m68k-hp
480                 os=-hpux
481                 ;;
482         hppaosf)
483                 basic_machine=hppa1.1-hp
484                 os=-osf
485                 ;;
486         ncr3000)
487                 basic_machine=i486-ncr
488                 os=-sysv4
489                 ;;
490         necv70)                                         # CYGNUS LOCAL
491                 basic_machine=v70-nec
492                 os=-sysv
493                 ;;
494         news1000)
495                 basic_machine=m68030-sony
496                 os=-newsos
497                 ;;
498         nindy960)
499                 basic_machine=i960-intel
500                 os=-nindy
501                 ;;
502         pn)
503                 basic_machine=pn-gould
504                 ;;
505         np1)
506                 basic_machine=np1-gould
507                 ;;
508         ultra3)
509                 basic_machine=a29k-nyu
510                 os=-sym1
511                 ;;
512         vxworks960)
513                 basic_machine=i960-wrs
514                 os=-vxworks
515                 ;;
516         vxworks68)
517                 basic_machine=m68k-wrs
518                 os=-vxworks
519                 ;;
520         es1800 | OSE68k | ose68k | ose | OSE)           # CYGNUS LOCAL
521                 basic_machine=m68k-ericsson
522                 os=-ose
523                 ;;
524         OSE68000 | ose68000)                            # CYGNUS LOCAL
525                 basic_machine=m68000-ericsson
526                 os=-ose
527                 ;;
528         os68k)                                          # CYGNUS LOCAL
529                 basic_machine=m68k-none
530                 os=-os68k
531                 ;;
532         sparclite-wrs)                                  # CYGNUS LOCAL
533                 basic_machine=sparclite-wrs
534                 os=-vxworks
535                 ;;
536         sparcfrw)                                       # CYGNUS LOCAL
537                 basic_machine=sparcfrw-sun
538                 os=-sunos4
539                 ;;
540         sparcfrwcompat)                                 # CYGNUS LOCAL
541                 basic_machine=sparcfrwcompat-sun
542                 os=-sunos4
543                 ;;
544         sparclitefrw)                                   # CYGNUS LOCAL
545                 basic_machine=sparclitefrw-fujitsu
546                 os=-none
547                 ;;
548         sparclitefrwcompat)                             # CYGNUS LOCAL
549                 basic_machine=sparclitefrwcompat-fujitsu
550                 os=-none
551                 ;;
552         adobe68k)                                       # CYGNUS LOCAL
553                 basic_machine=m68010-adobe
554                 os=-scout
555                 ;;
556
557         xps | xps100)
558                 basic_machine=xps100-honeywell
559                 ;;
560         none)
561                 basic_machine=none-none
562                 os=-none
563                 ;;
564
565 # Here we handle the default manufacturer of certain CPU types.  It is in
566 # some cases the only manufacturer, in others, it is the most popular.
567         mips)
568                 basic_machine=mips-mips
569                 ;;
570         romp)
571                 basic_machine=romp-ibm
572                 ;;
573         rs6000)
574                 basic_machine=rs6000-ibm
575                 ;;
576         vax)
577                 basic_machine=vax-dec
578                 ;;
579         we32k)
580                 basic_machine=we32k-att
581                 ;;
582         sparc)
583                 basic_machine=sparc-sun
584                 ;;
585         cydra)
586                 basic_machine=cydra-cydrome
587                 ;;
588         orion)
589                 basic_machine=orion-highlevel
590                 ;;
591         orion105)
592                 basic_machine=clipper-highlevel
593                 ;;
594         *)
595                 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
596                 exit 1
597                 ;;
598 esac
599
600 # Here we canonicalize certain aliases for manufacturers.
601 case $basic_machine in
602         *-digital*)
603                 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
604                 ;;
605         *-commodore*)
606                 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
607                 ;;
608         *)
609                 ;;
610 esac
611
612 # Decode manufacturer-specific aliases for certain operating systems.
613
614 if [ "$os" ]
615 then
616 case $os in
617         # -solaris* is a basic system type, with this one exception.
618         -solaris1 | -solaris1.*)
619                 os=`echo $os | sed -e 's|solaris1|sunos4|'`
620                 ;;
621         # First accept the basic system types.
622         # The portable systems comes first.
623         # Each alternative must end in a *, to match a version number.
624         -bsd* | -sysv* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
625               | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]* | -hpux* \
626               | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
627               | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
628               | -nindy* | -vxworks* | -ebmon* | -hds*  \
629               | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
630               | -go32 | -sim | -es1800* | -udi | -hms* | -xray \
631               | -os68k* | -none* | -v88r* | -aout | -coff | -elf | -bosx* \
632               | -abug | -ecoff)
633                                 # The last three lines above are CYGNUS LOCAL
634         ;;
635 # start-sanitize-v9
636         -v7 | -old* | -aout* | -elf*) ;;                # CYGNUS LOCAL
637 # end-sanitize-v9
638         -sunos5*)
639                 os=`echo $os | sed -e 's|sunos5|solaris2|'`
640                 ;;
641         -sunos6*)
642                 os=`echo $os | sed -e 's|sunos6|solaris3|'`
643                 ;;
644         -osfrose*)
645                 os=-osfrose
646                 ;;
647         -osf*)
648                 os=-osf
649                 ;;
650         -utek*)
651                 os=-bsd
652                 ;;
653         -dynix*)
654                 os=-bsd
655                 ;;
656         -acis*)
657                 os=-aos
658                 ;;
659         -386bsd)                                        # CYGNUS LOCAL
660                 os=-bsd
661                 ;;
662         -ctix* | -uts*)
663                 os=-sysv
664                 ;;
665         -triton*)
666                 os=-sysv3
667                 ;;
668         -oss*)
669                 os=-sysv3
670                 ;;
671         -svr4)
672                 os=-sysv4
673                 ;;
674         -svr3)
675                 os=-sysv3
676                 ;;
677         -ose*)                                          # CYGNUS LOCAL
678                 os=-ose
679                 ;;
680         -es1800*)                                       # CYGNUS LOCAL
681                 os=-ose
682                 ;;
683         -xenix)
684                 os=-xenix
685                 ;;
686         -none)
687                 ;;
688         *)
689                 # Get rid of the `-' at the beginning of $os.
690                 os=`echo $1 | sed 's/[^-]*-//'`
691                 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
692                 exit 1
693                 ;;
694 esac
695 else
696
697 # Here we handle the default operating systems that come with various machines.
698 # The value should be what the vendor currently ships out the door with their
699 # machine or put another way, the most popular os provided with the machine.
700
701 # Note that if you're going to try to match "-MANUFACTURER" here (say,
702 # "-sun"), then you have to tell the case statement up towards the top
703 # that MANUFACTURER isn't an operating system.  Otherwise, code above
704 # will signal an error saying that MANUFACTURER isn't an operating
705 # system, and we'll never get to this point.
706
707 case $basic_machine in
708         *-dec | vax-*)
709                 os=-ultrix4.2
710                 ;;
711         i386-sun)
712                 os=-sunos4.0.2
713                 ;;
714         m68000-sun)
715                 os=-sunos3
716                 # This also exists in the configure program, but was not the
717                 # default.
718                 # os=-sunos4
719                 ;;
720         *-tti)  # must be before sparc entry or we get the wrong os.
721                 os=-sysv3
722                 ;;
723         sparc-* | *-sun)
724                 os=-sunos4.1.1
725                 ;;
726         *-ibm)
727                 os=-aix
728                 ;;
729         *-hp)
730                 os=-hpux
731                 ;;
732         i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
733                 os=-sysv
734                 ;;
735         *-cbm)
736                 os=-amigados
737                 ;;
738         *-dg)
739                 os=-dgux
740                 ;;
741         *-dolphin)
742                 os=-sysv3
743                 ;;
744         m88k-omron*)
745                 os=-luna
746                 ;;
747         *-sequent)
748                 os=-bsd
749                 ;;
750         *-crds)
751                 os=-unos
752                 ;;
753         *-ns)
754                 os=-genix
755                 ;;
756         i[34]86-*)
757                 os=-sco3.2v2
758                 ;;
759         *-gould)
760                 os=-sysv
761                 ;;
762         *-highlevel)
763                 os=-bsd
764                 ;;
765         *-encore)
766                 os=-bsd
767                 ;;
768         *-sgi)
769                 os=-irix
770                 ;;
771         *-masscomp)
772                 os=-rtu
773                 ;;
774         *)
775                 os=-none
776                 ;;
777 esac
778 fi
779
780 # Here we handle the case where we know the os, and the CPU type, but not the
781 # manufacturer.  We pick the logical manufacturer.
782 vendor=unknown
783 case $basic_machine in
784         *-unknown)
785                 case $os in
786                         -sunos*)
787                                 vendor=sun
788                                 ;;
789                         -bosx*)                 # CYGNUS LOCAL
790                                 vendor=bull
791                                 ;;
792                         -aix*)
793                                 vendor=ibm
794                                 ;;
795                         -hpux*)
796                                 vendor=hp
797                                 ;;
798                         -unos*)
799                                 vendor=crds
800                                 ;;
801                         -dgux*)
802                                 vendor=dg
803                                 ;;
804                         -luna*)
805                                 vendor=omron
806                                 ;;
807                         -genix*)
808                                 vendor=ns
809                                 ;;
810                         -vxworks*)                      # CYGNUS LOCAL
811                                 vendor=wrs
812                                 ;;
813                         -hms*)                          # CYGNUS LOCAL
814                                 vendor=hitachi
815                                 ;;
816                 esac
817                 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
818                 ;;
819 esac
820
821 echo $basic_machine$os