* ld-selective/selective.exp <no CXX>: Fix typo for argument to
[deliverable/binutils-gdb.git] / gdb / configure.in
index 177c10ef7f43600de5b910045b3c503b5dafeeb1..c1967af79da319dfb163cf6645aa61ebe0202b1f 100644 (file)
@@ -1,5 +1,5 @@
 dnl Autoconf configure script for GDB, the GNU debugger.
-dnl Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+dnl Copyright 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 dnl
 dnl This file is part of GDB.
 dnl 
@@ -159,22 +159,16 @@ if test $gdb_cv_have_ptrace_getregs = yes; then
   AC_DEFINE(HAVE_PTRACE_GETREGS)
 fi
 
-dnl See if ptrace.h provides the PTRACE_GETXFPREGS request.
-dnl PTRACE_GETXFPREGS is a Cygnus invention, since we wrote our own
-dnl Linux kernel patch for SSE support.  That patch may or may not
-dnl actually make it into the official distribution.  If you find that
-dnl years have gone by since this configure test was added, and Linux
-dnl isn't using PTRACE_GETXFPREGS, that means that our patch didn't
-dnl make it, and you can delete this code.
-AC_MSG_CHECKING(for PTRACE_GETXFPREGS)
-AC_CACHE_VAL(gdb_cv_have_ptrace_getxfpregs,
+dnl See if ptrace.h provides the PTRACE_GETFPXREGS request.
+AC_MSG_CHECKING(for PTRACE_GETFPXREGS)
+AC_CACHE_VAL(gdb_cv_have_ptrace_getfpxregs,
 [AC_TRY_COMPILE([#include <sys/ptrace.h>],
-               [PTRACE_GETXFPREGS;],
-               [gdb_cv_have_ptrace_getxfpregs=yes],
-               [gdb_cv_have_ptrace_getxfpregs=no])])
-AC_MSG_RESULT($gdb_cv_have_ptrace_getxfpregs)
-if test $gdb_cv_have_ptrace_getxfpregs = yes; then
-  AC_DEFINE(HAVE_PTRACE_GETXFPREGS)
+               [PTRACE_GETFPXREGS;],
+               [gdb_cv_have_ptrace_getfpxregs=yes],
+               [gdb_cv_have_ptrace_getfpxregs=no])])
+AC_MSG_RESULT($gdb_cv_have_ptrace_getfpxregs)
+if test $gdb_cv_have_ptrace_getfpxregs = yes; then
+  AC_DEFINE(HAVE_PTRACE_GETFPXREGS)
 fi
 
 AC_CHECK_LIB(socket, socketpair)
@@ -235,9 +229,25 @@ if test "$ac_cv_header_sys_procfs_h" = yes; then
   BFD_HAVE_SYS_PROCFS_TYPE(fpregset_t)
   BFD_HAVE_SYS_PROCFS_TYPE(prgregset_t)
   BFD_HAVE_SYS_PROCFS_TYPE(prfpregset_t)
+  BFD_HAVE_SYS_PROCFS_TYPE(prgregset32_t)
+  BFD_HAVE_SYS_PROCFS_TYPE(prfpregset32_t)
   BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t)
   BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t)
 
+  dnl Check for struct link_map32 type, which allows a 64-bit Solaris
+  dnl debugger to debug a 32-bit Solaris app with 32-bit shared libraries.
+
+  AC_MSG_CHECKING(for struct link_map32 in sys/link.h)
+  AC_CACHE_VAL(gdb_cv_have_struct_link_map32, 
+    [AC_TRY_COMPILE([#define _SYSCALL32
+#include <sys/link.h>], [struct link_map32 l;],
+     gdb_cv_have_struct_link_map32=yes,
+     gdb_cv_have_struct_link_map32=no)])
+  AC_MSG_RESULT($gdb_cv_have_struct_link_map32)
+  if test $gdb_cv_have_struct_link_map32 = yes; then
+    AC_DEFINE(HAVE_STRUCT_LINK_MAP32)
+  fi
+
   dnl Check for broken prfpregset_t type
 
   dnl For Linux/i386, glibc 2.1.3 was released with a bogus
@@ -631,7 +641,8 @@ lose
 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 ;;
+  *go32* ) SER_HARDWIRE=ser-go32.o ;;
+  *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
 esac
 AC_SUBST(SER_HARDWIRE)
 
