]>
Commit | Line | Data |
---|---|---|
28f540f4 RM |
1 | #! /bin/sh |
2 | # Configuration validation subroutine script, version 1.1. | |
d008bcf3 | 3 | # Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. |
28f540f4 RM |
4 | # This file is (in principle) common to ALL GNU software. |
5 | # The presence of a machine in this file suggests that SOME GNU software | |
6 | # can handle that machine. It does not imply ALL GNU software can. | |
7 | # | |
8 | # This file is free software; you can redistribute it and/or modify | |
9 | # it under the terms of the GNU General Public License as published by | |
10 | # the Free Software Foundation; either version 2 of the License, or | |
11 | # (at your option) any later version. | |
12 | # | |
13 | # This program is distributed in the hope that it will be useful, | |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | # GNU General Public License for more details. | |
17 | # | |
18 | # You should have received a copy of the GNU General Public License | |
19 | # along with this program; if not, write to the Free Software | |
dae3ee46 RK |
20 | # Foundation, Inc., 59 Temple Place - Suite 330, |
21 | # Boston, MA 02111-1307, USA. | |
28f540f4 RM |
22 | |
23 | # As a special exception to the GNU General Public License, if you | |
24 | # distribute this file as part of a program that contains a | |
25 | # configuration script generated by Autoconf, you may include it under | |
26 | # the same distribution terms that you use for the rest of that program. | |
27 | ||
28 | # Configuration subroutine to validate and canonicalize a configuration type. | |
29 | # Supply the specified configuration type as an argument. | |
30 | # If it is invalid, we print an error message on stderr and exit with code 1. | |
31 | # Otherwise, we print the canonical config type on stdout and succeed. | |
32 | ||
33 | # This file is supposed to be the same for all GNU packages | |
34 | # and recognize all the CPU types, system types and aliases | |
35 | # that are meaningful with *any* GNU software. | |
36 | # Each package is responsible for reporting which valid configurations | |
37 | # it does not support. The user should be able to distinguish | |
38 | # a failure to support a valid configuration from a meaningless | |
39 | # configuration. | |
40 | ||
41 | # The goal of this file is to map all the various variations of a given | |
42 | # machine specification into a single specification in the form: | |
43 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM | |
44 | # It is wrong to echo any other type of specification. | |
45 | ||
46 | if [ x$1 = x ] | |
47 | then | |
48 | echo Configuration name missing. 1>&2 | |
49 | echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 | |
50 | echo "or $0 ALIAS" 1>&2 | |
51 | echo where ALIAS is a recognized configuration type. 1>&2 | |
52 | exit 1 | |
53 | fi | |
54 | ||
55 | # First pass through any local machine types. | |
56 | case $1 in | |
57 | *local*) | |
58 | echo $1 | |
59 | exit 0 | |
60 | ;; | |
61 | *) | |
62 | ;; | |
63 | esac | |
64 | ||
65 | # Separate what the user gave into CPU-COMPANY and OS (if any). | |
66 | basic_machine=`echo $1 | sed 's/-[^-]*$//'` | |
67 | if [ $basic_machine != $1 ] | |
68 | then os=`echo $1 | sed 's/.*-/-/'` | |
69 | else os=; fi | |
70 | ||
71 | ### Let's recognize common machines as not being operating systems so | |
72 | ### that things like config.sub decstation-3100 work. We also | |
73 | ### recognize some manufacturers as not being operating systems, so we | |
74 | ### can provide default operating systems below. | |
75 | case $os in | |
76 | -sun*os*) | |
77 | # Prevent following clause from handling this invalid input. | |
78 | ;; | |
79 | -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ | |
80 | -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ | |
81 | -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ | |
82 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ | |
83 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | |
84 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp ) | |
85 | os= | |
86 | basic_machine=$1 | |
87 | ;; | |
88 | -hiux*) | |
89 | os=-hiuxwe2 | |
90 | ;; | |
d008bcf3 RK |
91 | -sco5) |
92 | os=sco3.2v5 | |
93 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` | |
94 | ;; | |
28f540f4 RM |
95 | -sco4) |
96 | os=-sco3.2v4 | |
97 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` | |
98 | ;; | |
99 | -sco3.2.[4-9]*) | |
100 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
101 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` | |
102 | ;; | |
103 | -sco3.2v[4-9]*) | |
104 | # Don't forget version if it is 3.2v4 or newer. | |
105 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` | |
106 | ;; | |
107 | -sco*) | |
108 | os=-sco3.2v2 | |
109 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` | |
110 | ;; | |
111 | -isc) | |
112 | os=-isc2.2 | |
113 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` | |
114 | ;; | |
115 | -clix*) | |
116 | basic_machine=clipper-intergraph | |
117 | ;; | |
118 | -isc*) | |
119 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` | |
120 | ;; | |
a06b1633 | 121 | -lynx*) |
28f540f4 RM |
122 | os=-lynxos |
123 | ;; | |
124 | -ptx*) | |
125 | basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` | |
126 | ;; | |
127 | -windowsnt*) | |
128 | os=`echo $os | sed -e 's/windowsnt/winnt/'` | |
129 | ;; | |
130 | esac | |
131 | ||
132 | # Decode aliases for certain CPU-COMPANY combinations. | |
133 | case $basic_machine in | |
134 | # Recognize the basic CPU types without company name. | |
135 | # Some are omitted here because they have special meanings below. | |
2cb7465b | 136 | tahoe | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm \ |
af92ce7e | 137 | | arme[lb] | pyramid \ |
28f540f4 RM |
138 | | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ |
139 | | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ | |
8b7e7ff3 | 140 | | powerpc | powerpcle | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ |
28f540f4 RM |
141 | | pdp11 | mips64el | mips64orion | mips64orionel \ |
142 | | sparc) | |
143 | basic_machine=$basic_machine-unknown | |
144 | ;; | |
145 | # Object if more than one company name word. | |
146 | *-*-*) | |
147 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
148 | exit 1 | |
149 | ;; | |
150 | # Recognize the basic CPU types with company name. | |
2cb7465b | 151 | vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \ |
28f540f4 | 152 | | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ |
8b7e7ff3 | 153 | | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ |
28f540f4 RM |
154 | | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ |
155 | | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ | |
156 | | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ | |
8b7e7ff3 | 157 | | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ |
28f540f4 RM |
158 | | mips64el-* | mips64orion-* | mips64orionel-*) |
159 | ;; | |
160 | # Recognize the various machine names and aliases which stand | |
161 | # for a CPU type and a company and sometimes even an OS. | |
162 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) | |
163 | basic_machine=m68000-att | |
164 | ;; | |
165 | 3b*) | |
166 | basic_machine=we32k-att | |
167 | ;; | |
168 | alliant | fx80) | |
169 | basic_machine=fx80-alliant | |
170 | ;; | |
171 | altos | altos3068) | |
172 | basic_machine=m68k-altos | |
173 | ;; | |
174 | am29k) | |
175 | basic_machine=a29k-none | |
176 | os=-bsd | |
177 | ;; | |
178 | amdahl) | |
179 | basic_machine=580-amdahl | |
180 | os=-sysv | |
181 | ;; | |
182 | amiga | amiga-*) | |
183 | basic_machine=m68k-cbm | |
184 | ;; | |
185 | amigados) | |
186 | basic_machine=m68k-cbm | |
187 | os=-amigados | |
188 | ;; | |
189 | amigaunix | amix) | |
190 | basic_machine=m68k-cbm | |
191 | os=-sysv4 | |
192 | ;; | |
193 | apollo68) | |
194 | basic_machine=m68k-apollo | |
195 | os=-sysv | |
196 | ;; | |
197 | balance) | |
198 | basic_machine=ns32k-sequent | |
199 | os=-dynix | |
200 | ;; | |
201 | convex-c1) | |
202 | basic_machine=c1-convex | |
203 | os=-bsd | |
204 | ;; | |
205 | convex-c2) | |
206 | basic_machine=c2-convex | |
207 | os=-bsd | |
208 | ;; | |
209 | convex-c32) | |
210 | basic_machine=c32-convex | |
211 | os=-bsd | |
212 | ;; | |
213 | convex-c34) | |
214 | basic_machine=c34-convex | |
215 | os=-bsd | |
216 | ;; | |
217 | convex-c38) | |
218 | basic_machine=c38-convex | |
219 | os=-bsd | |
220 | ;; | |
221 | cray | ymp) | |
222 | basic_machine=ymp-cray | |
223 | os=-unicos | |
224 | ;; | |
225 | cray2) | |
226 | basic_machine=cray2-cray | |
227 | os=-unicos | |
228 | ;; | |
229 | crds | unos) | |
230 | basic_machine=m68k-crds | |
231 | ;; | |
232 | da30 | da30-*) | |
233 | basic_machine=m68k-da30 | |
234 | ;; | |
235 | decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) | |
236 | basic_machine=mips-dec | |
237 | ;; | |
238 | delta | 3300 | motorola-3300 | motorola-delta \ | |
239 | | 3300-motorola | delta-motorola) | |
240 | basic_machine=m68k-motorola | |
241 | ;; | |
242 | delta88) | |
243 | basic_machine=m88k-motorola | |
244 | os=-sysv3 | |
245 | ;; | |
246 | dpx20 | dpx20-*) | |
247 | basic_machine=rs6000-bull | |
248 | os=-bosx | |
249 | ;; | |
250 | dpx2* | dpx2*-bull) | |
251 | basic_machine=m68k-bull | |
252 | os=-sysv3 | |
253 | ;; | |
254 | ebmon29k) | |
255 | basic_machine=a29k-amd | |
256 | os=-ebmon | |
257 | ;; | |
258 | elxsi) | |
259 | basic_machine=elxsi-elxsi | |
260 | os=-bsd | |
261 | ;; | |
262 | encore | umax | mmax) | |
263 | basic_machine=ns32k-encore | |
264 | ;; | |
265 | fx2800) | |
266 | basic_machine=i860-alliant | |
267 | ;; | |
268 | genix) | |
269 | basic_machine=ns32k-ns | |
270 | ;; | |
271 | gmicro) | |
272 | basic_machine=tron-gmicro | |
273 | os=-sysv | |
274 | ;; | |
275 | h3050r* | hiux*) | |
276 | basic_machine=hppa1.1-hitachi | |
277 | os=-hiuxwe2 | |
278 | ;; | |
279 | h8300hms) | |
280 | basic_machine=h8300-hitachi | |
281 | os=-hms | |
282 | ;; | |
283 | harris) | |
284 | basic_machine=m88k-harris | |
285 | os=-sysv3 | |
286 | ;; | |
287 | hp300-*) | |
288 | basic_machine=m68k-hp | |
289 | ;; | |
290 | hp300bsd) | |
291 | basic_machine=m68k-hp | |
292 | os=-bsd | |
293 | ;; | |
294 | hp300hpux) | |
295 | basic_machine=m68k-hp | |
296 | os=-hpux | |
297 | ;; | |
298 | hp9k2[0-9][0-9] | hp9k31[0-9]) | |
299 | basic_machine=m68000-hp | |
300 | ;; | |
301 | hp9k3[2-9][0-9]) | |
302 | basic_machine=m68k-hp | |
303 | ;; | |
304 | hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) | |
305 | basic_machine=hppa1.1-hp | |
306 | ;; | |
307 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) | |
308 | basic_machine=hppa1.0-hp | |
309 | ;; | |
310 | i370-ibm* | ibm*) | |
311 | basic_machine=i370-ibm | |
312 | os=-mvs | |
313 | ;; | |
314 | # I'm not sure what "Sysv32" means. Should this be sysv3.2? | |
2cb7465b | 315 | i[3456]86v32) |
28f540f4 RM |
316 | basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` |
317 | os=-sysv32 | |
318 | ;; | |
2cb7465b | 319 | i[3456]86v4*) |
28f540f4 RM |
320 | basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` |
321 | os=-sysv4 | |
322 | ;; | |
2cb7465b | 323 | i[3456]86v) |
28f540f4 RM |
324 | basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` |
325 | os=-sysv | |
326 | ;; | |
2cb7465b | 327 | i[3456]86sol2) |
28f540f4 RM |
328 | basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` |
329 | os=-solaris2 | |
330 | ;; | |
331 | iris | iris4d) | |
332 | basic_machine=mips-sgi | |
333 | case $os in | |
334 | -irix*) | |
335 | ;; | |
336 | *) | |
337 | os=-irix4 | |
338 | ;; | |
339 | esac | |
340 | ;; | |
341 | isi68 | isi) | |
342 | basic_machine=m68k-isi | |
343 | os=-sysv | |
344 | ;; | |
345 | m88k-omron*) | |
346 | basic_machine=m88k-omron | |
347 | ;; | |
348 | magnum | m3230) | |
349 | basic_machine=mips-mips | |
350 | os=-sysv | |
351 | ;; | |
352 | merlin) | |
353 | basic_machine=ns32k-utek | |
354 | os=-sysv | |
355 | ;; | |
356 | miniframe) | |
357 | basic_machine=m68000-convergent | |
358 | ;; | |
359 | mips3*-*) | |
360 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` | |
361 | ;; | |
362 | mips3*) | |
363 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown | |
364 | ;; | |
365 | ncr3000) | |
366 | basic_machine=i486-ncr | |
367 | os=-sysv4 | |
368 | ;; | |
369 | news | news700 | news800 | news900) | |
370 | basic_machine=m68k-sony | |
371 | os=-newsos | |
372 | ;; | |
373 | news1000) | |
374 | basic_machine=m68030-sony | |
375 | os=-newsos | |
376 | ;; | |
377 | news-3600 | risc-news) | |
378 | basic_machine=mips-sony | |
379 | os=-newsos | |
380 | ;; | |
381 | next | m*-next ) | |
382 | basic_machine=m68k-next | |
383 | case $os in | |
384 | -nextstep* ) | |
385 | ;; | |
386 | -ns2*) | |
387 | os=-nextstep2 | |
388 | ;; | |
389 | *) | |
390 | os=-nextstep3 | |
391 | ;; | |
392 | esac | |
393 | ;; | |
394 | nh3000) | |
395 | basic_machine=m68k-harris | |
396 | os=-cxux | |
397 | ;; | |
398 | nh[45]000) | |
399 | basic_machine=m88k-harris | |
400 | os=-cxux | |
401 | ;; | |
402 | nindy960) | |
403 | basic_machine=i960-intel | |
404 | os=-nindy | |
405 | ;; | |
406 | np1) | |
407 | basic_machine=np1-gould | |
408 | ;; | |
409 | pa-hitachi) | |
410 | basic_machine=hppa1.1-hitachi | |
411 | os=-hiuxwe2 | |
412 | ;; | |
413 | paragon) | |
414 | basic_machine=i860-intel | |
415 | os=-osf | |
416 | ;; | |
417 | pbd) | |
418 | basic_machine=sparc-tti | |
419 | ;; | |
420 | pbb) | |
421 | basic_machine=m68k-tti | |
422 | ;; | |
423 | pc532 | pc532-*) | |
424 | basic_machine=ns32k-pc532 | |
425 | ;; | |
2cb7465b | 426 | pentium | p5) |
8b7e7ff3 MM |
427 | basic_machine=i586-intel |
428 | ;; | |
2cb7465b SC |
429 | pentiumpro | p6) |
430 | basic_machine=i686-intel | |
431 | ;; | |
432 | pentium-* | p5-*) | |
8b7e7ff3 MM |
433 | basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` |
434 | ;; | |
2cb7465b SC |
435 | pentiumpro-* | p6-*) |
436 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | |
437 | ;; | |
8b7e7ff3 MM |
438 | k5) |
439 | # We don't have specific support for AMD's K5 yet, so just call it a Pentium | |
440 | basic_machine=i586-amd | |
441 | ;; | |
442 | nexen) | |
443 | # We don't have specific support for Nexgen yet, so just call it a Pentium | |
444 | basic_machine=i586-nexgen | |
28f540f4 RM |
445 | ;; |
446 | pn) | |
447 | basic_machine=pn-gould | |
448 | ;; | |
8b7e7ff3 MM |
449 | power) basic_machine=rs6000-ibm |
450 | ;; | |
451 | ppc) basic_machine=powerpc-unknown | |
452 | ;; | |
453 | ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` | |
454 | ;; | |
455 | ppcle | powerpclittle | ppc-le | powerpc-little) | |
456 | basic_machine=powerpcle-unknown | |
457 | ;; | |
458 | ppcle-* | powerpclittle-*) | |
459 | basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` | |
460 | ;; | |
28f540f4 RM |
461 | ps2) |
462 | basic_machine=i386-ibm | |
463 | ;; | |
1b814584 RS |
464 | rm[46]00) |
465 | basic_machine=mips-siemens | |
466 | ;; | |
28f540f4 RM |
467 | rtpc | rtpc-*) |
468 | basic_machine=romp-ibm | |
469 | ;; | |
470 | sequent) | |
471 | basic_machine=i386-sequent | |
472 | ;; | |
473 | sh) | |
474 | basic_machine=sh-hitachi | |
475 | os=-hms | |
476 | ;; | |
477 | sps7) | |
478 | basic_machine=m68k-bull | |
479 | os=-sysv2 | |
480 | ;; | |
481 | spur) | |
482 | basic_machine=spur-unknown | |
483 | ;; | |
484 | sun2) | |
485 | basic_machine=m68000-sun | |
486 | ;; | |
487 | sun2os3) | |
488 | basic_machine=m68000-sun | |
489 | os=-sunos3 | |
490 | ;; | |
491 | sun2os4) | |
492 | basic_machine=m68000-sun | |
493 | os=-sunos4 | |
494 | ;; | |
495 | sun3os3) | |
496 | basic_machine=m68k-sun | |
497 | os=-sunos3 | |
498 | ;; | |
499 | sun3os4) | |
500 | basic_machine=m68k-sun | |
501 | os=-sunos4 | |
502 | ;; | |
503 | sun4os3) | |
504 | basic_machine=sparc-sun | |
505 | os=-sunos3 | |
506 | ;; | |
507 | sun4os4) | |
508 | basic_machine=sparc-sun | |
509 | os=-sunos4 | |
510 | ;; | |
0c3aeaf4 DE |
511 | sun4sol2) |
512 | basic_machine=sparc-sun | |
513 | os=-solaris2 | |
514 | ;; | |
28f540f4 RM |
515 | sun3 | sun3-*) |
516 | basic_machine=m68k-sun | |
517 | ;; | |
518 | sun4) | |
519 | basic_machine=sparc-sun | |
520 | ;; | |
521 | sun386 | sun386i | roadrunner) | |
522 | basic_machine=i386-sun | |
523 | ;; | |
524 | symmetry) | |
525 | basic_machine=i386-sequent | |
526 | os=-dynix | |
527 | ;; | |
528 | tower | tower-32) | |
529 | basic_machine=m68k-ncr | |
530 | ;; | |
531 | udi29k) | |
532 | basic_machine=a29k-amd | |
533 | os=-udi | |
534 | ;; | |
535 | ultra3) | |
536 | basic_machine=a29k-nyu | |
537 | os=-sym1 | |
538 | ;; | |
539 | vaxv) | |
540 | basic_machine=vax-dec | |
541 | os=-sysv | |
542 | ;; | |
543 | vms) | |
544 | basic_machine=vax-dec | |
545 | os=-vms | |
546 | ;; | |
547 | vxworks960) | |
548 | basic_machine=i960-wrs | |
549 | os=-vxworks | |
550 | ;; | |
551 | vxworks68) | |
552 | basic_machine=m68k-wrs | |
553 | os=-vxworks | |
554 | ;; | |
2a504a34 DE |
555 | vxworks29k) |
556 | basic_machine=a29k-wrs | |
557 | os=-vxworks | |
558 | ;; | |
28f540f4 RM |
559 | xmp) |
560 | basic_machine=xmp-cray | |
561 | os=-unicos | |
562 | ;; | |
563 | xps | xps100) | |
564 | basic_machine=xps100-honeywell | |
565 | ;; | |
566 | none) | |
567 | basic_machine=none-none | |
568 | os=-none | |
569 | ;; | |
570 | ||
571 | # Here we handle the default manufacturer of certain CPU types. It is in | |
572 | # some cases the only manufacturer, in others, it is the most popular. | |
573 | mips) | |
574 | basic_machine=mips-mips | |
575 | ;; | |
576 | romp) | |
577 | basic_machine=romp-ibm | |
578 | ;; | |
579 | rs6000) | |
580 | basic_machine=rs6000-ibm | |
581 | ;; | |
582 | vax) | |
583 | basic_machine=vax-dec | |
584 | ;; | |
585 | pdp11) | |
586 | basic_machine=pdp11-dec | |
587 | ;; | |
588 | we32k) | |
589 | basic_machine=we32k-att | |
590 | ;; | |
591 | sparc) | |
592 | basic_machine=sparc-sun | |
593 | ;; | |
594 | cydra) | |
595 | basic_machine=cydra-cydrome | |
596 | ;; | |
597 | orion) | |
598 | basic_machine=orion-highlevel | |
599 | ;; | |
600 | orion105) | |
601 | basic_machine=clipper-highlevel | |
602 | ;; | |
603 | *) | |
604 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
605 | exit 1 | |
606 | ;; | |
607 | esac | |
608 | ||
609 | # Here we canonicalize certain aliases for manufacturers. | |
610 | case $basic_machine in | |
611 | *-digital*) | |
612 | basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` | |
613 | ;; | |
614 | *-commodore*) | |
615 | basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` | |
616 | ;; | |
617 | *) | |
618 | ;; | |
619 | esac | |
620 | ||
621 | # Decode manufacturer-specific aliases for certain operating systems. | |
622 | ||
623 | if [ x"$os" != x"" ] | |
624 | then | |
625 | case $os in | |
626 | # -solaris* is a basic system type, with this one exception. | |
627 | -solaris1 | -solaris1.*) | |
628 | os=`echo $os | sed -e 's|solaris1|sunos4|'` | |
629 | ;; | |
630 | -solaris) | |
631 | os=-solaris2 | |
632 | ;; | |
633 | -unixware* | svr4*) | |
634 | os=-sysv4 | |
635 | ;; | |
636 | -gnu/linux*) | |
637 | os=`echo $os | sed -e 's|gnu/linux|linux|'` | |
638 | ;; | |
639 | # First accept the basic system types. | |
640 | # The portable systems comes first. | |
f799c39b | 641 | # Each alternative MUST END IN A *, to match a version number. |
28f540f4 RM |
642 | # -sysv* is not here because it comes later, after sysvr4. |
643 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | |
2cb7465b | 644 | | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[3456]* \ |
28f540f4 | 645 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ |
1ff03030 | 646 | | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \ |
28f540f4 RM |
647 | | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ |
648 | | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ | |
649 | | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \ | |
650 | | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ | |
f799c39b | 651 | | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ |
26bd65c3 | 652 | | -udi* | -eabi* | -lites* | -ieee*) |
f799c39b | 653 | # Remember, each alternative MUST END IN *, to match a version number. |
28f540f4 RM |
654 | ;; |
655 | -sunos5*) | |
656 | os=`echo $os | sed -e 's|sunos5|solaris2|'` | |
657 | ;; | |
658 | -sunos6*) | |
659 | os=`echo $os | sed -e 's|sunos6|solaris3|'` | |
660 | ;; | |
661 | -osfrose*) | |
662 | os=-osfrose | |
663 | ;; | |
664 | -osf*) | |
665 | os=-osf | |
666 | ;; | |
667 | -utek*) | |
668 | os=-bsd | |
669 | ;; | |
670 | -dynix*) | |
671 | os=-bsd | |
672 | ;; | |
673 | -acis*) | |
674 | os=-aos | |
675 | ;; | |
676 | -ctix* | -uts*) | |
677 | os=-sysv | |
678 | ;; | |
1b814584 RS |
679 | # Preserve the version number of sinix5. |
680 | -sinix5.*) | |
681 | os=`echo $os | sed -e 's|sinix|sysv|'` | |
682 | ;; | |
683 | -sinix*) | |
684 | os=-sysv4 | |
685 | ;; | |
28f540f4 RM |
686 | -triton*) |
687 | os=-sysv3 | |
688 | ;; | |
689 | -oss*) | |
690 | os=-sysv3 | |
691 | ;; | |
692 | -svr4) | |
693 | os=-sysv4 | |
694 | ;; | |
695 | -svr3) | |
696 | os=-sysv3 | |
697 | ;; | |
698 | -sysvr4) | |
699 | os=-sysv4 | |
700 | ;; | |
701 | # This must come after -sysvr4. | |
702 | -sysv*) | |
703 | ;; | |
704 | -xenix) | |
705 | os=-xenix | |
706 | ;; | |
707 | -none) | |
708 | ;; | |
709 | *) | |
710 | # Get rid of the `-' at the beginning of $os. | |
711 | os=`echo $os | sed 's/[^-]*-//'` | |
712 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 | |
713 | exit 1 | |
714 | ;; | |
715 | esac | |
716 | else | |
717 | ||
718 | # Here we handle the default operating systems that come with various machines. | |
719 | # The value should be what the vendor currently ships out the door with their | |
720 | # machine or put another way, the most popular os provided with the machine. | |
721 | ||
722 | # Note that if you're going to try to match "-MANUFACTURER" here (say, | |
723 | # "-sun"), then you have to tell the case statement up towards the top | |
724 | # that MANUFACTURER isn't an operating system. Otherwise, code above | |
725 | # will signal an error saying that MANUFACTURER isn't an operating | |
726 | # system, and we'll never get to this point. | |
727 | ||
728 | case $basic_machine in | |
729 | *-acorn) | |
730 | os=-riscix1.2 | |
731 | ;; | |
af92ce7e | 732 | arm*-semi) |
733 | os=-aout | |
734 | ;; | |
28f540f4 RM |
735 | pdp11-*) |
736 | os=-none | |
737 | ;; | |
738 | *-dec | vax-*) | |
739 | os=-ultrix4.2 | |
740 | ;; | |
741 | m68*-apollo) | |
742 | os=-domain | |
743 | ;; | |
744 | i386-sun) | |
745 | os=-sunos4.0.2 | |
746 | ;; | |
747 | m68000-sun) | |
748 | os=-sunos3 | |
749 | # This also exists in the configure program, but was not the | |
750 | # default. | |
751 | # os=-sunos4 | |
752 | ;; | |
753 | *-tti) # must be before sparc entry or we get the wrong os. | |
754 | os=-sysv3 | |
755 | ;; | |
756 | sparc-* | *-sun) | |
757 | os=-sunos4.1.1 | |
758 | ;; | |
759 | *-ibm) | |
760 | os=-aix | |
761 | ;; | |
762 | *-hp) | |
763 | os=-hpux | |
764 | ;; | |
765 | *-hitachi) | |
766 | os=-hiux | |
767 | ;; | |
768 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) | |
769 | os=-sysv | |
770 | ;; | |
771 | *-cbm) | |
772 | os=-amigados | |
773 | ;; | |
774 | *-dg) | |
775 | os=-dgux | |
776 | ;; | |
777 | *-dolphin) | |
778 | os=-sysv3 | |
779 | ;; | |
780 | m68k-ccur) | |
781 | os=-rtu | |
782 | ;; | |
783 | m88k-omron*) | |
784 | os=-luna | |
785 | ;; | |
786 | *-sequent) | |
787 | os=-ptx | |
788 | ;; | |
789 | *-crds) | |
790 | os=-unos | |
791 | ;; | |
792 | *-ns) | |
793 | os=-genix | |
794 | ;; | |
795 | i370-*) | |
796 | os=-mvs | |
797 | ;; | |
798 | *-next) | |
799 | os=-nextstep3 | |
800 | ;; | |
801 | *-gould) | |
802 | os=-sysv | |
803 | ;; | |
804 | *-highlevel) | |
805 | os=-bsd | |
806 | ;; | |
807 | *-encore) | |
808 | os=-bsd | |
809 | ;; | |
810 | *-sgi) | |
811 | os=-irix | |
812 | ;; | |
1b814584 RS |
813 | *-siemens) |
814 | os=-sysv4 | |
815 | ;; | |
28f540f4 RM |
816 | *-masscomp) |
817 | os=-rtu | |
818 | ;; | |
819 | *) | |
820 | os=-none | |
821 | ;; | |
822 | esac | |
823 | fi | |
824 | ||
825 | # Here we handle the case where we know the os, and the CPU type, but not the | |
826 | # manufacturer. We pick the logical manufacturer. | |
827 | vendor=unknown | |
828 | case $basic_machine in | |
829 | *-unknown) | |
830 | case $os in | |
831 | -riscix*) | |
832 | vendor=acorn | |
833 | ;; | |
834 | -sunos*) | |
835 | vendor=sun | |
836 | ;; | |
837 | -lynxos*) | |
838 | vendor=lynx | |
839 | ;; | |
840 | -aix*) | |
841 | vendor=ibm | |
842 | ;; | |
843 | -hpux*) | |
844 | vendor=hp | |
845 | ;; | |
846 | -hiux*) | |
847 | vendor=hitachi | |
848 | ;; | |
849 | -unos*) | |
850 | vendor=crds | |
851 | ;; | |
852 | -dgux*) | |
853 | vendor=dg | |
854 | ;; | |
855 | -luna*) | |
856 | vendor=omron | |
857 | ;; | |
858 | -genix*) | |
859 | vendor=ns | |
860 | ;; | |
861 | -mvs*) | |
862 | vendor=ibm | |
863 | ;; | |
864 | -ptx*) | |
865 | vendor=sequent | |
866 | ;; | |
867 | -vxworks*) | |
868 | vendor=wrs | |
869 | ;; | |
870 | esac | |
871 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | |
872 | ;; | |
873 | esac | |
874 | ||
875 | echo $basic_machine$os |