+dnl Autoconf configure script for GDB, the GNU debugger.
+dnl Copyright 1995, 1996 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GDB.
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
dnl Process this file with autoconf to produce a configure script.
+
AC_PREREQ(2.3)dnl
AC_INIT(main.c)
AC_ARG_PROGRAM
AC_HEADER_STDC
-AC_CHECK_HEADERS(memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h)
+AC_CHECK_HEADERS(memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h sys/procfs.h)
AC_HEADER_STAT
+AC_MSG_CHECKING([for gregset_t type])
+AC_CACHE_VAL(gdb_have_gregset_t,
+[AC_TRY_LINK([#include <sys/procfs.h>],[gregset_t *gregsetp = 0],
+gdb_have_gregset_t=yes, gdb_have_gregset_t=no)])
+AC_MSG_RESULT($gdb_have_gregset_t)
+if test $gdb_have_gregset_t = yes; then
+ AC_DEFINE(HAVE_GREGSET_T)
+fi
+
+AC_MSG_CHECKING([for fpregset_t type])
+AC_CACHE_VAL(gdb_have_fpregset_t,
+[AC_TRY_LINK([#include <sys/procfs.h>],[fpregset_t *fpregsetp = 0],
+gdb_have_fpregset_t=yes, gdb_have_fpregset_t=no)])
+AC_MSG_RESULT($gdb_have_fpregset_t)
+if test $gdb_have_fpregset_t = yes; then
+ AC_DEFINE(HAVE_FPREGSET_T)
+fi
+
AC_FUNC_MMAP
dnl Handle optional features that can be enabled.
AC_ARG_ENABLE(gm,
[ --enable-gm ],
[case "${enableval}" in
-yes) ENABLE_OBS="${ENABLE_OBS} magic.o"
+yes) ENABLE_OBS="${ENABLE_OBS} gmagic.o"
ENABLE_CFLAGS=-DGENERAL_MAGIC
;;
no) ;;
AC_PATH_X
AC_PATH_XTRA
- CYGNUS_PATH_TK
- CYGNUS_PATH_TCL
+ CY_AC_PATH_TCL
+ CY_AC_PATH_TK
+
+ # Look for dynamic linking libraries that Tcl might need. This is
+ # only done for Tcl 7.5 and greater. It would be good to look for and
+ # use the "configInfo" file that Tcl generates, but for now that is
+ # beyond us.
+ if test $tclmajor -ge 7 -a $tclminor -ge 5 ; then
+ AC_CHECK_LIB(dl, main, , AC_CHECK_LIB(dld, main))
+ fi
ENABLE_GDBTK=1
#
# gdb linked statically w/ Solaris iff GCC is used, otherwise dynamic
#
- sparc-sun-solaris2*)
+ sparc*-sun-solaris2*)
if test "x$GCC" = "xyes";
then
- X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic"
+ X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic -ldl -lw"
else
if test "x$x_libraries" != "x" ;
then
np1) gdb_host_cpu=gould ;;
pyramid) gdb_host_cpu=pyr ;;
powerpc*) gdb_host_cpu=powerpc ;;
+sparc64) gdb_host_cpu=sparc ;;
*) gdb_host_cpu=$host_cpu ;;
esac
romp-*-*) gdb_host=rtbsd ;;
rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
+rs6000-*-aix4*) gdb_host=aix4 ;;
rs6000-*-*) gdb_host=rs6000 ;;
sparc-*-lynxos*) gdb_host=sparclynx ;;
sparc-*-sunos4*) gdb_host=sun4os4 ;;
sparc-*-sunos5*) gdb_host=sun4sol2 ;;
sparc-*-*) gdb_host=sun4os4 ;;
+sparc64-*-*) gdb_host=sun4sol2 ;;
tahoe-*-*) gdb_host=tahoe ;;
sparc-*-vxworks*) gdb_target=vxsparc ;;
sparc-*-*) gdb_target=sun4os4 ;;
sparclite*-*-*) gdb_target=sparclite ;;
+sparc64-*-solaris2*) gdb_target=sp64sol2 ;;
sparc64-*-*) gdb_target=sp64 ;;
tahoe-*-*) gdb_target=tahoe ;;