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