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