revert 1.9. Not approved.
[deliverable/binutils-gdb.git] / gdb / configure.in
index 48beb0b134cbe9ad3665521f312368567f4c3a4d..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)
@@ -454,12 +481,14 @@ if test "${enable_netrom}" = "yes"; then
         CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
 fi
 
+
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith"
+# Not yet: -Wall -Wpointer-arith -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations
 AC_ARG_ENABLE(build-warnings,
 [  --enable-build-warnings Enable build-time compiler warnings if gcc is used],
-[
-# not yet: -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
-build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith"
-case "${enableval}" in
+[case "${enableval}" in
   yes) ;;
   no)  build_warnings="-w";;
   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
@@ -470,7 +499,7 @@ case "${enableval}" in
 esac
 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
   echo "Setting warning flags = $build_warnings" 6>&1
-fi
+fi])dnl
 WARN_CFLAGS=""
 WERROR_CFLAGS=""
 if test "x${build_warnings}" != x -a "x$GCC" = xyes
@@ -483,8 +512,7 @@ then
     *) WARN_CFLAGS="${WARN_CFLAGS} $w"
     esac
   done
-fi],[build_warnings=""])dnl
-
+fi
 AC_SUBST(WARN_CFLAGS)
 AC_SUBST(WERROR_CFLAGS)
 
@@ -516,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,
@@ -531,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.024855 seconds and 4 git commands to generate.