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