revert 1.9. Not approved.
[deliverable/binutils-gdb.git] / gdb / configure.in
index 025d8e33202e1102fab2daed03d82bf4f5df519c..5f112c0854e3dc4e6fbb1952687fe217a3990b84 100644 (file)
@@ -22,6 +22,7 @@ dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.13)dnl
 AC_INIT(main.c)
 AC_CONFIG_HEADER(config.h:config.in)
+AM_MAINTAINER_MODE
 
 AC_PROG_CC
 AC_AIX
@@ -184,7 +185,7 @@ if test "${target}" = "${host}"; then
   *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*)
       AC_DEFINE(NEW_PROC_API)
       ;;
-  *-*-solaris2.[678])
+  *-*-solaris2.[[678]])
       AC_DEFINE(NEW_PROC_API)
       ;;
   esac
@@ -200,6 +201,32 @@ if test "$ac_cv_header_sys_procfs_h" = yes; then
   BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t)
   BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t)
 
+  dnl Check for broken prfpregset_t type
+
+  dnl For Linux/i386, glibc 2.1.3 was released with a bogus
+  dnl prfpregset_t type (it's a typedef for the pointer to a struct
+  dnl instead of the struct itself).  We detect this here, and work
+  dnl around it in lin-thread.c.
+
+  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+    AC_MSG_CHECKING(whether prfpregset_t type is broken)
+    AC_CACHE_VAL(gdb_cv_prfpregset_t_broken,
+      [AC_TRY_RUN([#include <sys/procfs.h>
+       int main ()
+       {
+         if (sizeof (prfpregset_t) == sizeof (void *))
+           return 1;
+         return 0;
+       }],
+       gdb_cv_prfpregset_t_broken=no,
+       gdb_cv_prfpregset_t_broken=yes,
+       gdb_cv_prfpregset_t_broken=yes)])
+    AC_MSG_RESULT($gdb_cv_prfpregset_t_broken)
+    if test $gdb_cv_prfpregset_t_broken = yes; then
+      AC_DEFINE(PRFPREGSET_T_BROKEN)
+    fi
+  fi
+
   dnl Check for PIOCSET ioctl entry 
 
   AC_MSG_CHECKING(for PIOCSET ioctl entry in sys/procfs.h)
@@ -517,8 +544,6 @@ AC_ARG_WITH(included-regex,
   *)    AC_MSG_ERROR(bad value ${withval} for GDB with-included-regex option) ;;
 esac],[want_included_regex=true])dnl
 
-REGEX="gnu-regex.o"
-REGEX_CFLAGS="-DUSE_INCLUDED_REGEX"
 if test $want_included_regex = false; then
   AC_MSG_CHECKING(for GNU regex)
   AC_CACHE_VAL(gdb_cv_have_gnu_regex,
@@ -532,13 +557,16 @@ if test $want_included_regex = false; then
                [gdb_cv_have_gnu_regex=yes],
                [gdb_cv_have_gnu_regex=no])])
   AC_MSG_RESULT($gdb_cv_have_gnu_regex)
-  if test $gdb_cv_have_gnu_regex = yes; then
-    REGEX=
-    REGEX_CFLAGS=
+  if test $gdb_cv_have_gnu_regex = no; then
+       want_included_regex=true
   fi
 fi
+
+if test x${want_included_regex} = xtrue; then
+    REGEX="gnu-regex.o"
+    AC_DEFINE(USE_INCLUDED_REGEX)
+fi
 AC_SUBST(REGEX)
-AC_SUBST(REGEX_CFLAGS)
 
 # In the Cygwin environment, we need some additional flags.
 AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin,
This page took 0.024732 seconds and 4 git commands to generate.