@@ -1002,6 +1013,10 @@ targetfile=`sed -n '
 s/TM_FILE[     ]*=[    ]*\([^  ]*\)/\1/p
 ' ${target_makefile_frag}`
 
+GDB_MULTI_ARCH=`sed -n '
+s/GDB_MULTI_ARCH[      ]*=[    ]*\([^  ]*\)[   ]*/\1/p
+' ${target_makefile_frag}`
+
 # these really aren't orthogonal true/false values of the same condition,
 # but shells are slow enough that I like to reuse the test conditions
 # whenever possible
@@ -1015,6 +1030,34 @@ s/NAT_FILE[      ]*=[    ]*\([^  ]*\)/\1/p
 fi
 changequote([,])
 
+# New targets should just set gdb_multi_arch=yes in configure.tgt.
+# Old targets being converted can either do that or set GDB_MULTI_ARCH
+# in the target specific makefile frag.  Eventually gdb_multi_arch=yes
+# will be the default.
+if test x"${GDB_MULTI_ARCH}" = x ; then
+    case "${gdb_multi_arch}" in
+    yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
+    no ) GDB_MULTI_ARCH=0 ;;
+    0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
+    esac
+fi
+if test x"${GDB_MULTI_ARCH}" != x ; then
+    AC_DEFINE_UNQUOTED(GDB_MULTI_ARCH, ${GDB_MULTI_ARCH})
+fi
+# Warn the user when they use an old pratice
+case "${GDB_MULTI_ARCH}" in
+    "" ) ;;
+    0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
+       AC_MSG_WARN("GDB: Target is not pure multi-arch") ;;
+    GDB_MULTI_ARCH_PURE )
+       if test x"${targetfile}" != x ; then
+           AC_MSG_WARN("GDB: Ingoring TM_FILE in ${target_makefile_frag}")
+           targetfile=""
+       fi ;;
+    *)  AC_MSG_ERROR("GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}");;
+esac
+
+
 SUBDIRS="doc testsuite nlm"
 if test "${enable_multi_ice}" = "yes"; then
   SUBDIRS="${SUBDIRS} multi-ice"
@@ -1023,32 +1066,45 @@ fi
 AC_SUBST(SUBDIRS)
 
 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
-# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
-# corresponding links.  But we have to remove the xm.h files and tm.h
-# files anyway, e.g. when switching from "configure host" to
-# "configure none".
+# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
+# version.
 
 files=
 links=
+
 rm -f xm.h
+xm_h=""
 if test "${hostfile}" != ""; then
-files="${files} config/${gdb_host_cpu}/${hostfile}"
-links="${links} xm.h"
+    xm_h=xm.h
+    GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
+    files="${files} ${GDB_XM_FILE}"
+    links="${links} xm.h"
+    AC_DEFINE_UNQUOTED(GDB_XM_FILE, ${GDB_XM_FILE})
 fi
+AC_SUBST(xm_h)
+
 rm -f tm.h
+tm_h=""
 if test "${targetfile}" != ""; then
-files="${files} config/${gdb_target_cpu}/${targetfile}"
-links="${links} tm.h"
+    tm_h=tm.h
+    GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
+    files="${files} ${GDB_TM_FILE}"
+    links="${links} tm.h"
+    AC_DEFINE_UNQUOTED(GDB_TM_FILE, ${GDB_TM_FILE})
 fi
+AC_SUBST(tm_h)
+
 rm -f nm.h
+nm_h=""
 if test "${nativefile}" != ""; then
-files="${files} config/${gdb_host_cpu}/${nativefile}"
-links="${links} nm.h"
-else
-# A cross-only configuration.
-files="${files} config/nm-empty.h"
-links="${links} nm.h"
+    nm_h=nm.h
+    GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
+    files="${files} ${GDB_NM_FILE}"
+    links="${links} nm.h"
+    AC_DEFINE_UNQUOTED(GDB_NM_FILE, ${GDB_NM_FILE})
 fi
+AC_SUBST(nm_h)
+
 AC_PROG_LN_S
 
 AC_LINK_FILES($files, $links)
This page took 0.024659 seconds and 4 git commands to generate.