Commit | Line | Data |
---|---|---|
fb955dfa | 1 | #!/bin/sh |
fc5546c7 | 2 | # Configuration validation subroutine script, version 1.1. |
d699cb47 | 3 | # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. |
955e036a RS |
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. | |
fb955dfa RS |
7 | |
8 | #This file is free software; you can redistribute it and/or modify | |
9 | #it under the terms of the GNU General Public License as published by | |
10 | #the Free Software Foundation; either version 2 of the License, or | |
11 | #(at your option) any later version. | |
12 | ||
13 | #This program is distributed in the hope that it will be useful, | |
14 | #but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | #GNU General Public License for more details. | |
17 | ||
18 | #You should have received a copy of the GNU General Public License | |
19 | #along with this program; if not, write to the Free Software | |
20 | #Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |
21 | ||
22 | ||
23 | # Configuration subroutine to validate and canonicalize a configuration type. | |
24 | # Supply the specified configuration type as an argument. | |
25 | # If it is invalid, we print an error message on stderr and exit with code 1. | |
26 | # Otherwise, we print the canonical config type on stdout and succeed. | |
27 | ||
28 | # This file is supposed to be the same for all GNU packages | |
29 | # and recognize all the CPU types, system types and aliases | |
30 | # that are meaningful with *any* GNU software. | |
31 | # Each package is responsible for reporting which valid configurations | |
32 | # it does not support. The user should be able to distinguish | |
33 | # a failure to support a valid configuration from a meaningless | |
34 | # configuration. | |
35 | ||
36 | # The goal of this file is to map all the various variations of a given | |
37 | # machine specification into a single specification in the form: | |
38 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM | |
efc3fd67 | 39 | # It is wrong to echo any other type of specification. |
fb955dfa RS |
40 | |
41 | # First pass through any local machine types. | |
42 | case $1 in | |
43 | *local*) | |
44 | echo $1 | |
45 | exit 0 | |
46 | ;; | |
47 | *) | |
48 | ;; | |
49 | esac | |
50 | ||
51 | # Separate what the user gave into CPU-COMPANY and OS (if any). | |
52 | basic_machine=`echo $1 | sed 's/-[^-]*$//'` | |
53 | if [ $basic_machine != $1 ] | |
54 | then os=`echo $1 | sed 's/.*-/-/'` | |
55 | else os=; fi | |
56 | ||
efc3fd67 JB |
57 | ### Let's recognize common machines as not being operating systems so |
58 | ### that things like config.sub decstation-3100 work. We also | |
59 | ### recognize some manufacturers as not being operating systems, so we | |
60 | ### can provide default operating systems below. | |
fb955dfa | 61 | case $os in |
1f532861 RS |
62 | -sun*os*) |
63 | # Prevent following clause from handling this invalid input. | |
64 | ;; | |
fb955dfa RS |
65 | -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ |
66 | -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ | |
a975e06d | 67 | -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ |
867c43c4 | 68 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ |
fb955dfa | 69 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ |
efc3fd67 | 70 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp ) |
fb955dfa RS |
71 | os= |
72 | basic_machine=$1 | |
73 | ;; | |
9e976cfa | 74 | -hiux*) |
d699cb47 | 75 | os=-hiuxwe2 |
9e976cfa | 76 | ;; |
d05b1883 RS |
77 | -sco4) |
78 | os=-sco3.2v4 | |
79 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` | |
80 | ;; | |
81 | -sco3.2.[4-9]*) | |
82 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
83 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` | |
84 | ;; | |
cf7a78db RS |
85 | -sco3.2v[4-9]*) |
86 | # Don't forget version if it is 3.2v4 or newer. | |
7617f113 | 87 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` |
cf7a78db | 88 | ;; |
fb955dfa | 89 | -sco*) |
f9f15513 | 90 | os=-sco3.2v2 |
7617f113 | 91 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` |
fb955dfa | 92 | ;; |
efc3fd67 JB |
93 | -isc) |
94 | os=-isc2.2 | |
7617f113 | 95 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` |
efc3fd67 | 96 | ;; |
de025efd RS |
97 | -clix*) |
98 | basic_machine=clipper-intergraph | |
99 | ;; | |
fb955dfa | 100 | -isc*) |
7617f113 | 101 | basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` |
fb955dfa | 102 | ;; |
4c934a4d JW |
103 | -lynx) |
104 | os=-lynxos | |
105 | ;; | |
b7f0280f RK |
106 | -ptx*) |
107 | basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` | |
108 | ;; | |
faa4bf12 RK |
109 | -windowsnt*) |
110 | os=`echo $os | sed -e 's/windowsnt/winnt/'` | |
111 | ;; | |
fb955dfa RS |
112 | esac |
113 | ||
114 | # Decode aliases for certain CPU-COMPANY combinations. | |
115 | case $basic_machine in | |
665eef22 | 116 | # Recognize the basic CPU types without company name. |
fb955dfa | 117 | # Some are omitted here because they have special meanings below. |
535cca31 | 118 | tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \ |
6ca8e64c | 119 | | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ |
7090d1e6 | 120 | | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ |
23890221 ILT |
121 | | powerpc | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ |
122 | | mips64el | mips64orion | mips64orionel ) | |
fb955dfa RS |
123 | basic_machine=$basic_machine-unknown |
124 | ;; | |
1f532861 RS |
125 | # Object if more than one company name word. |
126 | *-*-*) | |
127 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
128 | exit 1 | |
129 | ;; | |
665eef22 | 130 | # Recognize the basic CPU types with company name. |
535cca31 | 131 | vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \ |
fb955dfa RS |
132 | | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ |
133 | | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | |
134 | | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ | |
efc3fd67 | 135 | | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ |
d63887ad | 136 | | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ |
23890221 ILT |
137 | | sh-* | powerpc-* | sparc64-* | mips64-* | mipsel-* \ |
138 | | mips64el-* | mips64orion-* | mips64orionel-* ) | |
fb955dfa | 139 | ;; |
f8710542 DE |
140 | # Recognize the various machine names and aliases which stand |
141 | # for a CPU type and a company and sometimes even an OS. | |
e65767df RS |
142 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) |
143 | basic_machine=m68000-att | |
fb955dfa | 144 | ;; |
e65767df RS |
145 | 3b*) |
146 | basic_machine=we32k-att | |
fb955dfa | 147 | ;; |
e65767df RS |
148 | alliant | fx80) |
149 | basic_machine=fx80-alliant | |
f449890c | 150 | ;; |
e65767df RS |
151 | altos | altos3068) |
152 | basic_machine=m68k-altos | |
fb955dfa | 153 | ;; |
e65767df RS |
154 | am29k) |
155 | basic_machine=a29k-none | |
156 | os=-bsd | |
d019125e | 157 | ;; |
e65767df RS |
158 | amdahl) |
159 | basic_machine=580-amdahl | |
ad6023b3 RS |
160 | os=-sysv |
161 | ;; | |
275cb364 | 162 | amiga | amiga-*) |
e65767df | 163 | basic_machine=m68k-cbm |
096fbe81 | 164 | ;; |
e65767df RS |
165 | amigados) |
166 | basic_machine=m68k-cbm | |
167 | os=-amigados | |
fb955dfa | 168 | ;; |
e65767df RS |
169 | amigaunix | amix) |
170 | basic_machine=m68k-cbm | |
171 | os=-sysv4 | |
281f8b09 | 172 | ;; |
e65767df RS |
173 | apollo68) |
174 | basic_machine=m68k-apollo | |
175 | os=-sysv | |
176 | ;; | |
177 | balance) | |
178 | basic_machine=ns32k-sequent | |
179 | os=-dynix | |
fb955dfa RS |
180 | ;; |
181 | convex-c1) | |
182 | basic_machine=c1-convex | |
183 | os=-bsd | |
184 | ;; | |
185 | convex-c2) | |
186 | basic_machine=c2-convex | |
187 | os=-bsd | |
188 | ;; | |
189 | convex-c32) | |
190 | basic_machine=c32-convex | |
191 | os=-bsd | |
192 | ;; | |
193 | convex-c34) | |
194 | basic_machine=c34-convex | |
195 | os=-bsd | |
196 | ;; | |
197 | convex-c38) | |
198 | basic_machine=c38-convex | |
199 | os=-bsd | |
200 | ;; | |
e65767df RS |
201 | cray | ymp) |
202 | basic_machine=ymp-cray | |
203 | os=-unicos | |
fb955dfa | 204 | ;; |
e65767df RS |
205 | cray2) |
206 | basic_machine=cray2-cray | |
207 | os=-unicos | |
fb955dfa RS |
208 | ;; |
209 | crds | unos) | |
210 | basic_machine=m68k-crds | |
211 | ;; | |
275cb364 CH |
212 | da30 | da30-*) |
213 | basic_machine=m68k-da30 | |
214 | ;; | |
215 | decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) | |
e65767df | 216 | basic_machine=mips-dec |
51cbdde3 | 217 | ;; |
fb955dfa RS |
218 | delta | 3300 | motorola-3300 | motorola-delta \ |
219 | | 3300-motorola | delta-motorola) | |
220 | basic_machine=m68k-motorola | |
221 | ;; | |
e65767df RS |
222 | delta88) |
223 | basic_machine=m88k-motorola | |
224 | os=-sysv3 | |
fb955dfa | 225 | ;; |
253bce3d RK |
226 | dpx20 | dpx20-*) |
227 | basic_machine=rs6000-bull | |
228 | os=-bosx | |
229 | ;; | |
e65767df RS |
230 | dpx2* | dpx2*-bull) |
231 | basic_machine=m68k-bull | |
232 | os=-sysv3 | |
fb955dfa | 233 | ;; |
e65767df RS |
234 | ebmon29k) |
235 | basic_machine=a29k-amd | |
236 | os=-ebmon | |
fb955dfa | 237 | ;; |
e65767df RS |
238 | elxsi) |
239 | basic_machine=elxsi-elxsi | |
240 | os=-bsd | |
fb955dfa | 241 | ;; |
e65767df RS |
242 | encore | umax | mmax) |
243 | basic_machine=ns32k-encore | |
fb955dfa | 244 | ;; |
e65767df RS |
245 | fx2800) |
246 | basic_machine=i860-alliant | |
fb955dfa | 247 | ;; |
e65767df RS |
248 | genix) |
249 | basic_machine=ns32k-ns | |
fb955dfa | 250 | ;; |
e65767df RS |
251 | gmicro) |
252 | basic_machine=tron-gmicro | |
253 | os=-sysv | |
fb955dfa | 254 | ;; |
e65767df RS |
255 | h3050r* | hiux*) |
256 | basic_machine=hppa1.1-hitachi | |
257 | os=-hiuxwe2 | |
fb955dfa | 258 | ;; |
e65767df RS |
259 | h8300hms) |
260 | basic_machine=h8300-hitachi | |
261 | os=-hms | |
fb955dfa | 262 | ;; |
e65767df RS |
263 | harris) |
264 | basic_machine=m88k-harris | |
265 | os=-sysv3 | |
3c9da312 | 266 | ;; |
275cb364 CH |
267 | hp300-*) |
268 | basic_machine=m68k-hp | |
269 | ;; | |
e65767df RS |
270 | hp300bsd) |
271 | basic_machine=m68k-hp | |
6e280b45 | 272 | os=-bsd |
fb955dfa | 273 | ;; |
e65767df RS |
274 | hp300hpux) |
275 | basic_machine=m68k-hp | |
276 | os=-hpux | |
efc3fd67 | 277 | ;; |
e65767df RS |
278 | hp9k2[0-9][0-9] | hp9k31[0-9]) |
279 | basic_machine=m68000-hp | |
efc3fd67 | 280 | ;; |
fb955dfa RS |
281 | hp9k3[2-9][0-9]) |
282 | basic_machine=m68k-hp | |
283 | ;; | |
3c701376 TG |
284 | hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) |
285 | basic_machine=hppa1.1-hp | |
fb955dfa | 286 | ;; |
3c701376 TG |
287 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) |
288 | basic_machine=hppa1.0-hp | |
d019125e | 289 | ;; |
e65767df RS |
290 | i370-ibm* | ibm*) |
291 | basic_machine=i370-ibm | |
292 | os=-mvs | |
9e976cfa | 293 | ;; |
e65767df | 294 | # I'm not sure what "Sysv32" means. Should this be sysv3.2? |
535cca31 | 295 | i[345]86v32) |
e65767df RS |
296 | basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` |
297 | os=-sysv32 | |
298 | ;; | |
535cca31 | 299 | i[345]86v4*) |
e65767df RS |
300 | basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` |
301 | os=-sysv4 | |
302 | ;; | |
535cca31 | 303 | i[345]86v) |
e65767df RS |
304 | basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` |
305 | os=-sysv | |
306 | ;; | |
535cca31 | 307 | i[345]86sol2) |
e65767df RS |
308 | basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` |
309 | os=-solaris2 | |
310 | ;; | |
311 | iris | iris4d) | |
312 | basic_machine=mips-sgi | |
313 | case $os in | |
314 | -irix*) | |
315 | ;; | |
316 | *) | |
317 | os=-irix4 | |
318 | ;; | |
319 | esac | |
9e976cfa | 320 | ;; |
fb955dfa RS |
321 | isi68 | isi) |
322 | basic_machine=m68k-isi | |
323 | os=-sysv | |
324 | ;; | |
e65767df RS |
325 | m88k-omron*) |
326 | basic_machine=m88k-omron | |
327 | ;; | |
328 | magnum | m3230) | |
329 | basic_machine=mips-mips | |
fb955dfa RS |
330 | os=-sysv |
331 | ;; | |
e65767df RS |
332 | merlin) |
333 | basic_machine=ns32k-utek | |
334 | os=-sysv | |
fb955dfa RS |
335 | ;; |
336 | miniframe) | |
337 | basic_machine=m68000-convergent | |
338 | ;; | |
23890221 ILT |
339 | mips3*-*) |
340 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` | |
341 | ;; | |
342 | mips3*) | |
343 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown | |
344 | ;; | |
e65767df RS |
345 | ncr3000) |
346 | basic_machine=i486-ncr | |
347 | os=-sysv4 | |
348 | ;; | |
349 | news | news700 | news800 | news900) | |
350 | basic_machine=m68k-sony | |
351 | os=-newsos | |
352 | ;; | |
353 | news1000) | |
354 | basic_machine=m68030-sony | |
355 | os=-newsos | |
fb955dfa RS |
356 | ;; |
357 | news-3600 | risc-news) | |
358 | basic_machine=mips-sony | |
359 | os=-newsos | |
360 | ;; | |
a975e06d | 361 | next | m*-next ) |
e65767df | 362 | basic_machine=m68k-next |
2ff52571 | 363 | case $os in |
a975e06d PB |
364 | -nextstep* ) |
365 | ;; | |
2ff52571 | 366 | -ns2*) |
a975e06d | 367 | os=-nextstep2 |
2ff52571 RK |
368 | ;; |
369 | *) | |
a975e06d | 370 | os=-nextstep3 |
2ff52571 RK |
371 | ;; |
372 | esac | |
fb955dfa | 373 | ;; |
e65767df RS |
374 | nh3000) |
375 | basic_machine=m68k-harris | |
376 | os=-cxux | |
fb955dfa | 377 | ;; |
e65767df RS |
378 | nh[45]000) |
379 | basic_machine=m88k-harris | |
380 | os=-cxux | |
fb955dfa | 381 | ;; |
e65767df RS |
382 | nindy960) |
383 | basic_machine=i960-intel | |
384 | os=-nindy | |
fb955dfa | 385 | ;; |
e65767df RS |
386 | np1) |
387 | basic_machine=np1-gould | |
fb955dfa | 388 | ;; |
e65767df RS |
389 | pa-hitachi) |
390 | basic_machine=hppa1.1-hitachi | |
391 | os=-hiuxwe2 | |
fb955dfa | 392 | ;; |
e65767df RS |
393 | paragon) |
394 | basic_machine=i860-intel | |
395 | os=-osf | |
fb955dfa | 396 | ;; |
e65767df RS |
397 | pbd) |
398 | basic_machine=sparc-tti | |
fb955dfa | 399 | ;; |
e65767df RS |
400 | pbb) |
401 | basic_machine=m68k-tti | |
fb955dfa | 402 | ;; |
d73a2260 CH |
403 | pc532 | pc532-*) |
404 | basic_machine=ns32k-pc532 | |
fb955dfa | 405 | ;; |
1ee245eb RS |
406 | pentium-*) |
407 | # We will change tis to say i586 once there has been | |
408 | # time for various packages to start to recognize that. | |
409 | basic_machine=i486-`echo $basic_machine | sed 's/^[^-]*-//'` | |
410 | ;; | |
e65767df RS |
411 | pn) |
412 | basic_machine=pn-gould | |
413 | ;; | |
414 | ps2) | |
415 | basic_machine=i386-ibm | |
416 | ;; | |
417 | rtpc | rtpc-*) | |
418 | basic_machine=romp-ibm | |
419 | ;; | |
b7f0280f RK |
420 | sequent) |
421 | basic_machine=i386-sequent | |
422 | ;; | |
e65767df RS |
423 | sh) |
424 | basic_machine=sh-hitachi | |
425 | os=-hms | |
ac1e607f JB |
426 | ;; |
427 | sps7) | |
428 | basic_machine=m68k-bull | |
429 | os=-sysv2 | |
fb955dfa | 430 | ;; |
e65767df RS |
431 | spur) |
432 | basic_machine=spur-unknown | |
fb955dfa | 433 | ;; |
e65767df RS |
434 | sun2) |
435 | basic_machine=m68000-sun | |
d63887ad | 436 | ;; |
e65767df RS |
437 | sun2os3) |
438 | basic_machine=m68000-sun | |
439 | os=-sunos3 | |
fb955dfa | 440 | ;; |
e65767df RS |
441 | sun2os4) |
442 | basic_machine=m68000-sun | |
443 | os=-sunos4 | |
fb955dfa | 444 | ;; |
e65767df RS |
445 | sun3os3) |
446 | basic_machine=m68k-sun | |
447 | os=-sunos3 | |
fb955dfa | 448 | ;; |
e65767df RS |
449 | sun3os4) |
450 | basic_machine=m68k-sun | |
451 | os=-sunos4 | |
fb955dfa | 452 | ;; |
e65767df RS |
453 | sun4os3) |
454 | basic_machine=sparc-sun | |
455 | os=-sunos3 | |
fb955dfa | 456 | ;; |
e65767df RS |
457 | sun4os4) |
458 | basic_machine=sparc-sun | |
459 | os=-sunos4 | |
fb955dfa | 460 | ;; |
275cb364 | 461 | sun3 | sun3-*) |
e65767df | 462 | basic_machine=m68k-sun |
fb955dfa | 463 | ;; |
e65767df RS |
464 | sun4) |
465 | basic_machine=sparc-sun | |
fb955dfa | 466 | ;; |
e65767df RS |
467 | sun386 | sun386i | roadrunner) |
468 | basic_machine=i386-sun | |
fb955dfa | 469 | ;; |
e65767df RS |
470 | symmetry) |
471 | basic_machine=i386-sequent | |
472 | os=-dynix | |
fb955dfa | 473 | ;; |
e65767df RS |
474 | tower | tower-32) |
475 | basic_machine=m68k-ncr | |
fb955dfa RS |
476 | ;; |
477 | ultra3) | |
478 | basic_machine=a29k-nyu | |
479 | os=-sym1 | |
480 | ;; | |
e65767df RS |
481 | vaxv) |
482 | basic_machine=vax-dec | |
483 | os=-sysv | |
484 | ;; | |
485 | vms) | |
486 | basic_machine=vax-dec | |
487 | os=-vms | |
488 | ;; | |
fb955dfa RS |
489 | vxworks960) |
490 | basic_machine=i960-wrs | |
491 | os=-vxworks | |
492 | ;; | |
493 | vxworks68) | |
494 | basic_machine=m68k-wrs | |
495 | os=-vxworks | |
496 | ;; | |
e65767df RS |
497 | xmp) |
498 | basic_machine=xmp-cray | |
499 | os=-unicos | |
500 | ;; | |
efc3fd67 JB |
501 | xps | xps100) |
502 | basic_machine=xps100-honeywell | |
503 | ;; | |
fb955dfa RS |
504 | none) |
505 | basic_machine=none-none | |
506 | os=-none | |
507 | ;; | |
508 | ||
509 | # Here we handle the default manufacturer of certain CPU types. It is in | |
510 | # some cases the only manufacturer, in others, it is the most popular. | |
511 | mips) | |
512 | basic_machine=mips-mips | |
513 | ;; | |
514 | romp) | |
515 | basic_machine=romp-ibm | |
516 | ;; | |
517 | rs6000) | |
518 | basic_machine=rs6000-ibm | |
519 | ;; | |
520 | vax) | |
521 | basic_machine=vax-dec | |
522 | ;; | |
3c9da312 RS |
523 | we32k) |
524 | basic_machine=we32k-att | |
525 | ;; | |
fb955dfa RS |
526 | sparc) |
527 | basic_machine=sparc-sun | |
528 | ;; | |
efc3fd67 JB |
529 | cydra) |
530 | basic_machine=cydra-cydrome | |
531 | ;; | |
532 | orion) | |
533 | basic_machine=orion-highlevel | |
534 | ;; | |
535 | orion105) | |
536 | basic_machine=clipper-highlevel | |
537 | ;; | |
fb955dfa RS |
538 | *) |
539 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
540 | exit 1 | |
541 | ;; | |
542 | esac | |
543 | ||
544 | # Here we canonicalize certain aliases for manufacturers. | |
545 | case $basic_machine in | |
546 | *-digital*) | |
547 | basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` | |
548 | ;; | |
549 | *-commodore*) | |
550 | basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` | |
551 | ;; | |
552 | *) | |
553 | ;; | |
554 | esac | |
555 | ||
556 | # Decode manufacturer-specific aliases for certain operating systems. | |
557 | ||
51b3c82f | 558 | if [ x"$os" != x"" ] |
fb955dfa RS |
559 | then |
560 | case $os in | |
ca8efa98 RS |
561 | # -solaris* is a basic system type, with this one exception. |
562 | -solaris1 | -solaris1.*) | |
563 | os=`echo $os | sed -e 's|solaris1|sunos4|'` | |
564 | ;; | |
f920529b DE |
565 | -solaris) |
566 | os=-solaris2 | |
567 | ;; | |
412239cc RS |
568 | -gnu/linux*) |
569 | os=`echo $os | sed -e 's|gnu/linux|linux|'` | |
570 | ;; | |
fb955dfa RS |
571 | # First accept the basic system types. |
572 | # The portable systems comes first. | |
573 | # Each alternative must end in a *, to match a version number. | |
74da8749 | 574 | # -sysv* is not here because it comes later, after sysvr4. |
c2efa566 | 575 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ |
535cca31 | 576 | | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \ |
bacafaf1 | 577 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ |
3c701376 | 578 | | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ |
a5d117a3 | 579 | | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ |
49ee70e2 | 580 | | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ |
253bce3d | 581 | | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \ |
b7f0280f | 582 | | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ |
faa4bf12 | 583 | | -ptx* | -coff* | -winnt*) |
fb955dfa | 584 | ;; |
ca8efa98 RS |
585 | -sunos5*) |
586 | os=`echo $os | sed -e 's|sunos5|solaris2|'` | |
587 | ;; | |
588 | -sunos6*) | |
589 | os=`echo $os | sed -e 's|sunos6|solaris3|'` | |
590 | ;; | |
fb955dfa | 591 | -osfrose*) |
6d95ff37 | 592 | os=-osfrose |
fb955dfa RS |
593 | ;; |
594 | -osf*) | |
6d95ff37 | 595 | os=-osf |
fb955dfa | 596 | ;; |
24616137 CH |
597 | -utek*) |
598 | os=-bsd | |
599 | ;; | |
fb955dfa RS |
600 | -dynix*) |
601 | os=-bsd | |
602 | ;; | |
603 | -acis*) | |
604 | os=-aos | |
605 | ;; | |
606 | -ctix* | -uts*) | |
607 | os=-sysv | |
608 | ;; | |
609 | -triton*) | |
610 | os=-sysv3 | |
611 | ;; | |
612 | -oss*) | |
613 | os=-sysv3 | |
614 | ;; | |
615 | -svr4) | |
616 | os=-sysv4 | |
617 | ;; | |
74da8749 RS |
618 | -svr3) |
619 | os=-sysv3 | |
620 | ;; | |
e294d0c3 RS |
621 | -sysvr4) |
622 | os=-sysv4 | |
623 | ;; | |
74da8749 RS |
624 | # This must come after -sysvr4. |
625 | -sysv*) | |
fb955dfa | 626 | ;; |
c809458b JB |
627 | -xenix) |
628 | os=-xenix | |
629 | ;; | |
955e036a RS |
630 | -none) |
631 | ;; | |
fb955dfa RS |
632 | *) |
633 | # Get rid of the `-' at the beginning of $os. | |
9f5aed1b | 634 | os=`echo $os | sed 's/[^-]*-//'` |
fb955dfa RS |
635 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 |
636 | exit 1 | |
637 | ;; | |
638 | esac | |
639 | else | |
640 | ||
641 | # Here we handle the default operating systems that come with various machines. | |
642 | # The value should be what the vendor currently ships out the door with their | |
643 | # machine or put another way, the most popular os provided with the machine. | |
efc3fd67 JB |
644 | |
645 | # Note that if you're going to try to match "-MANUFACTURER" here (say, | |
646 | # "-sun"), then you have to tell the case statement up towards the top | |
647 | # that MANUFACTURER isn't an operating system. Otherwise, code above | |
648 | # will signal an error saying that MANUFACTURER isn't an operating | |
649 | # system, and we'll never get to this point. | |
650 | ||
fb955dfa | 651 | case $basic_machine in |
77ba1f30 ESB |
652 | *-acorn) |
653 | os=-riscix1.2 | |
654 | ;; | |
fb955dfa | 655 | *-dec | vax-*) |
60597872 | 656 | os=-ultrix4.2 |
fb955dfa RS |
657 | ;; |
658 | i386-sun) | |
60597872 | 659 | os=-sunos4.0.2 |
fb955dfa RS |
660 | ;; |
661 | m68000-sun) | |
662 | os=-sunos3 | |
663 | # This also exists in the configure program, but was not the | |
664 | # default. | |
665 | # os=-sunos4 | |
666 | ;; | |
667 | *-tti) # must be before sparc entry or we get the wrong os. | |
668 | os=-sysv3 | |
669 | ;; | |
670 | sparc-* | *-sun) | |
60597872 | 671 | os=-sunos4.1.1 |
fb955dfa RS |
672 | ;; |
673 | *-ibm) | |
674 | os=-aix | |
675 | ;; | |
676 | *-hp) | |
677 | os=-hpux | |
678 | ;; | |
9e976cfa RK |
679 | *-hitachi) |
680 | os=-hiux | |
681 | ;; | |
efc3fd67 | 682 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
fb955dfa RS |
683 | os=-sysv |
684 | ;; | |
685 | *-cbm) | |
686 | os=-amigados | |
687 | ;; | |
688 | *-dg) | |
689 | os=-dgux | |
690 | ;; | |
691 | *-dolphin) | |
692 | os=-sysv3 | |
693 | ;; | |
1ee245eb RS |
694 | m68k-ccur) |
695 | os=-rtu | |
696 | ;; | |
fb955dfa RS |
697 | m88k-omron*) |
698 | os=-luna | |
699 | ;; | |
9ac65684 | 700 | *-sequent) |
b7f0280f | 701 | os=-ptx |
9ac65684 | 702 | ;; |
fb955dfa RS |
703 | *-crds) |
704 | os=-unos | |
705 | ;; | |
706 | *-ns) | |
707 | os=-genix | |
708 | ;; | |
f449890c RS |
709 | i370-*) |
710 | os=-mvs | |
711 | ;; | |
88013905 | 712 | *-next) |
a975e06d | 713 | os=-nextstep3 |
88013905 | 714 | ;; |
efc3fd67 JB |
715 | *-gould) |
716 | os=-sysv | |
717 | ;; | |
718 | *-highlevel) | |
719 | os=-bsd | |
720 | ;; | |
721 | *-encore) | |
722 | os=-bsd | |
723 | ;; | |
724 | *-sgi) | |
725 | os=-irix | |
726 | ;; | |
727 | *-masscomp) | |
728 | os=-rtu | |
729 | ;; | |
fb955dfa RS |
730 | *) |
731 | os=-none | |
732 | ;; | |
733 | esac | |
734 | fi | |
735 | ||
736 | # Here we handle the case where we know the os, and the CPU type, but not the | |
737 | # manufacturer. We pick the logical manufacturer. | |
738 | vendor=unknown | |
739 | case $basic_machine in | |
740 | *-unknown) | |
741 | case $os in | |
77ba1f30 ESB |
742 | -riscix*) |
743 | vendor=acorn | |
744 | ;; | |
fb955dfa RS |
745 | -sunos*) |
746 | vendor=sun | |
747 | ;; | |
4c934a4d JW |
748 | -lynxos*) |
749 | vendor=lynx | |
750 | ;; | |
fb955dfa RS |
751 | -aix*) |
752 | vendor=ibm | |
753 | ;; | |
754 | -hpux*) | |
755 | vendor=hp | |
756 | ;; | |
9e976cfa RK |
757 | -hiux*) |
758 | vendor=hitachi | |
759 | ;; | |
fb955dfa RS |
760 | -unos*) |
761 | vendor=crds | |
762 | ;; | |
763 | -dgux*) | |
764 | vendor=dg | |
765 | ;; | |
766 | -luna*) | |
767 | vendor=omron | |
768 | ;; | |
769 | -genix*) | |
770 | vendor=ns | |
771 | ;; | |
f449890c RS |
772 | -mvs*) |
773 | vendor=ibm | |
774 | ;; | |
b7f0280f RK |
775 | -ptx*) |
776 | vendor=sequent | |
777 | ;; | |
fb955dfa RS |
778 | esac |
779 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | |
780 | ;; | |
781 | esac | |
782 | ||
783 | echo $basic_machine$os |