Initial revision
[deliverable/binutils-gdb.git] / gdb / configure.in
CommitLineData
50d2bb5b 1configdirs="doc"
912e0732
RP
2srcname="GDB"
3srctrigger=main.c
bc028766
RP
4target_dependent=true
5
0df06ca0
RP
6# per-host:
7
6c815bbe
RP
8# map host info into gdb names.
9
10case "${host_cpu}" in
11
12m68k)
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 ;;
afe4ca15
JG
21
22 cbm)
23 case ${host_os} in
24 amigados) gdb_host=amigados ;;
25 svr4) gdb_host=amix ;;
26 esac
27 ;;
28
6c815bbe
RP
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
48m68000)
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
59sparc)
60 case "${host_os}" in
61 sunos3) gdb_host=sun4os3 ;;
62 sunos4) gdb_host=sun4os4 ;;
63 *) gdb_host=sun4 ;;
64 esac
65 ;;
66
67m68030)
68 case "${host_vendor}" in
69 sony) gdb_host=news1000 ;;
70 esac
71 ;;
72
73mips)
74 case "${host_vendor}" in
75 sony) gdb_host=bigmips ;;
5d2cfefe 76 dec) gdb_host=decstation ;;
6c815bbe 77 little) gdb_host=littlemips ;;
625453dc 78 sgi) gdb_host=irix3 ;;
6c815bbe
RP
79 esac
80 ;;
81
82i386)
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 sysv) gdb_host=i386v ;;
90 sysv32) gdb_host=i386v32 ;;
8c6e9f05 91 svr4) gdb_host=i386v4 ;;
6617b94e 92 mach) gdb_host=i386mach ;;
6c815bbe
RP
93 esac
94 ;;
95 esac
96 ;;
97
98c1 | c2) gdb_host=convex ;;
99
100ns32k)
101 case "${host_vendor}" in
102 umax) gdb_host=umax ;;
103 esac
104 ;;
105
0476df73 106romp)
473f3318
JG
107 gdb_host=rtbsd
108 ;;
109
b90c4f33
JG
110rs6000)
111 gdb_host=rs6000
112 ;;
113
473f3318
JG
114a29k)
115 gdb_host=ultra3
116 ;;
117
8c7ae4a2
SC
118m88k)
119 case "${host_vendor}" in
120 motorola)
121 gdb_host=delta88 ;;
122 *)
123 gdb_host=m88k ;;
124 esac
125 ;;
126
127arm | vax | merlin | none | np1 | pn | pyramid | tahoe)
473f3318
JG
128 gdb_host=${host_cpu}
129 ;;
6c815bbe
RP
130
131### unhandled hosts
132#altosgas
133#i386v-g
134#i386v32-g
135
136esac
137
8c7ae4a2 138
bc028766 139if [ ! -f ${srcdir}/config/mh-${gdb_host} ]; then
6c815bbe 140 echo '***' "Gdb does not support host ${host}" 1>&2
912e0732
RP
141 exit 1
142fi
143
bdf3621b 144# We really shouldn't depend on there being a space after XM_FILE= ...
bc028766 145hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/mh-${gdb_host}`
912e0732 146
0df06ca0 147# per-target:
912e0732 148
6c815bbe
RP
149case "${target_cpu}" in
150
151m68k)
152 case "${target_vendor}" in
153 att) gdb_target=3b1 ;;
154 altos) gdb_target=altos ;;
afe4ca15
JG
155 cbm)
156 case ${target_os} in
157 amigados) gdb_host=amigados ;;
158 svr4) gdb_target=amix ;;
159 esac
160 ;;
6c815bbe
RP
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
180m68000)
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
191m68030)
192 case "${target_vendor}" in
193 sony) gdb_target=news1000 ;;
194 esac
195 ;;
196
8c7ae4a2 197none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
6c815bbe 198 gdb_target=${target_cpu} ;;
6c815bbe 199
8c7ae4a2
SC
200m88k)
201 case "${target_vendor}" in
202 motorola) gdb_target=delta88 ;;
203 *) gdb_target=dgux ;;
204 esac
205 ;;
473f3318
JG
206a29k)
207 case "${target_os}" in
f74ff50f 208 none|aout|coff) gdb_target=a29k ;;
473f3318
JG
209 sym1) gdb_target=ultra3 ;;
210 kern) gdb_target=a29k-kern ;;
44e4e473 211 ebmon) gdb_target=a29k;;
473f3318
JG
212 esac
213 ;;
214
6c815bbe
RP
215mips)
216 case "${target_vendor}" in
217 sony) gdb_target=bigmips ;;
5d2cfefe 218 dec) gdb_target=decstation ;;
6c815bbe 219 little) gdb_target=littlemips ;;
625453dc 220 sgi) gdb_target=irix3 ;;
6c815bbe
RP
221 esac
222 ;;
223
224c1 | c2) gdb_target=convex ;;
225
6c815bbe
RP
226sparc)
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
239i386)
240 case "${target_vendor}" in
69e87de2
RP
241 sco) gdb_target=i386sco ;;
242 sun) gdb_target=sun386 ;;
6c815bbe
RP
243 sequent) gdb_target=symmetry ;;
244 *)
245 case "${target_os}" in
246 sysv) gdb_target=i386v ;;
247 sysv32) gdb_target=i386v32 ;;
8c6e9f05 248 svr4) gdb_target=i386v4 ;;
6617b94e 249 mach) gdb_target=i386mach ;;
2b61280a
JG
250 coff) gdb_target=i386v ;;
251 aout) gdb_target=i386aout ;;
6c815bbe
RP
252 esac
253 esac
254 ;;
255
256i960)
257 case "${target_vendor}" in
69e87de2
RP
258 bout | wrs) gdb_target=vxworks960 ;;
259 coff | intel) gdb_target=nindy960 ;;
6c815bbe
RP
260 esac
261 ;;
262
263ns32k)
264 case "${target_vendor}" in
265 utek) gdb_target=umax ;;
266 esac
267 ;;
268
b90c4f33
JG
269rs6000)
270 gdb_target=rs6000
271 ;;
272
6c815bbe
RP
273### unhandled targets
274# altosgas
275# i386v-g
276# i386v32-g
277
278esac
279
bc028766 280if [ ! -f ${srcdir}/config/mt-${gdb_target} ]; then
6c815bbe 281 echo '***' "Gdb does not support target ${target}" 1>&2
912e0732
RP
282 exit 1
283fi
284
285if [ -z "${removing}" ] ; then
f7fde1e0 286 cat ${srcdir}/config/mh-${gdb_host} ${srcdir}/config/mt-${gdb_target} | awk '$1 == "#msg" {
912e0732
RP
287 print substr($0,6)}'
288fi
289
bdf3621b 290# We really shouldn't depend on there being a space after TM_FILE= ...
bc028766 291targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/mt-${gdb_target}`
912e0732 292
3978d059
JG
293host_makefile_frag=config/mh-${gdb_host}
294target_makefile_frag=config/mt-${gdb_target}
912e0732 295
bdf3621b 296# If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
dc0c3f64
JG
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".
bdf3621b
JG
300files=
301links=
dc0c3f64 302rm -f xm.h
bdf3621b
JG
303if [ "${hostfile}" != "" ]; then
304 files="${files} ${hostfile}"
305 links="${links} xm.h"
306fi
dc0c3f64 307rm -f tm.h
bdf3621b
JG
308if [ "${targetfile}" != "" ]; then
309 files="${files} ${targetfile}"
310 links="${links} tm.h"
311fi
312
313# post-target:
912e0732 314
bdf3621b
JG
315case ${srcdir} in
316 .)
317 ;;
318 *)
319 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
320 echo "source ${srcdir}/.gdbinit" >> .gdbinit
321esac
322
dc0c3f64 323cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile
This page took 0.056211 seconds and 4 git commands to generate.