]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - configure
Imported from ../bash-2.05.tar.gz.
[thirdparty/bash.git] / configure
index 463c027dfbf2c2ed609b44fbbf244fd0b6de7f47..be2d7103a20314109c80d1b9288cae8225a64d5b 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,41 @@
 #! /bin/sh
 
-# From configure.in for Bash 2.0, version 1.14, from autoconf version 2.12
+# From configure.in for Bash 2.05, version 2.90, from autoconf version 2.13
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
 
 
 # Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12 
+# Generated automatically using autoconf version 2.13 
 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
 #
 # This configure script is free software; the Free Software Foundation
@@ -80,49 +115,73 @@ ac_help=
 ac_default_prefix=/usr/local
 # Any additions from configure.in:
 ac_help="$ac_help
---with-gnu-malloc      use the GNU version of malloc"
+--with-afs             if you are running AFS"
+ac_help="$ac_help
+--with-bash-malloc     use the Bash version of malloc"
+ac_help="$ac_help
+--with-curses          use the curses library instead of the termcap library"
 ac_help="$ac_help
 --with-glibc-malloc    use the GNU C library version of malloc"
 ac_help="$ac_help
---with-purify          configure to postprocess with purify"
+--with-gnu-malloc      synonym for --with-bash-malloc"
 ac_help="$ac_help
---with-afs             if you are running AFS"
+--with-installed-readline      use a version of the readline library that is already installed"
 ac_help="$ac_help
---enable-minimal-config        a minimal sh-like configuration"
+--with-purecov         configure to postprocess with pure coverage"
 ac_help="$ac_help
---enable-job-control   enable job control features"
+--with-purify          configure to postprocess with purify"
+ac_help="$ac_help
+--enable-minimal-config        a minimal sh-like configuration"
 ac_help="$ac_help
 --enable-alias         enable shell aliases"
 ac_help="$ac_help
---enable-readline      turn on command line editing"
+--enable-arith-for-command     enable arithmetic for command"
 ac_help="$ac_help
---enable-history       turn on command history"
+--enable-array-variables       include shell array variables"
 ac_help="$ac_help
 --enable-bang-history  turn on csh-style history substitution"
 ac_help="$ac_help
+--enable-brace-expansion       include brace expansion"
+ac_help="$ac_help
+--enable-command-timing        enable the time reserved word and command timing"
+ac_help="$ac_help
+--enable-cond-command  enable the conditional command"
+ac_help="$ac_help
 --enable-directory-stack       enable builtins pushd/popd/dirs"
 ac_help="$ac_help
---enable-restricted    enable a restricted shell"
+--enable-disabled-builtins     allow disabled builtins to still be invoked"
+ac_help="$ac_help
+--enable-dparen-arithmetic     include ((...)) command"
+ac_help="$ac_help
+--enable-extended-glob include ksh-style extended pattern matching"
+ac_help="$ac_help
+--enable-help-builtin  include the help builtin"
+ac_help="$ac_help
+--enable-history       turn on command history"
+ac_help="$ac_help
+--enable-job-control   enable job control features"
+ac_help="$ac_help
+--enable-net-redirections      enable /dev/tcp/host/port redirection"
 ac_help="$ac_help
 --enable-process-substitution  enable process substitution"
 ac_help="$ac_help
---enable-prompt-string-decoding        turn on escape character decoding in prompts"
+--enable-progcomp      enable programmable completion and the complete builtin"
 ac_help="$ac_help
---enable-select                include select command"
+--enable-prompt-string-decoding        turn on escape character decoding in prompts"
 ac_help="$ac_help
---enable-help-builtin  include the help builtin"
+--enable-readline      turn on command line editing"
 ac_help="$ac_help
---enable-array-variables       include shell array variables"
+--enable-restricted    enable a restricted shell"
 ac_help="$ac_help
---enable-dparen-arithmetic     include ((...)) command"
+--enable-select                include select command"
 ac_help="$ac_help
---enable-brace-expansion       include brace expansion"
+--enable-usg-echo-default      a synonym for --enable-xpg-echo-default"
 ac_help="$ac_help
---enable-disabled-builtins     allow disabled builtins to still be invoked"
+--enable-xpg-echo-default      make the echo builtin expand escape sequences by default"
 ac_help="$ac_help
---enable-command-timing        enable the time reserved word and command timing"
+--enable-profiling             allow profiling with gprof"
 ac_help="$ac_help
---enable-usg-echo-default      make the echo builtin expand escape sequences by default"
+--enable-static-link           link bash statically, for use as a root shell"
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -161,6 +220,7 @@ mandir='${prefix}/man'
 # Initialize some other variables.
 subdirs=
 MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
 # Maximum number of lines to put in a shell here document.
 ac_max_here_lines=12
 
@@ -444,7 +504,7 @@ EOF
     verbose=yes ;;
 
   -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.12"
+    echo "configure generated by autoconf version 2.13"
     exit 0 ;;
 
   -with-* | --with-*)
@@ -614,9 +674,11 @@ ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
+ac_exeext=
+ac_objext=o
 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
@@ -656,55 +718,82 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 
 
 # Make sure we can run config.sub.
-if $ac_config_sub sun4 >/dev/null 2>&1; then :
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
 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:665: checking host system type" >&5
+echo "configure:727: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
 NONE)
   case $nonopt in
   NONE)
-    if host_alias=`$ac_config_guess`; then :
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
     fi ;;
   *) host_alias=$nonopt ;;
   esac ;;
 esac
 
-host=`$ac_config_sub $host_alias`
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
 
-opt_gnu_malloc=yes
+opt_bash_malloc=yes
 opt_glibc_malloc=no
 opt_purify=no
+opt_purecov=no
 opt_afs=no
+opt_curses=no
+opt_with_installed_readline=no
+
+#htmldir=
 
 case "${host_cpu}-${host_os}" in
-alpha-*)       opt_gnu_malloc=no ;;    # alpha running osf/1 or linux
-*cray*-*)      opt_gnu_malloc=no ;;    # Crays
-*-osf1*)       opt_gnu_malloc=no ;;    # other osf/1 machines
-sparc-svr4*)   opt_gnu_malloc=no ;;    # sparc SVR4, SVR4.2
-sparc-netbsd*) opt_gnu_malloc=no ;;    # needs 8-byte alignment
-sparc-linux*)  opt_gnu_malloc=no ;;    # sparc running linux; requires ELF
-*-aix*)                opt_gnu_malloc=no ;;    # AIX machines
-*-nextstep*)   opt_gnu_malloc=no ;;    # NeXT machines running NeXTstep
-*-dgux*)       opt_gnu_malloc=no ;;    # DG/UX machines
-*-qnx)         opt_gnu_malloc=no ;;    # QNX 4.2
-*-bsdi2.1)     opt_gnu_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins
+alpha*-*)      opt_bash_malloc=no ;;   # alpha running osf/1 or linux
+*[Cc]ray*-*)   opt_bash_malloc=no ;;   # Crays
+*-osf1*)       opt_bash_malloc=no ;;   # other osf/1 machines
+sparc-svr4*)   opt_bash_malloc=no ;;   # sparc SVR4, SVR4.2
+sparc-netbsd*) opt_bash_malloc=no ;;   # needs 8-byte alignment
+mips-irix6*)   opt_bash_malloc=no ;;   # needs 8-byte alignment
+m68k-sysv)     opt_bash_malloc=no ;;   # fixes file descriptor leak in closedir
+sparc-linux*)  opt_bash_malloc=no ;;   # sparc running linux; requires ELF
+#*-freebsd*)   opt_bash_malloc=no ;;   # they claim it's better
+*-aix*)                opt_bash_malloc=no ;;   # AIX machines
+*-nextstep*)   opt_bash_malloc=no ;;   # NeXT machines running NeXTstep
+*-macos*)      opt_bash_malloc=no ;;   # Apple MacOS X
+*-rhapsody*)   opt_bash_malloc=no ;;   # Apple Rhapsody (MacOS X)
+*-darwin*)     opt_bash_malloc=no ;;   # Apple Darwin (MacOS X)
+*-dgux*)       opt_bash_malloc=no ;;   # DG/UX machines
+*-qnx*)                opt_bash_malloc=no ;;   # QNX 4.2
+*-machten4)    opt_bash_malloc=no ;;   # MachTen 4.x
+*-bsdi2.1|*-bsdi3.?)   opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins
+*-beos*)       opt_bash_malloc=no ;;   # they say it's suitable
+*-cygwin*)     opt_bash_malloc=no ;;   # Cygnus's CYGWIN environment
+*-opennt*|*-interix*)  opt_bash_malloc=no ;;   # Interix, now owned by Microsoft
 esac
 
-# Check whether --with-gnu-malloc or --without-gnu-malloc was given.
-if test "${with_gnu_malloc+set}" = set; then
-  withval="$with_gnu_malloc"
-  opt_gnu_malloc=$withval
+# Check whether --with-afs or --without-afs was given.
+if test "${with_afs+set}" = set; then
+  withval="$with_afs"
+  opt_afs=$withval
+fi
+
+# Check whether --with-bash-malloc or --without-bash-malloc was given.
+if test "${with_bash_malloc+set}" = set; then
+  withval="$with_bash_malloc"
+  opt_bash_malloc=$withval
+fi
+
+# Check whether --with-curses or --without-curses was given.
+if test "${with_curses+set}" = set; then
+  withval="$with_curses"
+  opt_curses=$withval
 fi
 
 # Check whether --with-glibc-malloc or --without-glibc-malloc was given.
@@ -713,33 +802,56 @@ if test "${with_glibc_malloc+set}" = set; then
   opt_glibc_malloc=$withval
 fi
 
+# Check whether --with-gnu-malloc or --without-gnu-malloc was given.
+if test "${with_gnu_malloc+set}" = set; then
+  withval="$with_gnu_malloc"
+  opt_bash_malloc=$withval
+fi
+
+# Check whether --with-installed-readline or --without-installed-readline was given.
+if test "${with_installed_readline+set}" = set; then
+  withval="$with_installed_readline"
+  opt_with_installed_readline=$withval
+fi
+
+# Check whether --with-purecov or --without-purecov was given.
+if test "${with_purecov+set}" = set; then
+  withval="$with_purecov"
+  opt_purecov=$withval
+fi
+
 # Check whether --with-purify or --without-purify was given.
 if test "${with_purify+set}" = set; then
   withval="$with_purify"
   opt_purify=$withval
 fi
 
-# Check whether --with-afs or --without-afs was given.
-if test "${with_afs+set}" = set; then
-  withval="$with_afs"
-  opt_afs=$withval
-fi
-
 
 if test "$opt_glibc_malloc" = yes; then 
-       MALLOC=gmalloc.o MALLOC_SRC='$(ALLOC_LIBSRC)/gmalloc.c'
-elif test "$opt_gnu_malloc" = yes; then
-       MALLOC=malloc.o MALLOC_SRC='$(ALLOC_LIBSRC)/malloc.c'
+       MALLOC_TARGET=gmalloc
+       MALLOC_SRC=gmalloc.c
+elif test "$opt_bash_malloc" = yes; then
+       MALLOC_TARGET=malloc
+       MALLOC_SRC=malloc.c
+       cat >> confdefs.h <<\EOF
+#define USING_BASH_MALLOC 1
+EOF
+
 else
-       MALLOC= MALLOC_SRC=
+       MALLOC_TARGET=stubmalloc
+       MALLOC_SRC=stub.c
 fi
 
 if test "$opt_purify" = yes; then
-       PURIFY=purify
+       PURIFY="purify "
 else
        PURIFY=
 fi
 
+if test "$opt_purecov" = yes; then
+       PURIFY="${PURIFY}purecov"
+fi
+
 if test "$opt_afs" = yes; then
        cat >> confdefs.h <<\EOF
 #define AFS 1
@@ -747,6 +859,10 @@ EOF
 
 fi
 
+if test "$opt_curses" = yes; then
+       prefer_curses=yes
+fi
+
 opt_minimal_config=no
 
 opt_job_control=yes
@@ -762,10 +878,18 @@ opt_select=yes
 opt_help=yes
 opt_array_variables=yes
 opt_dparen_arith=yes
+opt_extended_glob=yes
 opt_brace_expansion=yes
 opt_disabled_builtins=no
 opt_command_timing=yes
-opt_usg_echo=no
+opt_xpg_echo=no
+opt_cond_command=yes
+opt_arith_for_command=yes
+opt_net_redirs=yes
+opt_progcomp=yes
+
+opt_static_link=no
+opt_profiling=no
 
 # Check whether --enable-minimal-config or --disable-minimal-config was given.
 if test "${enable_minimal_config+set}" = set; then
@@ -780,12 +904,8 @@ if test $opt_minimal_config = yes; then
        opt_restricted=no opt_process_subst=no opt_prompt_decoding=no
        opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no
        opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no
-fi
-
-# Check whether --enable-job-control or --disable-job-control was given.
-if test "${enable_job_control+set}" = set; then
-  enableval="$enable_job_control"
-  opt_job_control=$enableval
+       opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no
+       opt_net_redirs=no opt_progcomp=no
 fi
 
 # Check whether --enable-alias or --disable-alias was given.
@@ -794,16 +914,16 @@ if test "${enable_alias+set}" = set; then
   opt_alias=$enableval
 fi
 
-# Check whether --enable-readline or --disable-readline was given.
-if test "${enable_readline+set}" = set; then
-  enableval="$enable_readline"
-  opt_readline=$enableval
+# Check whether --enable-arith-for-command or --disable-arith-for-command was given.
+if test "${enable_arith_for_command+set}" = set; then
+  enableval="$enable_arith_for_command"
+  opt_arith_for_command=$enableval
 fi
 
-# Check whether --enable-history or --disable-history was given.
-if test "${enable_history+set}" = set; then
-  enableval="$enable_history"
-  opt_history=$enableval
+# Check whether --enable-array-variables or --disable-array-variables was given.
+if test "${enable_array_variables+set}" = set; then
+  enableval="$enable_array_variables"
+  opt_array_variables=$enableval
 fi
 
 # Check whether --enable-bang-history or --disable-bang-history was given.
@@ -812,16 +932,70 @@ if test "${enable_bang_history+set}" = set; then
   opt_bang_history=$enableval
 fi
 
+# Check whether --enable-brace-expansion or --disable-brace-expansion was given.
+if test "${enable_brace_expansion+set}" = set; then
+  enableval="$enable_brace_expansion"
+  opt_brace_expansion=$enableval
+fi
+
+# Check whether --enable-command-timing or --disable-command-timing was given.
+if test "${enable_command_timing+set}" = set; then
+  enableval="$enable_command_timing"
+  opt_command_timing=$enableval
+fi
+
+# Check whether --enable-cond-command or --disable-cond-command was given.
+if test "${enable_cond_command+set}" = set; then
+  enableval="$enable_cond_command"
+  opt_cond_command=$enableval
+fi
+
 # Check whether --enable-directory-stack or --disable-directory-stack was given.
 if test "${enable_directory_stack+set}" = set; then
   enableval="$enable_directory_stack"
   opt_dirstack=$enableval
 fi
 
-# Check whether --enable-restricted or --disable-restricted was given.
-if test "${enable_restricted+set}" = set; then
-  enableval="$enable_restricted"
-  opt_restricted=$enableval
+# Check whether --enable-disabled-builtins or --disable-disabled-builtins was given.
+if test "${enable_disabled_builtins+set}" = set; then
+  enableval="$enable_disabled_builtins"
+  opt_disabled_builtins=$enableval
+fi
+
+# Check whether --enable-dparen-arithmetic or --disable-dparen-arithmetic was given.
+if test "${enable_dparen_arithmetic+set}" = set; then
+  enableval="$enable_dparen_arithmetic"
+  opt_dparen_arith=$enableval
+fi
+
+# Check whether --enable-extended-glob or --disable-extended-glob was given.
+if test "${enable_extended_glob+set}" = set; then
+  enableval="$enable_extended_glob"
+  opt_extended_glob=$enableval
+fi
+
+# Check whether --enable-help-builtin or --disable-help-builtin was given.
+if test "${enable_help_builtin+set}" = set; then
+  enableval="$enable_help_builtin"
+  opt_help=$enableval
+fi
+
+# Check whether --enable-history or --disable-history was given.
+if test "${enable_history+set}" = set; then
+  enableval="$enable_history"
+  opt_history=$enableval
+fi
+
+# Check whether --enable-job-control or --disable-job-control was given.
+if test "${enable_job_control+set}" = set; then
+  enableval="$enable_job_control"
+  opt_job_control=$enableval
+fi
+
+# Check whether --enable-net-redirections or --disable-net-redirections was given.
+if test "${enable_net_redirections+set}" = set; then
+  enableval="$enable_net_redirections"
+  opt_net_redirs=$enableval
 fi
 
 # Check whether --enable-process-substitution or --disable-process-substitution was given.
