Initial revision
[deliverable/binutils-gdb.git] / gdb / configure.in
CommitLineData
912e0732
RP
1srcname="GDB"
2srctrigger=main.c
912e0732 3
0df06ca0
RP
4# per-host:
5
6c815bbe
RP
6# map host info into gdb names.
7
8case "${host_cpu}" in
9
10m68k)
11 case "${host_vendor}" in
12 att) gdb_host=3b1 ;;
13 altos)
14 case "${host_os}" in
15 gas) gdb_host=altosgas ;;
16 *) gdb_host=altos ;;
17 esac
18 ;;
19 hp)
20 case ${host_os} in
21 hpux) gdb_host=hp300hpux ;;
22 bsd) gdb_host=hp300bsd ;;
23 esac
24 ;;
25
26 isi) gdb_host=isi ;;
27 sony) gdb_host=news ;;
28 sun)
29 case "${host_os}" in
30 sunos3) gdb_host=sun3os3 ;;
31 sunos4) gdb_host=sun3os4 ;;
32 *) gdb_host=sun3 ;;
33 esac
34 ;;
35 esac
36 ;;
37
38m68000)
39 case "${host_vendor}" in
40 sun)
41 case "${host_os}" in
42 sunos3) gdb_host=sun2os3 ;;
43 sunos4) gdb_host=sun2os4 ;;
44 *) gdb_host=sun2 ;;
45 esac
46 esac
47 ;;
48
49sparc)
50 case "${host_os}" in
51 sunos3) gdb_host=sun4os3 ;;
52 sunos4) gdb_host=sun4os4 ;;
53 *) gdb_host=sun4 ;;
54 esac
55 ;;
56
57m68030)
58 case "${host_vendor}" in
59 sony) gdb_host=news1000 ;;
60 esac
61 ;;
62
63mips)
64 case "${host_vendor}" in
65 sony) gdb_host=bigmips ;;
66 dec) gdb_host=dec3100 ;;
67 little) gdb_host=littlemips ;;
625453dc 68 sgi) gdb_host=irix3 ;;
6c815bbe
RP
69 esac
70 ;;
71
72i386)
73 case "${host_vendor}" in
74 sun) gdb_host=sun386 ;;
75 sco) gdb_host=i386sco ;;
76 sequent) gdb_host=symmetry ;;
77 *)
78 case "${host_os}" in
79 sysv) gdb_host=i386v ;;
80 sysv32) gdb_host=i386v32 ;;
81 esac
82 ;;
83 esac
84 ;;
85
86c1 | c2) gdb_host=convex ;;
87
88ns32k)
89 case "${host_vendor}" in
90 umax) gdb_host=umax ;;
91 esac
92 ;;
93
0476df73 94romp)
473f3318
JG
95 gdb_host=rtbsd
96 ;;
97
98a29k)
99 gdb_host=ultra3
100 ;;
101
102arm | vax | m88k | merlin | none | np1 | pn | pyramid | tahoe)
103 gdb_host=${host_cpu}
104 ;;
6c815bbe
RP
105
106### unhandled hosts
107#altosgas
108#i386v-g
109#i386v32-g
110
111esac
112
113if [ ! -f xconfig/${gdb_host} ]; then
114 echo '***' "Gdb does not support host ${host}" 1>&2
912e0732
RP
115 exit 1
116fi
117
bdf3621b 118# We really shouldn't depend on there being a space after XM_FILE= ...
6c815bbe 119hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <xconfig/${gdb_host}`
912e0732 120
0df06ca0 121# per-target:
912e0732 122
6c815bbe
RP
123case "${target_cpu}" in
124
125m68k)
126 case "${target_vendor}" in
127 att) gdb_target=3b1 ;;
128 altos) gdb_target=altos ;;
129 hp)
130 case "${target_os}" in
131 bsd) gdb_target=hp300bsd ;;
132 hpux) gdb_target=hp300hpux ;;
133 esac
134 ;;
135 sun)
136 case "${target_os}" in
137 sunos3) gdb_target=sun3os3 ;;
138 sunos4) gdb_target=sun3os4 ;;
139 *) gdb_target=sun3 ;;
140 esac
141 ;;
142 wrs) gdb_target=vxworks68 ;;
143 isi) gdb_target=isi ;;
144 sony) gdb_target=news ;;
145 esac
146 ;;
147
148m68000)
149 case "${target_vendor}" in
150 sun)
151 case "${target_os}" in
152 sunos3) gdb_target=sun2os3 ;;
153 sunos4) gdb_target=sun2os4 ;;
154 *) gdb_target=sun2 ;;
155 esac
156 esac
157 ;;
158
159m68030)
160 case "${target_vendor}" in
161 sony) gdb_target=news1000 ;;
162 esac
163 ;;
164
473f3318 165none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin | m88k)
6c815bbe 166 gdb_target=${target_cpu} ;;
6c815bbe 167
473f3318
JG
168a29k)
169 case "${target_os}" in
f74ff50f 170 none|aout|coff) gdb_target=a29k ;;
473f3318
JG
171 sym1) gdb_target=ultra3 ;;
172 kern) gdb_target=a29k-kern ;;
173 esac
174 ;;
175
6c815bbe
RP
176mips)
177 case "${target_vendor}" in
178 sony) gdb_target=bigmips ;;
179 dec) gdb_target=dec3100 ;;
180 little) gdb_target=littlemips ;;
625453dc 181 sgi) gdb_target=irix3 ;;
6c815bbe
RP
182 esac
183 ;;
184
185c1 | c2) gdb_target=convex ;;
186
6c815bbe
RP
187sparc)
188 case "${target_vendor}" in
189 sun)
190 case "${target_os}" in
191 sunos3) gdb_target=sun4os3 ;;
192 sunos4) gdb_target=sun4os4 ;;
193 *) gdb_target=sun4 ;;
194 esac
195 ;;
196 esac
197 ;;
198
199
200i386)
201 case "${target_vendor}" in
69e87de2
RP
202 sco) gdb_target=i386sco ;;
203 sun) gdb_target=sun386 ;;
6c815bbe 204 sequent) gdb_target=symmetry ;;
69e87de2
RP
205 coff) gdb_target=i386v ;;
206 aout) gdb_target=i386v ;;
6c815bbe
RP
207 *)
208 case "${target_os}" in
209 sysv) gdb_target=i386v ;;
210 sysv32) gdb_target=i386v32 ;;
211 esac
212 esac
213 ;;
214
215i960)
216 case "${target_vendor}" in
69e87de2
RP
217 bout | wrs) gdb_target=vxworks960 ;;
218 coff | intel) gdb_target=nindy960 ;;
6c815bbe
RP
219 esac
220 ;;
221
222ns32k)
223 case "${target_vendor}" in
224 utek) gdb_target=umax ;;
225 esac
226 ;;
227
228### unhandled targets
229# altosgas
230# i386v-g
231# i386v32-g
232
233esac
234
235if [ ! -f tconfig/${gdb_target} ]; then
236 echo '***' "Gdb does not support target ${target}" 1>&2
912e0732
RP
237 exit 1
238fi
239
240if [ -z "${removing}" ] ; then
6c815bbe 241 cat xconfig/${gdb_host} tconfig/${gdb_target} | awk '$1 == "#msg" {
912e0732
RP
242 print substr($0,6)}'
243fi
244
bdf3621b 245# We really shouldn't depend on there being a space after TM_FILE= ...
6c815bbe 246targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <tconfig/${gdb_target}`
912e0732 247
6c815bbe
RP
248host_makefile_frag=xconfig/${gdb_host}
249target_makefile_frag=tconfig/${gdb_target}
912e0732 250
bdf3621b 251# If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
dc0c3f64
JG
252# ?config/* file, we don't make the corresponding links. But we have
253# to remove the xm.h files and tm.h files anyway, e.g. when switching
254# from "configure host" to "configure none".
bdf3621b
JG
255files=
256links=
dc0c3f64 257rm -f xm.h
bdf3621b
JG
258if [ "${hostfile}" != "" ]; then
259 files="${files} ${hostfile}"
260 links="${links} xm.h"
261fi
dc0c3f64 262rm -f tm.h
bdf3621b
JG
263if [ "${targetfile}" != "" ]; then
264 files="${files} ${targetfile}"
265 links="${links} tm.h"
266fi
267
268# post-target:
912e0732 269
bdf3621b
JG
270case ${srcdir} in
271 .)
272 ;;
273 *)
274 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
275 echo "source ${srcdir}/.gdbinit" >> .gdbinit
276esac
277
dc0c3f64 278cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile
This page took 0.0446800000000001 seconds and 4 git commands to generate.