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