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