* configure.in: Check for ncurses/term.h.
[deliverable/binutils-gdb.git] / gdb / configure
index 0ddc959f203c4115f88a1f2d79df78d8a5b45947..2a492b307513ae32af7bbba4a5ffae9d71854f4c 100755 (executable)
@@ -19,29 +19,29 @@ ac_help="$ac_help
 ac_help="$ac_help
   --with-included-gettext use the GNU gettext library included here"
 ac_help="$ac_help
-  --enable-multi-ice            Build the multi-ice-gdb-server"
+  --with-separate-debug-dir=path   Look for global separate debug info in this path [LIBDIR/debug]"
 ac_help="$ac_help
-  --enable-gdbcli            Enable GDB-CLI interface"
+  --disable-gdbcli        disable command-line interface (CLI)"
 ac_help="$ac_help
-  --enable-gdbmi            Enable GDB-MI interface"
+  --disable-gdbmi         disable machine-interface (MI)"
 ac_help="$ac_help
-  --with-uiout          Use new uiout functions instead of *printf's"
+  --enable-tui            enable full-screen terminal user interface (TUI)"
 ac_help="$ac_help
-  --enable-tui            Enable full-screen terminal user interface"
+  --enable-gdbtk          enable gdbtk graphical user interface (GUI)"
 ac_help="$ac_help
-  --enable-netrom         Enable NetROM support"
+  --with-libunwind            Use libunwind frame unwinding support"
 ac_help="$ac_help
-  --enable-build-warnings Enable build-time compiler warnings if gcc is used"
-ac_help="$ac_help
-  --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
+  --enable-profiling      enable profiling of GDB"
 ac_help="$ac_help
-  --with-mmalloc          Use memory mapped malloc package"
+  --without-included-regex don't use included regex; this is the default
+                          on systems with version 2 of the GNU C library
+                          (use with caution on other system)"
 ac_help="$ac_help
-  --with-included-regex          Use included regex"
+  --with-sysroot[=DIR] Search for usr/lib et al within DIR."
 ac_help="$ac_help
-  --with-cpu=CPU          Set the default CPU variant to debug"
+  --enable-build-warnings Enable build-time compiler warnings if gcc is used"
 ac_help="$ac_help
-  --enable-gdbtk          Enable GDBTK GUI front end"
+  --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
 ac_help="$ac_help
   --with-tclconfig=DIR    Directory containing tcl configuration (tclConfig.sh)"
 ac_help="$ac_help
@@ -59,7 +59,7 @@ ac_help="$ac_help
 ac_help="$ac_help
   --enable-sim            Link gdb with simulator"
 ac_help="$ac_help
-  --enable-shared         Use shared libraries"
+  --enable-multi-ice      build the multi-ice-gdb-server"
 ac_help="$ac_help
   --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib"
 
@@ -79,7 +79,6 @@ program_suffix=NONE
 program_transform_name=s,x,x,
 silent=
 site=
-sitefile=
 srcdir=
 target=NONE
 verbose=
@@ -194,7 +193,6 @@ Configuration:
   --help                  print this message
   --no-create             do not create output files
   --quiet, --silent       do not print \`checking...' messages
-  --site-file=FILE        use FILE as the site file
   --version               print the version of autoconf that created configure
 Directory and file names:
   --prefix=PREFIX         install architecture-independent files in PREFIX
@@ -365,11 +363,6 @@ EOF
   -site=* | --site=* | --sit=*)
     site="$ac_optarg" ;;
 
-  -site-file | --site-file | --site-fil | --site-fi | --site-f)
-    ac_prev=sitefile ;;
-  -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
-    sitefile="$ac_optarg" ;;
-
   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     ac_prev=srcdir ;;
   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -535,16 +528,12 @@ fi
 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
 
 # Prefer explicitly selected file to automatically selected ones.
-if test -z "$sitefile"; then
-  if test -z "$CONFIG_SITE"; then
-    if test "x$prefix" != xNONE; then
-      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-    else
-      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-    fi
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
   fi
-else
-  CONFIG_SITE="$sitefile"
 fi
 for ac_site_file in $CONFIG_SITE; do
   if test -r "$ac_site_file"; then
@@ -585,7 +574,7 @@ fi
 
 
 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:578: checking whether to enable maintainer-specific portions of Makefiles" >&5
     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
 if test "${enable_maintainer_mode+set}" = set; then
   enableval="$enable_maintainer_mode"
@@ -611,7 +600,7 @@ fi
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:615: checking for $ac_word" >&5
+echo "configure:604: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -641,7 +630,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:645: checking for $ac_word" >&5
+echo "configure:634: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -692,7 +681,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:696: checking for $ac_word" >&5
+echo "configure:685: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -724,7 +713,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -735,12 +724,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 739 "configure"
+#line 728 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -766,12 +755,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:775: checking whether we are using GNU C" >&5
+echo "configure:764: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -780,7 +769,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -799,7 +788,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:792: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -830,8 +819,13 @@ else
   fi
 fi
 
+cat >> confdefs.h <<\EOF
+#define _GNU_SOURCE 1
+EOF
+
+
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:835: checking how to run the C preprocessor" >&5
+echo "configure:829: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -846,13 +840,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 850 "configure"
+#line 844 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -863,13 +857,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 867 "configure"
+#line 861 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -880,13 +874,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 884 "configure"
+#line 878 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -911,9 +905,9 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:915: checking for AIX" >&5
+echo "configure:909: checking for AIX" >&5
 cat > conftest.$ac_ext <<EOF
-#line 917 "configure"
+#line 911 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -935,7 +929,7 @@ rm -f conftest*
 
 
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:939: checking for POSIXized ISC" >&5
+echo "configure:933: checking for POSIXized ISC" >&5
 if test -d /etc/conf/kconfig.d &&
   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
 then
@@ -959,7 +953,7 @@ fi
 
 
 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:963: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:957: checking for ${CC-cc} option to accept ANSI C" >&5
 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -976,7 +970,7 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO
 do
   CC="$ac_save_CC $ac_arg"
   cat > conftest.$ac_ext <<EOF
-#line 980 "configure"
+#line 974 "configure"
 #include "confdefs.h"
 #include <stdarg.h>
 #include <stdio.h>
@@ -1013,7 +1007,7 @@ return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
 
 ; return 0; }
 EOF
-if { (eval echo configure:1017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_prog_cc_stdc="$ac_arg"; break
 else
@@ -1084,7 +1078,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1088: checking host system type" >&5
+echo "configure:1082: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1105,7 +1099,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1109: checking target system type" >&5
+echo "configure:1103: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -1123,7 +1117,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1127: checking build system type" >&5
+echo "configure:1121: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1150,7 +1144,7 @@ test "$host_alias" != "$target_alias" &&
 # 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
+# AC_PROG_RANLIB.  This can be removed when we switch to Autoconf
 # 2.5x.
 if test $host != $build; then
   ac_tool_prefix=${host_alias}-
@@ -1161,7 +1155,7 @@ fi
 # 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1165: checking for $ac_word" >&5
+echo "configure:1159: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1193,7 +1187,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1197: checking for $ac_word" >&5
+echo "configure:1191: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1226,9 +1220,20 @@ fi
 fi
 
 
-ALL_LINGUAS=
+
+CONFIG_OBS=
+CONFIG_DEPS=
+CONFIG_SRCS=
+ENABLE_CFLAGS=
+
+CONFIG_ALL=
+CONFIG_CLEAN=
+CONFIG_INSTALL=
+CONFIG_UNINSTALL=
+
+
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1232: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1257,7 +1262,7 @@ fi
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1261: checking for $ac_word" >&5
+echo "configure:1266: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1285,12 +1290,12 @@ else
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1289: checking for ANSI C header files" >&5
+echo "configure:1294: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1294 "configure"
+#line 1299 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1298,7 +1303,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1315,7 +1320,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1319 "configure"
+#line 1324 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1333,7 +1338,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1337 "configure"
+#line 1342 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1354,7 +1359,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1358 "configure"
+#line 1363 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1365,7 +1370,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1389,12 +1394,12 @@ EOF
 fi
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1393: checking for working const" >&5
+echo "configure:1398: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1398 "configure"
+#line 1403 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1443,7 +1448,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:1447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -1464,21 +1469,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1468: checking for inline" >&5
+echo "configure:1473: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 1475 "configure"
+#line 1480 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:1482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -1504,12 +1509,12 @@ EOF
 esac
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1508: checking for off_t" >&5
+echo "configure:1513: checking for off_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1513 "configure"
+#line 1518 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1537,12 +1542,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1541: checking for size_t" >&5
+echo "configure:1546: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1546 "configure"
+#line 1551 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -1572,19 +1577,19 @@ fi
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1576: checking for working alloca.h" >&5
+echo "configure:1581: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1581 "configure"
+#line 1586 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -1605,12 +1610,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1609: checking for alloca" >&5
+echo "configure:1614: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1614 "configure"
+#line 1619 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -1638,7 +1643,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -1670,12 +1675,12 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1674: checking whether alloca needs Cray hooks" >&5
+echo "configure:1679: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1679 "configure"
+#line 1684 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1700,12 +1705,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1704: checking for $ac_func" >&5
+echo "configure:1709: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1709 "configure"
+#line 1714 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1728,7 +1733,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1755,7 +1760,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1759: checking stack direction for C alloca" >&5
+echo "configure:1764: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1763,7 +1768,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1767 "configure"
+#line 1772 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1782,7 +1787,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
@@ -1807,17 +1812,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1811: checking for $ac_hdr" >&5
+echo "configure:1816: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1816 "configure"
+#line 1821 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1846,12 +1851,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1850: checking for $ac_func" >&5
+echo "configure:1855: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1855 "configure"
+#line 1860 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1874,7 +1879,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1899,7 +1904,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:1903: checking for working mmap" >&5
+echo "configure:1908: checking for working mmap" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1907,7 +1912,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 1911 "configure"
+#line 1916 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2047,7 +2052,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -2075,17 +2080,17 @@ unistd.h values.h sys/param.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2079: checking for $ac_hdr" >&5
+echo "configure:2084: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2084 "configure"
+#line 2089 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2115,12 +2120,12 @@ done
 __argz_count __argz_stringify __argz_next
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2119: checking for $ac_func" >&5
+echo "configure:2124: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2124 "configure"
+#line 2129 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2143,7 +2148,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2172,12 +2177,12 @@ done
      for ac_func in stpcpy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2176: checking for $ac_func" >&5
+echo "configure:2181: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2181 "configure"
+#line 2186 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2200,7 +2205,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2234,19 +2239,19 @@ EOF
 
    if test $ac_cv_header_locale_h = yes; then
     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:2238: checking for LC_MESSAGES" >&5
+echo "configure:2243: checking for LC_MESSAGES" >&5
 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2243 "configure"
+#line 2248 "configure"
 #include "confdefs.h"
 #include <locale.h>
 int main() {
 return LC_MESSAGES
 ; return 0; }
 EOF
-if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_val_LC_MESSAGES=yes
 else
@@ -2267,7 +2272,7 @@ EOF
     fi
   fi
    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:2271: checking whether NLS is requested" >&5
+echo "configure:2276: checking whether NLS is requested" >&5
         # Check whether --enable-nls or --disable-nls was given.
 if test "${enable_nls+set}" = set; then
   enableval="$enable_nls"
@@ -2287,7 +2292,7 @@ fi
 EOF
 
       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:2291: checking whether included gettext is requested" >&5
+echo "configure:2296: checking whether included gettext is requested" >&5
       # Check whether --with-included-gettext or --without-included-gettext was given.
 if test "${with_included_gettext+set}" = set; then
   withval="$with_included_gettext"
@@ -2306,17 +2311,17 @@ fi
 
        ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:2310: checking for libintl.h" >&5
+echo "configure:2315: checking for libintl.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2315 "configure"
+#line 2320 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2333,19 +2338,19 @@ fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:2337: checking for gettext in libc" >&5
+echo "configure:2342: checking for gettext in libc" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2342 "configure"
+#line 2347 "configure"
 #include "confdefs.h"
 #include <libintl.h>
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gettext_libc=yes
 else
@@ -2361,7 +2366,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
 
           if test "$gt_cv_func_gettext_libc" != "yes"; then
             echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2365: checking for bindtextdomain in -lintl" >&5
+echo "configure:2370: checking for bindtextdomain in -lintl" >&5
 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2369,7 +2374,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2373 "configure"
+#line 2378 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2380,7 +2385,7 @@ int main() {
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2396,19 +2401,19 @@ fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:2400: checking for gettext in libintl" >&5
+echo "configure:2405: checking for gettext in libintl" >&5
 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2405 "configure"
+#line 2410 "configure"
 #include "confdefs.h"
 
 int main() {
 return (int) gettext ("")
 ; return 0; }
 EOF
-if { (eval echo configure:2412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   gt_cv_func_gettext_libintl=yes
 else
@@ -2436,7 +2441,7 @@ EOF
              # Extract the first word of "msgfmt", so it can be a program name with args.
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2440: checking for $ac_word" >&5
+echo "configure:2445: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2470,12 +2475,12 @@ fi
                for ac_func in dcgettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2474: checking for $ac_func" >&5
+echo "configure:2479: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2479 "configure"
+#line 2484 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2498,7 +2503,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2525,7 +2530,7 @@ done
                # Extract the first word of "gmsgfmt", so it can be a program name with args.
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2529: checking for $ac_word" >&5
+echo "configure:2534: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2561,7 +2566,7 @@ fi
                # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2565: checking for $ac_word" >&5
+echo "configure:2570: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2593,7 +2598,7 @@ else
 fi
 
                cat > conftest.$ac_ext <<EOF
-#line 2597 "configure"
+#line 2602 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2601,7 +2606,7 @@ extern int _nl_msg_cat_cntr;
                               return _nl_msg_cat_cntr
 ; return 0; }
 EOF
-if { (eval echo configure:2605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   CATOBJEXT=.gmo
                   DATADIRNAME=share
@@ -2633,7 +2638,7 @@ fi
         # Extract the first word of "msgfmt", so it can be a program name with args.
 set dummy msgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2637: checking for $ac_word" >&5
+echo "configure:2642: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2667,7 +2672,7 @@ fi
         # Extract the first word of "gmsgfmt", so it can be a program name with args.
 set dummy gmsgfmt; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2671: checking for $ac_word" >&5
+echo "configure:2676: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2703,7 +2708,7 @@ fi
         # Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2707: checking for $ac_word" >&5
+echo "configure:2712: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2793,7 +2798,7 @@ fi
        LINGUAS=
      else
        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:2797: checking for catalogs to be installed" >&5
+echo "configure:2802: checking for catalogs to be installed" >&5
        NEW_LINGUAS=
        for lang in ${LINGUAS=$ALL_LINGUAS}; do
          case "$ALL_LINGUAS" in
@@ -2821,17 +2826,17 @@ echo "configure:2797: checking for catalogs to be installed" >&5
       if test "$CATOBJEXT" = ".cat"; then
         ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:2825: checking for linux/version.h" >&5
+echo "configure:2830: checking for linux/version.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2830 "configure"
+#line 2835 "configure"
 #include "confdefs.h"
 #include <linux/version.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
         < $srcdir/po/POTFILES.in > po/POTFILES
    fi
   
-cat >> confdefs.h <<\EOF
-#define PACKAGE "gdb"
-EOF
 
+localedir='${datadir}/locale'
 
 
+if test "x$POSUB" != x; then
 
-CONFIG_OBS=
-CONFIG_LIB_OBS=
-CONFIG_DEPS=
-CONFIG_SRCS=
-CONFIG_INITS=
-ENABLE_CFLAGS=
-CONFIG_ALL=
-CONFIG_CLEAN=
-CONFIG_INSTALL=
-CONFIG_UNINSTALL=
+    echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
+echo "configure:2908: checking for catalogs to be installed" >&5
+  # Look for .po and .gmo files in the source directory.
+  CATALOGS=  
+  XLINGUAS=
+  for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
+    # If there aren't any .gmo files the shell will give us the
+    # literal string "../path/to/srcdir/po/*.gmo" which has to be
+    # weeded out.
+    case "$cat" in *\**)
+      continue;;
+    esac
+    # The quadruple backslash is collapsed to a double backslash
+    # by the backticks, then collapsed again by the double quotes,
+    # leaving us with one backslash in the sed expression (right
+    # before the dot that mustn't act as a wildcard).
+    cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
+    lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
+    # The user is allowed to set LINGUAS to a list of languages to
+    # install catalogs for.  If it's empty that means "all of them."
+    if test "x$LINGUAS" = x; then
+      CATALOGS="$CATALOGS $cat"
+      XLINGUAS="$XLINGUAS $lang"
+    else
+      case "$LINGUAS" in *$lang*)
+        CATALOGS="$CATALOGS $cat"
+        XLINGUAS="$XLINGUAS $lang"
+        ;;
+      esac
+    fi
+  done
+  LINGUAS="$XLINGUAS"
+  echo "$ac_t""$LINGUAS" 1>&6
 
-SUBDIRS="doc testsuite nlm"
-configdirs="doc testsuite"
+   CONFIG_ALL="$CONFIG_ALL all-po"
+   CONFIG_CLEAN="$CONFIG_CLEAN clean-po"                  
+   CONFIG_INSTALL="$CONFIG_INSTALL install-po"
+   CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
+fi
 
-# Check whether --enable-multi-ice or --disable-multi-ice was given.
-if test "${enable_multi_ice+set}" = set; then
-  enableval="$enable_multi_ice"
-  case "${enableval}" in
-    yes ) enable_multi_ice="yes" ;;
-    no)  enable_multi_ice="no" ;;
-    *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
-  esac
+PACKAGE=gdb
+cat >> confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
 
-fi
 
 
-if test "${enable_multi_ice}" = "yes"; then
-  configdirs="${configdirs} multi-ice"
+debugdir=${libdir}/debug
+        
+# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
+if test "${with_separate_debug_dir+set}" = set; then
+  withval="$with_separate_debug_dir"
+  debugdir="${withval}"
 fi
 
+       
+
+  test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+  test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+  ac_define_dir=`eval echo $debugdir`
+  ac_define_dir=`eval echo $ac_define_dir`
+  cat >> confdefs.h <<EOF
+#define DEBUGDIR "$ac_define_dir"
+EOF
 
-. ${srcdir}/configure.host
 
-. ${srcdir}/configure.tgt
+#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
 
-targ=${target} ; . ${srcdir}/../bfd/config.bfd
+subdirs="doc testsuite"
 
+configdirs=
 
-targ=${target}
-. ${srcdir}/../bfd/config.bfd
+. $srcdir/configure.host
 
-targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'`
+. $srcdir/configure.tgt
 
-if test x"${targ_archs}" != x ; then
-    cat >> confdefs.h <<EOF
-#define DEFAULT_BFD_ARCH ${targ_archs}
+# Fetch the default architecture and default target vector from BFD.
+targ=$target; . $srcdir/../bfd/config.bfd
+
+# We only want the first architecture, so strip off the others if
+# there is more than one.
+targ_archs=`echo $targ_archs | sed 's/ .*//'`
+
+if test "x$targ_archs" != x; then
+  cat >> confdefs.h <<EOF
+#define DEFAULT_BFD_ARCH $targ_archs
 EOF
 
 fi
-if test x"${targ_defvec}" != x ; then
-    cat >> confdefs.h <<EOF
-#define DEFAULT_BFD_VEC ${targ_defvec}
+if test "x$targ_defvec" != x; then
+  cat >> confdefs.h <<EOF
+#define DEFAULT_BFD_VEC $targ_defvec
 EOF
 
 fi
@@ -2975,283 +3019,707 @@ test "$program_suffix" != NONE &&
 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
 
 
-# --------------------- #
-# Checks for programs.  #
-# --------------------- #
+# The CLI cannot be disabled yet, but may be in the future.
 
