OSDN Git Service

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