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