* configure.in: Add sparclite as a target.
[platform/upstream/binutils.git] / gdb / configure.in
1 configdirs="doc"
2 srcname="GDB"
3 srctrigger=main.c
4 target_dependent=true
5
6 # per-host:
7
8 # map host info into gdb names.
9
10 case "${host_cpu}" in
11
12 m68k)
13         case "${host_vendor}" in
14         apollo*)
15                 case "${host_os}" in
16                 sysv*)  gdb_host=apollo68v ;;
17                 bsd*)   gdb_host=apollo68b ;;
18                 esac
19                 ;;
20         att)    gdb_host=3b1 ;;
21         altos)
22                 case "${host_os}" in
23                 gas)    gdb_host=altosgas ;;
24                 *)      gdb_host=altos ;;       
25                 esac
26                 ;;
27
28         cbm)
29                 case ${host_os} in
30                 amigados)       gdb_host=amigados ;;
31                 sysv4*)         gdb_host=amix ;;
32                 esac
33                 ;;
34
35         hp)
36                 case ${host_os} in
37                 hpux)   gdb_host=hp300hpux ;;
38                 bsd)    gdb_host=hp300bsd ;;
39                 esac
40                 ;;
41
42         isi)    gdb_host=isi ;;
43         sony)   gdb_host=news ;;
44         sun)
45                 case "${host_os}" in
46                 sunos3) gdb_host=sun3os3 ;;
47                 sunos4) gdb_host=sun3os4 ;;
48                 *)      gdb_host=sun3 ;;
49                 esac
50                 ;;
51         esac
52         ;;
53
54 m68000)
55         case "${host_vendor}" in
56         sun)
57                 case "${host_os}" in
58                 sunos3) gdb_host=sun2os3 ;;
59                 sunos4) gdb_host=sun2os4 ;;
60                 *)      gdb_host=sun2 ;;
61                 esac
62         esac
63         ;;
64
65 sparc)
66         case "${host_os}" in
67         sunos3)         gdb_host=sun4os3 ;;
68         sunos4)         gdb_host=sun4os4 ;;
69         solaris2*)      gdb_host=sun4sol2 ;;
70         *)              gdb_host=sun4 ;;
71         esac
72         ;;
73
74 m68030)
75         case "${host_vendor}" in
76         sony)   gdb_host=news1000 ;;
77         esac
78         ;;
79
80 mips)
81         case "${host_vendor}" in
82         sony)   gdb_host=bigmips ;;
83         dec)    gdb_host=decstation ;;
84         little) gdb_host=littlemips ;;
85         sgi)
86                 case "${host_os}" in
87                 irix3)  gdb_host=irix3 ;;
88                 irix4)  gdb_host=irix4 ;;
89                 esac
90                 ;;
91         esac
92         ;;
93
94 i860)
95         gdb_host=stratus
96         ;;
97
98 i386 | i486)
99         case "${host_vendor}" in
100         sun)    gdb_host=sun386 ;;
101         sco)    gdb_host=i386sco ;;
102         sequent)        gdb_host=symmetry ;;
103         ncr)    gdb_host=ncr3000 ;;
104         *)
105                 case "${host_os}" in
106                 go32)   gdb_host=go32 ;;
107                 sysv32) gdb_host=i386v32 ;;
108                 sysv4*) gdb_host=i386v4 ;;
109                 sysv*)  gdb_host=i386v ;;
110                 scosysv*) gdb_host=i386sco ;;
111                 mach)   gdb_host=i386mach ;;
112                 linux)  gdb_host=linux ;;
113                 esac
114                 ;;
115         esac
116         ;;
117
118 c1 | c2)        gdb_host=convex ;;
119
120 ns32k)
121         case "${host_vendor}" in
122         umax)   gdb_host=umax ;;
123         esac
124         ;;
125
126 romp)
127         gdb_host=rtbsd
128         ;;
129
130 rs6000)
131         gdb_host=rs6000
132         ;;
133
134 a29k)
135         gdb_host=ultra3
136         ;;
137
138 m88k)
139         case "${host_vendor}" in
140         motorola)
141                 gdb_host=delta88 ;;
142         *)      
143                 gdb_host=m88k ;;
144         esac
145         ;;
146
147 vax)
148         case "${host_os}" in
149         bsd*)
150                 gdb_host=vaxbsd ;;
151         ultrix*)
152                 gdb_host=vaxult ;;
153         esac
154         ;;
155
156 arm | merlin | none | np1 | pn | pyramid | tahoe)
157         gdb_host=${host_cpu}
158         ;;
159
160 hppa*)
161         case "${host_vendor}" in
162         hp)
163                 case "${host_os}" in
164                 hpux)   gdb_host=hppahpux ;;
165                 bsd)    gdb_host=hppabsd ;;
166                 esac
167                 ;;
168         esac
169         ;;
170
171 ### unhandled hosts
172 #altosgas
173 #i386v-g
174 #i386v32-g
175
176 esac
177
178
179 if [ ! -f ${srcdir}/config/${gdb_host}.mh ]; then
180         echo '***' "Gdb does not support host ${host}" 1>&2
181         exit 1
182 fi
183
184 #  We really shouldn't depend on there being a space after XM_FILE= ...
185 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
186
187 # per-target:
188
189 case "${target_cpu}" in
190
191 m68k)
192         case "${target_vendor}" in
193         att)    gdb_target=3b1 ;;
194         altos)  gdb_target=altos ;;
195         cbm)
196                 case ${target_os} in
197                 amigados)       gdb_host=amigados ;;
198                 sysv4*)         gdb_target=amix ;;
199                 esac
200                 ;;
201         ericsson) gdb_target=es1800 ;;
202         hp)
203                 case "${target_os}" in
204                 bsd)    gdb_target=hp300bsd ;;
205                 hpux)   gdb_target=hp300hpux ;;
206                 esac
207                 ;;
208         sun)
209                 case "${target_os}" in
210                 sunos3) gdb_target=sun3os3 ;;
211                 sunos4) gdb_target=sun3os4 ;;
212                 *)      gdb_target=sun3 ;;
213                 esac
214                 ;;
215         wrs)    gdb_target=vxworks68 ;;
216         netx)   gdb_target=vxworks68 ;;
217         isi)    gdb_target=isi ;;
218         sony)   gdb_target=news ;;
219         esac
220         case "${target_os}" in
221         os68k)  gdb_target=os68k ;;
222         esac
223         ;;
224
225 m68000)
226         case "${target_vendor}" in
227         sun)
228                 case "${target_os}" in
229                 sunos3) gdb_target=sun2os3 ;;
230                 sunos4) gdb_target=sun2os4 ;;
231                 *)      gdb_target=sun2 ;;
232                 esac
233                 ;;
234         ericsson) gdb_target=es1800 ;;
235         wrs)    gdb_target=vxworks68 ;;
236         esac
237         ;;
238
239 m680[124]0)
240         case "${target_vendor}" in
241         wrs)    gdb_target=vxworks68 ;;
242         esac
243         ;;
244
245 m68030)
246         case "${target_vendor}" in
247         sony)   gdb_target=news1000 ;;
248         wrs)    gdb_target=vxworks68 ;;
249         esac
250         ;;
251
252 m68kmote)
253         case "${target_vendor}" in
254         tandem) gdb_target=st2000 ;;
255         esac
256         ;;
257
258 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
259         gdb_target=${target_cpu} ;;
260
261 m88k)
262         case "${target_vendor}" in
263         motorola) gdb_target=delta88 ;;
264         *) gdb_target=dgux ;;
265         esac
266         ;;
267 a29k)
268         case "${target_os}" in
269         none|aout|coff) gdb_target=a29k ;;
270         sym1)   gdb_target=ultra3 ;;
271         kern)   gdb_target=a29k-kern ;;
272         ebmon)  gdb_target=a29k;;
273         udi)    gdb_target=a29k-udi;;
274         esac
275         ;;
276         
277 mips)
278         case "${target_vendor}" in
279         sony)   gdb_target=bigmips ;;
280         big)    gdb_target=bigmips ;;
281         dec)    gdb_target=decstation ;;
282         little) gdb_target=littlemips ;;
283         sgi)    gdb_target=irix3 ;;
284         esac
285         ;;
286
287 c1 | c2)        gdb_target=convex ;;
288
289 sparc*)
290         case "${target_vendor}" in
291         sun | fujitsu)
292                 case "${target_os}" in
293                 sunos3)         gdb_target=sun4os3 ;;
294                 sunos4)         gdb_target=sun4os4 ;;
295                 solaris2*)      gdb_target=sun4sol2 ;;
296                 *)              gdb_target=sun4 ;;
297                 esac
298                 ;;
299         esac
300         ;;
301
302 h8300)
303         gdb_target=h8300hms 
304         ;;
305
306 i860)   gdb_target=stratus
307         ;;
308
309 i386 | i486)
310         case "${target_vendor}" in
311         sco)    gdb_target=i386sco ;;
312         sun)    gdb_target=sun386 ;;
313         sequent)        gdb_target=symmetry ;;
314         ncr)    gdb_target=ncr3000 ;;
315         *)
316                 case "${target_os}" in
317                 sysv32) gdb_target=i386v32 ;;
318                 scosysv3*) gdb_target=i386v32 ;;
319                 sysv4*) gdb_target=i386v4 ;;
320                 sysv*)  gdb_target=i386v ;;
321                 mach)   gdb_target=i386mach ;;
322                 coff)   gdb_target=i386v ;;
323                 aout)   gdb_target=i386aout ;;
324                 linux)  gdb_target=linux ;;
325                 esac
326         esac
327         ;;
328
329 i960)
330         case "${target_vendor}" in
331         bout | wrs)     gdb_target=vxworks960 ;;
332         coff | intel)   gdb_target=nindy960 ;;
333         esac
334         ;;
335
336 ns32k)
337         case "${target_vendor}" in
338         utek)   gdb_target=umax ;;
339         esac
340         ;;
341
342 rs6000)
343         gdb_target=rs6000
344         ;;
345
346 hppa*)
347         case "${target_vendor}" in
348         hp)
349                 case "${target_os}" in
350                 hpux)   gdb_target=hppahpux ;;
351                 bsd)    gdb_target=hppabsd ;;
352                 esac
353                 ;;
354         esac
355         ;;
356
357 ### unhandled targets
358 # altosgas
359 # i386v-g
360 # i386v32-g
361
362 esac
363
364 if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then
365         echo '***' "Gdb does not support target ${target}" 1>&2
366         exit 1
367 fi
368
369 if [ -z "${removing}" ] ; then
370         cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" {
371                 print substr($0,6)}'
372 fi
373
374 #  We really shouldn't depend on there being a space after TM_FILE= ...
375 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt`
376
377 host_makefile_frag=config/${gdb_host}.mh
378 target_makefile_frag=config/${gdb_target}.mt
379
380 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
381 # ?config/* file, we don't make the corresponding links.  But we have
382 # to remove the xm.h files and tm.h files anyway, e.g. when switching
383 # from "configure host" to "configure none".
384 files=
385 links=
386 rm -f xm.h
387 if [ "${hostfile}" != "" ]; then
388         files="${files} ${hostfile}"
389         links="${links} xm.h"
390 fi
391 rm -f tm.h
392 if [ "${targetfile}" != "" ]; then
393         files="${files} ${targetfile}"
394         links="${links} tm.h"
395 fi
396
397 # post-target:
398
399 case ${srcdir} in
400   .)
401     ;;
402   *)
403     grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
404       echo "source ${srcdir}/.gdbinit" >> .gdbinit
405 esac
406
407 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile