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