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