@@ -830,59 +1004,61 @@ if test "${enable_process_substitution+set}" = set; then
   opt_process_subst=$enableval
 fi
 
+# Check whether --enable-progcomp or --disable-progcomp was given.
+if test "${enable_progcomp+set}" = set; then
+  enableval="$enable_progcomp"
+  opt_progcomp=$enableval
+fi
+
 # Check whether --enable-prompt-string-decoding or --disable-prompt-string-decoding was given.
 if test "${enable_prompt_string_decoding+set}" = set; then
   enableval="$enable_prompt_string_decoding"
   opt_prompt_decoding=$enableval
 fi
 
+# Check whether --enable-readline or --disable-readline was given.
+if test "${enable_readline+set}" = set; then
+  enableval="$enable_readline"
+  opt_readline=$enableval
+fi
+
+# Check whether --enable-restricted or --disable-restricted was given.
+if test "${enable_restricted+set}" = set; then
+  enableval="$enable_restricted"
+  opt_restricted=$enableval
+fi
+
 # Check whether --enable-select or --disable-select was given.
 if test "${enable_select+set}" = set; then
   enableval="$enable_select"
   opt_select=$enableval
 fi
 
-# Check whether --enable-help-builtin or --disable-help-builtin was given.
-if test "${enable_help_builtin+set}" = set; then
-  enableval="$enable_help_builtin"
-  opt_help=$enableval
-fi
-
-# Check whether --enable-array-variables or --disable-array-variables was given.
-if test "${enable_array_variables+set}" = set; then
-  enableval="$enable_array_variables"
-  opt_array_variables=$enableval
+# Check whether --enable-usg-echo-default or --disable-usg-echo-default was given.
+if test "${enable_usg_echo_default+set}" = set; then
+  enableval="$enable_usg_echo_default"
+  opt_xpg_echo=$enableval
 fi
 
-# Check whether --enable-dparen-arithmetic or --disable-dparen-arithmetic was given.
-if test "${enable_dparen_arithmetic+set}" = set; then
-  enableval="$enable_dparen_arithmetic"
-  opt_dparen_arith=$enableval
+# Check whether --enable-xpg-echo-default or --disable-xpg-echo-default was given.
+if test "${enable_xpg_echo_default+set}" = set; then
+  enableval="$enable_xpg_echo_default"
+  opt_xpg_echo=$enableval
 fi
 
-# Check whether --enable-brace-expansion or --disable-brace-expansion was given.
-if test "${enable_brace_expansion+set}" = set; then
-  enableval="$enable_brace_expansion"
-  opt_brace_expansion=$enableval
-fi
 
-# Check whether --enable-disabled-builtins or --disable-disabled-builtins was given.
-if test "${enable_disabled_builtins+set}" = set; then
-  enableval="$enable_disabled_builtins"
-  opt_disabled_builtins=$enableval
+# Check whether --enable-profiling or --disable-profiling was given.
+if test "${enable_profiling+set}" = set; then
+  enableval="$enable_profiling"
+  opt_profiling=$enableval
 fi
 
-# Check whether --enable-command-timing or --disable-command-timing was given.
-if test "${enable_command_timing+set}" = set; then
-  enableval="$enable_command_timing"
-  opt_command_timing=$enableval
+# Check whether --enable-static-link or --disable-static-link was given.
+if test "${enable_static_link+set}" = set; then
+  enableval="$enable_static_link"
+  opt_static_link=$enableval
 fi
 
-# Check whether --enable-usg-echo-default or --disable-usg-echo-default was given.
-if test "${enable_usg_echo_default+set}" = set; then
-  enableval="$enable_usg_echo_default"
-  opt_usg_echo=$enableval
-fi
 
 
 
@@ -891,36 +1067,6 @@ cat >> confdefs.h <<\EOF
 #define ALIAS 1
 EOF
 
-fi
-if test $opt_readline = yes; then
-cat >> confdefs.h <<\EOF
-#define READLINE 1
-EOF
-
-READLINE_LIB=-lreadline
-READLINE_DEP='$(READLINE_LIBRARY)'
-else
-READLINE_LIB= READLINE_DEP=
-fi
-if test $opt_history = yes; then
-cat >> confdefs.h <<\EOF
-#define HISTORY 1
-EOF
-
-HISTORY_LIB=-lhistory
-HISTORY_DEP='$(HISTORY_LIBRARY)'
-else
-HISTORY_LIB= HISTORY_DEP=
-fi
-if test $opt_bang_history = yes; then
-cat >> confdefs.h <<\EOF
-#define BANG_HISTORY 1
-EOF
-
-HISTORY_LIB=-lhistory
-HISTORY_DEP='$(HISTORY_LIBRARY)'
-else
-HISTORY_LIB= HISTORY_DEP=
 fi
 if test $opt_dirstack = yes; then
 cat >> confdefs.h <<\EOF
@@ -988,12 +1134,49 @@ cat >> confdefs.h <<\EOF
 EOF
 
 fi
-if test $opt_usg_echo = yes ; then
+if test $opt_xpg_echo = yes ; then
 cat >> confdefs.h <<\EOF
-#define DEFAULT_ECHO_TO_USG 1
+#define DEFAULT_ECHO_TO_XPG 1
 EOF
 
 fi
+if test $opt_extended_glob = yes ; then
+cat >> confdefs.h <<\EOF
+#define EXTENDED_GLOB 1
+EOF
+
+fi
+if test $opt_cond_command = yes ; then
+cat >> confdefs.h <<\EOF
+#define COND_COMMAND 1
+EOF
+
+fi
+if test $opt_arith_for_command = yes; then
+cat >> confdefs.h <<\EOF
+#define ARITH_FOR_COMMAND 1
+EOF
+
+fi
+if test $opt_net_redirs = yes; then
+cat >> confdefs.h <<\EOF
+#define NETWORK_REDIRECTIONS 1
+EOF
+
+fi
+if test $opt_progcomp = yes; then
+cat >> confdefs.h <<\EOF
+#define PROGRAMMABLE_COMPLETION 1
+EOF
+
+fi
+
+if test "$opt_minimal_config" = yes; then
+       TESTSCRIPT=run-minimal
+else
+       TESTSCRIPT=run-all
+fi
+
 
 
 
@@ -1001,22 +1184,24 @@ fi
 
 
 
+BASHVERS=2.05
+BASHPATCH=0
 
-
-echo "Beginning configuration for bash-2.0"
+echo "Beginning configuration for bash-$BASHVERS for ${host_cpu}-${host_vendor}-${host_os}"
 
 # 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:1012: checking for $ac_word" >&5
+echo "configure:1196: 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
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
+  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_CC="gcc"
@@ -1037,16 +1222,17 @@ 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:1041: checking for $ac_word" >&5
+echo "configure:1226: 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
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
   ac_prog_rejected=no
-  for ac_dir in $PATH; do
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$ac_word; then
       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
@@ -1081,25 +1267,61 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+  if test -z "$CC"; then
+    case "`uname -s`" in
+    *win32* | *WIN32*)
+      # 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:1277: 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
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # 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_CC="cl"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+ ;;
+    esac
+  fi
   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1089: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1309: 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.
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
-cat > conftest.$ac_ext <<EOF
-#line 1099 "configure"
+cat > conftest.$ac_ext << EOF
+
+#line 1320 "configure"
 #include "confdefs.h"
+
 main(){return(0);}
 EOF
-if { (eval echo configure:1103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1325: \"$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
@@ -1113,18 +1335,24 @@ else
   ac_cv_prog_cc_works=no
 fi
 rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
 
 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
 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:1123: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1351: 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:1128: checking whether we are using GNU C" >&5
+echo "configure:1356: 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
@@ -1133,7 +1361,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1137: \"$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:1365: \"$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
@@ -1144,11 +1372,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
 
 if test $ac_cv_prog_gcc = yes; then
   GCC=yes
-  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:1152: checking whether ${CC-cc} accepts -g" >&5
+else
+  GCC=
+fi
+
+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:1384: 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
@@ -1163,20 +1395,57 @@ rm -f conftest*
 fi
 
 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-  if test "$ac_test_CFLAGS" = set; then
-    CFLAGS="$ac_save_CFLAGS"
-  elif test $ac_cv_prog_cc_g = yes; then
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
     CFLAGS="-g -O2"
   else
-    CFLAGS="-O2"
+    CFLAGS="-g"
   fi
 else
-  GCC=
-  test "${CFLAGS+set}" = set || CFLAGS="-g"
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
 fi
 
+echo $ac_n "checking whether large file support needs explicit enabling""... $ac_c" 1>&6
+echo "configure:1416: checking whether large file support needs explicit enabling" >&5
+ac_getconfs=''
+ac_result=yes
+ac_set=''
+ac_shellvars='CPPFLAGS LDFLAGS LIBS'
+for ac_shellvar in $ac_shellvars; do
+  case $ac_shellvar in
+  CPPFLAGS) ac_lfsvar=LFS_CFLAGS ac_lfs64var=LFS64_CFLAGS ;;
+  *) ac_lfsvar=LFS_$ac_shellvar ac_lfs64var=LFS64_$ac_shellvar ;;
+  esac
+  eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
+  (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
+  ac_getconf=`getconf $ac_lfsvar`
+  ac_getconf64=`getconf $ac_lfs64var`
+  ac_getconfs=$ac_getconfs$ac_getconf\ $ac_getconf64
+  eval ac_test_$ac_shellvar="\$ac_getconf\ \$ac_getconf64"
+done
+case "$ac_result$ac_getconfs" in
+yes) ac_result=no ;;
+esac
+case "$ac_result$ac_set" in
+yes?*) ac_result="yes, but $ac_set is already set, so use its settings"
+esac
+echo "$ac_t""$ac_result" 1>&6
+case $ac_result in
+yes)
+  for ac_shellvar in $ac_shellvars; do
+    eval $ac_shellvar=\$ac_test_$ac_shellvar
+  done ;;
+esac
+
+
 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1180: checking for POSIXized ISC" >&5
+echo "configure:1449: 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
@@ -1197,7 +1466,7 @@ else
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1201: checking how to run the C preprocessor" >&5
+echo "configure:1470: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1212,14 +1481,14 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1216 "configure"
+#line 1485 "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:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:1491: \"$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
   :
 else
@@ -1229,14 +1498,31 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1233 "configure"
+#line 1502 "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:1508: \"$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
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 1519 "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:1239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:1525: \"$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
   :
 else
@@ -1248,6 +1534,8 @@ else
 fi
 rm -f conftest*
 fi
+rm -f conftest*
+fi
 rm -f conftest*
   ac_cv_prog_CPP="$CPP"
 fi
@@ -1259,18 +1547,18 @@ echo "$ac_t""$CPP" 1>&6
 
 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
-echo "configure:1263: checking for minix/config.h" >&5
+echo "configure:1551: checking for minix/config.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 1268 "configure"
+#line 1556 "configure"
 #include "confdefs.h"
 #include <minix/config.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:1561: \"$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"
@@ -1307,58 +1595,172 @@ EOF
 fi
 
 
-echo $ac_n "checking whether CC works at all""... $ac_c" 1>&6
-echo "configure:1312: checking whether CC works at all" >&5
-if eval "test \"`echo '$''{'bash_cv_prog_cc_works'+set}'`\" = set"; then
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:1600: checking for Cygwin environment" >&5
+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test "$cross_compiling" = yes; then
-  bash_cv_prog_cc_works=no
+  cat > conftest.$ac_ext <<EOF
+#line 1605 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:1616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_cygwin=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_cygwin=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+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:1633: 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 1320 "configure"
+#line 1638 "configure"
 #include "confdefs.h"
-main() { exit(0); }
+
+int main() {
+return __MINGW32__;
+; return 0; }
 EOF
-if { (eval echo configure:1324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  bash_cv_prog_cc_works=yes
+if { (eval echo configure:1645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_mingw32=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  bash_cv_prog_cc_works=no
+  rm -rf conftest*
+  ac_cv_mingw32=no
 fi
-rm -fr conftest*
+rm -f conftest*
+rm -f conftest*
 fi
 
-       
+echo "$ac_t""$ac_cv_mingw32" 1>&6
+MINGW32=
+test "$ac_cv_mingw32" = yes && MINGW32=yes
+
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:1664: checking for executable suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
+  ac_cv_exeext=.exe
+else
+  rm -f conftest*
+  echo 'int main () { return 0; }' > conftest.$ac_ext
+  ac_cv_exeext=
+  if { (eval echo configure:1674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+    for file in conftest.*; do
+      case $file in
+      *.c | *.o | *.obj) ;;
+      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+      esac
+    done
+  else
+    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+  fi
+  rm -f conftest*
+  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+
+
+SIGNAMES_H=lsignames.h
 
+
+
+if test "x$cross_compiling" = "xyes"; then
+    case "${host}" in
+    *-cygwin*)
+       cross_cache=${srcdir}/cross-build/cygwin32.cache
+       SIGNAMES_H='$(srcdir)/cross-build/win32sig.h'
+       ;;
+    i[3456]86-*-beos*)
+       cross_cache=${srcdir}/cross-build/x86-beos.cache
+       SIGNAMES_H='${srcdir}/cross-build/beos-sig.h'
+       ;;
+    *) echo "configure: cross-compiling for $host is not supported" >&2
+       ;;
+    esac
+    if test -n "${cross_cache}" && test -r "${cross_cache}"; then
+       echo "loading cross-build cache file ${cross_cache}"
+       . ${cross_cache}
+    fi
+    unset cross_cache
 fi
 
-echo "$ac_t""$bash_cv_prog_cc_works" 1>&6
-if test "$bash_cv_prog_cc_works" = "no"; then
-{ echo "configure: error: Installation or configuration problem: C compiler cannot create executables" 1>&2; exit 1; }
+
+if test -z "$CC_FOR_BUILD"; then
+    if test "x$cross_compiling" = "xno"; then
+       CC_FOR_BUILD='$(CC)'
+    else
+       CC_FOR_BUILD=gcc
+    fi
 fi
 
 
+
 test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
 
 test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
 
+if test "$opt_profiling" = "yes"; then
+       PROFILE_FLAGS=-pg
+       case "$host_os" in
+       solaris2*)      ;;
+       *)              opt_static_link=yes ;;
+       esac
+fi
+
+if test "$opt_static_link" = yes; then
+       # if we're using gcc, add `-static' to LDFLAGS
+       if test -n "$GCC" || test "$ac_cv_prog_gcc" = "yes"; then
+               STATIC_LD="-static"
+               LDFLAGS="$LDFLAGS -static"      # XXX experimental
+       fi
+fi
+
+
 
 
 
 
 if test $ac_cv_prog_gcc = yes; then
     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:1356: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:1758: checking whether ${CC-cc} needs -traditional" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
     ac_pattern="Autoconf.*'x'"
   cat > conftest.$ac_ext <<EOF
-#line 1362 "configure"
+#line 1764 "configure"
 #include "confdefs.h"
 #include <sgtty.h>
 Autoconf TIOCGETP
@@ -1376,7 +1778,7 @@ rm -f conftest*
 
   if test $ac_cv_prog_gcc_traditional = no; then
     cat > conftest.$ac_ext <<EOF
-#line 1380 "configure"
+#line 1782 "configure"
 #include "confdefs.h"
 #include <termio.h>
 Autoconf TCGETA
@@ -1398,106 +1800,346 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
 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
-# 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:1413: 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="${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.
-      for ac_prog in ginstall installbsd 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.
-           # OSF/1 installbsd also uses dspmsg, but is usable.
-           :
-         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}'
+if test "$opt_readline" = yes && test "$opt_with_installed_readline" = "yes"
+then
 
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-# Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1465: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
+       if test -z "$TERMCAP_LIB" ; then
+               
+if test "X$bash_cv_termcap_lib" = "X"; then
+_bash_needmsg=yes
+else
+echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
+echo "configure:1815: checking which library has the termcap functions" >&5
+_bash_needmsg=
+fi
+if eval "test \"`echo '$''{'bash_cv_termcap_lib'+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.
+  echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
+echo "configure:1822: 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
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_AR="ar"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
+  ac_save_LIBS="$LIBS"
+LIBS="-ltermcap  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1830 "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:1841: \"$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
+  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
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  bash_cv_termcap_lib=libtermcap
 else
   echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "ranlib", so it can be a program name with args.
+echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
+echo "configure:1860: 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
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lcurses  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1868 "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:1879: \"$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
+  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
+  bash_cv_termcap_lib=libcurses
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
+echo "configure:1898: checking for tgetent in -lncurses" >&5
+ac_lib_var=`echo ncurses'_'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
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lncurses  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1906 "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:1917: \"$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
+  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
+  bash_cv_termcap_lib=libncurses
+else
+  echo "$ac_t""no" 1>&6
+bash_cv_termcap_lib=gnutermcap
+fi
+
+fi
+
+fi
+
+fi
+
+if test "X$_bash_needmsg" = "Xyes"; then
+echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
+echo "configure:1946: checking which library has the termcap functions" >&5
+fi
+echo "$ac_t""using $bash_cv_termcap_lib" 1>&6
+if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
+LDFLAGS="$LDFLAGS -L./lib/termcap"
+TERMCAP_LIB="./lib/termcap/libtermcap.a"
+TERMCAP_DEP="./lib/termcap/libtermcap.a"
+elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
+TERMCAP_LIB=-ltermcap
+TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libncurses; then
+TERMCAP_LIB=-lncurses
+TERMCAP_DEP=
+else
+TERMCAP_LIB=-lcurses
+TERMCAP_DEP=
+fi
+
+       fi
+
+       test "x$prefix" = xNONE && _rl_prefix=$ac_default_prefix || _rl_prefix=${prefix}
+       test "x$exec_prefix" = xNONE && _rl_exec_prefix=${_rl_prefix} || _rl_exec_prefix=${exec_prefix}
+
+       echo $ac_n "checking version of installed readline library""... $ac_c" 1>&6
+echo "configure:1970: checking version of installed readline library" >&5
+       _rl_version=`exec_prefix=${_rl_exec_prefix} ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/rlvers.sh -C "${CC}" -L ${libdir} -I ${includedir} -T ${TERMCAP_LIB}`
+       echo "$ac_t""$_rl_version" 1>&6
+
+       case "$_rl_version" in
+       4.[2-9]*|5*|6*|7*|8*|9*)        ;;
+       *)      opt_with_installed_readline=no 
+               echo "configure: warning: installed readline library is too old to be linked with bash" 1>&2
+               echo "configure: warning: using private bash version" 1>&2
+               ;;
+       esac
+       unset _rl_version _rl_prefix _rl_exec_prefix
+fi
+
+if test $opt_readline = yes; then
+       cat >> confdefs.h <<\EOF
+#define READLINE 1
+EOF
+
+       READLINE_LIB=-lreadline
+       if test "$opt_with_installed_readline" = "yes" ; then
+               RL_LIBDIR='$(libdir)'
+               READLINE_DEP=
+               RL_INCLUDE='-I$(includedir)'
+       else
+               RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
+               READLINE_DEP='$(READLINE_LIBRARY)'
+       fi
+else
+       RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
+       READLINE_LIB= READLINE_DEP=
+fi
+if test $opt_history = yes || test $opt_bang_history = yes; then
+       if test $opt_history = yes; then
+               cat >> confdefs.h <<\EOF
+#define HISTORY 1
+EOF
+
+       fi
+       if test $opt_bang_history = yes; then
+               cat >> confdefs.h <<\EOF
+#define BANG_HISTORY 1
+EOF
+
+       fi
+       HISTORY_LIB=-lhistory
+       if test "$opt_with_installed_readline" = "yes"; then
+               HIST_LIBDIR='$(libdir)'
+               HISTORY_DEP=
+               RL_INCLUDE='-I$(includedir)'
+       else
+               HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
+               HISTORY_DEP='$(HISTORY_LIBRARY)'
+       fi
+else
+       HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
+       HISTORY_LIB= HISTORY_DEP=
+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:2049: 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'
+
+# Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2104: 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="ar"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+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
+
+test -n "$ARFLAGS" || ARFLAGS="cr"
+# 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:1493: checking for $ac_word" >&5
+echo "configure:2134: 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="${IFS}:"
-  for ac_dir in $PATH; do
+  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"
@@ -1520,15 +2162,16 @@ 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:1524: checking for $ac_word" >&5
+echo "configure:2166: 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="${IFS}:"
-  for ac_dir in $PATH; do
+  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"
@@ -1550,7 +2193,7 @@ done
 test -n "$YACC" || YACC="yacc"
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1554: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:2197: 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
@@ -1577,22 +2220,28 @@ else
 fi
 
 
+case "$host_os" in
+opennt*|interix*)      MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
+*)                     MAKE_SHELL=/bin/sh ;;
+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:1584: checking for working alloca.h" >&5
+echo "configure:2233: 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 1589 "configure"
+#line 2238 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2245: \"$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
@@ -1613,25 +2262,30 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1617: checking for alloca" >&5
+echo "configure:2266: 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 1622 "configure"
+#line 2271 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
 # define alloca __builtin_alloca
 #else
-# if HAVE_ALLOCA_H
-#  include <alloca.h>
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
 # else
-#  ifdef _AIX
- #pragma alloca
+#  if HAVE_ALLOCA_H
+#   include <alloca.h>
 #  else
-#   ifndef alloca /* predefined by HP cc +Olibcalls */
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
 char *alloca ();
+#    endif
 #   endif
 #  endif
 # endif
@@ -1641,7 +2295,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:1645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2299: \"$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
@@ -1666,19 +2320,19 @@ if test $ac_cv_func_alloca_works = no; then
   # 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.o
+  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:1677: checking whether alloca needs Cray hooks" >&5
+echo "configure:2331: 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 1682 "configure"
+#line 2336 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -1703,12 +2357,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:1707: checking for $ac_func" >&5
+echo "configure:2361: 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 1712 "configure"
+#line 2366 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1731,7 +2385,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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_func_$ac_func=yes"
 else
@@ -1758,7 +2412,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1762: checking stack direction for C alloca" >&5
+echo "configure:2416: 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
@@ -1766,7 +2420,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 1770 "configure"
+#line 2424 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -1785,7 +2439,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2443: \"$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,7 +2461,7 @@ EOF
 fi
 
 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:1811: checking whether getpgrp takes no argument" >&5
+echo "configure:2465: checking whether getpgrp takes no argument" >&5
 if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1815,7 +2469,7 @@ else
   { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 1819 "configure"
+#line 2473 "configure"
 #include "confdefs.h"
 
 /*
@@ -1870,7 +2524,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_getpgrp_void=yes
 else
@@ -1894,7 +2548,7 @@ EOF
 fi
 
 echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
-echo "configure:1898: checking whether setvbuf arguments are reversed" >&5
+echo "configure:2552: checking whether setvbuf arguments are reversed" >&5
 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1902,7 +2556,7 @@ else
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 1906 "configure"
+#line 2560 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 /* If setvbuf has the reversed format, exit 0. */
@@ -1916,7 +2570,7 @@ main () {
   exit(0);                     /* Non-reversed systems segv here.  */
 }
 EOF
-if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_setvbuf_reversed=yes
 else
@@ -1940,12 +2594,12 @@ EOF
 fi
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:1944: checking for vprintf" >&5
+echo "configure:2598: checking for vprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1949 "configure"
+#line 2603 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -1968,7 +2622,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
@@ -1992,12 +2646,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:1996: checking for _doprnt" >&5
+echo "configure:2650: checking for _doprnt" >&5
 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2001 "configure"
+#line 2655 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -2020,7 +2674,7 @@ _doprnt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
@@ -2045,7 +2699,7 @@ fi
 fi
 
 echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
-echo "configure:2049: checking for wait3 that fills in rusage" >&5
+echo "configure:2703: checking for wait3 that fills in rusage" >&5
 if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2053,7 +2707,7 @@ else
   ac_cv_func_wait3_rusage=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 2057 "configure"
+#line 2711 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -2084,7 +2738,7 @@ main() {
   }
 }
 EOF
-if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_wait3_rusage=yes
 else
@@ -2107,7 +2761,7 @@ EOF
 fi
 
 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:2111: checking for working strcoll" >&5
+echo "configure:2765: checking for working strcoll" >&5
 if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2115,7 +2769,7 @@ else
   ac_cv_func_strcoll_works=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 2119 "configure"
+#line 2773 "configure"
 #include "confdefs.h"
 #include <string.h>
 main ()
@@ -2125,7 +2779,7 @@ main ()
        strcoll ("123", "456") >= 0);
 }
 EOF
-if { (eval echo configure:2129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_strcoll_works=yes
 else
@@ -2150,9 +2804,9 @@ fi
 
 if test "$ac_cv_func_vprintf" = no; then
     echo $ac_n "checking for declaration of vprintf in stdio.h""... $ac_c" 1>&6
-echo "configure:2154: checking for declaration of vprintf in stdio.h" >&5
+echo "configure:2808: checking for declaration of vprintf in stdio.h" >&5
     cat > conftest.$ac_ext <<EOF
-#line 2156 "configure"
+#line 2810 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 EOF
@@ -2173,12 +2827,12 @@ EOF
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2177: checking return type of signal handlers" >&5
+echo "configure:2831: 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 2182 "configure"
+#line 2836 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2195,7 +2849,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:2199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -2215,12 +2869,12 @@ EOF
 
 
 echo $ac_n "checking for __setostype""... $ac_c" 1>&6
-echo "configure:2219: checking for __setostype" >&5
+echo "configure:2873: checking for __setostype" >&5
 if eval "test \"`echo '$''{'ac_cv_func___setostype'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2224 "configure"
+#line 2878 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char __setostype(); below.  */
@@ -2243,7 +2897,7 @@ __setostype();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func___setostype=yes"
 else
@@ -2266,12 +2920,12 @@ else
 fi
 
 echo $ac_n "checking for wait3""... $ac_c" 1>&6
-echo "configure:2270: checking for wait3" >&5
+echo "configure:2924: checking for wait3" >&5
 if eval "test \"`echo '$''{'ac_cv_func_wait3'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2275 "configure"
+#line 2929 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char wait3(); below.  */
@@ -2294,7 +2948,7 @@ wait3();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_wait3=yes"
 else
@@ -2318,12 +2972,12 @@ fi
 
 
 echo $ac_n "checking for mkfifo""... $ac_c" 1>&6
-echo "configure:2322: checking for mkfifo" >&5
+echo "configure:2976: checking for mkfifo" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mkfifo'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2327 "configure"
+#line 2981 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char mkfifo(); below.  */
@@ -2346,7 +3000,7 @@ mkfifo();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_mkfifo=yes"
 else
@@ -2374,16 +3028,17 @@ fi
 
 
 for ac_func in dup2 select getdtablesize getgroups gethostname \
-               setdtablesize getpagesize killpg lstat getpeername \
-               getrlimit getrusage gettimeofday waitpid tcgetpgrp
+               setdtablesize getpagesize killpg lstat getpeername sbrk \
+               getrlimit getrusage gettimeofday waitpid tcgetpgrp \
+               readlink rename
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2382: checking for $ac_func" >&5
+echo "configure:3037: 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 2387 "configure"
+#line 3042 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2406,7 +3061,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3065: \"$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
@@ -2432,16 +3087,18 @@ done
 
 
 for ac_func in bcopy bzero confstr getcwd strcasecmp setenv putenv \
-               setlinebuf setlocale strchr strerror tcgetattr uname \
-               sysconf ulimit times tzset siginterrupt memmove
+               setlinebuf setlocale strchr strerror strtod strtol \
+               strtoul tcgetattr uname sysconf ulimit times tzset \
+               siginterrupt memmove ttyname gethostbyname getservbyname \
+               inet_aton strpbrk setvbuf pathconf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2440: checking for $ac_func" >&5
+echo "configure:3097: 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 2445 "configure"
+#line 3102 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2464,7 +3121,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3125: \"$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
@@ -2493,18 +3150,18 @@ for ac_hdr in libintl.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2497: checking for $ac_hdr" >&5
+echo "configure:3154: 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 2502 "configure"
+#line 3159 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:3164: \"$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"
@@ -2532,12 +3189,12 @@ done
 for ac_func in gettext textdomain bindtextdomain
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2536: checking for $ac_func" >&5
+echo "configure:3193: 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 2541 "configure"
+#line 3198 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2560,7 +3217,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3221: \"$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
@@ -2587,7 +3244,7 @@ done
 
 if test "$ac_cv_func_bindtextdomain" = "no"; then
     echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:2591: checking for bindtextdomain in -lintl" >&5
+echo "configure:3248: 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
@@ -2595,7 +3252,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2599 "configure"
+#line 3256 "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
@@ -2606,7 +3263,7 @@ int main() {
 bindtextdomain()
 ; return 0; }
 EOF
-if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3267: \"$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
@@ -2637,12 +3294,12 @@ fi
        for ac_func in gettext textdomain bindtextdomain
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2641: checking for $ac_func" >&5
+echo "configure:3298: 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 2646 "configure"
+#line 3303 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2665,7 +3322,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3326: \"$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
@@ -2692,8 +3349,9 @@ done
     fi
 fi
 
+if test "$opt_static_link" != yes; then
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2697: checking for dlopen in -ldl" >&5
+echo "configure:3355: 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
@@ -2701,7 +3359,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2705 "configure"
+#line 3363 "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
@@ -2712,7 +3370,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3374: \"$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
@@ -2742,12 +3400,12 @@ fi
 for ac_func in dlopen dlclose dlsym
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2746: checking for $ac_func" >&5
+echo "configure:3404: 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 2751 "configure"
+#line 3409 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2770,7 +3428,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3432: \"$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
@@ -2794,14 +3452,15 @@ else
 fi
 done
 
+fi
 
 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:2800: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+echo "configure:3459: checking for sys_siglist declaration in signal.h or unistd.h" >&5
 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2805 "configure"
+#line 3464 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2813,7 +3472,7 @@ int main() {
 char *msg = *(sys_siglist + 1);
 ; return 0; }
 EOF
