[6afd7c] | 1 | #! /bin/sh |
---|
| 2 | # Configuration validation subroutine script, version 1.1. |
---|
[539266] | 3 | # |
---|
| 4 | # Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000 |
---|
| 5 | # Free Software Foundation, Inc. |
---|
| 6 | # |
---|
[6afd7c] | 7 | # This file is (in principle) common to ALL GNU software. |
---|
| 8 | # The presence of a machine in this file suggests that SOME GNU software |
---|
[539266] | 9 | # can handle that machine. It does not imply ALL GNU software can. |
---|
[6afd7c] | 10 | # |
---|
| 11 | # This file is free software; you can redistribute it and/or modify |
---|
| 12 | # it under the terms of the GNU General Public License as published by |
---|
| 13 | # the Free Software Foundation; either version 2 of the License, or |
---|
| 14 | # (at your option) any later version. |
---|
| 15 | # |
---|
| 16 | # This program is distributed in the hope that it will be useful, |
---|
| 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 19 | # GNU General Public License for more details. |
---|
| 20 | # |
---|
| 21 | # You should have received a copy of the GNU General Public License |
---|
| 22 | # along with this program; if not, write to the Free Software |
---|
| 23 | # Foundation, Inc., 59 Temple Place - Suite 330, |
---|
| 24 | # Boston, MA 02111-1307, USA. |
---|
| 25 | |
---|
| 26 | # As a special exception to the GNU General Public License, if you |
---|
| 27 | # distribute this file as part of a program that contains a |
---|
| 28 | # configuration script generated by Autoconf, you may include it under |
---|
| 29 | # the same distribution terms that you use for the rest of that program. |
---|
| 30 | |
---|
| 31 | # Configuration subroutine to validate and canonicalize a configuration type. |
---|
| 32 | # Supply the specified configuration type as an argument. |
---|
| 33 | # If it is invalid, we print an error message on stderr and exit with code 1. |
---|
| 34 | # Otherwise, we print the canonical config type on stdout and succeed. |
---|
| 35 | |
---|
| 36 | # This file is supposed to be the same for all GNU packages |
---|
| 37 | # and recognize all the CPU types, system types and aliases |
---|
| 38 | # that are meaningful with *any* GNU software. |
---|
| 39 | # Each package is responsible for reporting which valid configurations |
---|
| 40 | # it does not support. The user should be able to distinguish |
---|
| 41 | # a failure to support a valid configuration from a meaningless |
---|
| 42 | # configuration. |
---|
| 43 | |
---|
| 44 | # The goal of this file is to map all the various variations of a given |
---|
| 45 | # machine specification into a single specification in the form: |
---|
| 46 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM |
---|
[539266] | 47 | # or in some cases, the newer four-part form: |
---|
| 48 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM |
---|
[6afd7c] | 49 | # It is wrong to echo any other type of specification. |
---|
| 50 | |
---|
| 51 | if [ x$1 = x ] |
---|
| 52 | then |
---|
| 53 | echo Configuration name missing. 1>&2 |
---|
| 54 | echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 |
---|
| 55 | echo "or $0 ALIAS" 1>&2 |
---|
| 56 | echo where ALIAS is a recognized configuration type. 1>&2 |
---|
| 57 | exit 1 |
---|
| 58 | fi |
---|
| 59 | |
---|
| 60 | # First pass through any local machine types. |
---|
| 61 | case $1 in |
---|
| 62 | *local*) |
---|
| 63 | echo $1 |
---|
| 64 | exit 0 |
---|
| 65 | ;; |
---|
| 66 | *) |
---|
| 67 | ;; |
---|
| 68 | esac |
---|
| 69 | |
---|
[539266] | 70 | # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). |
---|
| 71 | # Here we must recognize all the valid KERNEL-OS combinations. |
---|
| 72 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` |
---|
| 73 | case $maybe_os in |
---|
| 74 | linux-gnu*) |
---|
| 75 | os=-$maybe_os |
---|
| 76 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` |
---|
| 77 | ;; |
---|
| 78 | *) |
---|
| 79 | basic_machine=`echo $1 | sed 's/-[^-]*$//'` |
---|
| 80 | if [ $basic_machine != $1 ] |
---|
| 81 | then os=`echo $1 | sed 's/.*-/-/'` |
---|
| 82 | else os=; fi |
---|
| 83 | ;; |
---|
| 84 | esac |
---|
[6afd7c] | 85 | |
---|
| 86 | ### Let's recognize common machines as not being operating systems so |
---|
| 87 | ### that things like config.sub decstation-3100 work. We also |
---|
| 88 | ### recognize some manufacturers as not being operating systems, so we |
---|
| 89 | ### can provide default operating systems below. |
---|
| 90 | case $os in |
---|
| 91 | -sun*os*) |
---|
| 92 | # Prevent following clause from handling this invalid input. |
---|
| 93 | ;; |
---|
| 94 | -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ |
---|
| 95 | -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ |
---|
| 96 | -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ |
---|
| 97 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ |
---|
| 98 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ |
---|
[539266] | 99 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ |
---|
| 100 | -apple) |
---|
[6afd7c] | 101 | os= |
---|
| 102 | basic_machine=$1 |
---|
| 103 | ;; |
---|
| 104 | -hiux*) |
---|
| 105 | os=-hiuxwe2 |
---|
| 106 | ;; |
---|
[539266] | 107 | -sco5) |
---|
| 108 | os=sco3.2v5 |
---|
| 109 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
---|
| 110 | ;; |
---|
[6afd7c] | 111 | -sco4) |
---|
| 112 | os=-sco3.2v4 |
---|
[539266] | 113 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
---|
[6afd7c] | 114 | ;; |
---|
| 115 | -sco3.2.[4-9]*) |
---|
| 116 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` |
---|
[539266] | 117 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
---|
[6afd7c] | 118 | ;; |
---|
| 119 | -sco3.2v[4-9]*) |
---|
| 120 | # Don't forget version if it is 3.2v4 or newer. |
---|
[539266] | 121 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
---|
[6afd7c] | 122 | ;; |
---|
| 123 | -sco*) |
---|
| 124 | os=-sco3.2v2 |
---|
[539266] | 125 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
---|
[6afd7c] | 126 | ;; |
---|
| 127 | -isc) |
---|
| 128 | os=-isc2.2 |
---|
[539266] | 129 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
---|
[6afd7c] | 130 | ;; |
---|
| 131 | -clix*) |
---|
| 132 | basic_machine=clipper-intergraph |
---|
| 133 | ;; |
---|
| 134 | -isc*) |
---|
[539266] | 135 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
---|
[6afd7c] | 136 | ;; |
---|
| 137 | -lynx*) |
---|
| 138 | os=-lynxos |
---|
| 139 | ;; |
---|
| 140 | -ptx*) |
---|
| 141 | basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` |
---|
| 142 | ;; |
---|
| 143 | -windowsnt*) |
---|
| 144 | os=`echo $os | sed -e 's/windowsnt/winnt/'` |
---|
| 145 | ;; |
---|
[539266] | 146 | -psos*) |
---|
| 147 | os=-psos |
---|
| 148 | ;; |
---|
[6afd7c] | 149 | esac |
---|
| 150 | |
---|
| 151 | # Decode aliases for certain CPU-COMPANY combinations. |
---|
| 152 | case $basic_machine in |
---|
| 153 | # Recognize the basic CPU types without company name. |
---|
| 154 | # Some are omitted here because they have special meanings below. |
---|
[539266] | 155 | tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ |
---|
| 156 | | arme[lb] | pyramid | mn10200 | mn10300 \ |
---|
| 157 | | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ |
---|
| 158 | | hppa2.0 \ |
---|
| 159 | | alpha | alphaev5 | alphaev56 | ev6 | we32k | ns16k | clipper \ |
---|
| 160 | | i370 | sh | powerpc | powerpcle | powerpc64 | 1750a | dsp16xx | pdp11 \ |
---|
| 161 | | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ |
---|
| 162 | | mipstx39 | mipstx39el \ |
---|
| 163 | | sparc | sparclet | sparclite | sparc64 | v850) |
---|
[6afd7c] | 164 | basic_machine=$basic_machine-unknown |
---|
| 165 | ;; |
---|
[539266] | 166 | sparcv[89] | supersparc | microsparc | ultrasparc) |
---|
[6afd7c] | 167 | basic_machine=$basic_machine-unknown |
---|
| 168 | ;; |
---|
[539266] | 169 | # We use `pc' rather than `unknown' |
---|
| 170 | # because (1) that's what they normally are, and |
---|
| 171 | # (2) the word "unknown" tends to confuse beginning users. |
---|
| 172 | i[34]86 | pentium[23] | k5 | k6 | k6[23] | athlon) |
---|
| 173 | basic_machine=$basic_machine-pc |
---|
| 174 | ;; |
---|
[6afd7c] | 175 | # Object if more than one company name word. |
---|
| 176 | *-*-*) |
---|
| 177 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 |
---|
| 178 | exit 1 |
---|
| 179 | ;; |
---|
| 180 | # Recognize the basic CPU types with company name. |
---|
[539266] | 181 | vax-* | tahoe-* | i[34]86-* | pentium[23]-* | i860-* | m32r-* | m68k-* | m68000-* \ |
---|
| 182 | | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ |
---|
| 183 | | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ |
---|
| 184 | | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ |
---|
| 185 | | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \ |
---|
| 186 | | alpha-* | alphaev5-* | alphaev56-* | alphaev6-* | we32k-* | cydra-* \ |
---|
| 187 | | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ |
---|
| 188 | | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* | powerpc64-* \ |
---|
| 189 | | sparc64-* | mips64-* | mipsel-* \ |
---|
| 190 | | mips64el-* | mips64orion-* | mips64orionel-* \ |
---|
| 191 | | mipstx39-* | mipstx39el-* \ |
---|
| 192 | | f301-* | k6-* | k6[23]-* | athlon-*) |
---|
| 193 | ;; |
---|
| 194 | sparcv[89]-* | supersparc-* | microsparc-* | ultrasparc-*) |
---|
[6afd7c] | 195 | ;; |
---|
| 196 | # Recognize the various machine names and aliases which stand |
---|
| 197 | # for a CPU type and a company and sometimes even an OS. |
---|
| 198 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) |
---|
| 199 | basic_machine=m68000-att |
---|
| 200 | ;; |
---|
| 201 | 3b*) |
---|
| 202 | basic_machine=we32k-att |
---|
| 203 | ;; |
---|
| 204 | alliant | fx80) |
---|
| 205 | basic_machine=fx80-alliant |
---|
| 206 | ;; |
---|
| 207 | altos | altos3068) |
---|
| 208 | basic_machine=m68k-altos |
---|
| 209 | ;; |
---|
| 210 | am29k) |
---|
| 211 | basic_machine=a29k-none |
---|
| 212 | os=-bsd |
---|
| 213 | ;; |
---|
| 214 | amdahl) |
---|
| 215 | basic_machine=580-amdahl |
---|
| 216 | os=-sysv |
---|
| 217 | ;; |
---|
| 218 | amiga | amiga-*) |
---|
| 219 | basic_machine=m68k-cbm |
---|
| 220 | ;; |
---|
[539266] | 221 | amigaos | amigados) |
---|
[6afd7c] | 222 | basic_machine=m68k-cbm |
---|
[539266] | 223 | os=-amigaos |
---|
[6afd7c] | 224 | ;; |
---|
| 225 | amigaunix | amix) |
---|
| 226 | basic_machine=m68k-cbm |
---|
| 227 | os=-sysv4 |
---|
| 228 | ;; |
---|
| 229 | apollo68) |
---|
| 230 | basic_machine=m68k-apollo |
---|
| 231 | os=-sysv |
---|
| 232 | ;; |
---|
[539266] | 233 | aux) |
---|
| 234 | basic_machine=m68k-apple |
---|
| 235 | os=-aux |
---|
[6afd7c] | 236 | ;; |
---|
| 237 | balance) |
---|
| 238 | basic_machine=ns32k-sequent |
---|
| 239 | os=-dynix |
---|
| 240 | ;; |
---|
| 241 | convex-c1) |
---|
| 242 | basic_machine=c1-convex |
---|
| 243 | os=-bsd |
---|
| 244 | ;; |
---|
| 245 | convex-c2) |
---|
| 246 | basic_machine=c2-convex |
---|
| 247 | os=-bsd |
---|
| 248 | ;; |
---|
| 249 | convex-c32) |
---|
| 250 | basic_machine=c32-convex |
---|
| 251 | os=-bsd |
---|
| 252 | ;; |
---|
| 253 | convex-c34) |
---|
| 254 | basic_machine=c34-convex |
---|
| 255 | os=-bsd |
---|
| 256 | ;; |
---|
| 257 | convex-c38) |
---|
| 258 | basic_machine=c38-convex |
---|
| 259 | os=-bsd |
---|
| 260 | ;; |
---|
| 261 | cray | ymp) |
---|
| 262 | basic_machine=ymp-cray |
---|
| 263 | os=-unicos |
---|
| 264 | ;; |
---|
| 265 | cray2) |
---|
| 266 | basic_machine=cray2-cray |
---|
| 267 | os=-unicos |
---|
| 268 | ;; |
---|
[539266] | 269 | [ctj]90-cray) |
---|
| 270 | basic_machine=c90-cray |
---|
| 271 | os=-unicos |
---|
| 272 | ;; |
---|
[6afd7c] | 273 | crds | unos) |
---|
| 274 | basic_machine=m68k-crds |
---|
| 275 | ;; |
---|
| 276 | da30 | da30-*) |
---|
| 277 | basic_machine=m68k-da30 |
---|
| 278 | ;; |
---|
| 279 | decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) |
---|
| 280 | basic_machine=mips-dec |
---|
| 281 | ;; |
---|
| 282 | delta | 3300 | motorola-3300 | motorola-delta \ |
---|
| 283 | | 3300-motorola | delta-motorola) |
---|
| 284 | basic_machine=m68k-motorola |
---|
| 285 | ;; |
---|
| 286 | delta88) |
---|
| 287 | basic_machine=m88k-motorola |
---|
| 288 | os=-sysv3 |
---|
| 289 | ;; |
---|
| 290 | dpx20 | dpx20-*) |
---|
| 291 | basic_machine=rs6000-bull |
---|
| 292 | os=-bosx |
---|
| 293 | ;; |
---|
| 294 | dpx2* | dpx2*-bull) |
---|
| 295 | basic_machine=m68k-bull |
---|
| 296 | os=-sysv3 |
---|
| 297 | ;; |
---|
| 298 | ebmon29k) |
---|
| 299 | basic_machine=a29k-amd |
---|
| 300 | os=-ebmon |
---|
| 301 | ;; |
---|
| 302 | elxsi) |
---|
| 303 | basic_machine=elxsi-elxsi |
---|
| 304 | os=-bsd |
---|
| 305 | ;; |
---|
| 306 | encore | umax | mmax) |
---|
| 307 | basic_machine=ns32k-encore |
---|
| 308 | ;; |
---|
| 309 | fx2800) |
---|
| 310 | basic_machine=i860-alliant |
---|
| 311 | ;; |
---|
| 312 | genix) |
---|
| 313 | basic_machine=ns32k-ns |
---|
| 314 | ;; |
---|
| 315 | gmicro) |
---|
| 316 | basic_machine=tron-gmicro |
---|
| 317 | os=-sysv |
---|
| 318 | ;; |
---|
| 319 | h3050r* | hiux*) |
---|
| 320 | basic_machine=hppa1.1-hitachi |
---|
| 321 | os=-hiuxwe2 |
---|
| 322 | ;; |
---|
| 323 | h8300hms) |
---|
| 324 | basic_machine=h8300-hitachi |
---|
| 325 | os=-hms |
---|
| 326 | ;; |
---|
| 327 | harris) |
---|
| 328 | basic_machine=m88k-harris |
---|
| 329 | os=-sysv3 |
---|
| 330 | ;; |
---|
| 331 | hp300-*) |
---|
| 332 | basic_machine=m68k-hp |
---|
| 333 | ;; |
---|
| 334 | hp300bsd) |
---|
| 335 | basic_machine=m68k-hp |
---|
| 336 | os=-bsd |
---|
| 337 | ;; |
---|
| 338 | hp300hpux) |
---|
| 339 | basic_machine=m68k-hp |
---|
| 340 | os=-hpux |
---|
| 341 | ;; |
---|
| 342 | hp9k2[0-9][0-9] | hp9k31[0-9]) |
---|
| 343 | basic_machine=m68000-hp |
---|
| 344 | ;; |
---|
| 345 | hp9k3[2-9][0-9]) |
---|
| 346 | basic_machine=m68k-hp |
---|
| 347 | ;; |
---|
| 348 | hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) |
---|
| 349 | basic_machine=hppa1.1-hp |
---|
| 350 | ;; |
---|
| 351 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) |
---|
| 352 | basic_machine=hppa1.0-hp |
---|
| 353 | ;; |
---|
[539266] | 354 | hppa-next) |
---|
| 355 | os=-nextstep3 |
---|
[6afd7c] | 356 | ;; |
---|
| 357 | i370-ibm* | ibm*) |
---|
| 358 | basic_machine=i370-ibm |
---|
| 359 | os=-mvs |
---|
| 360 | ;; |
---|
| 361 | # I'm not sure what "Sysv32" means. Should this be sysv3.2? |
---|
| 362 | i[3456]86v32) |
---|
[539266] | 363 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
---|
[6afd7c] | 364 | os=-sysv32 |
---|
| 365 | ;; |
---|
| 366 | i[3456]86v4*) |
---|
[539266] | 367 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
---|
[6afd7c] | 368 | os=-sysv4 |
---|
| 369 | ;; |
---|
| 370 | i[3456]86v) |
---|
[539266] | 371 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
---|
[6afd7c] | 372 | os=-sysv |
---|
| 373 | ;; |
---|
| 374 | i[3456]86sol2) |
---|
[539266] | 375 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` |
---|
[6afd7c] | 376 | os=-solaris2 |
---|
| 377 | ;; |
---|
| 378 | iris | iris4d) |
---|
| 379 | basic_machine=mips-sgi |
---|
| 380 | case $os in |
---|
| 381 | -irix*) |
---|
| 382 | ;; |
---|
| 383 | *) |
---|
| 384 | os=-irix4 |
---|
| 385 | ;; |
---|
| 386 | esac |
---|
| 387 | ;; |
---|
| 388 | isi68 | isi) |
---|
| 389 | basic_machine=m68k-isi |
---|
| 390 | os=-sysv |
---|
| 391 | ;; |
---|
[539266] | 392 | macppc*) |
---|
| 393 | basic_machine=powerpc-apple |
---|
| 394 | ;; |
---|
[6afd7c] | 395 | m88k-omron*) |
---|
| 396 | basic_machine=m88k-omron |
---|
| 397 | ;; |
---|
| 398 | magnum | m3230) |
---|
| 399 | basic_machine=mips-mips |
---|
| 400 | os=-sysv |
---|
| 401 | ;; |
---|
| 402 | merlin) |
---|
| 403 | basic_machine=ns32k-utek |
---|
| 404 | os=-sysv |
---|
| 405 | ;; |
---|
| 406 | miniframe) |
---|
| 407 | basic_machine=m68000-convergent |
---|
| 408 | ;; |
---|
[539266] | 409 | mipsel*-linux*) |
---|
| 410 | basic_machine=mipsel-unknown |
---|
| 411 | os=-linux-gnu |
---|
| 412 | ;; |
---|
| 413 | mips*-linux*) |
---|
| 414 | basic_machine=mips-unknown |
---|
| 415 | os=-linux-gnu |
---|
| 416 | ;; |
---|
[6afd7c] | 417 | mips3*-*) |
---|
| 418 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` |
---|
| 419 | ;; |
---|
| 420 | mips3*) |
---|
| 421 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown |
---|
| 422 | ;; |
---|
| 423 | ncr3000) |
---|
| 424 | basic_machine=i486-ncr |
---|
| 425 | os=-sysv4 |
---|
| 426 | ;; |
---|
| 427 | news | news700 | news800 | news900) |
---|
| 428 | basic_machine=m68k-sony |
---|
| 429 | os=-newsos |
---|
| 430 | ;; |
---|
| 431 | news1000) |
---|
| 432 | basic_machine=m68030-sony |
---|
| 433 | os=-newsos |
---|
| 434 | ;; |
---|
| 435 | news-3600 | risc-news) |
---|
| 436 | basic_machine=mips-sony |
---|
| 437 | os=-newsos |
---|
| 438 | ;; |
---|
| 439 | next | m*-next ) |
---|
| 440 | basic_machine=m68k-next |
---|
| 441 | case $os in |
---|
| 442 | -nextstep* ) |
---|
| 443 | ;; |
---|
| 444 | -ns2*) |
---|
| 445 | os=-nextstep2 |
---|
| 446 | ;; |
---|
| 447 | *) |
---|
| 448 | os=-nextstep3 |
---|
| 449 | ;; |
---|
| 450 | esac |
---|
| 451 | ;; |
---|
| 452 | nh3000) |
---|
| 453 | basic_machine=m68k-harris |
---|
| 454 | os=-cxux |
---|
| 455 | ;; |
---|
| 456 | nh[45]000) |
---|
| 457 | basic_machine=m88k-harris |
---|
| 458 | os=-cxux |
---|
| 459 | ;; |
---|
| 460 | nindy960) |
---|
| 461 | basic_machine=i960-intel |
---|
| 462 | os=-nindy |
---|
| 463 | ;; |
---|
| 464 | np1) |
---|
| 465 | basic_machine=np1-gould |
---|
| 466 | ;; |
---|
| 467 | pa-hitachi) |
---|
| 468 | basic_machine=hppa1.1-hitachi |
---|
| 469 | os=-hiuxwe2 |
---|
| 470 | ;; |
---|
| 471 | paragon) |
---|
| 472 | basic_machine=i860-intel |
---|
| 473 | os=-osf |
---|
| 474 | ;; |
---|
| 475 | pbd) |
---|
| 476 | basic_machine=sparc-tti |
---|
| 477 | ;; |
---|
| 478 | pbb) |
---|
| 479 | basic_machine=m68k-tti |
---|
| 480 | ;; |
---|
| 481 | pc532 | pc532-*) |
---|
| 482 | basic_machine=ns32k-pc532 |
---|
| 483 | ;; |
---|
[539266] | 484 | pentiummmx | p55) |
---|
| 485 | basic_machine=pentiummmx-pc |
---|
| 486 | ;; |
---|
| 487 | pentium | p5 | i586) |
---|
| 488 | basic_machine=pentium-pc |
---|
[6afd7c] | 489 | ;; |
---|
| 490 | pentiumpro | p6) |
---|
[539266] | 491 | basic_machine=pentiumpro-pc |
---|
[6afd7c] | 492 | ;; |
---|
[539266] | 493 | pentiummmx-* | p55-*) |
---|
| 494 | basic_machine=pentiummmx-`echo $basic_machine | sed 's/^[^-]*-//'` |
---|
[6afd7c] | 495 | ;; |
---|
[539266] | 496 | pentium-* | p5-* | i586-*) |
---|
| 497 | basic_machine=pentium-`echo $basic_machine | sed 's/^[^-]*-//'` |
---|
[6afd7c] | 498 | ;; |
---|
[539266] | 499 | pentiumpro-* | p6-*) |
---|
| 500 | basic_machine=pentiumpro-`echo $basic_machine | sed 's/^[^-]*-//'` |
---|
[6afd7c] | 501 | ;; |
---|
[539266] | 502 | nexen) |
---|
[6afd7c] | 503 | # We don't have specific support for Nexgen yet, so just call it a Pentium |
---|
| 504 | basic_machine=i586-nexgen |
---|
| 505 | ;; |
---|
| 506 | pn) |
---|
| 507 | basic_machine=pn-gould |
---|
| 508 | ;; |
---|
| 509 | power) basic_machine=rs6000-ibm |
---|
| 510 | ;; |
---|
| 511 | ppc) basic_machine=powerpc-unknown |
---|
| 512 | ;; |
---|
| 513 | ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` |
---|
| 514 | ;; |
---|
[539266] | 515 | ppc64) basic_machine=powerpc64-unknown |
---|
| 516 | ;; |
---|
| 517 | ppc64-*) |
---|
| 518 | basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` |
---|
| 519 | ;; |
---|
[6afd7c] | 520 | ppcle | powerpclittle | ppc-le | powerpc-little) |
---|
| 521 | basic_machine=powerpcle-unknown |
---|
| 522 | ;; |
---|
| 523 | ppcle-* | powerpclittle-*) |
---|
| 524 | basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` |
---|
| 525 | ;; |
---|
| 526 | ps2) |
---|
| 527 | basic_machine=i386-ibm |
---|
| 528 | ;; |
---|
| 529 | rm[46]00) |
---|
| 530 | basic_machine=mips-siemens |
---|
| 531 | ;; |
---|
| 532 | rtpc | rtpc-*) |
---|
| 533 | basic_machine=romp-ibm |
---|
| 534 | ;; |
---|
| 535 | sequent) |
---|
| 536 | basic_machine=i386-sequent |
---|
| 537 | ;; |
---|
| 538 | sh) |
---|
| 539 | basic_machine=sh-hitachi |
---|
| 540 | os=-hms |
---|
| 541 | ;; |
---|
| 542 | sps7) |
---|
| 543 | basic_machine=m68k-bull |
---|
| 544 | os=-sysv2 |
---|
| 545 | ;; |
---|
| 546 | spur) |
---|
| 547 | basic_machine=spur-unknown |
---|
| 548 | ;; |
---|
| 549 | sun2) |
---|
| 550 | basic_machine=m68000-sun |
---|
| 551 | ;; |
---|
| 552 | sun2os3) |
---|
| 553 | basic_machine=m68000-sun |
---|
| 554 | os=-sunos3 |
---|
| 555 | ;; |
---|
| 556 | sun2os4) |
---|
| 557 | basic_machine=m68000-sun |
---|
| 558 | os=-sunos4 |
---|
| 559 | ;; |
---|
| 560 | sun3os3) |
---|
| 561 | basic_machine=m68k-sun |
---|
| 562 | os=-sunos3 |
---|
| 563 | ;; |
---|
| 564 | sun3os4) |
---|
| 565 | basic_machine=m68k-sun |
---|
| 566 | os=-sunos4 |
---|
| 567 | ;; |
---|
| 568 | sun4os3) |
---|
| 569 | basic_machine=sparc-sun |
---|
| 570 | os=-sunos3 |
---|
| 571 | ;; |
---|
| 572 | sun4os4) |
---|
| 573 | basic_machine=sparc-sun |
---|
| 574 | os=-sunos4 |
---|
| 575 | ;; |
---|
| 576 | sun4sol2) |
---|
| 577 | basic_machine=sparc-sun |
---|
| 578 | os=-solaris2 |
---|
| 579 | ;; |
---|
| 580 | sun3 | sun3-*) |
---|
| 581 | basic_machine=m68k-sun |
---|
| 582 | ;; |
---|
| 583 | sun4) |
---|
| 584 | basic_machine=sparc-sun |
---|
| 585 | ;; |
---|
| 586 | sun386 | sun386i | roadrunner) |
---|
| 587 | basic_machine=i386-sun |
---|
| 588 | ;; |
---|
| 589 | symmetry) |
---|
| 590 | basic_machine=i386-sequent |
---|
| 591 | os=-dynix |
---|
| 592 | ;; |
---|
[539266] | 593 | tx39) |
---|
| 594 | basic_machine=mipstx39-unknown |
---|
| 595 | ;; |
---|
| 596 | tx39el) |
---|
| 597 | basic_machine=mipstx39el-unknown |
---|
| 598 | ;; |
---|
[6afd7c] | 599 | tower | tower-32) |
---|
| 600 | basic_machine=m68k-ncr |
---|
| 601 | ;; |
---|
| 602 | udi29k) |
---|
| 603 | basic_machine=a29k-amd |
---|
| 604 | os=-udi |
---|
| 605 | ;; |
---|
| 606 | ultra3) |
---|
| 607 | basic_machine=a29k-nyu |
---|
| 608 | os=-sym1 |
---|
| 609 | ;; |
---|
| 610 | vaxv) |
---|
| 611 | basic_machine=vax-dec |
---|
| 612 | os=-sysv |
---|
| 613 | ;; |
---|
| 614 | vms) |
---|
| 615 | basic_machine=vax-dec |
---|
| 616 | os=-vms |
---|
| 617 | ;; |
---|
[539266] | 618 | vpp*|vx|vx-*) |
---|
| 619 | basic_machine=f301-fujitsu |
---|
| 620 | ;; |
---|
[6afd7c] | 621 | vxworks960) |
---|
| 622 | basic_machine=i960-wrs |
---|
| 623 | os=-vxworks |
---|
| 624 | ;; |
---|
| 625 | vxworks68) |
---|
| 626 | basic_machine=m68k-wrs |
---|
| 627 | os=-vxworks |
---|
| 628 | ;; |
---|
[539266] | 629 | vxworks29k) |
---|
| 630 | basic_machine=a29k-wrs |
---|
| 631 | os=-vxworks |
---|
[6afd7c] | 632 | ;; |
---|
| 633 | xmp) |
---|
| 634 | basic_machine=xmp-cray |
---|
| 635 | os=-unicos |
---|
| 636 | ;; |
---|
| 637 | xps | xps100) |
---|
| 638 | basic_machine=xps100-honeywell |
---|
| 639 | ;; |
---|
| 640 | none) |
---|
| 641 | basic_machine=none-none |
---|
| 642 | os=-none |
---|
| 643 | ;; |
---|
| 644 | |
---|
| 645 | # Here we handle the default manufacturer of certain CPU types. It is in |
---|
| 646 | # some cases the only manufacturer, in others, it is the most popular. |
---|
| 647 | mips) |
---|
[539266] | 648 | if [ x$os = x-linux-gnu ]; then |
---|
| 649 | basic_machine=mips-unknown |
---|
| 650 | else |
---|
| 651 | basic_machine=mips-mips |
---|
| 652 | fi |
---|
[6afd7c] | 653 | ;; |
---|
| 654 | romp) |
---|
| 655 | basic_machine=romp-ibm |
---|
| 656 | ;; |
---|
| 657 | rs6000) |
---|
| 658 | basic_machine=rs6000-ibm |
---|
| 659 | ;; |
---|
| 660 | vax) |
---|
| 661 | basic_machine=vax-dec |
---|
| 662 | ;; |
---|
| 663 | pdp11) |
---|
| 664 | basic_machine=pdp11-dec |
---|
| 665 | ;; |
---|
| 666 | we32k) |
---|
| 667 | basic_machine=we32k-att |
---|
| 668 | ;; |
---|
| 669 | sparc) |
---|
| 670 | basic_machine=sparc-sun |
---|
| 671 | ;; |
---|
| 672 | cydra) |
---|
| 673 | basic_machine=cydra-cydrome |
---|
| 674 | ;; |
---|
| 675 | orion) |
---|
| 676 | basic_machine=orion-highlevel |
---|
| 677 | ;; |
---|
| 678 | orion105) |
---|
| 679 | basic_machine=clipper-highlevel |
---|
| 680 | ;; |
---|
| 681 | *) |
---|
| 682 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 |
---|
| 683 | exit 1 |
---|
| 684 | ;; |
---|
| 685 | esac |
---|
| 686 | |
---|
| 687 | # Here we canonicalize certain aliases for manufacturers. |
---|
| 688 | case $basic_machine in |
---|
| 689 | *-digital*) |
---|
| 690 | basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` |
---|
| 691 | ;; |
---|
| 692 | *-commodore*) |
---|
| 693 | basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` |
---|
| 694 | ;; |
---|
| 695 | *) |
---|
| 696 | ;; |
---|
| 697 | esac |
---|
| 698 | |
---|
| 699 | # Decode manufacturer-specific aliases for certain operating systems. |
---|
| 700 | |
---|
| 701 | if [ x"$os" != x"" ] |
---|
| 702 | then |
---|
| 703 | case $os in |
---|
[539266] | 704 | # First match some system type aliases |
---|
| 705 | # that might get confused with valid system types. |
---|
[6afd7c] | 706 | # -solaris* is a basic system type, with this one exception. |
---|
| 707 | -solaris1 | -solaris1.*) |
---|
| 708 | os=`echo $os | sed -e 's|solaris1|sunos4|'` |
---|
| 709 | ;; |
---|
| 710 | -solaris) |
---|
| 711 | os=-solaris2 |
---|
| 712 | ;; |
---|
[539266] | 713 | -svr4*) |
---|
[6afd7c] | 714 | os=-sysv4 |
---|
| 715 | ;; |
---|
[539266] | 716 | -unixware*) |
---|
| 717 | os=-sysv4.2uw |
---|
| 718 | ;; |
---|
[6afd7c] | 719 | -gnu/linux*) |
---|
[539266] | 720 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` |
---|
[6afd7c] | 721 | ;; |
---|
| 722 | # First accept the basic system types. |
---|
| 723 | # The portable systems comes first. |
---|
[539266] | 724 | # Each alternative MUST END IN A *, to match a version number. |
---|
[6afd7c] | 725 | # -sysv* is not here because it comes later, after sysvr4. |
---|
[539266] | 726 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ |
---|
| 727 | | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ |
---|
[6afd7c] | 728 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ |
---|
[539266] | 729 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ |
---|
| 730 | | -aos* \ |
---|
| 731 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ |
---|
| 732 | | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ |
---|
| 733 | | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ |
---|
[6afd7c] | 734 | | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ |
---|
[539266] | 735 | | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ |
---|
| 736 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ |
---|
| 737 | | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ |
---|
| 738 | | -mingw32* | -linux-gnu* | -uxpv*) |
---|
| 739 | # Remember, each alternative MUST END IN *, to match a version number. |
---|
[6afd7c] | 740 | ;; |
---|
[539266] | 741 | -linux*) |
---|
| 742 | os=`echo $os | sed -e 's|linux|linux-gnu|'` |
---|
[6afd7c] | 743 | ;; |
---|
| 744 | -sunos5*) |
---|
| 745 | os=`echo $os | sed -e 's|sunos5|solaris2|'` |
---|
| 746 | ;; |
---|
| 747 | -sunos6*) |
---|
| 748 | os=`echo $os | sed -e 's|sunos6|solaris3|'` |
---|
| 749 | ;; |
---|
| 750 | -osfrose*) |
---|
| 751 | os=-osfrose |
---|
| 752 | ;; |
---|
| 753 | -osf*) |
---|
| 754 | os=-osf |
---|
| 755 | ;; |
---|
| 756 | -utek*) |
---|
| 757 | os=-bsd |
---|
| 758 | ;; |
---|
| 759 | -dynix*) |
---|
| 760 | os=-bsd |
---|
| 761 | ;; |
---|
| 762 | -acis*) |
---|
| 763 | os=-aos |
---|
| 764 | ;; |
---|
| 765 | -ctix* | -uts*) |
---|
| 766 | os=-sysv |
---|
| 767 | ;; |
---|
[539266] | 768 | -ns2 ) |
---|
| 769 | os=-nextstep2 |
---|
| 770 | ;; |
---|
[6afd7c] | 771 | # Preserve the version number of sinix5. |
---|
| 772 | -sinix5.*) |
---|
| 773 | os=`echo $os | sed -e 's|sinix|sysv|'` |
---|
| 774 | ;; |
---|
| 775 | -sinix*) |
---|
| 776 | os=-sysv4 |
---|
| 777 | ;; |
---|
| 778 | -triton*) |
---|
| 779 | os=-sysv3 |
---|
| 780 | ;; |
---|
| 781 | -oss*) |
---|
| 782 | os=-sysv3 |
---|
| 783 | ;; |
---|
| 784 | -svr4) |
---|
| 785 | os=-sysv4 |
---|
| 786 | ;; |
---|
| 787 | -svr3) |
---|
| 788 | os=-sysv3 |
---|
| 789 | ;; |
---|
| 790 | -sysvr4) |
---|
| 791 | os=-sysv4 |
---|
| 792 | ;; |
---|
| 793 | # This must come after -sysvr4. |
---|
| 794 | -sysv*) |
---|
| 795 | ;; |
---|
| 796 | -xenix) |
---|
| 797 | os=-xenix |
---|
| 798 | ;; |
---|
| 799 | -none) |
---|
| 800 | ;; |
---|
| 801 | *) |
---|
| 802 | # Get rid of the `-' at the beginning of $os. |
---|
| 803 | os=`echo $os | sed 's/[^-]*-//'` |
---|
| 804 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 |
---|
| 805 | exit 1 |
---|
| 806 | ;; |
---|
| 807 | esac |
---|
| 808 | else |
---|
| 809 | |
---|
| 810 | # Here we handle the default operating systems that come with various machines. |
---|
| 811 | # The value should be what the vendor currently ships out the door with their |
---|
| 812 | # machine or put another way, the most popular os provided with the machine. |
---|
| 813 | |
---|
| 814 | # Note that if you're going to try to match "-MANUFACTURER" here (say, |
---|
| 815 | # "-sun"), then you have to tell the case statement up towards the top |
---|
| 816 | # that MANUFACTURER isn't an operating system. Otherwise, code above |
---|
| 817 | # will signal an error saying that MANUFACTURER isn't an operating |
---|
| 818 | # system, and we'll never get to this point. |
---|
| 819 | |
---|
| 820 | case $basic_machine in |
---|
| 821 | *-acorn) |
---|
| 822 | os=-riscix1.2 |
---|
| 823 | ;; |
---|
[539266] | 824 | arm*-semi) |
---|
| 825 | os=-aout |
---|
| 826 | ;; |
---|
[6afd7c] | 827 | pdp11-*) |
---|
| 828 | os=-none |
---|
| 829 | ;; |
---|
| 830 | *-dec | vax-*) |
---|
| 831 | os=-ultrix4.2 |
---|
| 832 | ;; |
---|
| 833 | m68*-apollo) |
---|
| 834 | os=-domain |
---|
| 835 | ;; |
---|
| 836 | i386-sun) |
---|
| 837 | os=-sunos4.0.2 |
---|
| 838 | ;; |
---|
| 839 | m68000-sun) |
---|
| 840 | os=-sunos3 |
---|
| 841 | # This also exists in the configure program, but was not the |
---|
| 842 | # default. |
---|
| 843 | # os=-sunos4 |
---|
| 844 | ;; |
---|
| 845 | *-tti) # must be before sparc entry or we get the wrong os. |
---|
| 846 | os=-sysv3 |
---|
| 847 | ;; |
---|
| 848 | sparc-* | *-sun) |
---|
| 849 | os=-sunos4.1.1 |
---|
| 850 | ;; |
---|
| 851 | *-ibm) |
---|
| 852 | os=-aix |
---|
| 853 | ;; |
---|
| 854 | *-hp) |
---|
| 855 | os=-hpux |
---|
| 856 | ;; |
---|
| 857 | *-hitachi) |
---|
| 858 | os=-hiux |
---|
| 859 | ;; |
---|
| 860 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) |
---|
| 861 | os=-sysv |
---|
| 862 | ;; |
---|
| 863 | *-cbm) |
---|
[539266] | 864 | os=-amigaos |
---|
[6afd7c] | 865 | ;; |
---|
| 866 | *-dg) |
---|
| 867 | os=-dgux |
---|
| 868 | ;; |
---|
| 869 | *-dolphin) |
---|
| 870 | os=-sysv3 |
---|
| 871 | ;; |
---|
| 872 | m68k-ccur) |
---|
| 873 | os=-rtu |
---|
| 874 | ;; |
---|
| 875 | m88k-omron*) |
---|
| 876 | os=-luna |
---|
| 877 | ;; |
---|
[539266] | 878 | *-next ) |
---|
| 879 | os=-nextstep |
---|
| 880 | ;; |
---|
[6afd7c] | 881 | *-sequent) |
---|
| 882 | os=-ptx |
---|
| 883 | ;; |
---|
| 884 | *-crds) |
---|
| 885 | os=-unos |
---|
| 886 | ;; |
---|
| 887 | *-ns) |
---|
| 888 | os=-genix |
---|
| 889 | ;; |
---|
| 890 | i370-*) |
---|
| 891 | os=-mvs |
---|
| 892 | ;; |
---|
| 893 | *-next) |
---|
| 894 | os=-nextstep3 |
---|
| 895 | ;; |
---|
| 896 | *-gould) |
---|
| 897 | os=-sysv |
---|
| 898 | ;; |
---|
| 899 | *-highlevel) |
---|
| 900 | os=-bsd |
---|
| 901 | ;; |
---|
| 902 | *-encore) |
---|
| 903 | os=-bsd |
---|
| 904 | ;; |
---|
| 905 | *-sgi) |
---|
| 906 | os=-irix |
---|
| 907 | ;; |
---|
| 908 | *-siemens) |
---|
| 909 | os=-sysv4 |
---|
| 910 | ;; |
---|
| 911 | *-masscomp) |
---|
| 912 | os=-rtu |
---|
| 913 | ;; |
---|
[539266] | 914 | f301-fujitsu) |
---|
| 915 | os=-uxpv |
---|
[6afd7c] | 916 | ;; |
---|
| 917 | *) |
---|
| 918 | os=-none |
---|
| 919 | ;; |
---|
| 920 | esac |
---|
| 921 | fi |
---|
| 922 | |
---|
| 923 | # Here we handle the case where we know the os, and the CPU type, but not the |
---|
| 924 | # manufacturer. We pick the logical manufacturer. |
---|
| 925 | vendor=unknown |
---|
| 926 | case $basic_machine in |
---|
| 927 | *-unknown) |
---|
| 928 | case $os in |
---|
| 929 | -riscix*) |
---|
| 930 | vendor=acorn |
---|
| 931 | ;; |
---|
| 932 | -sunos*) |
---|
| 933 | vendor=sun |
---|
| 934 | ;; |
---|
| 935 | -aix*) |
---|
| 936 | vendor=ibm |
---|
| 937 | ;; |
---|
| 938 | -hpux*) |
---|
| 939 | vendor=hp |
---|
| 940 | ;; |
---|
| 941 | -hiux*) |
---|
| 942 | vendor=hitachi |
---|
| 943 | ;; |
---|
| 944 | -unos*) |
---|
| 945 | vendor=crds |
---|
| 946 | ;; |
---|
| 947 | -dgux*) |
---|
| 948 | vendor=dg |
---|
| 949 | ;; |
---|
| 950 | -luna*) |
---|
| 951 | vendor=omron |
---|
| 952 | ;; |
---|
| 953 | -genix*) |
---|
| 954 | vendor=ns |
---|
| 955 | ;; |
---|
| 956 | -mvs*) |
---|
| 957 | vendor=ibm |
---|
| 958 | ;; |
---|
| 959 | -ptx*) |
---|
| 960 | vendor=sequent |
---|
| 961 | ;; |
---|
[539266] | 962 | -vxsim* | -vxworks*) |
---|
[6afd7c] | 963 | vendor=wrs |
---|
| 964 | ;; |
---|
[539266] | 965 | -aux*) |
---|
[6afd7c] | 966 | vendor=apple |
---|
| 967 | ;; |
---|
| 968 | esac |
---|
| 969 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` |
---|
| 970 | ;; |
---|
| 971 | esac |
---|
| 972 | |
---|
| 973 | echo $basic_machine$os |
---|