fe74bd2e82338b7b5ddc836471746eb42a2d4366
[external/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         att)    gdb_host=3b1 ;;
15         altos)
16                 case "${host_os}" in
17                 gas)    gdb_host=altosgas ;;
18                 *)      gdb_host=altos ;;       
19                 esac
20                 ;;
21
22         cbm)
23                 case ${host_os} in
24                 amigados)       gdb_host=amigados ;;
25                 sysv4*)         gdb_host=amix ;;
26                 esac
27                 ;;
28
29         hp)
30                 case ${host_os} in
31                 hpux)   gdb_host=hp300hpux ;;
32                 bsd)    gdb_host=hp300bsd ;;
33                 esac
34                 ;;
35
36         isi)    gdb_host=isi ;;
37         sony)   gdb_host=news ;;
38         sun)
39                 case "${host_os}" in
40                 sunos3) gdb_host=sun3os3 ;;
41                 sunos4) gdb_host=sun3os4 ;;
42                 *)      gdb_host=sun3 ;;
43                 esac
44                 ;;
45         esac
46         ;;
47
48 m68000)
49         case "${host_vendor}" in
50         sun)
51                 case "${host_os}" in
52                 sunos3) gdb_host=sun2os3 ;;
53                 sunos4) gdb_host=sun2os4 ;;
54                 *)      gdb_host=sun2 ;;
55                 esac
56         esac
57         ;;
58
59 sparc)
60         case "${host_os}" in
61         sunos3) gdb_host=sun4os3 ;;
62         sunos4) gdb_host=sun4os4 ;;
63         *)      gdb_host=sun4 ;;
64         esac
65         ;;
66
67 m68030)
68         case "${host_vendor}" in
69         sony)   gdb_host=news1000 ;;
70         esac
71         ;;
72
73 mips)
74         case "${host_vendor}" in
75         sony)   gdb_host=bigmips ;;
76         dec)    gdb_host=decstation ;;
77         little) gdb_host=littlemips ;;
78         sgi)    gdb_host=irix3 ;;
79         esac
80         ;;
81
82 i386)
83         case "${host_vendor}" in
84         sun)    gdb_host=sun386 ;;
85         sco)    gdb_host=i386sco ;;
86         sequent)        gdb_host=symmetry ;;
87         *)
88                 case "${host_os}" in
89                 sysv32) gdb_host=i386v32 ;;
90                 sysv4*) gdb_host=i386v4 ;;
91                 sysv*)  gdb_host=i386v ;;
92                 mach)   gdb_host=i386mach ;;
93                 esac
94                 ;;
95         esac
96         ;;
97
98 c1 | c2)        gdb_host=convex ;;
99
100 ns32k)
101         case "${host_vendor}" in
102         umax)   gdb_host=umax ;;
103         esac
104         ;;
105
106 romp)
107         gdb_host=rtbsd
108         ;;
109
110 rs6000)
111         gdb_host=rs6000
112         ;;
113
114 a29k)
115         gdb_host=ultra3
116         ;;
117
118 m88k)
119         case "${host_vendor}" in
120         motorola)
121                 gdb_host=delta88 ;;
122         *)      
123                 gdb_host=m88k ;;
124         esac
125         ;;
126
127 arm | vax | merlin | none | np1 | pn | pyramid | tahoe)
128         gdb_host=${host_cpu}
129         ;;
130
131 ### unhandled hosts
132 #altosgas
133 #i386v-g
134 #i386v32-g
135
136 esac
137
138
139 if [ ! -f ${srcdir}/config/mh-${gdb_host} ]; then
140         echo '***' "Gdb does not support host ${host}" 1>&2
141         exit 1
142 fi
143
144 #  We really shouldn't depend on there being a space after XM_FILE= ...
145 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/mh-${gdb_host}`
146
147 # per-target:
148
149 case "${target_cpu}" in
150
151 m68k)
152         case "${target_vendor}" in
153         att)    gdb_target=3b1 ;;
154         altos)  gdb_target=altos ;;
155         cbm)
156                 case ${target_os} in
157                 amigados)       gdb_host=amigados ;;
158                 sysv4*)         gdb_target=amix ;;
159                 esac
160                 ;;
161         hp)
162                 case "${target_os}" in
163                 bsd)    gdb_target=hp300bsd ;;
164                 hpux)   gdb_target=hp300hpux ;;
165                 esac
166                 ;;
167         sun)
168                 case "${target_os}" in
169                 sunos3) gdb_target=sun3os3 ;;
170                 sunos4) gdb_target=sun3os4 ;;
171                 *)      gdb_target=sun3 ;;
172                 esac
173                 ;;
174         wrs)    gdb_target=vxworks68 ;;
175         isi)    gdb_target=isi ;;
176         sony)   gdb_target=news ;;
177         esac
178         ;;
179
180 m68000)
181         case "${target_vendor}" in
182         sun)
183                 case "${target_os}" in
184                 sunos3) gdb_target=sun2os3 ;;
185                 sunos4) gdb_target=sun2os4 ;;
186                 *)      gdb_target=sun2 ;;
187                 esac
188         esac
189         ;;
190
191 m68030)
192         case "${target_vendor}" in
193         sony)   gdb_target=news1000 ;;
194         esac
195         ;;
196
197 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
198         gdb_target=${target_cpu} ;;
199
200 m88k)
201         case "${target_vendor}" in
202         motorola) gdb_target=delta88 ;;
203         *) gdb_target=dgux ;;
204         esac
205         ;;
206 a29k)
207         case "${target_os}" in
208         none|aout|coff) gdb_target=a29k ;;
209         sym1)   gdb_target=ultra3 ;;
210         kern)   gdb_target=a29k-kern ;;
211         ebmon)  gdb_target=a29k;;
212         esac
213         ;;
214         
215 mips)
216         case "${target_vendor}" in
217         sony)   gdb_target=bigmips ;;
218         dec)    gdb_target=decstation ;;
219         little) gdb_target=littlemips ;;
220         sgi)    gdb_target=irix3 ;;
221         esac
222         ;;
223
224 c1 | c2)        gdb_target=convex ;;
225
226 sparc)
227         case "${target_vendor}" in
228         sun)
229                 case "${target_os}" in
230                 sunos3) gdb_target=sun4os3 ;;
231                 sunos4) gdb_target=sun4os4 ;;
232                 *)      gdb_target=sun4 ;;
233                 esac
234                 ;;
235         esac
236         ;;
237
238
239 i386)
240         case "${target_vendor}" in
241         sco)    gdb_target=i386sco ;;
242         sun)    gdb_target=sun386 ;;
243         sequent)        gdb_target=symmetry ;;
244         *)
245                 case "${target_os}" in
246                 sysv32) gdb_target=i386v32 ;;
247                 sysv4*) gdb_target=i386v4 ;;
248                 sysv*)  gdb_target=i386v ;;
249                 mach)   gdb_target=i386mach ;;
250                 coff)   gdb_target=i386v ;;
251                 aout)   gdb_target=i386aout ;;
252                 esac
253         esac
254         ;;
255
256 i960)
257         case "${target_vendor}" in
258         bout | wrs)     gdb_target=vxworks960 ;;
259         coff | intel)   gdb_target=nindy960 ;;
260         esac
261         ;;
262
263 ns32k)
264         case "${target_vendor}" in
265         utek)   gdb_target=umax ;;
266         esac
267         ;;
268
269 rs6000)
270         gdb_target=rs6000
271         ;;
272
273 ### unhandled targets
274 # altosgas
275 # i386v-g
276 # i386v32-g
277
278 esac
279
280 if [ ! -f ${srcdir}/config/mt-${gdb_target} ]; then
281         echo '***' "Gdb does not support target ${target}" 1>&2
282         exit 1
283 fi
284
285 if [ -z "${removing}" ] ; then
286         cat ${srcdir}/config/mh-${gdb_host} ${srcdir}/config/mt-${gdb_target} | awk '$1 == "#msg" {
287                 print substr($0,6)}'
288 fi
289
290 #  We really shouldn't depend on there being a space after TM_FILE= ...
291 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/mt-${gdb_target}`
292
293 host_makefile_frag=config/mh-${gdb_host}
294 target_makefile_frag=config/mt-${gdb_target}
295
296 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
297 # ?config/* file, we don't make the corresponding links.  But we have
298 # to remove the xm.h files and tm.h files anyway, e.g. when switching
299 # from "configure host" to "configure none".
300 files=
301 links=
302 rm -f xm.h
303 if [ "${hostfile}" != "" ]; then
304         files="${files} ${hostfile}"
305         links="${links} xm.h"
306 fi
307 rm -f tm.h
308 if [ "${targetfile}" != "" ]; then
309         files="${files} ${targetfile}"
310         links="${links} tm.h"
311 fi
312
313 # post-target:
314
315 case ${srcdir} in
316   .)
317     ;;
318   *)
319     grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
320       echo "source ${srcdir}/.gdbinit" >> .gdbinit
321 esac
322
323 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile