* MAINTAINERS: Add Paul Brook and Mark Mitchell as ARM (Symbian)
[binutils-gdb.git] / gdb / configure.ac
index 82c8bbe8176a2d6d9297433cb9489921bc3e7aad..4a1b21640c9d2bd6ecc9f2c307f237f5c4d4630e 100644 (file)
@@ -34,14 +34,6 @@ AM_PROG_CC_STDC
 AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
 AC_CANONICAL_SYSTEM
 
-# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
-# doesn't support cross-compilation, but the one from Autoconf 2.5x
-# does.  Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
-# deal with the lossage.  Note that CY_GNU_GETTEXT currently calls
-# AC_PROG_RANLIB.  This can be removed when we switch to Autoconf
-# 2.5x.
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-
 dnl List of object files and targets accumulated by configure.
 
 CONFIG_OBS=
@@ -424,7 +416,9 @@ AC_CHECK_HEADERS(ctype.h time.h)
 # Checks for declarations.  #
 # ------------------------- #
 
-gcc_AC_CHECK_DECLS(getopt)
+AC_CHECK_DECLS([free, malloc, realloc])
+AC_CHECK_DECLS([strerror, strstr])
+AC_CHECK_DECLS(getopt)
 
 # ----------------------- #
 # Checks for structures.  #
@@ -477,7 +471,7 @@ gdb_ptrace_headers='
 #endif
 '
 # There is no point in checking if we don't have a prototype.
-gcc_AC_CHECK_DECLS(ptrace, , [
+AC_CHECK_DECLS(ptrace, [], [
   : ${gdb_cv_func_ptrace_ret='int'}
   : ${gdb_cv_func_ptrace_args='int,int,long,long'}
 ], $gdb_ptrace_headers)
@@ -587,15 +581,11 @@ if test "$gdb_with_regex" = yes; then
     [Define to 1 if the regex included in libiberty should be used.])
 fi
 
-# See if <sys/proc.h> defines `struct thread' with a td_pcb member.
-AC_CACHE_CHECK([for td_pcb in struct thread], gdb_cv_struct_thread_td_pcb,
-[AC_TRY_COMPILE([#include <sys/param.h>
-#include <sys/proc.h>], [struct thread td; td.td_pcb;],
-gdb_cv_struct_thread_td_pcb=yes, gdb_cv_struct_thread_td_pcb=no)])
-if test $gdb_cv_struct_thread_td_pcb = yes; then
-  AC_DEFINE(HAVE_STRUCT_THREAD_TD_PCB, 1,
-            [Define to 1 if your system has td_pcb in struct thread.])
-fi
+# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
+AC_CHECK_MEMBERS([struct thread.td_pcb], [], [],
+[#include <sys/param.h>
+#include <sys/proc.h>
+])
 
 # See if <sys/lwp.h> defines `struct lwp`.
 AC_CACHE_CHECK([for struct lwp], gdb_cv_struct_lwp,
@@ -619,18 +609,8 @@ fi
 
 # 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_reg_r_fs,
-[AC_TRY_COMPILE([#include <machine/reg.h>], [struct reg r; r.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_reg_r_gs,
-[AC_TRY_COMPILE([#include <machine/reg.h>], [struct reg r; r.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
+AC_CHECK_MEMBERS([struct reg.r_fs, struct reg.r_gs], [], [],
+                 [#include <machine/reg.h>])
 
 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
 AC_MSG_CHECKING(for PTRACE_GETREGS)
@@ -694,14 +674,6 @@ if test $gdb_cv_have_uintptr_t = yes; then
   AC_DEFINE(HAVE_UINTPTR_T, 1, [Define if <stdint.h> provides the uintptr_t type.])
 fi
 
-BFD_NEED_DECLARATION(malloc)
-BFD_NEED_DECLARATION(realloc)
-BFD_NEED_DECLARATION(free)
-BFD_NEED_DECLARATION(strerror)
-BFD_NEED_DECLARATION(strdup)
-BFD_NEED_DECLARATION(strstr)
-BFD_NEED_DECLARATION(canonicalize_file_name)
-
 # If we are configured native on GNU/Linux, work around problems with
 # sys/procfs.h
 # Also detect which type of /proc is in use, such as for Unixware or Solaris.
@@ -712,9 +684,6 @@ if test "${target}" = "${host}"; then
        AC_DEFINE(START_INFERIOR_TRAPS_EXPECTED,2)
        AC_DEFINE(sys_quotactl)
        ;;
-  ia64-*-aix*)
-      AC_DEFINE(NEW_PROC_API)
-      ;;
   *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
       AC_DEFINE(NEW_PROC_API)
       ;;