AC_MINIX
AC_ISC_POSIX
+AC_CANONICAL_SYSTEM
+
AC_PROG_INSTALL
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_PROG_AWK
AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
-AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
AC_HEADER_STDC
-AC_CHECK_HEADERS(limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h sys/procfs.h link.h endian.h)
+AC_CHECK_HEADERS(limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h stdlib.h sys/procfs.h link.h endian.h)
AC_HEADER_STAT
AC_C_CONST
AC_CHECK_FUNCS(setpgid sbrk)
+# If we are configured native on Linux, work around problems with sys/procfs.h
+if test "${target}" = "${host}"; then
+ case "${host}" in
+ i[3456]86-*-linux*)
+ AC_DEFINE(START_INFERIOR_TRAPS_EXPECTED,"2")
+ AC_DEFINE(sys_quotactl)
+ ;;
+ esac
+fi
+
AC_MSG_CHECKING([for gregset_t type])
AC_CACHE_VAL(gdb_cv_have_gregset_t,
[AC_TRY_LINK([#include <sys/procfs.h>],[gregset_t *gregsetp = 0],
AC_MSG_CHECKING(for long long support in compiler)
AC_CACHE_VAL(gdb_cv_c_long_long,
[AC_TRY_COMPILE(, [
-long long foo;
-void bar ()
-{
- switch (foo & 2) { case 0: return; }
-}],
+ extern long long foo;
+ switch (foo & 2) { case 0: return 1; }
+],
gdb_cv_c_long_long=yes, gdb_cv_c_long_long=no)])
AC_MSG_RESULT($gdb_cv_c_long_long)
if test $gdb_cv_c_long_long = yes; then
AC_FUNC_MMAP
+BFD_NEED_DECLARATION(malloc)
+BFD_NEED_DECLARATION(realloc)
+BFD_NEED_DECLARATION(free)
+
dnl See if thread_db library is around for Solaris thread debugging. Note that
dnl we must explicitly test for version 1 of the library because version 0
dnl (present on Solaris 2.4 or earlier) doesn't have the same API.
*go32*)
AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.])
enable_gdbtk=no ;;
- *cygwin32*)
+ *cygwin32* | *windows*)
AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.])
enable_gdbtk=no ;;
*)
[
# Default is on for everything but go32 and cygwin32
case "$host" in
- *go32*)
- ;;
- *cygwin32*)
+ *go32* | *cygwin32* | *windows*)
;;
*)
enable_gdbtk=yes ;;
if test "${enable_gdbtk}" = "yes"; then
CY_AC_PATH_TCLCONFIG
- CY_AC_LOAD_TCLCONFIG
- CY_AC_PATH_TKCONFIG
+ if test -z "${no_tcl}"; then
+ CY_AC_LOAD_TCLCONFIG
+ CY_AC_PATH_TKCONFIG
- # If $no_tk is nonempty, then we can't do Tk, and there is no
- # point to doing Tcl.
- if test -z "${no_tk}"; then
- CY_AC_LOAD_TKCONFIG
- CY_AC_PATH_TCLH
- CY_AC_PATH_TKH
+ # If $no_tk is nonempty, then we can't do Tk, and there is no
+ # point to doing Tcl.
+ if test -z "${no_tk}"; then
+ CY_AC_LOAD_TKCONFIG
+ CY_AC_PATH_TCLH
+ CY_AC_PATH_TKH
- # Include some libraries that Tcl and Tk want.
- LIBS="$LIBS $TK_LIBS"
+ # Include some libraries that Tcl and Tk want.
+ LIBS="$LIBS $TK_LIBS"
- ENABLE_GDBTK=1
+ ENABLE_GDBTK=1
- TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
- ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS}"
- ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
+ TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
+ ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS}"
+ ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
+ fi
fi
fi
AC_SUBST(ENABLE_CLIBS)
AC_SUBST(ENABLE_OBS)
+# Begin stuff to support --enable-shared
+AC_ARG_ENABLE(shared,
+[ --enable-shared use shared libraries],
+[case "${enableval}" in
+ yes) shared=true ;;
+ no) shared=false ;;
+ *) shared=true ;;
+esac])dnl
+
+HLDFLAGS=
+HLDENV=
+# If we have shared libraries, try to set rpath reasonably.
+if test "${shared}" = "true"; then
+ case "${host}" in
+ *-*-hpux*)
+ HLDFLAGS='-Wl,+s,+b,$(libdir)'
+ ;;
+ *-*-irix5* | *-*-irix6*)
+ HLDFLAGS='-Wl,-rpath,$(libdir)'
+ ;;
+ *-*-linux*aout*)
+ ;;
+ *-*-linux*)
+ HLDFLAGS='-Wl,-rpath,$(libdir)'
+ ;;
+ *-*-solaris*)
+ HLDFLAGS='-R $(libdir)'
+ ;;
+ *-*-sysv4*)
+ HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
+ ;;
+ esac
+fi
+
+# On SunOS, if the linker supports the -rpath option, use it to
+# prevent ../bfd and ../opcodes from being included in the run time
+# search path.
+case "${host}" in
+ *-*-sunos*)
+ echo 'main () { }' > conftest.c
+ ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
+ if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
+ :
+ elif grep 'No such file' conftest.t >/dev/null 2>&1; then
+ :
+ elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
+ :
+ elif test "${shared}" = "true"; then
+ HLDFLAGS='-Wl,-rpath=$(libdir)'
+ else
+ HLDFLAGS='-Wl,-rpath='
+ fi
+ rm -f conftest.t conftest.c conftest
+ ;;
+esac
+AC_SUBST(HLDFLAGS)
+AC_SUBST(HLDENV)
+# End stuff to support --enable-shared
+
# target_subdir is used by the testsuite to find the target libraries.
target_subdir=
if test "${host}" != "${target}"; then
i[3456]86-*-isc*) gdb_host=i386v32 ;;
i[3456]86-*-os9k) gdb_host=i386os9k ;;
i[3456]86-*-cygwin32) gdb_host=cygwin32 ;;
+i[3456]86-*-windows) gdb_host=windows
+ configdirs="${configdirs} mswin" ;;
m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
m68030-sony-*) gdb_host=news1000 ;;
c1-*-*) gdb_target=convex ;;
c2-*-*) gdb_target=convex ;;
+# start-sanitize-d10v
+d10v-*-*) gdb_target=d10v ;;
+# end-sanitize-d10v
+
h8300-*-*) gdb_target=h8300 ;;
h8500-*-*) gdb_target=h8500 ;;
mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
mips64*vr4100*el-*-elf*) gdb_target=vr4300el ;;
mips64*vr4100*-*-elf*) gdb_target=vr4300 ;;
+mips64*vr5000*el-*-elf*) gdb_target=vr4300el ;;
+mips64*vr5000*-*-elf*) gdb_target=vr4300 ;;
mips64*el-*-elf*) gdb_target=embedl64 ;;
mips64*-*-elf*) gdb_target=embed64 ;;
mips*el-*-ecoff*) gdb_target=embedl ;;
vax-*-*) gdb_target=vax ;;
+start-sanitize-v850
+v850-*-*) gdb_target=v850 ;;
+
+end-sanitize-v850
w65-*-*) gdb_target=w65 ;;
z8k-*-coff*) gdb_target=z8k ;;
dnl provided by makefile fragments.
dnl
if test "${nativefile}" = ""; then
-sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
+sed -e '/^NATDEPFILES[[ ]]*=[[ ]]*/s//# NATDEPFILES=/' \
< Makefile > Makefile.tem
mv -f Makefile.tem Makefile
fi