-for ac_prog in mawk gawk nawk awk
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2988: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+# Enable CLI.
+# Check whether --enable-gdbcli or --disable-gdbcli was given.
+if test "${enable_gdbcli+set}" = set; then
+  enableval="$enable_gdbcli"
+  case $enableval in
+    yes)
+      ;;
+    no)
+      { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
+    *)
+      { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
+  esac
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AWK="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  enable_gdbcli=yes
 fi
+
+if test x"$enable_gdbcli" = xyes; then
+  if test -d $srcdir/cli; then
+    CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
+    CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
+    CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
+    ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
+  fi
 fi
-AWK="$ac_cv_prog_AWK"
-if test -n "$AWK"; then
-  echo "$ac_t""$AWK" 1>&6
+
+# Enable MI.
+# Check whether --enable-gdbmi or --disable-gdbmi was given.
+if test "${enable_gdbmi+set}" = set; then
+  enableval="$enable_gdbmi"
+  case $enableval in
+    yes | no)
+      ;;
+    *)
+      { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
+  esac
 else
-  echo "$ac_t""no" 1>&6
+  enable_gdbmi=yes
 fi
 
-test -n "$AWK" && break
-done
+if test x"$enable_gdbmi" = xyes; then
+  if test -d $srcdir/mi; then
+    CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
+    CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
+    CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
+    ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
+  fi
+fi
 
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:3029: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS=        }"; ac_save_IFS="$IFS"; IFS=":"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      # Don't use installbsd from OSF since it installs stuff as root
-      # by default.
-      for ac_prog in ginstall scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-         if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-           # AIX install.  It has an incompatible calling convention.
-           :
-         else
-           ac_cv_path_install="$ac_dir/$ac_prog -c"
-           break 2
-         fi
-       fi
-      done
+# Enable TUI.
+# Check whether --enable-tui or --disable-tui was given.
+if test "${enable_tui+set}" = set; then
+  enableval="$enable_tui"
+  case $enableval in
+    yes | no)
       ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
