1 dnl Autoconf configure script for GDB, the GNU debugger.
2 dnl Copyright 1995, 1996 Free Software Foundation, Inc.
4 dnl This file is part of GDB.
6 dnl This program is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; either version 2 of the License, or
9 dnl (at your option) any later version.
11 dnl This program is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 dnl GNU General Public License for more details.
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with this program; if not, write to the Free Software
18 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 dnl Process this file with autoconf to produce a configure script.
34 AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
39 AC_CHECK_HEADERS(limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h sys/procfs.h)
42 AC_MSG_CHECKING([for gregset_t type])
43 AC_CACHE_VAL(gdb_have_gregset_t,
44 [AC_TRY_LINK([#include <sys/procfs.h>],[gregset_t *gregsetp = 0],
45 gdb_have_gregset_t=yes, gdb_have_gregset_t=no)])
46 AC_MSG_RESULT($gdb_have_gregset_t)
47 if test $gdb_have_gregset_t = yes; then
48 AC_DEFINE(HAVE_GREGSET_T)
51 AC_MSG_CHECKING([for fpregset_t type])
52 AC_CACHE_VAL(gdb_have_fpregset_t,
53 [AC_TRY_LINK([#include <sys/procfs.h>],[fpregset_t *fpregsetp = 0],
54 gdb_have_fpregset_t=yes, gdb_have_fpregset_t=no)])
55 AC_MSG_RESULT($gdb_have_fpregset_t)
56 if test $gdb_have_fpregset_t = yes; then
57 AC_DEFINE(HAVE_FPREGSET_T)
60 dnl See if compiler supports "long double" type. Can't use AC_C_LONG_DOUBLE
61 dnl because autoconf complains about cross-compilation issues. However, this
62 dnl code uses the same variables as the macro for compatibility.
64 AC_MSG_CHECKING(for long double)
65 AC_CACHE_VAL(ac_cv_c_long_double,
66 [AC_TRY_COMPILE(, [long double foo;],
67 ac_cv_c_long_double=yes, ac_cv_c_long_double=no)])
68 AC_MSG_RESULT($ac_cv_c_long_double)
69 if test $ac_cv_c_long_double = yes; then
70 AC_DEFINE(HAVE_LONG_DOUBLE)
75 dnl Handle optional features that can be enabled.
82 [case "${enableval}" in
83 yes) enable_netrom=yes ;;
84 no) enable_netrom=no ;;
85 *) AC_MSG_ERROR(bad value ${enableval} given for netrom option) ;;
88 if test "${enable_netrom}" = "yes"; then
89 ENABLE_OBS="${ENABLE_OBS} remote-nrom.o"
97 [case "${enableval}" in
98 yes) ENABLE_OBS="${ENABLE_OBS} gmagic.o"
99 ENABLE_CFLAGS=-DGENERAL_MAGIC
102 *) AC_MSG_ERROR(bad value ${enableval} given for gm option) ;;
107 AC_ARG_ENABLE(sim-powerpc,
108 [ --enable-sim-powerpc ],
109 [case "${enableval}" in
110 yes) powerpc_sim=yes ;;
111 no) powerpc_sim=no ;;
112 *) AC_MSG_ERROR(bad value ${enableval} given for sim-powerpc option) ;;
113 esac],[if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi])
115 # start-sanitize-gdbtk
120 [case "${enableval}" in
124 AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.])
132 AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;;
135 # Default is on for everything but go32
144 if test "${enable_gdbtk}" = "yes"; then
152 # Look for dynamic linking libraries that Tcl might need. This is
153 # only done for Tcl 7.5 and greater. It would be good to look for and
154 # use the "configInfo" file that Tcl generates, but for now that is
156 if test $tclmajor -ge 7 -a $tclminor -ge 5 ; then
157 AC_CHECK_LIB(dl, main, , AC_CHECK_LIB(dld, main))
162 if test "x$no_x" != "xyes"; then
163 if test "x$x_includes" != "x" ;
165 X_CFLAGS="-I$x_includes"
170 if test "x$x_libraries" != "x" ;
172 X_LDFLAGS="-L$x_libraries"
179 # gdb linked statically w/ Solaris iff GCC is used, otherwise dynamic
181 sparc*-sun-solaris2*)
182 if test "x$GCC" = "xyes";
184 X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic -ldl -lw"
186 if test "x$x_libraries" != "x" ;
188 X_LDFLAGS="$X_LDFLAGS -R$x_libraries"
190 X_LIBS="-lX11 -lXext -lX11"
193 # gdb linked statically w/ SunOS or HPUX
195 m68k-hp-hpux*|hppa*-hp-hpux*|sparc-sun-sunos*)
196 if test "x$x_libraries" != "x" ;
198 X_LIBS="$x_libraries/libX11.a"
200 X_LIBS="/usr/lib/libX11.a"
203 # default is to link dynamically
212 AC_MSG_WARN([No X based programs will be built])
215 TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
216 ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS} -lm"
217 ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
220 AC_SUBST(ENABLE_GDBTK)
226 AC_SUBST(ENABLE_CFLAGS)
227 AC_SUBST(ENABLE_CLIBS)
230 # target_subdir is used by the testsuite to find the target libraries.
232 if test "${host}" != "${target}"; then
233 target_subdir="${target_alias}/"
235 AC_SUBST(target_subdir)
237 configdirs="doc testsuite"
242 # Map host cpu into the config cpu subdirectory name.
243 # The default is $host_cpu.
245 case "${host_cpu}" in
247 c[12]) gdb_host_cpu=convex ;;
248 hppa*) gdb_host_cpu=pa ;;
249 i[3456]86) gdb_host_cpu=i386 ;;
250 m68*) gdb_host_cpu=m68k ;;
251 m88*) gdb_host_cpu=m88k ;;
252 np1) gdb_host_cpu=gould ;;
253 pyramid) gdb_host_cpu=pyr ;;
254 powerpc*) gdb_host_cpu=powerpc ;;
255 sparc64) gdb_host_cpu=sparc ;;
256 *) gdb_host_cpu=$host_cpu ;;
260 # map host info into gdb names.
264 a29k-*-*) gdb_host=ultra3 ;;
266 alpha-*-osf1*) gdb_host=alpha-osf1 ;;
267 alpha-*-osf2*) gdb_host=alpha-osf2 ;;
268 alpha-*-osf[3456789]*) gdb_host=alpha-osf3 ;;
270 arm-*-*) gdb_host=arm ;;
272 c[12]-*-*) gdb_host=convex ;;
274 hppa*-*-bsd*) gdb_host=hppabsd ;;
275 hppa*-*-hiux*) gdb_host=hppahpux ;;
276 hppa*-*-hpux*) gdb_host=hppahpux ;;
277 hppa*-*-osf*) gdb_host=hppaosf ;;
279 i[3456]86-ncr-*) gdb_host=ncr3000 ;;
280 i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
281 i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
282 i[3456]86-sequent-sysv*) gdb_host=ptx ;;
283 i[3456]86-*-aix*) gdb_host=i386aix ;;
284 i[3456]86-*-bsd*) gdb_host=i386bsd ;;
285 i[3456]86-*-dgux*) gdb_host=i386dgux ;;
286 i[3456]86-*-freebsd*) gdb_host=fbsd ;;
287 i[3456]86-*-netbsd*) gdb_host=nbsd ;;
288 i[3456]86-*-go32*) gdb_host=go32 ;;
289 i[3456]86-*-linux*) gdb_host=linux ;;
290 i[3456]86-*-lynxos*) gdb_host=i386lynx ;;
291 i[3456]86-*-mach3*) gdb_host=i386m3 ;;
292 i[3456]86-*-mach*) gdb_host=i386mach ;;
293 i[3456]86-*-osf1mk*) gdb_host=osf1mk ;;
294 i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
295 i[3456]86-*-sco*) gdb_host=i386sco ;;
296 i[3456]86-*-solaris*) gdb_host=i386sol2 ;;
297 i[3456]86-*-sunos*) gdb_host=sun386 ;;
298 i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;;
299 i[3456]86-*-sysv32*) gdb_host=i386v32 ;;
300 i[3456]86-*-sysv4*) gdb_host=i386v4 ;;
301 i[3456]86-*-unixware) gdb_host=i386v4 ;;
302 i[3456]86-*-sysv*) gdb_host=i386v ;;
303 i[3456]86-*-isc*) gdb_host=i386v32 ;;
304 i[3456]86-*-os9k) gdb_host=i386os9k ;;
305 i[3456]86-*-cygwin32) gdb_host=cygwin32 ;;
306 m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
307 m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
308 m68030-sony-*) gdb_host=news1000 ;;
310 m68*-altos-*) gdb_host=altos ;;
311 m68*-apollo*-sysv*) gdb_host=apollo68v ;;
312 m68*-apollo*-bsd*) gdb_host=apollo68b ;;
313 m68*-att-*) gdb_host=3b1 ;;
314 m68*-bull*-sysv*) gdb_host=dpx2 ;;
315 m68*-hp-bsd*) gdb_host=hp300bsd ;;
316 m68*-hp-hpux*) gdb_host=hp300hpux ;;
317 m68*-isi-*) gdb_host=isi ;;
318 m68*-*-lynxos*) gdb_host=m68klynx ;;
319 m68*-*-netbsd*) gdb_host=nbsd ;;
320 m68*-*-sysv4*) gdb_host=m68kv4 ;;
321 m68*-motorola-*) gdb_host=delta68 ;;
322 m68*-sony-*) gdb_host=news ;;
323 m68*-sun-sunos3*) gdb_host=sun3os3 ;;
324 m68*-sun-sunos4*) gdb_host=sun3os4 ;;
325 m68*-sun-*) gdb_host=sun3os4 ;;
327 m88*-harris-cxux*) gdb_host=cxux ;;
328 m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
329 m88*-motorola-sysv*) gdb_host=delta88 ;;
330 m88*-*-mach3*) gdb_host=mach3 ;;
331 m88*-*-*) gdb_host=m88k ;;
333 mips-dec-mach3*) gdb_host=mach3 ;;
334 mips-dec-*) gdb_host=decstation ;;
335 mips-little-*) gdb_host=littlemips ;;
336 mips-sgi-irix3*) gdb_host=irix3 ;;
337 mips-sgi-irix4*) gdb_host=irix4 ;;
338 mips-sgi-irix5*) gdb_host=irix5 ;;
339 mips-sony-*) gdb_host=news-mips ;;
340 mips-*-mach3*) gdb_host=mach3 ;;
341 mips-*-sysv4*) gdb_host=mipsv4 ;;
342 mips-*-sysv*) gdb_host=riscos ;;
343 mips-*-riscos*) gdb_host=riscos ;;
345 none-*-*) gdb_host=none ;;
347 np1-*-*) gdb_host=np1 ;;
349 ns32k-*-mach3*) gdb_host=mach3 ;;
350 ns32k-*-netbsd*) gdb_host=nbsd ;;
351 ns32k-umax-*) gdb_host=umax ;;
352 ns32k-utek-sysv*) gdb_host=merlin ;;
354 powerpc-*-aix*) gdb_host=aix ;;
355 powerpcle-*-cygwin32) gdb_host=cygwin32 ;;
356 pn-*-*) gdb_host=pn ;;
358 pyramid-*-*) gdb_host=pyramid ;;
360 romp-*-*) gdb_host=rtbsd ;;
362 rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
363 rs6000-*-aix4*) gdb_host=aix4 ;;
364 rs6000-*-*) gdb_host=rs6000 ;;
366 sparc-*-lynxos*) gdb_host=sparclynx ;;
367 sparc-*-netbsd*) gdb_host=nbsd ;;
368 sparc-*-solaris2*) gdb_host=sun4sol2 ;;
369 sparc-*-sunos4*) gdb_host=sun4os4 ;;
370 sparc-*-sunos5*) gdb_host=sun4sol2 ;;
371 sparc-*-*) gdb_host=sun4os4 ;;
372 sparc64-*-*) gdb_host=sun4sol2 ;;
374 tahoe-*-*) gdb_host=tahoe ;;
376 vax-*-bsd*) gdb_host=vaxbsd ;;
377 vax-*-ultrix2*) gdb_host=vaxult2 ;;
378 vax-*-ultrix*) gdb_host=vaxult ;;
380 w65-*-*) gdb_host=w65 ;;
385 # Map target cpu into the config cpu subdirectory name.
386 # The default is $target_cpu.
388 case "${target_cpu}" in
390 alpha) gdb_target_cpu=alpha ;;
391 c[12]) gdb_target_cpu=convex ;;
392 hppa*) gdb_target_cpu=pa ;;
393 i[3456]86) gdb_target_cpu=i386 ;;
394 m68*) gdb_target_cpu=m68k ;;
395 m88*) gdb_target_cpu=m88k ;;
396 mips*) gdb_target_cpu=mips ;;
397 np1) gdb_target_cpu=gould ;;
398 powerpc*) gdb_target_cpu=powerpc ;;
399 pn) gdb_target_cpu=gould ;;
400 pyramid) gdb_target_cpu=pyr ;;
401 sparc*) gdb_target_cpu=sparc ;;
402 *) gdb_target_cpu=$target_cpu ;;
406 # map target info into gdb names.
410 a29k-*-aout*) gdb_target=a29k ;;
411 a29k-*-coff*) gdb_target=a29k ;;
412 a29k-*-elf*) gdb_target=a29k ;;
413 a29k-*-ebmon*) gdb_target=a29k ;;
414 a29k-*-kern*) gdb_target=a29k-kern ;;
415 a29k-*-none*) gdb_target=a29k ;;
416 a29k-*-sym1*) gdb_target=ultra3 ;;
417 a29k-*-udi*) gdb_target=a29k-udi ;;
418 a29k-*-vxworks*) gdb_target=vx29k ;;
420 alpha-*-osf*) gdb_target=alpha-osf1 ;;
423 arc-*-*) gdb_target=arc ;;
426 arm-*-*) gdb_target=arm ;;
428 c1-*-*) gdb_target=convex ;;
429 c2-*-*) gdb_target=convex ;;
431 h8300-*-*) gdb_target=h8300 ;;
432 h8500-*-*) gdb_target=h8500 ;;
434 sh-*-*) gdb_target=sh ;;
437 r16-*-*) gdb_target=r16 ;;
440 hppa*-*-bsd*) gdb_target=hppabsd ;;
441 hppa*-*-pro*) gdb_target=hppapro ;;
442 hppa*-*-hpux*) gdb_target=hppahpux ;;
443 hppa*-*-hiux*) gdb_target=hppahpux ;;
444 hppa*-*-osf*) gdb_target=hppaosf ;;
446 i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
447 i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
448 i[3456]86-sequent-sysv*) gdb_target=ptx ;;
449 i[3456]86-ncr-*) gdb_target=ncr3000 ;;
450 i[3456]86-*-aout*) gdb_target=i386aout ;;
451 i[3456]86-*-coff*) gdb_target=i386v ;;
452 i[3456]86-*-elf*) gdb_target=i386v ;;
453 i[3456]86-*-aix*) gdb_target=i386aix ;;
454 i[3456]86-*-bsd*) gdb_target=i386bsd ;;
455 i[3456]86-*-freebsd*) gdb_target=fbsd ;;
456 i[3456]86-*-netbsd*) gdb_target=nbsd ;;
457 i[3456]86-*-os9k) gdb_target=i386os9k ;;
458 i[3456]86-*-go32*) gdb_target=i386aout ;;
459 i[3456]86-*-lynxos*) gdb_target=i386lynx
460 configdirs="${configdirs} gdbserver" ;;
461 i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
462 i[3456]86-*-sunos*) gdb_target=sun386 ;;
463 i[3456]86-*-sysv4*) gdb_target=i386v4 ;;
464 i[3456]86-*-sco*) gdb_target=i386v ;;
465 i[3456]86-*-sysv*) gdb_target=i386v ;;
466 i[3456]86-*-linux*) gdb_target=linux ;;
467 i[3456]86-*-isc*) gdb_target=i386v ;;
468 i[3456]86-*-mach3*) gdb_target=i386m3 ;;
469 i[3456]86-*-mach*) gdb_target=i386mach ;;
470 i[3456]86-*-netware*) gdb_target=i386nw
471 configdirs="${configdirs} nlm" ;;
472 i[3456]86-*-osf1mk*) gdb_target=i386mk ;;
473 i[3456]86-*-cygwin32) gdb_target=cygwin32 ;;
474 i960-*-bout*) gdb_target=vxworks960 ;;
475 i960-*-coff*) gdb_target=nindy960 ;;
476 i960-*-elf*) gdb_target=nindy960 ;;
478 i960-*-nindy*) gdb_target=nindy960 ;;
479 i960-*-vxworks*) gdb_target=vxworks960 ;;
481 m68000-*-sunos3*) gdb_target=sun2os3 ;;
482 m68000-*-sunos4*) gdb_target=sun2os4 ;;
484 m68*-apollo*-bsd*) gdb_target=apollo68b ;;
485 m68*-bull-sysv*) gdb_target=dpx2 ;;
486 m68*-hp-bsd*) gdb_target=hp300bsd ;;
487 m68*-hp-hpux*) gdb_target=hp300hpux ;;
488 m68*-altos-*) gdb_target=altos ;;
489 m68*-att-*) gdb_target=3b1 ;;
490 m68*-cisco*-*) gdb_target=cisco ;;
491 m68*-ericsson-*) gdb_target=es1800 ;;
492 m68*-isi-*) gdb_target=isi ;;
493 m68*-motorola-*) gdb_target=delta68 ;;
494 m68*-netx-*) gdb_target=vxworks68 ;;
495 m68*-sony-*) gdb_target=news ;;
496 m68*-tandem-*) gdb_target=st2000 ;;
497 m68*-rom68k-*) gdb_target=monitor ;;
498 m68*-*bug-*) gdb_target=monitor ;;
499 m68*-monitor-*) gdb_target=monitor ;;
500 m68*-est-*) gdb_target=monitor ;;
501 m68*-*-aout*) gdb_target=monitor ;;
502 m68*-*-coff*) gdb_target=monitor ;;
503 m68*-*-elf*) gdb_target=monitor ;;
504 m68*-*-lynxos*) gdb_target=m68klynx
505 configdirs="${configdirs} gdbserver" ;;
506 m68*-*-netbsd*) gdb_target=nbsd ;;
507 m68*-*-os68k*) gdb_target=os68k ;;
508 m68*-*-sunos3*) gdb_target=sun3os3 ;;
509 m68*-*-sunos4*) gdb_target=sun3os4 ;;
510 m68*-*-sysv4*) gdb_target=m68kv4 ;;
511 m68*-*-vxworks*) gdb_target=vxworks68 ;;
513 m88*-harris-cxux*) gdb_target=cxux ;;
514 m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
515 m88*-*-mach3*) gdb_target=mach3 ;;
516 m88*-motorola-*) gdb_target=delta88 ;;
517 m88*-*-*) gdb_target=m88k ;;
519 mips64*-big-*) gdb_target=bigmips64 ;;
520 mips*-big-*) gdb_target=bigmips ;;
521 mips*-dec-mach3*) gdb_target=mach3 ;;
522 mips*-dec-*) gdb_target=decstation ;;
523 mips64*el-*-ecoff*) gdb_target=embedl64 ;;
524 mips64*-*-ecoff*) gdb_target=embed64 ;;
525 mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
526 mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
527 mips64*el-*-elf*) gdb_target=embedl64 ;;
528 mips64*-*-elf*) gdb_target=embed64 ;;
529 mips*el-*-ecoff*) gdb_target=embedl ;;
530 mips*-*-ecoff*) gdb_target=embed ;;
532 mips*-*-magic*) gdb_target=embed ;;
534 mips*el-*-elf*) gdb_target=embedl ;;
535 mips*-*-elf*) gdb_target=embed ;;
536 mips*-little-*) gdb_target=littlemips ;;
537 mips*-sgi-irix5*) gdb_target=irix5 ;;
538 mips*-sgi-*) gdb_target=irix3 ;;
539 mips*-sony-*) gdb_target=bigmips ;;
540 mips*-*-mach3*) gdb_target=mach3 ;;
541 mips*-*-sysv4*) gdb_target=mipsv4 ;;
542 mips*-*-sysv*) gdb_target=bigmips ;;
543 mips*-*-riscos*) gdb_target=bigmips ;;
544 mips*-*-vxworks*) gdb_target=vxmips ;;
546 none-*-*) gdb_target=none ;;
548 np1-*-*) gdb_target=np1 ;;
550 ns32k-*-mach3*) gdb_target=mach3 ;;
551 ns32k-*-netbsd*) gdb_target=nbsd ;;
552 ns32k-utek-sysv*) gdb_target=merlin ;;
553 ns32k-utek-*) gdb_target=umax ;;
555 pn-*-*) gdb_target=pn ;;
556 powerpc-*-macos*) gdb_target=macos ;;
557 powerpc-*-netware*) gdb_target=ppc-nw
558 configdirs="${configdirs} nlm" ;;
560 powerpc-*-aix4*) gdb_target=aix4 ;;
561 powerpc-*-aix*) gdb_target=aix ;;
562 powerpcle-*-cygwin32) gdb_target=cygwin32 ;;
563 powerpc-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
568 powerpcle-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
571 gdb_target=ppcle-eabi
574 pyramid-*-*) gdb_target=pyramid ;;
576 rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
577 rs6000-*-aix4*) gdb_target=aix4 ;;
578 rs6000-*-*) gdb_target=rs6000 ;;
580 sparc-*-aout*) gdb_target=sparc-em ;;
581 sparc-*-coff*) gdb_target=sparc-em ;;
582 sparc-*-elf*) gdb_target=sparc-em ;;
583 sparc-*-lynxos*) gdb_target=sparclynx
584 configdirs="${configdirs} gdbserver" ;;
585 sparc-*-netbsd*) gdb_target=nbsd ;;
586 sparc-*-solaris2*) gdb_target=sun4sol2 ;;
587 sparc-*-sunos4*) gdb_target=sun4os4 ;;
588 sparc-*-sunos5*) gdb_target=sun4sol2 ;;
589 sparc-*-vxworks*) gdb_target=vxsparc ;;
590 sparc-*-*) gdb_target=sun4os4 ;;
591 # Use sparc-em for sparclet for now.
592 sparclet-*-*) gdb_target=sparc-em ;;
593 sparclite*-*-*) gdb_target=sparclite ;;
594 sparc64-*-solaris2*) gdb_target=sp64sol2 ;;
595 sparc64-*-*) gdb_target=sp64 ;;
597 tahoe-*-*) gdb_target=tahoe ;;
599 vax-*-*) gdb_target=vax ;;
601 w65-*-*) gdb_target=w65 ;;
603 z8k-*-coff*) gdb_target=z8k ;;
611 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
612 if test ! -f ${host_makefile_frag}; then
613 AC_MSG_ERROR("*** Gdb does not support host ${host}")
615 frags="$frags $host_makefile_frag"
617 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
618 if test ! -f ${target_makefile_frag}; then
619 AC_MSG_ERROR("*** Gdb does not support target ${target}")
621 frags="$frags $target_makefile_frag"
623 AC_SUBST_FILE(host_makefile_frag)
624 AC_SUBST_FILE(target_makefile_frag)
629 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
630 ' ${host_makefile_frag}`
633 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
634 ' ${target_makefile_frag}`
636 # these really aren't orthogonal true/false values of the same condition,
637 # but shells are slow enough that I like to reuse the test conditions
639 if test "${target}" = "${host}"; then
641 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
642 ' ${host_makefile_frag}`
644 # GDBserver is only useful in a "native" enviroment
645 configdirs=`echo $configdirs | sed 's/gdbserver//'`
649 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
650 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
651 # corresponding links. But we have to remove the xm.h files and tm.h
652 # files anyway, e.g. when switching from "configure host" to
658 if test "${hostfile}" != ""; then
659 files="${files} config/${gdb_host_cpu}/${hostfile}"
660 links="${links} xm.h"
663 if test "${targetfile}" != ""; then
664 files="${files} config/${gdb_target_cpu}/${targetfile}"
665 links="${links} tm.h"
668 if test "${nativefile}" != ""; then
669 files="${files} config/${gdb_host_cpu}/${nativefile}"
670 links="${links} nm.h"
672 # A cross-only configuration.
673 files="${files} config/nm-empty.h"
674 links="${links} nm.h"
676 # start-sanitize-gdbtk
678 # Make it possible to use the GUI without doing a full install
679 if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
680 files="${files} gdbtk.tcl"
681 links="${links} gdbtk.tcl"
685 AC_LINK_FILES($files, $links)
687 AC_CONFIG_SUBDIRS($configdirs)
690 dnl Autoconf doesn't provide a mechanism for modifying definitions
691 dnl provided by makefile fragments.
693 if test "${nativefile}" = ""; then
694 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
695 < Makefile > Makefile.tem
696 mv -f Makefile.tem Makefile
700 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
701 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
702 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
703 mv -f Makefile.tmp Makefile
710 grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
711 echo "source ${srcdir}/.gdbinit" >> .gdbinit
715 gdb_host_cpu=$gdb_host_cpu
716 gdb_target_cpu=$gdb_target_cpu
717 nativefile=$nativefile