]>
Commit | Line | Data |
---|---|---|
4f183929 | 1 | #!/bin/sh |
a2ee3e6d | 2 | # Configuration validation subroutine script, version 1.0. |
68cd7865 | 3 | # Copyright (C) 1991, 1992 Free Software Foundation, Inc. |
a2ee3e6d JW |
4 | |
5 | #This file is free software; you can redistribute it and/or modify | |
6 | #it under the terms of the GNU General Public License as published by | |
7 | #the Free Software Foundation; either version 2 of the License, or | |
8 | #(at your option) any later version. | |
9 | ||
10 | #This program is distributed in the hope that it will be useful, | |
11 | #but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | #GNU General Public License for more details. | |
14 | ||
15 | #You should have received a copy of the GNU General Public License | |
16 | #along with this program; if not, write to the Free Software | |
17 | #Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
18 | ||
4f183929 RP |
19 | |
20 | # Configuration subroutine to validate and canonicalize a configuration type. | |
21 | # Supply the specified configuration type as an argument. | |
22 | # If it is invalid, we print an error message on stderr and exit with code 1. | |
23 | # Otherwise, we print the canonical config type on stdout and succeed. | |
24 | ||
25 | # This file is supposed to be the same for all GNU packages | |
26 | # and recognize all the CPU types, system types and aliases | |
27 | # that are meaningful with *any* GNU software. | |
28 | # Each package is responsible for reporting which valid configurations | |
29 | # it does not support. The user should be able to distinguish | |
30 | # a failure to support a valid configuration from a meaningless | |
a2ee3e6d | 31 | # configuration. |
4f183929 | 32 | |
a2ee3e6d JW |
33 | # The goal of this file is to map all the various variations of a given |
34 | # machine specification into a single specification in the form: | |
35 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM | |
36 | # it is wrong to echo any other type of specification | |
8b204e6e | 37 | |
23ab00aa KR |
38 | if [ x$1 = x ] |
39 | then | |
40 | echo Configuration name missing. 1>&2 | |
41 | echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 | |
42 | echo "or $0 ALIAS" 1>&2 | |
43 | echo where ALIAS is a recognized configuration type. 1>&2 | |
44 | exit 1 | |
45 | fi | |
46 | ||
a2ee3e6d JW |
47 | # First pass through any local machine types. |
48 | case $1 in | |
49 | *local*) | |
50 | echo $1 | |
51 | exit 0 | |
52 | ;; | |
53 | *) | |
69e87de2 | 54 | ;; |
a2ee3e6d | 55 | esac |
b9fe720d | 56 | |
a2ee3e6d | 57 | # Separate what the user gave into CPU-COMPANY and OS (if any). |
8bcd7db2 | 58 | basic_machine=`echo $1 | sed 's/-[^-][^-]*$//'` |
a2ee3e6d JW |
59 | if [ $basic_machine != $1 ] |
60 | then os=`echo $1 | sed 's/.*-/-/'` | |
61 | else os=; fi | |
caebaa16 | 62 | |
a2ee3e6d JW |
63 | # Lets recognize common machines as not being OS so that things like |
64 | # config.subr decstation-3100 as legal. | |
65 | case $os in | |
66 | -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ | |
67 | -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ | |
68 | -unicom* | -ibm* | -next* | -hp | -isi* | -apollo | -altos* | \ | |
69 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -osf* | \ | |
70 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | |
de0f17d8 | 71 | -harris | -sim) |
a2ee3e6d JW |
72 | os= |
73 | basic_machine=$1 | |
74 | ;; | |
f68be6f0 ILT |
75 | -scout) |
76 | ;; | |
a2ee3e6d JW |
77 | -sco*) |
78 | os=-scosysv322 | |
79 | basic_machine=i386-unknown | |
80 | ;; | |
afba2b22 ILT |
81 | -OSE68k | -ose68k | -OSE | -ose | -es1800) |
82 | os=-ose | |
83 | basic_machine=m68k-ericsson | |
84 | ;; | |
85 | -OSE68000 | -ose68000) | |
86 | os=-ose | |
87 | basic_machine=m68000-ericsson | |
88 | ;; | |
a2ee3e6d JW |
89 | -isc*) |
90 | os=-iscsysv | |
91 | basic_machine=i386-unknown | |
92 | ;; | |
93 | # start-sanitize-v9 | |
94 | -32) | |
95 | basic_machine=sparc64-hal | |
96 | os=-hal32 | |
97 | ;; | |
98 | -64) | |
99 | basic_machine=sparc64-hal | |
100 | os=-hal64 | |
101 | ;; | |
102 | -v7) | |
103 | basic_machine=sparc64-sun | |
104 | os=-v7 | |
105 | ;; | |
106 | # end-sanitize-v9 | |
107 | esac | |
b9fe720d | 108 | |
a2ee3e6d JW |
109 | # Decode aliases for certain CPU-COMPANY combinations. |
110 | case $basic_machine in | |
111 | # Recognize the basic CPU types with without company name. | |
afba2b22 ILT |
112 | tahoe | i386 | i486 | i860 | m68k | m680[01234]0 | m683?2 \ |
113 | | m88k | ns32k | arm | pyramid \ | |
8bcd7db2 | 114 | | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 | we32k\ |
de0f17d8 | 115 | | v70 | we32k | z8k) |
a2ee3e6d JW |
116 | basic_machine=$basic_machine-unknown |
117 | ;; | |
118 | # Recognize the basic CPU types with with company name. | |
6e122179 | 119 | vax-* | tahoe-* | i386-* | i486-* | i860-* | m68k-* \ |
afba2b22 | 120 | | m680[01234]0-* | m683?2-* | m88k-* \ |
a2ee3e6d JW |
121 | | sparc-* | ns32k-* | alliant-* | arm-* | c[123]* \ |
122 | | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | |
123 | | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ | |
de0f17d8 | 124 | | hppa1.0-* | hppa1.1-* | we32k-* | z8k-*) |
a2ee3e6d JW |
125 | ;; |
126 | # Recognize the various machine names and aliases which stand | |
127 | # for a CPU type and a company and sometimes even an OS. | |
e6602723 | 128 | # start-sanitize-life |
a2ee3e6d JW |
129 | life-*) ;; |
130 | life) | |
131 | basic_machine=life-philips | |
132 | os=-none | |
133 | ;; | |
e6602723 JG |
134 | # end-sanitize-life |
135 | ||
25fa8f53 | 136 | # start-sanitize-v9 |
a2ee3e6d JW |
137 | sparc64-*) ;; |
138 | hal-32 | hal32) | |
139 | basic_machine=sparc64-hal | |
140 | os=-hal32 | |
141 | ;; | |
142 | hal-64 | hal64) | |
143 | basic_machine=sparc64-hal | |
144 | os=-hal64 | |
145 | ;; | |
146 | sparc64) | |
147 | basic_machine=sparc64-sun | |
148 | os=-v9 | |
149 | ;; | |
150 | sparc64-v7 | sparc64v7) | |
151 | basic_machine=sparc64-sun | |
152 | os=-v7 | |
153 | ;; | |
25fa8f53 | 154 | # end-sanitize-v9 |
7054ee6d | 155 | |
a2ee3e6d JW |
156 | vaxv) |
157 | basic_machine=vax-dec | |
158 | os=-sysv | |
159 | ;; | |
160 | vms) | |
161 | basic_machine=vax-dec | |
162 | os=-vms | |
163 | ;; | |
68cd7865 SEF |
164 | i386mach) |
165 | basic_machine=i386-mach | |
166 | os=-mach | |
167 | ;; | |
a2ee3e6d JW |
168 | i386v32) |
169 | basic_machine=i386-unknown | |
170 | os=-sysv32 | |
171 | ;; | |
172 | i386-sco* | i386sco | sco) | |
173 | basic_machine=i386-unknown | |
174 | os=-scosysv322 | |
175 | ;; | |
2501643a PB |
176 | go32 | i386-go32) |
177 | basic_machine=i386-unknown | |
178 | os=-go32 | |
179 | ;; | |
a2ee3e6d JW |
180 | i386-isc* | isc) |
181 | basic_machine=i386-unknown | |
182 | os=-iscsysv | |
183 | ;; | |
8bcd7db2 JW |
184 | i386-linux* | linux) |
185 | basic_machine=i386-unknown | |
186 | os=-linux | |
187 | ;; | |
a2ee3e6d JW |
188 | i386v4*) |
189 | basic_machine=i386-unknown | |
190 | os=-sysv4 | |
191 | ;; | |
fb90daeb ME |
192 | i486v4*) |
193 | basic_machine=i486-unknown | |
194 | os=-sysv4 | |
195 | ;; | |
a2ee3e6d JW |
196 | i386v) |
197 | basic_machine=i386-unknown | |
198 | os=-sysv | |
199 | ;; | |
fb90daeb ME |
200 | i486v) |
201 | basic_machine=i486-unknown | |
202 | os=-sysv | |
203 | ;; | |
23ab00aa KR |
204 | 386bsd) |
205 | basic_machine=i386-unknown | |
206 | os=-bsd | |
207 | ;; | |
a2ee3e6d JW |
208 | spur) |
209 | basic_machine=spur-unknown | |
210 | ;; | |
211 | alliant) | |
212 | basic_machine=alliant-alliant | |
213 | ;; | |
214 | convex-c1) | |
215 | basic_machine=c1-convex | |
216 | os=-sysv | |
217 | ;; | |
218 | convex-c2) | |
219 | basic_machine=c2-convex | |
220 | os=-sysv | |
221 | ;; | |
222 | convex-c32) | |
223 | basic_machine=c32-convex | |
224 | os=-sysv | |
225 | ;; | |
226 | convex-c34) | |
227 | basic_machine=c34-convex | |
228 | os=-sysv | |
229 | ;; | |
230 | convex-c38) | |
231 | basic_machine=c38-convex | |
232 | os=-sysv | |
233 | ;; | |
234 | m88k-omron*) | |
235 | basic_machine=m88k-omron | |
236 | ;; | |
237 | merlin) | |
238 | basic_machine=ns32k-utek | |
239 | os=-sysv | |
240 | ;; | |
241 | crds | unos) | |
242 | basic_machine=m68k-crds | |
243 | ;; | |
244 | encore | umax | mmax) | |
245 | basic_machine=ns32k-encore | |
246 | os=-sysv | |
247 | ;; | |
248 | genix) | |
249 | basic_machine=ns32k-ns | |
250 | ;; | |
68cd7865 SEF |
251 | iris | iris3 | iris4d) |
252 | basic_machine=mips-sgi | |
253 | os=-irix3 | |
254 | ;; | |
255 | iris4) | |
a2ee3e6d | 256 | basic_machine=mips-sgi |
68cd7865 | 257 | os=-irix4 |
a2ee3e6d JW |
258 | ;; |
259 | news | news700 | news800 | news900) | |
260 | basic_machine=m68k-sony | |
261 | os=-newsos | |
262 | ;; | |
263 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) | |
264 | basic_machine=m68k-att | |
265 | ;; | |
de0f17d8 BK |
266 | 3b* | we32k* ) |
267 | basic_machine=we32k-att | |
268 | os=-sysv | |
269 | ;; | |
a2ee3e6d JW |
270 | delta | 3300 | motorola-3300 | motorola-delta \ |
271 | | 3300-motorola | delta-motorola) | |
272 | basic_machine=m68k-motorola | |
273 | ;; | |
274 | balance) | |
275 | basic_machine=ns32k-sequent | |
276 | os=-dynix | |
277 | ;; | |
278 | pc532) | |
279 | basic_machine=ns32k-pc532 | |
280 | ;; | |
281 | symmetry) | |
282 | basic_machine=i386-sequent | |
283 | os=-dynix | |
284 | ;; | |
285 | sun2) | |
286 | basic_machine=m68000-sun | |
287 | ;; | |
288 | sun2os3) | |
289 | basic_machine=m68000-sun | |
290 | os=-sunos3 | |
291 | ;; | |
292 | sun2os4) | |
293 | basic_machine=m68000-sun | |
294 | os=-sunos4 | |
295 | ;; | |
296 | sun3os3) | |
297 | basic_machine=m68k-sun | |
298 | os=-sunos3 | |
299 | ;; | |
300 | sun3os4) | |
301 | basic_machine=m68k-sun | |
302 | os=-sunos4 | |
303 | ;; | |
304 | sun4os3) | |
305 | basic_machine=sparc-sun | |
306 | os=-sunos3 | |
307 | ;; | |
308 | sun4os4) | |
309 | basic_machine=sparc-sun | |
310 | os=-sunos4 | |
311 | ;; | |
8bcd7db2 JW |
312 | sun4sol2) |
313 | basic_machine=sparc-sun | |
314 | os=-solaris2 | |
315 | ;; | |
de0f17d8 BK |
316 | z8ksim) |
317 | basic_machine=z8k-unknown | |
318 | os=-sim | |
319 | ;; | |
a2ee3e6d JW |
320 | sun3) |
321 | basic_machine=m68k-sun | |
322 | ;; | |
323 | sun4) | |
324 | basic_machine=sparc-sun | |
325 | ;; | |
afba2b22 ILT |
326 | msdos) |
327 | basic_machine=i386-unknown | |
328 | os=-msdos | |
329 | ;; | |
a2ee3e6d JW |
330 | pbd) |
331 | basic_machine=sparc-unicom | |
332 | ;; | |
333 | sun386 | sun386i | roadrunner) | |
334 | basic_machine=i386-sun | |
335 | ;; | |
336 | ps2) | |
337 | basic_machine=i386-ibm | |
338 | ;; | |
339 | next) | |
340 | basic_machine=m68k-next | |
ad1f7512 | 341 | os=-bsd |
a2ee3e6d JW |
342 | ;; |
343 | hp9k3[2-9][0-9]) | |
344 | basic_machine=m68k-hp | |
345 | ;; | |
346 | hp9k31[0-9] | hp9k2[0-9][0-9]) | |
347 | basic_machine=m68000-hp | |
348 | ;; | |
8bcd7db2 JW |
349 | hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) |
350 | basic_machine=hppa1.1-hp | |
351 | ;; | |
352 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) | |
353 | basic_machine=hppa1.0-hp | |
a2ee3e6d JW |
354 | ;; |
355 | isi68 | isi) | |
356 | basic_machine=m68k-isi | |
357 | os=-sysv | |
358 | ;; | |
359 | apollo68) | |
360 | basic_machine=m68k-apollo | |
361 | os=-sysv | |
362 | ;; | |
68cd7865 SEF |
363 | apollo68bsd) |
364 | basic_machine=m68k-apollo | |
365 | os=-bsd | |
366 | ;; | |
a2ee3e6d JW |
367 | altos | altos3068) |
368 | basic_machine=m68k-altos | |
369 | ;; | |
370 | miniframe) | |
371 | basic_machine=m68000-convergent | |
372 | ;; | |
373 | tower | tower-32) | |
374 | basic_machine=m68k-ncr | |
375 | ;; | |
376 | news-3600 | risc-news) | |
377 | basic_machine=mips-sony | |
378 | os=-newsos | |
379 | ;; | |
68cd7865 SEF |
380 | st2000) |
381 | basic_machine=m68kmote-tandem | |
382 | ;; | |
a2ee3e6d JW |
383 | decstation-dec | decstation | decstation-3100 | pmax | pmin | dec3100 | decstatn) |
384 | basic_machine=mips-dec | |
385 | ;; | |
386 | magnum | m3230) | |
387 | basic_machine=mips-mips | |
388 | os=-sysv | |
389 | ;; | |
390 | gmicro) | |
391 | basic_machine=tron-gmicro | |
392 | os=-sysv | |
393 | ;; | |
394 | rtpc | rtpc-*) | |
395 | basic_machine=romp-ibm | |
396 | ;; | |
397 | am29k) | |
398 | basic_machine=a29k-none | |
399 | os=-bsd | |
400 | ;; | |
401 | amdahl) | |
402 | basic_machine=580-amdahl | |
403 | os=-sysv | |
404 | ;; | |
405 | amigados) | |
406 | basic_machine=m68k-cbm | |
407 | os=-amigados | |
408 | ;; | |
409 | amigaunix | amix) | |
410 | basic_machine=m68k-cbm | |
411 | os=-sysv4 | |
412 | ;; | |
dd16baba SEF |
413 | stratus) |
414 | basic_machine=i860-stratus | |
415 | os=-sysv4 | |
416 | ;; | |
a2ee3e6d JW |
417 | cray | ymp) |
418 | basic_machine=ymp-cray | |
419 | os=-unicos | |
420 | ;; | |
421 | cray2) | |
422 | basic_machine=cray2-cray | |
423 | os=-unicos | |
424 | ;; | |
425 | xmp) | |
426 | basic_machine=xmp-cray | |
427 | os=-unicos | |
428 | ;; | |
429 | delta88) | |
430 | basic_machine=m88k-motorola | |
431 | os=-m88kbcs | |
432 | ;; | |
433 | dpx2) | |
434 | basic_machine=m68k-bull | |
435 | os=-sysv | |
436 | ;; | |
437 | ebmon29k) | |
438 | basic_machine=a29k-amd | |
439 | os=-ebmon | |
440 | ;; | |
2501643a PB |
441 | |
442 | h8300hms) | |
a2ee3e6d | 443 | basic_machine=h8300-hitachi |
2501643a PB |
444 | os=-hms |
445 | ;; | |
446 | udi29k) | |
447 | basic_machine=a29k-amd | |
448 | os=-udi | |
449 | ;; | |
450 | a29khif) | |
451 | basic_machine=a29k-amd | |
452 | os=-udi | |
453 | ;; | |
454 | sa29200) | |
455 | basic_machine=a29k-amd | |
456 | os=-udi | |
457 | ;; | |
458 | h8300xray) | |
459 | basic_machine=h8300-hitachi | |
460 | os=-xray | |
a2ee3e6d JW |
461 | ;; |
462 | harris) | |
463 | basic_machine=m88k-harris | |
464 | os=-m88kbcs | |
465 | ;; | |
466 | hp300bsd) | |
467 | basic_machine=m68k-hp | |
468 | os=-bsd | |
469 | ;; | |
470 | hp300hpux) | |
471 | basic_machine=m68k-hp | |
472 | os=-hpux | |
473 | ;; | |
474 | hp9k2[0-9][0-9] | hp9k31[0-9]) | |
475 | basic_machine=m68000-hp | |
476 | os=-hpux | |
477 | ;; | |
478 | hp9k3[2-9][0-9]) | |
479 | basic_machine=m68k-hp | |
480 | os=-hpux | |
481 | ;; | |
8bcd7db2 JW |
482 | hppabsd) |
483 | basic_machine=hppa-hp | |
484 | os=-bsd | |
485 | ;; | |
486 | hppahpux) | |
487 | basic_machine=hppa-hp | |
488 | os=-hpux | |
489 | ;; | |
a2ee3e6d | 490 | ncr3000) |
afba2b22 | 491 | basic_machine=i486-ncr |
a2ee3e6d JW |
492 | os=-sysv4 |
493 | ;; | |
68cd7865 SEF |
494 | necv70) |
495 | basic_machine=v70-nec | |
496 | os=-sysv | |
497 | ;; | |
a2ee3e6d JW |
498 | news1000) |
499 | basic_machine=m68030-sony | |
500 | os=-newsos | |
501 | ;; | |
502 | nindy960) | |
503 | basic_machine=i960-intel | |
504 | os=-nindy | |
505 | ;; | |
506 | pn) | |
507 | basic_machine=pn-gould | |
508 | os=-sysv | |
509 | ;; | |
510 | np1) | |
511 | basic_machine=np1-gould | |
512 | os=-sysv | |
513 | ;; | |
514 | ultra3) | |
515 | basic_machine=a29k-nyu | |
c1e296fc | 516 | os=-sym1 |
a2ee3e6d JW |
517 | ;; |
518 | vxworks960) | |
519 | basic_machine=i960-wrs | |
520 | os=-vxworks | |
521 | ;; | |
522 | vxworks68) | |
523 | basic_machine=m68k-wrs | |
524 | os=-vxworks | |
525 | ;; | |
afba2b22 ILT |
526 | es1800 | OSE68k | ose68k) |
527 | basic_machine=m68k-ericsson | |
528 | os=-ose | |
529 | ;; | |
530 | OSE68000 | ose68000) | |
531 | basic_machine=m68000-ericsson | |
532 | os=-ose | |
533 | ;; | |
dd16baba SEF |
534 | os68k) |
535 | basic_machine=m68k-none | |
536 | os=-os68k | |
537 | ;; | |
ad1f7512 MT |
538 | sparclite) |
539 | basic_machine=sparclite-fujitsu | |
540 | os=-none | |
541 | ;; | |
fb90daeb ME |
542 | sparclite-wrs) |
543 | basic_machine=sparclite-wrs | |
544 | os=-vxworks | |
545 | ;; | |
c73e3fe4 JW |
546 | sparcfrw) |
547 | basic_machine=sparcfrw-sun | |
548 | os=-sunos4 | |
549 | ;; | |
550 | sparcfrwcompat) | |
551 | basic_machine=sparcfrwcompat-sun | |
552 | os=-sunos4 | |
553 | ;; | |
554 | sparclitefrw) | |
555 | basic_machine=sparclitefrw-fujitsu | |
556 | os=-none | |
557 | ;; | |
558 | sparclitefrwcompat) | |
559 | basic_machine=sparclitefrwcompat-fujitsu | |
560 | os=-none | |
561 | ;; | |
f68be6f0 ILT |
562 | adobe68k) |
563 | basic_machine=m68010-adobe | |
564 | os=-scout | |
565 | ;; | |
ad1f7512 | 566 | |
a2ee3e6d JW |
567 | none) |
568 | basic_machine=none-none | |
569 | os=-none | |
570 | ;; | |
69e87de2 | 571 | |
a2ee3e6d JW |
572 | # Here we handle the default manufacturer of certain CPU types. It is in |
573 | # some cases the only manufacturer, in others, it is the most popular. | |
574 | mips) | |
575 | basic_machine=mips-mips | |
576 | ;; | |
577 | romp) | |
578 | basic_machine=romp-ibm | |
579 | ;; | |
580 | rs6000) | |
581 | basic_machine=rs6000-ibm | |
582 | ;; | |
583 | vax) | |
584 | basic_machine=vax-dec | |
585 | ;; | |
586 | sparc) | |
587 | basic_machine=sparc-sun | |
588 | ;; | |
c1e296fc SG |
589 | fx2800) |
590 | basic_machine=i860-alliant | |
591 | ;; | |
a2ee3e6d JW |
592 | *) |
593 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
4f183929 | 594 | exit 1 |
a2ee3e6d | 595 | ;; |
4f183929 RP |
596 | esac |
597 | ||
a2ee3e6d | 598 | # Decode manufacturer-specific aliases for certain operating systems. |
e6602723 | 599 | |
a2ee3e6d JW |
600 | if [ "$os" ] |
601 | then | |
602 | case $os in | |
603 | # First accept the basic system types. | |
604 | # The portable systems comes first. | |
605 | # Each alternative must end in a *, to match a version number. | |
f68be6f0 ILT |
606 | -bsd* | -sysv* | -mach* | -minix* | -genix* | -ultrix* \ |
607 | | -aout | -coff | -elf \ | |
a2ee3e6d | 608 | | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos* | -hpux* \ |
8bcd7db2 | 609 | | -unos* | -osf* | -v88r* | -luna* | -dgux* | -solaris* | -sym* \ |
2501643a | 610 | | -newsos | -amigados* | -msdos* | -none* | -os68k* | -irix* \ |
8bcd7db2 | 611 | | -nindy* | -vxworks* | -ebmon* | -udi | -hms* | -xray \ |
de0f17d8 | 612 | | -m88kbcs* | -go32 | -linux* | -sim | -es1800*) |
2501643a | 613 | ;; |
25fa8f53 | 614 | # start-sanitize-v9 |
a2ee3e6d | 615 | -v7 | -v9 | -hal32 | -hal64) ;; |
25fa8f53 RP |
616 | # end-sanitize-v9 |
617 | ||
2501643a PB |
618 | # Note that readline checks for newsos |
619 | # -newsos*) | |
620 | # os=-bsd | |
621 | # ;; | |
a2ee3e6d JW |
622 | -osfrose*) |
623 | os=-osf | |
624 | ;; | |
625 | -osf*) | |
626 | os=-bsd | |
627 | ;; | |
628 | -dynix*) | |
629 | os=-bsd | |
630 | ;; | |
631 | -aos*) | |
632 | os=-bsd | |
633 | ;; | |
23ab00aa KR |
634 | -386bsd) |
635 | os=-bsd | |
636 | ;; | |
68cd7865 | 637 | -ctix* | -uts*) |
a2ee3e6d JW |
638 | os=-sysv |
639 | ;; | |
c1e296fc SG |
640 | -svr4) |
641 | os=-sysv4 | |
642 | ;; | |
643 | -svr3) | |
644 | os=-sysv3 | |
645 | ;; | |
afba2b22 ILT |
646 | -ose*) |
647 | os=-ose | |
648 | ;; | |
649 | -es1800*) | |
650 | os=-ose | |
651 | ;; | |
a2ee3e6d JW |
652 | *) |
653 | # Get rid of the `-' at the beginning of $os. | |
654 | os=`echo $1 | sed 's/[^-]*-//'` | |
655 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 | |
656 | exit 1 | |
657 | ;; | |
69e87de2 | 658 | esac |
a2ee3e6d | 659 | else |
69e87de2 | 660 | |
a2ee3e6d JW |
661 | # Here we handle the default operating systems that come with various machines. |
662 | # The value should be what the vendor currently ships out the door with their | |
663 | # machine or put another way, the most popular os provided with the machine. | |
664 | case $basic_machine in | |
665 | *-dec | vax-*) | |
666 | os=-ultrix42 | |
667 | ;; | |
668 | i386-sun) | |
669 | os=-sunos402 | |
670 | ;; | |
671 | m68000-sun) | |
672 | os=-sunos3 | |
673 | # This also exists in the configure program, but was not the | |
674 | # default. | |
675 | # os=-sunos4 | |
676 | ;; | |
677 | sparc-* | *-sun) | |
678 | os=-sunos411 | |
679 | ;; | |
680 | romp-*) | |
681 | os=-bsd | |
682 | ;; | |
683 | *-ibm) | |
684 | os=-aix | |
685 | ;; | |
686 | *-hp) | |
687 | os=-hpux | |
688 | ;; | |
689 | *-sgi | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) | |
690 | os=-sysv | |
691 | ;; | |
692 | *-dg) | |
693 | os=-dgux | |
694 | ;; | |
695 | m88k-omron*) | |
696 | os=-luna | |
697 | ;; | |
698 | *-crds) | |
699 | os=-unos | |
700 | ;; | |
701 | *-ns) | |
702 | os=-genix | |
703 | ;; | |
704 | i386-*) | |
705 | os=-scosysv322 | |
706 | ;; | |
707 | *) | |
708 | os=-none | |
709 | ;; | |
69e87de2 | 710 | esac |
a2ee3e6d | 711 | fi |
69e87de2 | 712 | |
a2ee3e6d JW |
713 | # Here we handle the case where we know the os, and the CPU type, but not the |
714 | # manufacturer. We pick the logical manufacturer. | |
715 | vendor=unknown | |
716 | case $basic_machine in | |
717 | *-unknown) | |
718 | case $os in | |
719 | -sunos*) | |
720 | vendor=sun | |
721 | ;; | |
722 | -aix*) | |
723 | vendor=ibm | |
724 | ;; | |
725 | -hpux*) | |
726 | vendor=hp | |
727 | ;; | |
728 | -unos*) | |
729 | vendor=crds | |
730 | ;; | |
731 | -dgux*) | |
732 | vendor=dg | |
733 | ;; | |
734 | -luna*) | |
735 | vendor=omron | |
736 | ;; | |
737 | -genix*) | |
738 | vendor=ns | |
739 | ;; | |
afba2b22 ILT |
740 | -vxworks*) |
741 | vendor=wrs | |
742 | ;; | |
a2ee3e6d JW |
743 | esac |
744 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | |
745 | ;; | |
4f183929 RP |
746 | esac |
747 | ||
a2ee3e6d | 748 | echo $basic_machine$os |