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