-if { (eval echo configure:2817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_decl_sys_siglist=yes
 else
@@ -2839,12 +3498,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:2843: checking for $ac_hdr that defines DIR" >&5
+echo "configure:3502: 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 2848 "configure"
+#line 3507 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -2852,7 +3511,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:2856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -2877,7 +3536,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:2881: checking for opendir in -ldir" >&5
+echo "configure:3540: 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
@@ -2885,7 +3544,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2889 "configure"
+#line 3548 "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
@@ -2896,7 +3555,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:2900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3559: \"$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
@@ -2918,7 +3577,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:2922: checking for opendir in -lx" >&5
+echo "configure:3581: 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
@@ -2926,7 +3585,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2930 "configure"
+#line 3589 "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
@@ -2937,7 +3596,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:2941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3600: \"$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
@@ -2960,12 +3619,12 @@ fi
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2964: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3623: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2969 "configure"
+#line 3628 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -2974,7 +3633,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:2978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -2996,22 +3655,23 @@ fi
 
 
 for ac_hdr in unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
-                memory.h locale.h termcap.h termio.h termios.h
+                memory.h locale.h termcap.h termio.h termios.h dlfcn.h \
+                stddef.h netdb.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3004: checking for $ac_hdr" >&5
+echo "configure:3664: 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 3009 "configure"
+#line 3669 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:3674: \"$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"
@@ -3042,18 +3702,18 @@ for ac_hdr in sys/ptem.h sys/pte.h sys/stream.h sys/select.h 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:3046: checking for $ac_hdr" >&5
+echo "configure:3706: 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 3051 "configure"
+#line 3711 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:3716: \"$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"
@@ -3078,39 +3738,171 @@ else
 fi
 done
 
-
-
-if test "X$bash_cv_have_socklib" = "X"; then
-_bash_needmsg=
-else
-echo $ac_n "checking for socket library""... $ac_c" 1>&6
-echo "configure:3088: checking for socket library" >&5
-_bash_needmsg=yes
-fi
-if eval "test \"`echo '$''{'bash_cv_have_socklib'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo $ac_n "checking for getpeername in -lsocket""... $ac_c" 1>&6
-echo "configure:3095: checking for getpeername in -lsocket" >&5
-ac_lib_var=`echo socket'_'getpeername | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+for ac_hdr in netinet/in.h arpa/inet.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3746: 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
-  ac_save_LIBS="$LIBS"
-LIBS="-lsocket -lnsl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3103 "configure"
+  cat > conftest.$ac_ext <<EOF
+#line 3751 "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 getpeername();
-
-int main() {
-getpeername()
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3756: \"$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
+
+
+if test "$ac_cv_func_inet_aton" != 'yes'; then
+
+echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
+echo "configure:3786: checking for inet_aton" >&5
+if eval "test \"`echo '$''{'bash_cv_func_inet_aton'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3791 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+struct in_addr ap;
+int main() {
+ inet_aton("127.0.0.1", &ap); 
+; return 0; }
+EOF
+if { (eval echo configure:3802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  bash_cv_func_inet_aton=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  bash_cv_func_inet_aton=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$bash_cv_func_inet_aton" 1>&6
+if test $bash_cv_func_inet_aton = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_INET_ATON 1
+EOF
+
+fi
+
+fi
+
+case "$host_os" in
+irix4*)        echo $ac_n "checking for getpwent in -lsun""... $ac_c" 1>&6
+echo "configure:3826: checking for getpwent in -lsun" >&5
+ac_lib_var=`echo sun'_'getpwent | 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="-lsun  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3834 "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 getpwent();
+
+int main() {
+getpwent()
+; return 0; }
+EOF
+if { (eval echo configure:3845: \"$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
+  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
+    ac_tr_lib=HAVE_LIB`echo sun | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lsun $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+ ;;
+esac
+
+if test "$ac_cv_func_getpeername" = no; then
+       
+if test "X$bash_cv_have_socklib" = "X"; then
+_bash_needmsg=
+else
+echo $ac_n "checking for socket library""... $ac_c" 1>&6
+echo "configure:3880: checking for socket library" >&5
+_bash_needmsg=yes
+fi
+if eval "test \"`echo '$''{'bash_cv_have_socklib'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  echo $ac_n "checking for getpeername in -lsocket""... $ac_c" 1>&6
+echo "configure:3887: checking for getpeername in -lsocket" >&5
+ac_lib_var=`echo socket'_'getpeername | 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="-lsocket -lnsl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 3895 "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 getpeername();
+
+int main() {
+getpeername()
 ; return 0; }
 EOF
-if { (eval echo configure:3114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3906: \"$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
@@ -3143,14 +3935,14 @@ if test $bash_cv_have_socklib = yes; then
     _bash_needmsg=
   else
     echo $ac_n "checking for libnsl""... $ac_c" 1>&6
-echo "configure:3147: checking for libnsl" >&5
+echo "configure:3939: checking for libnsl" >&5
     _bash_needmsg=yes
   fi
   if eval "test \"`echo '$''{'bash_cv_have_libnsl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
-echo "configure:3154: checking for t_open in -lnsl" >&5
+echo "configure:3946: checking for t_open in -lnsl" >&5
 ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -3158,7 +3950,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3162 "configure"
+#line 3954 "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
@@ -3169,7 +3961,7 @@ int main() {
 t_open()
 ; return 0; }
 EOF
-if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3965: \"$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
@@ -3211,14 +4003,62 @@ EOF
 
 fi
 
+fi
+if test "$ac_cv_func_gethostbyname" = no; then
+       if test "X$bash_cv_have_gethostbyname" = "X"; then
+_bash_needmsg=yes
+else
+echo $ac_n "checking for gethostbyname in socket library""... $ac_c" 1>&6
+echo "configure:4013: checking for gethostbyname in socket library" >&5
+_bash_needmsg=
+fi
+if eval "test \"`echo '$''{'bash_cv_have_gethostbyname'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4020 "configure"
+#include "confdefs.h"
+#include <netdb.h>
+int main() {
+ struct hostent *hp;
+  hp = gethostbyname("localhost");
+
+; return 0; }
+EOF
+if { (eval echo configure:4029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  bash_cv_have_gethostbyname=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  bash_cv_have_gethostbyname=no
+fi
+rm -f conftest*
+
+fi
+
+if test "X$_bash_needmsg" = Xyes; then
+    echo $ac_n "checking for gethostbyname in socket library""... $ac_c" 1>&6
+echo "configure:4044: checking for gethostbyname in socket library" >&5
+fi
+echo "$ac_t""$bash_cv_have_gethostbyname" 1>&6
+if test "$bash_cv_have_gethostbyname" = yes; then
+cat >> confdefs.h <<\EOF
+#define HAVE_GETHOSTBYNAME 1
+EOF
+
+fi
+
+fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3217: checking for uid_t in sys/types.h" >&5
+echo "configure:4057: checking for uid_t in sys/types.h" >&5
 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3222 "configure"
+#line 4062 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -3247,7 +4087,7 @@ EOF
 fi
 
 echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:3251: checking type of array argument to getgroups" >&5
+echo "configure:4091: checking type of array argument to getgroups" >&5
 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3255,7 +4095,7 @@ else
   ac_cv_type_getgroups=cross
 else
   cat > conftest.$ac_ext <<EOF
-#line 3259 "configure"
+#line 4099 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Rendell for this test.  */
@@ -3280,7 +4120,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:3284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
     ac_cv_type_getgroups=gid_t
 else
@@ -3294,7 +4134,7 @@ fi
 
 if test $ac_cv_type_getgroups = cross; then
         cat > conftest.$ac_ext <<EOF
-#line 3298 "configure"
+#line 4138 "configure"
 #include "confdefs.h"
 #include <unistd.h>
 EOF
@@ -3318,12 +4158,12 @@ EOF
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3322: checking for ANSI C header files" >&5
+echo "configure:4162: 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 3327 "configure"
+#line 4167 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3331,8 +4171,8 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
+{ (eval echo configure:4175: \"$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_header_stdc=yes
@@ -3348,7 +4188,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 3352 "configure"
+#line 4192 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -3366,7 +4206,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 3370 "configure"
+#line 4210 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -3387,7 +4227,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 3391 "configure"
+#line 4231 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3398,7 +4238,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -3422,12 +4262,12 @@ EOF
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3426: checking for off_t" >&5
+echo "configure:4266: 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 3431 "configure"
+#line 4271 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3436,7 +4276,7 @@ else
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_off_t=yes
 else
@@ -3455,12 +4295,12 @@ EOF
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3459: checking for mode_t" >&5
+echo "configure:4299: checking for mode_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3464 "configure"
+#line 4304 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3469,7 +4309,7 @@ else
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_type_mode_t=yes
 else
 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
 if test $ac_cv_type_mode_t = no; then
   cat >> confdefs.h <<\EOF
-#define mode_t int
+#define mode_t int
+EOF
+
+fi
+
+echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
+echo "configure:4332: checking for uid_t in sys/types.h" >&5
+if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4337 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "uid_t" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_uid_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_type_uid_t" 1>&6
+if test $ac_cv_type_uid_t = no; then
+  cat >> confdefs.h <<\EOF
+#define uid_t int
+EOF
+
+  cat >> confdefs.h <<\EOF
+#define gid_t int
+EOF
+
+fi
+
+echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+echo "configure:4366: 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 4371 "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*
+
+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
+
+fi
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:4399: 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 4404 "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])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_size_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+  cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+
+fi
+
+echo $ac_n "checking for time_t""... $ac_c" 1>&6
+echo "configure:4432: checking for time_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4437 "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])time_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_time_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_time_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_time_t" 1>&6
+if test $ac_cv_type_time_t = no; then
+  cat >> confdefs.h <<\EOF
+#define time_t long
+EOF
+
+fi
+
+
+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+echo "configure:4466: 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 4471 "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
+void (*signal ()) ();
+#endif
+
+int main() {
+int i;
+; return 0; }
+EOF
+if { (eval echo configure:4488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_type_signal=void
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_type_signal=int
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_type_signal" 1>&6
+cat >> confdefs.h <<EOF
+#define RETSIGTYPE $ac_cv_type_signal
+EOF
+
+
+
+echo $ac_n "checking size of char""... $ac_c" 1>&6
+echo "configure:4508: checking size of char" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_sizeof_char=1
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4516 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(char));
+  exit(0);
+}
+EOF
+if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_char=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_char=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_char" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_CHAR $ac_cv_sizeof_char
+EOF
+
+
+echo $ac_n "checking size of short""... $ac_c" 1>&6
+echo "configure:4547: checking size of short" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_sizeof_short=2
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4555 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(short));
+  exit(0);
+}
+EOF
+if { (eval echo configure:4566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_short=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_short=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_short" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+EOF
+
+
+echo $ac_n "checking size of int""... $ac_c" 1>&6
+echo "configure:4586: checking size of int" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_sizeof_int=4
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4594 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(int));
+  exit(0);
+}
+EOF
+if { (eval echo configure:4605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_int=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_int=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_int" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+EOF
+
+
+echo $ac_n "checking size of long""... $ac_c" 1>&6
+echo "configure:4625: checking size of long" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_sizeof_long=4
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4633 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(long));
+  exit(0);
+}
+EOF
+if { (eval echo configure:4644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_long=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_long=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_long" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+EOF
+
+
+echo $ac_n "checking size of char *""... $ac_c" 1>&6
+echo "configure:4664: checking size of char *" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_char_p'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_sizeof_char_p=4
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4672 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(char *));
+  exit(0);
+}
+EOF
+if { (eval echo configure:4683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_char_p=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_char_p=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_char_p" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
+EOF
+
+
+echo $ac_n "checking size of double""... $ac_c" 1>&6
+echo "configure:4703: checking size of double" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_sizeof_double=8
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4711 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(double));
+  exit(0);
+}
+EOF
+if { (eval echo configure:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_double=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_double=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_double" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_DOUBLE $ac_cv_sizeof_double
+EOF
+
+
+
+echo $ac_n "checking for u_int""... $ac_c" 1>&6
+echo "configure:4743: checking for u_int" >&5
+if eval "test \"`echo '$''{'ac_cv_type_u_int'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4748 "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])u_int[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_u_int=yes
+else
+  rm -rf conftest*
+  ac_cv_type_u_int=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_u_int" 1>&6
+if test $ac_cv_type_u_int = no; then
+  cat >> confdefs.h <<\EOF
+#define u_int unsigned int
+EOF
+
+fi
+
+echo $ac_n "checking for u_long""... $ac_c" 1>&6
+echo "configure:4776: checking for u_long" >&5
+if eval "test \"`echo '$''{'ac_cv_type_u_long'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4781 "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])u_long[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_u_long=yes
+else
+  rm -rf conftest*
+  ac_cv_type_u_long=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_u_long" 1>&6
+if test $ac_cv_type_u_long = no; then
+  cat >> confdefs.h <<\EOF
+#define u_long unsigned long
+EOF
+
+fi
+
+
+
+if test "$ac_cv_sizeof_short" = 2; then
+  echo $ac_n "checking for bits16_t""... $ac_c" 1>&6
+echo "configure:4812: checking for bits16_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_bits16_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4817 "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])bits16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_bits16_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_bits16_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_bits16_t" 1>&6
+if test $ac_cv_type_bits16_t = no; then
+  cat >> confdefs.h <<\EOF
+#define bits16_t short
+EOF
+
+fi
+
+elif test "$ac_cv_sizeof_char" = 2; then
+  echo $ac_n "checking for bits16_t""... $ac_c" 1>&6
+echo "configure:4846: checking for bits16_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_bits16_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4851 "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])bits16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_bits16_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_bits16_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_bits16_t" 1>&6
+if test $ac_cv_type_bits16_t = no; then
+  cat >> confdefs.h <<\EOF
+#define bits16_t char
+EOF
+
+fi
+
+else
+  echo $ac_n "checking for bits16_t""... $ac_c" 1>&6
+echo "configure:4880: checking for bits16_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_bits16_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4885 "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])bits16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_bits16_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_bits16_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_bits16_t" 1>&6
+if test $ac_cv_type_bits16_t = no; then
+  cat >> confdefs.h <<\EOF
+#define bits16_t short
+EOF
+
+fi
+
+fi
+
+
+if test "$ac_cv_sizeof_short" = 2; then
+  echo $ac_n "checking for u_bits16_t""... $ac_c" 1>&6
+echo "configure:4917: checking for u_bits16_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_u_bits16_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4922 "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])u_bits16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_u_bits16_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_u_bits16_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_u_bits16_t" 1>&6
+if test $ac_cv_type_u_bits16_t = no; then
+  cat >> confdefs.h <<\EOF
+#define u_bits16_t unsigned short
+EOF
+
+fi
+
+elif test "$ac_cv_sizeof_char" = 2; then
+  echo $ac_n "checking for u_bits16_t""... $ac_c" 1>&6
+echo "configure:4951: checking for u_bits16_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_u_bits16_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4956 "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])u_bits16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_u_bits16_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_u_bits16_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_u_bits16_t" 1>&6
+if test $ac_cv_type_u_bits16_t = no; then
+  cat >> confdefs.h <<\EOF
+#define u_bits16_t unsigned char
+EOF
+
+fi
+
+else
+  echo $ac_n "checking for u_bits16_t""... $ac_c" 1>&6
+echo "configure:4985: checking for u_bits16_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_u_bits16_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4990 "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])u_bits16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_u_bits16_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_u_bits16_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_u_bits16_t" 1>&6
+if test $ac_cv_type_u_bits16_t = no; then
+  cat >> confdefs.h <<\EOF
+#define u_bits16_t unsigned short
+EOF
+
+fi
+
+fi
+
+
+if test "$ac_cv_sizeof_int" = 4; then
+  echo $ac_n "checking for bits32_t""... $ac_c" 1>&6
+echo "configure:5022: checking for bits32_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_bits32_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5027 "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])bits32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_bits32_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_bits32_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_bits32_t" 1>&6
+if test $ac_cv_type_bits32_t = no; then
+  cat >> confdefs.h <<\EOF
+#define bits32_t int
+EOF
+
+fi
+
+elif test "$ac_cv_sizeof_long" = 4; then
+  echo $ac_n "checking for bits32_t""... $ac_c" 1>&6
+echo "configure:5056: checking for bits32_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_bits32_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5061 "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])bits32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_bits32_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_bits32_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_bits32_t" 1>&6
+if test $ac_cv_type_bits32_t = no; then
+  cat >> confdefs.h <<\EOF
+#define bits32_t long
+EOF
+
+fi
+
+else
+  echo $ac_n "checking for bits32_t""... $ac_c" 1>&6
+echo "configure:5090: checking for bits32_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_bits32_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5095 "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])bits32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_bits32_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_bits32_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_bits32_t" 1>&6
+if test $ac_cv_type_bits32_t = no; then
+  cat >> confdefs.h <<\EOF
+#define bits32_t int
+EOF
+
+fi
+
+fi
+
+
+if test "$ac_cv_sizeof_int" = 4; then
+  echo $ac_n "checking for u_bits32_t""... $ac_c" 1>&6
+echo "configure:5127: checking for u_bits32_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_u_bits32_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5132 "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])u_bits32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_u_bits32_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_u_bits32_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_u_bits32_t" 1>&6
+if test $ac_cv_type_u_bits32_t = no; then
+  cat >> confdefs.h <<\EOF
+#define u_bits32_t unsigned int
+EOF
+
+fi
+
+elif test "$ac_cv_sizeof_long" = 4; then
+  echo $ac_n "checking for u_bits32_t""... $ac_c" 1>&6
+echo "configure:5161: checking for u_bits32_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_u_bits32_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5166 "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])u_bits32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_u_bits32_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_u_bits32_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_u_bits32_t" 1>&6
+if test $ac_cv_type_u_bits32_t = no; then
+  cat >> confdefs.h <<\EOF
+#define u_bits32_t unsigned long
+EOF
+
+fi
+
+else
+  echo $ac_n "checking for u_bits32_t""... $ac_c" 1>&6
+echo "configure:5195: checking for u_bits32_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_u_bits32_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5200 "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])u_bits32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_u_bits32_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_u_bits32_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_u_bits32_t" 1>&6
+if test $ac_cv_type_u_bits32_t = no; then
+  cat >> confdefs.h <<\EOF
+#define u_bits32_t unsigned int
+EOF
+
+fi
+
+fi
+
+
+if test "$ac_sv_sizeof_char_p" = 8; then
+  echo $ac_n "checking for bits64_t""... $ac_c" 1>&6
+echo "configure:5232: checking for bits64_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_bits64_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5237 "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])bits64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_bits64_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_bits64_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_bits64_t" 1>&6
+if test $ac_cv_type_bits64_t = no; then
+  cat >> confdefs.h <<\EOF
+#define bits64_t char *
+EOF
+
+fi
+
+elif test "$ac_cv_sizeof_double" = 8; then
+  echo $ac_n "checking for bits64_t""... $ac_c" 1>&6
+echo "configure:5266: checking for bits64_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_bits64_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5271 "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])bits64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_bits64_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_bits64_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_bits64_t" 1>&6
+if test $ac_cv_type_bits64_t = no; then
+  cat >> confdefs.h <<\EOF
+#define bits64_t double
 EOF
 
 fi
 
-echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3492: checking for uid_t in sys/types.h" >&5
-if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
+elif test "$ac_cv_sizeof_long" = 8; then
+  echo $ac_n "checking for bits64_t""... $ac_c" 1>&6
+echo "configure:5300: checking for bits64_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_bits64_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3497 "configure"
+#line 5305 "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 "uid_t" >/dev/null 2>&1; then
+  egrep "(^|[^a-zA-Z_0-9])bits64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
-  ac_cv_type_uid_t=yes
+  ac_cv_type_bits64_t=yes
 else
   rm -rf conftest*
-  ac_cv_type_uid_t=no
+  ac_cv_type_bits64_t=no
 fi
 rm -f conftest*
 
 fi
-
-echo "$ac_t""$ac_cv_type_uid_t" 1>&6
-if test $ac_cv_type_uid_t = no; then
-  cat >> confdefs.h <<\EOF
-#define uid_t int
-EOF
-
+echo "$ac_t""$ac_cv_type_bits64_t" 1>&6
+if test $ac_cv_type_bits64_t = no; then
   cat >> confdefs.h <<\EOF
-#define gid_t int
+#define bits64_t long
 EOF
 
 fi
 
-echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3526: checking for pid_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
+else
+  echo $ac_n "checking for bits64_t""... $ac_c" 1>&6
+echo "configure:5334: checking for bits64_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_bits64_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3531 "configure"
+#line 5339 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3536,31 +5344,36 @@ else
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  egrep "(^|[^a-zA-Z_0-9])bits64_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
-  ac_cv_type_pid_t=yes
+  ac_cv_type_bits64_t=yes
 else
   rm -rf conftest*
-  ac_cv_type_pid_t=no
+  ac_cv_type_bits64_t=no
 fi
 rm -f conftest*
 
 fi
-echo "$ac_t""$ac_cv_type_pid_t" 1>&6
-if test $ac_cv_type_pid_t = no; then
+echo "$ac_t""$ac_cv_type_bits64_t" 1>&6
+if test $ac_cv_type_bits64_t = no; then
   cat >> confdefs.h <<\EOF
-#define pid_t int
+#define bits64_t double
 EOF
 
 fi
 
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3559: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
+fi
+
+
+
+if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
+  echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
+echo "configure:5372: checking for ptrdiff_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_ptrdiff_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3564 "configure"
+#line 5377 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3569,31 +5382,32 @@ else
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  egrep "(^|[^a-zA-Z_0-9])ptrdiff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
-  ac_cv_type_size_t=yes
+  ac_cv_type_ptrdiff_t=yes
 else
   rm -rf conftest*
-  ac_cv_type_size_t=no
+  ac_cv_type_ptrdiff_t=no
 fi
 rm -f conftest*
 
 fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
+echo "$ac_t""$ac_cv_type_ptrdiff_t" 1>&6
+if test $ac_cv_type_ptrdiff_t = no; then
   cat >> confdefs.h <<\EOF
-#define size_t unsigned
+#define ptrdiff_t int
 EOF
 
 fi
 
-echo $ac_n "checking for time_t""... $ac_c" 1>&6
-echo "configure:3592: checking for time_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then
+elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
+  echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
+echo "configure:5406: checking for ptrdiff_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_ptrdiff_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3597 "configure"
+#line 5411 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3602,74 +5416,68 @@ else
 #endif
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "time_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  egrep "(^|[^a-zA-Z_0-9])ptrdiff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
-  ac_cv_type_time_t=yes
+  ac_cv_type_ptrdiff_t=yes
 else
   rm -rf conftest*
-  ac_cv_type_time_t=no
+  ac_cv_type_ptrdiff_t=no
 fi
 rm -f conftest*
 
 fi
-echo "$ac_t""$ac_cv_type_time_t" 1>&6
-if test $ac_cv_type_time_t = no; then
+echo "$ac_t""$ac_cv_type_ptrdiff_t" 1>&6
+if test $ac_cv_type_ptrdiff_t = no; then
   cat >> confdefs.h <<\EOF
-#define time_t long
+#define ptrdiff_t long
 EOF
 
 fi
 
-
-echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3626: checking return type of signal handlers" >&5
-if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
+else
+  echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
+echo "configure:5440: checking for ptrdiff_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_ptrdiff_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3631 "configure"
+#line 5445 "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
-void (*signal ()) ();
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
 #endif
-
-int main() {
-int i;
-; return 0; }
 EOF
-if { (eval echo configure:3648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])ptrdiff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
   rm -rf conftest*
-  ac_cv_type_signal=void
+  ac_cv_type_ptrdiff_t=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
   rm -rf conftest*
-  ac_cv_type_signal=int
+  ac_cv_type_ptrdiff_t=no
 fi
 rm -f conftest*
-fi
 
-echo "$ac_t""$ac_cv_type_signal" 1>&6
-cat >> confdefs.h <<EOF
-#define RETSIGTYPE $ac_cv_type_signal
+fi
+echo "$ac_t""$ac_cv_type_ptrdiff_t" 1>&6
+if test $ac_cv_type_ptrdiff_t = no; then
+  cat >> confdefs.h <<\EOF
+#define ptrdiff_t int
 EOF
 
+fi
+
+fi
 
 
 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:3668: checking whether stat file-mode macros are broken" >&5
+echo "configure:5476: 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 3673 "configure"
+#line 5481 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -3719,51 +5527,16 @@ EOF
 
 fi
 
-cat > conftest.$ac_ext <<EOF
-#line 3724 "configure"
-#include "confdefs.h"
-#include <sys/time.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "struct timeval" >/dev/null 2>&1; then
-  rm -rf conftest*
-  bash_cv_struct_timeval=yes
-fi
-rm -f conftest*
-
-if test -z "$bash_cv_struct_timeval"; then
-cat > conftest.$ac_ext <<EOF
-#line 3737 "configure"
-#include "confdefs.h"
-#include <time.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "struct timeval" >/dev/null 2>&1; then
-  rm -rf conftest*
-  bash_cv_struct_timeval=yes
-else
-  rm -rf conftest*
-  bash_cv_struct_timeval=no
-fi
-rm -f conftest*
-
-fi
-if test $bash_cv_struct_timeval = yes; then
-cat >> confdefs.h <<\EOF
-#define HAVE_TIMEVAL 1
-EOF
-
-fi
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3760: checking whether byte ordering is bigendian" >&5
+echo "configure:5533: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 3767 "configure"
+#line 5540 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3774,11 +5547,11 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 3782 "configure"
+#line 5555 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3789,7 +5562,7 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3809,7 +5582,7 @@ if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3813 "configure"
+#line 5586 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3822,7 +5595,7 @@ main () {
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -3849,7 +5622,7 @@ fi
 # Pull the hash mark out of the macro call to avoid m4 problems.
 ac_msg="whether #! works in shell scripts"
 echo $ac_n "checking $ac_msg""... $ac_c" 1>&6
-echo "configure:3853: checking $ac_msg" >&5
+echo "configure:5626: checking $ac_msg" >&5
 if eval "test \"`echo '$''{'ac_cv_sys_interpreter'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3867,6 +5640,7 @@ rm -f conftest
 fi
 
 echo "$ac_t""$ac_cv_sys_interpreter" 1>&6
+interpval="$ac_cv_sys_interpreter"
 
 if test $ac_cv_sys_interpreter = yes; then
 cat >> confdefs.h <<\EOF
@@ -3875,7 +5649,7 @@ EOF
 
 fi
 echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6
-echo "configure:3879: checking for restartable system calls" >&5
+echo "configure:5653: checking for restartable system calls" >&5
 if eval "test \"`echo '$''{'ac_cv_sys_restartable_syscalls'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3883,7 +5657,7 @@ else
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 3887 "configure"
+#line 5661 "configure"
 #include "confdefs.h"
 /* Exit 0 (true) if wait returns something other than -1,
    i.e. the pid of the child, which means that wait was restarted
@@ -3901,7 +5675,7 @@ main () {
 }
 
 EOF
-if { (eval echo configure:3905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sys_restartable_syscalls=yes
 else
@@ -3926,22 +5700,22 @@ fi
 
 if test "$ac_cv_func_lstat" = "no"; then
 echo $ac_n "checking for lstat""... $ac_c" 1>&6
-echo "configure:3930: checking for lstat" >&5
+echo "configure:5704: checking for lstat" >&5
 if eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3935 "configure"
+#line 5709 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
 #include <sys/stat.h>
 
 int main() {
- lstat("",(struct stat *)0); 
+ lstat(".",(struct stat *)0); 
 ; return 0; }
 EOF
-if { (eval echo configure:3945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   bash_cv_func_lstat=yes
 else
@@ -3964,15 +5738,16 @@ fi
 fi
 
 echo $ac_n "checking if dup2 fails to clear the close-on-exec flag""... $ac_c" 1>&6
-echo "configure:3968: checking if dup2 fails to clear the close-on-exec flag" >&5
+echo "configure:5742: checking if dup2 fails to clear the close-on-exec flag" >&5
 if eval "test \"`echo '$''{'bash_cv_dup2_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot check dup2 if cross compiling" 1>&2; exit 1; }
+  echo "configure: warning: cannot check dup2 if cross compiling -- defaulting to no" 1>&2
+     bash_cv_dup2_broken=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 3976 "configure"
+#line 5751 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -3992,7 +5767,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:3996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   bash_cv_dup2_broken=yes
 else
@@ -4017,15 +5792,16 @@ fi
 
 
 echo $ac_n "checking whether pgrps need synchronization""... $ac_c" 1>&6
-echo "configure:4021: checking whether pgrps need synchronization" >&5
+echo "configure:5796: checking whether pgrps need synchronization" >&5
 if eval "test \"`echo '$''{'bash_cv_pgrp_pipe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot check pgrp synchronization if cross compiling" 1>&2; exit 1; }
+  echo "configure: warning: cannot check pgrp synchronization if cross compiling -- defaulting to no" 1>&2
+    bash_cv_pgrp_pipe=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 4029 "configure"
+#line 5805 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_UNISTD_H
@@ -4068,23 +5844,195 @@ main()
        }
        setpgid(pid2, pid1);
 
-       close(fds[1]);
-       if (read(fds[0], &ok, 1) != 1)
-         exit(4);
-       wait(&status);
-       wait(&status);
-       exit(ok ? 0 : 5);
+       close(fds[1]);
+       if (read(fds[0], &ok, 1) != 1)
+         exit(4);
+       wait(&status);
+       wait(&status);
+       exit(ok ? 0 : 5);
+}
+
+EOF
+if { (eval echo configure:5857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  bash_cv_pgrp_pipe=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  bash_cv_pgrp_pipe=yes
+fi
+rm -fr conftest*
+fi
+
+
+fi
+
+echo "$ac_t""$bash_cv_pgrp_pipe" 1>&6
+if test $bash_cv_pgrp_pipe = yes; then
+cat >> confdefs.h <<\EOF
+#define PGRP_PIPE 1
+EOF
+
+fi
+
+
+echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
+echo "configure:5882: checking for type of signal functions" >&5
+if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+  cat > conftest.$ac_ext <<EOF
+#line 5888 "configure"
+#include "confdefs.h"
+#include <signal.h>
+int main() {
+
+    sigset_t ss;
+    struct sigaction sa;
+    sigemptyset(&ss); sigsuspend(&ss);
+    sigaction(SIGINT, &sa, (struct sigaction *) 0);
+    sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
+  
+; return 0; }
+EOF
+if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  bash_cv_signal_vintage=posix
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  
+    cat > conftest.$ac_ext <<EOF
+#line 5910 "configure"
+#include "confdefs.h"
+#include <signal.h>
+int main() {
+
+       int mask = sigmask(SIGINT);
+       sigsetmask(mask); sigblock(mask); sigpause(mask);
+    
+; return 0; }
+EOF
+if { (eval echo configure:5920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  bash_cv_signal_vintage=4.2bsd
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  
+      cat > conftest.$ac_ext <<EOF
+#line 5929 "configure"
+#include "confdefs.h"
+
+       #include <signal.h>
+       RETSIGTYPE foo() { }
+int main() {
+
+               int mask = sigmask(SIGINT);
+               sigset(SIGINT, foo); sigrelse(SIGINT);
+               sighold(SIGINT); sigpause(SIGINT);
+        
+; return 0; }
+EOF
+if { (eval echo configure:5942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  bash_cv_signal_vintage=svr3
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  bash_cv_signal_vintage=v7
+    
+fi
+rm -f conftest*
+  
+fi
+rm -f conftest*
+
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$bash_cv_signal_vintage" 1>&6
+if test "$bash_cv_signal_vintage" = posix; then
+cat >> confdefs.h <<\EOF
+#define HAVE_POSIX_SIGNALS 1
+EOF
+
+elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
+cat >> confdefs.h <<\EOF
+#define HAVE_BSD_SIGNALS 1
+EOF
+
+elif test "$bash_cv_signal_vintage" = svr3; then
+cat >> confdefs.h <<\EOF
+#define HAVE_USG_SIGHOLD 1
+EOF
+
+fi
+
+
+if test "$ac_cv_sys_restartable_syscalls" = "no"; then
+
+echo $ac_n "checking whether posix sigaction restarts system calls by default""... $ac_c" 1>&6
+echo "configure:5984: checking whether posix sigaction restarts system calls by default" >&5
+if eval "test \"`echo '$''{'bash_cv_sys_restartable_syscalls'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  echo "configure: warning: cannot check restartable syscalls if cross compiling" 1>&2
+else
+  cat > conftest.$ac_ext <<EOF
+#line 5992 "configure"
+#include "confdefs.h"
+/* Exit 0 (true) if wait returns something other than -1,
+   i.e. the pid of the child, which means that wait was restarted
+   after getting the signal.  */
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <signal.h>
+static int caught = 0;
+void ucatch (isig) int isig; { caught = 1; }
+main ()
+{
+#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
+  exit (1);
+#else
+  struct sigaction act, oact;
+  int i, status;
+
+  act.sa_handler = ucatch;
+  /* Might want to add SA_RESTART here, but bash's set_signal_handler
+     does not. */
+  act.sa_flags = 0;
+  sigemptyset(&act.sa_mask);
+  sigemptyset(&oact.sa_mask);
+  i = fork ();
+  /* A possible race condition here, but in practice it never happens. */
+  if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
+  sigaction(SIGINT, &act, &oact);
+  status = wait(&i);
+  if (status == -1) wait(&i);
+  exit (status == -1);
+#endif
 }
 
 EOF
