Fix a typo in bunzip2..
[deliverable/binutils-gdb.git] / gdb / configure
index 028e495530a1953dd1ad523ccb4a47ac04dea4a6..cd0acf7981921f1a26c02ca1015545755b8b2291 100755 (executable)
@@ -315,7 +315,7 @@ ac_subdirs_all="$ac_subdirs_all multi-ice"
 ac_subdirs_all="$ac_subdirs_all gdbserver"
 ac_subdirs_all="$ac_subdirs_all rdi-share"
 ac_subdirs_all="$ac_subdirs_all nlm"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os RANLIB ac_ct_RANLIB SET_MAKE ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l localedir PACKAGE subdirs AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S YACC AR ac_ct_AR DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES MIG ac_ct_MIG CONFIG_LDFLAGS TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS WERROR_CFLAGS SER_HARDWIRE WIN32LIBS LIBGUI GUI_CFLAGS_X WIN32LDAPP TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_CC TCL_DEFS TCL_SHLIB_CFLAGS TCL_SHLIB_LD TCL_SHLIB_LD_LIBS TCL_SHLIB_SUFFIX TCL_DL_LIBS TCL_LD_FLAGS TCL_LD_SEARCH_FLAGS TCL_CC_SEARCH_FLAGS TCL_COMPAT_OBJS TCL_RANLIB TCL_BUILD_LIB_SPEC TCL_LIB_SPEC TCL_LIB_VERSIONS_OK TK_VERSION TK_DEFS TK_BUILD_INCLUDES TK_XINCLUDES TK_XLIBSW TK_BUILD_LIB_SPEC TK_LIB_SPEC TCLHDIR TKHDIR ITCLHDIR ITKHDIR ITCL_VERSION ITCL_DEFS ITCL_BUILD_INCLUDES ITCL_BUILD_LIB_SPEC ITCL_LIB_SPEC ITK_VERSION ITK_DEFS ITK_BUILD_INCLUDES ITK_BUILD_LIB_SPEC ITK_LIB_SPEC X_CFLAGS X_LDFLAGS X_LIBS TCL_DEPS TK_DEPS ITCLLIB ITCL_DEPS ITKLIB ITK_DEPS GDBTKLIBS GDBTK_CFLAGS GDBTK_SRC_DIR IGNORE_SIM IGNORE_SIM_OBS ENABLE_CFLAGS PROFILE_CFLAGS CONFIG_OBS CONFIG_DEPS CONFIG_SRCS CONFIG_ALL CONFIG_CLEAN CONFIG_INSTALL CONFIG_UNINSTALL target_subdir frags xm_h tm_h nm_h LIBICONV LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os SET_MAKE RANLIB ac_ct_RANLIB ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l localedir PACKAGE subdirs AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S YACC AR ac_ct_AR DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES MIG ac_ct_MIG CONFIG_LDFLAGS TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS WERROR_CFLAGS SER_HARDWIRE WIN32LIBS LIBGUI GUI_CFLAGS_X WIN32LDAPP TCL_VERSION TCL_MAJOR_VERSION TCL_MINOR_VERSION TCL_CC TCL_DEFS TCL_SHLIB_CFLAGS TCL_SHLIB_LD TCL_SHLIB_LD_LIBS TCL_SHLIB_SUFFIX TCL_DL_LIBS TCL_LD_FLAGS TCL_LD_SEARCH_FLAGS TCL_CC_SEARCH_FLAGS TCL_COMPAT_OBJS TCL_RANLIB TCL_BUILD_LIB_SPEC TCL_LIB_SPEC TCL_LIB_VERSIONS_OK TK_VERSION TK_DEFS TK_BUILD_INCLUDES TK_XINCLUDES TK_XLIBSW TK_BUILD_LIB_SPEC TK_LIB_SPEC TCLHDIR TKHDIR ITCLHDIR ITKHDIR ITCL_VERSION ITCL_DEFS ITCL_BUILD_INCLUDES ITCL_BUILD_LIB_SPEC ITCL_LIB_SPEC ITK_VERSION ITK_DEFS ITK_BUILD_INCLUDES ITK_BUILD_LIB_SPEC ITK_LIB_SPEC X_CFLAGS X_LDFLAGS X_LIBS TCL_DEPS TK_DEPS ITCLLIB ITCL_DEPS ITKLIB ITK_DEPS GDBTKLIBS GDBTK_CFLAGS GDBTK_SRC_DIR IGNORE_SIM IGNORE_SIM_OBS ENABLE_CFLAGS PROFILE_CFLAGS CONFIG_OBS CONFIG_DEPS CONFIG_SRCS CONFIG_ALL CONFIG_CLEAN CONFIG_INSTALL CONFIG_UNINSTALL target_subdir frags xm_h tm_h nm_h LIBICONV LIBOBJS LTLIBOBJS'
 ac_subst_files='host_makefile_frag target_makefile_frag'
 
 # Initialize some variables set by options.
@@ -2927,93 +2927,6 @@ test -n "$target_alias" &&
     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
 
-# 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.
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  RANLIB=$ac_ct_RANLIB
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-
 
 CONFIG_OBS=
 CONFIG_DEPS=
@@ -4934,11 +4847,6 @@ echo "${ECHO_T}$USE_NLS" >&6
     USE_INCLUDED_LIBINTL=no
 
         if test "$USE_NLS" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_NLS 1
-_ACEOF
-
       echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
 echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
 
@@ -4956,7 +4864,7 @@ echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
                                        nls_cv_header_intl=
        nls_cv_header_libgt=
-       CATOBJEXT=NONE
+       CATOBJEXT=
 
        if test "${ac_cv_header_libintl_h+set}" = set; then
   echo "$as_me:$LINENO: checking for libintl.h" >&5
@@ -5554,8 +5462,10 @@ fi
 
 
 
-        if test "$CATOBJEXT" = "NONE"; then
-                         nls_cv_use_gnu_gettext=yes
+        if test x"$CATOBJEXT" = x && test -d $srcdir/../intl; then
+         # Neither gettext nor catgets in included in the C library.
+         # Fall back on GNU gettext library (assuming it is present).
+         nls_cv_use_gnu_gettext=yes
         fi
       fi
 
@@ -5726,6 +5636,13 @@ echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6
 
 
 
+    if test "x$CATOBJEXT" != "x"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
+
+    fi
 
 
    if test "x$CATOBJEXT" != "x"; then
@@ -6148,7 +6065,7 @@ echo "$as_me: error: bad value $enableval for --enable-gdbtk" >&2;}
    { (exit 1); exit 1; }; } ;;
   esac
 else
