Mercurial > hg > early-roguelike
comparison rogue5/config.sub @ 33:f502bf60e6e4
Import Rogue 5.4 from the Roguelike Restoration Project (r1490)
| author | elwin |
|---|---|
| date | Mon, 24 May 2010 20:10:59 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 32:2dcd75e6a736 | 33:f502bf60e6e4 |
|---|---|
| 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 Free Software Foundation, | |
| 5 # Inc. | |
| 6 | |
| 7 timestamp='2006-07-02' | |
| 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 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 # This file is supposed to be the same for all GNU packages | |
| 43 # and recognize all the CPU types, system types and aliases | |
| 44 # that are meaningful with *any* GNU software. | |
| 45 # Each package is responsible for reporting which valid configurations | |
| 46 # it does not support. The user should be able to distinguish | |
| 47 # a failure to support a valid configuration from a meaningless | |
| 48 # configuration. | |
| 49 | |
| 50 # The goal of this file is to map all the various variations of a given | |
| 51 # machine specification into a single specification in the form: | |
| 52 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM | |
| 53 # or in some cases, the newer four-part form: | |
| 54 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM | |
| 55 # It is wrong to echo any other type of specification. | |
| 56 | |
| 57 me=`echo "$0" | sed -e 's,.*/,,'` | |
| 58 | |
| 59 usage="\ | |
| 60 Usage: $0 [OPTION] CPU-MFR-OPSYS | |
| 61 $0 [OPTION] ALIAS | |
| 62 | |
| 63 Canonicalize a configuration name. | |
| 64 | |
| 65 Operation modes: | |
| 66 -h, --help print this help, then exit | |
| 67 -t, --time-stamp print date of last modification, then exit | |
| 68 -v, --version print version number, then exit | |
| 69 | |
| 70 Report bugs and patches to <config-patches@gnu.org>." | |
| 71 | |
| 72 version="\ | |
| 73 GNU config.sub ($timestamp) | |
| 74 | |
| 75 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 | |
| 76 Free Software Foundation, Inc. | |
| 77 | |
| 78 This is free software; see the source for copying conditions. There is NO | |
| 79 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | |
| 80 | |
| 81 help=" | |
| 82 Try \`$me --help' for more information." | |
| 83 | |
| 84 # Parse command line | |
| 85 while test $# -gt 0 ; do | |
| 86 case $1 in | |
| 87 --time-stamp | --time* | -t ) | |
| 88 echo "$timestamp" ; exit ;; | |
| 89 --version | -v ) | |
| 90 echo "$version" ; exit ;; | |
| 91 --help | --h* | -h ) | |
| 92 echo "$usage"; exit ;; | |
| 93 -- ) # Stop option processing | |
| 94 shift; break ;; | |
| 95 - ) # Use stdin as input. | |
| 96 break ;; | |
| 97 -* ) | |
| 98 echo "$me: invalid option $1$help" | |
| 99 exit 1 ;; | |
| 100 | |
| 101 *local*) | |
| 102 # First pass through any local machine types. | |
| 103 echo $1 | |
| 104 exit ;; | |
| 105 | |
| 106 * ) | |
| 107 break ;; | |
| 108 esac | |
| 109 done | |
| 110 | |
| 111 case $# in | |
| 112 0) echo "$me: missing argument$help" >&2 | |
| 113 exit 1;; | |
| 114 1) ;; | |
| 115 *) echo "$me: too many arguments$help" >&2 | |
| 116 exit 1;; | |
| 117 esac | |
| 118 | |
| 119 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). | |
| 120 # Here we must recognize all the valid KERNEL-OS combinations. | |
| 121 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | |
| 122 case $maybe_os in | |
| 123 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ | |
| 124 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ | |
| 125 storm-chaos* | os2-emx* | rtmk-nova*) | |
| 126 os=-$maybe_os | |
| 127 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | |
| 128 ;; | |
| 129 *) | |
| 130 basic_machine=`echo $1 | sed 's/-[^-]*$//'` | |
| 131 if [ $basic_machine != $1 ] | |
| 132 then os=`echo $1 | sed 's/.*-/-/'` | |
| 133 else os=; fi | |
| 134 ;; | |
| 135 esac | |
| 136 | |
| 137 ### Let's recognize common machines as not being operating systems so | |
| 138 ### that things like config.sub decstation-3100 work. We also | |
| 139 ### recognize some manufacturers as not being operating systems, so we | |
| 140 ### can provide default operating systems below. | |
| 141 case $os in | |
| 142 -sun*os*) | |
| 143 # Prevent following clause from handling this invalid input. | |
| 144 ;; | |
| 145 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ | |
| 146 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ | |
| 147 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ | |
| 148 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ | |
| 149 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | |
| 150 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ | |
| 151 -apple | -axis | -knuth | -cray) | |
| 152 os= | |
| 153 basic_machine=$1 | |
| 154 ;; | |
| 155 -sim | -cisco | -oki | -wec | -winbond) | |
| 156 os= | |
| 157 basic_machine=$1 | |
| 158 ;; | |
| 159 -scout) | |
| 160 ;; | |
| 161 -wrs) | |
| 162 os=-vxworks | |
| 163 basic_machine=$1 | |
| 164 ;; | |
| 165 -chorusos*) | |
| 166 os=-chorusos | |
| 167 basic_machine=$1 | |
| 168 ;; | |
| 169 -chorusrdb) | |
| 170 os=-chorusrdb | |
| 171 basic_machine=$1 | |
| 172 ;; | |
| 173 -hiux*) | |
| 174 os=-hiuxwe2 | |
| 175 ;; | |
| 176 -sco6) | |
| 177 os=-sco5v6 | |
| 178 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 179 ;; | |
| 180 -sco5) | |
| 181 os=-sco3.2v5 | |
| 182 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 183 ;; | |
| 184 -sco4) | |
| 185 os=-sco3.2v4 | |
| 186 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 187 ;; | |
| 188 -sco3.2.[4-9]*) | |
| 189 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
| 190 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 191 ;; | |
| 192 -sco3.2v[4-9]*) | |
| 193 # Don't forget version if it is 3.2v4 or newer. | |
| 194 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 195 ;; | |
| 196 -sco5v6*) | |
| 197 # Don't forget version if it is 3.2v4 or newer. | |
| 198 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 199 ;; | |
| 200 -sco*) | |
| 201 os=-sco3.2v2 | |
| 202 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 203 ;; | |
| 204 -udk*) | |
| 205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 206 ;; | |
| 207 -isc) | |
| 208 os=-isc2.2 | |
| 209 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 210 ;; | |
| 211 -clix*) | |
| 212 basic_machine=clipper-intergraph | |
| 213 ;; | |
| 214 -isc*) | |
| 215 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
| 216 ;; | |
| 217 -lynx*) | |
| 218 os=-lynxos | |
| 219 ;; | |
| 220 -ptx*) | |
| 221 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` | |
| 222 ;; | |
| 223 -windowsnt*) | |
| 224 os=`echo $os | sed -e 's/windowsnt/winnt/'` | |
| 225 ;; | |
| 226 -psos*) | |
| 227 os=-psos | |
| 228 ;; | |
| 229 -mint | -mint[0-9]*) | |
| 230 basic_machine=m68k-atari | |
| 231 os=-mint | |
| 232 ;; | |
| 233 esac | |
| 234 | |
| 235 # Decode aliases for certain CPU-COMPANY combinations. | |
| 236 case $basic_machine in | |
| 237 # Recognize the basic CPU types without company name. | |
| 238 # Some are omitted here because they have special meanings below. | |
| 239 1750a | 580 \ | |
| 240 | a29k \ | |
| 241 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | |
| 242 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | |
| 243 | am33_2.0 \ | |
| 244 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | |
| 245 | bfin \ | |
| 246 | c4x | clipper \ | |
| 247 | d10v | d30v | dlx | dsp16xx \ | |
| 248 | fr30 | frv \ | |
| 249 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | |
| 250 | i370 | i860 | i960 | ia64 \ | |
| 251 | ip2k | iq2000 \ | |
| 252 | m32c | m32r | m32rle | m68000 | m68k | m88k \ | |
| 253 | maxq | mb | microblaze | mcore \ | |
| 254 | mips | mipsbe | mipseb | mipsel | mipsle \ | |
| 255 | mips16 \ | |
| 256 | mips64 | mips64el \ | |
| 257 | mips64vr | mips64vrel \ | |
| 258 | mips64orion | mips64orionel \ | |
| 259 | mips64vr4100 | mips64vr4100el \ | |
| 260 | mips64vr4300 | mips64vr4300el \ | |
| 261 | mips64vr5000 | mips64vr5000el \ | |
| 262 | mips64vr5900 | mips64vr5900el \ | |
| 263 | mipsisa32 | mipsisa32el \ | |
| 264 | mipsisa32r2 | mipsisa32r2el \ | |
| 265 | mipsisa64 | mipsisa64el \ | |
| 266 | mipsisa64r2 | mipsisa64r2el \ | |
| 267 | mipsisa64sb1 | mipsisa64sb1el \ | |
| 268 | mipsisa64sr71k | mipsisa64sr71kel \ | |
| 269 | mipstx39 | mipstx39el \ | |
| 270 | mn10200 | mn10300 \ | |
| 271 | mt \ | |
| 272 | msp430 \ | |
| 273 | nios | nios2 \ | |
| 274 | ns16k | ns32k \ | |
| 275 | or32 \ | |
| 276 | pdp10 | pdp11 | pj | pjl \ | |
| 277 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | |
| 278 | pyramid \ | |
| 279 | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | |
| 280 | sh64 | sh64le \ | |
| 281 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | |
| 282 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | |
| 283 | spu | strongarm \ | |
| 284 | tahoe | thumb | tic4x | tic80 | tron \ | |
| 285 | v850 | v850e \ | |
| 286 | we32k \ | |
| 287 | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | |
| 288 | z8k) | |
| 289 basic_machine=$basic_machine-unknown | |
| 290 ;; | |
| 291 m6811 | m68hc11 | m6812 | m68hc12) | |
| 292 # Motorola 68HC11/12. | |
| 293 basic_machine=$basic_machine-unknown | |
| 294 os=-none | |
| 295 ;; | |
| 296 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) | |
| 297 ;; | |
| 298 ms1) | |
| 299 basic_machine=mt-unknown | |
| 300 ;; | |
| 301 | |
| 302 # We use `pc' rather than `unknown' | |
| 303 # because (1) that's what they normally are, and | |
| 304 # (2) the word "unknown" tends to confuse beginning users. | |
| 305 i*86 | x86_64) | |
| 306 basic_machine=$basic_machine-pc | |
| 307 ;; | |
| 308 # Object if more than one company name word. | |
| 309 *-*-*) | |
| 310 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | |
| 311 exit 1 | |
| 312 ;; | |
| 313 # Recognize the basic CPU types with company name. | |
| 314 580-* \ | |
| 315 | a29k-* \ | |
| 316 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | |
| 317 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | |
| 318 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | |
| 319 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | |
| 320 | avr-* | avr32-* \ | |
| 321 | bfin-* | bs2000-* \ | |
| 322 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | |
| 323 | clipper-* | craynv-* | cydra-* \ | |
| 324 | d10v-* | d30v-* | dlx-* \ | |
| 325 | elxsi-* \ | |
| 326 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | |
| 327 | h8300-* | h8500-* \ | |
| 328 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | |
| 329 | i*86-* | i860-* | i960-* | ia64-* \ | |
| 330 | ip2k-* | iq2000-* \ | |
| 331 | m32c-* | m32r-* | m32rle-* \ | |
| 332 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | |
| 333 | m88110-* | m88k-* | maxq-* | mcore-* \ | |
| 334 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | |
| 335 | mips16-* \ | |
| 336 | mips64-* | mips64el-* \ | |
| 337 | mips64vr-* | mips64vrel-* \ | |
| 338 | mips64orion-* | mips64orionel-* \ | |
| 339 | mips64vr4100-* | mips64vr4100el-* \ | |
| 340 | mips64vr4300-* | mips64vr4300el-* \ | |
| 341 | mips64vr5000-* | mips64vr5000el-* \ | |
| 342 | mips64vr5900-* | mips64vr5900el-* \ | |
| 343 | mipsisa32-* | mipsisa32el-* \ | |
| 344 | mipsisa32r2-* | mipsisa32r2el-* \ | |
| 345 | mipsisa64-* | mipsisa64el-* \ | |
| 346 | mipsisa64r2-* | mipsisa64r2el-* \ | |
| 347 | mipsisa64sb1-* | mipsisa64sb1el-* \ | |
| 348 | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | |
| 349 | mipstx39-* | mipstx39el-* \ | |
| 350 | mmix-* \ | |
| 351 | mt-* \ | |
| 352 | msp430-* \ | |
| 353 | nios-* | nios2-* \ | |
| 354 | none-* | np1-* | ns16k-* | ns32k-* \ | |
| 355 | orion-* \ | |
| 356 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | |
| 357 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | |
| 358 | pyramid-* \ | |
| 359 | romp-* | rs6000-* \ | |
| 360 | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | |
| 361 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | |
| 362 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | |
| 363 | sparclite-* \ | |
| 364 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | |
