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