+    *)
+      { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
+  esac
+else
+  enable_tui=yes
 fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
+
+
+# Enable gdbtk.
+# Check whether --enable-gdbtk or --disable-gdbtk was given.
+if test "${enable_gdbtk+set}" = set; then
+  enableval="$enable_gdbtk"
+  case $enableval in
+    yes | no)
+      ;;
+    *)
+      { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
+  esac
+else
+  if test -d $srcdir/gdbtk; then
+    enable_gdbtk=yes
   else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
+    enable_gdbtk=no
   fi
 fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+# We unconditionally disable gdbtk tests on selected platforms.
+case $host_os in
+  go32* | windows*)
+    echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
+    enable_gdbtk=no ;;
+esac
 
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:3082: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+# Libunwind support.
+# Check whether --with-libunwind or --without-libunwind was given.
+if test "${with_libunwind+set}" = set; then
+  withval="$with_libunwind"
+  case "${withval}" in
+  yes)  enable_libunwind=yes ;;
+  no)   enable_libunwind=no ;;
+  *)    { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
+esac
+else
+  
+  for ac_hdr in libunwind.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3128: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
-  rm -f conftestdata
-  ac_cv_prog_LN_S="ln -s"
+  cat > conftest.$ac_ext <<EOF
+#line 3133 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  ac_cv_prog_LN_S=ln
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
+rm -f conftest*
 fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
 else
   echo "$ac_t""no" 1>&6
 fi
+done
 
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3105: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  for ac_hdr in libunwind-ia64.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3168: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+  cat > conftest.$ac_ext <<EOF
+#line 3173 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
 else
   echo "$ac_t""no" 1>&6
 fi
+done
 
-for ac_prog in 'bison -y' byacc
+  if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
+    enable_libunwind=yes;
+  fi
+
+fi
+
+   
+if test x"$enable_libunwind" = xyes; then
+  for ac_hdr in libunwind.h
 do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3137: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3216: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test -n "$YACC"; then
-  ac_cv_prog_YACC="$YACC" # Let the user override the test.
+  cat > conftest.$ac_ext <<EOF
+#line 3221 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_YACC="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
+rm -f conftest*
 fi
-YACC="$ac_cv_prog_YACC"
-if test -n "$YACC"; then
-  echo "$ac_t""$YACC" 1>&6
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
 else
   echo "$ac_t""no" 1>&6
 fi
-
-test -n "$YACC" && break
 done
-test -n "$YACC" || YACC="yacc"
 
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3171: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
+  for ac_hdr in libunwind-ia64.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3256: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
+  cat > conftest.$ac_ext <<EOF
+#line 3261 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="${ac_tool_prefix}ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
+rm -f conftest*
 fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
 else
   echo "$ac_t""no" 1>&6
 fi
+done
 
+  cat >> confdefs.h <<\EOF
+#define HAVE_LIBUNWIND 1
+EOF
 
+  CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
+  CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
+  CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
+fi
 
-# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3203: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
+# Profiling support.
+# Check whether --enable-profiling or --disable-profiling was given.
+if test "${enable_profiling+set}" = set; then
+  enableval="$enable_profiling"
+  case $enableval in
+    yes | no)
+      ;;
+    *)
+      { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
+  esac
+else
+  enable_profiling=no
+fi
+
+
+for ac_func in monstartup _mcleanup
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:3319: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test -n "$DLLTOOL"; then
-  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+  cat > conftest.$ac_ext <<EOF
+#line 3324 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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();
+
+int main() {
+
+/* 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
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
 fi
+rm -f conftest*
 fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
-  echo "$ac_t""$DLLTOOL" 1>&6
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
 else
   echo "$ac_t""no" 1>&6
 fi
+done
+
+echo $ac_n "checking for _etext""... $ac_c" 1>&6
+echo "configure:3372: checking for _etext" >&5
+if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3377 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+extern char _etext;
+
+int main() {
+free (&_etext);
+; return 0; }
+EOF
+if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_var__etext=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_var__etext=no
+fi
+rm -f conftest*
+fi
 
+echo "$ac_t""$ac_cv_var__etext" 1>&6
+if test $ac_cv_var__etext = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE__ETEXT 1
+EOF
 
+fi
+if test "$enable_profiling" = yes ; then
+  if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
+    { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
+  fi
+  PROFILE_CFLAGS=-pg
+  OLD_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $PROFILE_CFLAGS"
 
-# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ac_tool_prefix}windres; ac_word=$2
+  echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
+echo "configure:3414: checking whether $CC supports -pg" >&5
+if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3419 "configure"
+#include "confdefs.h"
+
+int main() {
+int x;
+; return 0; }
+EOF
+if { (eval echo configure:3426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_cc_supports_pg=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_cc_supports_pg=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
+
+  if test $ac_cv_cc_supports_pg = no; then
+    { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
+  fi
+
+  CFLAGS="$OLD_CFLAGS"
+fi
+
+# --------------------- #
+# Checks for programs.  #
+# --------------------- #
+
+for ac_prog in mawk gawk nawk awk
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3235: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
+echo "configure:3456: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test -n "$WINDRES"; then
-  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
 else
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
+      ac_cv_prog_AWK="$ac_prog"
       break
     fi
   done
   IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
 fi
 fi
-WINDRES="$ac_cv_prog_WINDRES"
+AWK="$ac_cv_prog_AWK"
+if test -n "$AWK"; then
+  echo "$ac_t""$AWK" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+test -n "$AWK" && break
+done
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:3497: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    IFS="${IFS=        }"; ac_save_IFS="$IFS"; IFS=":"
+  for ac_dir in $PATH; do
+    # Account for people who put trailing slashes in PATH elements.
+    case "$ac_dir/" in
+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall scoinst install; do
+        if test -f $ac_dir/$ac_prog; then
+         if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           :
+         else
+           ac_cv_path_install="$ac_dir/$ac_prog -c"
+           break 2
+         fi
+       fi
+      done
+      ;;
+    esac
+  done
+  IFS="$ac_save_IFS"
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL="$ac_cv_path_install"
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL="$ac_install_sh"
+  fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:3550: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+  rm -f conftestdata
+  ac_cv_prog_LN_S="ln -s"
+else
+  ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3573: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+for ac_prog in 'bison -y' byacc
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3605: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$YACC"; then
+  ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_YACC="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+YACC="$ac_cv_prog_YACC"
+if test -n "$YACC"; then
+  echo "$ac_t""$YACC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+
+# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3639: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_AR="${ac_tool_prefix}ar"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
+fi
+fi
+AR="$ac_cv_prog_AR"
+if test -n "$AR"; then
+  echo "$ac_t""$AR" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3671: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
+fi
+fi
+DLLTOOL="$ac_cv_prog_DLLTOOL"
+if test -n "$DLLTOOL"; then
+  echo "$ac_t""$DLLTOOL" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
+set dummy ${ac_tool_prefix}windres; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3703: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$WINDRES"; then
+  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
+fi
+fi
+WINDRES="$ac_cv_prog_WINDRES"
 if test -n "$WINDRES"; then
   echo "$ac_t""$WINDRES" 1>&6
 else
@@ -3265,7 +3733,7 @@ fi
 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
 set dummy ${ac_tool_prefix}mig; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3269: checking for $ac_word" >&5
+echo "configure:3737: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3301,7 +3769,7 @@ fi
 
 # We might need to link with -lm; most simulators need it.
 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:3305: checking for main in -lm" >&5
+echo "configure:3773: checking for main in -lm" >&5
 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3309,14 +3777,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3313 "configure"
+#line 3781 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:3320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3349,12 +3817,12 @@ fi
 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
 # is known to have this problem).  Therefore we avoid libw if we can.
 echo $ac_n "checking for wctype""... $ac_c" 1>&6
-echo "configure:3353: checking for wctype" >&5
+echo "configure:3821: checking for wctype" >&5
 if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3358 "configure"
+#line 3826 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char wctype(); below.  */
@@ -3377,7 +3845,7 @@ wctype();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_wctype=yes"
 else
@@ -3395,7 +3863,7 @@ if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
-echo "configure:3399: checking for wctype in -lw" >&5
+echo "configure:3867: checking for wctype in -lw" >&5
 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3403,7 +3871,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lw  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3407 "configure"
+#line 3875 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3414,7 +3882,7 @@ int main() {
 wctype()
 ; return 0; }
 EOF
-if { (eval echo configure:3418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3444,52 +3912,52 @@ fi
 fi
 
 
-# Some systems (e.g. Solaris) have `socketpair' in libsocket.
+# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
 
-echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
-echo "configure:3451: checking for library containing socketpair" >&5
-if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
+echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
+echo "configure:3919: checking for library containing gethostbyname" >&5
+if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_func_search_save_LIBS="$LIBS"
-ac_cv_search_socketpair="no"
+ac_cv_search_gethostbyname="no"
 cat > conftest.$ac_ext <<EOF
-#line 3458 "configure"
+#line 3926 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char socketpair();
+char gethostbyname();
 
 int main() {
-socketpair()
+gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  ac_cv_search_socketpair="none required"
+  ac_cv_search_gethostbyname="none required"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
 fi
 rm -f conftest*
-test "$ac_cv_search_socketpair" = "no" && for i in socket; do
+test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
 LIBS="-l$i  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3480 "configure"
+#line 3948 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char socketpair();
+char gethostbyname();
 
 int main() {
-socketpair()
+gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:3491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  ac_cv_search_socketpair="-l$i"
+  ac_cv_search_gethostbyname="-l$i"
 break
 else
   echo "configure: failed program was:" >&5
@@ -3500,14 +3968,233 @@ done
 LIBS="$ac_func_search_save_LIBS"
 fi
 
-echo "$ac_t""$ac_cv_search_socketpair" 1>&6
-if test "$ac_cv_search_socketpair" != "no"; then
-  test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
+echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
+if test "$ac_cv_search_gethostbyname" != "no"; then
+  test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
   
 else :
   
 fi
 
+# Some systems (e.g. Solaris) have `socketpair' in libsocket.
+
+echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
+echo "configure:3983: checking for library containing socketpair" >&5
+if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_socketpair="no"
+cat > conftest.$ac_ext <<EOF
+#line 3990 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char socketpair();
+
+int main() {
+socketpair()
+; return 0; }
+EOF
+if { (eval echo configure:4001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_search_socketpair="none required"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_socketpair" = "no" && for i in socket; do
+LIBS="-l$i  $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4012 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char socketpair();
+
+int main() {
+socketpair()
+; return 0; }
+EOF
+if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_search_socketpair="-l$i"
+break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_socketpair" 1>&6
+if test "$ac_cv_search_socketpair" != "no"; then
+  test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
+  
+else :
+  
+fi
+
+# For the TUI, we need enhanced curses functionality.
+#
+# FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
+# curses library because the latter might not provide all the
+# functionality we need.  However, this leads to problems on systems
+# where the linker searches /usr/local/lib, but the compiler doesn't
+# search /usr/local/include, if ncurses is installed in /usr/local.  A
+# default installation of ncurses on alpha*-dec-osf* will lead to such
+# a situation.
+
+echo $ac_n "checking for library containing waddstr""... $ac_c" 1>&6
+echo "configure:4055: checking for library containing waddstr" >&5
+if eval "test \"`echo '$''{'ac_cv_search_waddstr'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_waddstr="no"
+cat > conftest.$ac_ext <<EOF
+#line 4062 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char waddstr();
+
+int main() {
+waddstr()
+; return 0; }
+EOF
+if { (eval echo configure:4073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_search_waddstr="none required"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_waddstr" = "no" && for i in ncurses cursesX curses; do
+LIBS="-l$i  $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4084 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char waddstr();
+
+int main() {
+waddstr()
+; return 0; }
+EOF
+if { (eval echo configure:4095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_search_waddstr="-l$i"
+break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_waddstr" 1>&6
+if test "$ac_cv_search_waddstr" != "no"; then
+  test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS"
+  
+else :
+  
+fi
+
+# Since GDB uses Readline, we need termcap functionality.  In many
+# cases this will be provided by the curses library, but some systems
+# have a seperate termcap library, or no curses library at all.
+
+case $host_os in
+  cygwin*)
+    if test -d $srcdir/libtermcap; then
+      LIBS="../libtermcap/libtermcap.a $LIBS"
+      ac_cv_search_tgetent="../libtermcap/libtermcap.a"
+    fi ;;
+  go32* | *djgpp*)
+    ac_cv_search_tgetent="none required"
+    ;;
+esac
+
+# These are the libraries checked by Readline.
+
+echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
+echo "configure:4134: checking for library containing tgetent" >&5
+if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_tgetent="no"
+cat > conftest.$ac_ext <<EOF
+#line 4141 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_search_tgetent="none required"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo curses ncurses; do
+LIBS="-l$i  $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4163 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_search_tgetent="-l$i"
+break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_tgetent" 1>&6
+if test "$ac_cv_search_tgetent" != "no"; then
+  test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
+  
+else :
+  
+fi
+
+if test "$ac_cv_search_tgetent" = no; then
+  { echo "configure: error: no termcap library found" 1>&2; exit 1; }
+fi
+
 # ------------------------- #
 # Checks for header files.  #
 # ------------------------- #
@@ -3517,12 +4204,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:3521: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4208: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3526 "configure"
+#line 4213 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -3530,7 +4217,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:3534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -3555,7 +4242,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:3559: checking for opendir in -ldir" >&5
+echo "configure:4246: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3563,7 +4250,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3567 "configure"
+#line 4254 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3574,7 +4261,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3596,7 +4283,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:3600: checking for opendir in -lx" >&5
+echo "configure:4287: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3604,7 +4291,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3608 "configure"
+#line 4295 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3615,7 +4302,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:3619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3638,12 +4325,12 @@ fi
 fi
 
 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:3642: checking whether stat file-mode macros are broken" >&5
+echo "configure:4329: checking whether stat file-mode macros are broken" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3647 "configure"
+#line 4334 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -3694,12 +4381,12 @@ EOF
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3698: checking for ANSI C header files" >&5
+echo "configure:4385: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3703 "configure"
+#line 4390 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3707,7 +4394,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3724,7 +4411,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3728 "configure"
+#line 4415 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -3742,7 +4429,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3746 "configure"
+#line 4433 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -3763,7 +4450,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 3767 "configure"
+#line 4454 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3774,7 +4461,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:3778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -3801,17 +4488,57 @@ for ac_hdr in link.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3805: checking for $ac_hdr" >&5
+echo "configure:4492: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4497 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in machine/reg.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4532: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3810 "configure"
+#line 4537 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3841,17 +4568,17 @@ for ac_hdr in nlist.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3845: checking for $ac_hdr" >&5
+echo "configure:4572: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3850 "configure"
+#line 4577 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3881,17 +4608,17 @@ for ac_hdr in poll.h sys/poll.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3885: checking for $ac_hdr" >&5
+echo "configure:4612: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3890 "configure"
+#line 4617 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3917,21 +4644,21 @@ else
 fi
 done
 
-for ac_hdr in proc_service.h thread_db.h
+for ac_hdr in proc_service.h thread_db.h gnu/libc-version.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3925: checking for $ac_hdr" >&5
+echo "configure:4652: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3930 "configure"
+#line 4657 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3961,17 +4688,17 @@ for ac_hdr in stddef.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3965: checking for $ac_hdr" >&5
+echo "configure:4692: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3970 "configure"
+#line 4697 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4001,17 +4728,17 @@ for ac_hdr in stdlib.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4005: checking for $ac_hdr" >&5
+echo "configure:4732: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4010 "configure"
+#line 4737 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4041,17 +4768,17 @@ for ac_hdr in stdint.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4045: checking for $ac_hdr" >&5
+echo "configure:4772: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4050 "configure"
+#line 4777 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4081,17 +4808,17 @@ for ac_hdr in string.h memory.h strings.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4085: checking for $ac_hdr" >&5
+echo "configure:4812: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4090 "configure"
+#line 4817 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4121,17 +4848,17 @@ for ac_hdr in sys/fault.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4125: checking for $ac_hdr" >&5
+echo "configure:4852: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4130 "configure"
+#line 4857 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4161,17 +4888,17 @@ for ac_hdr in sys/file.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4165: checking for $ac_hdr" >&5
+echo "configure:4892: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4170 "configure"
+#line 4897 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4201,17 +4928,17 @@ for ac_hdr in sys/filio.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4205: checking for $ac_hdr" >&5
+echo "configure:4932: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4210 "configure"
+#line 4937 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4241,17 +4968,17 @@ for ac_hdr in sys/ioctl.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4245: checking for $ac_hdr" >&5
+echo "configure:4972: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4250 "configure"
+#line 4977 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4281,17 +5008,17 @@ for ac_hdr in sys/param.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4285: checking for $ac_hdr" >&5
+echo "configure:5012: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4290 "configure"
+#line 5017 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4321,17 +5048,17 @@ for ac_hdr in sys/proc.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4325: checking for $ac_hdr" >&5
+echo "configure:5052: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4330 "configure"
+#line 5057 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4361,17 +5088,17 @@ for ac_hdr in sys/procfs.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4365: checking for $ac_hdr" >&5
+echo "configure:5092: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4370 "configure"
+#line 5097 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4401,17 +5128,17 @@ for ac_hdr in sys/ptrace.h ptrace.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4405: checking for $ac_hdr" >&5
+echo "configure:5132: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4410 "configure"
+#line 5137 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4441,17 +5168,17 @@ for ac_hdr in sys/reg.h sys/debugreg.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4445: checking for $ac_hdr" >&5
+echo "configure:5172: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4450 "configure"
+#line 5177 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4481,17 +5208,17 @@ for ac_hdr in sys/select.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4485: checking for $ac_hdr" >&5
+echo "configure:5212: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4490 "configure"
+#line 5217 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4521,17 +5248,57 @@ for ac_hdr in sys/syscall.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4525: checking for $ac_hdr" >&5
+echo "configure:5252: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5257 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in sys/types.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5292: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4530 "configure"
+#line 5297 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4561,17 +5328,17 @@ for ac_hdr in sys/user.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4565: checking for $ac_hdr" >&5
+echo "configure:5332: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4570 "configure"
+#line 5337 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4601,17 +5368,17 @@ for ac_hdr in sys/wait.h wait.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4605: checking for $ac_hdr" >&5
+echo "configure:5372: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4610 "configure"
+#line 5377 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4641,17 +5408,17 @@ for ac_hdr in termios.h termio.h sgtty.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4645: checking for $ac_hdr" >&5
+echo "configure:5412: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4650 "configure"
+#line 5417 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4681,17 +5448,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4685: checking for $ac_hdr" >&5
+echo "configure:5452: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
+#line 5457 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4718,11 +5485,11 @@ fi
 done
 
 
-# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
+# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
 # think that we don't have <curses.h> if we're using GCC.
 case $host_os in
-  solaris2.[78])
+  solaris2.[789])
     if test "$GCC" = yes; then
       cat >> confdefs.h <<\EOF
 #define _MSE_INT_H 1
@@ -4730,21 +5497,21 @@ EOF
 
     fi ;;
 esac
-for ac_hdr in curses.h ncurses.h term.h
+for ac_hdr in curses.h cursesX.h ncurses.h ncurses/ncurses.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4738: checking for $ac_hdr" >&5
+echo "configure:5505: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4743 "configure"
+#line 5510 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4770,24 +5537,21 @@ else
 fi
 done
 
-
-# FIXME: kettenis/20030102: In most cases we include these
-# unconditionally, so what's the point in checking these?
-for ac_hdr in ctype.h time.h
+for ac_hdr in ncurses/term.h term.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4781: checking for $ac_hdr" >&5
+echo "configure:5545: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4786 "configure"
+#line 5550 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 done
 
 
-# ------------------ #
-# Checks for types.  #
-# ------------------ #
-
-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:4823: checking return type of signal handlers" >&5
-if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
+# FIXME: kettenis/20030102: In most cases we include these
+# unconditionally, so what's the point in checking these?
+for ac_hdr in ctype.h time.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5588: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4828 "configure"
+#line 5593 "configure"
 #include "confdefs.h"
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-#undef signal
-#endif
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
+echo "configure:5626: checking for member st_blocks in struct stat" >&5
+if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5631 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+int main() {
+struct stat st; (void) st.st_blocks;
+; return 0; }
+EOF
+if { (eval echo configure:5639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  gdb_cv_have_struct_stat_with_st_blocks_member=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  gdb_cv_have_struct_stat_with_st_blocks_member=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
+if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_STAT_ST_BLOCKS 1
+EOF
+
+fi
+
+# ------------------------- #
+# Checks for declarations.  #
+# ------------------------- #
+
+for ac_func in getopt
+do
+  ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
+echo "configure:5667: checking whether $ac_func is declared" >&5
+if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5672 "configure"
+#include "confdefs.h"
+#undef $ac_tr_decl
+#define $ac_tr_decl 1
+  
+
+int main() {
+#ifndef $ac_func
+char *(*pfn) = (char *(*)) $ac_func ;
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:5684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  eval "gcc_cv_have_decl_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "gcc_cv_have_decl_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
+#define $ac_tr_decl 1
+EOF
+else
+  echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
+#define $ac_tr_decl 0
+EOF
+fi
+
+done
+if test x = y ; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_DECL_GETOPT 1
+EOF
+fi
+
+
+# ------------------ #
+# Checks for types.  #
+# ------------------ #
+
+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+echo "configure:5721: checking return type of signal handlers" >&5
+if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5726 "configure"
+#include "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
@@ -4841,7 +5739,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:4845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -4865,12 +5763,12 @@ EOF
 # ------------------------------------- #
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:4869: checking for working const" >&5
+echo "configure:5767: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4874 "configure"
+#line 5772 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -4919,7 +5817,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:4923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -4940,21 +5838,21 @@ EOF
 fi
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:4944: checking for inline" >&5
+echo "configure:5842: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 4951 "configure"
+#line 5849 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:4958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -4987,19 +5885,19 @@ esac
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:4991: checking for working alloca.h" >&5
+echo "configure:5889: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4996 "configure"
+#line 5894 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -5020,12 +5918,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:5024: checking for alloca" >&5
+echo "configure:5922: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5029 "configure"
+#line 5927 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -5048,225 +5946,694 @@ char *alloca ();
 #  endif
 # endif
 #endif
-
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:5955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_func_alloca_works=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+  # that cause trouble.  Some versions do not even contain alloca or
+  # contain a buggy version.  If you still want to use their alloca,
+  # use ar to extract alloca.o from them instead of compiling alloca.c.
+  ALLOCA=alloca.${ac_objext}
+  cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:5987: checking whether alloca needs Cray hooks" >&5
+if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5992 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "webecray" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_os_cray=yes
+else
+  rm -rf conftest*
+  ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_os_cray" 1>&6
+if test $ac_cv_os_cray = yes; then
+for ac_func in _getb67 GETB67 getb67; do
+  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6017: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6022 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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();
+
+int main() {
+
+/* 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
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+
+  break
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:6072: checking stack direction for C alloca" >&5
+if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_c_stack_direction=0
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6080 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+  static char *addr = 0;
+  auto char dummy;
+  if (addr == 0)
+    {
+      addr = &dummy;
+      return find_stack_direction ();
+    }
+  else
+    return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+  exit (find_stack_direction() < 0);
+}
+EOF
+if { (eval echo configure:6099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_c_stack_direction=1
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+
+fi
+
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6124: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6129 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6163: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6168 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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();
+
+int main() {
+
+/* 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
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:6216: checking for working mmap" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_mmap_fixed_mapped=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6224 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+   Here is a matrix of mmap possibilities:
+       mmap private not fixed
+       mmap private fixed at somewhere currently unmapped
+       mmap private fixed at somewhere already mapped
+       mmap shared not fixed
+       mmap shared fixed at somewhere currently unmapped
+       mmap shared fixed at somewhere already mapped
+   For private mappings, we should verify that changes cannot be read()
+   back from the file, nor mmap's back from the file at a different
+   address.  (There have been systems where private was not correctly
+   implemented like the infamous i386 svr4.0, and systems where the
+   VM page cache was not coherent with the filesystem buffer cache
+   like early versions of FreeBSD and possibly contemporary NetBSD.)
+   For shared mappings, we should conversely verify that changes get
+   propogated back to all the places they're supposed to be.
+
+   Grep wants private fixed already mapped.
+   The main things grep needs to know about mmap are:
+   * does it exist and is it safe to write into the mmap'd area
+   * how to use it (BSD variants)  */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h.  */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h.  */
+# ifndef HAVE_SYS_PARAM_H
+#  define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+#  define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+#  ifdef HAVE_SYS_PARAM_H
+#   include <sys/param.h>
+#   ifdef EXEC_PAGESIZE
+#    define getpagesize() EXEC_PAGESIZE
+#   else /* no EXEC_PAGESIZE */
+#    ifdef NBPG
+#     define getpagesize() NBPG * CLSIZE
+#     ifndef CLSIZE
+#      define CLSIZE 1
+#     endif /* no CLSIZE */
+#    else /* no NBPG */
+#     ifdef NBPC
+#      define getpagesize() NBPC
+#     else /* no NBPC */
+#      ifdef PAGESIZE
+#       define getpagesize() PAGESIZE
+#      endif /* PAGESIZE */
+#     endif /* no NBPC */
+#    endif /* no NBPG */
+#   endif /* no EXEC_PAGESIZE */
+#  else /* no HAVE_SYS_PARAM_H */
+#   define getpagesize() 8192  /* punt totally */
+#  endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+       char *data, *data2, *data3;
+       int i, pagesize;
+       int fd;
+
+       pagesize = getpagesize();
+
+       /*
+        * First, make a file with some known garbage in it.
+        */
+       data = malloc(pagesize);
+       if (!data)
+               exit(1);
+       for (i = 0; i < pagesize; ++i)
+               *(data + i) = rand();
+       umask(0);
+       fd = creat("conftestmmap", 0600);
+       if (fd < 0)
+               exit(1);
+       if (write(fd, data, pagesize) != pagesize)
+               exit(1);
+       close(fd);
+
+       /*
+        * Next, try to mmap the file at a fixed address which
+        * already has something else allocated at it.  If we can,
+        * also make sure that we see the same garbage.
+        */
+       fd = open("conftestmmap", O_RDWR);
+       if (fd < 0)
+               exit(1);
+       data2 = malloc(2 * pagesize);
+       if (!data2)
+               exit(1);
+       data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+       if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+           MAP_PRIVATE | MAP_FIXED, fd, 0L))
+               exit(1);
+       for (i = 0; i < pagesize; ++i)
+               if (*(data + i) != *(data2 + i))
+                       exit(1);
+
+       /*
+        * Finally, make sure that changes to the mapped area
+        * do not percolate back to the file as seen by read().
+        * (This is a bug on some variants of i386 svr4.0.)
+        */
+       for (i = 0; i < pagesize; ++i)
+               *(data2 + i) = *(data2 + i) + 1;
+       data3 = malloc(pagesize);
+       if (!data3)
+               exit(1);
+       if (read(fd, data3, pagesize) != pagesize)
+               exit(1);
+       for (i = 0; i < pagesize; ++i)
+               if (*(data + i) != *(data3 + i))
+                       exit(1);
+       close(fd);
+       unlink("conftestmmap");
+       exit(0);
+}
+
+EOF
+if { (eval echo configure:6364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_mmap_fixed_mapped=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+echo "configure:6387: checking for pid_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6392 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
 EOF
-if { (eval echo configure:5057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
-  ac_cv_func_alloca_works=yes
+  ac_cv_type_pid_t=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
   rm -rf conftest*
-  ac_cv_func_alloca_works=no
+  ac_cv_type_pid_t=no
 fi
 rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
-if test $ac_cv_func_alloca_works = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
 
 fi
-
-if test $ac_cv_func_alloca_works = no; then
-  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-  # that cause trouble.  Some versions do not even contain alloca or
-  # contain a buggy version.  If you still want to use their alloca,
-  # use ar to extract alloca.o from them instead of compiling alloca.c.
-  ALLOCA=alloca.${ac_objext}
+echo "$ac_t""$ac_cv_type_pid_t" 1>&6
+if test $ac_cv_type_pid_t = no; then
   cat >> confdefs.h <<\EOF
-#define C_ALLOCA 1
+#define pid_t int
 EOF
 
+fi
 
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:5089: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
+ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
+echo "configure:6421: checking for vfork.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5094 "configure"
+#line 6426 "configure"
 #include "confdefs.h"
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
+#include <vfork.h>
 EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "webecray" >/dev/null 2>&1; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
   rm -rf conftest*
-  ac_cv_os_cray=yes
+  eval "ac_cv_header_$ac_safe=yes"
 else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
   rm -rf conftest*
-  ac_cv_os_cray=no
+  eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define HAVE_VFORK_H 1
+EOF
 
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-echo "$ac_t""$ac_cv_os_cray" 1>&6
-if test $ac_cv_os_cray = yes; then
-for ac_func in _getb67 GETB67 getb67; do
-  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5119: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+echo $ac_n "checking for working vfork""... $ac_c" 1>&6
+echo "configure:6456: checking for working vfork" >&5
+if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  echo $ac_n "checking for vfork""... $ac_c" 1>&6
+echo "configure:6462: checking for vfork" >&5
+if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5124 "configure"
+#line 6467 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
+    which can conflict with char vfork(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* 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();
+char vfork();
 
 int main() {
 
 /* 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)
+#if defined (__stub_vfork) || defined (__stub___vfork)
 choke me
 #else
-$ac_func();
+vfork();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:5147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
+  eval "ac_cv_func_vfork=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
+  eval "ac_cv_func_vfork=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<EOF
-#define CRAY_STACKSEG_END $ac_func
-EOF
-
-  break
+  :
 else
   echo "$ac_t""no" 1>&6
 fi
 
-done
-fi
-
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:5174: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_c_stack_direction=0
+ac_cv_func_vfork_works=$ac_cv_func_vfork
 else
   cat > conftest.$ac_ext <<EOF
-#line 5182 "configure"
+#line 6512 "configure"
 #include "confdefs.h"
-find_stack_direction ()
+/* Thanks to Paul Eggert for this test.  */
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_VFORK_H
+#include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+   argument registers are propagated back to the parent.
+   The compiler is told about this with #include <vfork.h>,
+   but some compilers (e.g. gcc -O) don't grok <vfork.h>.
+   Test for this by using a static variable whose address
+   is put into a register that is clobbered by the vfork.  */
+static
+#ifdef __cplusplus
+sparc_address_test (int arg)
+#else
+sparc_address_test (arg) int arg;
+#endif
 {
-  static char *addr = 0;
-  auto char dummy;
-  if (addr == 0)
-    {
-      addr = &dummy;
-      return find_stack_direction ();
+  static pid_t child;
+  if (!child) {
+    child = vfork ();
+    if (child < 0) {
+      perror ("vfork");
+      _exit(2);
     }
-  else
-    return (&dummy > addr) ? 1 : -1;
-}
-main ()
-{
-  exit (find_stack_direction() < 0);
+    if (!child) {
+      arg = getpid();
+      write(-1, "", 0);
+      _exit (arg);
+    }
+  }
 }
-EOF
-if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_c_stack_direction=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_c_stack_direction=-1
-fi
-rm -fr conftest*
-fi
+main() {
+  pid_t parent = getpid ();
+  pid_t child;
 
-fi
+  sparc_address_test ();
 
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
+  child = vfork ();
 
-fi
+  if (child == 0) {
+    /* Here is another test for sparc vfork register problems.
+       This test uses lots of local variables, at least
+       as many local variables as main has allocated so far
+       including compiler temporaries.  4 locals are enough for
+       gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
+       A buggy compiler should reuse the register of parent
+       for one of the local variables, since it will think that
+       parent can't possibly be used any more in this routine.
+       Assigning to the local variable will thus munge parent
+       in the parent process.  */
+    pid_t
+      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+    /* Convince the compiler that p..p7 are live; otherwise, it might
+       use the same hardware register for all 8 local variables.  */
+    if (p != p1 || p != p2 || p != p3 || p != p4
+       || p != p5 || p != p6 || p != p7)
+      _exit(1);
 
-for ac_hdr in unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5226: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5231 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
+    /* On some systems (e.g. IRIX 3.3),
+       vfork doesn't separate parent from child file descriptors.
+       If the child closes a descriptor before it execs or exits,
+       this munges the parent's descriptor as well.
+       Test for this by closing stdout in the child.  */
+    _exit(close(fileno(stdout)) != 0);
+  } else {
+    int status;
+    struct stat st;
+
+    while (wait(&status) != child)
+      ;
+    exit(
+        /* Was there some problem with vforking?  */
+        child < 0
+
+        /* Did the child fail?  (This shouldn't happen.)  */
+        || status
+
+        /* Did the vfork/compiler bug occur?  */
+        || parent != getpid()
+
+        /* Did the file descriptor bug occur?  */
+        || fstat(fileno(stdout), &st) != 0
+        );
+  }
+}
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
+if { (eval echo configure:6607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_vfork_works=yes
 else
-  echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  rm -fr conftest*
+  ac_cv_func_vfork_works=no
 fi
-rm -f conftest*
+rm -fr conftest*
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
+
+fi
+
+echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
+if test $ac_cv_func_vfork_works = no; then
+  cat >> confdefs.h <<\EOF
+#define vfork fork
 EOF
-else
-  echo "$ac_t""no" 1>&6
+
 fi
-done
 
-for ac_func in getpagesize
+for ac_func in canonicalize_file_name realpath
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5265: checking for $ac_func" >&5
+echo "configure:6632: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5270 "configure"
+#line 6637 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5289,7 +6656,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5313,429 +6680,235 @@ else
 fi
 done
 
-echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:5318: checking for working mmap" >&5
-if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+for ac_func in poll
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6687: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 5326 "configure"
+#line 6692 "configure"
 #include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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();
 
-/* Thanks to Mike Haertel and Jim Avera for this test.
-   Here is a matrix of mmap possibilities:
-       mmap private not fixed
-       mmap private fixed at somewhere currently unmapped
-       mmap private fixed at somewhere already mapped
-       mmap shared not fixed
-       mmap shared fixed at somewhere currently unmapped
-       mmap shared fixed at somewhere already mapped
-   For private mappings, we should verify that changes cannot be read()
-   back from the file, nor mmap's back from the file at a different
-   address.  (There have been systems where private was not correctly
-   implemented like the infamous i386 svr4.0, and systems where the
-   VM page cache was not coherent with the filesystem buffer cache
-   like early versions of FreeBSD and possibly contemporary NetBSD.)
-   For shared mappings, we should conversely verify that changes get
-   propogated back to all the places they're supposed to be.
-
-   Grep wants private fixed already mapped.
-   The main things grep needs to know about mmap are:
-   * does it exist and is it safe to write into the mmap'd area
-   * how to use it (BSD variants)  */
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/mman.h>
-
-/* This mess was copied from the GNU getpagesize.h.  */
-#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
-
-/* Assume that all systems that can run configure have sys/param.h.  */
-# ifndef HAVE_SYS_PARAM_H
-#  define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-#  define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-#  ifdef HAVE_SYS_PARAM_H
-#   include <sys/param.h>
-#   ifdef EXEC_PAGESIZE
-#    define getpagesize() EXEC_PAGESIZE
-#   else /* no EXEC_PAGESIZE */
-#    ifdef NBPG
-#     define getpagesize() NBPG * CLSIZE
-#     ifndef CLSIZE
-#      define CLSIZE 1
-#     endif /* no CLSIZE */
-#    else /* no NBPG */
-#     ifdef NBPC
-#      define getpagesize() NBPC
-#     else /* no NBPC */
-#      ifdef PAGESIZE
-#       define getpagesize() PAGESIZE
-#      endif /* PAGESIZE */
-#     endif /* no NBPC */
-#    endif /* no NBPG */
-#   endif /* no EXEC_PAGESIZE */
-#  else /* no HAVE_SYS_PARAM_H */
-#   define getpagesize() 8192  /* punt totally */
-#  endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
+int main() {
 
-#ifdef __cplusplus
-extern "C" { void *malloc(unsigned); }
+/* 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 *malloc();
+$ac_func();
 #endif
 
-int
-main()
-{
-       char *data, *data2, *data3;
-       int i, pagesize;
-       int fd;
-
-       pagesize = getpagesize();
-
-       /*
-        * First, make a file with some known garbage in it.
-        */
-       data = malloc(pagesize);
-       if (!data)
-               exit(1);
-       for (i = 0; i < pagesize; ++i)
-               *(data + i) = rand();
-       umask(0);
-       fd = creat("conftestmmap", 0600);
-       if (fd < 0)
-               exit(1);
-       if (write(fd, data, pagesize) != pagesize)
-               exit(1);
-       close(fd);
-
-       /*
-        * Next, try to mmap the file at a fixed address which
-        * already has something else allocated at it.  If we can,
-        * also make sure that we see the same garbage.
-        */
-       fd = open("conftestmmap", O_RDWR);
-       if (fd < 0)
-               exit(1);
-       data2 = malloc(2 * pagesize);
-       if (!data2)
-               exit(1);
-       data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
-       if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
-           MAP_PRIVATE | MAP_FIXED, fd, 0L))
-               exit(1);
-       for (i = 0; i < pagesize; ++i)
-               if (*(data + i) != *(data2 + i))
-                       exit(1);
-
-       /*
-        * Finally, make sure that changes to the mapped area
-        * do not percolate back to the file as seen by read().
-        * (This is a bug on some variants of i386 svr4.0.)
-        */
-       for (i = 0; i < pagesize; ++i)
-               *(data2 + i) = *(data2 + i) + 1;
-       data3 = malloc(pagesize);
-       if (!data3)
-               exit(1);
-       if (read(fd, data3, pagesize) != pagesize)
-               exit(1);
-       for (i = 0; i < pagesize; ++i)
-               if (*(data + i) != *(data3 + i))
-                       exit(1);
-       close(fd);
-       unlink("conftestmmap");
-       exit(0);
-}
-
+; return 0; }
 EOF
-if { (eval echo configure:5466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_func_mmap_fixed_mapped=yes
+if { (eval echo configure:6715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -fr conftest*
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
 fi
-
+rm -f conftest*
 fi
 
-echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_MMAP 1
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
 EOF
-
+else
+  echo "$ac_t""no" 1>&6
 fi
+done
 
-echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:5489: checking for pid_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
+for ac_func in pread64
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6742: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5494 "configure"
+#line 6747 "configure"
 #include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_pid_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_pid_t=no
-fi
-rm -f conftest*
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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();
 
-fi
-echo "$ac_t""$ac_cv_type_pid_t" 1>&6
-if test $ac_cv_type_pid_t = no; then
-  cat >> confdefs.h <<\EOF
-#define pid_t int
-EOF
+int main() {
 
-fi
+/* 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
+$ac_func();
+#endif
 
-ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:5523: checking for vfork.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 5528 "configure"
-#include "confdefs.h"
-#include <vfork.h>
+; return 0; }
 EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
+if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
+  eval "ac_cv_func_$ac_func=yes"
 else
-  echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
+  eval "ac_cv_func_$ac_func=no"
 fi
 rm -f conftest*
 fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define HAVE_VFORK_H 1
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
 EOF
-
 else
   echo "$ac_t""no" 1>&6
 fi
+done
 
-echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:5558: checking for working vfork" >&5
-if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:5564: checking for vfork" >&5
-if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
+for ac_func in sbrk
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6797: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5569 "configure"
+#line 6802 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char vfork(); below.  */
+    which can conflict with char $ac_func(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char vfork();
+char $ac_func();
 
 int main() {
 
 /* 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_vfork) || defined (__stub___vfork)
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-vfork();
+$ac_func();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:5592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
-  eval "ac_cv_func_vfork=yes"
+  eval "ac_cv_func_$ac_func=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_func_vfork=no"
+  eval "ac_cv_func_$ac_func=no"
 fi
 rm -f conftest*
 fi
 
-if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  :
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
 else
   echo "$ac_t""no" 1>&6
 fi
+done
 
-ac_cv_func_vfork_works=$ac_cv_func_vfork
+for ac_func in setpgid setpgrp
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6852: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5614 "configure"
+#line 6857 "configure"
 #include "confdefs.h"
-/* Thanks to Paul Eggert for this test.  */
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_VFORK_H
-#include <vfork.h>
-#endif
-/* On some sparc systems, changes by the child to local and incoming
-   argument registers are propagated back to the parent.
-   The compiler is told about this with #include <vfork.h>,
-   but some compilers (e.g. gcc -O) don't grok <vfork.h>.
-   Test for this by using a static variable whose address
-   is put into a register that is clobbered by the vfork.  */
-static
-#ifdef __cplusplus
-sparc_address_test (int arg)
-#else
-sparc_address_test (arg) int arg;
-#endif
-{
-  static pid_t child;
-  if (!child) {
-    child = vfork ();
-    if (child < 0) {
-      perror ("vfork");
-      _exit(2);
-    }
-    if (!child) {
-      arg = getpid();
-      write(-1, "", 0);
-      _exit (arg);
-    }
-  }
-}
-main() {
-  pid_t parent = getpid ();
-  pid_t child;
-
-  sparc_address_test ();
-
-  child = vfork ();
-
-  if (child == 0) {
-    /* Here is another test for sparc vfork register problems.
-       This test uses lots of local variables, at least
-       as many local variables as main has allocated so far
-       including compiler temporaries.  4 locals are enough for
-       gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
-       A buggy compiler should reuse the register of parent
-       for one of the local variables, since it will think that
-       parent can't possibly be used any more in this routine.
-       Assigning to the local variable will thus munge parent
-       in the parent process.  */
-    pid_t
-      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
-      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
-    /* Convince the compiler that p..p7 are live; otherwise, it might
-       use the same hardware register for all 8 local variables.  */
-    if (p != p1 || p != p2 || p != p3 || p != p4
-       || p != p5 || p != p6 || p != p7)
-      _exit(1);
-
-    /* On some systems (e.g. IRIX 3.3),
-       vfork doesn't separate parent from child file descriptors.
-       If the child closes a descriptor before it execs or exits,
-       this munges the parent's descriptor as well.
-       Test for this by closing stdout in the child.  */
-    _exit(close(fileno(stdout)) != 0);
-  } else {
-    int status;
-    struct stat st;
-
-    while (wait(&status) != child)
-      ;
-    exit(
-        /* Was there some problem with vforking?  */
-        child < 0
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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();
 
-        /* Did the child fail?  (This shouldn't happen.)  */
-        || status
+int main() {
 
-        /* Did the vfork/compiler bug occur?  */
-        || parent != getpid()
+/* 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
+$ac_func();
+#endif
 
-        /* Did the file descriptor bug occur?  */
-        || fstat(fileno(stdout), &st) != 0
-        );
-  }
-}
+; return 0; }
 EOF
-if { (eval echo configure:5709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_func_vfork_works=yes
+if { (eval echo configure:6880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_func_vfork_works=no
-fi
-rm -fr conftest*
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
 fi
-
+rm -f conftest*
 fi
 
-echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
-if test $ac_cv_func_vfork_works = no; then
-  cat >> confdefs.h <<\EOF
-#define vfork fork
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
 EOF
-
+else
+  echo "$ac_t""no" 1>&6
 fi
+done
 
-for ac_func in canonicalize_file_name realpath
+for ac_func in sigaction sigprocmask sigsetmask
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5734: checking for $ac_func" >&5
+echo "configure:6907: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5739 "configure"
+#line 6912 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5758,7 +6931,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5782,15 +6955,15 @@ else
 fi
 done
 
-for ac_func in poll
+for ac_func in socketpair
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5789: checking for $ac_func" >&5
+echo "configure:6962: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5794 "configure"
+#line 6967 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5813,7 +6986,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5837,15 +7010,15 @@ else
 fi
 done
 
-for ac_func in sbrk
+for ac_func in syscall
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5844: checking for $ac_func" >&5
+echo "configure:7017: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5849 "configure"
+#line 7022 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5868,7 +7041,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5892,15 +7065,15 @@ else
 fi
 done
 
-for ac_func in setpgid setpgrp
+for ac_func in ttrace
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5899: checking for $ac_func" >&5
+echo "configure:7072: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5904 "configure"
+#line 7077 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5923,7 +7096,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5947,15 +7120,15 @@ else
 fi
 done
 
-for ac_func in sigaction sigprocmask
+for ac_func in wborder
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5954: checking for $ac_func" >&5
+echo "configure:7127: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5959 "configure"
+#line 7132 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -5978,7 +7151,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:5982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -5996,71 +7169,195 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
   cat >> confdefs.h <<EOF
 #define $ac_tr_func 1
 EOF
- sigsetmask
 else
   echo "$ac_t""no" 1>&6
 fi
 done
 
-for ac_func in socketpair
+
+# 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
 do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6009: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
+echo "configure:7198: checking whether $ac_func is declared" >&5
+if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6014 "configure"
+#line 7203 "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* 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();
+#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; }
+EOF
+if { (eval echo configure:7215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  eval "gcc_cv_have_decl_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "gcc_cv_have_decl_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
+#define $ac_tr_decl 1
+EOF
+else
+  echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
+#define $ac_tr_decl 0
+EOF
+  : ${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 <<\EOF
+#define HAVE_DECL_PTRACE 1
+EOF
+fi
+
+# Check return type.
+echo $ac_n "checking return type of ptrace""... $ac_c" 1>&6
+echo "configure:7251: checking return type of ptrace" >&5
+if eval "test \"`echo '$''{'gdb_cv_func_ptrace_ret'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7256 "configure"
+#include "confdefs.h"
+$gdb_ptrace_headers
+int main() {
+extern int ptrace ();
+; return 0; }
+EOF
+if { (eval echo configure:7263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  gdb_cv_func_ptrace_ret='int'
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  gdb_cv_func_ptrace_ret='long'
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gdb_cv_func_ptrace_ret" 1>&6
+cat >> confdefs.h <<EOF
+#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
+EOF
+
+# Check argument types.
+echo $ac_n "checking types of arguments for ptrace""... $ac_c" 1>&6
+echo "configure:7282: checking types of arguments for ptrace" >&5
+if eval "test \"`echo '$''{'gdb_cv_func_ptrace_args'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+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 <<EOF
+#line 7292 "configure"
+#include "confdefs.h"
+$gdb_ptrace_headers
+int main() {
 
+extern $gdb_cv_func_ptrace_ret
+  ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
+
+; return 0; }
+EOF
+if { (eval echo configure:7302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
+    break 4;
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+    for gdb_arg5 in 'int *' 'int' 'long'; do
+     cat > conftest.$ac_ext <<EOF
+#line 7313 "configure"
+#include "confdefs.h"
+$gdb_ptrace_headers
 int main() {
 
-/* 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
-$ac_func();
-#endif
+extern $gdb_cv_func_ptrace_ret
+  ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
 
 ; return 0; }
 EOF
-if { (eval echo configure:6037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
+  
+gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
+    break 5;
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
 fi
 rm -f conftest*
+    done
+   done
+  done
+ done
+done
+# Provide a safe default value.
+: ${gdb_cv_func_ptrace_args='int,int,long,long'}
+
 fi
 
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+echo "$ac_t""$gdb_cv_func_ptrace_args" 1>&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 <<EOF
+#define PTRACE_TYPE_ARG3 $3
+EOF
+
+if test -n "$5"; then
   cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
+#define PTRACE_TYPE_ARG5 $5
 EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
 
+fi
 
 if test "$cross_compiling" = no; then
   echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:6064: checking whether setpgrp takes no argument" >&5
+echo "configure:7361: checking whether setpgrp takes no argument" >&5
 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6068,7 +7365,7 @@ else
   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 6072 "configure"
+#line 7369 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_UNISTD_H
@@ -6088,7 +7385,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:6092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_setpgrp_void=no
 else
@@ -6113,12 +7410,12 @@ fi
 
 else
   echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:6117: checking whether setpgrp takes no argument" >&5
+echo "configure:7414: checking whether setpgrp takes no argument" >&5
 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6122 "configure"
+#line 7419 "configure"
 #include "confdefs.h"
 
 #include <unistd.h>
@@ -6132,7 +7429,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:6136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_func_setpgrp_void=no
 else
@@ -6156,12 +7453,12 @@ fi
 # Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
 # since sigsetjmp might only be defined as a macro.
 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:6160: checking for sigsetjmp" >&5
+echo "configure:7457: checking for sigsetjmp" >&5
 if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6165 "configure"
+#line 7462 "configure"
 #include "confdefs.h"
 
 #include <setjmp.h>
@@ -6170,7 +7467,7 @@ int main() {
 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
 ; return 0; }
 EOF
-if { (eval echo configure:6174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   gdb_cv_func_sigsetjmp=yes
 else
@@ -6190,407 +7487,411 @@ EOF
 
 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 $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
-echo "configure:6197: checking for r_fs in struct reg" >&5
-if eval "test \"`echo '$''{'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 $ac_n "checking for GNU regex""... $ac_c" 1>&6
+echo "configure:7497: checking for GNU regex" >&5
+if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6202 "configure"
+#line 7502 "configure"
 #include "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; }
 EOF
-if { (eval echo configure:6209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  gdb_cv_struct_reg_r_fs=yes
+  gdb_cv_have_gnu_regex=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_struct_reg_r_fs=no
+  gdb_cv_have_gnu_regex=no
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
-if test $gdb_cv_struct_reg_r_fs = yes; then
+echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&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 <<\EOF
-#define HAVE_STRUCT_REG_R_FS 1
+#define USE_INCLUDED_REGEX 1
 EOF
 
 fi
-echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
-echo "configure:6229: checking for r_gs in struct reg" >&5
-if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
+
+# See if <sys/proc.h> defines `struct thread' with a td_pcb member.
+echo $ac_n "checking for td_pcb in struct thread""... $ac_c" 1>&6
+echo "configure:7546: checking for td_pcb in struct thread" >&5
+if eval "test \"`echo '$''{'gdb_cv_struct_thread_td_pcb'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6234 "configure"
+#line 7551 "configure"
 #include "confdefs.h"
-#include <machine/reg.h>
+#include <sys/param.h>
+#include <sys/proc.h>
 int main() {
-struct reg r; r.r_gs;
+struct thread td; td.td_pcb;
 ; return 0; }
 EOF
-if { (eval echo configure:6241: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  gdb_cv_struct_reg_r_gs=yes
+  gdb_cv_struct_thread_td_pcb=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_struct_reg_r_gs=no
+  gdb_cv_struct_thread_td_pcb=no
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
-if test $gdb_cv_struct_reg_r_gs = yes; then
+echo "$ac_t""$gdb_cv_struct_thread_td_pcb" 1>&6
+if test $gdb_cv_struct_thread_td_pcb = yes; then
   cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_REG_R_GS 1
+#define HAVE_STRUCT_THREAD_TD_PCB 1
 EOF
 
 fi
 
-# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
-echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
-echo "configure:6263: checking for PTRACE_GETREGS" >&5
-if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
+# See if <sys/lwp.h> defines `struct lwp`.
+echo $ac_n "checking for struct lwp""... $ac_c" 1>&6
+echo "configure:7581: checking for struct lwp" >&5
+if eval "test \"`echo '$''{'gdb_cv_struct_lwp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6268 "configure"
+#line 7586 "configure"
 #include "confdefs.h"
-#include <sys/ptrace.h>
+#include <sys/param.h>
+#include <sys/lwp.h>
 int main() {
-PTRACE_GETREGS;
+struct lwp l;
 ; return 0; }
 EOF
-if { (eval echo configure:6275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  gdb_cv_have_ptrace_getregs=yes
+  gdb_cv_struct_lwp=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_have_ptrace_getregs=no
+  gdb_cv_struct_lwp=no
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
-if test $gdb_cv_have_ptrace_getregs = yes; then
+echo "$ac_t""$gdb_cv_struct_lwp" 1>&6
+if test $gdb_cv_struct_lwp = yes; then
   cat >> confdefs.h <<\EOF
-#define HAVE_PTRACE_GETREGS 1
+#define HAVE_STRUCT_LWP 1
 EOF
 
 fi
 
-# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
-echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
-echo "configure:6297: checking for PTRACE_GETFPXREGS" >&5
-if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
+# See if <machine/reg.h> degines `struct reg'.
+echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
+echo "configure:7616: checking for struct reg in machine/reg.h" >&5
+if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6302 "configure"
+#line 7621 "configure"
 #include "confdefs.h"
-#include <sys/ptrace.h>
+#include <sys/types.h>
+#include <machine/reg.h>
 int main() {
-PTRACE_GETFPXREGS;
+struct reg r;
 ; return 0; }
 EOF
-if { (eval echo configure:6309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  gdb_cv_have_ptrace_getfpxregs=yes
+  gdb_cv_struct_reg=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_have_ptrace_getfpxregs=no
+  gdb_cv_struct_reg=no
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
-if test $gdb_cv_have_ptrace_getfpxregs = yes; then
+echo "$ac_t""$gdb_cv_struct_reg" 1>&6
+if test $gdb_cv_struct_reg = yes; then
   cat >> confdefs.h <<\EOF
-#define HAVE_PTRACE_GETFPXREGS 1
+#define HAVE_STRUCT_REG 1
 EOF
 
 fi
 
-# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
-echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
-echo "configure:6331: checking for PT_GETDBREGS" >&5
-if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+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 $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
+echo "configure:7652: checking for r_fs in struct reg" >&5
+if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6336 "configure"
+#line 7657 "configure"
 #include "confdefs.h"
-#include <sys/types.h>
-#include <sys/ptrace.h>
+#include <machine/reg.h>
 int main() {
-PT_GETDBREGS;
+struct reg r; r.r_fs;
 ; return 0; }
 EOF
-if { (eval echo configure:6344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  gdb_cv_have_pt_getdbregs=yes
+  gdb_cv_struct_reg_r_fs=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_have_pt_getdbregs=no
+  gdb_cv_struct_reg_r_fs=no
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
-if test $gdb_cv_have_pt_getdbregs = yes; then
+echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
+if test $gdb_cv_struct_reg_r_fs = yes; then
   cat >> confdefs.h <<\EOF
-#define HAVE_PT_GETDBREGS 1
+#define HAVE_STRUCT_REG_R_FS 1
+EOF
+
+fi
+echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
+echo "configure:7684: checking for r_gs in struct reg" >&5
+if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7689 "configure"
+#include "confdefs.h"
+#include <machine/reg.h>
+int main() {
+struct reg r; r.r_gs;
+; return 0; }
+EOF
+if { (eval echo configure:7696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  gdb_cv_struct_reg_r_gs=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  gdb_cv_struct_reg_r_gs=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
+if test $gdb_cv_struct_reg_r_gs = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_REG_R_GS 1
 EOF
 
 fi
 
-# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
-echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
-echo "configure:6366: checking for PT_GETXMMREGS" >&5
-if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
+# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
+echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
+echo "configure:7718: checking for PTRACE_GETREGS" >&5
+if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6371 "configure"
+#line 7723 "configure"
 #include "confdefs.h"
-#include <sys/types.h>
 #include <sys/ptrace.h>
 int main() {
-PT_GETXMMREGS;
+PTRACE_GETREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:6379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  gdb_cv_have_pt_getxmmregs=yes
+  gdb_cv_have_ptrace_getregs=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_have_pt_getxmmregs=no
+  gdb_cv_have_ptrace_getregs=no
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
-if test $gdb_cv_have_pt_getxmmregs = yes; then
+echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
+if test $gdb_cv_have_ptrace_getregs = yes; then
   cat >> confdefs.h <<\EOF
-#define HAVE_PT_GETXMMREGS 1
+#define HAVE_PTRACE_GETREGS 1
 EOF
 
 fi
 
-
-echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:6401: checking whether malloc must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
+# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
+echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
+echo "configure:7752: checking for PTRACE_GETFPXREGS" >&5
+if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6406 "configure"
+#line 7757 "configure"
 #include "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 *(*)) malloc
+PTRACE_GETFPXREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:6427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_decl_needed_malloc=no
+  gdb_cv_have_ptrace_getfpxregs=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_decl_needed_malloc=yes
+  gdb_cv_have_ptrace_getfpxregs=no
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
-if test $bfd_cv_decl_needed_malloc = yes; then
+echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
+if test $gdb_cv_have_ptrace_getfpxregs = yes; then
   cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_MALLOC 1
+#define HAVE_PTRACE_GETFPXREGS 1
 EOF
 
 fi
 
-echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:6448: checking whether realloc must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
+# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
+echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
+echo "configure:7786: checking for PT_GETDBREGS" >&5
+if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6453 "configure"
+#line 7791 "configure"
 #include "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 *(*)) realloc
+PT_GETDBREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:6474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_decl_needed_realloc=no
+  gdb_cv_have_pt_getdbregs=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_decl_needed_realloc=yes
+  gdb_cv_have_pt_getdbregs=no
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
-if test $bfd_cv_decl_needed_realloc = yes; then
+echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
+if test $gdb_cv_have_pt_getdbregs = yes; then
   cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_REALLOC 1
+#define HAVE_PT_GETDBREGS 1
 EOF
 
 fi
 
-echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:6495: checking whether free must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
+# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
+echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
+echo "configure:7821: checking for PT_GETXMMREGS" >&5
+if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6500 "configure"
+#line 7826 "configure"
 #include "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 *(*)) free
+PT_GETXMMREGS;
 ; return 0; }
 EOF
-if { (eval echo configure:6521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_decl_needed_free=no
+  gdb_cv_have_pt_getxmmregs=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_decl_needed_free=yes
+  gdb_cv_have_pt_getxmmregs=no
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
-if test $bfd_cv_decl_needed_free = yes; then
+echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
+if test $gdb_cv_have_pt_getxmmregs = yes; then
   cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_FREE 1
+#define HAVE_PT_GETXMMREGS 1
 EOF
 
 fi
 
-echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
-echo "configure:6542: checking whether strerror must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+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 $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
+echo "configure:7857: checking for uintptr_t in stdint.h" >&5
+if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6547 "configure"
+#line 7862 "configure"
 #include "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 *(*)) strerror
+uintptr_t foo = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:6568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_decl_needed_strerror=no
+  gdb_cv_have_uintptr_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_decl_needed_strerror=yes
+  gdb_cv_have_uintptr_t=no
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
-if test $bfd_cv_decl_needed_strerror = yes; then
+echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
+if test $gdb_cv_have_uintptr_t = yes; then
   cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_STRERROR 1
+#define HAVE_UINTPTR_T 1
 EOF
 
 fi
 
-echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
-echo "configure:6589: checking whether strdup must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
+echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
+echo "configure:7890: checking whether malloc must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6594 "configure"
+#line 7895 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -6608,36 +7909,36 @@ else
 #include <unistd.h>
 #endif
 int main() {
-char *(*pfn) = (char *(*)) strdup
+char *(*pfn) = (char *(*)) malloc
 ; return 0; }
 EOF
-if { (eval echo configure:6615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_decl_needed_strdup=no
+  bfd_cv_decl_needed_malloc=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_decl_needed_strdup=yes
+  bfd_cv_decl_needed_malloc=yes
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
-if test $bfd_cv_decl_needed_strdup = yes; then
+echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
+if test $bfd_cv_decl_needed_malloc = yes; then
   cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_STRDUP 1
+#define NEED_DECLARATION_MALLOC 1
 EOF
 
 fi
 
-echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:6636: checking whether strstr must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
+echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
+echo "configure:7937: checking whether realloc must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6641 "configure"
+#line 7942 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -6655,36 +7956,36 @@ else
 #include <unistd.h>
 #endif
 int main() {
-char *(*pfn) = (char *(*)) strstr
+char *(*pfn) = (char *(*)) realloc
 ; return 0; }
 EOF
-if { (eval echo configure:6662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_decl_needed_strstr=no
+  bfd_cv_decl_needed_realloc=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_decl_needed_strstr=yes
+  bfd_cv_decl_needed_realloc=yes
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
-if test $bfd_cv_decl_needed_strstr = yes; then
+echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
+if test $bfd_cv_decl_needed_realloc = yes; then
   cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_STRSTR 1
+#define NEED_DECLARATION_REALLOC 1
 EOF
 
 fi
 
-echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
-echo "configure:6683: checking whether canonicalize_file_name must be declared" >&5
-if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
+echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
+echo "configure:7984: checking whether free must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6688 "configure"
+#line 7989 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
 #include <unistd.h>
 #endif
 int main() {
-char *(*pfn) = (char *(*)) canonicalize_file_name
-; return 0; }
-EOF
-if { (eval echo configure:6709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  bfd_cv_decl_needed_canonicalize_file_name=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  bfd_cv_decl_needed_canonicalize_file_name=yes
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
-if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
-  cat >> confdefs.h <<\EOF
-#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
-EOF
-
-fi
-
-
-# The following save_state_t checkery is only necessary for HPUX 
-# versions earlier than 10.20.  When those fade from memory, this 
-# could be expunged. --jsm 1999-03-22
-
-echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
-echo "configure:6735: checking for HPUX save_state structure" >&5
-cat > conftest.$ac_ext <<EOF
-#line 6737 "configure"
-#include "confdefs.h"
-#include <machine/save_state.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "save_state_t" >/dev/null 2>&1; then
-  rm -rf conftest*
-  gdb_cv_hpux_savestate=yes
-else
-  rm -rf conftest*
-  gdb_cv_hpux_savestate=no
-fi
-rm -f conftest*
-
-cat > conftest.$ac_ext <<EOF
-#line 6752 "configure"
-#include "confdefs.h"
-#include <machine/save_state.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "ss_wide" >/dev/null 2>&1; then
-  rm -rf conftest*
-  gdb_cv_hpux_sswide=yes
-else
-  rm -rf conftest*
-  gdb_cv_hpux_sswide=no
-fi
-rm -f conftest*
-
-if test $gdb_cv_hpux_savestate = yes
-then
-  cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_SAVE_STATE_T 1
-EOF
-
-fi
-if test $gdb_cv_hpux_sswide = yes
-then
-  cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_MEMBER_SS_WIDE 1
-EOF
-
-fi
-echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
-
-
-# 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.
-
-if test "${target}" = "${host}"; then
-  case "${host}" in
-  i[3456]86-*-linux*)
-       cat >> confdefs.h <<\EOF
-#define START_INFERIOR_TRAPS_EXPECTED 2
-EOF
-
-       cat >> confdefs.h <<\EOF
-#define sys_quotactl 1
-EOF
-
-       ;;
-  ia64-*-aix*)
-      cat >> confdefs.h <<\EOF
-#define NEW_PROC_API 1
-EOF
-
-      ;;
-  *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
-      cat >> confdefs.h <<\EOF
-#define NEW_PROC_API 1
-EOF
-
-      ;;
-  *-*-solaris2.[678])
-      cat >> confdefs.h <<\EOF
-#define NEW_PROC_API 1
-EOF
-
-      ;;
-  esac
-fi
-
-if test "$ac_cv_header_sys_procfs_h" = yes; then
-  echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6822: checking for pstatus_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6827 "configure"
-#include "confdefs.h"
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int main() {
-pstatus_t avar
-; return 0; }
-EOF
-if { (eval echo configure:6836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_pstatus_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_pstatus_t=no
-   
-fi
-rm -f conftest*
-fi
-
- if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
-   cat >> confdefs.h <<\EOF
-#define HAVE_PSTATUS_T 1
-EOF
-
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
-
-  echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6858: checking for prrun_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6863 "configure"
-#include "confdefs.h"
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int main() {
-prrun_t avar
-; return 0; }
-EOF
-if { (eval echo configure:6872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_prrun_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_prrun_t=no
-   
-fi
-rm -f conftest*
-fi
-
- if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
-   cat >> confdefs.h <<\EOF
-#define HAVE_PRRUN_T 1
-EOF
-
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
-
-  echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6894: checking for gregset_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6899 "configure"
-#include "confdefs.h"
-
-#define _SYSCALL32
-#include <sys/procfs.h>
-int main() {
-gregset_t avar
+char *(*pfn) = (char *(*)) free
 ; return 0; }
 EOF
-if { (eval echo configure:6908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_gregset_t=yes
+  bfd_cv_decl_needed_free=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_gregset_t=no
-   
+  bfd_cv_decl_needed_free=yes
 fi
 rm -f conftest*
 fi
 
- if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
-   cat >> confdefs.h <<\EOF
-#define HAVE_GREGSET_T 1
+echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
+if test $bfd_cv_decl_needed_free = yes; then
+  cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_FREE 1
 EOF
 
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
+fi
 
-  echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6930: checking for fpregset_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
+echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
+echo "configure:8031: checking whether strerror must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6935 "configure"
+#line 8036 "configure"
 #include "confdefs.h"
 
-#define _SYSCALL32
-#include <sys/procfs.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() {
-fpregset_t avar
+char *(*pfn) = (char *(*)) strerror
 ; return 0; }
 EOF
-if { (eval echo configure:6944: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_fpregset_t=yes
+  bfd_cv_decl_needed_strerror=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_fpregset_t=no
-   
+  bfd_cv_decl_needed_strerror=yes
 fi
 rm -f conftest*
 fi
 
- if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
-   cat >> confdefs.h <<\EOF
-#define HAVE_FPREGSET_T 1
+echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
+if test $bfd_cv_decl_needed_strerror = yes; then
+  cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_STRERROR 1
 EOF
 
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
+fi
 
-  echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6966: checking for prgregset_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
+echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
+echo "configure:8078: checking whether strdup must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6971 "configure"
+#line 8083 "configure"
 #include "confdefs.h"
 
-#define _SYSCALL32
-#include <sys/procfs.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() {
-prgregset_t avar
+char *(*pfn) = (char *(*)) strdup
 ; return 0; }
 EOF
-if { (eval echo configure:6980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_prgregset_t=yes
+  bfd_cv_decl_needed_strdup=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_prgregset_t=no
-   
+  bfd_cv_decl_needed_strdup=yes
 fi
 rm -f conftest*
 fi
 
- if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
-   cat >> confdefs.h <<\EOF
-#define HAVE_PRGREGSET_T 1
+echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
+if test $bfd_cv_decl_needed_strdup = yes; then
+  cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_STRDUP 1
 EOF
 
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
+fi
 
-  echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7002: checking for prfpregset_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
+echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
+echo "configure:8125: checking whether strstr must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7007 "configure"
+#line 8130 "configure"
 #include "confdefs.h"
 
-#define _SYSCALL32
-#include <sys/procfs.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() {
-prfpregset_t avar
+char *(*pfn) = (char *(*)) strstr
 ; return 0; }
 EOF
-if { (eval echo configure:7016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_prfpregset_t=yes
+  bfd_cv_decl_needed_strstr=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_prfpregset_t=no
-   
+  bfd_cv_decl_needed_strstr=yes
 fi
 rm -f conftest*
 fi
 
- if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
-   cat >> confdefs.h <<\EOF
-#define HAVE_PRFPREGSET_T 1
+echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
+if test $bfd_cv_decl_needed_strstr = yes; then
+  cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_STRSTR 1
 EOF
 
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
+fi
 
-  echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7038: checking for prgregset32_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
+echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
+echo "configure:8172: checking whether canonicalize_file_name must be declared" >&5
+if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7043 "configure"
+#line 8177 "configure"
 #include "confdefs.h"
 
-#define _SYSCALL32
-#include <sys/procfs.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() {
-prgregset32_t avar
+char *(*pfn) = (char *(*)) canonicalize_file_name
 ; return 0; }
 EOF
-if { (eval echo configure:7052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_prgregset32_t=yes
+  bfd_cv_decl_needed_canonicalize_file_name=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_prgregset32_t=no
-   
+  bfd_cv_decl_needed_canonicalize_file_name=yes
 fi
 rm -f conftest*
 fi
 
- if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
-   cat >> confdefs.h <<\EOF
-#define HAVE_PRGREGSET32_T 1
+echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
+if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
+  cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
 EOF
 
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
+fi
 
-  echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7074: checking for prfpregset32_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 7079 "configure"
+
+# The following save_state_t checkery is only necessary for HPUX 
+# versions earlier than 10.20.  When those fade from memory, this 
+# could be expunged. --jsm 1999-03-22
+
+echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
+echo "configure:8224: checking for HPUX save_state structure" >&5
+cat > conftest.$ac_ext <<EOF
+#line 8226 "configure"
 #include "confdefs.h"
+#include <machine/save_state.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "save_state_t" >/dev/null 2>&1; then
+  rm -rf conftest*
+  gdb_cv_hpux_savestate=yes
+else
+  rm -rf conftest*
+  gdb_cv_hpux_savestate=no
+fi
+rm -f conftest*
 
-#define _SYSCALL32
-#include <sys/procfs.h>
-int main() {
-prfpregset32_t avar
-; return 0; }
+cat > conftest.$ac_ext <<EOF
+#line 8241 "configure"
+#include "confdefs.h"
+#include <machine/save_state.h>
 EOF
-if { (eval echo configure:7088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ss_wide" >/dev/null 2>&1; then
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
+  gdb_cv_hpux_sswide=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_prfpregset32_t=no
-   
+  gdb_cv_hpux_sswide=no
 fi
 rm -f conftest*
+
+if test $gdb_cv_hpux_savestate = yes
+then
+  cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_SAVE_STATE_T 1
+EOF
+
 fi
+if test $gdb_cv_hpux_sswide = yes
+then
+  cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_MEMBER_SS_WIDE 1
+EOF
 
- if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
-   cat >> confdefs.h <<\EOF
-#define HAVE_PRFPREGSET32_T 1
+fi
+echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
+
+
+# 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.
+
+if test "${target}" = "${host}"; then
+  case "${host}" in
+  i[3456]86-*-linux*)
+       cat >> confdefs.h <<\EOF
+#define START_INFERIOR_TRAPS_EXPECTED 2
 EOF
 
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
+       cat >> confdefs.h <<\EOF
+#define sys_quotactl 1
+EOF
 
-  echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7110: checking for lwpid_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 7115 "configure"
-#include "confdefs.h"
+       ;;
+  ia64-*-aix*)
+      cat >> confdefs.h <<\EOF
+#define NEW_PROC_API 1
+EOF
 
-#define _SYSCALL32
-#include <sys/procfs.h>
-int main() {
-lwpid_t avar
-; return 0; }
+      ;;
+  *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
+      cat >> confdefs.h <<\EOF
+#define NEW_PROC_API 1
+EOF
+
+      ;;
+  *-*-solaris2.[6789] | *-*-solaris2.1[0-9])
+      cat >> confdefs.h <<\EOF
+#define NEW_PROC_API 1
 EOF
-if { (eval echo configure:7124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_lwpid_t=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_lwpid_t=no
-   
-fi
-rm -f conftest*
-fi
 
- if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
-   cat >> confdefs.h <<\EOF
-#define HAVE_LWPID_T 1
+      ;;
+  mips-sgi-irix5*)
+      # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
+      cat >> confdefs.h <<\EOF
+#define _KMEMUSER 1
 EOF
 
- fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
+      ;;
+  esac
+fi
 
-  echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7146: checking for psaddr_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
+if test "$ac_cv_header_sys_procfs_h" = yes; then
+  echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8318: checking for pstatus_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7151 "configure"
+#line 8323 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
 #include <sys/procfs.h>
 int main() {
-psaddr_t avar
+pstatus_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_psaddr_t=yes
+  bfd_cv_have_sys_procfs_type_pstatus_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_psaddr_t=no
+  bfd_cv_have_sys_procfs_type_pstatus_t=no
    
 fi
 rm -f conftest*
 fi
 
- if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
+ if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
    cat >> confdefs.h <<\EOF
-#define HAVE_PSADDR_T 1
+#define HAVE_PSTATUS_T 1
 EOF
 
  fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
 
-  echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7182: checking for prsysent_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
+  echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8354: checking for prrun_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7187 "configure"
+#line 8359 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
 #include <sys/procfs.h>
 int main() {
-prsysent_t avar
+prrun_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_prsysent_t=yes
+  bfd_cv_have_sys_procfs_type_prrun_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_prsysent_t=no
+  bfd_cv_have_sys_procfs_type_prrun_t=no
    
 fi
 rm -f conftest*
 fi
 
- if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
+ if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
    cat >> confdefs.h <<\EOF
-#define HAVE_PRSYSENT_T 1
+#define HAVE_PRRUN_T 1
 EOF
 
  fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
 
-  echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7218: checking for pr_sigset_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
+  echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8390: checking for gregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7223 "configure"
+#line 8395 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
 #include <sys/procfs.h>
 int main() {
-pr_sigset_t avar
+gregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
+  bfd_cv_have_sys_procfs_type_gregset_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_pr_sigset_t=no
+  bfd_cv_have_sys_procfs_type_gregset_t=no
    
 fi
 rm -f conftest*
 fi
 
- if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
+ if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
    cat >> confdefs.h <<\EOF
-#define HAVE_PR_SIGSET_T 1
+#define HAVE_GREGSET_T 1
 EOF
 
  fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
 
-  echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7254: checking for pr_sigaction64_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
+  echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8426: checking for fpregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7259 "configure"
+#line 8431 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
 #include <sys/procfs.h>
 int main() {
-pr_sigaction64_t avar
+fpregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
+  bfd_cv_have_sys_procfs_type_fpregset_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
+  bfd_cv_have_sys_procfs_type_fpregset_t=no
    
 fi
 rm -f conftest*
 fi
 
- if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
+ if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
    cat >> confdefs.h <<\EOF
-#define HAVE_PR_SIGACTION64_T 1
+#define HAVE_FPREGSET_T 1
 EOF
 
  fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
 
-  echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7290: checking for pr_siginfo64_t in sys/procfs.h" >&5
- if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
+  echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8462: checking for prgregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7295 "configure"
+#line 8467 "configure"
 #include "confdefs.h"
 
 #define _SYSCALL32
 #include <sys/procfs.h>
 int main() {
-pr_siginfo64_t avar
+prgregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
+  bfd_cv_have_sys_procfs_type_prgregset_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
+  bfd_cv_have_sys_procfs_type_prgregset_t=no
    
 fi
 rm -f conftest*
 fi
 
- if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
+ if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
    cat >> confdefs.h <<\EOF
-#define HAVE_PR_SIGINFO64_T 1
+#define HAVE_PRGREGSET_T 1
 EOF
 
  fi
- echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
-
-
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
 
-  
-        
-  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
-    echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
-echo "configure:7331: checking whether prfpregset_t type is broken" >&5
-    if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
+  echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8498: checking for prfpregset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  gdb_cv_prfpregset_t_broken=yes
 else
   cat > conftest.$ac_ext <<EOF
-#line 7339 "configure"
+#line 8503 "configure"
 #include "confdefs.h"
-#include <sys/procfs.h>
-       int main ()
-       {
-         if (sizeof (prfpregset_t) == sizeof (void *))
-           return 1;
-         return 0;
-       }
-EOF
-if { (eval echo configure:7349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  gdb_cv_prfpregset_t_broken=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  gdb_cv_prfpregset_t_broken=yes
-fi
-rm -fr conftest*
-fi
-
-fi
-
-    echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
-    if test $gdb_cv_prfpregset_t_broken = yes; then
-      cat >> confdefs.h <<\EOF
-#define PRFPREGSET_T_BROKEN 1
-EOF
 
-    fi
-  fi
-
-  
-  echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:7374: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
-  if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 7379 "configure"
-#include "confdefs.h"
-#include <unistd.h>
-#include <sys/types.h>
+#define _SYSCALL32
 #include <sys/procfs.h>
-
-int main() {
-
-    int dummy;;
-    dummy = ioctl(0, PIOCSET, &dummy);
-  
-; return 0; }
-EOF
-if { (eval echo configure:7392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  gdb_cv_have_procfs_piocset=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gdb_cv_have_procfs_piocset=no
-fi
-rm -f conftest*
-fi
-
-  echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
-  if test $gdb_cv_have_procfs_piocset = yes; then
-    cat >> confdefs.h <<\EOF
-#define HAVE_PROCFS_PIOCSET 1
-EOF
-
-  fi
-fi
-
-if test ${host} = ${target} ; then
-    
-  echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:7416: checking for member l_addr in struct link_map" >&5
-  if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 7421 "configure"
-#include "confdefs.h"
-#include <link.h>
-int main() {
-struct link_map lm; (void) lm.l_addr;
-; return 0; }
-EOF
-if { (eval echo configure:7428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  gdb_cv_have_struct_link_map_with_l_members=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gdb_cv_have_struct_link_map_with_l_members=no
-fi
-rm -f conftest*
-fi
-
-  echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
-  if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
-    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
-EOF
-
-  fi
-
-    
-  echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
-echo "configure:7450: checking for member lm_addr in struct link_map" >&5
-  if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 7455 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <link.h>
 int main() {
-struct link_map lm; (void) lm.lm_addr;
+prfpregset_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  gdb_cv_have_struct_link_map_with_lm_members=yes
+  bfd_cv_have_sys_procfs_type_prfpregset_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_have_struct_link_map_with_lm_members=no
+  bfd_cv_have_sys_procfs_type_prfpregset_t=no
+   
 fi
 rm -f conftest*
 fi
 
-  echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
-  if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
-    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
+ if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_PRFPREGSET_T 1
 EOF
 
-  fi
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
 
-    
-  echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
-echo "configure:7485: checking for member som_addr in struct so_map" >&5
-  if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
+  echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8534: checking for prgregset32_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 7490 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#ifdef HAVE_NLIST_H
-#include <nlist.h>
-#endif
-#include <link.h>
+else
+  cat > conftest.$ac_ext <<EOF
+#line 8539 "configure"
+#include "confdefs.h"
+
+#define _SYSCALL32
+#include <sys/procfs.h>
 int main() {
-struct so_map lm; (void) lm.som_addr;
+prgregset32_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  gdb_cv_have_struct_so_map_with_som_members=yes
+  bfd_cv_have_sys_procfs_type_prgregset32_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_have_struct_so_map_with_som_members=no
+  bfd_cv_have_sys_procfs_type_prgregset32_t=no
+   
 fi
 rm -f conftest*
 fi
 
-  echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
-  if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
-    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
+ if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_PRGREGSET32_T 1
 EOF
 
-  fi
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
 
-    
-  echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
-echo "configure:7523: checking for struct link_map32 in sys/link.h" >&5
-  if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
+  echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8570: checking for prfpregset32_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7528 "configure"
+#line 8575 "configure"
 #include "confdefs.h"
+
 #define _SYSCALL32
-#include <sys/link.h>
+#include <sys/procfs.h>
 int main() {
-struct link_map32 l;
+prfpregset32_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  gdb_cv_have_struct_link_map32=yes
+  bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_have_struct_link_map32=no
+  bfd_cv_have_sys_procfs_type_prfpregset32_t=no
+   
 fi
 rm -f conftest*
 fi
 
-  echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
-  if test $gdb_cv_have_struct_link_map32 = yes; then
-    cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_LINK_MAP32 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define _SYSCALL32 1
+ if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_PRFPREGSET32_T 1
 EOF
 
-  fi
-fi
-
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
 
-echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
-echo "configure:7563: checking for long long support in compiler" >&5
-if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
+  echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8606: checking for lwpid_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7568 "configure"
+#line 8611 "configure"
 #include "confdefs.h"
 
+#define _SYSCALL32
+#include <sys/procfs.h>
 int main() {
-
-  extern long long foo;
-  switch (foo & 2) { case 0: return 1; }
-
+lwpid_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  gdb_cv_c_long_long=yes
+  bfd_cv_have_sys_procfs_type_lwpid_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_c_long_long=no
+  bfd_cv_have_sys_procfs_type_lwpid_t=no
+   
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$gdb_cv_c_long_long" 1>&6
-if test $gdb_cv_c_long_long = yes; then
-  cat >> confdefs.h <<\EOF
-#define CC_HAS_LONG_LONG 1
+ if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_LWPID_T 1
 EOF
 
-fi
-
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
 
-echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
-echo "configure:7600: checking for long long support in printf" >&5
-if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
+  echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8642: checking for psaddr_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  gdb_cv_printf_has_long_long=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 7608 "configure"
+#line 8647 "configure"
 #include "confdefs.h"
 
-int main () {
-  char buf[32];
-  long long l = 0;
-  l = (l << 16) + 0x0123;
-  l = (l << 16) + 0x4567;
-  l = (l << 16) + 0x89ab;
-  l = (l << 16) + 0xcdef;
-  sprintf (buf, "0x%016llx", l);
-  return (strcmp ("0x0123456789abcdef", buf));
-}
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+psaddr_t avar
+; return 0; }
 EOF
-if { (eval echo configure:7622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  gdb_cv_printf_has_long_long=yes
+if { (eval echo configure:8656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_psaddr_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  gdb_cv_printf_has_long_long=no
-fi
-rm -fr conftest*
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_psaddr_t=no
+   
 fi
-
+rm -f conftest*
 fi
 
-if test $gdb_cv_printf_has_long_long = yes; then
-  cat >> confdefs.h <<\EOF
-#define PRINTF_HAS_LONG_LONG 1
+ if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_PSADDR_T 1
 EOF
 
-fi
-echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
-
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
 
-echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
-echo "configure:7646: checking for long double support in compiler" >&5
-if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
+  echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8678: checking for prsysent_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7651 "configure"
+#line 8683 "configure"
 #include "confdefs.h"
 
+#define _SYSCALL32
+#include <sys/procfs.h>
 int main() {
-long double foo;
+prsysent_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  ac_cv_c_long_double=yes
+  bfd_cv_have_sys_procfs_type_prsysent_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  ac_cv_c_long_double=no
+  bfd_cv_have_sys_procfs_type_prsysent_t=no
+   
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$ac_cv_c_long_double" 1>&6
-if test $ac_cv_c_long_double = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_LONG_DOUBLE 1
+ if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_PRSYSENT_T 1
 EOF
 
-fi
-
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
 
-echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
-echo "configure:7680: checking for long double support in printf" >&5
-if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
+  echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8714: checking for pr_sigset_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  gdb_cv_printf_has_long_double=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 7688 "configure"
+#line 8719 "configure"
 #include "confdefs.h"
 
-int main () {
-  char buf[16];
-  long double f = 3.141592653;
-  sprintf (buf, "%Lg", f);
-  return (strncmp ("3.14159", buf, 7));
-}
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+pr_sigset_t avar
+; return 0; }
 EOF
-if { (eval echo configure:7698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  gdb_cv_printf_has_long_double=yes
+if { (eval echo configure:8728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  gdb_cv_printf_has_long_double=no
-fi
-rm -fr conftest*
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_pr_sigset_t=no
+   
 fi
-
+rm -f conftest*
 fi
 
-if test $gdb_cv_printf_has_long_double = yes; then
-  cat >> confdefs.h <<\EOF
-#define PRINTF_HAS_LONG_DOUBLE 1
+ if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_PR_SIGSET_T 1
 EOF
 
-fi
-echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
-
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
 
-echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
-echo "configure:7722: checking for long double support in scanf" >&5
-if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
+  echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8750: checking for pr_sigaction64_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  gdb_cv_scanf_has_long_double=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 7730 "configure"
+#line 8755 "configure"
 #include "confdefs.h"
 
-int main () {
-  char *buf = "3.141592653";
-  long double f = 0;
-  sscanf (buf, "%Lg", &f);
-  return !(f > 3.14159 && f < 3.14160);
-}
+#define _SYSCALL32
+#include <sys/procfs.h>
+int main() {
+pr_sigaction64_t avar
+; return 0; }
 EOF
-if { (eval echo configure:7740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  gdb_cv_scanf_has_long_double=yes
+if { (eval echo configure:8764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  gdb_cv_scanf_has_long_double=no
-fi
-rm -fr conftest*
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
+   
 fi
-
+rm -f conftest*
 fi
 
-if test $gdb_cv_scanf_has_long_double = yes; then
-  cat >> confdefs.h <<\EOF
-#define SCANF_HAS_LONG_DOUBLE 1
+ if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_PR_SIGACTION64_T 1
 EOF
 
-fi
-echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
 
-case ${host_os} in
-aix*)
-  echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
-echo "configure:7765: checking for -bbigtoc option" >&5
-if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
+  echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8786: checking for pr_siginfo64_t in sys/procfs.h" >&5
+ if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  
-    SAVE_LDFLAGS=$LDFLAGS
-
-    case $GCC in
-    yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
-    *) gdb_cv_bigtoc=-bbigtoc ;;
-    esac
-
-    LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
-    cat > conftest.$ac_ext <<EOF
-#line 7779 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 8791 "configure"
 #include "confdefs.h"
 
+#define _SYSCALL32
+#include <sys/procfs.h>
 int main() {
-int i;
+pr_siginfo64_t avar
 ; return 0; }
 EOF
-if { (eval echo configure:7786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  :
+if { (eval echo configure:8800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_bigtoc=
+  bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
+   
 fi
 rm -f conftest*
-  
 fi
 
-echo "$ac_t""$gdb_cv_bigtoc" 1>&6
-  CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
-  ;;
-esac
-
+ if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
+   cat >> confdefs.h <<\EOF
+#define HAVE_PR_SIGINFO64_T 1
+EOF
 
+ fi
+ echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
 
-if test ${build} = ${host} -a ${host} = ${target} ; then
-   case ${host_os} in
-   hpux*)
-      echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
-echo "configure:7809: checking for HPUX/OSF thread support" >&5
-      if test -f /usr/include/dce/cma_config.h ; then
-         if test "$GCC" = "yes" ; then
-            echo "$ac_t""yes" 1>&6
-            cat >> confdefs.h <<\EOF
-#define HAVE_HPUX_THREAD_SUPPORT 1
-EOF
 
-            CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
-            CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
-         else
-            echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
-         fi
-      else
-         echo "$ac_t""no" 1>&6
-      fi
-      ;;
-   solaris*)
-      # See if thread_db library is around for Solaris thread debugging.
-      # Note that we must explicitly test for version 1 of the library
-      # because version 0 (present on Solaris 2.4 or earlier) doesn't have
-      # the same API.
-      echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
-echo "configure:7832: checking for Solaris thread debugging library" >&5
-      if test -f /usr/lib/libthread_db.so.1 ; then
-         echo "$ac_t""yes" 1>&6
-         cat >> confdefs.h <<\EOF
-#define HAVE_THREAD_DB_LIB 1
-EOF
 
-         CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
-         CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
-         echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:7842: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  
+        
+  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
+    echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
+echo "configure:8827: checking whether prfpregset_t type is broken" >&5
+    if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 7850 "configure"
+  if test "$cross_compiling" = yes; then
+  gdb_cv_prfpregset_t_broken=yes
+else
+  cat > conftest.$ac_ext <<EOF
+#line 8835 "configure"
 #include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
+#include <sys/procfs.h>
+       int main ()
+       {
+         if (sizeof (prfpregset_t) == sizeof (void *))
+           return 1;
+         return 0;
+       }
 EOF
-if { (eval echo configure:7861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
+if { (eval echo configure:8845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  gdb_cv_prfpregset_t_broken=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  rm -fr conftest*
+  gdb_cv_prfpregset_t_broken=yes
+fi
+rm -fr conftest*
 fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
 
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+
+    echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
+    if test $gdb_cv_prfpregset_t_broken = yes; then
+      cat >> confdefs.h <<\EOF
+#define PRFPREGSET_T_BROKEN 1
 EOF
 
-  LIBS="-ldl $LIBS"
+    fi
+  fi
 
+  
+  echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
+echo "configure:8870: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
+  if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  echo "$ac_t""no" 1>&6
-fi
-
-         if test "$GCC" = "yes" ; then
-            # The GNU linker requires the -export-dynamic option to make
-            # all symbols visible in the dynamic symbol table.
-            hold_ldflags=$LDFLAGS
-            echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
-echo "configure:7893: checking for the ld -export-dynamic flag" >&5
-            LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
-            cat > conftest.$ac_ext <<EOF
-#line 7896 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 8875 "configure"
 #include "confdefs.h"
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/procfs.h>
 
 int main() {
-int i;
+
+    int dummy;;
+    dummy = ioctl(0, PIOCSET, &dummy);
+  
 ; return 0; }
 EOF
-if { (eval echo configure:7903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  found=yes
+  gdb_cv_have_procfs_piocset=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  found=no
+  gdb_cv_have_procfs_piocset=no
 fi
 rm -f conftest*
-            LDFLAGS=$hold_ldflags
-            echo "$ac_t""$found" 1>&6
-            if test $found = yes; then
-               CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
-            fi
-         fi
-        # Sun randomly tweaked the prototypes in <proc_service.h>
-        # at one point.
-        echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
-echo "configure:7922: checking if <proc_service.h> is old" >&5
-        if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
+fi
+
+  echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
+  if test $gdb_cv_have_procfs_piocset = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_PROCFS_PIOCSET 1
+EOF
+
+  fi
+fi
+
+if test ${host} = ${target} ; then
+    
+  echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
+echo "configure:8912: checking for member l_addr in struct link_map" >&5
+  if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  
-           cat > conftest.$ac_ext <<EOF
-#line 7928 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 8917 "configure"
 #include "confdefs.h"
-
-               #include <proc_service.h>
-               ps_err_e ps_pdwrite
-                   (struct ps_prochandle*, psaddr_t, const void*, size_t);
-           
+#include <link.h>
 int main() {
-
+struct link_map lm; (void) lm.l_addr;
 ; return 0; }
 EOF
-if { (eval echo configure:7939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  gdb_cv_proc_service_is_old=no
+  gdb_cv_have_struct_link_map_with_l_members=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_proc_service_is_old=yes
+  gdb_cv_have_struct_link_map_with_l_members=no
 fi
 rm -f conftest*
-        
 fi
 
-        echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
-        if test $gdb_cv_proc_service_is_old = yes; then
-           cat >> confdefs.h <<\EOF
-#define PROC_SERVICE_IS_OLD 1
+  echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
+  if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
 EOF
 
-        fi
-      else
-         echo "$ac_t""no" 1>&6
-      fi
-      ;;
-   aix*)
-      echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
-echo "configure:7965: checking for AiX thread debugging library" >&5
-      if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
+  fi
+
+    
+  echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
+echo "configure:8946: checking for member lm_addr in struct link_map" >&5
+  if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7970 "configure"
+#line 8951 "configure"
 #include "confdefs.h"
-#include <sys/pthdebug.h>
+#include <sys/types.h>
+#include <link.h>
 int main() {
-#ifndef PTHDB_VERSION_3
-                                    #error
-                                    #endif
+struct link_map lm; (void) lm.lm_addr;
 ; return 0; }
 EOF
-if { (eval echo configure:7979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  gdb_cv_have_aix_thread_debug=yes
+  gdb_cv_have_struct_link_map_with_lm_members=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_have_aix_thread_debug=no
+  gdb_cv_have_struct_link_map_with_lm_members=no
 fi
 rm -f conftest*
 fi
 
-      echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
-      if test $gdb_cv_have_aix_thread_debug = yes; then
-         CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
-         CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
-         CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
-      fi
-      ;;
-   esac
-   
-fi
+  echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
+  if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
+EOF
 
-if test "x$ac_cv_header_thread_db_h" = "xyes"; then
-   echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
-echo "configure:8004: checking whether <thread_db.h> has TD_NOTALLOC" >&5
-if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
+  fi
+
+    
+  echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
+echo "configure:8981: checking for member som_addr in struct so_map" >&5
+  if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 8009 "configure"
+#line 8986 "configure"
 #include "confdefs.h"
-#include <thread_db.h>
+#include <sys/types.h>
+#ifdef HAVE_NLIST_H
+#include <nlist.h>
+#endif
+#include <link.h>
 int main() {
-int i = TD_NOTALLOC;
+struct so_map lm; (void) lm.som_addr;
 ; return 0; }
 EOF
-if { (eval echo configure:8016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  gdb_cv_thread_db_h_has_td_notalloc=yes
+  gdb_cv_have_struct_so_map_with_som_members=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_thread_db_h_has_td_notalloc=no
-     
+  gdb_cv_have_struct_so_map_with_som_members=no
 fi
 rm -f conftest*
-   
 fi
 
-echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
-fi
-if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
-  cat >> confdefs.h <<\EOF
-#define THREAD_DB_HAS_TD_NOTALLOC 1
+  echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
+  if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
 EOF
 
-fi
+  fi
 
-if test $host = $target; then
-  case $target in
-    *-linux*)
-      save_CFLAGS=$CFLAGS
-      CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
-      cat > conftest.$ac_ext <<EOF
-#line 8045 "configure"
+    
+  echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
+echo "configure:9019: checking for struct link_map32 in sys/link.h" >&5
+  if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 9024 "configure"
 #include "confdefs.h"
-#include <unistd.h>
+#define _SYSCALL32
+#include <sys/link.h>
 int main() {
-pread64 (0, NULL, 0, 0);
+struct link_map32 l;
 ; return 0; }
 EOF
-if { (eval echo configure:8052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
-                  cat >> confdefs.h <<\EOF
-#define HAVE_PREAD64 1
-EOF
-
+  gdb_cv_have_struct_link_map32=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  gdb_cv_have_struct_link_map32=no
 fi
 rm -f conftest*
-      CFLAGS=$save_CFLAGS
-      ;;
-  esac
 fi
 
+  echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
+  if test $gdb_cv_have_struct_link_map32 = yes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_LINK_MAP32 1
+EOF
 
-# Check whether --enable-gdbcli or --disable-gdbcli was given.
-if test "${enable_gdbcli+set}" = set; then
-  enableval="$enable_gdbcli"
-  
-  case "${enableval}" in
-    yes) enable_gdbcli=yes ;;
-    "") enable_gdbcli=yes ;;
-    no) 
-      { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; }
-    ;;
-    *)
-      { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; }
-    ;;
-  esac
+    cat >> confdefs.h <<\EOF
+#define _SYSCALL32 1
+EOF
 
-else
-  enable_gdbcli=yes
+  fi
 fi
 
-case ${enable_gdbcli} in
-  "yes" )
-    if test -d "${srcdir}/cli" ; then
-      CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)"
-      CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)"
-      CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)"
-      CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)"
-      ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)"
-      CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)"
-      CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)"
-      CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)"
-      CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)"
-    fi
-    ;;
-esac
 
+echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
+echo "configure:9059: checking for long long support in compiler" >&5
+if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 9064 "configure"
+#include "confdefs.h"
 
-# Check whether --enable-gdbmi or --disable-gdbmi was given.
-if test "${enable_gdbmi+set}" = set; then
-  enableval="$enable_gdbmi"
-  
-  case "${enable_gdbmi}" in
-    yes | no) ;;
-    "")  enable_gdbmi=yes ;;
-    *)
-      { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; }
-    ;;
-  esac
+int main() {
+
+  extern long long foo;
+  switch (foo & 2) { case 0: return 1; }
 
+; return 0; }
+EOF
+if { (eval echo configure:9074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  gdb_cv_c_long_long=yes
 else
-  enable_gdbmi=yes
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  gdb_cv_c_long_long=no
+fi
+rm -f conftest*
 fi
 
-case ${enable_gdbmi} in
-  "yes" )
-    if test -d "${srcdir}/mi" ; then
-      CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
-      CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
-      CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)"
-      CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
-      ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)"
-      CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)"
-      CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)"
-      CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)"
-      CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)"
-    fi
-    ;;
-esac
-
-# Configure UI_OUT by default (before 5.2 it can be disabled)
-# It must be configured if gdbmi is configured
+echo "$ac_t""$gdb_cv_c_long_long" 1>&6
+if test $gdb_cv_c_long_long = yes; then
+  cat >> confdefs.h <<\EOF
+#define CC_HAS_LONG_LONG 1
+EOF
 
-UIOUT_CFLAGS=
+fi
 
 
-# Check whether --with-uiout or --without-uiout was given.
-if test "${with_uiout+set}" = set; then
-  withval="$with_uiout"
-  case "${withval}" in
-  yes)  want_uiout=true ;;
-  no)   if test $enable_gdbmi = yes; then
-          { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; }
-        else
-           want_uiout=false
-        fi ;;
-  *)    { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;;
-esac
+echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
+echo "configure:9096: checking for long long support in printf" >&5
+if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  want_uiout=true
-fi
+  if test "$cross_compiling" = yes; then
+  gdb_cv_printf_has_long_long=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 9104 "configure"
+#include "confdefs.h"
 
-if test $want_uiout = true; then
-   UIOUT_CFLAGS="-DUI_OUT=1"
+int main () {
+  char buf[32];
+  long long l = 0;
+  l = (l << 16) + 0x0123;
+  l = (l << 16) + 0x4567;
+  l = (l << 16) + 0x89ab;
+  l = (l << 16) + 0xcdef;
+  sprintf (buf, "0x%016llx", l);
+  return (strcmp ("0x0123456789abcdef", buf));
+}
+EOF
+if { (eval echo configure:9118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  gdb_cv_printf_has_long_long=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  gdb_cv_printf_has_long_long=no
 fi
-
-# Check whether --enable-tui or --disable-tui was given.
-if test "${enable_tui+set}" = set; then
-  enableval="$enable_tui"
-  
-  case "${enable_tui}" in
-    yes | no) ;;
-    "")  enable_tui=yes ;;
-    *)
-      { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
-    ;;
-  esac
-
+rm -fr conftest*
 fi
 
-case ${enable_tui} in
-  "yes" )
-    if test -d "${srcdir}/tui" ; then
-      CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)"
-      CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)"
-      CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)"
-      CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)"
-      ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)"
-      CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)"
-      CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)"
-      CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)"
-      CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)"
-    fi
-    ;;
-esac
-
-# Check whether --enable-netrom or --disable-netrom was given.
-if test "${enable_netrom+set}" = set; then
-  enableval="$enable_netrom"
-  case "${enableval}" in
-yes)   enable_netrom=yes ;;
-no)    enable_netrom=no ;;
-*)     { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
-esac
 fi
 
+if test $gdb_cv_printf_has_long_long = yes; then
+  cat >> confdefs.h <<\EOF
+#define PRINTF_HAS_LONG_LONG 1
+EOF
 
-if test "${enable_netrom}" = "yes"; then
-       CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o" 
-        CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
 fi
+echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
 
 
-# NOTE: Don't add -Wall or -Wunused, they both include
-# -Wunused-parameter which reports bogus warnings.
-# 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"
-# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
-# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
-# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
-# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
-# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
-# -Woverloaded-virtual -Winline -Werror"
-# Check whether --enable-build-warnings or --disable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then
-  enableval="$enable_build_warnings"
-  case "${enableval}" in
-  yes) ;;
-  no)  build_warnings="-w";;
-  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        build_warnings="${build_warnings} ${t}";;
-  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        build_warnings="${t} ${build_warnings}";;
-  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting compiler warning flags = $build_warnings" 6>&1
-fi
-fi
-# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
-if test "${enable_gdb_build_warnings+set}" = set; then
-  enableval="$enable_gdb_build_warnings"
-  case "${enableval}" in
-  yes) ;;
-  no)  build_warnings="-w";;
-  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        build_warnings="${build_warnings} ${t}";;
-  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
-        build_warnings="${t} ${build_warnings}";;
-  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
-fi
-fi
-WARN_CFLAGS=""
-WERROR_CFLAGS=""
-if test "x${build_warnings}" != x -a "x$GCC" = xyes
-then
-    echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
-echo "configure:8260: checking compiler warning flags" >&5
-    # Separate out the -Werror flag as some files just cannot be
-    # compiled with it enabled.
-    for w in ${build_warnings}; do
-       case $w in
-       -Werr*) WERROR_CFLAGS=-Werror ;;
-       *) # Check that GCC accepts it
-           saved_CFLAGS="$CFLAGS"
-           CFLAGS="$CFLAGS $w"
-           cat > conftest.$ac_ext <<EOF
-#line 8270 "configure"
+echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
+echo "configure:9142: checking for long double support in compiler" >&5
+if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 9147 "configure"
 #include "confdefs.h"
 
 int main() {
-
+long double foo;
 ; return 0; }
 EOF
-if { (eval echo configure:8277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  WARN_CFLAGS="${WARN_CFLAGS} $w"
+  ac_cv_c_long_double=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_long_double=no
 fi
 rm -f conftest*
-           CFLAGS="$saved_CFLAGS"
-       esac
-    done
-    echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
 fi
 
+echo "$ac_t""$ac_cv_c_long_double" 1>&6
+if test $ac_cv_c_long_double = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_LONG_DOUBLE 1
+EOF
 
-
-MMALLOC_CFLAGS=
-MMALLOC=
+fi
 
 
+echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
+echo "configure:9176: checking for long double support in printf" >&5
+if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  gdb_cv_printf_has_long_double=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 9184 "configure"
+#include "confdefs.h"
 
-# Check whether --with-mmalloc or --without-mmalloc was given.
-if test "${with_mmalloc+set}" = set; then
-  withval="$with_mmalloc"
-  case "${withval}" in
-  yes)  want_mmalloc=true ;;
-  no)   want_mmalloc=false;;
-  *)    { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
-esac
+int main () {
+  char buf[16];
+  long double f = 3.141592653;
+  sprintf (buf, "%Lg", f);
+  return (strncmp ("3.14159", buf, 7));
+}
+EOF
+if { (eval echo configure:9194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  gdb_cv_printf_has_long_double=yes
 else
-  want_mmalloc=false
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  gdb_cv_printf_has_long_double=no
+fi
+rm -fr conftest*
 fi
 
-if test x$want_mmalloc = xtrue; then
-   cat >> confdefs.h <<\EOF
-#define USE_MMALLOC 1
-EOF
+fi
 
-   cat >> confdefs.h <<\EOF
-#define MMCHECK_FORCE 1
+if test $gdb_cv_printf_has_long_double = yes; then
+  cat >> confdefs.h <<\EOF
+#define PRINTF_HAS_LONG_DOUBLE 1
 EOF
 
-   MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
-   MMALLOC='../mmalloc/libmmalloc.a'
 fi
+echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
 
-# Check whether --with-included-regex or --without-included-regex was given.
-if test "${with_included_regex+set}" = set; then
-  withval="$with_included_regex"
-  case "${withval}" in
-  yes)  want_included_regex=true ;;
-  no)   want_included_regex=false;;
-  *)    { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;;
-esac
-else
-  want_included_regex=true
-fi
 
-if test $want_included_regex = false; then
-  echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
-echo "configure:8337: checking for GNU regex" >&5
-  if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
+echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
+echo "configure:9218: checking for long double support in scanf" >&5
+if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  gdb_cv_scanf_has_long_double=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 8342 "configure"
+#line 9226 "configure"
 #include "confdefs.h"
-#include <gnu-versions.h>
-#include <sys/types.h>
-#include <regex.h>
-int main() {
-#if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2
-#error No valid GNU regex.
-#endif
 
-; return 0; }
+int main () {
+  char *buf = "3.141592653";
+  long double f = 0;
+  sscanf (buf, "%Lg", &f);
+  return !(f > 3.14159 && f < 3.14160);
+}
 EOF
-if { (eval echo configure:8354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  gdb_cv_have_gnu_regex=yes
+if { (eval echo configure:9236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  gdb_cv_scanf_has_long_double=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  gdb_cv_have_gnu_regex=no
+  rm -fr conftest*
+  gdb_cv_scanf_has_long_double=no
 fi
-rm -f conftest*
+rm -fr conftest*
 fi
 
-  echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
-  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"
-    cat >> confdefs.h <<\EOF
-#define USE_INCLUDED_REGEX 1
+if test $gdb_cv_scanf_has_long_double = yes; then
+  cat >> confdefs.h <<\EOF
+#define SCANF_HAS_LONG_DOUBLE 1
 EOF
 
 fi
+echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
 
-
-# In the Cygwin environment, we need some additional flags.
-echo $ac_n "checking for cygwin""... $ac_c" 1>&6
-echo "configure:8383: checking for cygwin" >&5
-if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
+case ${host_os} in
+aix*)
+  echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
+echo "configure:9261: checking for -bbigtoc option" >&5
+if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 8388 "configure"
+  
+    SAVE_LDFLAGS=$LDFLAGS
+
+    case $GCC in
+    yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
+    *) gdb_cv_bigtoc=-bbigtoc ;;
+    esac
+
+    LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
+    cat > conftest.$ac_ext <<EOF
+#line 9275 "configure"
 #include "confdefs.h"
 
-#if defined (__CYGWIN__) || defined (__CYGWIN32__)
-lose
-#endif
+int main() {
+int i;
+; return 0; }
 EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "lose" >/dev/null 2>&1; then
-  rm -rf conftest*
-  gdb_cv_os_cygwin=yes
+if { (eval echo configure:9282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  :
 else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
   rm -rf conftest*
-  gdb_cv_os_cygwin=no
+  gdb_cv_bigtoc=
 fi
 rm -f conftest*
-
+    LDFLAGS="${SAVE_LDFLAGS}"
+  
 fi
 
-echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
+echo "$ac_t""$gdb_cv_bigtoc" 1>&6
+  CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
+  ;;
+esac
 
 
-SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
-case ${host} in
-  *go32* ) SER_HARDWIRE=ser-go32.o ;;
-  *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
-esac
 
+if test ${build} = ${host} -a ${host} = ${target} ; then
+   case ${host_os} in
+   hpux*)
+      echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
+echo "configure:9306: checking for HPUX/OSF thread support" >&5
+      if test -f /usr/include/dce/cma_config.h ; then
+         if test "$GCC" = "yes" ; then
+            echo "$ac_t""yes" 1>&6
+            cat >> confdefs.h <<\EOF
+#define HAVE_HPUX_THREAD_SUPPORT 1
+EOF
 
+            CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
+            CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
+         else
+            echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
+         fi
+      else
+         echo "$ac_t""no" 1>&6
+      fi
+      ;;
+   solaris*)
+      # See if thread_db library is around for Solaris thread debugging.
+      # Note that we must explicitly test for version 1 of the library
+      # because version 0 (present on Solaris 2.4 or earlier) doesn't have
+      # the same API.
+      echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
+echo "configure:9329: checking for Solaris thread debugging library" >&5
+      if test -f /usr/lib/libthread_db.so.1 ; then
+         echo "$ac_t""yes" 1>&6
+         cat >> confdefs.h <<\EOF
+#define HAVE_THREAD_DB_LIB 1
+EOF
 
-if test x$gdb_host = xgo32; then
-  TERM_LIB=
-else
-if test x$gdb_cv_os_cygwin = xyes; then
-  TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
-else
-  TERM_LIB=
-  echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:8426: checking for tgetent in -lncurses" >&5
-ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
+         CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
+         CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
+         echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+echo "configure:9339: checking for dlopen in -ldl" >&5
+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lncurses  $LIBS"
+LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 8434 "configure"
+#line 9347 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char tgetent();
+char dlopen();
 
 int main() {
-tgetent()
+dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:8445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8456,218 +9369,362 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  TERM_LIB=-lncurses
+    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-ldl $LIBS"
+
 else
   echo "$ac_t""no" 1>&6
-echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
-echo "configure:8464: checking for tgetent in -lHcurses" >&5
-ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+fi
+
+         if test "$GCC" = "yes" ; then
+            # The GNU linker requires the -export-dynamic option to make
+            # all symbols visible in the dynamic symbol table.
+            hold_ldflags=$LDFLAGS
+            echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
+echo "configure:9390: checking for the ld -export-dynamic flag" >&5
+            LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
+            cat > conftest.$ac_ext <<EOF
+#line 9393 "configure"
+#include "confdefs.h"
+
+int main() {
+int i;
+; return 0; }
+EOF
+if { (eval echo configure:9400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  found=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  found=no
+fi
+rm -f conftest*
+            LDFLAGS=$hold_ldflags
+            echo "$ac_t""$found" 1>&6
+            if test $found = yes; then
+               CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
+            fi
+         fi
+        # Sun randomly tweaked the prototypes in <proc_service.h>
+        # at one point.
+        echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
+echo "configure:9419: checking if <proc_service.h> is old" >&5
+        if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-lHcurses  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 8472 "configure"
+  
+           cat > conftest.$ac_ext <<EOF
+#line 9425 "configure"
 #include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char tgetent();
 
+               #include <proc_service.h>
+               ps_err_e ps_pdwrite
+                   (struct ps_prochandle*, psaddr_t, const void*, size_t);
+           
 int main() {
-tgetent()
+
 ; return 0; }
 EOF
-if { (eval echo configure:8483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
+  gdb_cv_proc_service_is_old=no
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  gdb_cv_proc_service_is_old=yes
 fi
 rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+        
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  TERM_LIB=-lHcurses
-else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
-echo "configure:8502: checking for tgetent in -ltermlib" >&5
-ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+
+        echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
+        if test $gdb_cv_proc_service_is_old = yes; then
+           cat >> confdefs.h <<\EOF
+#define PROC_SERVICE_IS_OLD 1
+EOF
+
+        fi
+      else
+         echo "$ac_t""no" 1>&6
+      fi
+      ;;
+   aix*)
+      echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
+echo "configure:9462: checking for AiX thread debugging library" >&5
+      if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-ltermlib  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 8510 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 9467 "configure"
 #include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char tgetent();
-
+#include <sys/pthdebug.h>
 int main() {
-tgetent()
+#ifndef PTHDB_VERSION_3
+                                    #error
+                                    #endif
 ; return 0; }
 EOF
-if { (eval echo configure:8521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
+  gdb_cv_have_aix_thread_debug=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  gdb_cv_have_aix_thread_debug=no
 fi
 rm -f conftest*
-LIBS="$ac_save_LIBS"
+fi
 
+      echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
+      if test $gdb_cv_have_aix_thread_debug = yes; then
+         CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
+         CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
+         CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
+      fi
+      ;;
+   esac
+   
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  TERM_LIB=-ltermlib
-else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:8540: checking for tgetent in -ltermcap" >&5
-ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+
+if test "x$ac_cv_header_thread_db_h" = "xyes"; then
+   echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
+echo "configure:9501: checking whether <thread_db.h> has TD_NOTALLOC" >&5
+if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-ltermcap  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 8548 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 9506 "configure"
 #include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char tgetent();
-
+#include <thread_db.h>
 int main() {
-tgetent()
+int i = TD_NOTALLOC;
 ; return 0; }
 EOF
-if { (eval echo configure:8559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
+  gdb_cv_thread_db_h_has_td_notalloc=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  gdb_cv_thread_db_h_has_td_notalloc=no
+     
 fi
 rm -f conftest*
-LIBS="$ac_save_LIBS"
+   
+fi
 
+echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  TERM_LIB=-ltermcap
-else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:8578: checking for tgetent in -lcurses" >&5
-ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
+  cat >> confdefs.h <<\EOF
+#define THREAD_DB_HAS_TD_NOTALLOC 1
+EOF
+
+fi
+
+if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
+   echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
+echo "configure:9538: checking whether <sys/syscall.h> has __NR_tkill" >&5
+if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-lcurses  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 8586 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 9543 "configure"
 #include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char tgetent();
-
+#include <sys/syscall.h>
 int main() {
-tgetent()
+int i = __NR_tkill;
 ; return 0; }
 EOF
-if { (eval echo configure:8597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
+  gdb_cv_sys_syscall_h_has_tkill=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
+  gdb_cv_sys_syscall_h_has_tkill=no
+     
 fi
 rm -f conftest*
-LIBS="$ac_save_LIBS"
+   
+fi
 
+echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
 fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  TERM_LIB=-lcurses
-else
-  echo "$ac_t""no" 1>&6
-echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
-echo "configure:8616: checking for tgetent in -lterminfo" >&5
-ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
+if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_TKILL_SYSCALL 1
+EOF
+
+fi
+
+
+# Check whether --with-sysroot or --without-sysroot was given.
+if test "${with_sysroot+set}" = set; then
+  withval="$with_sysroot"
+  
+ case ${with_sysroot} in
+ yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
+ *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
+ esac
+
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
+
+ if test "x$exec_prefix" = xNONE; then
+  if test "x$prefix" = xNONE; then
+   test_prefix=/usr/local
+  else
+   test_prefix=$prefix
+  fi
+ else
+  test_prefix=$exec_prefix
+ fi
+ case ${TARGET_SYSTEM_ROOT} in
+ "${test_prefix}"|"${test_prefix}/"*|\
+ '${exec_prefix}'|'${exec_prefix}/'*)
+   t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
+   TARGET_SYSTEM_ROOT_DEFINE="$t"
+   ;;
+ esac
+
 else
-  ac_save_LIBS="$LIBS"
-LIBS="-lterminfo  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 8624 "configure"
+  
+ TARGET_SYSTEM_ROOT=
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
+
+fi
+
+
+
+
+# NOTE: Don't add -Wall or -Wunused, they both include
+# -Wunused-parameter which reports bogus warnings.
+# 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 \
+-Wunused-label -Wunused-function"
+# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
+# -Wunused-function -Wunused-variable -Wunused-value
+# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
+# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
+# -Woverloaded-virtual -Winline -Werror"
+# Check whether --enable-build-warnings or --disable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then
+  enableval="$enable_build_warnings"
+  case "${enableval}" in
+  yes) ;;
+  no)  build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
+if test "${enable_gdb_build_warnings+set}" = set; then
+  enableval="$enable_gdb_build_warnings"
+  case "${enableval}" in
+  yes) ;;
+  no)  build_warnings="-w";;
+  ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${build_warnings} ${t}";;
+  *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+        build_warnings="${t} ${build_warnings}";;
+  *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+fi
+fi
+WARN_CFLAGS=""
+WERROR_CFLAGS=""
+if test "x${build_warnings}" != x -a "x$GCC" = xyes
+then
+    echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
+echo "configure:9662: checking compiler warning flags" >&5
+    # Separate out the -Werror flag as some files just cannot be
+    # compiled with it enabled.
+    for w in ${build_warnings}; do
+       case $w in
+       -Werr*) WERROR_CFLAGS=-Werror ;;
+       *) # Check that GCC accepts it
+           saved_CFLAGS="$CFLAGS"
+           CFLAGS="$CFLAGS $w"
+           cat > conftest.$ac_ext <<EOF
+#line 9672 "configure"
 #include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char tgetent();
 
 int main() {
-tgetent()
+
 ; return 0; }
 EOF
-if { (eval echo configure:8635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
+  WARN_CFLAGS="${WARN_CFLAGS} $w"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  TERM_LIB=-lterminfo
-else
-  echo "$ac_t""no" 1>&6
+           CFLAGS="$saved_CFLAGS"
+       esac
+    done
+    echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
 fi
 
-fi
 
-fi
 
-fi
+# In the Cygwin environment, we need some additional flags.
+echo $ac_n "checking for cygwin""... $ac_c" 1>&6
+echo "configure:9697: checking for cygwin" >&5
+if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 9702 "configure"
+#include "confdefs.h"
 
+#if defined (__CYGWIN__) || defined (__CYGWIN32__)
+lose
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "lose" >/dev/null 2>&1; then
+  rm -rf conftest*
+  gdb_cv_os_cygwin=yes
+else
+  rm -rf conftest*
+  gdb_cv_os_cygwin=no
 fi
+rm -f conftest*
 
 fi
 
+echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
 
-  if test "x$TERM_LIB" = x
-  then
-    { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
-  fi
-fi
-fi
+
+SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
+case ${host} in
+  *go32* ) SER_HARDWIRE=ser-go32.o ;;
+  *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
+esac
 
 
 # libreadline needs libuser32.a in a cygwin environment
@@ -8686,88 +9743,18 @@ GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
 
 
 
-# Check whether --with-cpu or --without-cpu was given.
-if test "${with_cpu+set}" = set; then
-  withval="$with_cpu"
-  case "${target}" in
-  powerpc-* | powerpcle-* )
-    ## It would be nice to keep this table in sync with the one in
-    ## gcc/configure.
-    case "${with_cpu}" in
-      ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
-      | 604 | 750 )
-        ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
-      ;;
-      common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) 
-        ## These are all RS6000 variants, as far as GDB is concerned.
-        with_cpu=rs6000
-      ;;
-      603e | ec603e )
-        with_cpu=603
-      ;;
-      604e )
-       with_cpu=604
-      ;;
-      * )
-        echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
-       with_cpu=ppc-uisa
-      ;;
-    esac
-  ;;
-  * )
-    echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
-  ;;
-esac
-cat >> confdefs.h <<EOF
-#define TARGET_CPU_DEFAULT "${with_cpu}"
-EOF
-
-
-fi
-
-
-
-# Check whether --enable-gdbtk or --disable-gdbtk was given.
-if test "${enable_gdbtk+set}" = set; then
-  enableval="$enable_gdbtk"
-  case "${enableval}" in
-    yes)
-       case "$host" in
-       *go32*)
-           echo "configure: warning: GDB does not support GDBtk on host ${host}.  GDBtk will be disabled." 1>&2
-           enable_gdbtk=no ;;
-       *windows*)
-           echo "configure: warning: GDB does not support GDBtk on host ${host}.  GDBtk will be disabled." 1>&2
-           enable_gdbtk=no ;;
-       *)
-           enable_gdbtk=yes ;;
-       esac ;;
-    no)
-       enable_gdbtk=no  ;;
-    *)
-       { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
-esac
-else
-  
-# Default is on for everything but go32 and Cygwin
-case "$host" in
-    *go32* | *windows*)
-       ;;
-    *)
-       if test -d "${srcdir}/gdbtk" ; then
-            enable_gdbtk=yes
-       fi
-       ;;
-esac
-
-fi
-
-
 WIN32LDAPP=
 
 
 
-configdir="unix"
+case "${host}" in
+*-*-cygwin*)
+    configdir="win"
+    ;;
+*)
+    configdir="unix"
+    ;;
+esac
 
 GDBTKLIBS=
 if test "${enable_gdbtk}" = "yes"; then
@@ -8796,7 +9783,7 @@ if test "${with_tclconfig+set}" = set; then
 fi
 
   echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:8800: checking for Tcl configuration" >&5
+echo "configure:9787: checking for Tcl configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8882,6 +9869,7 @@ fi
     
     
     
+    
     
     
 
@@ -8904,7 +9892,7 @@ if test "${with_tkconfig+set}" = set; then
 fi
 
   echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:8908: checking for Tk configuration" >&5
+echo "configure:9896: checking for Tk configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -8971,14 +9959,7 @@ fi
 
        # now look for Tcl library stuff
 
-       case "${host}" in
-       *-*-cygwin*)
-           tcldir=../tcl/win/
-           ;;
-       *)
-           tcldir=../tcl/unix/
-           ;;
-       esac
+       tcldir="../tcl/${configdir}/"
 
        TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
 
@@ -9013,7 +9994,7 @@ fi
 
 no_tcl=true
 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:9017: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:9998: checking for Tcl private headers. dir=${configdir}" >&5
 # Check whether --with-tclinclude or --without-tclinclude was given.
 if test "${with_tclinclude+set}" = set; then
   withval="$with_tclinclude"
 if test x"${ac_cv_c_tclh}" = x ; then
    ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
-echo "configure:9083: checking for tclInt.h" >&5
+echo "configure:10064: checking for tclInt.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9088 "configure"
+#line 10069 "configure"
 #include "confdefs.h"
 #include <tclInt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9149,7 +10130,7 @@ fi
 #
 no_tk=true
 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:9153: checking for Tk private headers" >&5
+echo "configure:10134: checking for Tk private headers" >&5
 # Check whether --with-tkinclude or --without-tkinclude was given.
 if test "${with_tkinclude+set}" = set; then
   withval="$with_tkinclude"
 if test x"${ac_cv_c_tkh}" = x ; then
    ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
-echo "configure:9219: checking for tk.h" >&5
+echo "configure:10200: checking for tk.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 9224 "configure"
+#line 10205 "configure"
 #include "confdefs.h"
 #include <tk.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9271,7 +10252,7 @@ fi
 
           
 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:9275: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:10256: checking for Itcl private headers. srcdir=${srcdir}" >&5
 if test x"${ac_cv_c_itclh}" = x ; then
   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
     if test -f $i/generic/itcl.h ; then
@@ -9294,7 +10275,7 @@ fi
 
           
 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:9298: checking for Itk private headers. srcdir=${srcdir}" >&5
+echo "configure:10279: checking for Itk private headers. srcdir=${srcdir}" >&5
 if test x"${ac_cv_c_itkh}" = x ; then
   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
     if test -f $i/generic/itk.h ; then
@@ -9319,14 +10300,7 @@ fi
 
           # now look for Tk library stuff
 
-          case "${host}" in
-          *-*-cygwin*)
-              tkdir=../tk/win/
-              ;;
-          *)
-              tkdir=../tk/unix/
-              ;;
-          esac
+          tkdir="../tk/${configdir}/"
 
           TK_DEPS="${tkdir}${TK_LIB_FILE}"
 
@@ -9349,7 +10323,7 @@ if test "${with_itclconfig+set}" = set; then
 fi
 
   echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
-echo "configure:9353: checking for Itcl configuration" >&5
+echo "configure:10327: checking for Itcl configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -9452,7 +10426,7 @@ if test "${with_itkconfig+set}" = set; then
 fi
 
   echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
-echo "configure:9456: checking for Itk configuration" >&5
+echo "configure:10430: checking for Itk configuration" >&5
   if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
            CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
            CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
            CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
-           CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
-          CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
-          CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
-          CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
-          CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
+          CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
+          CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
+          CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
+          CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
 
           if test x$gdb_cv_os_cygwin = xyes; then
              WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
@@ -9574,7 +10547,6 @@ fi
        fi
     fi
 
-    SUBDIRS="${SUBDIRS} gdbtk"
     configdirs="${configdirs} gdbtk"
 fi
 
@@ -9596,7 +10568,7 @@ fi
 # Uses ac_ vars as temps to allow command line to override cache and checks.
 # --without-x overrides everything else, but does not touch the cache.
 echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:9600: checking for X" >&5
+echo "configure:10572: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -9658,12 +10630,12 @@ if test "$ac_x_includes" = NO; then
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 9662 "configure"
+#line 10634 "configure"
 #include "confdefs.h"
 #include <$x_direct_test_include>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:10639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9732,14 +10704,14 @@ if test "$ac_x_libraries" = NO; then
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 9736 "configure"
+#line 10708 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:9743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   LIBS="$ac_save_LIBS"
 # We can link X programs with no special library path.
@@ -9826,7 +10798,26 @@ else
 fi
 
 
+# Check whether we should enable the TUI, but only do so if we really
+# can.
+if test x"$enable_tui" = xyes; then
+  if test -d $srcdir/tui; then
+    if test "$ac_cv_search_waddstr" != no; then
+      CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
+      CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
+      CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
+      CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
+      ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
+      CONFIG_ALL="${CONFIG_ALL} all-tui"
+      CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
+      CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
+      CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
+    else
+      echo "configure: warning: no enhanced curses library found; disabling TUI" 1>&2
+    fi
+  fi
+fi
+
 # Unlike the sim directory, whether a simulator is linked is controlled by 
 # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.  
 # This code just checks for a few cases where we'd like to ignore those
 
 
 
+# List of host floatformats.
+cat >> confdefs.h <<EOF
+#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
+EOF
 
-# Begin stuff to support --enable-shared
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  case "${enableval}" in
-  yes) shared=true ;;
-  no)  shared=false ;;
-  *) shared=true ;;
-esac
-fi
-
-HLDFLAGS=
-HLDENV=
-# If we have shared libraries, try to set rpath reasonably.
-if test "${shared}" = "true"; then
-  case "${host}" in
-  *-*-hpux*)
-    HLDFLAGS='-Wl,+s,+b,$(libdir)'
-    ;;
-  *-*-irix5* | *-*-irix6*)
-    HLDFLAGS='-Wl,-rpath,$(libdir)'
-    ;;
-  *-*-linux*aout*)
-    ;;
-  *-*-linux* | *-pc-linux-gnu*)
-    HLDFLAGS='-Wl,-rpath,$(libdir)'
-    ;;
-  *-*-solaris*)
-    HLDFLAGS='-R $(libdir)'
-    ;;
-  *-*-sysv4*)
-    HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
-    ;;
-  esac
-fi
-
-# On SunOS, if the linker supports the -rpath option, use it to
-# prevent ../bfd and ../opcodes from being included in the run time
-# search path.
-case "${host}" in
-  *-*-sunos*)
-    echo 'main () { }' > conftest.c
-    ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
-    if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
-      :
-    elif grep 'No such file' conftest.t >/dev/null 2>&1; then
-      :
-    elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
-      :
-    elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
-      :
-    elif test "${shared}" = "true"; then
-      HLDFLAGS='-Wl,-rpath=$(libdir)'
-    else
-      HLDFLAGS='-Wl,-rpath='
-    fi
-    rm -f conftest.t conftest.c conftest
-    ;;
-esac
+cat >> confdefs.h <<EOF
+#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
+EOF
 
+cat >> confdefs.h <<EOF
+#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
+EOF
 
-# End stuff to support --enable-shared
 
 # target_subdir is used by the testsuite to find the target libraries.
 target_subdir=
 
 
 frags=
-host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
-if test ! -f ${host_makefile_frag}; then
-    # When building a native debuger the .mh file containing things
-    # like NATDEPFILES is needed.  Cross debuggers don't need .mh
-    # since it no longer contains anything useful.
-    if test "${target}" = "${host}"; then
-       { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
-    else
-       host_makefile_frag=/dev/null
-    fi
+if test "${target}" = "${host}"; then
+  host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
+  if test ! -f ${host_makefile_frag}; then
+    { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
+  fi
+  frags="$frags $host_makefile_frag"
+else
+  host_makefile_frag=/dev/null
 fi
-frags="$frags $host_makefile_frag"
 
 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
 if test ! -f ${target_makefile_frag}; then
-{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
+  { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
 fi
 frags="$frags $target_makefile_frag"
 
@@ -9978,11 +10916,7 @@ s/XM_FILE[      ]*=[    ]*\([^  ]*\)/\1/p
 ' ${host_makefile_frag}`
 
 targetfile=`sed -n '
-s/TM_FILE[     ]*=[    ]*\([^  ]*\)/\1/p
-' ${target_makefile_frag}`
-
-GDB_MULTI_ARCH=`sed -n '
-s/GDB_MULTI_ARCH[      ]*=[    ]*\([^  ]*\)[   ]*/\1/p
+s/DEPRECATED_TM_FILE[  ]*=[    ]*\([^  ]*\)/\1/p
 ' ${target_makefile_frag}`
 
 if test "${target}" = "${host}"; then
@@ -9994,58 +10928,46 @@ s/NAT_FILE[    ]*=[    ]*\([^  ]*\)/\1/p
 fi
 
 
-# New targets should just set gdb_multi_arch=yes in configure.tgt.
-# Old targets being converted can either do that or set GDB_MULTI_ARCH
-# in the target specific makefile frag.  Eventually gdb_multi_arch=yes
-# will be the default.
-if test x"${GDB_MULTI_ARCH}" = x ; then
-    case "${gdb_multi_arch}" in
-    yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
-    no ) GDB_MULTI_ARCH=0 ;;
-    0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
-    esac
-fi
-if test x"${GDB_MULTI_ARCH}" != x ; then
+if test x"${gdb_osabi}" != x ; then
     cat >> confdefs.h <<EOF
-#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
+#define GDB_OSABI_DEFAULT $gdb_osabi
 EOF
 
 fi
-# Warn the user when they use an old practice
-case "${GDB_MULTI_ARCH}" in
-    "" ) ;;
-    0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
-       echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
-    GDB_MULTI_ARCH_PURE )
-       if test x"${targetfile}" != x ; then
-           echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
-           targetfile=""
-       fi ;;
-    *)  { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
-esac
 
-if test "${enable_multi_ice}" = "yes"; then
-  SUBDIRS="${SUBDIRS} multi-ice"
+# Enable multi-ice-gdb-server.
+# Check whether --enable-multi-ice or --disable-multi-ice was given.
+if test "${enable_multi_ice+set}" = set; then
+  enableval="$enable_multi_ice"
+  case $enableval in
+    yes | no)
+      ;;
+    *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
+  esac
+fi
+
+if test "x$enable_multi_ice" = xyes; then
+  configdirs="$configdirs multi-ice"
 fi
 
-# ``gdbserver'' can only be built in a native configuration.
-if test x"${target}" = x"${host}"; then
-    echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
-echo "configure:10035: checking whether gdbserver is supported on this host" >&5
-    if test x"${build_gdbserver}" = xyes ; then
-       configdirs="${configdirs} gdbserver"
-       SUBDIRS="${SUBDIRS} gdbserver"
-       echo "$ac_t""yes" 1>&6
-    else
-       echo "$ac_t""no" 1>&6
-    fi
+# We only build gdbserver automatically if host and target are the same.
+if test "x$target" = "x$host"; then
+  echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
+echo "configure:10957: checking whether gdbserver is supported on this host" >&5
+  if test "x$build_gdbserver" = xyes; then
+    configdirs="$configdirs gdbserver"
+    echo "$ac_t""yes" 1>&6
+  else
+    echo "$ac_t""no" 1>&6
+  fi
 fi
 
+subdirs="doc testsuite $configdirs"
 
 
-# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
-# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
-# version.
+# If hostfile (XM_FILE) and/or targetfile (DEPRECATED_TM_FILE) and/or
+# nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
+# to an empty version.
 
 files=
 links=
@@ -10054,11 +10976,14 @@ rm -f xm.h
 xm_h=""
 if test "${hostfile}" != ""; then
     xm_h=xm.h
-    GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
+    case "${hostfile}" in
+      xm-*.h ) GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" ;;
+      * ) GDB_XM_FILE="${hostfile}"
+    esac
     files="${files} ${GDB_XM_FILE}"
     links="${links} xm.h"
     cat >> confdefs.h <<EOF
-#define GDB_XM_FILE ${GDB_XM_FILE}
+#define GDB_XM_FILE "${GDB_XM_FILE}"
 EOF
 
 fi
@@ -10068,11 +10993,14 @@ rm -f tm.h
 tm_h=""
 if test "${targetfile}" != ""; then
     tm_h=tm.h
-    GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
+    case "${targetfile}" in
+      tm-*.h ) GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" ;;
+      * ) GDB_TM_FILE="${targetfile}"
+    esac
     files="${files} ${GDB_TM_FILE}"
     links="${links} tm.h"
     cat >> confdefs.h <<EOF
-#define GDB_TM_FILE ${GDB_TM_FILE}
+#define GDB_TM_FILE "${GDB_TM_FILE}"
 EOF
 
 fi
@@ -10082,11 +11010,14 @@ rm -f nm.h
 nm_h=""
 if test "${nativefile}" != ""; then
     nm_h=nm.h
-    GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
+    case "${nativefile}" in
+      nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
+      * ) GDB_NM_FILE="${nativefile}"
+    esac
     files="${files} ${GDB_NM_FILE}"
     links="${links} nm.h"
     cat >> confdefs.h <<EOF
-#define GDB_NM_FILE ${GDB_NM_FILE}
+#define GDB_NM_FILE "${GDB_NM_FILE}"
 EOF
 
 fi
 
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:10099: checking for Cygwin environment" >&5
+echo "configure:11030: checking for Cygwin environment" >&5
 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10104 "configure"
+#line 11035 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -10111,7 +11042,7 @@ int main() {
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:10115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -10128,19 +11059,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:10132: checking for mingw32 environment" >&5
+echo "configure:11063: checking for mingw32 environment" >&5
 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 10137 "configure"
+#line 11068 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:10144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -10159,7 +11090,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:10163: checking for executable suffix" >&5
+echo "configure:11094: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -10169,10 +11100,10 @@ else
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:10173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:11104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
-      *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
+      *.c | *.o | *.obj) ;;
       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
       esac
     done
@@ -10211,7 +11142,7 @@ fi
 
 
   echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:10215: checking for iconv" >&5
+echo "configure:11146: checking for iconv" >&5
 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -10219,7 +11150,7 @@ else
     am_cv_func_iconv="no, consider installing GNU libiconv"
     am_cv_lib_iconv=no
     cat > conftest.$ac_ext <<EOF
-#line 10223 "configure"
+#line 11154 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -10229,7 +11160,7 @@ iconv_t cd = iconv_open("","");
        iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:10233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_func_iconv=yes
 else
@@ -10241,7 +11172,7 @@ rm -f conftest*
       am_save_LIBS="$LIBS"
       LIBS="$LIBS -liconv"
       cat > conftest.$ac_ext <<EOF
-#line 10245 "configure"
+#line 11176 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <iconv.h>
@@ -10251,7 +11182,7 @@ iconv_t cd = iconv_open("","");
          iconv_close(cd);
 ; return 0; }
 EOF
-if { (eval echo configure:10255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   am_cv_lib_iconv=yes
         am_cv_func_iconv=yes
@@ -10272,13 +11203,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
 EOF
 
     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:10276: checking for iconv declaration" >&5
+echo "configure:11207: checking for iconv declaration" >&5
     if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   
       cat > conftest.$ac_ext <<EOF
-#line 10282 "configure"
+#line 11213 "configure"
 #include "confdefs.h"
 
 #include <stdlib.h>
@@ -10297,7 +11228,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:10301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:11232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   am_cv_proto_iconv_arg1=""
 else
@@ -10325,8 +11256,6 @@ EOF
   
 
 
-subdirs="$configdirs"
-
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -10503,6 +11432,9 @@ s%@GT_NO@%$GT_NO%g
 s%@GT_YES@%$GT_YES%g
 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
 s%@l@%$l%g
+s%@localedir@%$localedir%g
+s%@PACKAGE@%$PACKAGE%g
+s%@subdirs@%$subdirs%g
 s%@AWK@%$AWK%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
@@ -10514,14 +11446,11 @@ s%@DLLTOOL@%$DLLTOOL%g
 s%@WINDRES@%$WINDRES%g
 s%@MIG@%$MIG%g
 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
-s%@UIOUT_CFLAGS@%$UIOUT_CFLAGS%g
+s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
+s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
 s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
-s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
-s%@MMALLOC@%$MMALLOC%g
-s%@REGEX@%$REGEX%g
 s%@SER_HARDWIRE@%$SER_HARDWIRE%g
-s%@TERM_LIB@%$TERM_LIB%g
 s%@WIN32LIBS@%$WIN32LIBS%g
 s%@LIBGUI@%$LIBGUI%g
 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
@@ -10538,6 +11467,7 @@ s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
+s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
 s%@TCL_RANLIB@%$TCL_RANLIB%g
 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
@@ -10579,30 +11509,25 @@ s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
 s%@IGNORE_SIM@%$IGNORE_SIM%g
 s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
+s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
 s%@CONFIG_OBS@%$CONFIG_OBS%g
-s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
-s%@CONFIG_INITS@%$CONFIG_INITS%g
 s%@CONFIG_ALL@%$CONFIG_ALL%g
 s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
 s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
 s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
-s%@HLDFLAGS@%$HLDFLAGS%g
-s%@HLDENV@%$HLDENV%g
 s%@target_subdir@%$target_subdir%g
 /@host_makefile_frag@/r $host_makefile_frag
 s%@host_makefile_frag@%%g
 /@target_makefile_frag@/r $target_makefile_frag
 s%@target_makefile_frag@%%g
 s%@frags@%$frags%g
-s%@SUBDIRS@%$SUBDIRS%g
 s%@xm_h@%$xm_h%g
 s%@tm_h@%$tm_h%g
 s%@nm_h@%$nm_h%g
 s%@EXEEXT@%$EXEEXT%g
 s%@LIBICONV@%$LIBICONV%g
-s%@subdirs@%$subdirs%g
 
 CEOF
 EOF
@@ -10865,16 +11790,8 @@ nativefile=$nativefile
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 
-if test "${nativefile}" = ""; then
-        < Makefile \
-        sed -e '/^NATDEPFILES[         ]*=.*\\$/,/[^\\]$/s/^/# /' \
-            -e '/^NATDEPFILES[         ]*=/s/^/# /' \
-        | sed -e '/^\(NATDEPFILES[     ]*[+]=[         ]*\)/s//# \1/' \
-       > Makefile.tem
-mv -f Makefile.tem Makefile
-fi
 
-sed -e '/^TM_FILE[     ]*=/s,^TM_FILE[         ]*=[    ]*,&config/'"${gdb_target_cpu}"'/,
+sed -e '/^DEPRECATED_TM_FILE[  ]*=/s,^DEPRECATED_TM_FILE[      ]*=[    ]*,&config/'"${gdb_target_cpu}"'/,
 /^XM_FILE[     ]*=/s,^XM_FILE[         ]*=[    ]*,&config/'"${gdb_host_cpu}"'/,
 /^NAT_FILE[    ]*=/s,^NAT_FILE[        ]*=[    ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
 mv -f Makefile.tmp Makefile
@@ -10916,7 +11833,7 @@ if test "$no_recursion" != yes; then
     esac
   done
 
-  for ac_config_dir in $configdirs; do
+  for ac_config_dir in doc testsuite $configdirs; do
 
     # Do not complain, so a configure script can configure whichever
     # parts of a large source tree are present.
This page took 0.154602 seconds and 4 git commands to generate.