Add ${srcdir} for makefile_frags.
[deliverable/binutils-gdb.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 i860)
83 gdb_host=stratus
84 ;;
85
86 i386)
87 case "${host_vendor}" in
88 sun) gdb_host=sun386 ;;
89 sco) gdb_host=i386sco ;;
90 sequent) gdb_host=symmetry ;;
91 *)
92 case "${host_os}" in
93 sysv32) gdb_host=i386v32 ;;
94 sysv4*) gdb_host=i386v4 ;;
95 sysv*) gdb_host=i386v ;;
96 scosysv*) gdb_host=i386sco ;;
97 mach) gdb_host=i386mach ;;
98 esac
99 ;;
100 esac
101 ;;
102
103 c1 | c2) gdb_host=convex ;;
104
105 ns32k)
106 case "${host_vendor}" in
107 umax) gdb_host=umax ;;
108 esac
109 ;;
110
111 romp)
112 gdb_host=rtbsd
113 ;;
114
115 rs6000)
116 gdb_host=rs6000
117 ;;
118
119 a29k)
120 gdb_host=ultra3
121 ;;
122
123 m88k)
124 case "${host_vendor}" in
125 motorola)
126 gdb_host=delta88 ;;
127 *)
128 gdb_host=m88k ;;
129 esac
130 ;;
131
132 vax)
133 case "${host_os}" in
134 bsd*)
135 gdb_host=vaxbsd ;;
136 ultrix*)
137 gdb_host=vaxult ;;
138 esac
139 ;;
140
141 arm | merlin | none | np1 | pn | pyramid | tahoe)
142 gdb_host=${host_cpu}
143 ;;
144
145 ### unhandled hosts
146 #altosgas
147 #i386v-g
148 #i386v32-g
149
150 esac
151
152
153 if [ ! -f ${srcdir}/config/mh-${gdb_host} ]; then
154 echo '***' "Gdb does not support host ${host}" 1>&2
155 exit 1
156 fi
157
158 # We really shouldn't depend on there being a space after XM_FILE= ...
159 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/mh-${gdb_host}`
160
161 # per-target:
162
163 case "${target_cpu}" in
164
165 m68k)
166 case "${target_vendor}" in
167 att) gdb_target=3b1 ;;
168 altos) gdb_target=altos ;;
169 cbm)
170 case ${target_os} in
171 amigados) gdb_host=amigados ;;
172 sysv4*) gdb_target=amix ;;
173 esac
174 ;;
175 hp)
176 case "${target_os}" in
177 bsd) gdb_target=hp300bsd ;;
178 hpux) gdb_target=hp300hpux ;;
179 esac
180 ;;
181 sun)
182 case "${target_os}" in
183 sunos3) gdb_target=sun3os3 ;;
184 sunos4) gdb_target=sun3os4 ;;
185 *) gdb_target=sun3 ;;
186 esac
187 ;;
188 wrs) gdb_target=vxworks68 ;;
189 isi) gdb_target=isi ;;
190 sony) gdb_target=news ;;
191 esac
192 ;;
193
194 m68000)
195 case "${target_vendor}" in
196 sun)
197 case "${target_os}" in
198 sunos3) gdb_target=sun2os3 ;;
199 sunos4) gdb_target=sun2os4 ;;
200 *) gdb_target=sun2 ;;
201 esac
202 esac
203 ;;
204
205 m68030)
206 case "${target_vendor}" in
207 sony) gdb_target=news1000 ;;
208 esac
209 ;;
210
211 none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
212 gdb_target=${target_cpu} ;;
213
214 m88k)
215 case "${target_vendor}" in
216 motorola) gdb_target=delta88 ;;
217 *) gdb_target=dgux ;;
218 esac
219 ;;
220 a29k)
221 case "${target_os}" in
222 none|aout|coff) gdb_target=a29k ;;
223 sym1) gdb_target=ultra3 ;;
224 kern) gdb_target=a29k-kern ;;
225 ebmon) gdb_target=a29k;;
226 esac
227 ;;
228
229 mips)
230 case "${target_vendor}" in
231 sony) gdb_target=bigmips ;;
232 dec) gdb_target=decstation ;;
233 little) gdb_target=littlemips ;;
234 sgi) gdb_target=irix3 ;;
235 esac
236 ;;
237
238 c1 | c2) gdb_target=convex ;;
239
240 sparc)
241 case "${target_vendor}" in
242 sun)
243 case "${target_os}" in
244 sunos3) gdb_target=sun4os3 ;;
245 sunos4) gdb_target=sun4os4 ;;
246 *) gdb_target=sun4 ;;
247 esac
248 ;;
249 esac
250 ;;
251
252 h8300)
253 gdb_target=h8300hms
254 ;;
255
256 i860) gdb_target=stratus
257 ;;
258
259 i386)
260 case "${target_vendor}" in
261 sco) gdb_target=i386sco ;;
262 sun) gdb_target=sun386 ;;
263 sequent) gdb_target=symmetry ;;
264 *)
265 case "${target_os}" in
266 sysv32) gdb_target=i386v32 ;;
267 scosysv3*) gdb_target=i386v32 ;;
268 sysv4*) gdb_target=i386v4 ;;
269 sysv*) gdb_target=i386v ;;
270 mach) gdb_target=i386mach ;;
271 coff) gdb_target=i386v ;;
272 aout) gdb_target=i386aout ;;
273 esac
274 esac
275 ;;
276
277 i960)
278 case "${target_vendor}" in
279 bout | wrs) gdb_target=vxworks960 ;;
280 coff | intel) gdb_target=nindy960 ;;
281 esac
282 ;;
283
284 ns32k)
285 case "${target_vendor}" in
286 utek) gdb_target=umax ;;
287 esac
288 ;;
289
290 rs6000)
291 gdb_target=rs6000
292 ;;
293
294 ### unhandled targets
295 # altosgas
296 # i386v-g
297 # i386v32-g
298
299 esac
300
301 if [ ! -f ${srcdir}/config/mt-${gdb_target} ]; then
302 echo '***' "Gdb does not support target ${target}" 1>&2
303 exit 1
304 fi
305
306 if [ -z "${removing}" ] ; then
307 cat ${srcdir}/config/mh-${gdb_host} ${srcdir}/config/mt-${gdb_target} | awk '$1 == "#msg" {
308 print substr($0,6)}'
309 fi
310
311 # We really shouldn't depend on there being a space after TM_FILE= ...
312 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/mt-${gdb_target}`
313
314 host_makefile_frag=${srcdir}/config/mh-${gdb_host}
315 target_makefile_frag=${srcdir}/config/mt-${gdb_target}
316
317 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
318 # ?config/* file, we don't make the corresponding links. But we have
319 # to remove the xm.h files and tm.h files anyway, e.g. when switching
320 # from "configure host" to "configure none".
321 files=
322 links=
323 rm -f xm.h
324 if [ "${hostfile}" != "" ]; then
325 files="${files} ${hostfile}"
326 links="${links} xm.h"
327 fi
328 rm -f tm.h
329 if [ "${targetfile}" != "" ]; then
330 files="${files} ${targetfile}"
331 links="${links} tm.h"
332 fi
333
334 # post-target:
335
336 case ${srcdir} in
337 .)
338 ;;
339 *)
340 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
341 echo "source ${srcdir}/.gdbinit" >> .gdbinit
342 esac
343
344 cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile
This page took 0.043877 seconds and 5 git commands to generate.