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-*-osf*) gdb_host=alpha-osf1 ;;
37 arm-*-*) gdb_host=arm ;;
39 c[12]-*-*) gdb_host=convex ;;
41 hppa*-*-bsd*) gdb_host=hppabsd ;;
42 hppa*-*-hiux*) gdb_host=hppahpux ;;
43 hppa*-*-hpux*) gdb_host=hppahpux ;;
44 hppa*-*-osf*) gdb_host=hppabsd ;;
46 i[345]86-ncr-*) gdb_host=ncr3000 ;;
47 i[345]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
48 i[345]86-sequent-sysv4*) gdb_host=ptx4 ;;
49 i[345]86-sequent-sysv*) gdb_host=ptx ;;
50 i[345]86-*-aix*) gdb_host=i386aix ;;
51 i[345]86-*-bsd*) gdb_host=i386bsd ;;
52 i[345]86-*-freebsd*) gdb_host=fbsd ;;
53 i[345]86-*-netbsd*) gdb_host=nbsd ;;
54 i[345]86-*-go32*) gdb_host=go32 ;;
55 i[345]86-*-linux*) gdb_host=linux ;;
56 i[345]86-*-lynxos*) gdb_host=i386lynx ;;
57 i[345]86-*-mach3*) gdb_host=i386m3 ;;
58 i[345]86-*-mach*) gdb_host=i386mach ;;
59 i[345]86-*-osf1mk*) gdb_host=osf1mk ;;
60 i[345]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
61 i[345]86-*-sco*) gdb_host=i386sco ;;
62 i[345]86-*-solaris*) gdb_host=i386sol2 ;;
63 i[345]86-*-sunos*) gdb_host=sun386 ;;
64 i[345]86-*-sysv3.2*) gdb_host=i386v32 ;;
65 i[345]86-*-sysv32*) gdb_host=i386v32 ;;
66 i[345]86-*-sysv4*) gdb_host=i386v4 ;;
67 i[345]86-*-unixware) gdb_host=i386v4 ;;
68 i[345]86-*-sysv*) gdb_host=i386v ;;
69 i[345]86-*-isc*) gdb_host=i386v32 ;;
70 i[345]86-*-os9k) gdb_host=i386os9k ;;
72 m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
73 m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
74 m68030-sony-*) gdb_host=news1000 ;;
76 m68*-altos-*) gdb_host=altos ;;
77 m68*-apollo*-sysv*) gdb_host=apollo68v ;;
78 m68*-apollo*-bsd*) gdb_host=apollo68b ;;
79 m68*-att-*) gdb_host=3b1 ;;
80 m68*-bull*-sysv*) gdb_host=dpx2 ;;
81 m68*-hp-bsd*) gdb_host=hp300bsd ;;
82 m68*-hp-hpux*) gdb_host=hp300hpux ;;
83 m68*-isi-*) gdb_host=isi ;;
84 m68*-*-lynxos*) gdb_host=m68klynx ;;
85 m68*-*-sysv4*) gdb_host=m68kv4 ;;
86 m68*-motorola-*) gdb_host=delta68 ;;
87 m68*-sony-*) gdb_host=news ;;
88 m68*-sun-sunos3*) gdb_host=sun3os3 ;;
89 m68*-sun-sunos4*) gdb_host=sun3os4 ;;
90 m68*-sun-*) gdb_host=sun3os4 ;;
92 m88*-harris-cxux*) gdb_host=cxux ;;
93 m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
94 m88*-motorola-sysv*) gdb_host=delta88 ;;
95 m88*-*-mach3*) gdb_host=mach3 ;;
96 m88*-*-*) gdb_host=m88k ;;
98 mips-dec-mach3*) gdb_host=mach3 ;;
99 mips-dec-*) gdb_host=decstation ;;
100 mips-little-*) gdb_host=littlemips ;;
101 mips-sgi-irix3*) gdb_host=irix3 ;;
102 mips-sgi-irix4*) gdb_host=irix4 ;;
103 mips-sgi-irix5*) gdb_host=irix5 ;;
104 mips-sony-*) gdb_host=news-mips ;;
105 mips-*-mach3*) gdb_host=mach3 ;;
106 mips-*-sysv4*) gdb_host=mipsv4 ;;
107 mips-*-sysv*) gdb_host=riscos ;;
108 mips-*-riscos*) gdb_host=riscos ;;
110 none-*-*) gdb_host=none ;;
112 np1-*-*) gdb_host=np1 ;;
114 ns32k-*-mach3*) gdb_host=mach3 ;;
115 ns32k-*-netbsd*) gdb_host=nbsd ;;
116 ns32k-umax-*) gdb_host=umax ;;
117 ns32k-utek-sysv*) gdb_host=merlin ;;
119 pn-*-*) gdb_host=pn ;;
121 pyramid-*-*) gdb_host=pyramid ;;
123 romp-*-*) gdb_host=rtbsd ;;
125 rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
126 rs6000-*-*) gdb_host=rs6000 ;;
128 sparc-*-lynxos*) gdb_host=sparclynx ;;
129 sparc-*-netbsd*) gdb_host=nbsd ;;
130 sparc-*-solaris2*) gdb_host=sun4sol2 ;;
131 sparc-*-sunos4*) gdb_host=sun4os4 ;;
132 sparc-*-*) gdb_host=sun4os4 ;;
134 tahoe-*-*) gdb_host=tahoe ;;
136 vax-*-bsd*) gdb_host=vaxbsd ;;
137 vax-*-ultrix2*) gdb_host=vaxult2 ;;
138 vax-*-ultrix*) gdb_host=vaxult ;;
143 if [ ! -f ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ]; then
144 echo '***' "Gdb does not support host ${host}" 1>&2
148 # We really shouldn't depend on there being a space after XM_FILE= ...
149 hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh`
153 # Map target cpu into the config cpu subdirectory name.
154 # The default is $target_cpu.
156 case "${target_cpu}" in
158 alpha) gdb_target_cpu=alpha ;;
159 c[12]) gdb_target_cpu=convex ;;
160 hppa*) gdb_target_cpu=pa ;;
161 i[345]86) gdb_target_cpu=i386 ;;
162 m68*) gdb_target_cpu=m68k ;;
163 m88*) gdb_target_cpu=m88k ;;
164 mips*) gdb_target_cpu=mips ;;
165 np1) gdb_target_cpu=gould ;;
166 pn) gdb_target_cpu=gould ;;
167 pyramid) gdb_target_cpu=pyr ;;
168 sparclite*) gdb_target_cpu=sparc
169 configdirs="${configdirs} sparclite" ;;
170 sparc*) gdb_target_cpu=sparc ;;
171 *) gdb_target_cpu=$target_cpu ;;
175 # map target info into gdb names.
179 a29k-*-aout*) gdb_target=a29k ;;
180 a29k-*-coff*) gdb_target=a29k ;;
181 a29k-*-elf*) gdb_target=a29k ;;
182 a29k-*-ebmon*) gdb_target=a29k ;;
183 a29k-*-kern*) gdb_target=a29k-kern ;;
184 a29k-*-none*) gdb_target=a29k ;;
185 a29k-*-sym1*) gdb_target=ultra3 ;;
186 a29k-*-udi*) gdb_target=a29k-udi ;;
188 alpha-*-osf*) gdb_target=alpha-osf1 ;;
189 alpha-*-netware*) gdb_target=alpha-nw
190 configdirs="${configdirs} nlm" ;;
192 arm-*-*) gdb_target=arm ;;
194 c1-*-*) gdb_target=convex ;;
195 c2-*-*) gdb_target=convex ;;
197 h8300-*-*) gdb_target=h8300hms ;;
198 h8500-*-*) gdb_target=h8500hms ;;
200 sh-*-*) gdb_target=sh ;;
203 r16-*-*) gdb_target=r16 ;;
206 hppa*-*-bsd*) gdb_target=hppabsd ;;
207 hppa*-*-pro*) gdb_target=hppapro ;;
208 hppa*-*-hpux*) gdb_target=hppahpux ;;
209 hppa*-*-hiux*) gdb_target=hppahpux ;;
210 hppa*-*-osf*) gdb_target=hppaosf ;;
212 i[345]86-sequent-bsd*) gdb_target=symmetry ;;
213 i[345]86-sequent-sysv4*) gdb_target=ptx4 ;;
214 i[345]86-sequent-sysv*) gdb_target=ptx ;;
215 i[345]86-ncr-*) gdb_target=ncr3000 ;;
216 i[345]86-*-aout*) gdb_target=i386aout ;;
217 i[345]86-*-coff*) gdb_target=i386v ;;
218 i[345]86-*-elf*) gdb_target=i386v ;;
219 i[345]86-*-aix*) gdb_target=i386aix ;;
220 i[345]86-*-bsd*) gdb_target=i386bsd ;;
221 i[345]86-*-freebsd*) gdb_target=fbsd ;;
222 i[345]86-*-netbsd*) gdb_target=nbsd ;;
223 i[345]86-*-os9k) gdb_target=i386os9k ;;
224 i[345]86-*-go32*) gdb_target=i386aout ;;
225 i[345]86-*-lynxos*) gdb_target=i386lynx
226 configdirs="${configdirs} gdbserver" ;;
227 i[345]86-*-solaris*) gdb_target=i386sol2 ;;
228 i[345]86-*-sunos*) gdb_target=sun386 ;;
229 i[345]86-*-sysv4*) gdb_target=i386v4 ;;
230 i[345]86-*-sco*) gdb_target=i386v ;;
231 i[345]86-*-sysv*) gdb_target=i386v ;;
232 i[345]86-*-linux*) gdb_target=linux ;;
233 i[345]86-*-isc*) gdb_target=i386v ;;
234 i[345]86-*-mach3*) gdb_target=i386m3 ;;
235 i[345]86-*-mach*) gdb_target=i386mach ;;
236 i[345]86-*-netware*) gdb_target=i386nw
237 configdirs="${configdirs} nlm" ;;
238 i[345]86-*-osf1mk*) gdb_target=i386mk ;;
240 i960-*-bout*) gdb_target=vxworks960 ;;
241 i960-*-coff*) gdb_target=nindy960 ;;
242 i960-*-elf*) gdb_target=nindy960 ;;
244 i960-*-nindy*) gdb_target=nindy960 ;;
245 i960-*-vxworks*) gdb_target=vxworks960 ;;
247 m68000-*-sunos3*) gdb_target=sun2os3 ;;
248 m68000-*-sunos4*) gdb_target=sun2os4 ;;
250 m68*-apollo*-bsd*) gdb_target=apollo68b ;;
251 m68*-bull-sysv*) gdb_target=dpx2 ;;
252 m68*-hp-bsd*) gdb_target=hp300bsd ;;
253 m68*-hp-hpux*) gdb_target=hp300hpux ;;
254 m68*-altos-*) gdb_target=altos ;;
255 m68*-att-*) gdb_target=3b1 ;;
256 m68*-cisco*-*) gdb_target=cisco ;;
257 m68*-ericsson-*) gdb_target=es1800 ;;
258 m68*-isi-*) gdb_target=isi ;;
259 m68*-motorola-*) gdb_target=delta68 ;;
260 m68*-netx-*) gdb_target=vxworks68 ;;
261 m68*-sony-*) gdb_target=news ;;
262 m68*-tandem-*) gdb_target=st2000 ;;
263 m68*-rom68k-*) gdb_target=monitor ;;
264 m68*-*bug-*) gdb_target=monitor ;;
265 m68*-monitor-*) gdb_target=monitor ;;
266 m68*-*-aout*) gdb_target=monitor ;;
267 m68*-*-coff*) gdb_target=monitor ;;
268 m68*-*-elf*) gdb_target=monitor ;;
269 m68*-*-lynxos*) gdb_target=m68klynx
270 configdirs="${configdirs} gdbserver" ;;
271 m68*-*-os68k*) gdb_target=os68k ;;
272 m68*-*-sunos3*) gdb_target=sun3os3 ;;
273 m68*-*-sunos4*) gdb_target=sun3os4 ;;
274 m68*-*-sysv4*) gdb_target=m68kv4 ;;
275 m68*-*-vxworks*) gdb_target=vxworks68 ;;
276 m68*-*-est*) gdb_target=est ;;
278 m88*-harris-cxux*) gdb_target=cxux ;;
279 m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
280 m88*-*-mach3*) gdb_target=mach3 ;;
281 m88*-motorola-*) gdb_target=delta88 ;;
282 m88*-*-*) gdb_target=m88k ;;
284 mips64*-big-*) gdb_target=bigmips64 ;;
285 mips*-big-*) gdb_target=bigmips ;;
286 mips*-dec-mach3*) gdb_target=mach3 ;;
287 mips*-dec-*) gdb_target=decstation ;;
288 mips64*el-*-ecoff*) gdb_target=idtl64 ;;
289 mips64*-idt-ecoff*) gdb_target=idt64 ;;
290 mips64*el-*-elf*) gdb_target=idtl64 ;;
291 mips64*-*-elf*) gdb_target=idt64 ;;
292 mips*el-*-ecoff*) gdb_target=idtl ;;
293 mips*-*-ecoff*) gdb_target=idt ;;
294 mips*el-*-elf*) gdb_target=idtl ;;
295 mips*-*-elf*) gdb_target=idt ;;
296 mips*-little-*) gdb_target=littlemips ;;
297 mips*-sgi-irix5*) gdb_target=irix5 ;;
298 mips*-sgi-*) gdb_target=irix3 ;;
299 mips*-sony-*) gdb_target=bigmips ;;
300 mips*-*-mach3*) gdb_target=mach3 ;;
301 mips*-*-sysv4*) gdb_target=mipsv4 ;;
302 mips*-*-sysv*) gdb_target=bigmips ;;
303 mips*-*-riscos*) gdb_target=bigmips ;;
305 none-*-*) gdb_target=none ;;
307 np1-*-*) gdb_target=np1 ;;
309 ns32k-*-mach3*) gdb_target=mach3 ;;
310 ns32k-*-netbsd*) gdb_target=nbsd ;;
311 ns32k-utek-sysv*) gdb_target=merlin ;;
312 ns32k-utek-*) gdb_target=umax ;;
314 pn-*-*) gdb_target=pn ;;
315 powerpc-*-netware*) gdb_target=ppc-nw
316 configdirs="${configdirs} nlm" ;;
318 pyramid-*-*) gdb_target=pyramid ;;
320 rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
321 rs6000-*-*) gdb_target=rs6000 ;;
323 sparc-*-aout*) gdb_target=sparc-em ;;
324 sparc-*-coff*) gdb_target=sparc-em ;;
325 sparc-*-elf*) gdb_target=sparc-em ;;
326 sparc-*-lynxos*) gdb_target=sparclynx
327 configdirs="${configdirs} gdbserver" ;;
328 sparc-*-netbsd*) gdb_target=nbsd ;;
329 sparc-*-solaris2*) gdb_target=sun4sol2 ;;
330 sparc-*-sunos4*) gdb_target=sun4os4 ;;
331 sparc-*-vxworks*) gdb_target=vxsparc ;;
332 sparc-*-*) gdb_target=sun4os4 ;;
333 sparclite*-*-*) gdb_target=sparclite ;;
334 sparc64-*-*) gdb_target=sp64 ;;
336 tahoe-*-*) gdb_target=tahoe ;;
338 vax-*-*) gdb_target=vax ;;
340 z8k-*-sim*) gdb_target=z8ksim ;;
341 z8k-*-coff*) gdb_target=z8ksim ;;
345 if [ ! -f ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt ]; then
346 echo '***' "Gdb does not support target ${target}" 1>&2
350 if [ -z "${removing}" ] ; then
351 cat ${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | awk '$1 == "#msg" {
355 # We really shouldn't depend on there being a space after TM_FILE= ...
356 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt`
359 # these really aren't orthogonal true/false values of the same condition,
360 # but shells are slow enough that I like to reuse the test conditions
363 if [ "${target}" = "${host}" ] ; then
364 nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh`
366 # GDBserver is only useful in a "native" enviroment
367 configdirs=`echo $configdirs | sed 's/gdbserver//'`
370 host_makefile_frag=config/${gdb_host_cpu}/${gdb_host}.mh
371 target_makefile_frag=config/${gdb_target_cpu}/${gdb_target}.mt
373 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
374 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
375 # corresponding links. But we have to remove the xm.h files and tm.h
376 # files anyway, e.g. when switching from "configure host" to
382 if [ "${hostfile}" != "" ]; then
383 files="${files} config/${gdb_host_cpu}/${hostfile}"
384 links="${links} xm.h"
387 if [ "${targetfile}" != "" ]; then
388 files="${files} config/${gdb_target_cpu}/${targetfile}"
389 links="${links} tm.h"
392 if [ "${nativefile}" != "" ]; then
393 files="${files} config/${gdb_host_cpu}/${nativefile}"
394 links="${links} nm.h"
396 # A cross-only configuration.
397 files="${files} config/nm-empty.h"
398 links="${links} nm.h"
401 # Make it possible to use the GUI without doing a full install
402 if [ "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ] ; then
403 files="${files} gdbtk.tcl"
404 links="${links} gdbtk.tcl"
413 grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
414 echo "source ${srcdir}/.gdbinit" >> .gdbinit
417 if [ "${nativefile}" = "" ] ; then
418 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
419 < Makefile > Makefile.tem
420 mv -f Makefile.tem Makefile
423 if [ "${enable_gdbtk}" = "yes" ] ; then
424 sed -e '/# End of host and/i\
427 ENABLE_DEPFILES = gdbtk.o\
428 ENABLE_CLIBS = $(TCL) $(TK) -lX11 -lm
429 ' < Makefile > Makefile.tem
430 mv -f Makefile.tem Makefile
433 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
434 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
435 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
436 mv -f Makefile.tmp Makefile