Reflect name change (doc/rdl-apps.texi)
[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
14# configuration.
15
69e87de2 16# decode aliases into canonical names
4f183929 17
69e87de2
RP
18case "$1" in
19# cpu alone is a valid alias for cpu-none-none.
20vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc | ns32k \
21 | alliant | arm | c1 | c2 | mips | pyramid | tron | a29k \
22 | rtpc | rs6000 | i960)
23 cpu=$1
24 vendor=none
25 os=none
26 ;;
27nindy960)
28 cpu=i960
29 vendor=intel
30 os=nindy
31 ;;
32vxworks68)
33 cpu=m68k
34 vendor=wrs
35 os=vxworks
36 ;;
37vxworks960)
38 cpu=i960
39 vendor=wrs
40 os=vxworks
41 ;;
42am29k)
43 cpu=a29k
44 vendor=none
45 os=bsd
46 ;;
47umax)
48 cpu=ns32k
49 vendor=encore
50 os=sysv # maybe?
51 ;;
52pn)
53 cpu=pn
54 vendor=gould
55 os=sysv # maybe?
56 ;;
57np1)
58 cpu=np1
59 vendor=gould
60 os=sysv # maybe?
61 ;;
62merlin)
63 cpu=merlin
64 vendor=utek
65 os=sysv # maybe?
66 ;;
67iris | iris4d)
68 cpu=mips
69 vendor=sgi
70 os=sysv # maybe?
71 ;;
72news1000)
73 cpu=m68030
74 vendor=sony
75 os=sysv # maybe?
76 ;;
77news | news700 | news800 | news900)
78 cpu=m68k
79 vendor=sony
80 os=sysv # maybe?
81 ;;
82unixpc | safari | pc7300 | 3b1 | 7300 | 7300-att | att-7300)
83 cpu=m68k
84 vendor=att
85 os=sysv # maybe?
86 ;;
87delta | 3300 | motorola-3300 | motorola-delta \
88 | 3300-motorola | delta-motorola)
89 cpu=m68k
90 vendor=motorola
91 os=sysv # maybe?
92 ;;
93vax-dec)
94 cpu=vax
95 vendor=dec
96 os=ultrix # maybe?
97 ;;
98balance)
99 cpu=ns32k
100 vendor=sequent
101 os=dynix
102 ;;
103mmax)
104 cpu=ns32k
105 vendor=encore
106 os=sysv # maybe?
107 ;;
108symmetry)
109 cpu=i386
110 vendor=sequent
111 os=dynix
112 ;;
113sun2)
114 cpu=m68000
115 vendor=sun
116 os=sunos4
117 ;;
118sun2os3)
119 cpu=m68000
120 vendor=sun
121 os=sunos3
122 ;;
123sun2os4)
124 cpu=m68000
125 vendor=sun
126 os=sunos4
127 ;;
128sun3)
129 cpu=m68k
130 vendor=sun
131 os=sunos4
132 ;;
133sun3os3)
134 cpu=m68k
135 vendor=sun
136 os=sunos3
137 ;;
138sun3os4)
139 cpu=m68k
140 vendor=sun
141 os=sunos4
142 ;;
143sun4)
144 cpu=sparc
145 vendor=sun
146 os=sunos4
147 ;;
148sun4os3)
149 cpu=sparc
150 vendor=sun
151 os=sunos3
152 ;;
153sun4os4)
154 cpu=sparc
155 vendor=sun
156 os=sunos4
157 ;;
158pbd)
159 cpu=sparc
160 vendor=unicom
161 os=sysv
162 ;;
163roadrunner | sun386 | sun386i)
164 cpu=i386
165 vendor=sun
166 os=sunos
167 ;;
168ps2)
169 cpu=i386
170 vendor=ibm
171 os=sysv # maybe?
172 ;;
173i386sco)
174 cpu=i386
175 vendor=sco
176 os=sysv # maybe?
177 ;;
178i386v)
179 cpu=i386
180 vendor=none
181 os=sysv
182 ;;
183i386v32)
184 cpu=i386
185 vendor=none
186 os=sysv32
187 ;;
188next)
189 cpu=m68k
190 vendor=next
191 os=sysv # maybe?
192 ;;
193hp300bsd)
194 cpu=m68k
195 vendor=hp
196 os=bsd
197 ;;
198hp300hpux | hpux | hp9k3[2-9][0-9])
199 cpu=m68k
200 vendor=hp
201 os=hpux
202 ;;
203hp9k31[0-9] | hp9k2[0-9][0-9])
204 cpu=m68000
205 vendor=hp
206 os=hpux
207 ;;
208isi | isi68)
209 cpu=m68k
210 vendor=isi
211 os=sysv # maybe?
212 ;;
213apollo68)
214 cpu=m68k
215 vendor=apollo
216 os=sysv # maybe?
217 ;;
218altos | altos3068)
219 cpu=m68k
220 vendor=altos
221 os=sysv # maybe?
222 ;;
223altosgas)
224 cpu=m68k
225 vendor=altos
226 os=gas
227 ;;
228miniframe)
229 cpu=m68000
230 vendor=convergent
231 os=sysv # maybe?
232 ;;
233tower | tower-32)
234 cpu=m68k
235 vendor=ncr
236 os=sysv # maybe?
237 ;;
238bigmips | news-3600 | risc-news)
239 cpu=mips
240 vendor=sony
241 os=newsos # maybe?
242 ;;
243littlemips)
244 cpu=mips
245 vendor=little
246 os=bsd
247 ;;
248dec3100 | decstatn | decstation | decstation-3100 | pmax)
249 cpu=mips
250 vendor=dec
251 os=ultrix
252 ;;
253magnum | m3230)
254 cpu=mips
255 vendor=mips
256 os=sysv # maybe?
257 ;;
258gmicro)
259 cpu=tron
260 vendor=none
261 os=sysv # maybe?
262 ;;
263convex-c1)
264 cpu=c1
265 vendor=convex
266 os=sysv # maybe?
267 ;;
268convex-c2)
269 cpu=c2
270 vendor=convex
271 os=sysv # maybe?
272 ;;
273none)
274 cpu=none
275 vendor=none
276 os=none
277 ;;
278
279# not an alias. parse what we expect to be a canonical name.
280*)
281 cpu=`echo $1 | sed 's/-.*$//'`
282
283 if [ "${cpu}" = "$1" ] ; then
284 # no vendor so this is an invalid name.
285 echo '***' No vendor: configuration \`$1\' not recognized 1>&2
4f183929 286 exit 1
69e87de2
RP
287 else
288 # parse out vendor
289 rest=`echo $1 | sed "s/${cpu}-//"`
290 vendor=`echo ${rest} | sed 's/-.*$//'`
291
292 if [ "${vendor}" = "${rest}" ] ; then
293 # a missing os is acceptable
294 os=none
295 else
296 os=`echo ${rest} | sed "s/${vendor}-//"`
297 fi
298 fi
299 ;;
4f183929
RP
300esac
301
69e87de2
RP
302# At this point we should have three parts of a canonical name in cpu,
303# vendor, and os.
4f183929 304
69e87de2
RP
305# verify that the cpu is known.
306
307case "${cpu}" in
308vax | tahoe | i386 | i860 | m68k | m68000 | m88k | sparc | ns32k \
309 | alliant | arm | c1 | c2 | mips | pyramid | tron | a29k \
310 | rtpc | rs6000 | i960)
311 ;;
312*)
313 echo '***' Invalid cpu \`${cpu}\': configuration \`$1\' not recognized 1>&2
314 exit 1
315 ;;
316esac
317
318# verify that the vendor is known.
319
320case "${vendor}" in
321none | convex | mips | dec | little | sony | ncr | convergent \
322 | altos | apollo | isi | hp | next | sco | ibm | sun \
323 | unicom | sequent | encore | motorola | att | sgi \
324 | utek | gould | wrs | intel | aout | bout | coff) ;;
325*)
326 echo '***' Invalid vendor \`${vendor}\': configuration \`$1\' not recognized 1>&2
327 exit 1
328 ;;
329esac
330
331# verify that the os is known, if it exists.
332
333case "${os}" in
334aix* | aout | bout | bsd* | coff | ctix* | dynix* | esix* | hpux* \
335 | isc* | mach* | newsos* | nindy* | none | osf* | osf* | sco* \
336 | sunos* | sysv* | ultrix* | unos* | v88r* | vms* | vxworks*)
337 ;;
338*)
339 echo '***' Invalid os \`${os}\': configuration \`$1\' not recognized 1>&2
340 exit 1
341 ;;
4f183929
RP
342esac
343
69e87de2 344echo ${cpu}-${vendor}-${os}
This page took 0.035648 seconds and 4 git commands to generate.