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