]>
Commit | Line | Data |
---|---|---|
1733f60d | 1 | #! /bin/sh |
94539b2a | 2 | # Configuration validation subroutine script. |
d91b4743 | 3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
32560f07 | 4 | # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
1733f60d | 5 | |
32560f07 | 6 | timestamp='2005-05-12' |
1733f60d | 7 | |
8 | # This file is (in principle) common to ALL GNU software. | |
9 | # The presence of a machine in this file suggests that SOME GNU software | |
10 | # can handle that machine. It does not imply ALL GNU software can. | |
11 | # | |
12 | # This file is free software; you can redistribute it and/or modify | |
13 | # it under the terms of the GNU General Public License as published by | |
14 | # the Free Software Foundation; either version 2 of the License, or | |
15 | # (at your option) any later version. | |
16 | # | |
17 | # This program is distributed in the hope that it will be useful, | |
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | # GNU General Public License for more details. | |
21 | # | |
22 | # You should have received a copy of the GNU General Public License | |
23 | # along with this program; if not, write to the Free Software | |
32560f07 | 24 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA |
25 | # 02110-1301, USA. | |
26 | # | |
1733f60d | 27 | # As a special exception to the GNU General Public License, if you |
28 | # distribute this file as part of a program that contains a | |
29 | # configuration script generated by Autoconf, you may include it under | |
30 | # the same distribution terms that you use for the rest of that program. | |
31 | ||
32560f07 | 32 | |
d91b4743 | 33 | # Please send patches to <config-patches@gnu.org>. Submit a context |
34 | # diff and a properly formatted ChangeLog entry. | |
1733f60d | 35 | # |
36 | # Configuration subroutine to validate and canonicalize a configuration type. | |
37 | # Supply the specified configuration type as an argument. | |
38 | # If it is invalid, we print an error message on stderr and exit with code 1. | |
39 | # Otherwise, we print the canonical config type on stdout and succeed. | |
40 | ||
41 | # This file is supposed to be the same for all GNU packages | |
42 | # and recognize all the CPU types, system types and aliases | |
43 | # that are meaningful with *any* GNU software. | |
44 | # Each package is responsible for reporting which valid configurations | |
45 | # it does not support. The user should be able to distinguish | |
46 | # a failure to support a valid configuration from a meaningless | |
47 | # configuration. | |
48 | ||
49 | # The goal of this file is to map all the various variations of a given | |
50 | # machine specification into a single specification in the form: | |
51 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM | |
52 | # or in some cases, the newer four-part form: | |
53 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM | |
54 | # It is wrong to echo any other type of specification. | |
55 | ||
56 | me=`echo "$0" | sed -e 's,.*/,,'` | |
57 | ||
58 | usage="\ | |
59 | Usage: $0 [OPTION] CPU-MFR-OPSYS | |
60 | $0 [OPTION] ALIAS | |
61 | ||
62 | Canonicalize a configuration name. | |
63 | ||
64 | Operation modes: | |
94539b2a | 65 | -h, --help print this help, then exit |
66 | -t, --time-stamp print date of last modification, then exit | |
67 | -v, --version print version number, then exit | |
68 | ||
69 | Report bugs and patches to <config-patches@gnu.org>." | |
70 | ||
71 | version="\ | |
72 | GNU config.sub ($timestamp) | |
73 | ||
32560f07 | 74 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
94539b2a | 75 | Free Software Foundation, Inc. |
76 | ||
77 | This is free software; see the source for copying conditions. There is NO | |
78 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | |
1733f60d | 79 | |
80 | help=" | |
81 | Try \`$me --help' for more information." | |
82 | ||
83 | # Parse command line | |
84 | while test $# -gt 0 ; do | |
94539b2a | 85 | case $1 in |
86 | --time-stamp | --time* | -t ) | |
32560f07 | 87 | echo "$timestamp" ; exit ;; |
94539b2a | 88 | --version | -v ) |
32560f07 | 89 | echo "$version" ; exit ;; |
1733f60d | 90 | --help | --h* | -h ) |
32560f07 | 91 | echo "$usage"; exit ;; |
1733f60d | 92 | -- ) # Stop option processing |
93 | shift; break ;; | |
94 | - ) # Use stdin as input. | |
95 | break ;; | |
96 | -* ) | |
94539b2a | 97 | echo "$me: invalid option $1$help" |
1733f60d | 98 | exit 1 ;; |
99 | ||
100 | *local*) | |
101 | # First pass through any local machine types. | |
102 | echo $1 | |
32560f07 | 103 | exit ;; |
1733f60d | 104 | |
105 | * ) | |
106 | break ;; | |
107 | esac | |
108 | done | |
109 | ||
110 | case $# in | |
111 | 0) echo "$me: missing argument$help" >&2 | |
112 | exit 1;; | |
113 | 1) ;; | |
114 | *) echo "$me: too many arguments$help" >&2 | |
115 | exit 1;; | |
116 | esac | |
117 | ||
118 | # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). | |
119 | # Here we must recognize all the valid KERNEL-OS combinations. | |
120 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | |
121 | case $maybe_os in | |
32560f07 | 122 | nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ |
123 | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) | |
1733f60d | 124 | os=-$maybe_os |
125 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | |
126 | ;; | |
127 | *) | |
128 | basic_machine=`echo $1 | sed 's/-[^-]*$//'` | |
129 | if [ $basic_machine != $1 ] | |
130 | then os=`echo $1 | sed 's/.*-/-/'` | |
131 | else os=; fi | |
132 | ;; | |
133 | esac | |
134 | ||
135 | ### Let's recognize common machines as not being operating systems so | |
136 | ### that things like config.sub decstation-3100 work. We also | |
137 | ### recognize some manufacturers as not being operating systems, so we | |
138 | ### can provide default operating systems below. | |
139 | case $os in | |
140 | -sun*os*) | |
141 | # Prevent following clause from handling this invalid input. | |
142 | ;; | |
143 | -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ | |
144 | -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ | |
145 | -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ | |
146 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ | |
147 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | |
148 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ | |
32560f07 | 149 | -apple | -axis | -knuth | -cray) |
1733f60d | 150 | os= |
151 | basic_machine=$1 | |
152 | ;; | |
153 | -sim | -cisco | -oki | -wec | -winbond) | |
154 | os= | |
155 | basic_machine=$1 | |
156 | ;; | |
157 | -scout) | |
158 | ;; | |
159 | -wrs) | |
160 | os=-vxworks | |
161 | basic_machine=$1 | |
162 | ;; | |
d91b4743 | 163 | -chorusos*) |
164 | os=-chorusos | |
165 | basic_machine=$1 | |
166 | ;; | |
e7df6a14 | 167 | -chorusrdb) |
168 | os=-chorusrdb | |
d91b4743 | 169 | basic_machine=$1 |
e7df6a14 | 170 | ;; |
1733f60d | 171 | -hiux*) |
172 | os=-hiuxwe2 | |
173 | ;; | |
174 | -sco5) | |
175 | os=-sco3.2v5 | |
176 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
177 | ;; | |
178 | -sco4) | |
179 | os=-sco3.2v4 | |
180 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
181 | ;; | |
182 | -sco3.2.[4-9]*) | |
183 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
184 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
185 | ;; | |
186 | -sco3.2v[4-9]*) | |
187 | # Don't forget version if it is 3.2v4 or newer. | |
188 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
189 | ;; | |
190 | -sco*) | |
191 | os=-sco3.2v2 | |
192 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
193 | ;; | |
194 | -udk*) | |
195 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
196 | ;; | |
197 | -isc) | |
198 | os=-isc2.2 | |
199 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
200 | ;; | |
201 | -clix*) | |
202 | basic_machine=clipper-intergraph | |
203 | ;; | |
204 | -isc*) | |
205 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
206 | ;; | |
207 | -lynx*) | |
208 | os=-lynxos | |
209 | ;; | |
210 | -ptx*) | |
211 | basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` | |
212 | ;; | |
213 | -windowsnt*) | |
214 | os=`echo $os | sed -e 's/windowsnt/winnt/'` | |
215 | ;; | |
216 | -psos*) | |
217 | os=-psos | |
218 | ;; | |
219 | -mint | -mint[0-9]*) | |
220 | basic_machine=m68k-atari | |
221 | os=-mint | |
222 | ;; | |
223 | esac | |
224 | ||
225 | # Decode aliases for certain CPU-COMPANY combinations. | |
226 | case $basic_machine in | |
227 | # Recognize the basic CPU types without company name. | |
228 | # Some are omitted here because they have special meanings below. | |
d91b4743 | 229 | 1750a | 580 \ |
230 | | a29k \ | |
231 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | |
232 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | |
e7df6a14 | 233 | | am33_2.0 \ |
d91b4743 | 234 | | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ |
32560f07 | 235 | | bfin \ |
d91b4743 | 236 | | c4x | clipper \ |
237 | | d10v | d30v | dlx | dsp16xx \ | |
238 | | fr30 | frv \ | |
239 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
240 | | i370 | i860 | i960 | ia64 \ | |
e7df6a14 | 241 | | ip2k | iq2000 \ |
32560f07 | 242 | | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ |
d91b4743 | 243 | | mips | mipsbe | mipseb | mipsel | mipsle \ |
244 | | mips16 \ | |
245 | | mips64 | mips64el \ | |
e7df6a14 | 246 | | mips64vr | mips64vrel \ |
d91b4743 | 247 | | mips64orion | mips64orionel \ |
248 | | mips64vr4100 | mips64vr4100el \ | |
249 | | mips64vr4300 | mips64vr4300el \ | |
250 | | mips64vr5000 | mips64vr5000el \ | |
251 | | mipsisa32 | mipsisa32el \ | |
e7df6a14 | 252 | | mipsisa32r2 | mipsisa32r2el \ |
d91b4743 | 253 | | mipsisa64 | mipsisa64el \ |
e7df6a14 | 254 | | mipsisa64r2 | mipsisa64r2el \ |
d91b4743 | 255 | | mipsisa64sb1 | mipsisa64sb1el \ |
e7df6a14 | 256 | | mipsisa64sr71k | mipsisa64sr71kel \ |
d91b4743 | 257 | | mipstx39 | mipstx39el \ |
258 | | mn10200 | mn10300 \ | |
e7df6a14 | 259 | | msp430 \ |
d91b4743 | 260 | | ns16k | ns32k \ |
261 | | openrisc | or32 \ | |
262 | | pdp10 | pdp11 | pj | pjl \ | |
263 | | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | |
264 | | pyramid \ | |
e7df6a14 | 265 | | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ |
d91b4743 | 266 | | sh64 | sh64le \ |
32560f07 | 267 | | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ |
268 | | sparcv8 | sparcv9 | sparcv9b \ | |
d91b4743 | 269 | | strongarm \ |
e7df6a14 | 270 | | tahoe | thumb | tic4x | tic80 | tron \ |
d91b4743 | 271 | | v850 | v850e \ |
272 | | we32k \ | |
32560f07 | 273 | | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ |
d91b4743 | 274 | | z8k) |
1733f60d | 275 | basic_machine=$basic_machine-unknown |
276 | ;; | |
94539b2a | 277 | m6811 | m68hc11 | m6812 | m68hc12) |
278 | # Motorola 68HC11/12. | |
279 | basic_machine=$basic_machine-unknown | |
280 | os=-none | |
281 | ;; | |
d91b4743 | 282 | m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) |
1733f60d | 283 | ;; |
284 | ||
285 | # We use `pc' rather than `unknown' | |
286 | # because (1) that's what they normally are, and | |
287 | # (2) the word "unknown" tends to confuse beginning users. | |
94539b2a | 288 | i*86 | x86_64) |
1733f60d | 289 | basic_machine=$basic_machine-pc |
290 | ;; | |
291 | # Object if more than one company name word. | |
292 | *-*-*) | |
293 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
294 | exit 1 | |
295 | ;; | |
296 | # Recognize the basic CPU types with company name. | |
d91b4743 | 297 | 580-* \ |
298 | | a29k-* \ | |
299 | | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | |
300 | | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | |
301 | | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | |
302 | | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | |
303 | | avr-* \ | |
32560f07 | 304 | | bfin-* | bs2000-* \ |
e7df6a14 | 305 | | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ |
32560f07 | 306 | | clipper-* | craynv-* | cydra-* \ |
d91b4743 | 307 | | d10v-* | d30v-* | dlx-* \ |
308 | | elxsi-* \ | |
309 | | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | |
310 | | h8300-* | h8500-* \ | |
311 | | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | |
312 | | i*86-* | i860-* | i960-* | ia64-* \ | |
e7df6a14 | 313 | | ip2k-* | iq2000-* \ |
32560f07 | 314 | | m32r-* | m32rle-* \ |
d91b4743 | 315 | | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ |
32560f07 | 316 | | m88110-* | m88k-* | maxq-* | mcore-* \ |
d91b4743 | 317 | | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ |
318 | | mips16-* \ | |
319 | | mips64-* | mips64el-* \ | |
e7df6a14 | 320 | | mips64vr-* | mips64vrel-* \ |
d91b4743 | 321 | | mips64orion-* | mips64orionel-* \ |
322 | | mips64vr4100-* | mips64vr4100el-* \ | |
323 | | mips64vr4300-* | mips64vr4300el-* \ | |
324 | | mips64vr5000-* | mips64vr5000el-* \ | |
325 | | mipsisa32-* | mipsisa32el-* \ | |
e7df6a14 | 326 | | mipsisa32r2-* | mipsisa32r2el-* \ |
d91b4743 | 327 | | mipsisa64-* | mipsisa64el-* \ |
e7df6a14 | 328 | | mipsisa64r2-* | mipsisa64r2el-* \ |
d91b4743 | 329 | | mipsisa64sb1-* | mipsisa64sb1el-* \ |
e7df6a14 | 330 | | mipsisa64sr71k-* | mipsisa64sr71kel-* \ |
331 | | mipstx39-* | mipstx39el-* \ | |
32560f07 | 332 | | mmix-* \ |
e7df6a14 | 333 | | msp430-* \ |
32560f07 | 334 | | none-* | np1-* | ns16k-* | ns32k-* \ |
d91b4743 | 335 | | orion-* \ |
336 | | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | |
337 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | |
338 | | pyramid-* \ | |
339 | | romp-* | rs6000-* \ | |
e7df6a14 | 340 | | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ |
d91b4743 | 341 | | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ |
32560f07 | 342 | | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ |
343 | | sparclite-* \ | |
344 | | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | |
e7df6a14 | 345 | | tahoe-* | thumb-* \ |
346 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | |
347 | | tron-* \ | |
d91b4743 | 348 | | v850-* | v850e-* | vax-* \ |
349 | | we32k-* \ | |
32560f07 | 350 | | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ |
351 | | xstormy16-* | xtensa-* \ | |
d91b4743 | 352 | | ymp-* \ |
353 | | z8k-*) | |
1733f60d | 354 | ;; |
355 | # Recognize the various machine names and aliases which stand | |
356 | # for a CPU type and a company and sometimes even an OS. | |
357 | 386bsd) | |
358 | basic_machine=i386-unknown | |
359 | os=-bsd | |
360 | ;; | |
361 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) | |
362 | basic_machine=m68000-att | |
363 | ;; | |
364 | 3b*) | |
365 | basic_machine=we32k-att | |
366 | ;; | |
367 | a29khif) | |
368 | basic_machine=a29k-amd | |
369 | os=-udi | |
370 | ;; | |
32560f07 | 371 | abacus) |
372 | basic_machine=abacus-unknown | |
373 | ;; | |
1733f60d | 374 | adobe68k) |
375 | basic_machine=m68010-adobe | |
376 | os=-scout | |
377 | ;; | |
378 | alliant | fx80) | |
379 | basic_machine=fx80-alliant | |
380 | ;; | |
381 | altos | altos3068) | |
382 | basic_machine=m68k-altos | |
383 | ;; | |
384 | am29k) | |
385 | basic_machine=a29k-none | |
386 | os=-bsd | |
387 | ;; | |
e7df6a14 | 388 | amd64) |
389 | basic_machine=x86_64-pc | |
390 | ;; | |
32560f07 | 391 | amd64-*) |
392 | basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` | |
393 | ;; | |
1733f60d | 394 | amdahl) |
395 | basic_machine=580-amdahl | |
396 | os=-sysv | |
397 | ;; | |
398 | amiga | amiga-*) | |
94539b2a | 399 | basic_machine=m68k-unknown |
1733f60d | 400 | ;; |
401 | amigaos | amigados) | |
94539b2a | 402 | basic_machine=m68k-unknown |
1733f60d | 403 | os=-amigaos |
404 | ;; | |
405 | amigaunix | amix) | |
94539b2a | 406 | basic_machine=m68k-unknown |
1733f60d | 407 | os=-sysv4 |
408 | ;; | |
409 | apollo68) | |
410 | basic_machine=m68k-apollo | |
411 | os=-sysv | |
412 | ;; | |
413 | apollo68bsd) | |
414 | basic_machine=m68k-apollo | |
415 | os=-bsd | |
416 | ;; | |
417 | aux) | |
418 | basic_machine=m68k-apple | |
419 | os=-aux | |
420 | ;; | |
421 | balance) | |
422 | basic_machine=ns32k-sequent | |
423 | os=-dynix | |
424 | ;; | |
d91b4743 | 425 | c90) |
426 | basic_machine=c90-cray | |
427 | os=-unicos | |
428 | ;; | |
1733f60d | 429 | convex-c1) |
430 | basic_machine=c1-convex | |
431 | os=-bsd | |
432 | ;; | |
433 | convex-c2) | |
434 | basic_machine=c2-convex | |
435 | os=-bsd | |
436 | ;; | |
437 | convex-c32) | |
438 | basic_machine=c32-convex | |
439 | os=-bsd | |
440 | ;; | |
441 | convex-c34) | |
442 | basic_machine=c34-convex | |
443 | os=-bsd | |
444 | ;; | |
445 | convex-c38) | |
446 | basic_machine=c38-convex | |
447 | os=-bsd | |
448 | ;; | |
d91b4743 | 449 | cray | j90) |
450 | basic_machine=j90-cray | |
1733f60d | 451 | os=-unicos |
452 | ;; | |
32560f07 | 453 | craynv) |
454 | basic_machine=craynv-cray | |
455 | os=-unicosmp | |
456 | ;; | |
457 | cr16c) | |
458 | basic_machine=cr16c-unknown | |
459 | os=-elf | |
460 | ;; | |
1733f60d | 461 | crds | unos) |
462 | basic_machine=m68k-crds | |
463 | ;; | |
32560f07 | 464 | crisv32 | crisv32-* | etraxfs*) |
465 | basic_machine=crisv32-axis | |
466 | ;; | |
1733f60d | 467 | cris | cris-* | etrax*) |
468 | basic_machine=cris-axis | |
469 | ;; | |
32560f07 | 470 | crx) |
471 | basic_machine=crx-unknown | |
472 | os=-elf | |
473 | ;; | |
1733f60d | 474 | da30 | da30-*) |
475 | basic_machine=m68k-da30 | |
476 | ;; | |
477 | decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) | |
478 | basic_machine=mips-dec | |
479 | ;; | |
d91b4743 | 480 | decsystem10* | dec10*) |
481 | basic_machine=pdp10-dec | |
482 | os=-tops10 | |
483 | ;; | |
484 | decsystem20* | dec20*) | |
485 | basic_machine=pdp10-dec | |
486 | os=-tops20 | |
487 | ;; | |
1733f60d | 488 | delta | 3300 | motorola-3300 | motorola-delta \ |
489 | | 3300-motorola | delta-motorola) | |
490 | basic_machine=m68k-motorola | |
491 | ;; | |
492 | delta88) | |
493 | basic_machine=m88k-motorola | |
494 | os=-sysv3 | |
495 | ;; | |
32560f07 | 496 | djgpp) |
497 | basic_machine=i586-pc | |
498 | os=-msdosdjgpp | |
499 | ;; | |
1733f60d | 500 | dpx20 | dpx20-*) |
501 | basic_machine=rs6000-bull | |
502 | os=-bosx | |
503 | ;; | |
504 | dpx2* | dpx2*-bull) | |
505 | basic_machine=m68k-bull | |
506 | os=-sysv3 | |
507 | ;; | |
508 | ebmon29k) | |
509 | basic_machine=a29k-amd | |
510 | os=-ebmon | |
511 | ;; | |
512 | elxsi) | |
513 | basic_machine=elxsi-elxsi | |
514 | os=-bsd | |
515 | ;; | |
516 | encore | umax | mmax) | |
517 | basic_machine=ns32k-encore | |
518 | ;; | |
519 | es1800 | OSE68k | ose68k | ose | OSE) | |
520 | basic_machine=m68k-ericsson | |
521 | os=-ose | |
522 | ;; | |
523 | fx2800) | |
524 | basic_machine=i860-alliant | |
525 | ;; | |
526 | genix) | |
527 | basic_machine=ns32k-ns | |
528 | ;; | |
529 | gmicro) | |
530 | basic_machine=tron-gmicro | |
531 | os=-sysv | |
532 | ;; | |
94539b2a | 533 | go32) |
534 | basic_machine=i386-pc | |
535 | os=-go32 | |
536 | ;; | |
1733f60d | 537 | h3050r* | hiux*) |
538 | basic_machine=hppa1.1-hitachi | |
539 | os=-hiuxwe2 | |
540 | ;; | |
541 | h8300hms) | |
542 | basic_machine=h8300-hitachi | |
543 | os=-hms | |
544 | ;; | |
545 | h8300xray) | |
546 | basic_machine=h8300-hitachi | |
547 | os=-xray | |
548 | ;; | |
549 | h8500hms) | |
550 | basic_machine=h8500-hitachi | |
551 | os=-hms | |
552 | ;; | |
553 | harris) | |
554 | basic_machine=m88k-harris | |
555 | os=-sysv3 | |
556 | ;; | |
557 | hp300-*) | |
558 | basic_machine=m68k-hp | |
559 | ;; | |
560 | hp300bsd) | |
561 | basic_machine=m68k-hp | |
562 | os=-bsd | |
563 | ;; | |
564 | hp300hpux) | |
565 | basic_machine=m68k-hp | |
566 | os=-hpux | |
567 | ;; | |
568 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) | |
569 | basic_machine=hppa1.0-hp | |
570 | ;; | |
571 | hp9k2[0-9][0-9] | hp9k31[0-9]) | |
572 | basic_machine=m68000-hp | |
573 | ;; | |
574 | hp9k3[2-9][0-9]) | |
575 | basic_machine=m68k-hp | |
576 | ;; | |
577 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) | |
578 | basic_machine=hppa1.0-hp | |
579 | ;; | |
580 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) | |
581 | basic_machine=hppa1.1-hp | |
582 | ;; | |
583 | hp9k78[0-9] | hp78[0-9]) | |
584 | # FIXME: really hppa2.0-hp | |
585 | basic_machine=hppa1.1-hp | |
586 | ;; | |
587 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) | |
588 | # FIXME: really hppa2.0-hp | |
589 | basic_machine=hppa1.1-hp | |
590 | ;; | |
591 | hp9k8[0-9][13679] | hp8[0-9][13679]) | |
592 | basic_machine=hppa1.1-hp | |
593 | ;; | |
594 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) | |
595 | basic_machine=hppa1.0-hp | |
596 | ;; | |
597 | hppa-next) | |
598 | os=-nextstep3 | |
599 | ;; | |
600 | hppaosf) | |
601 | basic_machine=hppa1.1-hp | |
602 | os=-osf | |
603 | ;; | |
604 | hppro) | |
605 | basic_machine=hppa1.1-hp | |
606 | os=-proelf | |
607 | ;; | |
608 | i370-ibm* | ibm*) | |
609 | basic_machine=i370-ibm | |
610 | ;; | |
611 | # I'm not sure what "Sysv32" means. Should this be sysv3.2? | |
94539b2a | 612 | i*86v32) |
1733f60d | 613 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
614 | os=-sysv32 | |
615 | ;; | |
94539b2a | 616 | i*86v4*) |
1733f60d | 617 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
618 | os=-sysv4 | |
619 | ;; | |
94539b2a | 620 | i*86v) |
1733f60d | 621 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
622 | os=-sysv | |
623 | ;; | |
94539b2a | 624 | i*86sol2) |
1733f60d | 625 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
626 | os=-solaris2 | |
627 | ;; | |
628 | i386mach) | |
629 | basic_machine=i386-mach | |
630 | os=-mach | |
631 | ;; | |
632 | i386-vsta | vsta) | |
633 | basic_machine=i386-unknown | |
634 | os=-vsta | |
635 | ;; | |
1733f60d | 636 | iris | iris4d) |
637 | basic_machine=mips-sgi | |
638 | case $os in | |
639 | -irix*) | |
640 | ;; | |
641 | *) | |
642 | os=-irix4 | |
643 | ;; | |
644 | esac | |
645 | ;; | |
646 | isi68 | isi) | |
647 | basic_machine=m68k-isi | |
648 | os=-sysv | |
649 | ;; | |
650 | m88k-omron*) | |
651 | basic_machine=m88k-omron | |
652 | ;; | |
653 | magnum | m3230) | |
654 | basic_machine=mips-mips | |
655 | os=-sysv | |
656 | ;; | |
657 | merlin) | |
658 | basic_machine=ns32k-utek | |
659 | os=-sysv | |
660 | ;; | |
94539b2a | 661 | mingw32) |
662 | basic_machine=i386-pc | |
663 | os=-mingw32 | |
664 | ;; | |
1733f60d | 665 | miniframe) |
666 | basic_machine=m68000-convergent | |
667 | ;; | |
668 | *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) | |
669 | basic_machine=m68k-atari | |
670 | os=-mint | |
671 | ;; | |
1733f60d | 672 | mips3*-*) |
673 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` | |
674 | ;; | |
675 | mips3*) | |
676 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown | |
677 | ;; | |
1733f60d | 678 | monitor) |
679 | basic_machine=m68k-rom68k | |
680 | os=-coff | |
681 | ;; | |
d91b4743 | 682 | morphos) |
683 | basic_machine=powerpc-unknown | |
684 | os=-morphos | |
685 | ;; | |
1733f60d | 686 | msdos) |
94539b2a | 687 | basic_machine=i386-pc |
1733f60d | 688 | os=-msdos |
689 | ;; | |
690 | mvs) | |
691 | basic_machine=i370-ibm | |
692 | os=-mvs | |
693 | ;; | |
694 | ncr3000) | |
695 | basic_machine=i486-ncr | |
696 | os=-sysv4 | |
697 | ;; | |
698 | netbsd386) | |
699 | basic_machine=i386-unknown | |
700 | os=-netbsd | |
701 | ;; | |
702 | netwinder) | |
703 | basic_machine=armv4l-rebel | |
704 | os=-linux | |
705 | ;; | |
706 | news | news700 | news800 | news900) | |
707 | basic_machine=m68k-sony | |
708 | os=-newsos | |
709 | ;; | |
710 | news1000) | |
711 | basic_machine=m68030-sony | |
712 | os=-newsos | |
713 | ;; | |
714 | news-3600 | risc-news) | |
715 | basic_machine=mips-sony | |
716 | os=-newsos | |
717 | ;; | |
718 | necv70) | |
719 | basic_machine=v70-nec | |
720 | os=-sysv | |
721 | ;; | |
722 | next | m*-next ) | |
723 | basic_machine=m68k-next | |
724 | case $os in | |
725 | -nextstep* ) | |
726 | ;; | |
727 | -ns2*) | |
728 | os=-nextstep2 | |
729 | ;; | |
730 | *) | |
731 | os=-nextstep3 | |
732 | ;; | |
733 | esac | |
734 | ;; | |
735 | nh3000) | |
736 | basic_machine=m68k-harris | |
737 | os=-cxux | |
738 | ;; | |
739 | nh[45]000) | |
740 | basic_machine=m88k-harris | |
741 | os=-cxux | |
742 | ;; | |
743 | nindy960) | |
744 | basic_machine=i960-intel | |
745 | os=-nindy | |
746 | ;; | |
747 | mon960) | |
748 | basic_machine=i960-intel | |
749 | os=-mon960 | |
750 | ;; | |
94539b2a | 751 | nonstopux) |
752 | basic_machine=mips-compaq | |
753 | os=-nonstopux | |
754 | ;; | |
1733f60d | 755 | np1) |
756 | basic_machine=np1-gould | |
757 | ;; | |
e7df6a14 | 758 | nsr-tandem) |
759 | basic_machine=nsr-tandem | |
af3cb693 | 760 | ;; |
1733f60d | 761 | op50n-* | op60c-*) |
762 | basic_machine=hppa1.1-oki | |
763 | os=-proelf | |
764 | ;; | |
d91b4743 | 765 | or32 | or32-*) |
766 | basic_machine=or32-unknown | |
767 | os=-coff | |
768 | ;; | |
32560f07 | 769 | os400) |
770 | basic_machine=powerpc-ibm | |
771 | os=-os400 | |
772 | ;; | |
1733f60d | 773 | OSE68000 | ose68000) |
774 | basic_machine=m68000-ericsson | |
775 | os=-ose | |
776 | ;; | |
777 | os68k) | |
778 | basic_machine=m68k-none | |
779 | os=-os68k | |
780 | ;; | |
781 | pa-hitachi) | |
782 | basic_machine=hppa1.1-hitachi | |
783 | os=-hiuxwe2 | |
784 | ;; | |
785 | paragon) | |
786 | basic_machine=i860-intel | |
787 | os=-osf | |
788 | ;; | |
789 | pbd) | |
790 | basic_machine=sparc-tti | |
791 | ;; | |
792 | pbb) | |
793 | basic_machine=m68k-tti | |
794 | ;; | |
aff51935 | 795 | pc532 | pc532-*) |
1733f60d | 796 | basic_machine=ns32k-pc532 |
797 | ;; | |
d91b4743 | 798 | pentium | p5 | k5 | k6 | nexgen | viac3) |
1733f60d | 799 | basic_machine=i586-pc |
800 | ;; | |
e7df6a14 | 801 | pentiumpro | p6 | 6x86 | athlon | athlon_*) |
1733f60d | 802 | basic_machine=i686-pc |
803 | ;; | |
e7df6a14 | 804 | pentiumii | pentium2 | pentiumiii | pentium3) |
94539b2a | 805 | basic_machine=i686-pc |
1733f60d | 806 | ;; |
e7df6a14 | 807 | pentium4) |
808 | basic_machine=i786-pc | |
809 | ;; | |
d91b4743 | 810 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) |
1733f60d | 811 | basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` |
812 | ;; | |
813 | pentiumpro-* | p6-* | 6x86-* | athlon-*) | |
814 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | |
815 | ;; | |
e7df6a14 | 816 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) |
94539b2a | 817 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` |
1733f60d | 818 | ;; |
e7df6a14 | 819 | pentium4-*) |
820 | basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` | |
821 | ;; | |
1733f60d | 822 | pn) |
823 | basic_machine=pn-gould | |
824 | ;; | |
94539b2a | 825 | power) basic_machine=power-ibm |
1733f60d | 826 | ;; |
827 | ppc) basic_machine=powerpc-unknown | |
aff51935 | 828 | ;; |
1733f60d | 829 | ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` |
830 | ;; | |
831 | ppcle | powerpclittle | ppc-le | powerpc-little) | |
832 | basic_machine=powerpcle-unknown | |
aff51935 | 833 | ;; |
1733f60d | 834 | ppcle-* | powerpclittle-*) |
835 | basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` | |
836 | ;; | |
d91b4743 | 837 | ppc64) basic_machine=powerpc64-unknown |
aff51935 | 838 | ;; |
d91b4743 | 839 | ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` |
840 | ;; | |
841 | ppc64le | powerpc64little | ppc64-le | powerpc64-little) | |
842 | basic_machine=powerpc64le-unknown | |
aff51935 | 843 | ;; |
d91b4743 | 844 | ppc64le-* | powerpc64little-*) |
845 | basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` | |
846 | ;; | |
1733f60d | 847 | ps2) |
848 | basic_machine=i386-ibm | |
849 | ;; | |
94539b2a | 850 | pw32) |
851 | basic_machine=i586-unknown | |
852 | os=-pw32 | |
853 | ;; | |
1733f60d | 854 | rom68k) |
855 | basic_machine=m68k-rom68k | |
856 | os=-coff | |
857 | ;; | |
858 | rm[46]00) | |
859 | basic_machine=mips-siemens | |
860 | ;; | |
861 | rtpc | rtpc-*) | |
862 | basic_machine=romp-ibm | |
863 | ;; | |
d91b4743 | 864 | s390 | s390-*) |
865 | basic_machine=s390-ibm | |
866 | ;; | |
867 | s390x | s390x-*) | |
868 | basic_machine=s390x-ibm | |
869 | ;; | |
1733f60d | 870 | sa29200) |
871 | basic_machine=a29k-amd | |
872 | os=-udi | |
873 | ;; | |
e7df6a14 | 874 | sb1) |
875 | basic_machine=mipsisa64sb1-unknown | |
876 | ;; | |
877 | sb1el) | |
878 | basic_machine=mipsisa64sb1el-unknown | |
879 | ;; | |
880 | sei) | |
881 | basic_machine=mips-sei | |
882 | os=-seiux | |
883 | ;; | |
1733f60d | 884 | sequent) |
885 | basic_machine=i386-sequent | |
886 | ;; | |
887 | sh) | |
888 | basic_machine=sh-hitachi | |
889 | os=-hms | |
890 | ;; | |
e7df6a14 | 891 | sh64) |
892 | basic_machine=sh64-unknown | |
893 | ;; | |
d91b4743 | 894 | sparclite-wrs | simso-wrs) |
1733f60d | 895 | basic_machine=sparclite-wrs |
896 | os=-vxworks | |
897 | ;; | |
898 | sps7) | |
899 | basic_machine=m68k-bull | |
900 | os=-sysv2 | |
901 | ;; | |
902 | spur) | |
903 | basic_machine=spur-unknown | |
904 | ;; | |
905 | st2000) | |
906 | basic_machine=m68k-tandem | |
907 | ;; | |
908 | stratus) | |
909 | basic_machine=i860-stratus | |
910 | os=-sysv4 | |
911 | ;; | |
912 | sun2) | |
913 | basic_machine=m68000-sun | |
914 | ;; | |
915 | sun2os3) | |
916 | basic_machine=m68000-sun | |
917 | os=-sunos3 | |
918 | ;; | |
919 | sun2os4) | |
920 | basic_machine=m68000-sun | |
921 | os=-sunos4 | |
922 | ;; | |
923 | sun3os3) | |
924 | basic_machine=m68k-sun | |
925 | os=-sunos3 | |
926 | ;; | |
927 | sun3os4) | |
928 | basic_machine=m68k-sun | |
929 | os=-sunos4 | |
930 | ;; | |
931 | sun4os3) | |
932 | basic_machine=sparc-sun | |
933 | os=-sunos3 | |
934 | ;; | |
935 | sun4os4) | |
936 | basic_machine=sparc-sun | |
937 | os=-sunos4 | |
938 | ;; | |
939 | sun4sol2) | |
940 | basic_machine=sparc-sun | |
941 | os=-solaris2 | |
942 | ;; | |
943 | sun3 | sun3-*) | |
944 | basic_machine=m68k-sun | |
945 | ;; | |
946 | sun4) | |
947 | basic_machine=sparc-sun | |
948 | ;; | |
949 | sun386 | sun386i | roadrunner) | |
950 | basic_machine=i386-sun | |
951 | ;; | |
aff51935 | 952 | sv1) |
1733f60d | 953 | basic_machine=sv1-cray |
954 | os=-unicos | |
955 | ;; | |
956 | symmetry) | |
957 | basic_machine=i386-sequent | |
958 | os=-dynix | |
959 | ;; | |
960 | t3e) | |
d91b4743 | 961 | basic_machine=alphaev5-cray |
962 | os=-unicos | |
963 | ;; | |
964 | t90) | |
965 | basic_machine=t90-cray | |
1733f60d | 966 | os=-unicos |
967 | ;; | |
94539b2a | 968 | tic54x | c54x*) |
969 | basic_machine=tic54x-unknown | |
970 | os=-coff | |
971 | ;; | |
e7df6a14 | 972 | tic55x | c55x*) |
973 | basic_machine=tic55x-unknown | |
974 | os=-coff | |
975 | ;; | |
976 | tic6x | c6x*) | |
977 | basic_machine=tic6x-unknown | |
978 | os=-coff | |
979 | ;; | |
1733f60d | 980 | tx39) |
981 | basic_machine=mipstx39-unknown | |
982 | ;; | |
983 | tx39el) | |
984 | basic_machine=mipstx39el-unknown | |
985 | ;; | |
d91b4743 | 986 | toad1) |
987 | basic_machine=pdp10-xkl | |
988 | os=-tops20 | |
989 | ;; | |
1733f60d | 990 | tower | tower-32) |
991 | basic_machine=m68k-ncr | |
992 | ;; | |
32560f07 | 993 | tpf) |
994 | basic_machine=s390x-ibm | |
995 | os=-tpf | |
996 | ;; | |
1733f60d | 997 | udi29k) |
998 | basic_machine=a29k-amd | |
999 | os=-udi | |
1000 | ;; | |
1001 | ultra3) | |
1002 | basic_machine=a29k-nyu | |
1003 | os=-sym1 | |
1004 | ;; | |
1005 | v810 | necv810) | |
1006 | basic_machine=v810-nec | |
1007 | os=-none | |
1008 | ;; | |
1009 | vaxv) | |
1010 | basic_machine=vax-dec | |
1011 | os=-sysv | |
1012 | ;; | |
1013 | vms) | |
1014 | basic_machine=vax-dec | |
1015 | os=-vms | |
1016 | ;; | |
1017 | vpp*|vx|vx-*) | |
e7df6a14 | 1018 | basic_machine=f301-fujitsu |
1019 | ;; | |
1733f60d | 1020 | vxworks960) |
1021 | basic_machine=i960-wrs | |
1022 | os=-vxworks | |
1023 | ;; | |
1024 | vxworks68) | |
1025 | basic_machine=m68k-wrs | |
1026 | os=-vxworks | |
1027 | ;; | |
1028 | vxworks29k) | |
1029 | basic_machine=a29k-wrs | |
1030 | os=-vxworks | |
1031 | ;; | |
1032 | w65*) | |
1033 | basic_machine=w65-wdc | |
1034 | os=-none | |
1035 | ;; | |
1036 | w89k-*) | |
1037 | basic_machine=hppa1.1-winbond | |
1038 | os=-proelf | |
1039 | ;; | |
32560f07 | 1040 | xbox) |
1041 | basic_machine=i686-pc | |
1042 | os=-mingw32 | |
1043 | ;; | |
aff51935 | 1044 | xps | xps100) |
1733f60d | 1045 | basic_machine=xps100-honeywell |
1046 | ;; | |
d91b4743 | 1047 | ymp) |
1048 | basic_machine=ymp-cray | |
1049 | os=-unicos | |
1050 | ;; | |
1733f60d | 1051 | z8k-*-coff) |
1052 | basic_machine=z8k-unknown | |
1053 | os=-sim | |
1054 | ;; | |
1055 | none) | |
1056 | basic_machine=none-none | |
1057 | os=-none | |
1058 | ;; | |
1059 | ||
1060 | # Here we handle the default manufacturer of certain CPU types. It is in | |
1061 | # some cases the only manufacturer, in others, it is the most popular. | |
1062 | w89k) | |
1063 | basic_machine=hppa1.1-winbond | |
1064 | ;; | |
1065 | op50n) | |
1066 | basic_machine=hppa1.1-oki | |
1067 | ;; | |
1068 | op60c) | |
1069 | basic_machine=hppa1.1-oki | |
1070 | ;; | |
1733f60d | 1071 | romp) |
1072 | basic_machine=romp-ibm | |
1073 | ;; | |
32560f07 | 1074 | mmix) |
1075 | basic_machine=mmix-knuth | |
1076 | ;; | |
1733f60d | 1077 | rs6000) |
1078 | basic_machine=rs6000-ibm | |
1079 | ;; | |
1080 | vax) | |
1081 | basic_machine=vax-dec | |
1082 | ;; | |
94539b2a | 1083 | pdp10) |
1084 | # there are many clones, so DEC is not a safe bet | |
1085 | basic_machine=pdp10-unknown | |
1086 | ;; | |
1733f60d | 1087 | pdp11) |
1088 | basic_machine=pdp11-dec | |
1089 | ;; | |
1090 | we32k) | |
1091 | basic_machine=we32k-att | |
1092 | ;; | |
e7df6a14 | 1093 | sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) |
94539b2a | 1094 | basic_machine=sh-unknown |
1095 | ;; | |
d91b4743 | 1096 | sh64) |
1097 | basic_machine=sh64-unknown | |
1098 | ;; | |
32560f07 | 1099 | sparc | sparcv8 | sparcv9 | sparcv9b) |
1733f60d | 1100 | basic_machine=sparc-sun |
1101 | ;; | |
aff51935 | 1102 | cydra) |
1733f60d | 1103 | basic_machine=cydra-cydrome |
1104 | ;; | |
1105 | orion) | |
1106 | basic_machine=orion-highlevel | |
1107 | ;; | |
1108 | orion105) | |
1109 | basic_machine=clipper-highlevel | |
1110 | ;; | |
1111 | mac | mpw | mac-mpw) | |
1112 | basic_machine=m68k-apple | |
1113 | ;; | |
1114 | pmac | pmac-mpw) | |
1115 | basic_machine=powerpc-apple | |
1116 | ;; | |
94539b2a | 1117 | *-unknown) |
1118 | # Make sure to match an already-canonicalized machine name. | |
1119 | ;; | |
1733f60d | 1120 | *) |
1121 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
1122 | exit 1 | |
1123 | ;; | |
1124 | esac | |
1125 | ||
1126 | # Here we canonicalize certain aliases for manufacturers. | |
1127 | case $basic_machine in | |
1128 | *-digital*) | |
1129 | basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` | |
1130 | ;; | |
1131 | *-commodore*) | |
1132 | basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` | |
1133 | ;; | |
1134 | *) | |
1135 | ;; | |
1136 | esac | |
1137 | ||
1138 | # Decode manufacturer-specific aliases for certain operating systems. | |
1139 | ||
1140 | if [ x"$os" != x"" ] | |
1141 | then | |
1142 | case $os in | |
e7df6a14 | 1143 | # First match some system type aliases |
1144 | # that might get confused with valid system types. | |
1733f60d | 1145 | # -solaris* is a basic system type, with this one exception. |
1146 | -solaris1 | -solaris1.*) | |
1147 | os=`echo $os | sed -e 's|solaris1|sunos4|'` | |
1148 | ;; | |
1149 | -solaris) | |
1150 | os=-solaris2 | |
1151 | ;; | |
1152 | -svr4*) | |
1153 | os=-sysv4 | |
1154 | ;; | |
1155 | -unixware*) | |
1156 | os=-sysv4.2uw | |
1157 | ;; | |
1158 | -gnu/linux*) | |
1159 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` | |
1160 | ;; | |
1161 | # First accept the basic system types. | |
1162 | # The portable systems comes first. | |
1163 | # Each alternative MUST END IN A *, to match a version number. | |
1164 | # -sysv* is not here because it comes later, after sysvr4. | |
1165 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | |
1166 | | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | |
1167 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | |
1168 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | |
1169 | | -aos* \ | |
1170 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | |
1171 | | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | |
32560f07 | 1172 | | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ |
1173 | | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | |
1174 | | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | |
1733f60d | 1175 | | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ |
1176 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | |
d91b4743 | 1177 | | -chorusos* | -chorusrdb* \ |
1733f60d | 1178 | | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ |
32560f07 | 1179 | | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ |
e7df6a14 | 1180 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ |
94539b2a | 1181 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ |
d91b4743 | 1182 | | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ |
1183 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | |
e7df6a14 | 1184 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ |
32560f07 | 1185 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* | -skyos*) |
1733f60d | 1186 | # Remember, each alternative MUST END IN *, to match a version number. |
1187 | ;; | |
1188 | -qnx*) | |
1189 | case $basic_machine in | |
94539b2a | 1190 | x86-* | i*86-*) |
1733f60d | 1191 | ;; |
1192 | *) | |
1193 | os=-nto$os | |
1194 | ;; | |
1195 | esac | |
1196 | ;; | |
e7df6a14 | 1197 | -nto-qnx*) |
1198 | ;; | |
1733f60d | 1199 | -nto*) |
e7df6a14 | 1200 | os=`echo $os | sed -e 's|nto|nto-qnx|'` |
1733f60d | 1201 | ;; |
1202 | -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | |
1203 | | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | |
1204 | | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) | |
1205 | ;; | |
1206 | -mac*) | |
1207 | os=`echo $os | sed -e 's|mac|macos|'` | |
1208 | ;; | |
e7df6a14 | 1209 | -linux-dietlibc) |
1210 | os=-linux-dietlibc | |
1211 | ;; | |
1733f60d | 1212 | -linux*) |
1213 | os=`echo $os | sed -e 's|linux|linux-gnu|'` | |
1214 | ;; | |
1215 | -sunos5*) | |
1216 | os=`echo $os | sed -e 's|sunos5|solaris2|'` | |
1217 | ;; | |
1218 | -sunos6*) | |
1219 | os=`echo $os | sed -e 's|sunos6|solaris3|'` | |
1220 | ;; | |
1221 | -opened*) | |
1222 | os=-openedition | |
1223 | ;; | |
32560f07 | 1224 | -os400*) |
1225 | os=-os400 | |
1226 | ;; | |
1733f60d | 1227 | -wince*) |
1228 | os=-wince | |
1229 | ;; | |
1230 | -osfrose*) | |
1231 | os=-osfrose | |
1232 | ;; | |
1233 | -osf*) | |
1234 | os=-osf | |
1235 | ;; | |
1236 | -utek*) | |
1237 | os=-bsd | |
1238 | ;; | |
1239 | -dynix*) | |
1240 | os=-bsd | |
1241 | ;; | |
1242 | -acis*) | |
1243 | os=-aos | |
1244 | ;; | |
d91b4743 | 1245 | -atheos*) |
1246 | os=-atheos | |
1247 | ;; | |
32560f07 | 1248 | -syllable*) |
1249 | os=-syllable | |
1250 | ;; | |
1733f60d | 1251 | -386bsd) |
1252 | os=-bsd | |
1253 | ;; | |
1254 | -ctix* | -uts*) | |
1255 | os=-sysv | |
1256 | ;; | |
d91b4743 | 1257 | -nova*) |
1258 | os=-rtmk-nova | |
1259 | ;; | |
1733f60d | 1260 | -ns2 ) |
aff51935 | 1261 | os=-nextstep2 |
1733f60d | 1262 | ;; |
94539b2a | 1263 | -nsk*) |
1733f60d | 1264 | os=-nsk |
1265 | ;; | |
1266 | # Preserve the version number of sinix5. | |
1267 | -sinix5.*) | |
1268 | os=`echo $os | sed -e 's|sinix|sysv|'` | |
1269 | ;; | |
1270 | -sinix*) | |
1271 | os=-sysv4 | |
1272 | ;; | |
32560f07 | 1273 | -tpf*) |
1274 | os=-tpf | |
1275 | ;; | |
1733f60d | 1276 | -triton*) |
1277 | os=-sysv3 | |
1278 | ;; | |
1279 | -oss*) | |
1280 | os=-sysv3 | |
1281 | ;; | |
1282 | -svr4) | |
1283 | os=-sysv4 | |
1284 | ;; | |
1285 | -svr3) | |
1286 | os=-sysv3 | |
1287 | ;; | |
1288 | -sysvr4) | |
1289 | os=-sysv4 | |
1290 | ;; | |
1291 | # This must come after -sysvr4. | |
1292 | -sysv*) | |
1293 | ;; | |
1294 | -ose*) | |
1295 | os=-ose | |
1296 | ;; | |
1297 | -es1800*) | |
1298 | os=-ose | |
1299 | ;; | |
1300 | -xenix) | |
1301 | os=-xenix | |
1302 | ;; | |
aff51935 | 1303 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) |
1304 | os=-mint | |
1733f60d | 1305 | ;; |
e7df6a14 | 1306 | -aros*) |
1307 | os=-aros | |
1308 | ;; | |
1309 | -kaos*) | |
1310 | os=-kaos | |
1311 | ;; | |
32560f07 | 1312 | -zvmoe) |
1313 | os=-zvmoe | |
1314 | ;; | |
1733f60d | 1315 | -none) |
1316 | ;; | |
1317 | *) | |
1318 | # Get rid of the `-' at the beginning of $os. | |
1319 | os=`echo $os | sed 's/[^-]*-//'` | |
1320 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 | |
1321 | exit 1 | |
1322 | ;; | |
1323 | esac | |
1324 | else | |
1325 | ||
1326 | # Here we handle the default operating systems that come with various machines. | |
1327 | # The value should be what the vendor currently ships out the door with their | |
1328 | # machine or put another way, the most popular os provided with the machine. | |
1329 | ||
1330 | # Note that if you're going to try to match "-MANUFACTURER" here (say, | |
1331 | # "-sun"), then you have to tell the case statement up towards the top | |
1332 | # that MANUFACTURER isn't an operating system. Otherwise, code above | |
1333 | # will signal an error saying that MANUFACTURER isn't an operating | |
1334 | # system, and we'll never get to this point. | |
1335 | ||
1336 | case $basic_machine in | |
1337 | *-acorn) | |
1338 | os=-riscix1.2 | |
1339 | ;; | |
1340 | arm*-rebel) | |
1341 | os=-linux | |
1342 | ;; | |
1343 | arm*-semi) | |
1344 | os=-aout | |
1345 | ;; | |
e7df6a14 | 1346 | c4x-* | tic4x-*) |
1347 | os=-coff | |
1348 | ;; | |
d91b4743 | 1349 | # This must come before the *-dec entry. |
94539b2a | 1350 | pdp10-*) |
1351 | os=-tops20 | |
1352 | ;; | |
aff51935 | 1353 | pdp11-*) |
1733f60d | 1354 | os=-none |
1355 | ;; | |
1356 | *-dec | vax-*) | |
1357 | os=-ultrix4.2 | |
1358 | ;; | |
1359 | m68*-apollo) | |
1360 | os=-domain | |
1361 | ;; | |
1362 | i386-sun) | |
1363 | os=-sunos4.0.2 | |
1364 | ;; | |
1365 | m68000-sun) | |
1366 | os=-sunos3 | |
1367 | # This also exists in the configure program, but was not the | |
1368 | # default. | |
1369 | # os=-sunos4 | |
1370 | ;; | |
1371 | m68*-cisco) | |
1372 | os=-aout | |
1373 | ;; | |
1374 | mips*-cisco) | |
1375 | os=-elf | |
1376 | ;; | |
1377 | mips*-*) | |
1378 | os=-elf | |
1379 | ;; | |
d91b4743 | 1380 | or32-*) |
1381 | os=-coff | |
1382 | ;; | |
1733f60d | 1383 | *-tti) # must be before sparc entry or we get the wrong os. |
1384 | os=-sysv3 | |
1385 | ;; | |
1386 | sparc-* | *-sun) | |
1387 | os=-sunos4.1.1 | |
1388 | ;; | |
1389 | *-be) | |
1390 | os=-beos | |
1391 | ;; | |
1392 | *-ibm) | |
1393 | os=-aix | |
1394 | ;; | |
32560f07 | 1395 | *-knuth) |
1396 | os=-mmixware | |
1397 | ;; | |
1733f60d | 1398 | *-wec) |
1399 | os=-proelf | |
1400 | ;; | |
1401 | *-winbond) | |
1402 | os=-proelf | |
1403 | ;; | |
1404 | *-oki) | |
1405 | os=-proelf | |
1406 | ;; | |
1407 | *-hp) | |
1408 | os=-hpux | |
1409 | ;; | |
1410 | *-hitachi) | |
1411 | os=-hiux | |
1412 | ;; | |
1413 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) | |
1414 | os=-sysv | |
1415 | ;; | |
1416 | *-cbm) | |
1417 | os=-amigaos | |
1418 | ;; | |
1419 | *-dg) | |
1420 | os=-dgux | |
1421 | ;; | |
1422 | *-dolphin) | |
1423 | os=-sysv3 | |
1424 | ;; | |
1425 | m68k-ccur) | |
1426 | os=-rtu | |
1427 | ;; | |
1428 | m88k-omron*) | |
1429 | os=-luna | |
1430 | ;; | |
1431 | *-next ) | |
1432 | os=-nextstep | |
1433 | ;; | |
1434 | *-sequent) | |
1435 | os=-ptx | |
1436 | ;; | |
1437 | *-crds) | |
1438 | os=-unos | |
1439 | ;; | |
1440 | *-ns) | |
1441 | os=-genix | |
1442 | ;; | |
1443 | i370-*) | |
1444 | os=-mvs | |
1445 | ;; | |
1446 | *-next) | |
1447 | os=-nextstep3 | |
1448 | ;; | |
aff51935 | 1449 | *-gould) |
1733f60d | 1450 | os=-sysv |
1451 | ;; | |
aff51935 | 1452 | *-highlevel) |
1733f60d | 1453 | os=-bsd |
1454 | ;; | |
1455 | *-encore) | |
1456 | os=-bsd | |
1457 | ;; | |
aff51935 | 1458 | *-sgi) |
1733f60d | 1459 | os=-irix |
1460 | ;; | |
aff51935 | 1461 | *-siemens) |
1733f60d | 1462 | os=-sysv4 |
1463 | ;; | |
1464 | *-masscomp) | |
1465 | os=-rtu | |
1466 | ;; | |
94539b2a | 1467 | f30[01]-fujitsu | f700-fujitsu) |
1733f60d | 1468 | os=-uxpv |
1469 | ;; | |
1470 | *-rom68k) | |
1471 | os=-coff | |
1472 | ;; | |
1473 | *-*bug) | |
1474 | os=-coff | |
1475 | ;; | |
1476 | *-apple) | |
1477 | os=-macos | |
1478 | ;; | |
1479 | *-atari*) | |
1480 | os=-mint | |
1481 | ;; | |
1482 | *) | |
1483 | os=-none | |
1484 | ;; | |
1485 | esac | |
1486 | fi | |
1487 | ||
1488 | # Here we handle the case where we know the os, and the CPU type, but not the | |
1489 | # manufacturer. We pick the logical manufacturer. | |
1490 | vendor=unknown | |
1491 | case $basic_machine in | |
1492 | *-unknown) | |
1493 | case $os in | |
1494 | -riscix*) | |
1495 | vendor=acorn | |
1496 | ;; | |
1497 | -sunos*) | |
1498 | vendor=sun | |
1499 | ;; | |
1500 | -aix*) | |
1501 | vendor=ibm | |
1502 | ;; | |
1503 | -beos*) | |
1504 | vendor=be | |
1505 | ;; | |
1506 | -hpux*) | |
1507 | vendor=hp | |
1508 | ;; | |
1509 | -mpeix*) | |
1510 | vendor=hp | |
1511 | ;; | |
1512 | -hiux*) | |
1513 | vendor=hitachi | |
1514 | ;; | |
1515 | -unos*) | |
1516 | vendor=crds | |
1517 | ;; | |
1518 | -dgux*) | |
1519 | vendor=dg | |
1520 | ;; | |
1521 | -luna*) | |
1522 | vendor=omron | |
1523 | ;; | |
1524 | -genix*) | |
1525 | vendor=ns | |
1526 | ;; | |
1527 | -mvs* | -opened*) | |
1528 | vendor=ibm | |
1529 | ;; | |
32560f07 | 1530 | -os400*) |
1531 | vendor=ibm | |
1532 | ;; | |
1733f60d | 1533 | -ptx*) |
1534 | vendor=sequent | |
1535 | ;; | |
32560f07 | 1536 | -tpf*) |
1537 | vendor=ibm | |
1538 | ;; | |
d91b4743 | 1539 | -vxsim* | -vxworks* | -windiss*) |
1733f60d | 1540 | vendor=wrs |
1541 | ;; | |
1542 | -aux*) | |
1543 | vendor=apple | |
1544 | ;; | |
1545 | -hms*) | |
1546 | vendor=hitachi | |
1547 | ;; | |
1548 | -mpw* | -macos*) | |
1549 | vendor=apple | |
1550 | ;; | |
94539b2a | 1551 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) |
1733f60d | 1552 | vendor=atari |
1553 | ;; | |
d91b4743 | 1554 | -vos*) |
1555 | vendor=stratus | |
1556 | ;; | |
1733f60d | 1557 | esac |
1558 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | |
1559 | ;; | |
1560 | esac | |
1561 | ||
1562 | echo $basic_machine$os | |
32560f07 | 1563 | exit |
1733f60d | 1564 | |
1565 | # Local variables: | |
1566 | # eval: (add-hook 'write-file-hooks 'time-stamp) | |
94539b2a | 1567 | # time-stamp-start: "timestamp='" |
1733f60d | 1568 | # time-stamp-format: "%:y-%02m-%02d" |
1569 | # time-stamp-end: "'" | |
1570 | # End: |