Mercurial > hg > octave-nkf
annotate config.sub @ 10782:d1f920d1ce0c
simplify code in rand.cc
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Mon, 12 Jul 2010 11:09:59 +0200 |
parents | eb63fbe60fab |
children |
rev | line source |
---|---|
1480 | 1 #! /bin/sh |
3899 | 2 # Configuration validation subroutine script. |
3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | |
8363
be07fdf798cf
update config.guess and config.sub
John W. Eaton <jwe@octave.org>
parents:
7014
diff
changeset
|
4 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
be07fdf798cf
update config.guess and config.sub
John W. Eaton <jwe@octave.org>
parents:
7014
diff
changeset
|
5 # Free Software Foundation, Inc. |
3899 | 6 |
8920 | 7 timestamp='2009-03-07' |
3899 | 8 |
295 | 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 | |
2320 | 11 # can handle that machine. It does not imply ALL GNU software can. |
1057 | 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 | |
5461 | 25 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA |
26 # 02110-1301, USA. | |
27 # | |
1057 | 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. | |
295 | 32 |
5461 | 33 |
3899 | 34 # Please send patches to <config-patches@gnu.org>. Submit a context |
35 # diff and a properly formatted ChangeLog entry. | |
3594 | 36 # |
295 | 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 | |
2567 | 53 # or in some cases, the newer four-part form: |
54 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM | |
295 | 55 # It is wrong to echo any other type of specification. |
56 | |
3899 | 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 | |
8363
be07fdf798cf
update config.guess and config.sub
John W. Eaton <jwe@octave.org>
parents:
7014
diff
changeset
|
75 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, |
be07fdf798cf
update config.guess and config.sub
John W. Eaton <jwe@octave.org>
parents:
7014
diff
changeset
|
76 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
3899 | 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." | |
295 | 83 |
3899 | 84 # Parse command line |
85 while test $# -gt 0 ; do | |
86 case $1 in | |
87 --time-stamp | --time* | -t ) | |
5461 | 88 echo "$timestamp" ; exit ;; |
3899 | 89 --version | -v ) |
5461 | 90 echo "$version" ; exit ;; |
3899 | 91 --help | --h* | -h ) |
5461 | 92 echo "$usage"; exit ;; |
3899 | 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 | |
5461 | 104 exit ;; |
3899 | 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;; | |
295 | 117 esac |
118 | |
2567 | 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 | |
6466 | 123 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ |
124 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ | |
8919
79474f16215c
config.sub, config.guess: update from FSF sources
John W. Eaton <jwe@octave.org>
parents:
8363
diff
changeset
|
125 kopensolaris*-gnu* | \ |
6466 | 126 storm-chaos* | os2-emx* | rtmk-nova*) |
2567 | 127 os=-$maybe_os |
128 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | |
129 ;; | |
130 *) | |
131 basic_machine=`echo $1 | sed 's/-[^-]*$//'` | |
132 if [ $basic_machine != $1 ] | |
133 then os=`echo $1 | sed 's/.*-/-/'` | |
134 else os=; fi | |
135 ;; | |
136 esac | |
295 | 137 |
138 ### Let's recognize common machines as not being operating systems so | |
139 ### that things like config.sub decstation-3100 work. We also | |
140 ### recognize some manufacturers as not being operating systems, so we | |
141 ### can provide default operating systems below. | |
142 case $os in | |
143 -sun*os*) | |
144 # Prevent following clause from handling this invalid input. | |
145 ;; | |
146 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ | |
147 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ | |
1057 | 148 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ |
295 | 149 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ |
150 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | |
2320 | 151 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ |
5126 | 152 -apple | -axis | -knuth | -cray) |
295 | 153 os= |
154 basic_machine=$1 | |
155 ;; | |
3594 | 156 -sim | -cisco | -oki | -wec | -winbond) |
157 os= | |
158 basic_machine=$1 | |
159 ;; | |
160 -scout) | |
161 ;; | |
162 -wrs) | |
163 os=-vxworks | |
164 basic_machine=$1 | |
165 ;; | |
3899 | 166 -chorusos*) |
167 os=-chorusos | |
168 basic_machine=$1 | |
169 ;; | |
170 -chorusrdb) | |
171 os=-chorusrdb | |
172 basic_machine=$1 | |
173 ;; | |
295 | 174 -hiux*) |
1057 | 175 os=-hiuxwe2 |
295 | 176 ;; |
6466 | 177 -sco6) |
178 os=-sco5v6 | |
179 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
180 ;; | |
2320 | 181 -sco5) |
3594 | 182 os=-sco3.2v5 |
2567 | 183 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
2320 | 184 ;; |
295 | 185 -sco4) |
186 os=-sco3.2v4 | |
2567 | 187 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
295 | 188 ;; |
189 -sco3.2.[4-9]*) | |
190 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | |
2567 | 191 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
295 | 192 ;; |
193 -sco3.2v[4-9]*) | |
194 # Don't forget version if it is 3.2v4 or newer. | |
2567 | 195 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
295 | 196 ;; |
6466 | 197 -sco5v6*) |
198 # Don't forget version if it is 3.2v4 or newer. | |
199 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
200 ;; | |
295 | 201 -sco*) |
202 os=-sco3.2v2 | |
2567 | 203 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
295 | 204 ;; |
3594 | 205 -udk*) |
206 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | |
207 ;; | |
295 | 208 -isc) |
209 os=-isc2.2 | |
2567 | 210 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
295 | 211 ;; |
212 -clix*) | |
213 basic_machine=clipper-intergraph | |
214 ;; | |
215 -isc*) | |
2567 | 216 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` |
295 | 217 ;; |
1480 | 218 -lynx*) |
295 | 219 os=-lynxos |
220 ;; | |
1057 | 221 -ptx*) |
222 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` | |
223 ;; | |
224 -windowsnt*) | |
225 os=`echo $os | sed -e 's/windowsnt/winnt/'` | |
226 ;; | |
2320 | 227 -psos*) |
228 os=-psos | |
229 ;; | |
3594 | 230 -mint | -mint[0-9]*) |
231 basic_machine=m68k-atari | |
232 os=-mint | |
233 ;; | |
295 | 234 esac |
235 | |
236 # Decode aliases for certain CPU-COMPANY combinations. | |
237 case $basic_machine in | |
238 # Recognize the basic CPU types without company name. | |
239 # Some are omitted here because they have special meanings below. | |
3899 | 240 1750a | 580 \ |
241 | a29k \ | |
242 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | |
243 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | |
5126 | 244 | am33_2.0 \ |
6466 | 245 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ |
5461 | 246 | bfin \ |
3899 | 247 | c4x | clipper \ |
5126 | 248 | d10v | d30v | dlx | dsp16xx \ |
6466 | 249 | fido | fr30 | frv \ |
3899 | 250 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ |
251 | i370 | i860 | i960 | ia64 \ | |
5126 | 252 | ip2k | iq2000 \ |
8919
79474f16215c
config.sub, config.guess: update from FSF sources
John W. Eaton <jwe@octave.org>
parents:
8363
diff
changeset
|
253 | lm32 \ |
6466 | 254 | m32c | m32r | m32rle | m68000 | m68k | m88k \ |
8363
be07fdf798cf
update config.guess and config.sub
John W. Eaton <jwe@octave.org>
parents:
7014
diff
changeset
|
255 | maxq | mb | microblaze | mcore | mep | metag \ |
5126 | 256 | mips | mipsbe | mipseb | mipsel | mipsle \ |
257 | mips16 \ | |
258 | mips64 | mips64el \ | |
8363
be07fdf798cf
update config.guess and config.sub
John W. Eaton <jwe@octave.org>
parents:
7014
diff
changeset
|
259 | mips64octeon | mips64octeonel \ |
be07fdf798cf
update config.guess and config.sub
John W. Eaton <jwe@octave.org>
parents:
7014
diff
changeset
|
260 | mips64orion | mips64orionel \ |
be07fdf798cf
update config.guess and config.sub
John W. Eaton <jwe@octave.org>
parents:
7014
diff
changeset
|
261 | mips64r5900 | mips64r5900el \ |
5126 | 262 | mips64vr | mips64vrel \ |
263 | mips64vr4100 | mips64vr4100el \ | |
264 | mips64vr4300 | mips64vr4300el \ | |
265 | mips64vr5000 | mips64vr5000el \ | |
5461 | 266 | mips64vr5900 | mips64vr5900el \ |
5126 | 267 | mipsisa32 | mipsisa32el \ |
268 | mipsisa32r2 | mipsisa32r2el \ | |
269 | mipsisa64 | mipsisa64el \ | |
270 | mipsisa64r2 | mipsisa64r2el \ | |
271 | mipsisa64sb1 | mipsisa64sb1el \ | |
272 | mipsisa64sr71k | mipsisa64sr71kel \ | |
273 | mipstx39 | mipstx39el \ | |
3899 | 274 | mn10200 | mn10300 \ |
6466 | 275 | mt \ |
5126 | 276 | msp430 \ |
6466 | 277 | nios | nios2 \ |
3899 | 278 | ns16k | ns32k \ |
5461 | 279 | or32 \ |
3899 | 280 | pdp10 | pdp11 | pj | pjl \ |
281 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | |
282 | pyramid \ | |
6466 | 283 | score \ |
8919
79474f16215c
config.sub, config.guess: update from FSF sources
John W. Eaton <jwe@octave.org>
parents:
8363
diff
changeset
|
284 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ |
5126 | 285 | sh64 | sh64le \ |
6466 | 286 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ |
287 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | |
288 | spu | strongarm \ | |
5126 | 289 | tahoe | thumb | tic4x | tic80 | tron \ |
3899 | 290 | v850 | v850e \ |
291 | we32k \ | |
6466 | 292 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ |