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* | \ |
27a2a371 | 76 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ |
378fd382 | 77 | -sim) # CYGNUS LOCAL |
a2ee3e6d JW |
78 | os= |
79 | basic_machine=$1 | |
80 | ;; | |
378fd382 | 81 | -scout) # CYGNUS LOCAL |
f68be6f0 | 82 | ;; |
6559fbdb | 83 | -wrs) # CYGNUS LOCAL |
300f6a4f RS |
84 | os=vxworks |
85 | basic_machine=$1 | |
86 | ;; | |
27a2a371 JW |
87 | -sco3.2v[4-9]*) |
88 | # Don't forget version if it is 3.2v4 or newer. | |
6559fbdb | 89 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` |
27a2a371 | 90 | ;; |
a2ee3e6d | 91 | -sco*) |
378fd382 | 92 | os=-sco3.2v2 |
6559fbdb | 93 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` |
a2ee3e6d | 94 | ;; |
27a2a371 JW |
95 | -isc) |
96 | os=-isc2.2 | |
6559fbdb | 97 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` |
27a2a371 | 98 | ;; |
378fd382 | 99 | -isc*) |
6559fbdb | 100 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` |
a2ee3e6d | 101 | ;; |
a2ee3e6d | 102 | esac |
b9fe720d | 103 | |
a2ee3e6d JW |
104 | # Decode aliases for certain CPU-COMPANY combinations. |
105 | case $basic_machine in | |
106 | # Recognize the basic CPU types with without company name. | |
378fd382 DZ |
107 | # Some are omitted here because they have special meanings below. |
108 | tahoe | i[34]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \ | |
109 | | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ | |
6559fbdb | 110 | | alpha | we32k | ns16k | clipper | sparclite \ |
ba7f177a | 111 | | sparc | m680[01234]0 | m683?2 | z8k | v70 | h8500)# CYGNUS LOCAL |
a2ee3e6d JW |
112 | basic_machine=$basic_machine-unknown |
113 | ;; | |
114 | # Recognize the basic CPU types with with company name. | |
378fd382 DZ |
115 | vax-* | tahoe-* | i[34]86-* | i860-* | m68k-* | m68000-* | m88k-* \ |
116 | | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ | |
a2ee3e6d JW |
117 | | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ |
118 | | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ | |
27a2a371 | 119 | | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ |
6559fbdb | 120 | | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ |
378fd382 | 121 | | m680[01234]0-* | m683?2-* | z8k-*) # CYGNUS LOCAL |
a2ee3e6d JW |
122 | ;; |
123 | # Recognize the various machine names and aliases which stand | |
124 | # for a CPU type and a company and sometimes even an OS. | |
25fa8f53 | 125 | # start-sanitize-v9 |
378fd382 | 126 | sparc64) # CYGNUS LOCAL |
a2ee3e6d | 127 | basic_machine=sparc64-sun |
6559fbdb | 128 | os=-elf64i64p |
a2ee3e6d | 129 | ;; |
6559fbdb | 130 | sparc64-*) # CYGNUS LOCAL |
a2ee3e6d | 131 | ;; |
25fa8f53 | 132 | # end-sanitize-v9 |
7054ee6d | 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 |
de0f17d8 BK |
293 | basic_machine=z8k-unknown |
294 | os=-sim | |
295 | ;; | |
a2ee3e6d JW |
296 | sun3) |
297 | basic_machine=m68k-sun | |
298 | ;; | |
299 | sun4) | |
300 | basic_machine=sparc-sun | |
301 | ;; | |
378fd382 | 302 | msdos) # CYGNUS LOCAL |
afba2b22 ILT |
303 | basic_machine=i386-unknown |
304 | os=-msdos | |
305 | ;; | |
a2ee3e6d | 306 | pbd) |
378fd382 DZ |
307 | basic_machine=sparc-tti |
308 | ;; | |
309 | pbb) | |
310 | basic_machine=m68k-tti | |
a2ee3e6d JW |
311 | ;; |
312 | sun386 | sun386i | roadrunner) | |
313 | basic_machine=i386-sun | |
314 | ;; | |
315 | ps2) | |
316 | basic_machine=i386-ibm | |
317 | ;; | |
378fd382 DZ |
318 | fx2800) |
319 | basic_machine=i860-alliant | |
320 | ;; | |
a2ee3e6d JW |
321 | next) |
322 | basic_machine=m68k-next | |
ad1f7512 | 323 | os=-bsd |
a2ee3e6d | 324 | ;; |
378fd382 DZ |
325 | amiga) |
326 | basic_machine=m68k-cbm | |
327 | ;; | |
27a2a371 JW |
328 | amigados) |
329 | basic_machine=m68k-cbm | |
330 | os=-amigados | |
331 | ;; | |
332 | amigaunix | amix) | |
333 | basic_machine=m68k-cbm | |
334 | os=-sysv4 | |
335 | ;; | |
a2ee3e6d JW |
336 | hp9k3[2-9][0-9]) |
337 | basic_machine=m68k-hp | |
338 | ;; | |
339 | hp9k31[0-9] | hp9k2[0-9][0-9]) | |
340 | basic_machine=m68000-hp | |
341 | ;; | |
8bcd7db2 JW |
342 | hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) |
343 | basic_machine=hppa1.1-hp | |
344 | ;; | |
345 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) | |
346 | basic_machine=hppa1.0-hp | |
a2ee3e6d JW |
347 | ;; |
348 | isi68 | isi) | |
349 | basic_machine=m68k-isi | |
350 | os=-sysv | |
351 | ;; | |
352 | apollo68) | |
353 | basic_machine=m68k-apollo | |
354 | os=-sysv | |
355 | ;; | |
378fd382 | 356 | apollo68bsd) # CYGNUS LOCAL |
68cd7865 SEF |
357 | basic_machine=m68k-apollo |
358 | os=-bsd | |
359 | ;; | |
a2ee3e6d JW |
360 | altos | altos3068) |
361 | basic_machine=m68k-altos | |
362 | ;; | |
363 | miniframe) | |
364 | basic_machine=m68000-convergent | |
365 | ;; | |
366 | tower | tower-32) | |
367 | basic_machine=m68k-ncr | |
368 | ;; | |
369 | news-3600 | risc-news) | |
370 | basic_machine=mips-sony | |
371 | os=-newsos | |
372 | ;; | |
378fd382 | 373 | st2000) # CYGNUS LOCAL |
012be2b1 | 374 | basic_machine=m68k-tandem |
68cd7865 | 375 | ;; |
378fd382 | 376 | decstation | decstation-3100 | pmax | pmin | dec3100 | decstatn) |
a2ee3e6d JW |
377 | basic_machine=mips-dec |
378 | ;; | |
379 | magnum | m3230) | |
380 | basic_machine=mips-mips | |
381 | os=-sysv | |
382 | ;; | |
383 | gmicro) | |
384 | basic_machine=tron-gmicro | |
385 | os=-sysv | |
386 | ;; | |
387 | rtpc | rtpc-*) | |
388 | basic_machine=romp-ibm | |
389 | ;; | |
390 | am29k) | |
391 | basic_machine=a29k-none | |
392 | os=-bsd | |
393 | ;; | |
394 | amdahl) | |
395 | basic_machine=580-amdahl | |
396 | os=-sysv | |
397 | ;; | |
378fd382 | 398 | stratus) # CYGNUS LOCAL |
dd16baba SEF |
399 | basic_machine=i860-stratus |
400 | os=-sysv4 | |
401 | ;; | |
a2ee3e6d JW |
402 | cray | ymp) |
403 | basic_machine=ymp-cray | |
404 | os=-unicos | |
405 | ;; | |
406 | cray2) | |
407 | basic_machine=cray2-cray | |
408 | os=-unicos | |
409 | ;; | |
410 | xmp) | |
411 | basic_machine=xmp-cray | |
412 | os=-unicos | |
413 | ;; | |
414 | delta88) | |
415 | basic_machine=m88k-motorola | |
6559fbdb | 416 | os=-sysv3 |
a2ee3e6d JW |
417 | ;; |
418 | dpx2) | |
419 | basic_machine=m68k-bull | |
420 | os=-sysv | |
421 | ;; | |
422 | ebmon29k) | |
423 | basic_machine=a29k-amd | |
424 | os=-ebmon | |
425 | ;; | |
378fd382 | 426 | h8300hms) # CYGNUS LOCAL |
a2ee3e6d | 427 | basic_machine=h8300-hitachi |
2501643a PB |
428 | os=-hms |
429 | ;; | |
378fd382 DZ |
430 | h8300xray) # CYGNUS LOCAL |
431 | basic_machine=h8300-hitachi | |
432 | os=-xray | |
433 | ;; | |
434 | h8300hds) | |
435 | basic_machine=h8300-hitachi | |
436 | os=-hds | |
437 | ;; | |
438 | udi29k) # CYGNUS LOCAL | |
2501643a PB |
439 | basic_machine=a29k-amd |
440 | os=-udi | |
441 | ;; | |
378fd382 | 442 | a29khif) # CYGNUS LOCAL |
2501643a PB |
443 | basic_machine=a29k-amd |
444 | os=-udi | |
445 | ;; | |
378fd382 | 446 | sa29200) # CYGNUS LOCAL |
2501643a PB |
447 | basic_machine=a29k-amd |
448 | os=-udi | |
449 | ;; | |
a2ee3e6d JW |
450 | harris) |
451 | basic_machine=m88k-harris | |
6559fbdb | 452 | os=-sysv3 |
a2ee3e6d JW |
453 | ;; |
454 | hp300bsd) | |
455 | basic_machine=m68k-hp | |
456 | os=-bsd | |
457 | ;; | |
458 | hp300hpux) | |
459 | basic_machine=m68k-hp | |
460 | os=-hpux | |
461 | ;; | |
462 | hp9k2[0-9][0-9] | hp9k31[0-9]) | |
463 | basic_machine=m68000-hp | |
464 | os=-hpux | |
465 | ;; | |
466 | hp9k3[2-9][0-9]) | |
467 | basic_machine=m68k-hp | |
468 | os=-hpux | |
469 | ;; | |
470 | ncr3000) | |
afba2b22 | 471 | basic_machine=i486-ncr |
a2ee3e6d JW |
472 | os=-sysv4 |
473 | ;; | |
378fd382 | 474 | necv70) # CYGNUS LOCAL |
68cd7865 SEF |
475 | basic_machine=v70-nec |
476 | os=-sysv | |
477 | ;; | |
a2ee3e6d JW |
478 | news1000) |
479 | basic_machine=m68030-sony | |
480 | os=-newsos | |
481 | ;; | |
482 | nindy960) | |
483 | basic_machine=i960-intel | |
484 | os=-nindy | |
485 | ;; | |
486 | pn) | |
487 | basic_machine=pn-gould | |
a2ee3e6d JW |
488 | ;; |
489 | np1) | |
490 | basic_machine=np1-gould | |
a2ee3e6d JW |
491 | ;; |
492 | ultra3) | |
493 | basic_machine=a29k-nyu | |
c1e296fc | 494 | os=-sym1 |
a2ee3e6d JW |
495 | ;; |
496 | vxworks960) | |
497 | basic_machine=i960-wrs | |
498 | os=-vxworks | |
499 | ;; | |
500 | vxworks68) | |
501 | basic_machine=m68k-wrs | |
502 | os=-vxworks | |
503 | ;; | |
300f6a4f | 504 | es1800 | OSE68k | ose68k | ose | OSE) # CYGNUS LOCAL |
afba2b22 ILT |
505 | basic_machine=m68k-ericsson |
506 | os=-ose | |
507 | ;; | |
378fd382 | 508 | OSE68000 | ose68000) # CYGNUS LOCAL |
afba2b22 ILT |
509 | basic_machine=m68000-ericsson |
510 | os=-ose | |
511 | ;; | |
378fd382 | 512 | os68k) # CYGNUS LOCAL |
dd16baba SEF |
513 | basic_machine=m68k-none |
514 | os=-os68k | |
515 | ;; | |
378fd382 | 516 | sparclite-wrs) # CYGNUS LOCAL |
fb90daeb ME |
517 | basic_machine=sparclite-wrs |
518 | os=-vxworks | |
519 | ;; | |
378fd382 | 520 | sparcfrw) # CYGNUS LOCAL |
c73e3fe4 JW |
521 | basic_machine=sparcfrw-sun |
522 | os=-sunos4 | |
523 | ;; | |
378fd382 | 524 | sparcfrwcompat) # CYGNUS LOCAL |
c73e3fe4 JW |
525 | basic_machine=sparcfrwcompat-sun |
526 | os=-sunos4 | |
527 | ;; | |
378fd382 | 528 | sparclitefrw) # CYGNUS LOCAL |
c73e3fe4 JW |
529 | basic_machine=sparclitefrw-fujitsu |
530 | os=-none | |
531 | ;; | |
378fd382 | 532 | sparclitefrwcompat) # CYGNUS LOCAL |
c73e3fe4 JW |
533 | basic_machine=sparclitefrwcompat-fujitsu |
534 | os=-none | |
535 | ;; | |
378fd382 | 536 | adobe68k) # CYGNUS LOCAL |
f68be6f0 ILT |
537 | basic_machine=m68010-adobe |
538 | os=-scout | |
539 | ;; | |
ad1f7512 | 540 | |
27a2a371 JW |
541 | xps | xps100) |
542 | basic_machine=xps100-honeywell | |
543 | ;; | |
a2ee3e6d JW |
544 | none) |
545 | basic_machine=none-none | |
546 | os=-none | |
547 | ;; | |
69e87de2 | 548 | |
a2ee3e6d JW |
549 | # Here we handle the default manufacturer of certain CPU types. It is in |
550 | # some cases the only manufacturer, in others, it is the most popular. | |
551 | mips) | |
552 | basic_machine=mips-mips | |
553 | ;; | |
554 | romp) | |
555 | basic_machine=romp-ibm | |
556 | ;; | |
557 | rs6000) | |
558 | basic_machine=rs6000-ibm | |
559 | ;; | |
560 | vax) | |
561 | basic_machine=vax-dec | |
562 | ;; | |
378fd382 DZ |
563 | we32k) |
564 | basic_machine=we32k-att | |
565 | ;; | |
6559fbdb RP |
566 | sparc) |
567 | basic_machine=sparc-sun | |
568 | ;; | |
27a2a371 JW |
569 | cydra) |
570 | basic_machine=cydra-cydrome | |
571 | ;; | |
572 | orion) | |
573 | basic_machine=orion-highlevel | |
574 | ;; | |
575 | orion105) | |
576 | basic_machine=clipper-highlevel | |
577 | ;; | |
a2ee3e6d JW |
578 | *) |
579 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
4f183929 | 580 | exit 1 |
a2ee3e6d | 581 | ;; |
4f183929 RP |
582 | esac |
583 | ||
378fd382 DZ |
584 | # Here we canonicalize certain aliases for manufacturers. |
585 | case $basic_machine in | |
586 | *-digital*) | |
587 | basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` | |
588 | ;; | |
589 | *-commodore*) | |
590 | basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` | |
591 | ;; | |
592 | *) | |
593 | ;; | |
594 | esac | |
595 | ||
a2ee3e6d | 596 | # Decode manufacturer-specific aliases for certain operating systems. |
e6602723 | 597 | |
a2ee3e6d JW |
598 | if [ "$os" ] |
599 | then | |
600 | case $os in | |
6559fbdb RP |
601 | # -solaris* is a basic system type, with this one exception. |
602 | -solaris1 | -solaris1.*) | |
603 | os=`echo $os | sed -e 's|solaris1|sunos4|'` | |
604 | ;; | |
a2ee3e6d JW |
605 | # First accept the basic system types. |
606 | # The portable systems comes first. | |
607 | # Each alternative must end in a *, to match a version number. | |
378fd382 | 608 | -bsd* | -sysv* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ |
6559fbdb | 609 | | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]* | -hpux* \ |
378fd382 DZ |
610 | | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ |
611 | | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ | |
6559fbdb | 612 | | -nindy* | -vxworks* | -ebmon* | -hds* \ |
27a2a371 JW |
613 | | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ |
614 | | -go32 | -sim | -es1800* | -udi | -hms* | -xray \ | |
ba7f177a PB |
615 | | -os68k* | -none* | -v88r* | -aout | -coff | -elf | -bosx* \ |
616 | | -abug | -ecoff) | |
617 | # The last three lines above are CYGNUS LOCAL | |
2501643a | 618 | ;; |
25fa8f53 | 619 | # start-sanitize-v9 |
6559fbdb | 620 | -v7 | -old* | -aout* | -elf*) ;; # CYGNUS LOCAL |
25fa8f53 | 621 | # end-sanitize-v9 |
6559fbdb RP |
622 | -sunos5*) |
623 | os=`echo $os | sed -e 's|sunos5|solaris2|'` | |
624 | ;; | |
625 | -sunos6*) | |
626 | os=`echo $os | sed -e 's|sunos6|solaris3|'` | |
627 | ;; | |
a2ee3e6d | 628 | -osfrose*) |
378fd382 | 629 | os=-osfrose |
a2ee3e6d JW |
630 | ;; |
631 | -osf*) | |
378fd382 DZ |
632 | os=-osf |
633 | ;; | |
634 | -utek*) | |
a2ee3e6d JW |
635 | os=-bsd |
636 | ;; | |
637 | -dynix*) | |
638 | os=-bsd | |
639 | ;; | |
378fd382 DZ |
640 | -acis*) |
641 | os=-aos | |
a2ee3e6d | 642 | ;; |
378fd382 | 643 | -386bsd) # CYGNUS LOCAL |
23ab00aa KR |
644 | os=-bsd |
645 | ;; | |
68cd7865 | 646 | -ctix* | -uts*) |
a2ee3e6d JW |
647 | os=-sysv |
648 | ;; | |
378fd382 DZ |
649 | -triton*) |
650 | os=-sysv3 | |
651 | ;; | |
652 | -oss*) | |
653 | os=-sysv3 | |
654 | ;; | |
c1e296fc SG |
655 | -svr4) |
656 | os=-sysv4 | |
657 | ;; | |
658 | -svr3) | |
659 | os=-sysv3 | |
660 | ;; | |
378fd382 | 661 | -ose*) # CYGNUS LOCAL |
afba2b22 ILT |
662 | os=-ose |
663 | ;; | |
378fd382 | 664 | -es1800*) # CYGNUS LOCAL |
afba2b22 ILT |
665 | os=-ose |
666 | ;; | |
27a2a371 JW |
667 | -xenix) |
668 | os=-xenix | |
669 | ;; | |
378fd382 DZ |
670 | -none) |
671 | ;; | |
a2ee3e6d JW |
672 | *) |
673 | # Get rid of the `-' at the beginning of $os. | |
674 | os=`echo $1 | sed 's/[^-]*-//'` | |
675 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 | |
676 | exit 1 | |
677 | ;; | |
69e87de2 | 678 | esac |
a2ee3e6d | 679 | else |
69e87de2 | 680 | |
a2ee3e6d JW |
681 | # Here we handle the default operating systems that come with various machines. |
682 | # The value should be what the vendor currently ships out the door with their | |
683 | # machine or put another way, the most popular os provided with the machine. | |
27a2a371 JW |
684 | |
685 | # Note that if you're going to try to match "-MANUFACTURER" here (say, | |
686 | # "-sun"), then you have to tell the case statement up towards the top | |
687 | # that MANUFACTURER isn't an operating system. Otherwise, code above | |
688 | # will signal an error saying that MANUFACTURER isn't an operating | |
689 | # system, and we'll never get to this point. | |
690 | ||
a2ee3e6d JW |
691 | case $basic_machine in |
692 | *-dec | vax-*) | |
378fd382 | 693 | os=-ultrix4.2 |
a2ee3e6d JW |
694 | ;; |
695 | i386-sun) | |
378fd382 | 696 | os=-sunos4.0.2 |
a2ee3e6d JW |
697 | ;; |
698 | m68000-sun) | |
699 | os=-sunos3 | |
700 | # This also exists in the configure program, but was not the | |
701 | # default. | |
702 | # os=-sunos4 | |
703 | ;; | |
378fd382 DZ |
704 | *-tti) # must be before sparc entry or we get the wrong os. |
705 | os=-sysv3 | |
a2ee3e6d | 706 | ;; |
378fd382 DZ |
707 | sparc-* | *-sun) |
708 | os=-sunos4.1.1 | |
a2ee3e6d JW |
709 | ;; |
710 | *-ibm) | |
711 | os=-aix | |
712 | ;; | |
713 | *-hp) | |
714 | os=-hpux | |
715 | ;; | |
27a2a371 | 716 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
a2ee3e6d JW |
717 | os=-sysv |
718 | ;; | |
378fd382 DZ |
719 | *-cbm) |
720 | os=-amigados | |
721 | ;; | |
a2ee3e6d JW |
722 | *-dg) |
723 | os=-dgux | |
724 | ;; | |
378fd382 DZ |
725 | *-dolphin) |
726 | os=-sysv3 | |
727 | ;; | |
a2ee3e6d JW |
728 | m88k-omron*) |
729 | os=-luna | |
730 | ;; | |
a70c9959 KR |
731 | *-sequent) |
732 | os=-bsd | |
733 | ;; | |
a2ee3e6d JW |
734 | *-crds) |
735 | os=-unos | |
736 | ;; | |
737 | *-ns) | |
738 | os=-genix | |
739 | ;; | |
378fd382 DZ |
740 | i[34]86-*) |
741 | os=-sco3.2v2 | |
a2ee3e6d | 742 | ;; |
27a2a371 JW |
743 | *-gould) |
744 | os=-sysv | |
745 | ;; | |
746 | *-highlevel) | |
747 | os=-bsd | |
748 | ;; | |
749 | *-encore) | |
750 | os=-bsd | |
751 | ;; | |
752 | *-sgi) | |
753 | os=-irix | |
754 | ;; | |
755 | *-masscomp) | |
756 | os=-rtu | |
757 | ;; | |
a2ee3e6d JW |
758 | *) |
759 | os=-none | |
760 | ;; | |
69e87de2 | 761 | esac |
a2ee3e6d | 762 | fi |
69e87de2 | 763 | |
a2ee3e6d JW |
764 | # Here we handle the case where we know the os, and the CPU type, but not the |
765 | # manufacturer. We pick the logical manufacturer. | |
766 | vendor=unknown | |
767 | case $basic_machine in | |
768 | *-unknown) | |
769 | case $os in | |
770 | -sunos*) | |
771 | vendor=sun | |
772 | ;; | |
6559fbdb | 773 | -bosx*) # CYGNUS LOCAL |
ba7f177a PB |
774 | vendor=bull |
775 | ;; | |
a2ee3e6d JW |
776 | -aix*) |
777 | vendor=ibm | |
778 | ;; | |
779 | -hpux*) | |
780 | vendor=hp | |
781 | ;; | |
782 | -unos*) | |
783 | vendor=crds | |
784 | ;; | |
785 | -dgux*) | |
786 | vendor=dg | |
787 | ;; | |
788 | -luna*) | |
789 | vendor=omron | |
790 | ;; | |
791 | -genix*) | |
792 | vendor=ns | |
793 | ;; | |
378fd382 | 794 | -vxworks*) # CYGNUS LOCAL |
afba2b22 ILT |
795 | vendor=wrs |
796 | ;; | |
a2ee3e6d JW |
797 | esac |
798 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | |
799 | ;; | |
4f183929 RP |
800 | esac |
801 | ||
a2ee3e6d | 802 | echo $basic_machine$os |