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