-if { (eval echo configure:4081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  bash_cv_pgrp_pipe=no
+  bash_cv_sys_restartable_syscalls=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
-  bash_cv_pgrp_pipe=yes
+  bash_cv_sys_restartable_syscalls=no
 fi
 rm -fr conftest*
 fi
@@ -4092,21 +6040,23 @@ fi
 
 fi
 
-echo "$ac_t""$bash_cv_pgrp_pipe" 1>&6
-if test $bash_cv_pgrp_pipe = yes; then
-cat >> confdefs.h <<\EOF
-#define PGRP_PIPE 1
+echo "$ac_t""$bash_cv_sys_restartable_syscalls" 1>&6
+if test $bash_cv_sys_restartable_syscalls = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_RESTARTABLE_SYSCALLS 1
 EOF
 
 fi
 
+fi
+
 echo $ac_n "checking for sys_errlist and sys_nerr""... $ac_c" 1>&6
-echo "configure:4105: checking for sys_errlist and sys_nerr" >&5
+echo "configure:6055: checking for sys_errlist and sys_nerr" >&5
 if eval "test \"`echo '$''{'bash_cv_sys_errlist'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4110 "configure"
+#line 6060 "configure"
 #include "confdefs.h"
 #include <errno.h>
 int main() {
@@ -4115,7 +6065,7 @@ extern char *sys_errlist[];
  char *msg = sys_errlist[sys_nerr - 1];
 ; return 0; }
 EOF
-if { (eval echo configure:4119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   bash_cv_sys_errlist=yes
 else
@@ -4136,15 +6086,16 @@ fi
 
 
 echo $ac_n "checking for sys_siglist in system C library""... $ac_c" 1>&6
-echo "configure:4140: checking for sys_siglist in system C library" >&5
+echo "configure:6090: checking for sys_siglist in system C library" >&5
 if eval "test \"`echo '$''{'bash_cv_sys_siglist'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot check for sys_siglist if cross compiling" 1>&2; exit 1; }
+  echo "configure: warning: cannot check for sys_siglist if cross compiling -- defaulting to no" 1>&2
+        bash_cv_sys_siglist=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 4148 "configure"
+#line 6099 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -4161,7 +6112,7 @@ char *msg = sys_siglist[2];
 exit(msg == 0);
 }
 EOF
-if { (eval echo configure:4165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   bash_cv_sys_siglist=yes
 else
@@ -4174,6 +6125,7 @@ rm -fr conftest*
 fi
 
 fi
+
 echo "$ac_t""$bash_cv_sys_siglist" 1>&6
 if test $bash_cv_sys_siglist = yes; then
 cat >> confdefs.h <<\EOF
@@ -4182,16 +6134,13 @@ EOF
 
 fi
 
-echo $ac_n "checking for _sys_siglist in system C library""... $ac_c" 1>&6
-echo "configure:4187: checking for _sys_siglist in system C library" >&5
-if eval "test \"`echo '$''{'bash_cv_under_sys_siglist'+set}'`\" = set"; then
+echo $ac_n "checking for _sys_siglist in signal.h or unistd.h""... $ac_c" 1>&6
+echo "configure:6139: checking for _sys_siglist in signal.h or unistd.h" >&5
+if eval "test \"`echo '$''{'bash_cv_decl_under_sys_siglist'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot check for _sys_siglist if cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 4195 "configure"
+#line 6144 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -4199,143 +6148,87 @@ else
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifndef _sys_siglist
-extern char *_sys_siglist[];
-#endif
-main()
-{
-char *msg = _sys_siglist[2];
-exit(msg == 0);
-}
+int main() {
+ char *msg = _sys_siglist[2]; 
+; return 0; }
 EOF
-if { (eval echo configure:4212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  bash_cv_under_sys_siglist=yes
+if { (eval echo configure:6156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bash_cv_decl_under_sys_siglist=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  bash_cv_under_sys_siglist=no
-fi
-rm -fr conftest*
+  rm -rf conftest*
+  bash_cv_decl_under_sys_siglist=no
 fi
-
+rm -f conftest*
 fi
-echo "$ac_t""$bash_cv_under_sys_siglist" 1>&6
-if test $bash_cv_under_sys_siglist = yes; then
+echo "$ac_t""$bash_cv_decl_under_sys_siglist" 1>&6
+if test $bash_cv_decl_under_sys_siglist = yes; then
 cat >> confdefs.h <<\EOF
-#define HAVE_UNDER_SYS_SIGLIST 1
+#define UNDER_SYS_SIGLIST_DECLARED 1
 EOF
 
 fi
 
 
-echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6
-echo "configure:4235: checking for type of signal functions" >&5
-if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then
+echo $ac_n "checking for _sys_siglist in system C library""... $ac_c" 1>&6
+echo "configure:6177: checking for _sys_siglist in system C library" >&5
+if eval "test \"`echo '$''{'bash_cv_under_sys_siglist'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  
+  if test "$cross_compiling" = yes; then
+  echo "configure: warning: cannot check for _sys_siglist if cross compiling -- defaulting to no" 1>&2
+        bash_cv_under_sys_siglist=no
+else
   cat > conftest.$ac_ext <<EOF
-#line 4241 "configure"
+#line 6186 "configure"
 #include "confdefs.h"
-#include <signal.h>
-int main() {
 
-    sigset_t ss;
-    struct sigaction sa;
-    sigemptyset(&ss); sigsuspend(&ss);
-    sigaction(SIGINT, &sa, (struct sigaction *) 0);
-    sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
-  
-; return 0; }
-EOF
-if { (eval echo configure:4254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  bash_cv_signal_vintage=posix
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  
-    cat > conftest.$ac_ext <<EOF
-#line 4263 "configure"
-#include "confdefs.h"
+#include <sys/types.h>
 #include <signal.h>
-int main() {
-
-       int mask = sigmask(SIGINT);
-       sigsetmask(mask); sigblock(mask); sigpause(mask);
-    
-; return 0; }
-EOF
-if { (eval echo configure:4273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  bash_cv_signal_vintage=4.2bsd
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  
-      cat > conftest.$ac_ext <<EOF
-#line 4282 "configure"
-#include "confdefs.h"
-
-       #include <signal.h>
-       RETSIGTYPE foo() { }
-int main() {
-
-               int mask = sigmask(SIGINT);
-               sigset(SIGINT, foo); sigrelse(SIGINT);
-               sighold(SIGINT); sigpause(SIGINT);
-        
-; return 0; }
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifndef UNDER_SYS_SIGLIST_DECLARED
+extern char *_sys_siglist[];
+#endif
+main()
+{
+char *msg = (char *)_sys_siglist[2];
+exit(msg == 0);
+}
 EOF
-if { (eval echo configure:4295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  bash_cv_signal_vintage=svr3
+if { (eval echo configure:6203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  bash_cv_under_sys_siglist=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  bash_cv_signal_vintage=v7
-    
-fi
-rm -f conftest*
-  
+  rm -fr conftest*
+  bash_cv_under_sys_siglist=no
 fi
-rm -f conftest*
-
+rm -fr conftest*
 fi
-rm -f conftest*
 
 fi
 
-echo "$ac_t""$bash_cv_signal_vintage" 1>&6
-if test "$bash_cv_signal_vintage" = posix; then
-cat >> confdefs.h <<\EOF
-#define HAVE_POSIX_SIGNALS 1
-EOF
-
-elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
-cat >> confdefs.h <<\EOF
-#define HAVE_BSD_SIGNALS 1
-EOF
-
-elif test "$bash_cv_signal_vintage" = svr3; then
+echo "$ac_t""$bash_cv_under_sys_siglist" 1>&6
+if test $bash_cv_under_sys_siglist = yes; then
 cat >> confdefs.h <<\EOF
-#define HAVE_USG_SIGHOLD 1
+#define HAVE_UNDER_SYS_SIGLIST 1
 EOF
 
 fi
 
+
 echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6
-echo "configure:4334: checking whether signal handlers are of type void" >&5
+echo "configure:6227: checking whether signal handlers are of type void" >&5
 if eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4339 "configure"
+#line 6232 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -4350,7 +6243,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:4354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bash_cv_void_sighandler=yes
 else
@@ -4370,12 +6263,12 @@ EOF
 fi
 
 echo $ac_n "checking for clock_t""... $ac_c" 1>&6
-echo "configure:4374: checking for clock_t" >&5
+echo "configure:6267: checking for clock_t" >&5
 if eval "test \"`echo '$''{'bash_cv_type_clock_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4379 "configure"
+#line 6272 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -4406,12 +6299,12 @@ EOF
 fi
 
 echo $ac_n "checking for sigset_t""... $ac_c" 1>&6
-echo "configure:4410: checking for sigset_t" >&5
+echo "configure:6303: checking for sigset_t" >&5
 if eval "test \"`echo '$''{'bash_cv_type_sigset_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4415 "configure"
+#line 6308 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -4442,12 +6335,12 @@ EOF
 fi
 
 echo $ac_n "checking for quad_t""... $ac_c" 1>&6
-echo "configure:4446: checking for quad_t" >&5
+echo "configure:6339: checking for quad_t" >&5
 if eval "test \"`echo '$''{'bash_cv_type_quad_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4451 "configure"
+#line 6344 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -4483,19 +6376,20 @@ EOF
 fi
 
 echo $ac_n "checking for size and type of struct rlimit fields""... $ac_c" 1>&6
-echo "configure:4487: checking for size and type of struct rlimit fields" >&5
+echo "configure:6380: checking for size and type of struct rlimit fields" >&5
 if eval "test \"`echo '$''{'bash_cv_type_rlimit'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4492 "configure"
+#line 6385 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
+#include <sys/resource.h>
 int main() {
 rlim_t xxx;
 ; return 0; }
 EOF
-if { (eval echo configure:4499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bash_cv_type_rlimit=rlim_t
 else
@@ -4504,10 +6398,11 @@ else
   rm -rf conftest*
   
 if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot check quad_t if cross compiling" 1>&2; exit 1; }
+  echo "configure: warning: cannot check quad_t if cross compiling -- defaulting to long" 1>&2
+         bash_cv_type_rlimit=long
 else
   cat > conftest.$ac_ext <<EOF
-#line 4511 "configure"
+#line 6406 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -4523,7 +6418,7 @@ main()
   exit(1);
 }
 EOF
-if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   bash_cv_type_rlimit=quad_t
 else
@@ -4553,13 +6448,14 @@ EOF
 
 fi
 
+
 echo $ac_n "checking for a c_line member of struct termios""... $ac_c" 1>&6
-echo "configure:4558: checking for a c_line member of struct termios" >&5
+echo "configure:6454: checking for a c_line member of struct termios" >&5
 if eval "test \"`echo '$''{'bash_cv_termios_ldisc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4563 "configure"
+#line 6459 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <termios.h>
@@ -4567,7 +6463,7 @@ int main() {
 struct termios t; int i; i = t.c_line;
 ; return 0; }
 EOF
-if { (eval echo configure:4571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bash_cv_termios_ldisc=yes
 else
@@ -4587,12 +6483,12 @@ EOF
 fi
 
 echo $ac_n "checking for a c_line member of struct termio""... $ac_c" 1>&6
-echo "configure:4591: checking for a c_line member of struct termio" >&5
+echo "configure:6487: checking for a c_line member of struct termio" >&5
 if eval "test \"`echo '$''{'bash_cv_termio_ldisc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4596 "configure"
+#line 6492 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <termio.h>
@@ -4600,7 +6496,7 @@ int main() {
 struct termio t; int i; i = t.c_line;
 ; return 0; }
 EOF
-if { (eval echo configure:4604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bash_cv_termio_ldisc=yes
 else
@@ -4621,12 +6517,12 @@ fi
 
 
 echo $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6
-echo "configure:4625: checking if struct dirent has a d_ino member" >&5
+echo "configure:6521: checking if struct dirent has a d_ino member" >&5
 if eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4630 "configure"
+#line 6526 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4655,33 +6551,197 @@ struct dirent d; int z; z = d.d_ino;
 
 ; return 0; }
 EOF
-if { (eval echo configure:4659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bash_cv_dirent_has_dino=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  bash_cv_dirent_has_dino=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$bash_cv_dirent_has_dino" 1>&6
+if test $bash_cv_dirent_has_dino = yes; then
+cat >> confdefs.h <<\EOF
+#define STRUCT_DIRENT_HAS_D_INO 1
+EOF
+
+fi
+
+
+echo $ac_n "checking if struct dirent has a d_fileno member""... $ac_c" 1>&6
+echo "configure:6577: checking if struct dirent has a d_fileno member" >&5
+if eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6582 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+#  include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+#  include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+#  include <ndir.h>
+# endif
+#endif /* HAVE_DIRENT_H */
+
+int main() {
+
+struct dirent d; int z; z = d.d_fileno;
+
+; return 0; }
+EOF
+if { (eval echo configure:6611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bash_cv_dirent_has_d_fileno=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  bash_cv_dirent_has_d_fileno=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$bash_cv_dirent_has_d_fileno" 1>&6
+if test $bash_cv_dirent_has_d_fileno = yes; then
+cat >> confdefs.h <<\EOF
+#define STRUCT_DIRENT_HAS_D_FILENO 1
+EOF
+
+fi
+
+echo $ac_n "checking for struct winsize in sys/ioctl.h and termios.h""... $ac_c" 1>&6
+echo "configure:6632: checking for struct winsize in sys/ioctl.h and termios.h" >&5
+if eval "test \"`echo '$''{'bash_cv_struct_winsize_header'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6637 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/ioctl.h>
+int main() {
+struct winsize x;
+; return 0; }
+EOF
+if { (eval echo configure:6645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bash_cv_struct_winsize_header=ioctl_h
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  cat > conftest.$ac_ext <<EOF
+#line 6653 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <termios.h>
+int main() {
+struct winsize x;
+; return 0; }
+EOF
+if { (eval echo configure:6661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  bash_cv_struct_winsize_header=termios_h
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  bash_cv_struct_winsize_header=other
+fi
+rm -f conftest*
+
+fi
+rm -f conftest*
+fi
+
+if test $bash_cv_struct_winsize_header = ioctl_h; then
+  echo "$ac_t""sys/ioctl.h" 1>&6
+  cat >> confdefs.h <<\EOF
+#define STRUCT_WINSIZE_IN_SYS_IOCTL 1
+EOF
+
+elif test $bash_cv_struct_winsize_header = termios_h; then
+  echo "$ac_t""termios.h" 1>&6
+  cat >> confdefs.h <<\EOF
+#define STRUCT_WINSIZE_IN_TERMIOS 1
+EOF
+
+else
+  echo "$ac_t""not found" 1>&6
+fi
+
+echo $ac_n "checking for struct timeval in sys/time.h and time.h""... $ac_c" 1>&6
+echo "configure:6693: checking for struct timeval in sys/time.h and time.h" >&5
+if eval "test \"`echo '$''{'bash_cv_struct_timeval'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+cat > conftest.$ac_ext <<EOF
+#line 6699 "configure"
+#include "confdefs.h"
+#include <sys/time.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "struct timeval" >/dev/null 2>&1; then
   rm -rf conftest*
-  bash_cv_dirent_has_dino=yes
+  bash_cv_struct_timeval=yes
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bash_cv_dirent_has_dino=no
+  cat > conftest.$ac_ext <<EOF
+#line 6710 "configure"
+#include "confdefs.h"
+#include <time.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "struct timeval" >/dev/null 2>&1; then
+  rm -rf conftest*
+  bash_cv_struct_timeval=yes
+else
+  rm -rf conftest*
+  bash_cv_struct_timeval=no
 fi
 rm -f conftest*
+
 fi
+rm -f conftest*
 
-echo "$ac_t""$bash_cv_dirent_has_dino" 1>&6
-if test $bash_cv_dirent_has_dino = yes; then
-cat >> confdefs.h <<\EOF
-#define STRUCT_DIRENT_HAS_D_INO 1
+
+fi
+
+echo "$ac_t""$bash_cv_struct_timeval" 1>&6
+if test $bash_cv_struct_timeval = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_TIMEVAL 1
 EOF
 
 fi
 
-echo $ac_n "checking for the existance of strsignal""... $ac_c" 1>&6
-echo "configure:4680: checking for the existance of strsignal" >&5
+
+echo $ac_n "checking for the existence of strsignal""... $ac_c" 1>&6
+echo "configure:6740: checking for the existence of strsignal" >&5
 if eval "test \"`echo '$''{'bash_cv_have_strsignal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4685 "configure"
+#line 6745 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -4689,7 +6749,7 @@ int main() {
 char *s = (char *)strsignal(2);
 ; return 0; }
 EOF
-if { (eval echo configure:4693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   bash_cv_have_strsignal=yes
 else
@@ -4710,15 +6770,17 @@ EOF
 fi
 
 echo $ac_n "checking if opendir() opens non-directories""... $ac_c" 1>&6
-echo "configure:4714: checking if opendir() opens non-directories" >&5
+echo "configure:6774: checking if opendir() opens non-directories" >&5
 if eval "test \"`echo '$''{'bash_cv_opendir_not_robust'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot check opendir if cross compiling" 1>&2; exit 1; }
+  echo "configure: warning: cannot check opendir if cross compiling -- defaulting to no" 1>&2
+     bash_cv_opendir_not_robust=no
+
 else
   cat > conftest.$ac_ext <<EOF
-#line 4722 "configure"
+#line 6784 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4744,17 +6806,23 @@ else
 main()
 {
 DIR *dir;
-int fd;
-unlink("/tmp/not_a_directory");
-fd = open("/tmp/not_a_directory", O_WRONLY|O_CREAT, 0666);
+int fd, err;
+err = mkdir("/tmp/bash-aclocal", 0700);
+if (err < 0) {
+  perror("mkdir");
+  exit(1);
+}
+unlink("/tmp/bash-aclocal/not_a_directory");
+fd = open("/tmp/bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
 write(fd, "\n", 1);
 close(fd);
-dir = opendir("/tmp/not_a_directory");
-unlink("/tmp/not_a_directory");
+dir = opendir("/tmp/bash-aclocal/not_a_directory");
+unlink("/tmp/bash-aclocal/not_a_directory");
+rmdir("/tmp/bash-aclocal");
 exit (dir == 0);
 }
 EOF
-if { (eval echo configure:4758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   bash_cv_opendir_not_robust=yes
 else
@@ -4777,15 +6845,17 @@ EOF
 fi
 
 echo $ac_n "checking for declaration of printf in <stdio.h>""... $ac_c" 1>&6
-echo "configure:4781: checking for declaration of printf in <stdio.h>" >&5
+echo "configure:6849: checking for declaration of printf in <stdio.h>" >&5
 if eval "test \"`echo '$''{'bash_cv_printf_declared'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot check printf declaration if cross compiling" 1>&2; exit 1; }
+  echo "configure: warning: cannot check printf declaration if cross compiling -- defaulting to yes" 1>&2
+    bash_cv_printf_declared=yes
+
 else
   cat > conftest.$ac_ext <<EOF
-#line 4789 "configure"
+#line 6859 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4797,12 +6867,12 @@ typedef int (*_bashfunc)();
 main()
 {
 _bashfunc pf;
-pf = printf;
+pf = (_bashfunc) printf;
 exit(pf == 0);
 }
 
 EOF
-if { (eval echo configure:4806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   bash_cv_printf_declared=yes
 else
@@ -4825,15 +6895,17 @@ EOF
 fi
 
 echo $ac_n "checking whether ulimit can substitute for getdtablesize""... $ac_c" 1>&6
-echo "configure:4829: checking whether ulimit can substitute for getdtablesize" >&5
+echo "configure:6899: checking whether ulimit can substitute for getdtablesize" >&5
 if eval "test \"`echo '$''{'bash_cv_ulimit_maxfds'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot check ulimit if cross compiling" 1>&2; exit 1; }
+  echo "configure: warning: cannot check ulimit if cross compiling -- defaulting to no" 1>&2
+    bash_cv_ulimit_maxfds=no
+
 else
   cat > conftest.$ac_ext <<EOF
-#line 4837 "configure"
+#line 6909 "configure"
 #include "confdefs.h"
 
 main()
@@ -4843,7 +6915,7 @@ exit (maxfds == -1L);
 }
 
 EOF
-if { (eval echo configure:4847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   bash_cv_ulimit_maxfds=yes
 else
@@ -4866,15 +6938,17 @@ EOF
 fi
 
 echo $ac_n "checking to see if getenv can be redefined""... $ac_c" 1>&6
-echo "configure:4870: checking to see if getenv can be redefined" >&5
+echo "configure:6942: checking to see if getenv can be redefined" >&5
 if eval "test \"`echo '$''{'bash_cv_getenv_redef'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot check getenv redefinition if cross compiling" 1>&2; exit 1; }
+  echo "configure: warning: cannot check getenv redefinition if cross compiling -- defaulting to yes" 1>&2
+    bash_cv_getenv_redef=yes
+
 else
   cat > conftest.$ac_ext <<EOF
-#line 4878 "configure"
+#line 6952 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_UNISTD_H
@@ -4909,7 +6983,7 @@ exit(s == 0);     /* force optimizer to leave getenv in */
 }
 
 EOF
-if { (eval echo configure:4913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   bash_cv_getenv_redef=yes
 else
@@ -4932,15 +7006,17 @@ EOF
 fi
 
 echo $ac_n "checking if getcwd() calls popen()""... $ac_c" 1>&6
-echo "configure:4936: checking if getcwd() calls popen()" >&5
+echo "configure:7010: checking if getcwd() calls popen()" >&5
 if eval "test \"`echo '$''{'bash_cv_getcwd_calls_popen'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot check whether getcwd calls popen if cross compiling" 1>&2; exit 1; }
+  echo "configure: warning: cannot check whether getcwd calls popen if cross compiling -- defaulting to no" 1>&2
+    bash_cv_getcwd_calls_popen=no
+
 else
   cat > conftest.$ac_ext <<EOF
-#line 4944 "configure"
+#line 7020 "configure"
 #include "confdefs.h"
 
 #include <stdio.h>
@@ -4995,7 +7071,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:4999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   bash_cv_getcwd_calls_popen=no
 else
@@ -5018,12 +7094,12 @@ EOF
 fi
 
 echo $ac_n "checking for declaration of sbrk in <unistd.h>""... $ac_c" 1>&6
-echo "configure:5022: checking for declaration of sbrk in <unistd.h>" >&5
+echo "configure:7098: checking for declaration of sbrk in <unistd.h>" >&5
 if eval "test \"`echo '$''{'bash_cv_sbrk_declared'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5027 "configure"
+#line 7103 "configure"
 #include "confdefs.h"
 #include <unistd.h>
 EOF
@@ -5049,15 +7125,17 @@ fi
 
 
 echo $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6
-echo "configure:5053: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
+echo "configure:7129: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
 if eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot check for sigsetjmp/siglongjmp if cross-compiling" 1>&2; exit 1; }
+  echo "configure: warning: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" 1>&2
+     bash_cv_func_sigsetjmp=missing
+
 else
   cat > conftest.$ac_ext <<EOF
-#line 5061 "configure"
+#line 7139 "configure"
 #include "confdefs.h"
 
 #ifdef HAVE_UNISTD_H
@@ -5098,7 +7176,7 @@ exit(1);
 #endif
 }
 EOF
-if { (eval echo configure:5102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   bash_cv_func_sigsetjmp=present
 else
@@ -5110,7 +7188,6 @@ fi
 rm -fr conftest*
 fi
 
-
 fi
 
 echo "$ac_t""$bash_cv_func_sigsetjmp" 1>&6
@@ -5122,17 +7199,93 @@ EOF
 fi
 
 
+echo $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6
+echo "configure:7204: checking whether or not strcoll and strcmp differ" >&5
+if eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  echo "configure: warning: cannot check strcoll if cross compiling -- defaulting to no" 1>&2
+    bash_cv_func_strcoll_broken=no
+
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7214 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#if defined (HAVE_LOCALE_H)
+#include <locale.h>
+#endif
+
+main(c, v)
+int     c;
+char    *v[];
+{
+        int     r1, r2;
+        char    *deflocale, *defcoll;
+
+#ifdef HAVE_SETLOCALE
+        deflocale = setlocale(LC_ALL, "");
+       defcoll = setlocale(LC_COLLATE, "");
+#endif
+
+#ifdef HAVE_STRCOLL
+       /* These two values are taken from tests/glob-test. */
+        r1 = strcoll("abd", "aXd");
+#else
+       r1 = 0;
+#endif
+        r2 = strcmp("abd", "aXd");
+
+       /* These two should both be greater than 0.  It is permissible for
+          a system to return different values, as long as the sign is the
+          same. */
+
+        /* Exit with 1 (failure) if these two values are both > 0, since
+          this tests whether strcoll(3) is broken with respect to strcmp(3)
+          in the default locale. */
+       exit (r1 > 0 && r2 > 0);
+}
+
+EOF
+if { (eval echo configure:7253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  bash_cv_func_strcoll_broken=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  bash_cv_func_strcoll_broken=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$bash_cv_func_strcoll_broken" 1>&6
+if test $bash_cv_func_strcoll_broken = yes; then
+cat >> confdefs.h <<\EOF
+#define STRCOLL_BROKEN 1
+EOF
+
+fi
+
+
+
 
 echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6
-echo "configure:5128: checking if signal handlers must be reinstalled when invoked" >&5
+echo "configure:7279: checking if signal handlers must be reinstalled when invoked" >&5
 if eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot check signal handling if cross compiling" 1>&2; exit 1; }
+  echo "configure: warning: cannot check signal handling if cross compiling -- defaulting to no" 1>&2
+    bash_cv_must_reinstall_sighandlers=no
+
 else
   cat > conftest.$ac_ext <<EOF
-#line 5136 "configure"
+#line 7289 "configure"
 #include "confdefs.h"
 
 #include <signal.h>
@@ -5179,7 +7332,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:5183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   bash_cv_must_reinstall_sighandlers=no
 else
@@ -5203,15 +7356,17 @@ fi
 
 
 echo $ac_n "checking for presence of necessary job control definitions""... $ac_c" 1>&6
-echo "configure:5207: checking for presence of necessary job control definitions" >&5
+echo "configure:7360: checking for presence of necessary job control definitions" >&5
 if eval "test \"`echo '$''{'bash_cv_job_control_missing'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot check job control if cross-compiling" 1>&2; exit 1; }
+  echo "configure: warning: cannot check job control if cross-compiling -- defaulting to missing" 1>&2
+     bash_cv_job_control_missing=missing
+
 else
   cat > conftest.$ac_ext <<EOF
-#line 5215 "configure"
+#line 7370 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -5258,7 +7413,7 @@ exit(1);
 exit(0);
 }
 EOF
-if { (eval echo configure:5262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   bash_cv_job_control_missing=present
 else
@@ -5270,7 +7425,6 @@ fi
 rm -fr conftest*
 fi
 
-
 fi
 
 echo "$ac_t""$bash_cv_job_control_missing" 1>&6
@@ -5282,15 +7436,17 @@ EOF
 fi
 
 echo $ac_n "checking for presence of named pipes""... $ac_c" 1>&6
-echo "configure:5286: checking for presence of named pipes" >&5
+echo "configure:7440: checking for presence of named pipes" >&5
 if eval "test \"`echo '$''{'bash_cv_sys_named_pipes'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-  { echo "configure: error: cannot check for named pipes if cross-compiling" 1>&2; exit 1; }
+  echo "configure: warning: cannot check for named pipes if cross-compiling -- defaulting to missing" 1>&2
+     bash_cv_sys_named_pipes=missing
+
 else
   cat > conftest.$ac_ext <<EOF
-#line 5294 "configure"
+#line 7450 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -5302,7 +7458,7 @@ else
 /* Add more tests in here as appropriate. */
 main()
 {
-int fd;
+int fd, err;
 
 #if defined (HAVE_MKFIFO)
 exit (0);
@@ -5315,16 +7471,23 @@ exit (1);
 #if defined (NeXT)
 exit (1);
 #endif
-
-fd = mknod ("/tmp/sh-np-autoconf", 0666 | S_IFIFO, 0);
-if (fd == -1)
+err = mkdir("/tmp/bash-aclocal", 0700);
+if (err < 0) {
+  perror ("mkdir");
+  exit(1);
+}
+fd = mknod ("/tmp/bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
+if (fd == -1) {
+  rmdir ("/tmp/bash-aclocal");
   exit (1);
+}
 close(fd);
-unlink ("/tmp/sh-np-autoconf");
+unlink ("/tmp/bash-aclocal/sh-np-autoconf");
+rmdir ("/tmp/bash-aclocal");
 exit(0);
 }
 EOF
-if { (eval echo configure:5328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   bash_cv_sys_named_pipes=present
 else
@@ -5336,7 +7499,6 @@ fi
 rm -fr conftest*
 fi
 
-
 fi
 
 echo "$ac_t""$bash_cv_sys_named_pipes" 1>&6
@@ -5347,13 +7509,14 @@ EOF
 
 fi
 
+
 echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
-echo "configure:5352: checking for TIOCGWINSZ in sys/ioctl.h" >&5
+echo "configure:7515: checking for TIOCGWINSZ in sys/ioctl.h" >&5
 if eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5357 "configure"
+#line 7520 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/ioctl.h>
@@ -5361,7 +7524,7 @@ int main() {
 int x = TIOCGWINSZ;
 ; return 0; }
 EOF
-if { (eval echo configure:5365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bash_cv_tiocgwinsz_in_ioctl=yes
 else
@@ -5382,12 +7545,12 @@ EOF
 fi
 
 echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6
-echo "configure:5386: checking for TIOCSTAT in sys/ioctl.h" >&5
+echo "configure:7549: checking for TIOCSTAT in sys/ioctl.h" >&5
 if eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5391 "configure"
+#line 7554 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/ioctl.h>
@@ -5395,7 +7558,7 @@ int main() {
 int x = TIOCSTAT;
 ; return 0; }
 EOF
-if { (eval echo configure:5399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bash_cv_tiocstat_in_ioctl=yes
 else
@@ -5416,12 +7579,12 @@ EOF
 fi
 
 echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6
-echo "configure:5420: checking for FIONREAD in sys/ioctl.h" >&5
+echo "configure:7583: checking for FIONREAD in sys/ioctl.h" >&5
 if eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5425 "configure"
+#line 7588 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/ioctl.h>
@@ -5429,7 +7592,7 @@ int main() {
 int x = FIONREAD;
 ; return 0; }
 EOF
-if { (eval echo configure:5433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bash_cv_fionread_in_ioctl=yes
 else
@@ -5449,73 +7612,127 @@ EOF
 
 fi
 
-echo $ac_n "checking whether programs are able to redeclare getpw functions""... $ac_c" 1>&6
-echo "configure:5454: checking whether programs are able to redeclare getpw functions" >&5
-if eval "test \"`echo '$''{'bash_cv_can_redecl_getpw'+set}'`\" = set"; then
+
+echo $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6
+echo "configure:7618: checking for speed_t in sys/types.h" >&5
+if eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5459 "configure"
+#line 7623 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
-#include <pwd.h>
-extern struct passwd *getpwent();
 int main() {
-struct passwd *z; z = getpwent();
+speed_t x;
 ; return 0; }
 EOF
-if { (eval echo configure:5468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
-  bash_cv_can_redecl_getpw=yes
+  bash_cv_speed_t_in_sys_types=yes
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
-  bash_cv_can_redecl_getpw=no
+  bash_cv_speed_t_in_sys_types=no
 fi
 rm -f conftest*
 fi
 
-echo "$ac_t""$bash_cv_can_redecl_getpw" 1>&6
-if test $bash_cv_can_redecl_getpw = no; then
+echo "$ac_t""$bash_cv_speed_t_in_sys_types" 1>&6
+if test $bash_cv_speed_t_in_sys_types = yes; then   
 cat >> confdefs.h <<\EOF
-#define HAVE_GETPW_DECLS 1
+#define SPEED_T_IN_SYS_TYPES 1
 EOF
 
 fi
 
-echo $ac_n "checking whether /dev/fd is available""... $ac_c" 1>&6
-echo "configure:5489: checking whether /dev/fd is available" >&5
-if eval "test \"`echo '$''{'bash_cv_dev_fd'+set}'`\" = set"; then
+echo $ac_n "checking whether getpw functions are declared in pwd.h""... $ac_c" 1>&6
+echo "configure:7651: checking whether getpw functions are declared in pwd.h" >&5
+if eval "test \"`echo '$''{'bash_cv_getpw_declared'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test -d /dev/fd  && test -r /dev/fd/0; then
-   bash_cv_dev_fd=standard
- elif test -d /proc/self/fd && test -r /proc/self/fd/0; then
-   bash_cv_dev_fd=whacky
- else
-   bash_cv_dev_fd=absent
- fi
+  cat > conftest.$ac_ext <<EOF
+#line 7656 "configure"
+#include "confdefs.h"
 
-fi
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+#endif
+#include <pwd.h>
 
-echo "$ac_t""$bash_cv_dev_fd" 1>&6
-if test $bash_cv_dev_fd = "standard"; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_DEV_FD 1
 EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "getpwuid" >/dev/null 2>&1; then
+  rm -rf conftest*
+  bash_cv_getpw_declared=yes
+else
+  rm -rf conftest*
+  bash_cv_getpw_declared=no
+fi
+rm -f conftest*
 
-  cat >> confdefs.h <<\EOF
-#define DEV_FD_PREFIX "/dev/fd/"
+fi
+
+echo "$ac_t""$bash_cv_getpw_declared" 1>&6
+if test $bash_cv_getpw_declared = yes; then
+cat >> confdefs.h <<\EOF
+#define HAVE_GETPW_DECLS 1
 EOF
 
-elif test $bash_cv_dev_fd = "whacky"; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_DEV_FD 1
+fi
+
+echo $ac_n "checking for unusable real-time signals due to large values""... $ac_c" 1>&6
+echo "configure:7687: checking for unusable real-time signals due to large values" >&5
+if eval "test \"`echo '$''{'bash_cv_unusable_rtsigs'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  echo "configure: warning: cannot check real-time signals if cross compiling -- defaulting to yes" 1>&2
+     bash_cv_unusable_rtsigs=yes
+
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7697 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <signal.h>
+
+#ifndef NSIG
+#  define NSIG 64
+#endif
+
+main ()
+{
+  int n_sigs = 2 * NSIG;
+#ifdef SIGRTMIN
+  int rtmin = SIGRTMIN;
+#else
+  int rtmin = 0;
+#endif
+
+  exit(rtmin < n_sigs);
+}
 EOF
+if { (eval echo configure:7719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  bash_cv_unusable_rtsigs=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  bash_cv_unusable_rtsigs=no
+fi
+rm -fr conftest*
+fi
 
-  cat >> confdefs.h <<\EOF
-#define DEV_FD_PREFIX "/proc/self/fd/"
+fi
+
+echo "$ac_t""$bash_cv_unusable_rtsigs" 1>&6
+if test $bash_cv_unusable_rtsigs = yes; then
+cat >> confdefs.h <<\EOF
+#define UNUSABLE_RT_SIGNALS 1
 EOF
 
 fi
@@ -5523,12 +7740,12 @@ fi
 
 case "$host_os" in
 hpux*) echo $ac_n "checking whether $host_os needs _KERNEL for RLIMIT defines""... $ac_c" 1>&6
-echo "configure:5527: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5
+echo "configure:7744: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5
 if eval "test \"`echo '$''{'bash_cv_kernel_rlimit'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 5532 "configure"
+#line 7749 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -5541,7 +7758,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:5545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bash_cv_kernel_rlimit=no
 else
@@ -5549,22 +7766,22 @@ else
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   cat > conftest.$ac_ext <<EOF
-#line 5553 "configure"
+#line 7770 "configure"
 #include "confdefs.h"
 
-     #include <sys/types.h>
-     #define _KERNEL
-     #include <sys/resource.h>
-     #undef _KERNEL
-     
+#include <sys/types.h>
+#define _KERNEL
+#include <sys/resource.h>
+#undef _KERNEL
+
 int main() {
 
        int f;
         f = RLIMIT_DATA;
-     
+
 ; return 0; }
 EOF
-if { (eval echo configure:5568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   bash_cv_kernel_rlimit=yes
 else
@@ -5590,19 +7807,22 @@ fi
 esac
 
 if test "$opt_readline" = yes; then
+case "$host_os" in
+aix*)  prefer_curses=yes ;;
+esac
 
 if test "X$bash_cv_termcap_lib" = "X"; then
 _bash_needmsg=yes
 else
 echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
-echo "configure:5599: checking which library has the termcap functions" >&5
+echo "configure:7819: checking which library has the termcap functions" >&5
 _bash_needmsg=
 fi
 if eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:5606: checking for tgetent in -ltermcap" >&5
+echo "configure:7826: 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
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5610,7 +7830,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ltermcap  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5614 "configure"
+#line 7834 "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
@@ -5621,7 +7841,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:5625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7845: \"$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
@@ -5640,7 +7860,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:5644: checking for tgetent in -lcurses" >&5
+echo "configure:7864: 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
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5648,7 +7868,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5652 "configure"
+#line 7872 "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
@@ -5659,7 +7879,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:5663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7883: \"$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
@@ -5678,7 +7898,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:5682: checking for tgetent in -lncurses" >&5
+echo "configure:7902: checking for tgetent in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'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
@@ -5686,7 +7906,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5690 "configure"
+#line 7910 "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
@@ -5697,7 +7917,7 @@ int main() {
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:5701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7921: \"$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
@@ -5726,14 +7946,14 @@ fi
 
 if test "X$_bash_needmsg" = "Xyes"; then
 echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6
-echo "configure:5730: checking which library has the termcap functions" >&5
+echo "configure:7950: checking which library has the termcap functions" >&5
 fi
 echo "$ac_t""using $bash_cv_termcap_lib" 1>&6
-if test $bash_cv_termcap_lib = gnutermcap; then
+if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
 LDFLAGS="$LDFLAGS -L./lib/termcap"
 TERMCAP_LIB="./lib/termcap/libtermcap.a"
 TERMCAP_DEP="./lib/termcap/libtermcap.a"
-elif test $bash_cv_termcap_lib = libtermcap; then
+elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
 TERMCAP_LIB=-ltermcap
 TERMCAP_DEP=
 elif test $bash_cv_termcap_lib = libncurses; then
@@ -5748,8 +7968,67 @@ fi
 
 
 
+echo $ac_n "checking whether /dev/fd is available""... $ac_c" 1>&6
+echo "configure:7973: checking whether /dev/fd is available" >&5
+if eval "test \"`echo '$''{'bash_cv_dev_fd'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -d /dev/fd  && test -r /dev/fd/0; then
+   bash_cv_dev_fd=standard
+ elif test -d /proc/self/fd && test -r /proc/self/fd/0; then
+   bash_cv_dev_fd=whacky
+ else
+   bash_cv_dev_fd=absent
+ fi
+
+fi
+
+echo "$ac_t""$bash_cv_dev_fd" 1>&6
+if test $bash_cv_dev_fd = "standard"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_DEV_FD 1
+EOF
+
+  cat >> confdefs.h <<\EOF
+#define DEV_FD_PREFIX "/dev/fd/"
+EOF
+
+elif test $bash_cv_dev_fd = "whacky"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_DEV_FD 1
+EOF
+
+  cat >> confdefs.h <<\EOF
+#define DEV_FD_PREFIX "/proc/self/fd/"
+EOF
+
+fi
+
+echo $ac_n "checking whether /dev/stdin stdout stderr are available""... $ac_c" 1>&6
+echo "configure:8009: checking whether /dev/stdin stdout stderr are available" >&5
+if eval "test \"`echo '$''{'bash_cv_dev_stdin'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -d /dev/fd && test -r /dev/stdin; then
+   bash_cv_dev_stdin=present
+ elif test -d /proc/self/fd && test -r /dev/stdin; then
+   bash_cv_dev_stdin=present
+ else
+   bash_cv_dev_stdin=absent
+ fi
+
+fi
+
+echo "$ac_t""$bash_cv_dev_stdin" 1>&6
+if test $bash_cv_dev_stdin = "present"; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_DEV_STDIN 1
+EOF
+
+fi
+
 echo $ac_n "checking for default mail directory""... $ac_c" 1>&6
-echo "configure:5753: checking for default mail directory" >&5
+echo "configure:8032: checking for default mail directory" >&5
 if eval "test \"`echo '$''{'bash_cv_mail_dir'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5757,10 +8036,10 @@ else
    bash_cv_mail_dir=/var/mail
  elif test -d /usr/mail; then
    bash_cv_mail_dir=/usr/mail
- elif test -d /usr/spool/mail; then
-   bash_cv_mail_dir=/usr/spool/mail
  elif test -d /var/spool/mail; then
    bash_cv_mail_dir=/var/spool/mail
+ elif test -d /usr/spool/mail; then
+   bash_cv_mail_dir=/usr/spool/mail
  else
    bash_cv_mail_dir=unknown
  fi
@@ -5813,8 +8092,11 @@ fi
 
 
 
-case "$host_os" in
-sysv4.2)       cat >> confdefs.h <<\EOF
+LOCAL_DEFS=-DSHELL
+
+
+case "${host_os}" in
+sysv4.2*)      cat >> confdefs.h <<\EOF
 #define SVR4_2 1
 EOF
 
@@ -5826,15 +8108,40 @@ sysv4*)         cat >> confdefs.h <<\EOF
 #define SVR4 1
 EOF
  ;;
+sysv5*)                cat >> confdefs.h <<\EOF
+#define SVR5 1
+EOF
+ ;;
+hpux9*)                LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;;
 hpux*)         LOCAL_CFLAGS=-DHPUX ;;
 dgux*)         LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;;
-isc*)          LOCAL_CFLAGS=-Disc386;;
-sco3.2v5*)     LOCAL_CFLAGS="-DWAITPID_BROKEN -DNO_MEMSCRAMBLE -DPATH_MAX=1024" ;;
+isc*)          LOCAL_CFLAGS=-Disc386 ;;
+rhapsody*)     LOCAL_CFLAGS=-DRHAPSODY ;;
+sco3.2v5*)     LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DNO_MEMSCRAMBLE -DPATH_MAX=1024" ;;
 sco3.2v4*)     LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DNO_MEMSCRAMBLE -DPATH_MAX=1024" ;;
 sco3.2*)       LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
-sunos4*)       LOCAL_CFLAGS=-DSunOS4;;
-linux*)                LOCAL_LDFLAGS=-rdynamic ;;      # allow dynamic loading
-aix4.2*)       LOCAL_LDFLAGS="-bexpall -brtl";;# allow dynamic loading
+sunos4*)       LOCAL_CFLAGS=-DSunOS4 ;;
+solaris2.5*)   LOCAL_CFLAGS=-DSunOS5 ;;
+lynxos*)       LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
+linux*)                LOCAL_LDFLAGS=-rdynamic ;;       # allow dynamic loading
+*qnx*)         LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s -lunix -lncurses" ;;
+powerux*)      LOCAL_LIBS="-lgen" ;;
+cygwin*)       LOCAL_LIBS="-luser32" ;;
+opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG" ;;
+esac
+
+case "${host_os}-${CC}" in
+aix4.2*-*gcc*) LOCAL_LDFLAGS="-Xlinker -bexpall -Xlinker -brtl" ;;
+aix4.2*)       LOCAL_LDFLAGS="-bexpall -brtl" ;;
+bsdi4*-*gcc*)  LOCAL_LDFLAGS="-rdynamic" ;;    # allow dynamic loading, like Linux
+esac
+
+case "${host_os}" in
+freebsd[3-9]*)
+               if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then
+                       LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
+               fi ;;
+freebsdelf*)   LOCAL_LDFLAGS=-rdynamic ;;      # allow dynamic loading
 esac
 
 case "$host_cpu" in
@@ -5850,16 +8157,37 @@ m88k-motorola-sysv3)    LOCAL_CFLAGS=-DWAITPID_BROKEN ;;
 mips-pyramid-sysv4)    LOCAL_CFLAGS=-Xa ;;
 esac
 
+#
+# Shared object configuration section.  These values are generated by
+# ${srcdir}/support/shobj-conf
+#
+if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf
+then
+       echo $ac_n "checking shared object configuration for loadable builtins""... $ac_c" 1>&6
+echo "configure:8168: checking shared object configuration for loadable builtins" >&5
+       eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`
+       
+       
+       
+       
+       
+       
+       
+       echo "$ac_t""$SHOBJ_STATUS" 1>&6
+fi
+
 # try to create a directory tree if the source is elsewhere
 # this should be packaged into a script accessible via ${srcdir}/support
 case "$srcdir" in
 .)     ;;
-*)     for d in doc tests support lib ; do     # dirs
+*)     for d in doc tests support lib examples; do     # dirs
                test -d $d || mkdir $d
        done
-       for ld in readline glob tilde malloc termcap; do        # libdirs
+       for ld in readline glob tilde malloc sh termcap; do     # libdirs
                test -d lib/$ld || mkdir lib/$ld
        done
+       test -d examples/loadables || mkdir examples/loadables  # loadable builtins
+       test -d examples/loadables/perl || mkdir examples/loadables/perl
        ;;
 esac
 
@@ -5881,6 +8209,14 @@ BUILD_DIR=`pwd`
 
 
 
+
+
+
+
+
+#AC_SUBST(ALLOCA_SOURCE)
+#AC_SUBST(ALLOCA_OBJECT)
+
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -5904,7 +8240,7 @@ EOF
 # Ultrix sh set writes to stderr and can't be redirected directly,
 # and sets the high bit in the cache file unless we assign to the vars.
 (set) 2>&1 |
-  case `(ac_space=' '; set) 2>&1` in
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
   *ac_space=\ *)
     # `set' does not quote correctly, so add quotes (double-quote substitution
     # turns \\\\ into \\, and sed turns \\ into \).
@@ -5971,7 +8307,7 @@ do
     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.12"
+    echo "$CONFIG_STATUS generated by autoconf version 2.13"
     exit 0 ;;
   -help | --help | --hel | --he | --h)
     echo "\$ac_cs_usage"; exit 0 ;;
@@ -5983,8 +8319,9 @@ ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
 trap 'rm -fr `echo "Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
-         lib/malloc/Makefile lib/termcap/Makefile lib/tilde/Makefile \
-         doc/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+         lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \
+         lib/tilde/Makefile doc/Makefile support/Makefile \
+         examples/loadables/Makefile examples/loadables/perl/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -5993,9 +8330,11 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
 $ac_vpsub
 $extrasub
+s%@SHELL@%$SHELL%g
 s%@CFLAGS@%$CFLAGS%g
 s%@CPPFLAGS@%$CPPFLAGS%g
 s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
 s%@DEFS@%$DEFS%g
 s%@LDFLAGS@%$LDFLAGS%g
 s%@LIBS@%$LIBS%g
@@ -6019,32 +8358,53 @@ s%@host_alias@%$host_alias%g
 s%@host_cpu@%$host_cpu%g
 s%@host_vendor@%$host_vendor%g
 s%@host_os@%$host_os%g
+s%@TESTSCRIPT@%$TESTSCRIPT%g
 s%@PURIFY@%$PURIFY%g
-s%@MALLOC@%$MALLOC%g
+s%@MALLOC_TARGET@%$MALLOC_TARGET%g
 s%@MALLOC_SRC@%$MALLOC_SRC%g
+s%@htmldir@%$htmldir%g
+s%@CC@%$CC%g
+s%@CPP@%$CPP%g
+s%@EXEEXT@%$EXEEXT%g
+s%@SIGNAMES_H@%$SIGNAMES_H%g
+s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
+s%@STATIC_LD@%$STATIC_LD%g
 s%@READLINE_LIB@%$READLINE_LIB%g
 s%@READLINE_DEP@%$READLINE_DEP%g
+s%@RL_LIBDIR@%$RL_LIBDIR%g
+s%@RL_INCLUDE@%$RL_INCLUDE%g
 s%@HISTORY_LIB@%$HISTORY_LIB%g
 s%@HISTORY_DEP@%$HISTORY_DEP%g
-s%@CC@%$CC%g
-s%@CPP@%$CPP%g
+s%@HIST_LIBDIR@%$HIST_LIBDIR%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
 s%@AR@%$AR%g
 s%@RANLIB@%$RANLIB%g
 s%@YACC@%$YACC%g
 s%@SET_MAKE@%$SET_MAKE%g
+s%@MAKE_SHELL@%$MAKE_SHELL%g
 s%@ALLOCA@%$ALLOCA%g
 s%@TERMCAP_LIB@%$TERMCAP_LIB%g
 s%@TERMCAP_DEP@%$TERMCAP_DEP%g
 s%@JOBS_O@%$JOBS_O%g
+s%@SHOBJ_CC@%$SHOBJ_CC%g
+s%@SHOBJ_CFLAGS@%$SHOBJ_CFLAGS%g
+s%@SHOBJ_LD@%$SHOBJ_LD%g
+s%@SHOBJ_LDFLAGS@%$SHOBJ_LDFLAGS%g
+s%@SHOBJ_XLDFLAGS@%$SHOBJ_XLDFLAGS%g
+s%@SHOBJ_LIBS@%$SHOBJ_LIBS%g
+s%@SHOBJ_STATUS@%$SHOBJ_STATUS%g
+s%@PROFILE_FLAGS@%$PROFILE_FLAGS%g
 s%@incdir@%$incdir%g
 s%@BUILD_DIR@%$BUILD_DIR%g
+s%@ARFLAGS@%$ARFLAGS%g
+s%@BASHVERS@%$BASHVERS%g
+s%@BASHPATCH@%$BASHPATCH%g
 s%@LOCAL_LIBS@%$LOCAL_LIBS%g
 s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g
 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
-s%@ALLOCA_SOURCE@%$ALLOCA_SOURCE%g
-s%@ALLOCA_OBJECT@%$ALLOCA_OBJECT%g
+s%@LOCAL_DEFS@%$LOCAL_DEFS%g
 
 CEOF
 EOF
@@ -6087,8 +8447,9 @@ EOF
 cat >> $CONFIG_STATUS <<EOF
 
 CONFIG_FILES=\${CONFIG_FILES-"Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
-         lib/malloc/Makefile lib/termcap/Makefile lib/tilde/Makefile \
-         doc/Makefile"}
+         lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \
+         lib/tilde/Makefile doc/Makefile support/Makefile \
+         examples/loadables/Makefile examples/loadables/perl/Makefile"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then