* c-exp.y, m2-exp.y: Lint.
[deliverable/binutils-gdb.git] / readline / config.sub
1 #!/bin/sh
2
3 # Configuration subroutine to validate and canonicalize a configuration type.
4 # Supply the specified configuration type as an argument.
5 # If it is invalid, we print an error message on stderr and exit with code 1.
6 # Otherwise, we print the canonical config type on stdout and succeed.
7
8 # This file is supposed to be the same for all GNU packages
9 # and recognize all the CPU types, system types and aliases
10 # that are meaningful with *any* GNU software.
11 # Each package is responsible for reporting which valid configurations
12 # it does not support. The user should be able to distinguish
13 # a failure to support a valid configuration from a meaningless
14 # configuration (e.g. a typo).
15
16 # Please email any bugs, comments, and/or additions to this file to:
17 # configure@cygnus.com
18
19 # decode aliases into canonical names
20
21 case "$1" in
22 # cpu alone is a valid alias for cpu-none-none.
23 vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc | ns32k \
24 | alliant | arm | c1 | c2 | mips | pyramid | tron | a29k \
25 | rtpc | rs6000 | i960)
26 cpu=$1
27 vendor=none
28 os=none
29 ;;
30 altos | altos3068)
31 cpu=m68k
32 vendor=altos
33 os=sysv # maybe?
34 ;;
35 altosgas)
36 cpu=m68k
37 vendor=altos
38 os=gas
39 ;;
40 amdahl)
41 cpu=580
42 vendor=amdahl
43 os=uts
44 ;;
45 amigados)
46 cpu=m68k
47 vendor=cbm
48 os=amigados # Native AmigaDOS
49 ;;
50 amigaunix | amix)
51 cpu=m68k
52 vendor=cbm
53 os=svr4 # System V Release 4 (svr4 is an industry recognized acronym)
54 ;;
55 apollo68)
56 cpu=m68k
57 vendor=apollo
58 os=sysv # maybe?
59 ;;
60 balance)
61 cpu=ns32k
62 vendor=sequent
63 os=dynix
64 ;;
65 convex-c1)
66 cpu=c1
67 vendor=convex
68 os=sysv # maybe?
69 ;;
70 convex-c2)
71 cpu=c2
72 vendor=convex
73 os=sysv # maybe?
74 ;;
75 cray | ymp)
76 cpu=ymp
77 vendor=cray
78 os=unicos
79 ;;
80 cray2)
81 cpu=cray2
82 vendor=cray
83 os=unicos
84 ;;
85 dec3100 | decstatn | decstation | decstation-3100 | pmax | pmin)
86 cpu=mips
87 vendor=dec
88 os=ultrix
89 ;;
90 delta | 3300 | motorola-3300 | motorola-delta \
91 | 3300-motorola | delta-motorola)
92 cpu=m68k
93 vendor=motorola
94 os=sysv # maybe?
95 ;;
96
97 delta88)
98 cpu=m88k
99 vendor=motorola
100 os=m88kbcs
101 ;;
102
103 gmicro)
104 cpu=tron
105 vendor=gmicro
106 os=sysv # maybe?
107 ;;
108 # start-sanitize-v9
109 hal-32 | hal32)
110 cpu=sparc64
111 vendor=hal
112 os=hal32
113 ;;
114 hal-64 | hal64)
115 cpu=sparc64
116 vendor=hal
117 os=hal64
118 ;;
119 sparc64)
120 cpu=sparc64
121 vendor=sun
122 os=v9
123 ;;
124 sparc64-v7 | sparc64v7)
125 cpu=sparc64
126 vendor=sun
127 os=v7
128 ;;
129 # end-sanitize-v9
130 hp300bsd)
131 cpu=m68k
132 vendor=hp
133 os=bsd
134 ;;
135 hp300hpux | hpux | hp9k3[2-9][0-9])
136 cpu=m68k
137 vendor=hp
138 os=hpux
139 ;;
140 hp9k31[0-9] | hp9k2[0-9][0-9])
141 cpu=m68000
142 vendor=hp
143 os=hpux
144 ;;
145 i386sco)
146 cpu=i386
147 vendor=sco
148 os=sysv # maybe?
149 ;;
150 i386v)
151 cpu=i386
152 vendor=none
153 os=sysv
154 ;;
155 i386v32)
156 cpu=i386
157 vendor=none
158 os=sysv32
159 ;;
160 iris | iris4d)
161 cpu=mips
162 vendor=sgi
163 os=irix # maybe?
164 ;;
165 isi | isi68)
166 cpu=m68k
167 vendor=isi
168 os=sysv # maybe?
169 ;;
170 littlemips)
171 cpu=mips
172 vendor=little
173 os=bsd
174 ;;
175 magnum | m3230)
176 cpu=mips
177 vendor=mips
178 os=sysv # maybe?
179 ;;
180 merlin)
181 cpu=ns32k
182 vendor=utek
183 os=sysv # maybe?
184 ;;
185 miniframe)
186 cpu=m68000
187 vendor=convergent
188 os=sysv # maybe?
189 ;;
190 mmax)
191 cpu=ns32k
192 vendor=encore
193 os=sysv # maybe?
194 ;;
195 news | news700 | news800 | news900)
196 cpu=m68k
197 vendor=sony
198 os=sysv # maybe?
199 ;;
200 news1000)
201 cpu=m68030
202 vendor=sony
203 os=sysv # maybe?
204 ;;
205 news-3600 | bigmips | risc-news)
206 cpu=mips
207 vendor=sony
208 os=newsos # maybe?
209 ;;
210 next)
211 cpu=m68k
212 vendor=next
213 os=sysv # maybe?
214 ;;
215 nindy960)
216 cpu=i960
217 vendor=intel
218 os=nindy
219 ;;
220 none)
221 cpu=none
222 vendor=none
223 os=none
224 ;;
225 np1)
226 cpu=np1
227 vendor=gould
228 os=sysv # maybe?
229 ;;
230 pbd)
231 cpu=sparc
232 vendor=unicom
233 os=sysv
234 ;;
235 pn)
236 cpu=pn
237 vendor=gould
238 os=sysv # maybe?
239 ;;
240 ps2)
241 cpu=i386
242 vendor=ibm
243 os=sysv # maybe?
244 ;;
245 sun2)
246 cpu=m68000
247 vendor=sun
248 os=sunos4
249 ;;
250 sun2os3)
251 cpu=m68000
252 vendor=sun
253 os=sunos3
254 ;;
255 sun2os4)
256 cpu=m68000
257 vendor=sun
258 os=sunos4
259 ;;
260 sun3)
261 cpu=m68k
262 vendor=sun
263 os=sunos4
264 ;;
265 sun3os3)
266 cpu=m68k
267 vendor=sun
268 os=sunos3
269 ;;
270 sun3os4)
271 cpu=m68k
272 vendor=sun
273 os=sunos4
274 ;;
275 sun386 | roadrunner | sun386i)
276 cpu=i386
277 vendor=sun
278 os=sunos
279 ;;
280 sun4)
281 cpu=sparc
282 vendor=sun
283 os=sunos4
284 ;;
285 sun4os3)
286 cpu=sparc
287 vendor=sun
288 os=sunos3
289 ;;
290 sun4os4)
291 cpu=sparc
292 vendor=sun
293 os=sunos4
294 ;;
295 symmetry)
296 cpu=i386
297 vendor=sequent
298 os=dynix
299 ;;
300 tower | tower-32)
301 cpu=m68k
302 vendor=ncr
303 os=sysv # maybe?
304 ;;
305 ultra3)
306 cpu=a29k
307 vendor=nyu
308 os=sym1
309 ;;
310 umax)
311 cpu=ns32k
312 vendor=encore
313 os=sysv # maybe?
314 ;;
315 unixpc | safari | pc7300 | 3b1 | 7300 | 7300-att | att-7300)
316 cpu=m68k
317 vendor=att
318 os=sysv # maybe?
319 ;;
320 vax-dec)
321 cpu=vax
322 vendor=dec
323 os=ultrix # maybe?
324 ;;
325 vxworks68)
326 cpu=m68k
327 vendor=wrs
328 os=vxworks
329 ;;
330 vxworks960)
331 cpu=i960
332 vendor=wrs
333 os=vxworks
334 ;;
335 xmp)
336 cpu=xmp
337 vendor=cray
338 os=unicos
339 ;;
340 # not an alias. parse what we expect to be a canonical name.
341 *)
342 cpu=`echo $1 | sed 's/-.*$//'`
343
344 if [ "${cpu}" = "$1" ] ; then
345 # no vendor so this is an invalid name.
346 echo '***' No vendor: configuration \`$1\' not recognized 1>&2
347 exit 1
348 else
349 # parse out vendor
350 rest=`echo $1 | sed "s/${cpu}-//"`
351 vendor=`echo ${rest} | sed 's/-.*$//'`
352
353 if [ "${vendor}" = "${rest}" ] ; then
354 # a missing os is acceptable
355 os=none
356 else
357 os=`echo ${rest} | sed "s/${vendor}-//"`
358 fi
359 fi
360 ;;
361 esac
362
363 # At this point we should have three parts of a canonical name in cpu,
364 # vendor, and os.
365
366 # verify that the cpu is known.
367
368 case "${cpu}" in
369 none | vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc \
370 | ns32k | alliant | arm | c1 | c2 | mips | pyramid | tron \
371 | a29k | rtpc | rs6000 | i960 | xmp | ymp | cray2 | 580)
372 ;;
373
374 # start-sanitize-v9
375 sparc64) ;;
376 # end-sanitize-v9
377
378 *)
379 echo '***' Invalid cpu \`${cpu}\': configuration \`$1\' not recognized 1>&2
380 exit 1
381 ;;
382 esac
383
384 # verify that the vendor is known.
385
386 case "${vendor}" in
387 altos | amdahl | aout | apollo | att | bcs | bout |\
388 cbm | convergent | convex | coff | cray | dec | encore |\
389 gould | intel | isi | hp | ibm | little | mips | motorola |\
390 ncr | next | none | nyu | sco | sequent | sgi | sony | sun |\
391 unicom | utek | wrs ) ;;
392
393 # start-sanitize-v9
394 hal) ;;
395 # end-sanitize-v9
396
397 *)
398 echo '***' Invalid vendor \`${vendor}\': configuration \`$1\' not recognized 1>&2
399 exit 1
400 ;;
401 esac
402
403 # verify that the os is known, if it exists.
404
405 case "${os}" in
406 aix* | aout | bout | bsd* | coff | ctix* | dynix* | esix* | hpux* | irix* \
407 | isc* | mach* | newsos* | nindy* | none | osf* | osf* | sco* \
408 | sunos* | sysv* | ultrix* | unos* | v88r* | vms* | vxworks* \
409 | sym[1-9]* | unicos* | uts | svr4 | amigados)
410 ;;
411
412 # start-sanitize-v9
413 hal32 | hal64 | v7 | v9) ;;
414 # end-sanitize-v9
415
416 *)
417 echo '***' Invalid os \`${os}\': configuration \`$1\' not recognized 1>&2
418 exit 1
419 ;;
420 esac
421
422 echo ${cpu}-${vendor}-${os}
This page took 0.066198 seconds and 4 git commands to generate.