-  if test -d $srcdir/gdbtk; then
+  if test -d $srcdir/gdbtk -a -d $srcdir/../itcl; then
     enable_gdbtk=yes
   else
     enable_gdbtk=no
@@ -13014,12 +12931,9 @@ done
 # Checks for declarations.  #
 # ------------------------- #
 
-for ac_func in getopt
-do
-  ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
-echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
-if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
+echo "$as_me:$LINENO: checking whether free is declared" >&5
+echo $ECHO_N "checking whether free is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_free+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -13028,16 +12942,14 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#undef $ac_tr_decl
-#define $ac_tr_decl 1
-
-
+$ac_includes_default
 int
 main ()
 {
-#ifndef $ac_func
-char *(*pfn) = (char *(*)) $ac_func ;
+#ifndef free
+  char *p = (char *) free;
 #endif
+
   ;
   return 0;
 }
@@ -13064,46 +12976,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "gcc_cv_have_decl_$ac_func=yes"
+  ac_cv_have_decl_free=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-eval "gcc_cv_have_decl_$ac_func=no"
+ac_cv_have_decl_free=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_free" >&5
+echo "${ECHO_T}$ac_cv_have_decl_free" >&6
+if test $ac_cv_have_decl_free = yes; then
 
-if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
-#define $ac_tr_decl 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREE 1
 _ACEOF
 
+
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
-#define $ac_tr_decl 0
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREE 0
 _ACEOF
 
-fi
-
-done
-if test x = y ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DECL_GETOPT 1
-_ACEOF
 fi
-
-
-# ----------------------- #
-# Checks for structures.  #
-# ----------------------- #
-
-echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
-echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
-if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
+echo "$as_me:$LINENO: checking whether malloc is declared" >&5
+echo $ECHO_N "checking whether malloc is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_malloc+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -13116,9 +13016,10 @@ $ac_includes_default
 int
 main ()
 {
-static struct stat ac_aggr;
-if (ac_aggr.st_blocks)
-return 0;
+#ifndef malloc
+  char *p = (char *) malloc;
+#endif
+
   ;
   return 0;
 }
@@ -13145,12 +13046,37 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_member_struct_stat_st_blocks=yes
+  ac_cv_have_decl_malloc=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-cat >conftest.$ac_ext <<_ACEOF
+ac_cv_have_decl_malloc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_malloc" >&5
+echo "${ECHO_T}$ac_cv_have_decl_malloc" >&6
+if test $ac_cv_have_decl_malloc = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MALLOC 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MALLOC 0
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking whether realloc is declared" >&5
+echo $ECHO_N "checking whether realloc is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_realloc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -13160,9 +13086,10 @@ $ac_includes_default
 int
 main ()
 {
-static struct stat ac_aggr;
-if (sizeof ac_aggr.st_blocks)
-return 0;
+#ifndef realloc
+  char *p = (char *) realloc;
+#endif
+
   ;
   return 0;
 }
@@ -13189,36 +13116,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_member_struct_stat_st_blocks=yes
+  ac_cv_have_decl_realloc=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_member_struct_stat_st_blocks=no
+ac_cv_have_decl_realloc=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
-echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
-if test $ac_cv_member_struct_stat_st_blocks = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_realloc" >&5
+echo "${ECHO_T}$ac_cv_have_decl_realloc" >&6
+if test $ac_cv_have_decl_realloc = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_STAT_ST_BLOCKS 1
+#define HAVE_DECL_REALLOC 1
 _ACEOF
 
 
-fi
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_REALLOC 0
+_ACEOF
 
 
-# ------------------ #
-# Checks for types.  #
-# ------------------ #
+fi
 
-echo "$as_me:$LINENO: checking return type of signal handlers" >&5
-echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
-if test "${ac_cv_type_signal+set}" = set; then
+
+echo "$as_me:$LINENO: checking whether strerror is declared" >&5
+echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_strerror+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -13227,21 +13154,14 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-# undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-
+$ac_includes_default
 int
 main ()
 {
-int i;
+#ifndef strerror
+  char *p = (char *) strerror;
+#endif
+
   ;
   return 0;
 }
@@ -13268,31 +13188,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_type_signal=void
+  ac_cv_have_decl_strerror=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_signal=int
+ac_cv_have_decl_strerror=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
-echo "${ECHO_T}$ac_cv_type_signal" >&6
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6
+if test $ac_cv_have_decl_strerror = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
+#define HAVE_DECL_STRERROR 1
 _ACEOF
 
 
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR 0
+_ACEOF
 
-# ------------------------------------- #
-# Checks for compiler characteristics.  #
-# ------------------------------------- #
 
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
+fi
+echo "$as_me:$LINENO: checking whether strstr is declared" >&5
+echo $ECHO_N "checking whether strstr is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_strstr+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -13301,55 +13224,12 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
+$ac_includes_default
 int
 main ()
 {
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this.  */
-  typedef int charset[2];
-  const charset x;
-  /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *ccp;
-  char **p;
-  /* NEC SVR4.0.2 mips cc rejects this.  */
-  struct point {int x, y;};
-  static struct point const zero = {0,0};
-  /* AIX XL C 1.02.0.0 rejects this.
-     It does not let you subtract one const X* pointer from another in
-     an arm of an if-expression whose if-part is not a constant
-     expression */
-  const char *g = "string";
-  ccp = &g + (g ? g-g : 0);
-  /* HPUX 7.0 cc rejects these. */
-  ++ccp;
-  p = (char**) ccp;
-  ccp = (char const *const *) p;
-  { /* SCO 3.2v4 cc rejects this.  */
-    char *t;
-    char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-    *t++ = 0;
-  }
-  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-    int x[] = {25, 17};
-    const int *foo = &x[0];
-    ++foo;
-  }
-  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-    typedef const int *iptr;
-    iptr p = 0;
-    ++p;
-  }
-  { /* AIX XL C 1.02.0.0 rejects this saying
-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; };
-    struct s *b; b->j = 5;
-  }
-  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-    const int foo = 10;
-  }
+#ifndef strstr
+  char *p = (char *) strstr;
 #endif
 
   ;
@@ -13378,29 +13258,520 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_c_const=yes
+  ac_cv_have_decl_strstr=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_c_const=no
+ac_cv_have_decl_strstr=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_strstr" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strstr" >&6
+if test $ac_cv_have_decl_strstr = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define const
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSTR 1
 _ACEOF
 
-fi
 
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSTR 0
+_ACEOF
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether getopt is declared" >&5
+echo $ECHO_N "checking whether getopt is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_getopt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+#ifndef getopt
+  char *p = (char *) getopt;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_have_decl_getopt=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_getopt=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getopt" >&6
+if test $ac_cv_have_decl_getopt = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETOPT 1
+_ACEOF
+
+
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETOPT 0
+_ACEOF
+
+
+fi
+
+
+
+# ----------------------- #
+# Checks for structures.  #
+# ----------------------- #
+
+echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
+echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
+if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_blocks)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_stat_st_blocks=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_blocks)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_stat_st_blocks=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_stat_st_blocks=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
+if test $ac_cv_member_struct_stat_st_blocks = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_BLOCKS 1
+_ACEOF
+
+
+fi
+
+echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
+echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
+if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_blksize)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_stat_st_blksize=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_blksize)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_stat_st_blksize=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_stat_st_blksize=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
+if test $ac_cv_member_struct_stat_st_blksize = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
+_ACEOF
+
+
+fi
+
+
+# ------------------ #
+# Checks for types.  #
+# ------------------ #
+
+echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
+if test "${ac_cv_type_signal+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+# undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+
+int
+main ()
+{
+int i;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_signal=void
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_signal=int
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+echo "${ECHO_T}$ac_cv_type_signal" >&6
+
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+
+# ------------------------------------- #
+# Checks for compiler characteristics.  #
+# ------------------------------------- #
+
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this.  */
+  typedef int charset[2];
+  const charset x;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *ccp;
+  char **p;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  ccp = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++ccp;
+  p = (char**) ccp;
+  ccp = (char const *const *) p;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; };
+    struct s *b; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+  }
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_const=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
@@ -14915,7 +15286,8 @@ fi
 done
 
 
