1 # This file is a shell script fragment that supplies the information
2 # necessary to tailor a template configure script into the configure
3 # script approriate for this directory. For more information, check
4 # any existing configure script.
9 configdirs="doc testsuite"
13 # Map host cpu into the config cpu subdirectory name.
14 # The default is $host_cpu.
18 c[12]) gdb_host_cpu=convex ;;
19 hppa*) gdb_host_cpu=pa ;;
20 i[345]86) gdb_host_cpu=i386 ;;
21 m68*) gdb_host_cpu=m68k ;;
22 m88*) gdb_host_cpu=m88k ;;
23 np1) gdb_host_cpu=gould ;;
24 pyramid) gdb_host_cpu=pyr ;;
25 *) gdb_host_cpu=$host_cpu ;;
29 # map host info into gdb names.
33 a29k-*-*) gdb_host=ultra3 ;;
35 alpha-*-osf1*) gdb_host=alpha-osf1 ;;
36 alpha-*-osf[23456789]*) gdb_host=alpha-osf2 ;;
38 arm-*-*) gdb_host=arm ;;
40 c[12]-*-*) gdb_host=convex ;;
42 hppa*-*-bsd*) gdb_host=hppabsd ;;
43 hppa*-*-hiux*) gdb_host=hppahpux ;;
44 hppa*-*-hpux*) gdb_host=hppahpux ;;
45 hppa*-*-osf*) gdb_host=hppabsd ;;
47 i[345]86-ncr-*) gdb_host=ncr3000 ;;
48 i[345]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
49 i[345]86-sequent-sysv4*) gdb_host=ptx4 ;;
50 i[345]86-sequent-sysv*) gdb_host=ptx ;;
51 i[345]86-*-aix*) gdb_host=i386aix ;;
52 i[345]86-*-bsd*) gdb_host=i386bsd ;;
53 i[345]86-*-freebsd*) gdb_host=fbsd ;;
54 i[345]86-*-netbsd*) gdb_host=nbsd ;;
55 i[345]86-*-go32*) gdb_host=go32 ;;
56 i[345]86-*-linux*) gdb_host=linux ;;
57 i[345]86-*-lynxos*) gdb_host=i386lynx ;;
58 i[345]86-*-mach3*) gdb_host=i386m3 ;;
59 i[345]86-*-mach*) gdb_host=i386mach ;;
60 i[345]86-*-osf1mk*) gdb_host=osf1mk ;;
61 i[345]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
62 i[345]86-*-sco*) gdb_host=i386sco ;;
63 i[345]86-*-solaris*) gdb_host=i386sol2 ;;
64 i[345]86-*-sunos*) gdb_host=sun386 ;;
65 i[345]86-*-sysv3.2*) gdb_host=i386v32 ;;
66 i[345]86-*-sysv32*) gdb_host=i386v32 ;;
67 i[345]86-*-sysv4*) gdb_host=i386v4 ;;
68 i[345]86-*-unixware) gdb_host=i386v4 ;;
69 i[345]86-*-sysv*) gdb_host=i386v ;;
70 i[345]86-*-isc*) gdb_host=i386v32 ;;
71 i[345]86-*-os9k) gdb_host=i386os9k ;;
73 m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
74 m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
75 m68030-sony-*) gdb_host=news1000 ;;
77 m68*-altos-*) gdb_host=altos ;;
78 m68*-apollo*-sysv*) gdb_host=apollo68v ;;
79 m68*-apollo*-bsd*) gdb_host=apollo68b ;;
80 m68*-att-*) gdb_host=3b1 ;;
81 m68*-bull*-sysv*) gdb_host=dpx2 ;;
82 m68*-hp-bsd*) gdb_host=hp300bsd ;;
83 m68*-hp-hpux*) gdb_host=hp300hpux ;;
84 m68*-isi-*) gdb_host=isi ;;
85 m68*-*-lynxos*) gdb_host=m68klynx ;;
86 m68*-*-sysv4*) gdb_host=m68kv4 ;;
87 m68*-motorola-*) gdb_host=delta68 ;;
88 m68*-sony-*) gdb_host=news ;;
89 m68*-sun-sunos3*) gdb_host=sun3os3 ;;
90 m68*-sun-sunos4*) gdb_host=sun3os4 ;;
91 m68*-sun-*) gdb_host=sun3os4 ;;
93 m88*-harris-cxux*) gdb_host=cxux ;;
94 m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
95 m88*-motorola-sysv*) gdb_host=delta88 ;;
96 m88*-*-mach3*) gdb_host=mach3 ;;
97 m88*-*-*) gdb_host=m88k ;;
99 mips-dec-mach3*) gdb_host=mach3 ;;
100 mips-dec-*) gdb_host=decstation ;;
101 mips-little-*) gdb_host=littlemips ;;
102 mips-sgi-irix3*) gdb_host=irix3 ;;
103 mips-sgi-irix4*) gdb_host=irix4 ;;
104 mips-sgi-irix5*) gdb_host=irix5 ;;
105 mips-sony-*) gdb_host=news-mips ;;
106 mips-*-mach3*) gdb_host=mach3 ;;
107 mips-*-sysv4*) gdb_host=mipsv4 ;;
108 mips-*-sysv*) gdb_host=riscos ;;
109 mips-*-riscos*) gdb_host=riscos ;;
111 none-*-*) gdb_host=none ;;
113 np1-*-*) gdb_host=np1 ;;
115 ns32k-*-mach3*) gdb_host=mach3 ;;
116 ns32k-*-netbsd*) gdb_host=nbsd ;;
117 ns32k-umax-*) gdb_host=umax ;;
118 ns32k-utek-sysv*) gdb_host=merlin ;;
120 pn-*-*) gdb_host=pn ;;
122 pyramid-*-*) gdb_host=pyramid ;;
124 romp-*-*) gdb_host=rtbsd ;;
126 rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
127 rs6000-*-*) gdb_host=rs6000 ;;
129 sparc-*-lynxos*) gdb_host=sparclynx ;;
130 sparc-*-netbsd*) gdb_host=nbsd ;;
131 sparc-*-solaris2*) gdb_host=sun4sol2 ;;
132 sparc-*-sunos4*) gdb_host=sun4os4 ;;
133 sparc-*-*) gdb_host=sun4os4 ;;
135 tahoe-*-*) gdb_host=tahoe ;;
137 vax-*-bsd*) gdb_host=vaxbsd ;;
138 vax-*-ultrix2*) gdb_host=vaxult2 ;;
139 vax-*-ultrix*) gdb_host=vaxult ;;
141 w65-*-*) gdb_host=w65 ;;
146 if [ ! -f ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ]; then
147 echo '***' "Gdb does not support host ${host}" 1>&2
151 # We really shouldn't depend on there being a space after XM_FILE= ...
152 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh`
156 # Map target cpu into the config cpu subdirectory name.
157 # The default is $target_cpu.
159 case "${target_cpu}" in
161 alpha) gdb_target_cpu=alpha ;;
162 c[12]) gdb_target_cpu=convex ;;
163 hppa*) gdb_target_cpu=pa ;;
164 i[345]86) gdb_target_cpu=i386 ;;
165 m68*) gdb_target_cpu=m68k ;;
166 m88*) gdb_target_cpu=m88k ;;
167 mips*) gdb_target_cpu=mips ;;
168 np1) gdb_target_cpu=gould ;;
169 pn) gdb_target_cpu=gould ;;
170 pyramid) gdb_target_cpu=pyr ;;
171 sparclite*) gdb_target_cpu=sparc
172 configdirs="${configdirs} sparclite" ;;
173 sparc*) gdb_target_cpu=sparc ;;
174 *) gdb_target_cpu=$target_cpu ;;
178 # map target info into gdb names.
182 a29k-*-aout*) gdb_target=a29k ;;
183 a29k-*-coff*) gdb_target=a29k ;;
184 a29k-*-elf*) gdb_target=a29k ;;
185 a29k-*-ebmon*) gdb_target=a29k ;;
186 a29k-*-kern*) gdb_target=a29k-kern ;;
187 a29k-*-none*) gdb_target=a29k ;;
188 a29k-*-sym1*) gdb_target=ultra3 ;;
189 a29k-*-udi*) gdb_target=a29k-udi ;;
190 a29k-*-vxworks*) gdb_target=vx29k ;;
192 alpha-*-osf*) gdb_target=alpha-osf1 ;;
193 alpha-*-netware*) gdb_target=alpha-nw
194 configdirs="${configdirs} nlm" ;;
197 arc-*-*) gdb_target=arc ;;
200 arm-*-*) gdb_target=arm ;;
202 c1-*-*) gdb_target=convex ;;
203 c2-*-*) gdb_target=convex ;;
205 h8300-*-*) gdb_target=h8300hms ;;
206 h8500-*-*) gdb_target=h8500hms ;;
208 sh-*-*) gdb_target=sh ;;
211 r16-*-*) gdb_target=r16 ;;
214 hppa*-*-bsd*) gdb_target=hppabsd ;;
215 hppa*-*-pro*) gdb_target=hppapro ;;
216 hppa*-*-hpux*) gdb_target=hppahpux ;;
217 hppa*-*-hiux*) gdb_target=hppahpux ;;
218 hppa*-*-osf*) gdb_target=hppaosf ;;
220 i[345]86-sequent-bsd*) gdb_target=symmetry ;;
221 i[345]86-sequent-sysv4*) gdb_target=ptx4 ;;
222 i[345]86-sequent-sysv*) gdb_target=ptx ;;
223 i[345]86-ncr-*) gdb_target=ncr3000 ;;
224 i[345]86-*-aout*) gdb_target=i386aout ;;
225 i[345]86-*-coff*) gdb_target=i386v ;;
226 i[345]86-*-elf*) gdb_target=i386v ;;
227 i[345]86-*-aix*) gdb_target=i386aix ;;
228 i[345]86-*-bsd*) gdb_target=i386bsd ;;
229 i[345]86-*-freebsd*) gdb_target=fbsd ;;
230 i[345]86-*-netbsd*) gdb_target=nbsd ;;
231 i[345]86-*-os9k) gdb_target=i386os9k ;;
232 i[345]86-*-go32*) gdb_target=i386aout ;;
233 i[345]86-*-lynxos*) gdb_target=i386lynx
234 configdirs="${configdirs} gdbserver" ;;
235 i[345]86-*-solaris*) gdb_target=i386sol2 ;;
236 i[345]86-*-sunos*) gdb_target=sun386 ;;
237 i[345]86-*-sysv4*) gdb_target=i386v4 ;;
238 i[345]86-*-sco*) gdb_target=i386v ;;
239 i[345]86-*-sysv*) gdb_target=i386v ;;
240 i[345]86-*-linux*) gdb_target=linux ;;
241 i[345]86-*-isc*) gdb_target=i386v ;;
242 i[345]86-*-mach3*) gdb_target=i386m3 ;;
243 i[345]86-*-mach*) gdb_target=i386mach ;;
244 i[345]86-*-netware*) gdb_target=i386nw
245 configdirs="${configdirs} nlm" ;;
246 i[345]86-*-osf1mk*) gdb_target=i386mk ;;
248 i960-*-bout*) gdb_target=vxworks960 ;;
249 i960-*-coff*) gdb_target=nindy960 ;;
250 i960-*-elf*) gdb_target=nindy960 ;;
252 i960-*-nindy*) gdb_target=nindy960 ;;
253 i960-*-vxworks*) gdb_target=vxworks960 ;;
255 m68000-*-sunos3*) gdb_target=sun2os3 ;;
256 m68000-*-sunos4*) gdb_target=sun2os4 ;;
258 m68*-apollo*-bsd*) gdb_target=apollo68b ;;
259 m68*-bull-sysv*) gdb_target=dpx2 ;;
260 m68*-hp-bsd*) gdb_target=hp300bsd ;;
261 m68*-hp-hpux*) gdb_target=hp300hpux ;;
262 m68*-altos-*) gdb_target=altos ;;
263 m68*-att-*) gdb_target=3b1 ;;
264 m68*-cisco*-*) gdb_target=cisco ;;
265 m68*-ericsson-*) gdb_target=es1800 ;;
266 m68*-isi-*) gdb_target=isi ;;
267 m68*-motorola-*) gdb_target=delta68 ;;
268 m68*-netx-*) gdb_target=vxworks68 ;;
269 m68*-sony-*) gdb_target=news ;;
270 m68*-tandem-*) gdb_target=st2000 ;;
271 m68*-rom68k-*) gdb_target=monitor ;;
272 m68*-*bug-*) gdb_target=monitor ;;
273 m68*-monitor-*) gdb_target=monitor ;;
274 m68*-*-aout*) gdb_target=monitor ;;
275 m68*-*-coff*) gdb_target=monitor ;;
276 m68*-*-elf*) gdb_target=monitor ;;
277 m68*-*-lynxos*) gdb_target=m68klynx
278 configdirs="${configdirs} gdbserver" ;;
279 m68*-*-os68k*) gdb_target=os68k ;;
280 m68*-*-sunos3*) gdb_target=sun3os3 ;;
281 m68*-*-sunos4*) gdb_target=sun3os4 ;;
282 m68*-*-sysv4*) gdb_target=m68kv4 ;;
283 m68*-*-vxworks*) gdb_target=vxworks68 ;;
284 m68*-*-est*) gdb_target=est ;;
286 m88*-harris-cxux*) gdb_target=cxux ;;
287 m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
288 m88*-*-mach3*) gdb_target=mach3 ;;
289 m88*-motorola-*) gdb_target=delta88 ;;
290 m88*-*-*) gdb_target=m88k ;;
292 mips64*-big-*) gdb_target=bigmips64 ;;
293 mips*-big-*) gdb_target=bigmips ;;
294 mips*-dec-mach3*) gdb_target=mach3 ;;
295 mips*-dec-*) gdb_target=decstation ;;
296 mips64*el-*-ecoff*) gdb_target=idtl64 ;;
297 mips64*-idt-ecoff*) gdb_target=idt64 ;;
298 mips64*el-*-elf*) gdb_target=idtl64 ;;
299 mips64*-*-elf*) gdb_target=idt64 ;;
300 mips*el-*-ecoff*) gdb_target=idtl ;;
301 mips*-*-ecoff*) gdb_target=idt ;;
302 mips*el-*-elf*) gdb_target=idtl ;;
303 mips*-*-elf*) gdb_target=idt ;;
304 mips*-little-*) gdb_target=littlemips ;;
305 mips*-sgi-irix5*) gdb_target=irix5 ;;
306 mips*-sgi-*) gdb_target=irix3 ;;
307 mips*-sony-*) gdb_target=bigmips ;;
308 mips*-*-mach3*) gdb_target=mach3 ;;
309 mips*-*-sysv4*) gdb_target=mipsv4 ;;
310 mips*-*-sysv*) gdb_target=bigmips ;;
311 mips*-*-riscos*) gdb_target=bigmips ;;
313 none-*-*) gdb_target=none ;;
315 np1-*-*) gdb_target=np1 ;;
317 ns32k-*-mach3*) gdb_target=mach3 ;;
318 ns32k-*-netbsd*) gdb_target=nbsd ;;
319 ns32k-utek-sysv*) gdb_target=merlin ;;
320 ns32k-utek-*) gdb_target=umax ;;
322 pn-*-*) gdb_target=pn ;;
323 powerpc-*-netware*) gdb_target=ppc-nw
324 configdirs="${configdirs} nlm" ;;
326 pyramid-*-*) gdb_target=pyramid ;;
328 rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
329 rs6000-*-*) gdb_target=rs6000 ;;
331 sparc-*-aout*) gdb_target=sparc-em ;;
332 sparc-*-coff*) gdb_target=sparc-em ;;
333 sparc-*-elf*) gdb_target=sparc-em ;;
334 sparc-*-lynxos*) gdb_target=sparclynx
335 configdirs="${configdirs} gdbserver" ;;
336 sparc-*-netbsd*) gdb_target=nbsd ;;
337 sparc-*-solaris2*) gdb_target=sun4sol2 ;;
338 sparc-*-sunos4*) gdb_target=sun4os4 ;;
339 sparc-*-vxworks*) gdb_target=vxsparc ;;
340 sparc-*-*) gdb_target=sun4os4 ;;
341 sparclite*-*-*) gdb_target=sparclite ;;
342 sparc64-*-*) gdb_target=sp64 ;;
344 tahoe-*-*) gdb_target=tahoe ;;
346 vax-*-*) gdb_target=vax ;;
348 w65-*-*) gdb_target=w65 ;;
350 z8k-*-sim*) gdb_target=z8ksim ;;
351 z8k-*-coff*) gdb_target=z8ksim ;;
355 if [ ! -f ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt ]; then
356 echo '***' "Gdb does not support target ${target}" 1>&2
360 if [ -z "${removing}" ] ; then
361 cat ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | awk '$1 == "#msg" {
365 # We really shouldn't depend on there being a space after TM_FILE= ...
366 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt`
369 # these really aren't orthogonal true/false values of the same condition,
370 # but shells are slow enough that I like to reuse the test conditions
373 if [ "${target}" = "${host}" ] ; then
374 nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh`
376 # GDBserver is only useful in a "native" enviroment
377 configdirs=`echo $configdirs | sed 's/gdbserver//'`
380 host_makefile_frag=config/${gdb_host_cpu}/${gdb_host}.mh
381 target_makefile_frag=config/${gdb_target_cpu}/${gdb_target}.mt
383 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
384 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
385 # corresponding links. But we have to remove the xm.h files and tm.h
386 # files anyway, e.g. when switching from "configure host" to
392 if [ "${hostfile}" != "" ]; then
393 files="${files} config/${gdb_host_cpu}/${hostfile}"
394 links="${links} xm.h"
397 if [ "${targetfile}" != "" ]; then
398 files="${files} config/${gdb_target_cpu}/${targetfile}"
399 links="${links} tm.h"
402 if [ "${nativefile}" != "" ]; then
403 files="${files} config/${gdb_host_cpu}/${nativefile}"
404 links="${links} nm.h"
406 # A cross-only configuration.
407 files="${files} config/nm-empty.h"
408 links="${links} nm.h"
411 # start-sanitize-gdbtk
412 # Make it possible to use the GUI without doing a full install
413 if [ "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ] ; then
414 files="${files} gdbtk.tcl"
415 links="${links} gdbtk.tcl"
425 grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
426 echo "source ${srcdir}/.gdbinit" >> .gdbinit
429 if [ "${nativefile}" = "" ] ; then
430 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
431 < Makefile > Makefile.tem
432 mv -f Makefile.tem Makefile
435 # start-sanitize-gdbtk
436 if [ "${enable_gdbtk}" = "yes" ] ; then
437 sed -e '/# End of host and/i\
440 ENABLE_DEPFILES = gdbtk.o\
441 ENABLE_CLIBS = $(TCL) $(TK) -lX11 -lm
442 ' < Makefile > Makefile.tem
443 mv -f Makefile.tem Makefile
447 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
448 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
449 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
450 mv -f Makefile.tmp Makefile