Thu Aug 27 16:38:42 1992 Ian Lance Taylor (ian@cygnus.com)
[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
19758e9e 10case "${host}" in
6c815bbe 11
19758e9e
JG
12a29k-*-*) gdb_host=ultra3 ;;
13
14arm-*-*) gdb_host=arm ;;
15
16c[12]-*-*) gdb_host=convex ;;
17
18hppa*-hp-hpux) gdb_host=hppahpux ;;
19hppa*-hp-bsd) gdb_host=hppabsd ;;
20
21i[34]86-sun-*) gdb_host=sun386 ;;
22i[34]86-sco-*) gdb_host=i386sco ;;
23i[34]86-sequent-*) gdb_host=symmetry ;;
24i[34]86-ncr-*) gdb_host=ncr3000 ;;
25
26i[34]86-*-go32) gdb_host=go32 ;;
27i[34]86-*-sysv32) gdb_host=i386v32 ;;
28i[34]86-*-sysv4*) gdb_host=i386v4 ;;
29i[34]86-*-sysv*) gdb_host=i386v ;;
30i[34]86-*-scosysv*) gdb_host=i386sco ;;
31i[34]86-*-mach) gdb_host=i386mach ;;
32i[34]86-*-linux) gdb_host=linux ;;
33
34i860-*-*) gdb_host=stratus ;;
35
36m68k-apollo*-sysv*) gdb_host=apollo68v ;;
37
38m68k-att-*) gdb_host=3b1 ;;
39
40m68k-altos-*) case "$gas" in
41 yes) gdb_host=altosgas ;;
42 *) gdb_host=altos ;;
43 esac ;;
44
45m68k-cbm-sysv4*) gdb_host=amix ;;
46
47m68k-hp-hpux) gdb_host=hp300hpux ;;
48m68k-hp-bsd) gdb_host=hp300bsd ;;
49
50m68k-isi-*) gdb_host=isi ;;
51m68k-sony-*) gdb_host=news ;;
52
53m68k-sun-sunos3) gdb_host=sun3os3 ;;
54m68k-sun-sunos4) gdb_host=sun3os4 ;;
55m68k-sun-*) gdb_host=sun3 ;;
56
57m68000-sun-sunos3) gdb_host=sun2os3 ;;
58m68000-sun-sunos4) gdb_host=sun2os4 ;;
59
60m68030-sony-*) gdb_host=news1000 ;;
61
62m88k-motorola-*) gdb_host=delta88 ;;
63m88k-*-*) gdb_host=m88k ;;
64
65mips-sony-*) gdb_host=bigmips ;;
66mips-dec-*) gdb_host=decstation ;;
67mips-little-*) gdb_host=littlemips ;;
68mips-sgi-irix3) gdb_host=irix3 ;;
69mips-sgi-irix4) gdb_host=irix4 ;;
70
71none-*-*) gdb_host=none ;;
72np1-*-*) gdb_host=np1 ;;
73
74ns32k-umax-*) gdb_host=umax ;;
75ns32k-utek-sysv) gdb_host=merlin ;;
76
77
78pn-*-*) gdb_host=pn ;;
79
80pyramid-*-*) gdb_host=pyramid ;;
81
82romp-*-*) gdb_host=rtbsd ;;
83
84rs6000-*-*) gdb_host=rs6000 ;;
85
86sparc-*-sunos3) gdb_host=sun4os3 ;;
87sparc-*-sunos4) gdb_host=sun4os4 ;;
88sparc-*-solaris2*) gdb_host=sun4sol2 ;;
89sparc-*-*) gdb_host=sun4 ;;
90
91tahoe-*-*) gdb_host=tahoe ;;
92
93vax-*-bsd*) gdb_host=vaxbsd ;;
94vax-*-ultrix*) gdb_host=vaxult ;;
7da1e27d 95
6c815bbe
RP
96### unhandled hosts
97#altosgas
98#i386v-g
99#i386v32-g
100
101esac
102
8c7ae4a2 103
fe7ca711 104if [ ! -f ${srcdir}/config/${gdb_host}.mh ]; then
6c815bbe 105 echo '***' "Gdb does not support host ${host}" 1>&2
912e0732
RP
106 exit 1
107fi
108
bdf3621b 109# We really shouldn't depend on there being a space after XM_FILE= ...
fe7ca711 110hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host}.mh`
912e0732 111
0df06ca0 112# per-target:
912e0732 113
6c815bbe
RP
114case "${target_cpu}" in
115
116m68k)
117 case "${target_vendor}" in
118 att) gdb_target=3b1 ;;
119 altos) gdb_target=altos ;;
afe4ca15
JG
120 cbm)
121 case ${target_os} in
122 amigados) gdb_host=amigados ;;
ee1ad69c 123 sysv4*) gdb_target=amix ;;
afe4ca15
JG
124 esac
125 ;;
498f1df0 126 ericsson) gdb_target=es1800 ;;
6c815bbe
RP
127 hp)
128 case "${target_os}" in
129 bsd) gdb_target=hp300bsd ;;
130 hpux) gdb_target=hp300hpux ;;
131 esac
132 ;;
133 sun)
134 case "${target_os}" in
135 sunos3) gdb_target=sun3os3 ;;
136 sunos4) gdb_target=sun3os4 ;;
137 *) gdb_target=sun3 ;;
138 esac
139 ;;
140 wrs) gdb_target=vxworks68 ;;
8fbd7d26 141 netx) gdb_target=vxworks68 ;;
6c815bbe
RP
142 isi) gdb_target=isi ;;
143 sony) gdb_target=news ;;
144 esac
b159ce3f
SEF
145 case "${target_os}" in
146 os68k) gdb_target=os68k ;;
147 esac
6c815bbe
RP
148 ;;
149
150m68000)
151 case "${target_vendor}" in
152 sun)
153 case "${target_os}" in
154 sunos3) gdb_target=sun2os3 ;;
155 sunos4) gdb_target=sun2os4 ;;
156 *) gdb_target=sun2 ;;
157 esac
4feb00be 158 ;;
ddce75e0 159 ericsson) gdb_target=es1800 ;;
4feb00be
MT
160 wrs) gdb_target=vxworks68 ;;
161 esac
162 ;;
163
164m680[124]0)
165 case "${target_vendor}" in
166 wrs) gdb_target=vxworks68 ;;
6c815bbe
RP
167 esac
168 ;;
169
170m68030)
171 case "${target_vendor}" in
172 sony) gdb_target=news1000 ;;
4feb00be 173 wrs) gdb_target=vxworks68 ;;
6c815bbe
RP
174 esac
175 ;;
176
88cc9a36
SG
177m68kmote)
178 case "${target_vendor}" in
179 tandem) gdb_target=st2000 ;;
180 esac
181 ;;
182
8c7ae4a2 183none | arm | tahoe | vax | np1 | pn | np1 | pn | pyramid | merlin)
6c815bbe 184 gdb_target=${target_cpu} ;;
6c815bbe 185
8c7ae4a2
SC
186m88k)
187 case "${target_vendor}" in
188 motorola) gdb_target=delta88 ;;
189 *) gdb_target=dgux ;;
190 esac
191 ;;
473f3318
JG
192a29k)
193 case "${target_os}" in
f74ff50f 194 none|aout|coff) gdb_target=a29k ;;
473f3318
JG
195 sym1) gdb_target=ultra3 ;;
196 kern) gdb_target=a29k-kern ;;
44e4e473 197 ebmon) gdb_target=a29k;;
0857b46a 198 udi) gdb_target=a29k-udi;;
473f3318
JG
199 esac
200 ;;
201
6c815bbe
RP
202mips)
203 case "${target_vendor}" in
204 sony) gdb_target=bigmips ;;
069bc454 205 big) gdb_target=bigmips ;;
5d2cfefe 206 dec) gdb_target=decstation ;;
6c815bbe 207 little) gdb_target=littlemips ;;
625453dc 208 sgi) gdb_target=irix3 ;;
6c815bbe
RP
209 esac
210 ;;
211
212c1 | c2) gdb_target=convex ;;
213
aeb20643 214sparc*)
6c815bbe 215 case "${target_vendor}" in
aeb20643 216 sun | fujitsu)
6c815bbe 217 case "${target_os}" in
f9e3b3cc
JG
218 sunos3) gdb_target=sun4os3 ;;
219 sunos4) gdb_target=sun4os4 ;;
bf2e5f6b 220 solaris2*) gdb_target=sun4sol2 ;;
f9e3b3cc 221 *) gdb_target=sun4 ;;
6c815bbe
RP
222 esac
223 ;;
224 esac
225 ;;
226
ce7730d6 227h8300)
8174b2af 228 gdb_target=h8300hms
ce7730d6 229 ;;
6c815bbe 230
be9a2362
FF
231i860) gdb_target=stratus
232 ;;
233
9e4667f6 234i386 | i486)
6c815bbe 235 case "${target_vendor}" in
69e87de2
RP
236 sco) gdb_target=i386sco ;;
237 sun) gdb_target=sun386 ;;
6c815bbe 238 sequent) gdb_target=symmetry ;;
4db8e515 239 ncr) gdb_target=ncr3000 ;;
6c815bbe
RP
240 *)
241 case "${target_os}" in
6c815bbe 242 sysv32) gdb_target=i386v32 ;;
92732c27 243 scosysv3*) gdb_target=i386v32 ;;
ee1ad69c
FF
244 sysv4*) gdb_target=i386v4 ;;
245 sysv*) gdb_target=i386v ;;
6617b94e 246 mach) gdb_target=i386mach ;;
2b61280a
JG
247 coff) gdb_target=i386v ;;
248 aout) gdb_target=i386aout ;;
e37a6e9c 249 linux) gdb_target=linux ;;
6c815bbe
RP
250 esac
251 esac
252 ;;
253
254i960)
255 case "${target_vendor}" in
69e87de2
RP
256 bout | wrs) gdb_target=vxworks960 ;;
257 coff | intel) gdb_target=nindy960 ;;
6c815bbe
RP
258 esac
259 ;;
260
261ns32k)
262 case "${target_vendor}" in
263 utek) gdb_target=umax ;;
264 esac
265 ;;
266
b90c4f33
JG
267rs6000)
268 gdb_target=rs6000
269 ;;
270
4a2d5d0e 271hppa*)
7da1e27d
SG
272 case "${target_vendor}" in
273 hp)
274 case "${target_os}" in
275 hpux) gdb_target=hppahpux ;;
276 bsd) gdb_target=hppabsd ;;
277 esac
278 ;;
279 esac
280 ;;
281
6c815bbe
RP
282### unhandled targets
283# altosgas
284# i386v-g
285# i386v32-g
286
287esac
288
fe7ca711 289if [ ! -f ${srcdir}/config/${gdb_target}.mt ]; then
6c815bbe 290 echo '***' "Gdb does not support target ${target}" 1>&2
912e0732
RP
291 exit 1
292fi
293
294if [ -z "${removing}" ] ; then
fe7ca711 295 cat ${srcdir}/config/${gdb_host}.mh ${srcdir}/config/${gdb_target}.mt | awk '$1 == "#msg" {
912e0732
RP
296 print substr($0,6)}'
297fi
298
bdf3621b 299# We really shouldn't depend on there being a space after TM_FILE= ...
fe7ca711 300targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target}.mt`
912e0732 301
fe7ca711
SC
302host_makefile_frag=config/${gdb_host}.mh
303target_makefile_frag=config/${gdb_target}.mt
912e0732 304
bdf3621b 305# If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
dc0c3f64
JG
306# ?config/* file, we don't make the corresponding links. But we have
307# to remove the xm.h files and tm.h files anyway, e.g. when switching
308# from "configure host" to "configure none".
bdf3621b
JG
309files=
310links=
dc0c3f64 311rm -f xm.h
bdf3621b
JG
312if [ "${hostfile}" != "" ]; then
313 files="${files} ${hostfile}"
314 links="${links} xm.h"
315fi
dc0c3f64 316rm -f tm.h
bdf3621b
JG
317if [ "${targetfile}" != "" ]; then
318 files="${files} ${targetfile}"
319 links="${links} tm.h"
320fi
321
322# post-target:
912e0732 323
bdf3621b
JG
324case ${srcdir} in
325 .)
326 ;;
327 *)
328 grep -s "source ${srcdir}/.gdbinit" .gdbinit 2>/dev/null || \
329 echo "source ${srcdir}/.gdbinit" >> .gdbinit
330esac
331
dc0c3f64 332cat ${srcdir}/alldeps.mak ${srcdir}/depend >>Makefile
This page took 0.074419 seconds and 4 git commands to generate.