-for ac_func in poll
+
+for ac_func in getuid getgid
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -15017,7 +15389,7 @@ fi
 done
 
 
-for ac_func in pread64
+for ac_func in poll
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -15119,7 +15491,7 @@ fi
 done
 
 
-for ac_func in sbrk
+for ac_func in pread64
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -15221,8 +15593,7 @@ fi
 done
 
 
-
-for ac_func in setpgid setpgrp
+for ac_func in sbrk
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -15325,8 +15696,7 @@ done
 
 
 
-
-for ac_func in sigaction sigprocmask sigsetmask
+for ac_func in setpgid setpgrp
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -15428,7 +15798,9 @@ fi
 done
 
 
-for ac_func in socketpair
+
+
+for ac_func in sigaction sigprocmask sigsetmask
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -15530,7 +15902,7 @@ fi
 done
 
 
-for ac_func in syscall
+for ac_func in socketpair
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -15632,7 +16004,7 @@ fi
 done
 
 
-for ac_func in ttrace
+for ac_func in syscall
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -15734,7 +16106,7 @@ fi
 done
 
 
-for ac_func in wborder
+for ac_func in ttrace
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
 done
 
 
-# Check the return and argument types of ptrace.  No canned test for
-# this, so roll our own.
-gdb_ptrace_headers='
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_PTRACE_H
-# include <sys/ptrace.h>
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-'
-# There is no point in checking if we don't have a prototype.
-for ac_func in ptrace
+for ac_func in wborder
 do
