config.sub

Thu, 06 Aug 2009 13:21:30 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 06 Aug 2009 13:21:30 +0200
changeset 15
0e0eb7c91312
permissions
-rw-r--r--

Remove seemingly declarations unnecessary according to Qt 4.5.2 headers.

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

mercurial