OSDN Git Service

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