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