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