. ${srcdir}/configure.tgt
+targ=${target} ; . ${srcdir}/../bfd/config.bfd
+
dnl
changequote([,])dnl
+dnl use BFD to determine the default architecture and byte order
+dnl (bfd_vec->byteorder provides the latter).
+targ=${target}
+. ${srcdir}/../bfd/config.bfd
+
+dnl We only want the first arch, if there is more than one.
+targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'`
+
+if test x"${targ_archs}" != x ; then
+ AC_DEFINE_UNQUOTED(DEFAULT_BFD_ARCH, ${targ_archs})
+fi
+if test x"${targ_defvec}" != x ; then
+ AC_DEFINE_UNQUOTED(DEFAULT_BFD_VEC, ${targ_defvec})
+fi
+
AC_PROG_AWK
AC_PROG_INSTALL
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(DLLTOOL, dlltool)
+AC_CHECK_TOOL(WINDRES, windres)
AC_PROG_YACC
dnl MiG is needed for the Hurd.
dnl and <wchar.h> that causes AC_CHECK_HEADERS to think <curses.h> doesn't
dnl exist.
-case $host_os in solaris2.7) case "$GCC" in yes)
+case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes)
AC_DEFINE(_MSE_INT_H)
esac; esac
# See if machine/reg.h supports the %fs and %gs i386 segment registers.
# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
-AC_CACHE_CHECK([for r_fs in struct reg], gdb_cv_struct_r_fs,
+AC_CACHE_CHECK([for r_fs in struct reg], gdb_cv_struct_reg_r_fs,
[AC_TRY_COMPILE([#include <machine/reg.h>], [struct reg r; r.r_fs;],
-gdb_cv_struct_r_fs=yes, gdb_cv_struct_r_fs=no)])
-if test $gdb_cv_struct_r_fs = yes; then
- AC_DEFINE(HAVE_R_FS)
+gdb_cv_struct_reg_r_fs=yes, gdb_cv_struct_reg_r_fs=no)])
+if test $gdb_cv_struct_reg_r_fs = yes; then
+ AC_DEFINE(HAVE_STRUCT_REG_R_FS)
fi
-AC_CACHE_CHECK([for r_gs in struct reg], gdb_cv_struct_r_gs,
+AC_CACHE_CHECK([for r_gs in struct reg], gdb_cv_struct_reg_r_gs,
[AC_TRY_COMPILE([#include <machine/reg.h>], [struct reg r; r.r_gs;],
-gdb_cv_struct_r_gs=yes, gdb_cv_struct_r_gs=no)])
-if test $gdb_cv_struct_r_gs = yes; then
- AC_DEFINE(HAVE_R_GS)
+gdb_cv_struct_reg_r_gs=yes, gdb_cv_struct_reg_r_gs=no)])
+if test $gdb_cv_struct_reg_r_gs = yes; then
+ AC_DEFINE(HAVE_STRUCT_REG_R_GS)
fi
dnl See if ptrace.h provides the PTRACE_GETREGS request.
lose
#endif],[gdb_cv_os_cygwin=yes],[gdb_cv_os_cygwin=no])])
-DLLTOOL=${DLLTOOL-dlltool}
-WINDRES=${WINDRES-windres}
-AC_SUBST(DLLTOOL)
-AC_SUBST(WINDRES)
+
+dnl Figure out which of the many generic ser-*.c files the _host_ supports.
+SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
+case ${host} in
+ go32*-*-* ) SER_HARDWIRE=ser-go32.o ;;
+esac
+AC_SUBST(SER_HARDWIRE)
+
dnl Figure out which term library to use.
if test x$gdb_host = xgo32; then
CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-varobj.o gdbtk-wrapper.o"
CONFIG_INITS="${CONFIG_INITS} gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c"
CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
- CONFIG_CLEAN="${CONFIG_ALL} \$(SUBDIR_GDBTK_CLEAN)"
+ CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"