-  ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
-echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
-if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#undef $ac_tr_decl
-#define $ac_tr_decl 1
-  $gdb_ptrace_headers
-
-int
-main ()
-{
-#ifndef $ac_func
-char *(*pfn) = (char *(*)) $ac_func ;
-#endif
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "gcc_cv_have_decl_$ac_func=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "gcc_cv_have_decl_$ac_func=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
-#define $ac_tr_decl 1
-_ACEOF
-
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
-#define $ac_tr_decl 0
-_ACEOF
-
-  : ${gdb_cv_func_ptrace_ret='int'}
-  : ${gdb_cv_func_ptrace_args='int,int,long,long'}
-
-fi
-
-done
-if test x = y ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DECL_PTRACE 1
-_ACEOF
-fi
-
-# Check return type.
-echo "$as_me:$LINENO: checking return type of ptrace" >&5
-echo $ECHO_N "checking return type of ptrace... $ECHO_C" >&6
-if test "${gdb_cv_func_ptrace_ret+set}" = set; then
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -15947,134 +16222,54 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$gdb_ptrace_headers
-int
-main ()
-{
-extern int ptrace ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  gdb_cv_func_ptrace_ret='int'
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
-gdb_cv_func_ptrace_ret='long'
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_ret" >&5
-echo "${ECHO_T}$gdb_cv_func_ptrace_ret" >&6
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
-cat >>confdefs.h <<_ACEOF
-#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
-_ACEOF
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
-# Check argument types.
-echo "$as_me:$LINENO: checking types of arguments for ptrace" >&5
-echo $ECHO_N "checking types of arguments for ptrace... $ECHO_C" >&6
-if test "${gdb_cv_func_ptrace_args+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+#undef $ac_func
 
-for gdb_arg1 in 'int' 'long'; do
- for gdb_arg2 in 'pid_t' 'int' 'long'; do
-  for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long'; do
-   for gdb_arg4 in 'int' 'long'; do
-     cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$gdb_ptrace_headers
-int
-main ()
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
 {
-
-extern $gdb_cv_func_ptrace_ret
-  ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
-
-  ;
-  return 0;
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
 }
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
-    break 4;
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-    for gdb_arg5 in 'int *' 'int' 'long'; do
-     cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$gdb_ptrace_headers
+#endif
+
 int
 main ()
 {
-
-extern $gdb_cv_func_ptrace_ret
-  ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
-
+return f != $ac_func;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -16088,59 +16283,51 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
+        { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-
-gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
-    break 5;
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+eval "$as_ac_var=no"
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-    done
-   done
-  done
- done
-done
-# Provide a safe default value.
-: ${gdb_cv_func_ptrace_args='int,int,long,long'}
-
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_args" >&5
-echo "${ECHO_T}$gdb_cv_func_ptrace_args" >&6
-ac_save_IFS=$IFS; IFS=','
-set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
-IFS=$ac_save_IFS
-shift
-
-cat >>confdefs.h <<_ACEOF
-#define PTRACE_TYPE_ARG3 $3
-_ACEOF
-
-if test -n "$5"; then
-
-cat >>confdefs.h <<_ACEOF
-#define PTRACE_TYPE_ARG5 $5
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
+done
 
-if test "$cross_compiling" = no; then
-  echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
-echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
-if test "${ac_cv_func_setpgrp_void+set}" = set; then
+
+# Check the return and argument types of ptrace.  No canned test for
+# this, so roll our own.
+gdb_ptrace_headers='
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_PTRACE_H
+# include <sys/ptrace.h>
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+'
+# There is no point in checking if we don't have a prototype.
+echo "$as_me:$LINENO: checking whether ptrace is declared" >&5
+echo $ECHO_N "checking whether ptrace is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_ptrace+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
-echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -16148,58 +16335,75 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+$gdb_ptrace_headers
 
 int
 main ()
 {
-/* If this system has a BSD-style setpgrp which takes arguments,
-  setpgrp(1, 1) will fail with ESRCH and return -1, in that case
-  exit successfully. */
-  exit (setpgrp (1,1) == -1 ? 0 : 1);
+#ifndef ptrace
+  char *p = (char *) ptrace;
+#endif
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_func_setpgrp_void=no
+  ac_cv_have_decl_ptrace=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-ac_cv_func_setpgrp_void=yes
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ac_cv_have_decl_ptrace=no
 fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
-echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
-if test $ac_cv_func_setpgrp_void = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_ptrace" >&5
+echo "${ECHO_T}$ac_cv_have_decl_ptrace" >&6
+if test $ac_cv_have_decl_ptrace = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define SETPGRP_VOID 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PTRACE 1
 _ACEOF
 
-fi
 
 else
-  echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
-echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
-if test "${ac_cv_func_setpgrp_void+set}" = set; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PTRACE 0
+_ACEOF
+
+
+  : ${gdb_cv_func_ptrace_ret='int'}
+  : ${gdb_cv_func_ptrace_args='int,int,long,long'}
+
+fi
+
+
+# Check return type.
+echo "$as_me:$LINENO: checking return type of ptrace" >&5
+echo $ECHO_N "checking return type of ptrace... $ECHO_C" >&6
+if test "${gdb_cv_func_ptrace_ret+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -16208,18 +16412,11 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#include <unistd.h>
-
+$gdb_ptrace_headers
 int
 main ()
 {
-
-  if (setpgrp(1,1) == -1)
-    exit (0);
-  else
-    exit (1);
-
+extern int ptrace ();
   ;
   return 0;
 }
@@ -16246,45 +16443,47 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_func_setpgrp_void=no
+  gdb_cv_func_ptrace_ret='int'
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_func_setpgrp_void=yes
+gdb_cv_func_ptrace_ret='long'
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
-echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
-if test $ac_cv_func_setpgrp_void = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define SETPGRP_VOID 1
-_ACEOF
+echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_ret" >&5
+echo "${ECHO_T}$gdb_cv_func_ptrace_ret" >&6
 
-fi
-fi
+cat >>confdefs.h <<_ACEOF
+#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
+_ACEOF
 
-# Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
-# since sigsetjmp might only be defined as a macro.
-echo "$as_me:$LINENO: checking for sigsetjmp" >&5
-echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
-if test "${gdb_cv_func_sigsetjmp+set}" = set; then
+# Check argument types.
+echo "$as_me:$LINENO: checking types of arguments for ptrace" >&5
+echo $ECHO_N "checking types of arguments for ptrace... $ECHO_C" >&6
+if test "${gdb_cv_func_ptrace_args+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+
+for gdb_arg1 in 'int' 'long'; do
+ for gdb_arg2 in 'pid_t' 'int' 'long'; do
+  for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long'; do
+   for gdb_arg4 in 'int' 'long'; do
+     cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#include <setjmp.h>
-
+$gdb_ptrace_headers
 int
 main ()
 {
-sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
+
+extern $gdb_cv_func_ptrace_ret
+  ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
+
   ;
   return 0;
 }
@@ -16311,49 +16510,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_func_sigsetjmp=yes
+  gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
+    break 4;
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_func_sigsetjmp=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $gdb_cv_func_sigsetjmp" >&5
-echo "${ECHO_T}$gdb_cv_func_sigsetjmp" >&6
-if test $gdb_cv_func_sigsetjmp = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SIGSETJMP 1
-_ACEOF
-
-fi
-
-# Assume we'll default to using the included libiberty regex.
-gdb_use_included_regex=yes
-
-# However, if the system regex is GNU regex, then default to *not*
-# using the included regex.
-echo "$as_me:$LINENO: checking for GNU regex" >&5
-echo $ECHO_N "checking for GNU regex... $ECHO_C" >&6
-if test "${gdb_cv_have_gnu_regex+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+    for gdb_arg5 in 'int *' 'int' 'long'; do
+     cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <gnu-versions.h>
+$gdb_ptrace_headers
 int
 main ()
 {
-#define REGEX_INTERFACE_VERSION 1
-#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
-# error "Version mismatch"
-#endif
+
+extern $gdb_cv_func_ptrace_ret
+  ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
+
   ;
   return 0;
 }
@@ -16380,42 +16559,53 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_have_gnu_regex=yes
+
+gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
+    break 5;
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_have_gnu_regex=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+    done
+   done
+  done
+ done
+done
+# Provide a safe default value.
+: ${gdb_cv_func_ptrace_args='int,int,long,long'}
+
 fi
-echo "$as_me:$LINENO: result: $gdb_cv_have_gnu_regex" >&5
-echo "${ECHO_T}$gdb_cv_have_gnu_regex" >&6
-if test $gdb_cv_have_gnu_regex = yes; then
-  gdb_use_included_regex=no
-fi
+echo "$as_me:$LINENO: result: $gdb_cv_func_ptrace_args" >&5
+echo "${ECHO_T}$gdb_cv_func_ptrace_args" >&6
+ac_save_IFS=$IFS; IFS=','
+set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
+IFS=$ac_save_IFS
+shift
 
+cat >>confdefs.h <<_ACEOF
+#define PTRACE_TYPE_ARG3 $3
+_ACEOF
 
-# Check whether --with-included-regex or --without-included-regex was given.
-if test "${with_included_regex+set}" = set; then
-  withval="$with_included_regex"
-  gdb_with_regex=$withval
-else
-  gdb_with_regex=$gdb_use_included_regex
-fi;
-if test "$gdb_with_regex" = yes; then
+if test -n "$5"; then
 
-cat >>confdefs.h <<\_ACEOF
-#define USE_INCLUDED_REGEX 1
+cat >>confdefs.h <<_ACEOF
+#define PTRACE_TYPE_ARG5 $5
 _ACEOF
 
 fi
 
-# See if <sys/proc.h> defines `struct thread' with a td_pcb member.
-echo "$as_me:$LINENO: checking for td_pcb in struct thread" >&5
-echo $ECHO_N "checking for td_pcb in struct thread... $ECHO_C" >&6
-if test "${gdb_cv_struct_thread_td_pcb+set}" = set; then
+if test "$cross_compiling" = no; then
+  echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
+echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
+if test "${ac_cv_func_setpgrp_void+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
+echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -16423,61 +16613,58 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/param.h>
-#include <sys/proc.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
 int
 main ()
 {
-struct thread td; td.td_pcb;
+/* If this system has a BSD-style setpgrp which takes arguments,
+  setpgrp(1, 1) will fail with ESRCH and return -1, in that case
+  exit successfully. */
+  exit (setpgrp (1,1) == -1 ? 0 : 1);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag"
-                        || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_struct_thread_td_pcb=yes
+  ac_cv_func_setpgrp_void=no
 else
-  echo "$as_me: failed program was:" >&5
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_struct_thread_td_pcb=no
+( exit $ac_status )
+ac_cv_func_setpgrp_void=yes
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gdb_cv_struct_thread_td_pcb" >&5
-echo "${ECHO_T}$gdb_cv_struct_thread_td_pcb" >&6
-if test $gdb_cv_struct_thread_td_pcb = yes; then
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
+echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
+if test $ac_cv_func_setpgrp_void = yes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_THREAD_TD_PCB 1
+#define SETPGRP_VOID 1
 _ACEOF
 
 fi
 
-# See if <sys/lwp.h> defines `struct lwp`.
-echo "$as_me:$LINENO: checking for struct lwp" >&5
-echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6
-if test "${gdb_cv_struct_lwp+set}" = set; then
+else
+  echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
+echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
+if test "${ac_cv_func_setpgrp_void+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -16486,12 +16673,18 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/param.h>
-#include <sys/lwp.h>
+
+#include <unistd.h>
+
 int
 main ()
 {
-struct lwp l;
+
+  if (setpgrp(1,1) == -1)
+    exit (0);
+  else
+    exit (1);
+
   ;
   return 0;
 }
@@ -16518,29 +16711,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_struct_lwp=yes
+  ac_cv_func_setpgrp_void=no
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_struct_lwp=no
+ac_cv_func_setpgrp_void=yes
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gdb_cv_struct_lwp" >&5
-echo "${ECHO_T}$gdb_cv_struct_lwp" >&6
-if test $gdb_cv_struct_lwp = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_LWP 1
+echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
+echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
+if test $ac_cv_func_setpgrp_void = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define SETPGRP_VOID 1
 _ACEOF
 
+fi
 fi
 
-# See if <machine/reg.h> degines `struct reg'.
-echo "$as_me:$LINENO: checking for struct reg in machine/reg.h" >&5
-echo $ECHO_N "checking for struct reg in machine/reg.h... $ECHO_C" >&6
-if test "${gdb_cv_struct_reg+set}" = set; then
+# Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
+# since sigsetjmp might only be defined as a macro.
+echo "$as_me:$LINENO: checking for sigsetjmp" >&5
+echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
+if test "${gdb_cv_func_sigsetjmp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -16549,12 +16743,13 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <machine/reg.h>
+
+#include <setjmp.h>
+
 int
 main ()
 {
-struct reg r;
+sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
   ;
   return 0;
 }
@@ -16581,30 +16776,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_struct_reg=yes
+  gdb_cv_func_sigsetjmp=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_struct_reg=no
+gdb_cv_func_sigsetjmp=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gdb_cv_struct_reg" >&5
-echo "${ECHO_T}$gdb_cv_struct_reg" >&6
-if test $gdb_cv_struct_reg = yes; then
+echo "$as_me:$LINENO: result: $gdb_cv_func_sigsetjmp" >&5
+echo "${ECHO_T}$gdb_cv_func_sigsetjmp" >&6
+if test $gdb_cv_func_sigsetjmp = yes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_REG 1
+#define HAVE_SIGSETJMP 1
 _ACEOF
 
 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'.
-echo "$as_me:$LINENO: checking for r_fs in struct reg" >&5
-echo $ECHO_N "checking for r_fs in struct reg... $ECHO_C" >&6
-if test "${gdb_cv_struct_reg_r_fs+set}" = set; then
+# Assume we'll default to using the included libiberty regex.
+gdb_use_included_regex=yes
+
+# However, if the system regex is GNU regex, then default to *not*
+# using the included regex.
+echo "$as_me:$LINENO: checking for GNU regex" >&5
+echo $ECHO_N "checking for GNU regex... $ECHO_C" >&6
+if test "${gdb_cv_have_gnu_regex+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -16613,11 +16811,14 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <machine/reg.h>
+#include <gnu-versions.h>
 int
 main ()
 {
-struct reg r; r.r_fs;
+#define REGEX_INTERFACE_VERSION 1
+#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
+# error "Version mismatch"
+#endif
   ;
   return 0;
 }
@@ -16644,26 +16845,41 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_struct_reg_r_fs=yes
+  gdb_cv_have_gnu_regex=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_struct_reg_r_fs=no
+gdb_cv_have_gnu_regex=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gdb_cv_struct_reg_r_fs" >&5
-echo "${ECHO_T}$gdb_cv_struct_reg_r_fs" >&6
-if test $gdb_cv_struct_reg_r_fs = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_REG_R_FS 1
+echo "$as_me:$LINENO: result: $gdb_cv_have_gnu_regex" >&5
+echo "${ECHO_T}$gdb_cv_have_gnu_regex" >&6
+if test $gdb_cv_have_gnu_regex = yes; then
+  gdb_use_included_regex=no
+fi
+
+
+# Check whether --with-included-regex or --without-included-regex was given.
+if test "${with_included_regex+set}" = set; then
+  withval="$with_included_regex"
+  gdb_with_regex=$withval
+else
+  gdb_with_regex=$gdb_use_included_regex
+fi;
+if test "$gdb_with_regex" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_INCLUDED_REGEX 1
 _ACEOF
 
 fi
-echo "$as_me:$LINENO: checking for r_gs in struct reg" >&5
-echo $ECHO_N "checking for r_gs in struct reg... $ECHO_C" >&6
-if test "${gdb_cv_struct_reg_r_gs+set}" = set; then
+
+# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
+echo "$as_me:$LINENO: checking for struct thread.td_pcb" >&5
+echo $ECHO_N "checking for struct thread.td_pcb... $ECHO_C" >&6
+if test "${ac_cv_member_struct_thread_td_pcb+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -16672,11 +16888,16 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <machine/reg.h>
+#include <sys/param.h>
+#include <sys/proc.h>
+
+
 int
 main ()
 {
-struct reg r; r.r_gs;
+static struct thread ac_aggr;
+if (ac_aggr.td_pcb)
+return 0;
   ;
   return 0;
 }
@@ -16703,41 +16924,27 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_struct_reg_r_gs=yes
+  ac_cv_member_struct_thread_td_pcb=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_struct_reg_r_gs=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $gdb_cv_struct_reg_r_gs" >&5
-echo "${ECHO_T}$gdb_cv_struct_reg_r_gs" >&6
-if test $gdb_cv_struct_reg_r_gs = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRUCT_REG_R_GS 1
-_ACEOF
-
-fi
-
-# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
-echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
-echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6
-if test "${gdb_cv_have_ptrace_getregs+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/ptrace.h>
+#include <sys/param.h>
+#include <sys/proc.h>
+
+
 int
 main ()
 {
-PTRACE_GETREGS;
+static struct thread ac_aggr;
+if (sizeof ac_aggr.td_pcb)
+return 0;
   ;
   return 0;
 }
@@ -16764,29 +16971,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_have_ptrace_getregs=yes
+  ac_cv_member_struct_thread_td_pcb=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_have_ptrace_getregs=no
+ac_cv_member_struct_thread_td_pcb=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_thread_td_pcb" >&5
+echo "${ECHO_T}$ac_cv_member_struct_thread_td_pcb" >&6
+if test $ac_cv_member_struct_thread_td_pcb = yes; then
 
-echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getregs" >&5
-echo "${ECHO_T}$gdb_cv_have_ptrace_getregs" >&6
-if test $gdb_cv_have_ptrace_getregs = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_PTRACE_GETREGS 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_THREAD_TD_PCB 1
 _ACEOF
 
+
 fi
 
-# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
-echo "$as_me:$LINENO: checking for PTRACE_GETFPXREGS" >&5
-echo $ECHO_N "checking for PTRACE_GETFPXREGS... $ECHO_C" >&6
-if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then
+
+# See if <sys/lwp.h> defines `struct lwp`.
+echo "$as_me:$LINENO: checking for struct lwp" >&5
+echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6
+if test "${gdb_cv_struct_lwp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -16795,11 +17006,12 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/ptrace.h>
+#include <sys/param.h>
+#include <sys/lwp.h>
 int
 main ()
 {
-PTRACE_GETFPXREGS;
+struct lwp l;
   ;
   return 0;
 }
@@ -16826,29 +17038,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_have_ptrace_getfpxregs=yes
+  gdb_cv_struct_lwp=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_have_ptrace_getfpxregs=no
+gdb_cv_struct_lwp=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+echo "$as_me:$LINENO: result: $gdb_cv_struct_lwp" >&5
+echo "${ECHO_T}$gdb_cv_struct_lwp" >&6
+if test $gdb_cv_struct_lwp = yes; then
 
-echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getfpxregs" >&5
-echo "${ECHO_T}$gdb_cv_have_ptrace_getfpxregs" >&6
-if test $gdb_cv_have_ptrace_getfpxregs = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_PTRACE_GETFPXREGS 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_LWP 1
 _ACEOF
 
 fi
 
-# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
-echo "$as_me:$LINENO: checking for PT_GETDBREGS" >&5
-echo $ECHO_N "checking for PT_GETDBREGS... $ECHO_C" >&6
-if test "${gdb_cv_have_pt_getdbregs+set}" = set; then
+# See if <machine/reg.h> degines `struct reg'.
+echo "$as_me:$LINENO: checking for struct reg in machine/reg.h" >&5
+echo $ECHO_N "checking for struct reg in machine/reg.h... $ECHO_C" >&6
+if test "${gdb_cv_struct_reg+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -16858,11 +17070,11 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <sys/types.h>
-#include <sys/ptrace.h>
+#include <machine/reg.h>
 int
 main ()
 {
-PT_GETDBREGS;
+struct reg r;
   ;
   return 0;
 }
@@ -16889,29 +17101,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_have_pt_getdbregs=yes
+  gdb_cv_struct_reg=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_have_pt_getdbregs=no
+gdb_cv_struct_reg=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+echo "$as_me:$LINENO: result: $gdb_cv_struct_reg" >&5
+echo "${ECHO_T}$gdb_cv_struct_reg" >&6
+if test $gdb_cv_struct_reg = yes; then
 
-echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getdbregs" >&5
-echo "${ECHO_T}$gdb_cv_have_pt_getdbregs" >&6
-if test $gdb_cv_have_pt_getdbregs = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_PT_GETDBREGS 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_REG 1
 _ACEOF
 
 fi
 
-# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
-echo "$as_me:$LINENO: checking for PT_GETXMMREGS" >&5
-echo $ECHO_N "checking for PT_GETXMMREGS... $ECHO_C" >&6
-if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then
+# 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'.
+echo "$as_me:$LINENO: checking for struct reg.r_fs" >&5
+echo $ECHO_N "checking for struct reg.r_fs... $ECHO_C" >&6
+if test "${ac_cv_member_struct_reg_r_fs+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -16920,12 +17133,14 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/ptrace.h>
+#include <machine/reg.h>
+
 int
 main ()
 {
-PT_GETXMMREGS;
+static struct reg ac_aggr;
+if (ac_aggr.r_fs)
+return 0;
   ;
   return 0;
 }
@@ -16952,43 +17167,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_have_pt_getxmmregs=yes
+  ac_cv_member_struct_reg_r_fs=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_have_pt_getxmmregs=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getxmmregs" >&5
-echo "${ECHO_T}$gdb_cv_have_pt_getxmmregs" >&6
-if test $gdb_cv_have_pt_getxmmregs = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_PT_GETXMMREGS 1
-_ACEOF
-
-fi
-
-# See if stdint.h provides the uintptr_t type.
-# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
-echo "$as_me:$LINENO: checking for uintptr_t in stdint.h" >&5
-echo $ECHO_N "checking for uintptr_t in stdint.h... $ECHO_C" >&6
-if test "${gdb_cv_have_uintptr_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <stdint.h>
+#include <machine/reg.h>
+
 int
 main ()
 {
-uintptr_t foo = 0;
+static struct reg ac_aggr;
+if (sizeof ac_aggr.r_fs)
+return 0;
   ;
   return 0;
 }
@@ -17015,28 +17212,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_have_uintptr_t=yes
+  ac_cv_member_struct_reg_r_fs=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_have_uintptr_t=no
+ac_cv_member_struct_reg_r_fs=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gdb_cv_have_uintptr_t" >&5
-echo "${ECHO_T}$gdb_cv_have_uintptr_t" >&6
-if test $gdb_cv_have_uintptr_t = yes; then
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_fs" >&5
+echo "${ECHO_T}$ac_cv_member_struct_reg_r_fs" >&6
+if test $ac_cv_member_struct_reg_r_fs = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_UINTPTR_T 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_REG_R_FS 1
 _ACEOF
 
-fi
 
-echo "$as_me:$LINENO: checking whether malloc must be declared" >&5
-echo $ECHO_N "checking whether malloc must be declared... $ECHO_C" >&6
-if test "${bfd_cv_decl_needed_malloc+set}" = set; then
+fi
+echo "$as_me:$LINENO: checking for struct reg.r_gs" >&5
+echo $ECHO_N "checking for struct reg.r_gs... $ECHO_C" >&6
+if test "${ac_cv_member_struct_reg_r_gs+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -17045,25 +17244,14 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <machine/reg.h>
 
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 int
 main ()
 {
-char *(*pfn) = (char *(*)) malloc
+static struct reg ac_aggr;
+if (ac_aggr.r_gs)
+return 0;
   ;
   return 0;
 }
@@ -17090,56 +17278,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  bfd_cv_decl_needed_malloc=no
+  ac_cv_member_struct_reg_r_gs=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-bfd_cv_decl_needed_malloc=yes
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_malloc" >&5
-echo "${ECHO_T}$bfd_cv_decl_needed_malloc" >&6
-if test $bfd_cv_decl_needed_malloc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_MALLOC 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking whether realloc must be declared" >&5
-echo $ECHO_N "checking whether realloc must be declared... $ECHO_C" >&6
-if test "${bfd_cv_decl_needed_realloc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <machine/reg.h>
 
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
 int
 main ()
 {
-char *(*pfn) = (char *(*)) realloc
+static struct reg ac_aggr;
+if (sizeof ac_aggr.r_gs)
+return 0;
   ;
   return 0;
 }
@@ -17166,29 +17323,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  bfd_cv_decl_needed_realloc=no
+  ac_cv_member_struct_reg_r_gs=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-bfd_cv_decl_needed_realloc=yes
+ac_cv_member_struct_reg_r_gs=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_gs" >&5
+echo "${ECHO_T}$ac_cv_member_struct_reg_r_gs" >&6
+if test $ac_cv_member_struct_reg_r_gs = yes; then
 
-echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_realloc" >&5
-echo "${ECHO_T}$bfd_cv_decl_needed_realloc" >&6
-if test $bfd_cv_decl_needed_realloc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_REALLOC 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_REG_R_GS 1
 _ACEOF
 
+
 fi
 
-echo "$as_me:$LINENO: checking whether free must be declared" >&5
-echo $ECHO_N "checking whether free must be declared... $ECHO_C" >&6
-if test "${bfd_cv_decl_needed_free+set}" = set; then
+
+# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
+echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
+echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6
+if test "${gdb_cv_have_ptrace_getregs+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -17197,25 +17358,11 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include <sys/ptrace.h>
 int
 main ()
 {
-char *(*pfn) = (char *(*)) free
+PTRACE_GETREGS;
   ;
   return 0;
 }
@@ -17242,29 +17389,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  bfd_cv_decl_needed_free=no
+  gdb_cv_have_ptrace_getregs=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-bfd_cv_decl_needed_free=yes
+gdb_cv_have_ptrace_getregs=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_free" >&5
-echo "${ECHO_T}$bfd_cv_decl_needed_free" >&6
-if test $bfd_cv_decl_needed_free = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_FREE 1
+echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getregs" >&5
+echo "${ECHO_T}$gdb_cv_have_ptrace_getregs" >&6
+if test $gdb_cv_have_ptrace_getregs = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTRACE_GETREGS 1
 _ACEOF
 
 fi
 
-echo "$as_me:$LINENO: checking whether strerror must be declared" >&5
-echo $ECHO_N "checking whether strerror must be declared... $ECHO_C" >&6
-if test "${bfd_cv_decl_needed_strerror+set}" = set; then
+# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
+echo "$as_me:$LINENO: checking for PTRACE_GETFPXREGS" >&5
+echo $ECHO_N "checking for PTRACE_GETFPXREGS... $ECHO_C" >&6
+if test "${gdb_cv_have_ptrace_getfpxregs+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -17273,25 +17420,11 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include <sys/ptrace.h>
 int
 main ()
 {
-char *(*pfn) = (char *(*)) strerror
+PTRACE_GETFPXREGS;
   ;
   return 0;
 }
@@ -17318,29 +17451,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  bfd_cv_decl_needed_strerror=no
+  gdb_cv_have_ptrace_getfpxregs=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-bfd_cv_decl_needed_strerror=yes
+gdb_cv_have_ptrace_getfpxregs=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_strerror" >&5
-echo "${ECHO_T}$bfd_cv_decl_needed_strerror" >&6
-if test $bfd_cv_decl_needed_strerror = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_STRERROR 1
+echo "$as_me:$LINENO: result: $gdb_cv_have_ptrace_getfpxregs" >&5
+echo "${ECHO_T}$gdb_cv_have_ptrace_getfpxregs" >&6
+if test $gdb_cv_have_ptrace_getfpxregs = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTRACE_GETFPXREGS 1
 _ACEOF
 
 fi
 
-echo "$as_me:$LINENO: checking whether strdup must be declared" >&5
-echo $ECHO_N "checking whether strdup must be declared... $ECHO_C" >&6
-if test "${bfd_cv_decl_needed_strdup+set}" = set; then
+# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
+echo "$as_me:$LINENO: checking for PT_GETDBREGS" >&5
+echo $ECHO_N "checking for PT_GETDBREGS... $ECHO_C" >&6
+if test "${gdb_cv_have_pt_getdbregs+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -17349,25 +17482,12 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include <sys/types.h>
+#include <sys/ptrace.h>
 int
 main ()
 {
-char *(*pfn) = (char *(*)) strdup
+PT_GETDBREGS;
   ;
   return 0;
 }
@@ -17394,29 +17514,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  bfd_cv_decl_needed_strdup=no
+  gdb_cv_have_pt_getdbregs=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-bfd_cv_decl_needed_strdup=yes
+gdb_cv_have_pt_getdbregs=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_strdup" >&5
-echo "${ECHO_T}$bfd_cv_decl_needed_strdup" >&6
-if test $bfd_cv_decl_needed_strdup = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_STRDUP 1
+echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getdbregs" >&5
+echo "${ECHO_T}$gdb_cv_have_pt_getdbregs" >&6
+if test $gdb_cv_have_pt_getdbregs = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_PT_GETDBREGS 1
 _ACEOF
 
 fi
 
-echo "$as_me:$LINENO: checking whether strstr must be declared" >&5
-echo $ECHO_N "checking whether strstr must be declared... $ECHO_C" >&6
-if test "${bfd_cv_decl_needed_strstr+set}" = set; then
+# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
+echo "$as_me:$LINENO: checking for PT_GETXMMREGS" >&5
+echo $ECHO_N "checking for PT_GETXMMREGS... $ECHO_C" >&6
+if test "${gdb_cv_have_pt_getxmmregs+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -17425,25 +17545,12 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include <sys/types.h>
+#include <sys/ptrace.h>
 int
 main ()
 {
-char *(*pfn) = (char *(*)) strstr
+PT_GETXMMREGS;
   ;
   return 0;
 }
@@ -17470,29 +17577,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  bfd_cv_decl_needed_strstr=no
+  gdb_cv_have_pt_getxmmregs=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-bfd_cv_decl_needed_strstr=yes
+gdb_cv_have_pt_getxmmregs=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_strstr" >&5
-echo "${ECHO_T}$bfd_cv_decl_needed_strstr" >&6
-if test $bfd_cv_decl_needed_strstr = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_STRSTR 1
+echo "$as_me:$LINENO: result: $gdb_cv_have_pt_getxmmregs" >&5
+echo "${ECHO_T}$gdb_cv_have_pt_getxmmregs" >&6
+if test $gdb_cv_have_pt_getxmmregs = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_PT_GETXMMREGS 1
 _ACEOF
 
 fi
 
-echo "$as_me:$LINENO: checking whether canonicalize_file_name must be declared" >&5
-echo $ECHO_N "checking whether canonicalize_file_name must be declared... $ECHO_C" >&6
-if test "${bfd_cv_decl_needed_canonicalize_file_name+set}" = set; then
+# See if stdint.h provides the uintptr_t type.
+# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
+echo "$as_me:$LINENO: checking for uintptr_t in stdint.h" >&5
+echo $ECHO_N "checking for uintptr_t in stdint.h... $ECHO_C" >&6
+if test "${gdb_cv_have_uintptr_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -17501,25 +17609,11 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include <stdint.h>
 int
 main ()
 {
-char *(*pfn) = (char *(*)) canonicalize_file_name
+uintptr_t foo = 0;
   ;
   return 0;
 }
@@ -17546,27 +17640,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  bfd_cv_decl_needed_canonicalize_file_name=no
+  gdb_cv_have_uintptr_t=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-bfd_cv_decl_needed_canonicalize_file_name=yes
+gdb_cv_have_uintptr_t=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
-echo "$as_me:$LINENO: result: $bfd_cv_decl_needed_canonicalize_file_name" >&5
-echo "${ECHO_T}$bfd_cv_decl_needed_canonicalize_file_name" >&6
-if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
+echo "$as_me:$LINENO: result: $gdb_cv_have_uintptr_t" >&5
+echo "${ECHO_T}$gdb_cv_have_uintptr_t" >&6
+if test $gdb_cv_have_uintptr_t = yes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
+#define HAVE_UINTPTR_T 1
 _ACEOF
 
 fi
 
-
 # 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.
@@ -17583,12 +17675,6 @@ _ACEOF
 _ACEOF
 
        ;;
-  ia64-*-aix*)
-      cat >>confdefs.h <<\_ACEOF
-#define NEW_PROC_API 1
-_ACEOF
-
-      ;;
   *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
       cat >>confdefs.h <<\_ACEOF
 #define NEW_PROC_API 1
@@ -19782,8 +19868,21 @@ fi;
 # NOTE: If you add to this list, remember to update
 # gdb/doc/gdbint.texinfo.
 build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
--Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
+-Wformat -Wparentheses -Wpointer-arith -Wformat-nonliteral \
 -Wunused-label -Wunused-function"
+
+# GCC supports -Wuninitialized only with -O or -On, n != 0.
+if test x${CFLAGS+set} = xset; then
+  case "${CFLAGS}" in
+    *"-O0"* ) ;;
+    *"-O"* )
+      build_warnings="${build_warnings} -Wuninitialized"
+    ;;
+  esac
+else
+  build_warnings="${build_warnings} -Wuninitialized"
+fi
+
 # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
 # -Wunused-function -Wunused-variable -Wunused-value
 # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
@@ -19917,10 +20016,11 @@ echo "$as_me:$LINENO: result: $gdb_cv_os_cygwin" >&5
 echo "${ECHO_T}$gdb_cv_os_cygwin" >&6
 
 
-SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
+SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
 case ${host} in
   *go32* ) SER_HARDWIRE=ser-go32.o ;;
   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
+  *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o" ;;
 esac
 
 
@@ -19934,6 +20034,18 @@ if test x$gdb_cv_os_cygwin = xyes; then
     esac
 fi
 
+# The ser-tcp.c module requires sockets.
+case ${host} in
+  *mingw32*)
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_WIN32API 1
+_ACEOF
+
+    WIN32LIBS="$WIN32LIBS -lws2_32"
+    ;;
+esac
+
 
 LIBGUI="../libgui/src/libgui.a"
 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
            fi
 
            ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
-          # Tcl/Tk 8.1 require -fwritable strings.  I don't
-           # know whether 8.2 will or not, but I bet it will.
-           # I don't have to worry about 7.x since we don't support it.
-           GDBTK_CFLAGS=""
-          if test "$GCC" = "yes"; then
-               if test "$TCL_VERSION" != "8.0" ; then
-                   GDBTK_CFLAGS="-fwritable-strings"
-              fi
-           fi
 
           # Include some libraries that Tcl and Tk want.
           TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
@@ -22408,9 +22511,9 @@ s,@target@,$target,;t t
 s,@target_cpu@,$target_cpu,;t t
 s,@target_vendor@,$target_vendor,;t t
 s,@target_os@,$target_os,;t t
+s,@SET_MAKE@,$SET_MAKE,;t t
 s,@RANLIB@,$RANLIB,;t t
 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
 s,@ALLOCA@,$ALLOCA,;t t
 s,@USE_NLS@,$USE_NLS,;t t
 s,@MSGFMT@,$MSGFMT,;t t
This page took 0.062194 seconds and 4 git commands to generate.