]> granicus.if.org Git - postgresql/blobdiff - configure
Don't try to free executor state of an InitPlan early --- this breaks
[postgresql] / configure
index 9515829a9ec0691d5224864a78773ea77965cdfc..ade4f862a6cdaa39bd6a5bd42a365047ac5b4a5d 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.53 for PostgreSQL 7.3devel.
+# Generated by GNU Autoconf 2.53 for PostgreSQL 7.4devel.
 #
 # Report bugs to <pgsql-bugs@postgresql.org>.
 #
@@ -258,8 +258,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='PostgreSQL'
 PACKAGE_TARNAME='postgresql'
-PACKAGE_VERSION='7.3devel'
-PACKAGE_STRING='PostgreSQL 7.3devel'
+PACKAGE_VERSION='7.4devel'
+PACKAGE_STRING='PostgreSQL 7.4devel'
 PACKAGE_BUGREPORT='pgsql-bugs@postgresql.org'
 
 ac_unique_file="src/backend/access/common/heaptuple.c"
@@ -757,18 +757,6 @@ ac_env_CPP_set=${CPP+set}
 ac_env_CPP_value=$CPP
 ac_cv_env_CPP_set=${CPP+set}
 ac_cv_env_CPP_value=$CPP
-ac_env_CXX_set=${CXX+set}
-ac_env_CXX_value=$CXX
-ac_cv_env_CXX_set=${CXX+set}
-ac_cv_env_CXX_value=$CXX
-ac_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_env_CXXFLAGS_value=$CXXFLAGS
-ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_cv_env_CXXFLAGS_value=$CXXFLAGS
-ac_env_CXXCPP_set=${CXXCPP+set}
-ac_env_CXXCPP_value=$CXXCPP
-ac_cv_env_CXXCPP_set=${CXXCPP+set}
-ac_cv_env_CXXCPP_value=$CXXCPP
 ac_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
 ac_env_DOCBOOKSTYLE_value=$DOCBOOKSTYLE
 ac_cv_env_DOCBOOKSTYLE_set=${DOCBOOKSTYLE+set}
@@ -781,7 +769,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures PostgreSQL 7.3devel to adapt to many kinds of systems.
+\`configure' configures PostgreSQL 7.4devel to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -842,7 +830,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of PostgreSQL 7.3devel:";;
+     short | recursive ) echo "Configuration of PostgreSQL 7.4devel:";;
    esac
   cat <<\_ACEOF
 
@@ -850,14 +838,14 @@ Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-integer-datetimes  enable 64-bit integer date/time support
-  --enable-recode         enable character set recode support
+  --enable-recode         enable single-byte recode support
   --enable-nls[=LANGUAGES]  enable Native Language Support
   --disable-shared        do not build shared libraries
   --disable-rpath         do not embed shared library search path in executables
   --enable-debug          build with debugging symbols (-g)
   --enable-depend         turn on automatic dependency tracking
   --enable-cassert        enable assertion checks (for debugging)
-  --enable-odbc           build the ODBC driver package
+  --disable-largefile     omit support for large files
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -872,7 +860,7 @@ Optional Packages:
   --without-tk            do not build Tk interfaces if Tcl is enabled
   --with-tclconfig=DIR    tclConfig.sh and tkConfig.sh are in DIR
   --with-tkconfig=DIR     tkConfig.sh is in DIR
-  --with-perl             build Perl interface and PL/Perl
+  --with-perl             build Perl modules (PL/Perl)
   --with-python           build Python interface module
   --with-java             build JDBC interface and Java tools
   --with-krb4[=DIR]       build with Kerberos 4 support [/usr/athena]
@@ -882,10 +870,6 @@ Optional Packages:
   --with-openssl[=DIR]    build with OpenSSL support [/usr/local/ssl]
   --without-readline      do not use Readline
   --without-zlib          do not use Zlib
-  --with-unixodbc         build ODBC driver for unixODBC
-  --with-iodbc            build ODBC driver for iODBC
-  --with-odbcinst=DIR     default directory for odbcinst.ini sysconfdir
-  --with-CXX              build C++ modules (libpq++)
   --with-gnu-ld           assume the C compiler uses GNU ld default=no
 
 Some influential environment variables:
@@ -896,9 +880,6 @@ Some influential environment variables:
   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
               headers in a nonstandard directory <include dir>
   CPP         C preprocessor
-  CXX         C++ compiler command
-  CXXFLAGS    C++ compiler flags
-  CXXCPP      C++ preprocessor
   DOCBOOKSTYLE
               location of DocBook stylesheets
 
@@ -968,7 +949,7 @@ fi
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-PostgreSQL configure 7.3devel
+PostgreSQL configure 7.4devel
 generated by GNU Autoconf 2.53
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
@@ -985,7 +966,7 @@ cat >&5 <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by PostgreSQL $as_me 7.3devel, which was
+It was created by PostgreSQL $as_me 7.4devel, which was
 generated by GNU Autoconf 2.53.  Invocation command line was
 
   $ $0 $@
@@ -1651,17 +1632,6 @@ echo "$as_me:$LINENO: result: $enable_recode" >&5
 echo "${ECHO_T}$enable_recode" >&6
 
 
-#
-# Multibyte support
-#
-MULTIBYTE=SQL_ASCII
-
-cat >>confdefs.h <<\_ACEOF
-#define MULTIBYTE 1
-_ACEOF
-
-
-
 #
 # NLS
 #
@@ -1916,10 +1886,6 @@ echo "$as_me: error: argument required for --with-CC option" >&2;}
 fi;
 
 
-# Set here so it can be over-ridden in the template file
-GCC_CXXFLAGS="-O2"
-VENDOR_CXXFLAGS=""
-
 case $template in
   aix) pgac_cc_list="gcc xlc";;
  irix) pgac_cc_list="cc";; # no gcc
@@ -2476,6 +2442,7 @@ if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
 fi
 { echo "$as_me:$LINENO: using CFLAGS=$CFLAGS" >&5
 echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
+
 # Check if the compiler still works with the template settings
 echo "$as_me:$LINENO: checking whether the C compiler still works" >&5
 echo $ECHO_N "checking whether the C compiler still works... $ECHO_C" >&6
@@ -2522,6 +2489,52 @@ echo "$as_me: error: cannot proceed" >&2;}
    { (exit 1); exit 1; }; }
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+# Defend against gcc -ffastmath
+if test "$GCC" = yes; then
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+#ifdef __FAST_MATH__
+choke me
+#endif
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:$LINENO: error: do not put -ffast-math in CFLAGS" >&5
+echo "$as_me: error: do not put -ffast-math in CFLAGS" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2969,7 +2982,7 @@ fi;
 
 
 #
-# Optionally build Perl modules (Pg.pm and PL/Perl)
+# Optionally build Perl modules (PL/Perl)
 #
 echo "$as_me:$LINENO: checking whether to build Perl modules" >&5
 echo $ECHO_N "checking whether to build Perl modules... $ECHO_C" >&6
@@ -3154,8 +3167,15 @@ echo "$as_me: error: ant does not work" >&2;}
 
 
 if test -z "$ANT"; then
-  { { echo "$as_me:$LINENO: error: Ant is required to build Java components" >&5
-echo "$as_me: error: Ant is required to build Java components" >&2;}
+  { { echo "$as_me:$LINENO: error: Ant is required to build Java components
+If you have Ant already installed, see config.log for details on the failure." >&5
+echo "$as_me: error: Ant is required to build Java components
+If you have Ant already installed, see config.log for details on the failure." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if "$ANT" -version | sed q | egrep -v ' 1\.[5-9]| [2-9]\.' >/dev/null ; then
+  { { echo "$as_me:$LINENO: error: Ant version >= 1.5 is required to build Java components" >&5
+echo "$as_me: error: Ant version >= 1.5 is required to build Java components" >&2;}
    { (exit 1); exit 1; }; }
 fi
       ;;
@@ -3495,162 +3515,6 @@ fi;
 
 
 
-#
-# Optionally enable the building of the ODBC driver
-#
-
-# Old option name
-if test "${with_odbc+set}" = set && test "${enable_odbc+set}" != set; then
-  enable_odbc=$with_odbc
-fi
-
-echo "$as_me:$LINENO: checking whether to build the ODBC driver" >&5
-echo $ECHO_N "checking whether to build the ODBC driver... $ECHO_C" >&6
-
-
-# Check whether --enable-odbc or --disable-odbc was given.
-if test "${enable_odbc+set}" = set; then
-  enableval="$enable_odbc"
-
-  case $enableval in
-    yes)
-      :
-      ;;
-    no)
-      :
-      ;;
-    *)
-      { { echo "$as_me:$LINENO: error: no argument expected for --enable-odbc option" >&5
-echo "$as_me: error: no argument expected for --enable-odbc option" >&2;}
-   { (exit 1); exit 1; }; }
-      ;;
-  esac
-
-else
-  enable_odbc=no
-
-fi;
-
-
-
-
-# Check whether --with-unixodbc or --without-unixodbc was given.
-if test "${with_unixodbc+set}" = set; then
-  withval="$with_unixodbc"
-
-  case $withval in
-    yes)
-      :
-      ;;
-    no)
-      :
-      ;;
-    *)
-      { { echo "$as_me:$LINENO: error: no argument expected for --with-unixodbc option" >&5
-echo "$as_me: error: no argument expected for --with-unixodbc option" >&2;}
-   { (exit 1); exit 1; }; }
-      ;;
-  esac
-
-else
-  with_unixodbc=no
-
-fi;
-
-
-
-
-# Check whether --with-iodbc or --without-iodbc was given.
-if test "${with_iodbc+set}" = set; then
-  withval="$with_iodbc"
-
-  case $withval in
-    yes)
-      :
-      ;;
-    no)
-      :
-      ;;
-    *)
-      { { echo "$as_me:$LINENO: error: no argument expected for --with-iodbc option" >&5
-echo "$as_me: error: no argument expected for --with-iodbc option" >&2;}
-   { (exit 1); exit 1; }; }
-      ;;
-  esac
-
-else
-  with_iodbc=no
-
-fi;
-
-if test "$with_unixodbc" = yes && test "$with_iodbc" = yes; then
-  { { echo "$as_me:$LINENO: error: ODBC driver cannot be built for both unixODBC and iODBC" >&5
-echo "$as_me: error: ODBC driver cannot be built for both unixODBC and iODBC" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test "$with_unixodbc" = yes || test "$with_iodbc" = yes; then
-  enable_odbc=yes
-fi
-case $enable_odbc:$with_unixodbc:$with_iodbc in
-  yes:no:no)    echo "$as_me:$LINENO: result: yes (stand-alone)" >&5
-echo "${ECHO_T}yes (stand-alone)" >&6;;
-  yes:yes:no)   echo "$as_me:$LINENO: result: yes (unixODBC)" >&5
-echo "${ECHO_T}yes (unixODBC)" >&6
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_UNIXODBC 1
-_ACEOF
-
-                ;;
-  yes:no:yes)   echo "$as_me:$LINENO: result: yes (iODBC)" >&5
-echo "${ECHO_T}yes (iODBC)" >&6
-
-cat >>confdefs.h <<\_ACEOF
-#define WITH_IODBC 1
-_ACEOF
-
-                ;;
-  no:*)         echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6;;
-esac
-
-
-
-
-
-# Allow for overriding the default location of the odbcinst.ini
-# file which is normally ${sysconfdir} (i.e., ${prefix}/etc).
-
-
-
-# Check whether --with-odbcinst or --without-odbcinst was given.
-if test "${with_odbcinst+set}" = set; then
-  withval="$with_odbcinst"
-
-  case $withval in
-    yes)
-      { { echo "$as_me:$LINENO: error: argument required for --with-odbcinst option" >&5
-echo "$as_me: error: argument required for --with-odbcinst option" >&2;}
-   { (exit 1); exit 1; }; }
-      ;;
-    no)
-      { { echo "$as_me:$LINENO: error: argument required for --with-odbcinst option" >&5
-echo "$as_me: error: argument required for --with-odbcinst option" >&2;}
-   { (exit 1); exit 1; }; }
-      ;;
-    *)
-      odbcinst_ini_dir=$withval
-      ;;
-  esac
-
-else
-  odbcinst_ini_dir="\${sysconfdir}"
-fi;
-
-
-
-
-
 # Assume system is ELF if it predefines __ELF__ as 1,
 # otherwise believe host_os based default.
 case $host_os in
@@ -3683,103 +3547,26 @@ rm -f conftest*
 
 
 
-#
-# Optionally build C++ code (i.e., libpq++)
-#
-echo "$as_me:$LINENO: checking whether to build C++ modules" >&5
-echo $ECHO_N "checking whether to build C++ modules... $ECHO_C" >&6
-
-
-
-# Check whether --with-CXX or --without-CXX was given.
-if test "${with_CXX+set}" = set; then
-  withval="$with_CXX"
-
-  case $withval in
-    yes)
-      :
-      ;;
-    no)
-      :
-      ;;
-    *)
-      with_CXX=yes
-CXX=$withval
-      ;;
-  esac
-
-else
-  with_CXX=no
-fi;
-
-
-if test "$with_CXX" = yes; then
-
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-  # If the user has specified CXXFLAGS in the environment, leave it
-  # alone, else use a default.
+CPPFLAGS="$CPPFLAGS $INCLUDES"
+LDFLAGS="$LDFLAGS $LIBDIRS"
 
-  ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CXX"; then
-  ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
+{ echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
+echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
+{ echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
+echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
 
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
-  echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
 
-    test -n "$CXX" && break
-  done
-fi
-if test -z "$CXX"; then
-  ac_ct_CXX=$CXX
-  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+if test "${ac_cv_prog_AWK+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if test -n "$ac_ct_CXX"; then
-  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -3788,7 +3575,7 @@ do
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    ac_cv_prog_AWK="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -3797,524 +3584,21 @@ done
 
 fi
 fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
 else
   echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
 fi
 
-  test -n "$ac_ct_CXX" && break
+  test -n "$AWK" && break
 done
-test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
-
-  CXX=$ac_ct_CXX
-fi
-
-
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
-     "checking for C++ compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-  (eval $ac_compiler --version </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
-  (eval $ac_compiler -v </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
-  (eval $ac_compiler -V </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
 
-echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_compiler_gnu=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
-GXX=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cxx_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_cxx_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_prog_cxx_g=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
-if test "$ac_test_CXXFLAGS" = set; then
-  CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
-  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
-  else
-    CXXFLAGS="-g"
-  fi
-else
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
-  else
-    CXXFLAGS=
-  fi
-fi
-for ac_declaration in \
-   ''\
-   '#include <stdlib.h>' \
-   'extern "C" void std::exit (int) throw (); using std::exit;' \
-   'extern "C" void std::exit (int); using std::exit;' \
-   'extern "C" void exit (int) throw ();' \
-   'extern "C" void exit (int);' \
-   'void exit (int);'
-do
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-$ac_declaration
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-continue
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-$ac_declaration
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  break
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
-  echo '#ifdef __cplusplus' >>confdefs.h
-  echo $ac_declaration      >>confdefs.h
-  echo '#endif'             >>confdefs.h
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-  if test "$ac_env_CXXFLAGS" != set; then
-    if test "$GXX" = yes; then
-      CXXFLAGS="$GCC_CXXFLAGS"
-    else
-      CXXFLAGS="$VENDOR_CXXFLAGS"
-    fi
-  fi
-  if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
-    CXXFLAGS="$CXXFLAGS -g"
-  fi
-  { echo "$as_me:$LINENO: using CXXFLAGS=$CXXFLAGS" >&5
-echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
-
-  ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
-echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
-if test -z "$CXXCPP"; then
-  if test "${ac_cv_prog_CXXCPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-      # Double quotes because CXXCPP needs to be expanded
-    for CXXCPP in "$CXX -E" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <assert.h>
-                     Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
-
-    done
-    ac_cv_prog_CXXCPP=$CXXCPP
-
-fi
-  CXXCPP=$ac_cv_prog_CXXCPP
-else
-  ac_cv_prog_CXXCPP=$CXXCPP
-fi
-echo "$as_me:$LINENO: result: $CXXCPP" >&5
-echo "${ECHO_T}$CXXCPP" >&6
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <assert.h>
-                     Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
-echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-
-
-
-CPPFLAGS="$CPPFLAGS $INCLUDES"
-LDFLAGS="$LDFLAGS $LIBDIRS"
-
-{ echo "$as_me:$LINENO: using CPPFLAGS=$CPPFLAGS" >&5
-echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
-{ echo "$as_me:$LINENO: using LDFLAGS=$LDFLAGS" >&5
-echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
-
-
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AWK+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AWK="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$AWK" && break
-done
-
-echo "$as_me:$LINENO: checking for flex" >&5
-echo $ECHO_N "checking for flex... $ECHO_C" >&6
-if test "${pgac_cv_path_flex+set}" = set; then
+echo "$as_me:$LINENO: checking for flex" >&5
+echo $ECHO_N "checking for flex... $ECHO_C" >&6
+if test "${pgac_cv_path_flex+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   # Let the user override the test
@@ -4862,58 +4146,13 @@ if test -z "$YACC"; then
 echo "$as_me: WARNING:
 *** Without Bison you will not be able to build PostgreSQL from CVS or
 *** change any of the parser definition files.  You can obtain Bison from
-*** a GNU mirror site.  (If you are using the official distribution of
-*** PostgreSQL then you do not need to worry about this because the Bison
-*** output is pre-generated.)  To use a different yacc program (possible,
-*** but not recommended), set the environment variable YACC before running
-*** 'configure'." >&2;}
-fi
-
-
-if test "$with_tk" = yes; then
-    # Extract the first word of "wish", so it can be a program name with args.
-set dummy wish; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_WISH+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $WISH in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_WISH="$WISH" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_WISH="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  ;;
-esac
-fi
-WISH=$ac_cv_path_WISH
-
-if test -n "$WISH"; then
-  echo "$as_me:$LINENO: result: $WISH" >&5
-echo "${ECHO_T}$WISH" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+*** a GNU mirror site.  (If you are using the official distribution of
+*** PostgreSQL then you do not need to worry about this because the Bison
+*** output is pre-generated.)  To use a different yacc program (possible,
+*** but not recommended), set the environment variable YACC before running
+*** 'configure'." >&2;}
 fi
 
-    test -z "$WISH" && { { echo "$as_me:$LINENO: error: 'wish' is required for Tk support" >&5
-echo "$as_me: error: 'wish' is required for Tk support" >&2;}
-   { (exit 1); exit 1; }; }
-fi
 
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
@@ -4956,16 +4195,6 @@ fi
 
 if test "$with_perl" = yes; then
 
-echo "$as_me:$LINENO: checking for Perl installsitearch" >&5
-echo $ECHO_N "checking for Perl installsitearch... $ECHO_C" >&6
-perl_installsitearch=`$PERL -MConfig -e 'print $Config{installsitearch}'`
-echo "$as_me:$LINENO: result: $perl_installsitearch" >&5
-echo "${ECHO_T}$perl_installsitearch" >&6
-echo "$as_me:$LINENO: checking for Perl installman3dir" >&5
-echo $ECHO_N "checking for Perl installman3dir... $ECHO_C" >&6
-perl_installman3dir=`$PERL -MConfig -e 'print $Config{installman3dir}'`
-echo "$as_me:$LINENO: result: $perl_installman3dir" >&5
-echo "${ECHO_T}$perl_installman3dir" >&6
 echo "$as_me:$LINENO: checking for Perl archlibexp" >&5
 echo $ECHO_N "checking for Perl archlibexp... $ECHO_C" >&6
 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
@@ -4981,11 +4210,6 @@ echo $ECHO_N "checking for Perl useshrplib... $ECHO_C" >&6
 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
 echo "$as_me:$LINENO: result: $perl_useshrplib" >&5
 echo "${ECHO_T}$perl_useshrplib" >&6
-echo "$as_me:$LINENO: checking for Perl man3ext" >&5
-echo $ECHO_N "checking for Perl man3ext... $ECHO_C" >&6
-perl_man3ext=`$PERL -MConfig -e 'print $Config{man3ext}'`
-echo "$as_me:$LINENO: result: $perl_man3ext" >&5
-echo "${ECHO_T}$perl_man3ext" >&6
 
 echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5
 echo $ECHO_N "checking for flags to link embedded Perl... $ECHO_C" >&6
@@ -5072,6 +4296,14 @@ fi
 echo "$as_me:$LINENO: checking how to link an embedded Python application" >&5
 echo $ECHO_N "checking how to link an embedded Python application... $ECHO_C" >&6
 
+if test ! -f "$python_configdir/Makefile"; then
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  { { echo "$as_me:$LINENO: error: Python Makefile not found" >&5
+echo "$as_me: error: Python Makefile not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
 _python_libs=`grep '^LIBS=' $python_configdir/Makefile | sed 's/^.*=//'`
 _python_libc=`grep '^LIBC=' $python_configdir/Makefile | sed 's/^.*=//'`
 _python_libm=`grep '^LIBM=' $python_configdir/Makefile | sed 's/^.*=//'`
@@ -6045,73 +5277,13 @@ _ACEOF
 
 fi
 
-# QNX:
-
-echo "$as_me:$LINENO: checking for main in -lunix" >&5
-echo $ECHO_N "checking for main in -lunix... $ECHO_C" >&6
-if test "${ac_cv_lib_unix_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lunix  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-main ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_unix_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_lib_unix_main=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_unix_main" >&5
-echo "${ECHO_T}$ac_cv_lib_unix_main" >&6
-if test $ac_cv_lib_unix_main = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUNIX 1
-_ACEOF
-
-  LIBS="-lunix $LIBS"
-
-fi
-
-echo "$as_me:$LINENO: checking for library containing crypt" >&5
-echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
-if test "${ac_cv_search_crypt+set}" = set; then
+echo "$as_me:$LINENO: checking for library containing getopt_long" >&5
+echo $ECHO_N "checking for library containing getopt_long... $ECHO_C" >&6
+if test "${ac_cv_search_getopt_long+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_func_search_save_LIBS=$LIBS
-ac_cv_search_crypt=no
+ac_cv_search_getopt_long=no
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
@@ -6122,7 +5294,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char crypt ();
+char getopt_long ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -6132,7 +5304,7 @@ char crypt ();
 int
 main ()
 {
-crypt ();
+getopt_long ();
   ;
   return 0;
 }
@@ -6149,14 +5321,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_search_crypt="none required"
+  ac_cv_search_getopt_long="none required"
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_crypt" = no; then
-  for ac_lib in crypt; do
+if test "$ac_cv_search_getopt_long" = no; then
+  for ac_lib in getopt gnugetopt; do
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
     cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
@@ -6168,7 +5340,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char crypt ();
+char getopt_long ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -6178,7 +5350,7 @@ char crypt ();
 int
 main ()
 {
-crypt ();
+getopt_long ();
   ;
   return 0;
 }
@@ -6195,7 +5367,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_search_crypt="-l$ac_lib"
+  ac_cv_search_getopt_long="-l$ac_lib"
 break
 else
   echo "$as_me: failed program was:" >&5
@@ -6206,33 +5378,27 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
 LIBS=$ac_func_search_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
-echo "${ECHO_T}$ac_cv_search_crypt" >&6
-if test "$ac_cv_search_crypt" != no; then
-  test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
+echo "$as_me:$LINENO: result: $ac_cv_search_getopt_long" >&5
+echo "${ECHO_T}$ac_cv_search_getopt_long" >&6
+if test "$ac_cv_search_getopt_long" != no; then
+  test "$ac_cv_search_getopt_long" = "none required" || LIBS="$ac_cv_search_getopt_long $LIBS"
 
 fi
 
-# BeOS:
+# QNX:
 
-echo "$as_me:$LINENO: checking for __inet_ntoa in -lbind" >&5
-echo $ECHO_N "checking for __inet_ntoa in -lbind... $ECHO_C" >&6
-if test "${ac_cv_lib_bind___inet_ntoa+set}" = set; then
+echo "$as_me:$LINENO: checking for main in -lunix" >&5
+echo $ECHO_N "checking for main in -lunix... $ECHO_C" >&6
+if test "${ac_cv_lib_unix_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbind  $LIBS"
+LIBS="-lunix  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char __inet_ntoa ();
+
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -6242,7 +5408,7 @@ char __inet_ntoa ();
 int
 main ()
 {
-__inet_ntoa ();
+main ();
   ;
   return 0;
 }
@@ -6259,34 +5425,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_bind___inet_ntoa=yes
+  ac_cv_lib_unix_main=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_lib_bind___inet_ntoa=no
+ac_cv_lib_unix_main=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_bind___inet_ntoa" >&5
-echo "${ECHO_T}$ac_cv_lib_bind___inet_ntoa" >&6
-if test $ac_cv_lib_bind___inet_ntoa = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_unix_main" >&5
+echo "${ECHO_T}$ac_cv_lib_unix_main" >&6
+if test $ac_cv_lib_unix_main = yes; then
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBBIND 1
+#define HAVE_LIBUNIX 1
 _ACEOF
 
-  LIBS="-lbind $LIBS"
+  LIBS="-lunix $LIBS"
 
 fi
 
-# Solaris:
-echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
-echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
-if test "${ac_cv_search_fdatasync+set}" = set; then
+echo "$as_me:$LINENO: checking for library containing crypt" >&5
+echo $ECHO_N "checking for library containing crypt... $ECHO_C" >&6
+if test "${ac_cv_search_crypt+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_func_search_save_LIBS=$LIBS
-ac_cv_search_fdatasync=no
+ac_cv_search_crypt=no
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
@@ -6297,7 +5462,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char fdatasync ();
+char crypt ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -6307,7 +5472,7 @@ char fdatasync ();
 int
 main ()
 {
-fdatasync ();
+crypt ();
   ;
   return 0;
 }
@@ -6324,14 +5489,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_search_fdatasync="none required"
+  ac_cv_search_crypt="none required"
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_fdatasync" = no; then
-  for ac_lib in rt posix4; do
+if test "$ac_cv_search_crypt" = no; then
+  for ac_lib in crypt; do
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
     cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
@@ -6343,7 +5508,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char fdatasync ();
+char crypt ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -6353,7 +5518,7 @@ char fdatasync ();
 int
 main ()
 {
-fdatasync ();
+crypt ();
   ;
   return 0;
 }
@@ -6370,131 +5535,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_search_fdatasync="-l$ac_lib"
+  ac_cv_search_crypt="-l$ac_lib"
 break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
-echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
-if test "$ac_cv_search_fdatasync" != no; then
-  test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
-
-fi
-
-
-if test "$with_readline" = yes; then
-
-echo "$as_me:$LINENO: checking for readline" >&5
-echo $ECHO_N "checking for readline... $ECHO_C" >&6
-
-if test "${pgac_cv_check_readline+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  pgac_cv_check_readline=no
-for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
-  for pgac_rllib in -lreadline -ledit ; do
-    pgac_save_LIBS=$LIBS
-    LIBS="${pgac_rllib}${pgac_lib} $LIBS"
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char readline ();
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-readline ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-      # NetBSD and OpenBSD have a broken linker that does not
-      # recognize dependent libraries
-      case $host_os in netbsd* | openbsd* )
-        case $pgac_lib in
-          *curses*) ;;
-          *) pgac_lib=" -lcurses" ;;
-        esac
-      esac
-
-      pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
-      break 2
-
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-    LIBS=$pgac_save_LIBS
-  done
-done
-LIBS=$pgac_save_LIBS
-
-fi
-
-if test "$pgac_cv_check_readline" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBREADLINE 1
-_ACEOF
-
-  LIBS="$pgac_cv_check_readline $LIBS"
-  echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
-echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-  if test x"$pgac_cv_check_readline" = x"no"; then
-    { { echo "$as_me:$LINENO: error: readline library not found
-Use --without-readline to disable readline support." >&5
-echo "$as_me: error: readline library not found
-Use --without-readline to disable readline support." >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_crypt" >&5
+echo "${ECHO_T}$ac_cv_search_crypt" >&6
+if test "$ac_cv_search_crypt" != no; then
+  test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
 
-if test "$with_zlib" = yes; then
+fi
 
-echo "$as_me:$LINENO: checking for inflate in -lz" >&5
-echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
-if test "${ac_cv_lib_z_inflate+set}" = set; then
+# BeOS:
+
+echo "$as_me:$LINENO: checking for __inet_ntoa in -lbind" >&5
+echo $ECHO_N "checking for __inet_ntoa in -lbind... $ECHO_C" >&6
+if test "${ac_cv_lib_bind___inet_ntoa+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
+LIBS="-lbind  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
@@ -6505,7 +5572,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char inflate ();
+char __inet_ntoa ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -6515,7 +5582,7 @@ char inflate ();
 int
 main ()
 {
-inflate ();
+__inet_ntoa ();
   ;
   return 0;
 }
@@ -6532,43 +5599,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_z_inflate=yes
+  ac_cv_lib_bind___inet_ntoa=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_lib_z_inflate=no
+ac_cv_lib_bind___inet_ntoa=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
-echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
-if test $ac_cv_lib_z_inflate = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_bind___inet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_bind___inet_ntoa" >&6
+if test $ac_cv_lib_bind___inet_ntoa = yes; then
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
+#define HAVE_LIBBIND 1
 _ACEOF
 
-  LIBS="-lz $LIBS"
-
-else
-  { { echo "$as_me:$LINENO: error: zlib library not found
-Use --without-zlib to disable zlib support." >&5
-echo "$as_me: error: zlib library not found
-Use --without-zlib to disable zlib support." >&2;}
-   { (exit 1); exit 1; }; }
-fi
+  LIBS="-lbind $LIBS"
 
 fi
 
-if test "$with_krb4" = yes ; then
-
-echo "$as_me:$LINENO: checking for des_encrypt in -ldes" >&5
-echo $ECHO_N "checking for des_encrypt in -ldes... $ECHO_C" >&6
-if test "${ac_cv_lib_des_des_encrypt+set}" = set; then
+# Solaris:
+echo "$as_me:$LINENO: checking for library containing fdatasync" >&5
+echo $ECHO_N "checking for library containing fdatasync... $ECHO_C" >&6
+if test "${ac_cv_search_fdatasync+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldes  $LIBS"
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_fdatasync=no
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
@@ -6579,7 +5637,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char des_encrypt ();
+char fdatasync ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -6589,7 +5647,7 @@ char des_encrypt ();
 int
 main ()
 {
-des_encrypt ();
+fdatasync ();
   ;
   return 0;
 }
@@ -6606,39 +5664,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_des_des_encrypt=yes
+  ac_cv_search_fdatasync="none required"
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_lib_des_des_encrypt=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_encrypt" >&5
-echo "${ECHO_T}$ac_cv_lib_des_des_encrypt" >&6
-if test $ac_cv_lib_des_des_encrypt = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBDES 1
-_ACEOF
-
-  LIBS="-ldes $LIBS"
-
-else
-  { { echo "$as_me:$LINENO: error: library 'des' is required for Kerberos 4" >&5
-echo "$as_me: error: library 'des' is required for Kerberos 4" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-
-echo "$as_me:$LINENO: checking for krb_sendauth in -lkrb" >&5
-echo $ECHO_N "checking for krb_sendauth in -lkrb... $ECHO_C" >&6
-if test "${ac_cv_lib_krb_krb_sendauth+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lkrb  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+if test "$ac_cv_search_fdatasync" = no; then
+  for ac_lib in rt posix4; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 
@@ -6648,7 +5683,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char krb_sendauth ();
+char fdatasync ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -6658,7 +5693,7 @@ char krb_sendauth ();
 int
 main ()
 {
-krb_sendauth ();
+fdatasync ();
   ;
   return 0;
 }
@@ -6675,40 +5710,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_krb_krb_sendauth=yes
+  ac_cv_search_fdatasync="-l$ac_lib"
+break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_lib_krb_krb_sendauth=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  done
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_sendauth" >&5
-echo "${ECHO_T}$ac_cv_lib_krb_krb_sendauth" >&6
-if test $ac_cv_lib_krb_krb_sendauth = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBKRB 1
-_ACEOF
-
-  LIBS="-lkrb $LIBS"
-
-else
-  { { echo "$as_me:$LINENO: error: library 'krb' is required for Kerberos 4" >&5
-echo "$as_me: error: library 'krb' is required for Kerberos 4" >&2;}
-   { (exit 1); exit 1; }; }
+LIBS=$ac_func_search_save_LIBS
 fi
+echo "$as_me:$LINENO: result: $ac_cv_search_fdatasync" >&5
+echo "${ECHO_T}$ac_cv_search_fdatasync" >&6
+if test "$ac_cv_search_fdatasync" != no; then
+  test "$ac_cv_search_fdatasync" = "none required" || LIBS="$ac_cv_search_fdatasync $LIBS"
 
 fi
 
-if test "$with_krb5" = yes ; then
-  echo "$as_me:$LINENO: checking for library containing com_err" >&5
-echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
-if test "${ac_cv_search_com_err+set}" = set; then
+# Cygwin:
+
+echo "$as_me:$LINENO: checking for shmget in -lcygipc" >&5
+echo $ECHO_N "checking for shmget in -lcygipc... $ECHO_C" >&6
+if test "${ac_cv_lib_cygipc_shmget+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_com_err=no
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcygipc  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
@@ -6719,7 +5747,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char com_err ();
+char shmget ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -6729,7 +5757,7 @@ char com_err ();
 int
 main ()
 {
-com_err ();
+shmget ();
   ;
   return 0;
 }
@@ -6746,15 +5774,40 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_search_com_err="none required"
+  ac_cv_lib_cygipc_shmget=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
+ac_cv_lib_cygipc_shmget=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_com_err" = no; then
-  for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_cygipc_shmget" >&5
+echo "${ECHO_T}$ac_cv_lib_cygipc_shmget" >&6
+if test $ac_cv_lib_cygipc_shmget = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCYGIPC 1
+_ACEOF
+
+  LIBS="-lcygipc $LIBS"
+
+fi
+
+
+if test "$with_readline" = yes; then
+
+echo "$as_me:$LINENO: checking for readline" >&5
+echo $ECHO_N "checking for readline... $ECHO_C" >&6
+
+if test "${pgac_cv_check_readline+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  pgac_cv_check_readline=no
+for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
+  for pgac_rllib in -lreadline -ledit ; do
+    pgac_save_LIBS=$LIBS
+    LIBS="${pgac_rllib}${pgac_lib} $LIBS"
     cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
@@ -6765,7 +5818,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char com_err ();
+char readline ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -6775,7 +5828,7 @@ char com_err ();
 int
 main ()
 {
-com_err ();
+readline ();
   ;
   return 0;
 }
@@ -6792,35 +5845,66 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_search_com_err="-l$ac_lib"
-break
+
+      # NetBSD and OpenBSD have a broken linker that does not
+      # recognize dependent libraries
+      case $host_os in netbsd* | openbsd* )
+        case $pgac_lib in
+          *curses*) ;;
+          *) pgac_lib=" -lcurses" ;;
+        esac
+      esac
+
+      pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
+      break 2
+
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+    LIBS=$pgac_save_LIBS
   done
+done
+LIBS=$pgac_save_LIBS
+
 fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
-echo "${ECHO_T}$ac_cv_search_com_err" >&6
-if test "$ac_cv_search_com_err" != no; then
-  test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
 
+if test "$pgac_cv_check_readline" != no ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBREADLINE 1
+_ACEOF
+
+  LIBS="$pgac_cv_check_readline $LIBS"
+  echo "$as_me:$LINENO: result: yes ($pgac_cv_check_readline)" >&5
+echo "${ECHO_T}yes ($pgac_cv_check_readline)" >&6
 else
-  { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
-echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+  if test x"$pgac_cv_check_readline" = x"no"; then
+    { { echo "$as_me:$LINENO: error: readline library not found
+If you have readline already installed, see config.log for details on the
+failure.  It is possible the compiler isn't looking in the proper directory.
+Use --without-readline to disable readline support." >&5
+echo "$as_me: error: readline library not found
+If you have readline already installed, see config.log for details on the
+failure.  It is possible the compiler isn't looking in the proper directory.
+Use --without-readline to disable readline support." >&2;}
    { (exit 1); exit 1; }; }
+  fi
 fi
 
-  echo "$as_me:$LINENO: checking for library containing krb5_encrypt" >&5
-echo $ECHO_N "checking for library containing krb5_encrypt... $ECHO_C" >&6
-if test "${ac_cv_search_krb5_encrypt+set}" = set; then
+if test "$with_zlib" = yes; then
+
+echo "$as_me:$LINENO: checking for inflate in -lz" >&5
+echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6
+if test "${ac_cv_lib_z_inflate+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_krb5_encrypt=no
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
@@ -6831,7 +5915,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char krb5_encrypt ();
+char inflate ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -6841,7 +5925,7 @@ char krb5_encrypt ();
 int
 main ()
 {
-krb5_encrypt ();
+inflate ();
   ;
   return 0;
 }
@@ -6858,16 +5942,48 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_search_krb5_encrypt="none required"
+  ac_cv_lib_z_inflate=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
+ac_cv_lib_z_inflate=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_krb5_encrypt" = no; then
-  for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' crypto k5crypto; do
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-    cat >conftest.$ac_ext <<_ACEOF
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
+echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6
+if test $ac_cv_lib_z_inflate = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+else
+  { { echo "$as_me:$LINENO: error: zlib library not found
+If you have zlib already installed, see config.log for details on the
+failure.  It is possible the compiler isn't looking in the proper directory.
+Use --without-zlib to disable zlib support." >&5
+echo "$as_me: error: zlib library not found
+If you have zlib already installed, see config.log for details on the
+failure.  It is possible the compiler isn't looking in the proper directory.
+Use --without-zlib to disable zlib support." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+
+if test "$with_krb4" = yes ; then
+
+echo "$as_me:$LINENO: checking for des_encrypt in -ldes" >&5
+echo $ECHO_N "checking for des_encrypt in -ldes... $ECHO_C" >&6
+if test "${ac_cv_lib_des_des_encrypt+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldes  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 
@@ -6877,7 +5993,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char krb5_encrypt ();
+char des_encrypt ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -6887,7 +6003,7 @@ char krb5_encrypt ();
 int
 main ()
 {
-krb5_encrypt ();
+des_encrypt ();
   ;
   return 0;
 }
@@ -6904,35 +6020,38 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_search_krb5_encrypt="-l$ac_lib"
-break
+  ac_cv_lib_des_des_encrypt=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
+ac_cv_lib_des_des_encrypt=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  done
-fi
-LIBS=$ac_func_search_save_LIBS
+LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_search_krb5_encrypt" >&5
-echo "${ECHO_T}$ac_cv_search_krb5_encrypt" >&6
-if test "$ac_cv_search_krb5_encrypt" != no; then
-  test "$ac_cv_search_krb5_encrypt" = "none required" || LIBS="$ac_cv_search_krb5_encrypt $LIBS"
+echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_encrypt" >&5
+echo "${ECHO_T}$ac_cv_lib_des_des_encrypt" >&6
+if test $ac_cv_lib_des_des_encrypt = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDES 1
+_ACEOF
+
+  LIBS="-ldes $LIBS"
 
 else
-  { { echo "$as_me:$LINENO: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&5
-echo "$as_me: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&2;}
+  { { echo "$as_me:$LINENO: error: library 'des' is required for Kerberos 4" >&5
+echo "$as_me: error: library 'des' is required for Kerberos 4" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
-  echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
-echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
-if test "${ac_cv_search_krb5_sendauth+set}" = set; then
+
+echo "$as_me:$LINENO: checking for krb_sendauth in -lkrb" >&5
+echo $ECHO_N "checking for krb_sendauth in -lkrb... $ECHO_C" >&6
+if test "${ac_cv_lib_krb_krb_sendauth+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_krb5_sendauth=no
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
@@ -6943,7 +6062,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char krb5_sendauth ();
+char krb_sendauth ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -6953,7 +6072,7 @@ char krb5_sendauth ();
 int
 main ()
 {
-krb5_sendauth ();
+krb_sendauth ();
   ;
   return 0;
 }
@@ -6970,16 +6089,41 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_search_krb5_sendauth="none required"
+  ac_cv_lib_krb_krb_sendauth=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
+ac_cv_lib_krb_krb_sendauth=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_krb5_sendauth" = no; then
-  for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-    cat >conftest.$ac_ext <<_ACEOF
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_sendauth" >&5
+echo "${ECHO_T}$ac_cv_lib_krb_krb_sendauth" >&6
+if test $ac_cv_lib_krb_krb_sendauth = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBKRB 1
+_ACEOF
+
+  LIBS="-lkrb $LIBS"
+
+else
+  { { echo "$as_me:$LINENO: error: library 'krb' is required for Kerberos 4" >&5
+echo "$as_me: error: library 'krb' is required for Kerberos 4" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+
+if test "$with_krb5" = yes ; then
+  echo "$as_me:$LINENO: checking for library containing com_err" >&5
+echo $ECHO_N "checking for library containing com_err... $ECHO_C" >&6
+if test "${ac_cv_search_com_err+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_com_err=no
+cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 
@@ -6989,7 +6133,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char krb5_sendauth ();
+char com_err ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -6999,7 +6143,7 @@ char krb5_sendauth ();
 int
 main ()
 {
-krb5_sendauth ();
+com_err ();
   ;
   return 0;
 }
@@ -7016,40 +6160,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_search_krb5_sendauth="-l$ac_lib"
-break
+  ac_cv_search_com_err="none required"
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
-echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
-if test "$ac_cv_search_krb5_sendauth" != no; then
-  test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
-
-else
-  { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
-echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-
-if test "$with_openssl" = yes ; then
-
-echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
-echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
-if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypto  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+if test "$ac_cv_search_com_err" = no; then
+  for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' com_err; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 
@@ -7059,7 +6179,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char CRYPTO_new_ex_data ();
+char com_err ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -7069,7 +6189,7 @@ char CRYPTO_new_ex_data ();
 int
 main ()
 {
-CRYPTO_new_ex_data ();
+com_err ();
   ;
   return 0;
 }
@@ -7086,38 +6206,35 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
+  ac_cv_search_com_err="-l$ac_lib"
+break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_lib_crypto_CRYPTO_new_ex_data=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  done
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
-echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
-if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBCRYPTO 1
-_ACEOF
-
-  LIBS="-lcrypto $LIBS"
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_com_err" >&5
+echo "${ECHO_T}$ac_cv_search_com_err" >&6
+if test "$ac_cv_search_com_err" != no; then
+  test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
 
 else
-  { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
-echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
+  { { echo "$as_me:$LINENO: error: could not find function 'com_err' required for Kerberos 5" >&5
+echo "$as_me: error: could not find function 'com_err' required for Kerberos 5" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
-
-echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
-echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
-if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
+  echo "$as_me:$LINENO: checking for library containing krb5_encrypt" >&5
+echo $ECHO_N "checking for library containing krb5_encrypt... $ECHO_C" >&6
+if test "${ac_cv_search_krb5_encrypt+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lssl  $LIBS"
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_krb5_encrypt=no
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
@@ -7128,7 +6245,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char SSL_library_init ();
+char krb5_encrypt ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -7138,7 +6255,7 @@ char SSL_library_init ();
 int
 main ()
 {
-SSL_library_init ();
+krb5_encrypt ();
   ;
   return 0;
 }
@@ -7155,42 +6272,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_lib_ssl_SSL_library_init=yes
+  ac_cv_search_krb5_encrypt="none required"
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_lib_ssl_SSL_library_init=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
-echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
-if test $ac_cv_lib_ssl_SSL_library_init = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSSL 1
-_ACEOF
-
-  LIBS="-lssl $LIBS"
-
-else
-  { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
-echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-
-if test "$with_pam" = yes ; then
-
-echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
-echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
-if test "${ac_cv_lib_pam_pam_start+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpam  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+if test "$ac_cv_search_krb5_encrypt" = no; then
+  for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken' crypto k5crypto; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 
@@ -7200,7 +6291,7 @@ extern "C"
 #endif
 /* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
-char pam_start ();
+char krb5_encrypt ();
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -7210,7 +6301,7 @@ char pam_start ();
 int
 main ()
 {
-pam_start ();
+krb5_encrypt ();
   ;
   return 0;
 }
@@ -7226,419 +6317,374 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_pam_pam_start=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_lib_pam_pam_start=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
-echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
-if test $ac_cv_lib_pam_pam_start = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPAM 1
-_ACEOF
-
-  LIBS="-lpam $LIBS"
-
-else
-  { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
-echo "$as_me: error: library 'pam' is required for PAM" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-fi
-
-
-##
-## Header files
-##
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_cv_header_stdc=yes
+  (exit $ac_status); }; }; then
+  ac_cv_search_krb5_encrypt="-l$ac_lib"
+break
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_header_stdc=no
+cat conftest.$ac_ext >&5
 fi
-rm -f conftest.err conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "memchr" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+  done
 fi
-rm -f conftest*
-
+LIBS=$ac_func_search_save_LIBS
 fi
+echo "$as_me:$LINENO: result: $ac_cv_search_krb5_encrypt" >&5
+echo "${ECHO_T}$ac_cv_search_krb5_encrypt" >&6
+if test "$ac_cv_search_krb5_encrypt" != no; then
+  test "$ac_cv_search_krb5_encrypt" = "none required" || LIBS="$ac_cv_search_krb5_encrypt $LIBS"
 
-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 <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "free" >/dev/null 2>&1; then
-  :
 else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
+  { { echo "$as_me:$LINENO: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&5
+echo "$as_me: error: could not find function 'krb5_encrypt' required for Kerberos 5" >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
+  echo "$as_me:$LINENO: checking for library containing krb5_sendauth" >&5
+echo $ECHO_N "checking for library containing krb5_sendauth... $ECHO_C" >&6
+if test "${ac_cv_search_krb5_sendauth+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_krb5_sendauth=no
+cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
-                     || ('j' <= (c) && (c) <= 'r') \
-                     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
 
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char krb5_sendauth ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
 int
 main ()
 {
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-        || toupper (i) != TOUPPER (i))
-      exit(2);
-  exit (0);
+krb5_sendauth ();
+  ;
+  return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  :
+  ac_cv_search_krb5_sendauth="none required"
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
 fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-                  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_krb5_sendauth" = no; then
+  for ac_lib in krb5 'krb5 -ldes -lasn1 -lroken'; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-$ac_includes_default
 
-#include <$ac_header>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char krb5_sendauth ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+krb5_sendauth ();
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+         { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_Header=yes"
+  ac_cv_search_krb5_sendauth="-l$ac_lib"
+break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_Header=no"
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+  done
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+LIBS=$ac_func_search_save_LIBS
 fi
+echo "$as_me:$LINENO: result: $ac_cv_search_krb5_sendauth" >&5
+echo "${ECHO_T}$ac_cv_search_krb5_sendauth" >&6
+if test "$ac_cv_search_krb5_sendauth" != no; then
+  test "$ac_cv_search_krb5_sendauth" = "none required" || LIBS="$ac_cv_search_krb5_sendauth $LIBS"
 
-done
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+else
+  { { echo "$as_me:$LINENO: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&5
+echo "$as_me: error: could not find function 'krb5_sendauth' required for Kerberos 5" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
+fi
 
+if test "$with_openssl" = yes ; then
 
-for ac_header in crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h pwd.h sys/ipc.h sys/pstat.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/un.h termios.h kernel/OS.h kernel/image.h SupportDefs.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+echo "$as_me:$LINENO: checking for CRYPTO_new_ex_data in -lcrypto" >&5
+echo $ECHO_N "checking for CRYPTO_new_ex_data in -lcrypto... $ECHO_C" >&6
+if test "${ac_cv_lib_crypto_CRYPTO_new_ex_data+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char CRYPTO_new_ex_data ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+CRYPTO_new_ex_data ();
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+         { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_header_compiler=yes
+  ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_header_compiler=no
+ac_cv_lib_crypto_CRYPTO_new_ex_data=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
+echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6
+if test $ac_cv_lib_crypto_CRYPTO_new_ex_data = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCRYPTO 1
+_ACEOF
 
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+  LIBS="-lcrypto $LIBS"
+
+else
+  { { echo "$as_me:$LINENO: error: library 'crypto' is required for OpenSSL" >&5
+echo "$as_me: error: library 'crypto' is required for OpenSSL" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
+echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
+if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <$ac_header>
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char SSL_library_init ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+SSL_library_init ();
+  ;
+  return 0;
+}
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
   ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_ssl_SSL_library_init=yes
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=$ac_header_preproc"
+cat conftest.$ac_ext >&5
+ac_cv_lib_ssl_SSL_library_init=no
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
+echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
+if test $ac_cv_lib_ssl_SSL_library_init = yes; then
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_LIBSSL 1
 _ACEOF
 
-fi
+  LIBS="-lssl $LIBS"
 
-done
+else
+  { { echo "$as_me:$LINENO: error: library 'ssl' is required for OpenSSL" >&5
+echo "$as_me: error: library 'ssl' is required for OpenSSL" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
+fi
 
-# At least on IRIX, cpp test for netinet/tcp.h will fail unless
-# netinet/in.h is included first.
+if test "$with_pam" = yes ; then
 
-for ac_header in netinet/in.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+echo "$as_me:$LINENO: checking for pam_start in -lpam" >&5
+echo $ECHO_N "checking for pam_start in -lpam... $ECHO_C" >&6
+if test "${ac_cv_lib_pam_pam_start+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpam  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char pam_start ();
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+pam_start ();
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+         { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_header_compiler=yes
+  ac_cv_lib_pam_pam_start=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_header_compiler=no
+ac_cv_lib_pam_pam_start=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_start" >&5
+echo "${ECHO_T}$ac_cv_lib_pam_pam_start" >&6
+if test $ac_cv_lib_pam_pam_start = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPAM 1
+_ACEOF
 
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
+  LIBS="-lpam $LIBS"
+
+else
+  { { echo "$as_me:$LINENO: error: library 'pam' is required for PAM" >&5
+echo "$as_me: error: library 'pam' is required for PAM" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+fi
+
+
+##
+## Header files
+##
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <$ac_header>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -7657,235 +6703,138 @@ else
   ac_cpp_err=yes
 fi
 if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
+  ac_cv_header_stdc=yes
 else
   echo "$as_me: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  ac_header_preproc=no
+  ac_cv_header_stdc=no
 fi
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "memchr" >/dev/null 2>&1; then
+  :
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  ac_cv_header_stdc=no
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+rm -f conftest*
 
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
-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 <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
 
-done
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
+fi
 
-for ac_header in netinet/tcp.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-$ac_includes_default
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
+                     || ('j' <= (c) && (c) <= 'r') \
+                     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
 #endif
 
-
-#include <$ac_header>
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+        || toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_Header=yes"
+  :
 else
-  echo "$as_me: failed program was:" >&5
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_Header=no"
+( exit $ac_status )
+ac_cv_header_stdc=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
 _ACEOF
 
 fi
 
-done
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
 
 
-if test "$with_readline" = yes; then
 
-for ac_header in readline/readline.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
-else
 
-for ac_header in readline.h
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                  inttypes.h stdint.h unistd.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo "$as_me:$LINENO: checking for $ac_header" >&5
 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 $ac_includes_default
+
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
@@ -7900,98 +6849,45 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_header_compiler=yes
+  eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_header_compiler=no
+eval "$as_ac_Header=no"
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=$ac_header_preproc"
 fi
 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
 if test `eval echo '${'$as_ac_Header'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-else
-  { { echo "$as_me:$LINENO: error: readline header not found
-Use --without-readline to disable readline support." >&5
-echo "$as_me: error: readline header not found
-Use --without-readline to disable readline support." >&2;}
-   { (exit 1); exit 1; }; }
 fi
 
 done
 
-fi
 
-done
 
 
-for ac_header in readline/history.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in crypt.h dld.h endian.h fp_class.h getopt.h ieeefp.h pwd.h sys/ipc.h sys/pstat.h sys/select.h sys/sem.h sys/socket.h sys/shm.h sys/un.h termios.h kernel/OS.h kernel/image.h SupportDefs.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -8100,9 +6996,15 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-else
+fi
 
-for ac_header in history.h
+done
+
+
+# At least on IRIX, cpp test for netinet/tcp.h will fail unless
+# netinet/in.h is included first.
+
+for ac_header in netinet/in.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -8211,40 +7113,29 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-else
-  { { echo "$as_me:$LINENO: error: history header not found
-Use --without-readline to disable readline support." >&5
-echo "$as_me: error: history header not found
-Use --without-readline to disable readline support." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-done
-
 fi
 
 done
 
-fi
 
-if test "$with_zlib" = yes; then
-  if test "${ac_cv_header_zlib_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for zlib.h" >&5
-echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
-if test "${ac_cv_header_zlib_h+set}" = set; then
+for ac_header in netinet/tcp.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
 else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking zlib.h usability" >&5
-echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 $ac_includes_default
-#include <zlib.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -8258,108 +7149,48 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_header_compiler=yes
+  eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_header_compiler=no
+eval "$as_ac_Header=no"
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking zlib.h presence" >&5
-echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <zlib.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_header_preproc=no
 fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:$LINENO: checking for zlib.h" >&5
-echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
-if test "${ac_cv_header_zlib_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_zlib_h=$ac_header_preproc
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
 
-fi
-if test $ac_cv_header_zlib_h = yes; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: zlib header not found
-Use --without-zlib to disable zlib support." >&5
-echo "$as_me: error: zlib header not found
-Use --without-zlib to disable zlib support." >&2;}
-   { (exit 1); exit 1; }; }
-fi
+done
 
 
-fi
+if test "$with_readline" = yes; then
 
-if test "$with_krb4" = yes ; then
-  if test "${ac_cv_header_krb_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for krb.h" >&5
-echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
-if test "${ac_cv_header_krb_h+set}" = set; then
+for ac_header in readline/readline.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
-echo "${ECHO_T}$ac_cv_header_krb_h" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking krb.h usability" >&5
-echo $ECHO_N "checking krb.h usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 $ac_includes_default
-#include <krb.h>
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -8384,12 +7215,12 @@ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 echo "${ECHO_T}$ac_header_compiler" >&6
 
 # Is the header present?
-echo "$as_me:$LINENO: checking krb.h presence" >&5
-echo $ECHO_N "checking krb.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <krb.h>
+#include <$ac_header>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -8421,58 +7252,56 @@ echo "${ECHO_T}$ac_header_preproc" >&6
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc in
   yes:no )
-    { echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;};;
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
   no:yes )
-    { echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;};;
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
 esac
-echo "$as_me:$LINENO: checking for krb.h" >&5
-echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
-if test "${ac_cv_header_krb_h+set}" = set; then
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header_krb_h=$ac_header_preproc
+  eval "$as_ac_Header=$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
-echo "${ECHO_T}$ac_cv_header_krb_h" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
 fi
-if test $ac_cv_header_krb_h = yes; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: header file <krb.h> is required for Kerberos 4" >&5
-echo "$as_me: error: header file <krb.h> is required for Kerberos 4" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-fi
+else
 
-if test "$with_krb5" = yes ; then
-  if test "${ac_cv_header_krb5_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for krb5.h" >&5
-echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
-if test "${ac_cv_header_krb5_h+set}" = set; then
+for ac_header in readline.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
-echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking krb5.h usability" >&5
-echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 $ac_includes_default
-#include <krb5.h>
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -8497,12 +7326,12 @@ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 echo "${ECHO_T}$ac_header_compiler" >&6
 
 # Is the header present?
-echo "$as_me:$LINENO: checking krb5.h presence" >&5
-echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <krb5.h>
+#include <$ac_header>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -8534,55 +7363,73 @@ echo "${ECHO_T}$ac_header_preproc" >&6
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc in
   yes:no )
-    { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;};;
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
   no:yes )
-    { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: krb5.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: krb5.h: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;};;
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
 esac
-echo "$as_me:$LINENO: checking for krb5.h" >&5
-echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
-if test "${ac_cv_header_krb5_h+set}" = set; then
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header_krb5_h=$ac_header_preproc
+  eval "$as_ac_Header=$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
-echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
 fi
-if test $ac_cv_header_krb5_h = yes; then
-  :
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
 else
-  { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
-echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
+  { { echo "$as_me:$LINENO: error: readline header not found
+If you have readline already installed, see config.log for details on the
+failure.  It is possible the compiler isn't looking in the proper directory.
+Use --without-readline to disable readline support." >&5
+echo "$as_me: error: readline header not found
+If you have readline already installed, see config.log for details on the
+failure.  It is possible the compiler isn't looking in the proper directory.
+Use --without-readline to disable readline support." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
+done
 
-  if test "${ac_cv_header_com_err_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for com_err.h" >&5
-echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
-if test "${ac_cv_header_com_err_h+set}" = set; then
+fi
+
+done
+
+
+for ac_header in readline/history.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
-echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking com_err.h usability" >&5
-echo $ECHO_N "checking com_err.h usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 $ac_includes_default
-#include <com_err.h>
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -8607,12 +7454,12 @@ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 echo "${ECHO_T}$ac_header_compiler" >&6
 
 # Is the header present?
-echo "$as_me:$LINENO: checking com_err.h presence" >&5
-echo $ECHO_N "checking com_err.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <com_err.h>
+#include <$ac_header>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -8644,58 +7491,56 @@ echo "${ECHO_T}$ac_header_preproc" >&6
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc in
   yes:no )
-    { echo "$as_me:$LINENO: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;};;
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
   no:yes )
-    { echo "$as_me:$LINENO: WARNING: com_err.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: com_err.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: com_err.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: com_err.h: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;};;
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
 esac
-echo "$as_me:$LINENO: checking for com_err.h" >&5
-echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
-if test "${ac_cv_header_com_err_h+set}" = set; then
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header_com_err_h=$ac_header_preproc
+  eval "$as_ac_Header=$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
-echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
 fi
-if test $ac_cv_header_com_err_h = yes; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: header file <com_err.h> is required for Kerberos 5" >&5
-echo "$as_me: error: header file <com_err.h> is required for Kerberos 5" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-fi
+else
 
-if test "$with_openssl" = yes ; then
-  if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
-echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
-if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
+for ac_header in history.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
-echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
-echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 $ac_includes_default
-#include <openssl/ssl.h>
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -8720,12 +7565,12 @@ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 echo "${ECHO_T}$ac_header_compiler" >&6
 
 # Is the header present?
-echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
-echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <openssl/ssl.h>
+#include <$ac_header>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -8757,55 +7602,72 @@ echo "${ECHO_T}$ac_header_preproc" >&6
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc in
   yes:no )
-    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;};;
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
   no:yes )
-    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;};;
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
 esac
-echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
-echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
-if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header_openssl_ssl_h=$ac_header_preproc
+  eval "$as_ac_Header=$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
-echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
 fi
-if test $ac_cv_header_openssl_ssl_h = yes; then
-  :
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
 else
-  { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
-echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
+  { { echo "$as_me:$LINENO: error: history header not found
+If you have readline already installed, see config.log for details on the
+failure.  It is possible the compiler isn't looking in the proper directory.
+Use --without-readline to disable readline support." >&5
+echo "$as_me: error: history header not found
+If you have readline already installed, see config.log for details on the
+failure.  It is possible the compiler isn't looking in the proper directory.
+Use --without-readline to disable readline support." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
+done
 
-  if test "${ac_cv_header_openssl_err_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for openssl/err.h" >&5
-echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
-if test "${ac_cv_header_openssl_err_h+set}" = set; then
+fi
+
+done
+
+fi
+
+if test "$with_zlib" = yes; then
+  if test "${ac_cv_header_zlib_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for zlib.h" >&5
+echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_zlib_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
-echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
+echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
-echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking zlib.h usability" >&5
+echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 $ac_includes_default
-#include <openssl/err.h>
+#include <zlib.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -8830,12 +7692,12 @@ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 echo "${ECHO_T}$ac_header_compiler" >&6
 
 # Is the header present?
-echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
-echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking zlib.h presence" >&5
+echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <openssl/err.h>
+#include <zlib.h>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -8867,58 +7729,64 @@ echo "${ECHO_T}$ac_header_preproc" >&6
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc in
   yes:no )
-    { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;};;
+    { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;};;
   no:yes )
-    { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: openssl/err.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: openssl/err.h: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;};;
+    { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;};;
 esac
-echo "$as_me:$LINENO: checking for openssl/err.h" >&5
-echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
-if test "${ac_cv_header_openssl_err_h+set}" = set; then
+echo "$as_me:$LINENO: checking for zlib.h" >&5
+echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_zlib_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header_openssl_err_h=$ac_header_preproc
+  ac_cv_header_zlib_h=$ac_header_preproc
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
-echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
+echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_zlib_h" >&6
 
 fi
-if test $ac_cv_header_openssl_err_h = yes; then
+if test $ac_cv_header_zlib_h = yes; then
   :
 else
-  { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
-echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
+  { { echo "$as_me:$LINENO: error: zlib header not found
+If you have readline already installed, see config.log for details on the
+failure.  It is possible the compiler isn't looking in the proper directory.
+Use --without-zlib to disable zlib support." >&5
+echo "$as_me: error: zlib header not found
+If you have readline already installed, see config.log for details on the
+failure.  It is possible the compiler isn't looking in the proper directory.
+Use --without-zlib to disable zlib support." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
 
 fi
 
-if test "$with_pam" = yes ; then
-  if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5
-echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6
-if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
+if test "$with_krb4" = yes ; then
+  if test "${ac_cv_header_krb_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for krb.h" >&5
+echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
+if test "${ac_cv_header_krb_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5
-echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6
+echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
+echo "${ECHO_T}$ac_cv_header_krb_h" >&6
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5
-echo $ECHO_N "checking security/pam_appl.h usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking krb.h usability" >&5
+echo $ECHO_N "checking krb.h usability... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 $ac_includes_default
-#include <security/pam_appl.h>
+#include <krb.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -8943,12 +7811,12 @@ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 echo "${ECHO_T}$ac_header_compiler" >&6
 
 # Is the header present?
-echo "$as_me:$LINENO: checking security/pam_appl.h presence" >&5
-echo $ECHO_N "checking security/pam_appl.h presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking krb.h presence" >&5
+echo $ECHO_N "checking krb.h presence... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <security/pam_appl.h>
+#include <krb.h>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -8980,159 +7848,58 @@ echo "${ECHO_T}$ac_header_preproc" >&6
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc in
   yes:no )
-    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;};;
+    { echo "$as_me:$LINENO: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: krb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;};;
   no:yes )
-    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;};;
+    { echo "$as_me:$LINENO: WARNING: krb.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: krb.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: krb.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: krb.h: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: krb.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: krb.h: proceeding with the preprocessor's result" >&2;};;
 esac
-echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5
-echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6
-if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
+echo "$as_me:$LINENO: checking for krb.h" >&5
+echo $ECHO_N "checking for krb.h... $ECHO_C" >&6
+if test "${ac_cv_header_krb_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  ac_cv_header_security_pam_appl_h=$ac_header_preproc
+  ac_cv_header_krb_h=$ac_header_preproc
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5
-echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6
+echo "$as_me:$LINENO: result: $ac_cv_header_krb_h" >&5
+echo "${ECHO_T}$ac_cv_header_krb_h" >&6
 
 fi
-if test $ac_cv_header_security_pam_appl_h = yes; then
+if test $ac_cv_header_krb_h = yes; then
   :
 else
-  { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> is required for PAM" >&5
-echo "$as_me: error: header file <security/pam_appl.h> is required for PAM" >&2;}
+  { { echo "$as_me:$LINENO: error: header file <krb.h> is required for Kerberos 4" >&5
+echo "$as_me: error: header file <krb.h> is required for Kerberos 4" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
 
 fi
 
-
-##
-## Types, structures, compiler characteristics
-##
-
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
-  /* Ultrix mips cc rejects this.  */
-  typedef int charset[2];
-  const charset x;
-  /* SunOS 4.1.1 cc rejects this.  */
-  char const *const *ccp;
-  char **p;
-  /* NEC SVR4.0.2 mips cc rejects this.  */
-  struct point {int x, y;};
-  static struct point const zero = {0,0};
-  /* AIX XL C 1.02.0.0 rejects this.
-     It does not let you subtract one const X* pointer from another in
-     an arm of an if-expression whose if-part is not a constant
-     expression */
-  const char *g = "string";
-  ccp = &g + (g ? g-g : 0);
-  /* HPUX 7.0 cc rejects these. */
-  ++ccp;
-  p = (char**) ccp;
-  ccp = (char const *const *) p;
-  { /* SCO 3.2v4 cc rejects this.  */
-    char *t;
-    char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-    *t++ = 0;
-  }
-  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-    int x[] = {25, 17};
-    const int *foo = &x[0];
-    ++foo;
-  }
-  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-    typedef const int *iptr;
-    iptr p = 0;
-    ++p;
-  }
-  { /* AIX XL C 1.02.0.0 rejects this saying
-       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-    struct s { int j; const int *ap[3]; };
-    struct s *b; b->j = 5;
-  }
-  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-    const int foo = 10;
-  }
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_c_const=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_c_const=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
+if test "$with_krb5" = yes ; then
+  if test "${ac_cv_header_krb5_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for krb5.h" >&5
+echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
+if test "${ac_cv_header_krb5_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
+echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
 else
-  ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking krb5.h usability" >&5
+echo $ECHO_N "checking krb5.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#ifndef __cplusplus
-static $ac_kw int static_foo () {return 0; }
-$ac_kw int foo () {return 0; }
-#endif
-
+$ac_includes_default
+#include <krb5.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -9146,83 +7913,103 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_c_inline=$ac_kw; break
+  ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
+ac_header_compiler=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-done
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
-case $ac_cv_c_inline in
-  inline | yes) ;;
-  no)
-cat >>confdefs.h <<\_ACEOF
-#define inline
-_ACEOF
- ;;
-  *)  cat >>confdefs.h <<_ACEOF
-#define inline $ac_cv_c_inline
-_ACEOF
- ;;
-esac
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
 
-echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
-echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
-if test "${ac_cv_c_stringize+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+# Is the header present?
+echo "$as_me:$LINENO: checking krb5.h presence" >&5
+echo $ECHO_N "checking krb5.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#define x(y) #y
-
-char *s = x(teststring);
+#include <krb5.h>
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "#teststring" >/dev/null 2>&1; then
-  ac_cv_c_stringize=no
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
 else
-  ac_cv_c_stringize=yes
+  ac_cpp_err=yes
 fi
-rm -f conftest*
-
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
 fi
-echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
-echo "${ECHO_T}$ac_cv_c_stringize" >&6
-if test $ac_cv_c_stringize = yes; then
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRINGIZE 1
-_ACEOF
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: krb5.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: krb5.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: krb5.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: krb5.h: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: krb5.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for krb5.h" >&5
+echo $ECHO_N "checking for krb5.h... $ECHO_C" >&6
+if test "${ac_cv_header_krb5_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_krb5_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_krb5_h" >&5
+echo "${ECHO_T}$ac_cv_header_krb5_h" >&6
 
+fi
+if test $ac_cv_header_krb5_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: header file <krb5.h> is required for Kerberos 5" >&5
+echo "$as_me: error: header file <krb5.h> is required for Kerberos 5" >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
-echo "$as_me:$LINENO: checking for signed types" >&5
-echo $ECHO_N "checking for signed types... $ECHO_C" >&6
-if test "${pgac_cv_c_signed+set}" = set; then
+
+  if test "${ac_cv_header_com_err_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for com_err.h" >&5
+echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
+if test "${ac_cv_header_com_err_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking com_err.h usability" >&5
+echo $ECHO_N "checking com_err.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-signed char c; signed short s; signed int i;
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <com_err.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -9236,102 +8023,106 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  pgac_cv_c_signed=yes
+  ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-pgac_cv_c_signed=no
+ac_header_compiler=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
-echo "${ECHO_T}$pgac_cv_c_signed" >&6
-if test x"$pgac_cv_c_signed" = xno ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define signed
-_ACEOF
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
 
-fi
-echo "$as_me:$LINENO: checking for working volatile" >&5
-echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
-if test "${ac_cv_c_volatile+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+# Is the header present?
+echo "$as_me:$LINENO: checking com_err.h presence" >&5
+echo $ECHO_N "checking com_err.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-
-volatile int x;
-int * volatile y;
-  ;
-  return 0;
-}
+#include <com_err.h>
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_c_volatile=yes
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_c_volatile=no
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: com_err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: com_err.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: com_err.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: com_err.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: com_err.h: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: com_err.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: com_err.h: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for com_err.h" >&5
+echo $ECHO_N "checking for com_err.h... $ECHO_C" >&6
+if test "${ac_cv_header_com_err_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_com_err_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_com_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_com_err_h" >&6
+
+fi
+if test $ac_cv_header_com_err_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: header file <com_err.h> is required for Kerberos 5" >&5
+echo "$as_me: error: header file <com_err.h> is required for Kerberos 5" >&2;}
+   { (exit 1); exit 1; }; }
 fi
-echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
-echo "${ECHO_T}$ac_cv_c_volatile" >&6
-if test $ac_cv_c_volatile = no; then
 
-cat >>confdefs.h <<\_ACEOF
-#define volatile
-_ACEOF
 
 fi
 
-echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
-echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
-if test "${ac_cv_struct_tm+set}" = set; then
+if test "$with_openssl" = yes ; then
+  if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
+echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
+if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
+echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
+echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <sys/types.h>
-#include <time.h>
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-struct tm *tp; tp->tm_sec;
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <openssl/ssl.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -9345,51 +8136,103 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_struct_tm=time.h
+  ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_struct_tm=sys/time.h
+ac_header_compiler=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
-echo "${ECHO_T}$ac_cv_struct_tm" >&6
-if test $ac_cv_struct_tm = sys/time.h; then
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
 
-cat >>confdefs.h <<\_ACEOF
-#define TM_IN_SYS_TIME 1
+# Is the header present?
+echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
+echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <openssl/ssl.h>
 _ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
+echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
+if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_openssl_ssl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
+echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
 
+fi
+if test $ac_cv_header_openssl_ssl_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: header file <openssl/ssl.h> is required for OpenSSL" >&5
+echo "$as_me: error: header file <openssl/ssl.h> is required for OpenSSL" >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
-echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
-echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
-if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
+
+  if test "${ac_cv_header_openssl_err_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for openssl/err.h" >&5
+echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
+if test "${ac_cv_header_openssl_err_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking openssl/err.h usability" >&5
+echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <sys/types.h>
-#include <$ac_cv_struct_tm>
-
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-static struct tm ac_aggr;
-if (ac_aggr.tm_zone)
-return 0;
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <openssl/err.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -9403,118 +8246,106 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_member_struct_tm_tm_zone=yes
+  ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_member_struct_tm_tm_zone=no
+ac_header_compiler=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
-echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
-if test $ac_cv_member_struct_tm_tm_zone = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_TM_TM_ZONE 1
-_ACEOF
-
-
-fi
-
-if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TM_ZONE 1
-_ACEOF
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
 
-else
-  echo "$as_me:$LINENO: checking for tzname" >&5
-echo $ECHO_N "checking for tzname... $ECHO_C" >&6
-if test "${ac_cv_var_tzname+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+# Is the header present?
+echo "$as_me:$LINENO: checking openssl/err.h presence" >&5
+echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <time.h>
-#ifndef tzname /* For SGI.  */
-extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
-#endif
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-atoi(*tzname);
-  ;
-  return 0;
-}
+#include <openssl/err.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_var_tzname=yes
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openssl/err.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: openssl/err.h: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for openssl/err.h" >&5
+echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6
+if test "${ac_cv_header_openssl_err_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_var_tzname=no
+  ac_cv_header_openssl_err_h=$ac_header_preproc
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5
+echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6
+
+fi
+if test $ac_cv_header_openssl_err_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: header file <openssl/err.h> is required for OpenSSL" >&5
+echo "$as_me: error: header file <openssl/err.h> is required for OpenSSL" >&2;}
+   { (exit 1); exit 1; }; }
 fi
-echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
-echo "${ECHO_T}$ac_cv_var_tzname" >&6
-  if test $ac_cv_var_tzname = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TZNAME 1
-_ACEOF
 
-  fi
 fi
 
-echo "$as_me:$LINENO: checking for union semun" >&5
-echo $ECHO_N "checking for union semun... $ECHO_C" >&6
-if test "${ac_cv_type_union_semun+set}" = set; then
+if test "$with_pam" = yes ; then
+  if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5
+echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6
+if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5
+echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5
+echo $ECHO_N "checking security/pam_appl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <sys/types.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-if ((union semun *) 0)
-  return 0;
-if (sizeof (union semun))
-  return 0;
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <security/pam_appl.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -9528,99 +8359,102 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_type_union_semun=yes
+  ac_header_compiler=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_type_union_semun=no
+ac_header_compiler=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
-echo "${ECHO_T}$ac_cv_type_union_semun" >&6
-if test $ac_cv_type_union_semun = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UNION_SEMUN 1
-_ACEOF
-
-
-fi
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
 
-echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
-echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
-if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+# Is the header present?
+echo "$as_me:$LINENO: checking security/pam_appl.h presence" >&5
+echo $ECHO_N "checking security/pam_appl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <sys/types.h>
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
-
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-if ((struct sockaddr_un *) 0)
-  return 0;
-if (sizeof (struct sockaddr_un))
-  return 0;
-  ;
-  return 0;
-}
+#include <security/pam_appl.h>
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
   ac_status=$?
+  egrep -v '^ *\+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_struct_sockaddr_un=yes
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_type_struct_sockaddr_un=no
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5
+echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6
+if test "${ac_cv_header_security_pam_appl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_security_pam_appl_h=$ac_header_preproc
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
-echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
-if test $ac_cv_type_struct_sockaddr_un = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5
+echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKADDR_UN 1
-_ACEOF
+fi
+if test $ac_cv_header_security_pam_appl_h = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: header file <security/pam_appl.h> is required for PAM" >&5
+echo "$as_me: error: header file <security/pam_appl.h> is required for PAM" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
 
 fi
 
 
-echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
-echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
-if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
+##
+## Types, structures, compiler characteristics
+##
+
+
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/ucred.h>
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -9628,13 +8462,56 @@ else
 #  endif
    int F77_DUMMY_MAIN() { return 1; }
 #endif
-int
-main ()
-{
-if ((struct cmsgcred *) 0)
-  return 0;
-if (sizeof (struct cmsgcred))
-  return 0;
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this.  */
+  typedef int charset[2];
+  const charset x;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *ccp;
+  char **p;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  ccp = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++ccp;
+  p = (char**) ccp;
+  ccp = (char const *const *) p;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; };
+    struct s *b; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+  }
+#endif
+
   ;
   return 0;
 }
@@ -9651,52 +8528,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_type_struct_cmsgcred=yes
+  ac_cv_c_const=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_type_struct_cmsgcred=no
+ac_cv_c_const=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
-echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
-if test $ac_cv_type_struct_cmsgcred = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_CMSGCRED 1
+cat >>confdefs.h <<\_ACEOF
+#define const
 _ACEOF
 
-
 fi
-echo "$as_me:$LINENO: checking for struct fcred" >&5
-echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
-if test "${ac_cv_type_struct_fcred+set}" = set; then
+
+echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6
+if test "${ac_cv_c_inline+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/ucred.h>
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
+#ifndef __cplusplus
+static $ac_kw int static_foo () {return 0; }
+$ac_kw int foo () {return 0; }
 #endif
-int
-main ()
-{
-if ((struct fcred *) 0)
-  return 0;
-if (sizeof (struct fcred))
-  return 0;
-  ;
-  return 0;
-}
+
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -9710,35 +8574,69 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_type_struct_fcred=yes
+  ac_cv_c_inline=$ac_kw; break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_type_struct_fcred=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
+done
+
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
-echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
-if test $ac_cv_type_struct_fcred = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$ac_cv_c_inline" >&6
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  no)
+cat >>confdefs.h <<\_ACEOF
+#define inline
+_ACEOF
+ ;;
+  *)  cat >>confdefs.h <<_ACEOF
+#define inline $ac_cv_c_inline
+_ACEOF
+ ;;
+esac
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_FCRED 1
+echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
+echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
+if test "${ac_cv_c_stringize+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#define x(y) #y
+
+char *s = x(teststring);
 _ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "#teststring" >/dev/null 2>&1; then
+  ac_cv_c_stringize=no
+else
+  ac_cv_c_stringize=yes
+fi
+rm -f conftest*
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
+echo "${ECHO_T}$ac_cv_c_stringize" >&6
+if test $ac_cv_c_stringize = yes; then
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRINGIZE 1
+_ACEOF
 
 fi
-echo "$as_me:$LINENO: checking for struct sockcred" >&5
-echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
-if test "${ac_cv_type_struct_sockcred+set}" = set; then
+
+echo "$as_me:$LINENO: checking for signed types" >&5
+echo $ECHO_N "checking for signed types... $ECHO_C" >&6
+if test "${pgac_cv_c_signed+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/ucred.h>
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -9749,10 +8647,7 @@ else
 int
 main ()
 {
-if ((struct sockcred *) 0)
-  return 0;
-if (sizeof (struct sockcred))
-  return 0;
+signed char c; signed short s; signed int i;
   ;
   return 0;
 }
@@ -9769,39 +8664,31 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_type_struct_sockcred=yes
+  pgac_cv_c_signed=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_type_struct_sockcred=no
+pgac_cv_c_signed=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
-echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
-if test $ac_cv_type_struct_sockcred = yes; then
+echo "$as_me:$LINENO: result: $pgac_cv_c_signed" >&5
+echo "${ECHO_T}$pgac_cv_c_signed" >&6
+if test x"$pgac_cv_c_signed" = xno ; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_SOCKCRED 1
+cat >>confdefs.h <<\_ACEOF
+#define signed
 _ACEOF
 
-
 fi
-
-
-if test "$with_zlib" = yes; then
-  # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
-  # did not).  While we could work around the lack of z_streamp, it
-  # seems unwise to encourage people to use such old zlib versions...
-  echo "$as_me:$LINENO: checking for z_streamp" >&5
-echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
-if test "${ac_cv_type_z_streamp+set}" = set; then
+echo "$as_me:$LINENO: checking for working volatile" >&5
+echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
+if test "${ac_cv_c_volatile+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <zlib.h>
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -9812,10 +8699,9 @@ else
 int
 main ()
 {
-if ((z_streamp *) 0)
-  return 0;
-if (sizeof (z_streamp))
-  return 0;
+
+volatile int x;
+int * volatile y;
   ;
   return 0;
 }
@@ -9832,39 +8718,34 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_type_z_streamp=yes
+  ac_cv_c_volatile=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_type_z_streamp=no
+ac_cv_c_volatile=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
-echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
-if test $ac_cv_type_z_streamp = yes; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: zlib version is too old
-Use --without-zlib to disable zlib support." >&5
-echo "$as_me: error: zlib version is too old
-Use --without-zlib to disable zlib support." >&2;}
-   { (exit 1); exit 1; }; }
-fi
+echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
+echo "${ECHO_T}$ac_cv_c_volatile" >&6
+if test $ac_cv_c_volatile = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define volatile
+_ACEOF
 
 fi
 
-if test "$with_krb5" = yes; then
-# Check for differences between MIT and Heimdal (KTH) releases
-  echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
-echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
-if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
+echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
+if test "${ac_cv_struct_tm+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <krb5.h>
+#include <sys/types.h>
+#include <time.h>
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -9875,9 +8756,7 @@ else
 int
 main ()
 {
-static krb5_ticket ac_aggr;
-if (ac_aggr.enc_part2)
-return 0;
+struct tm *tp; tp->tm_sec;
   ;
   return 0;
 }
@@ -9894,33 +8773,35 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_member_krb5_ticket_enc_part2=yes
+  ac_cv_struct_tm=time.h
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_member_krb5_ticket_enc_part2=no
+ac_cv_struct_tm=sys/time.h
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
-echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
-if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+echo "${ECHO_T}$ac_cv_struct_tm" >&6
+if test $ac_cv_struct_tm = sys/time.h; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_KRB5_TICKET_ENC_PART2 1
+cat >>confdefs.h <<\_ACEOF
+#define TM_IN_SYS_TIME 1
 _ACEOF
 
+fi
 
-else
-  echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
-echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
-if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
+echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
+echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
+if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <krb5.h>
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -9931,8 +8812,8 @@ else
 int
 main ()
 {
-static krb5_ticket ac_aggr;
-if (ac_aggr.client)
+static struct tm ac_aggr;
+if (ac_aggr.tm_zone)
 return 0;
   ;
   return 0;
@@ -9950,40 +8831,44 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_member_krb5_ticket_client=yes
+  ac_cv_member_struct_tm_tm_zone=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_member_krb5_ticket_client=no
+ac_cv_member_struct_tm_tm_zone=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
-echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
-if test $ac_cv_member_krb5_ticket_client = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
+echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
+if test $ac_cv_member_struct_tm_tm_zone = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_KRB5_TICKET_CLIENT 1
+#define HAVE_STRUCT_TM_TM_ZONE 1
 _ACEOF
 
 
-else
-  { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
-echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
-   { (exit 1); exit 1; }; }
 fi
 
-fi
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
 
-  echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
-echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
-if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TM_ZONE 1
+_ACEOF
+
+else
+  echo "$as_me:$LINENO: checking for tzname" >&5
+echo $ECHO_N "checking for tzname... $ECHO_C" >&6
+if test "${ac_cv_var_tzname+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <krb5.h>
+#include <time.h>
+#ifndef tzname /* For SGI.  */
+extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
+#endif
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -9994,52 +8879,53 @@ else
 int
 main ()
 {
-static krb5_error ac_aggr;
-if (ac_aggr.text.data)
-return 0;
+atoi(*tzname);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+         { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_member_krb5_error_text_data=yes
+  ac_cv_var_tzname=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_member_krb5_error_text_data=no
+ac_cv_var_tzname=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
-echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
-if test $ac_cv_member_krb5_error_text_data = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
+echo "${ECHO_T}$ac_cv_var_tzname" >&6
+  if test $ac_cv_var_tzname = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_KRB5_ERROR_TEXT_DATA 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TZNAME 1
 _ACEOF
 
+  fi
+fi
 
-else
-  echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
-echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
-if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
+echo "$as_me:$LINENO: checking for union semun" >&5
+echo $ECHO_N "checking for union semun... $ECHO_C" >&6
+if test "${ac_cv_type_union_semun+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <krb5.h>
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/sem.h>
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -10050,9 +8936,10 @@ else
 int
 main ()
 {
-static krb5_error ac_aggr;
-if (ac_aggr.e_data)
-return 0;
+if ((union semun *) 0)
+  return 0;
+if (sizeof (union semun))
+  return 0;
   ;
   return 0;
 }
@@ -10069,42 +8956,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_member_krb5_error_e_data=yes
+  ac_cv_type_union_semun=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_member_krb5_error_e_data=no
+ac_cv_type_union_semun=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
-echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
-if test $ac_cv_member_krb5_error_e_data = yes; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
-echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
-   { (exit 1); exit 1; }; }
-fi
+echo "$as_me:$LINENO: result: $ac_cv_type_union_semun" >&5
+echo "${ECHO_T}$ac_cv_type_union_semun" >&6
+if test $ac_cv_type_union_semun = yes; then
 
-fi
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UNION_SEMUN 1
+_ACEOF
 
-fi
 
+fi
 
-##
-## Functions, global variables
-##
-echo "$as_me:$LINENO: checking for int timezone" >&5
-echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
-if test "${pgac_cv_var_int_timezone+set}" = set; then
+echo "$as_me:$LINENO: checking for struct sockaddr_un" >&5
+echo $ECHO_N "checking for struct sockaddr_un... $ECHO_C" >&6
+if test "${ac_cv_type_struct_sockaddr_un+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <time.h>
-int res;
+#include <sys/types.h>
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
+
+
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -10114,64 +8998,58 @@ int res;
 int
 main ()
 {
-res = timezone / 60;
+if ((struct sockaddr_un *) 0)
+  return 0;
+if (sizeof (struct sockaddr_un))
+  return 0;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+         { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  pgac_cv_var_int_timezone=yes
+  ac_cv_type_struct_sockaddr_un=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-pgac_cv_var_int_timezone=no
+ac_cv_type_struct_sockaddr_un=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
-echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
-if test x"$pgac_cv_var_int_timezone" = xyes ; then
+echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_un" >&5
+echo "${ECHO_T}$ac_cv_type_struct_sockaddr_un" >&6
+if test $ac_cv_type_struct_sockaddr_un = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INT_TIMEZONE
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_SOCKADDR_UN 1
 _ACEOF
 
+
 fi
-echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
-echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
- if test "${ac_cv_func_accept_arg1+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-   if test "${ac_cv_func_accept_arg2+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-    if test "${ac_cv_func_accept_arg3+set}" = set; then
+
+
+echo "$as_me:$LINENO: checking for struct cmsgcred" >&5
+echo $ECHO_N "checking for struct cmsgcred... $ECHO_C" >&6
+if test "${ac_cv_type_struct_cmsgcred+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-     for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
-     for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
-      for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
-       cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
+#include <sys/param.h>
 #include <sys/socket.h>
-#endif
-extern int accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
+#include <sys/ucred.h>
+
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -10181,7 +9059,10 @@ extern int accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func
 int
 main ()
 {
-
+if ((struct cmsgcred *) 0)
+  return 0;
+if (sizeof (struct cmsgcred))
+  return 0;
   ;
   return 0;
 }
@@ -10198,57 +9079,36 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_not_found=no; break 3
+  ac_cv_type_struct_cmsgcred=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_not_found=yes
+ac_cv_type_struct_cmsgcred=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-      done
-     done
-    done
-    if test "$ac_not_found" = yes; then
-      { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
-echo "$as_me: error: could not determine argument types" >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-    if test "$ac_cv_func_accept_arg3" = "void"; then
-      ac_cv_func_accept_arg3=int
-    fi
-
-fi
-
-fi
-
 fi
- echo "$as_me:$LINENO: result: $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&5
-echo "${ECHO_T}$ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
-
-cat >>confdefs.h <<_ACEOF
-#define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
-_ACEOF
-
+echo "$as_me:$LINENO: result: $ac_cv_type_struct_cmsgcred" >&5
+echo "${ECHO_T}$ac_cv_type_struct_cmsgcred" >&6
+if test $ac_cv_type_struct_cmsgcred = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
+#define HAVE_STRUCT_CMSGCRED 1
 _ACEOF
 
 
-echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
-echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
-if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
+fi
+echo "$as_me:$LINENO: checking for struct fcred" >&5
+echo $ECHO_N "checking for struct fcred... $ECHO_C" >&6
+if test "${ac_cv_type_struct_fcred+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <sys/time.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <sys/ucred.h>
+
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -10258,9 +9118,10 @@ else
 int
 main ()
 {
-struct timeval *tp;
-struct timezone *tzp;
-gettimeofday(tp,tzp);
+if ((struct fcred *) 0)
+  return 0;
+if (sizeof (struct fcred))
+  return 0;
   ;
   return 0;
 }
@@ -10277,109 +9138,98 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  pgac_cv_func_gettimeofday_1arg=no
+  ac_cv_type_struct_fcred=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-pgac_cv_func_gettimeofday_1arg=yes
+ac_cv_type_struct_fcred=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
-echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
-if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
+echo "$as_me:$LINENO: result: $ac_cv_type_struct_fcred" >&5
+echo "${ECHO_T}$ac_cv_type_struct_fcred" >&6
+if test $ac_cv_type_struct_fcred = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define GETTIMEOFDAY_1ARG
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_FCRED 1
 _ACEOF
 
-fi
 
-# SunOS doesn't handle negative byte comparisons properly with +/- return
-echo "$as_me:$LINENO: checking for 8-bit clean memcmp" >&5
-echo $ECHO_N "checking for 8-bit clean memcmp... $ECHO_C" >&6
-if test "${pgac_cv_func_memcmp_clean+set}" = set; then
+fi
+echo "$as_me:$LINENO: checking for struct sockcred" >&5
+echo $ECHO_N "checking for struct sockcred... $ECHO_C" >&6
+if test "${ac_cv_type_struct_sockcred+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  pgac_cv_func_memcmp_clean=no
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <sys/ucred.h>
 
-main()
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
 {
-  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
-  exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
+if ((struct sockcred *) 0)
+  return 0;
+if (sizeof (struct sockcred))
+  return 0;
+  ;
+  return 0;
 }
-
 _ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  pgac_cv_func_memcmp_clean=yes
+  ac_cv_type_struct_sockcred=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-( exit $ac_status )
-pgac_cv_func_memcmp_clean=no
-fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+ac_cv_type_struct_sockcred=no
 fi
-echo "$as_me:$LINENO: result: $pgac_cv_func_memcmp_clean" >&5
-echo "${ECHO_T}$pgac_cv_func_memcmp_clean" >&6
-if test $pgac_cv_func_memcmp_clean = no ; then
-  MEMCMP=memcmp.o
-else
-  MEMCMP=
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
+echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockcred" >&5
+echo "${ECHO_T}$ac_cv_type_struct_sockcred" >&6
+if test $ac_cv_type_struct_sockcred = yes; then
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_SOCKCRED 1
+_ACEOF
 
 
+fi
 
 
-
-
-
-
-
-
-
-
-
-for ac_func in cbrt fcvt getopt_long memmove pstat setproctitle setsid sigprocmask sysconf waitpid dlopen fdatasync
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+if test "$with_zlib" = yes; then
+  # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
+  # did not).  While we could work around the lack of z_streamp, it
+  # seems unwise to encourage people to use such old zlib versions...
+  echo "$as_me:$LINENO: checking for z_streamp" >&5
+echo $ECHO_N "checking for z_streamp... $ECHO_C" >&6
+if test "${ac_cv_type_z_streamp+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-char (*f) ();
+#include <zlib.h>
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -10390,59 +9240,59 @@ char (*f) ();
 int
 main ()
 {
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
-#endif
-
+if ((z_streamp *) 0)
+  return 0;
+if (sizeof (z_streamp))
+  return 0;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+         { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+  ac_cv_type_z_streamp=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_type_z_streamp=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
+echo "$as_me:$LINENO: result: $ac_cv_type_z_streamp" >&5
+echo "${ECHO_T}$ac_cv_type_z_streamp" >&6
+if test $ac_cv_type_z_streamp = yes; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: zlib version is too old
+Use --without-zlib to disable zlib support." >&5
+echo "$as_me: error: zlib version is too old
+Use --without-zlib to disable zlib support." >&2;}
+   { (exit 1); exit 1; }; }
 fi
-done
 
+fi
 
-echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
-echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_fdatasync+set}" = set; then
+if test "$with_krb5" = yes; then
+# Check for differences between MIT and Heimdal (KTH) releases
+  echo "$as_me:$LINENO: checking for krb5_ticket.enc_part2" >&5
+echo $ECHO_N "checking for krb5_ticket.enc_part2... $ECHO_C" >&6
+if test "${ac_cv_member_krb5_ticket_enc_part2+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <unistd.h>
+#include <krb5.h>
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -10453,10 +9303,9 @@ else
 int
 main ()
 {
-#ifndef fdatasync
-  char *p = (char *) fdatasync;
-#endif
-
+static krb5_ticket ac_aggr;
+if (ac_aggr.enc_part2)
+return 0;
   ;
   return 0;
 }
@@ -10473,43 +9322,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_have_decl_fdatasync=yes
+  ac_cv_member_krb5_ticket_enc_part2=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_have_decl_fdatasync=no
+ac_cv_member_krb5_ticket_enc_part2=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
-echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
-if test $ac_cv_have_decl_fdatasync = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_enc_part2" >&5
+echo "${ECHO_T}$ac_cv_member_krb5_ticket_enc_part2" >&6
+if test $ac_cv_member_krb5_ticket_enc_part2 = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FDATASYNC 1
+#define HAVE_KRB5_TICKET_ENC_PART2 1
 _ACEOF
 
 
 else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FDATASYNC 0
-_ACEOF
-
-
-fi
-
-
-
-echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
-echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
-if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
+  echo "$as_me:$LINENO: checking for krb5_ticket.client" >&5
+echo $ECHO_N "checking for krb5_ticket.client... $ECHO_C" >&6
+if test "${ac_cv_member_krb5_ticket_client+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <machine/vmparam.h>
-#include <sys/exec.h>
+#include <krb5.h>
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -10520,72 +9359,59 @@ else
 int
 main ()
 {
-PS_STRINGS->ps_nargvstr = 1;
-PS_STRINGS->ps_argvstr = "foo";
+static krb5_ticket ac_aggr;
+if (ac_aggr.client)
+return 0;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+         { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  pgac_cv_var_PS_STRINGS=yes
+  ac_cv_member_krb5_ticket_client=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-pgac_cv_var_PS_STRINGS=no
+ac_cv_member_krb5_ticket_client=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
-echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
-if test "$pgac_cv_var_PS_STRINGS" = yes ; then
+echo "$as_me:$LINENO: result: $ac_cv_member_krb5_ticket_client" >&5
+echo "${ECHO_T}$ac_cv_member_krb5_ticket_client" >&6
+if test $ac_cv_member_krb5_ticket_client = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PS_STRINGS
+cat >>confdefs.h <<_ACEOF
+#define HAVE_KRB5_TICKET_CLIENT 1
 _ACEOF
 
-fi
-
 
-# We use our snprintf.c emulation if either snprintf() or vsnprintf()
-# is missing.  Yes, there are machines that have only one.  We may
-# also decide to use snprintf.c if snprintf() is present but does not
-# have working "long long int" support -- see below.
+else
+  { { echo "$as_me:$LINENO: error: could not determine how to get client name from Kerberos 5 ticket" >&5
+echo "$as_me: error: could not determine how to get client name from Kerberos 5 ticket" >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
-SNPRINTF=''
+fi
 
-for ac_func in snprintf
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for krb5_error.text.data" >&5
+echo $ECHO_N "checking for krb5_error.text.data... $ECHO_C" >&6
+if test "${ac_cv_member_krb5_error_text_data+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-char (*f) ();
+#include <krb5.h>
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -10596,74 +9422,52 @@ char (*f) ();
 int
 main ()
 {
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
-#endif
-
+static krb5_error ac_aggr;
+if (ac_aggr.text.data)
+return 0;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+         { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+  ac_cv_member_krb5_error_text_data=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ac_cv_member_krb5_error_text_data=no
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
-  SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o'
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-done
-
+echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text_data" >&5
+echo "${ECHO_T}$ac_cv_member_krb5_error_text_data" >&6
+if test $ac_cv_member_krb5_error_text_data = yes; then
 
-for ac_func in vsnprintf
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+cat >>confdefs.h <<_ACEOF
+#define HAVE_KRB5_ERROR_TEXT_DATA 1
+_ACEOF
+
+
+else
+  echo "$as_me:$LINENO: checking for krb5_error.e_data" >&5
+echo $ECHO_N "checking for krb5_error.e_data... $ECHO_C" >&6
+if test "${ac_cv_member_krb5_error_e_data+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-char (*f) ();
+#include <krb5.h>
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -10674,68 +9478,67 @@ char (*f) ();
 int
 main ()
 {
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
-#endif
-
+static krb5_error ac_aggr;
+if (ac_aggr.e_data)
+return 0;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+         { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+  ac_cv_member_krb5_error_e_data=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_member_krb5_error_e_data=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_data" >&5
+echo "${ECHO_T}$ac_cv_member_krb5_error_e_data" >&6
+if test $ac_cv_member_krb5_error_e_data = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_KRB5_ERROR_E_DATA 1
 _ACEOF
 
+
 else
-  SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o'
+  { { echo "$as_me:$LINENO: error: could not determine how to extract Kerberos 5 error messages" >&5
+echo "$as_me: error: could not determine how to extract Kerberos 5 error messages" >&2;}
+   { (exit 1); exit 1; }; }
 fi
-done
 
+fi
 
+fi
 
 
-# Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
-# include/c.h will provide declarations.  Note this is a separate test
-# from whether the functions exist in the C library --- there are
-# systems that have the functions but don't bother to declare them :-(
+##
+## Functions, global variables
+##
 
-echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
-echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_snprintf+set}" = set; then
+echo "$as_me:$LINENO: checking for int timezone" >&5
+echo $ECHO_N "checking for int timezone... $ECHO_C" >&6
+if test "${pgac_cv_var_int_timezone+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-$ac_includes_default
+#include <time.h>
+int res;
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -10745,59 +9548,64 @@ $ac_includes_default
 int
 main ()
 {
-#ifndef snprintf
-  char *p = (char *) snprintf;
-#endif
-
+res = timezone / 60;
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
+         { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_have_decl_snprintf=yes
+  pgac_cv_var_int_timezone=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_have_decl_snprintf=no
+pgac_cv_var_int_timezone=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
-echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
-if test $ac_cv_have_decl_snprintf = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SNPRINTF 1
-_ACEOF
-
+echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
+echo "${ECHO_T}$pgac_cv_var_int_timezone" >&6
+if test x"$pgac_cv_var_int_timezone" = xyes ; then
 
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SNPRINTF 0
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INT_TIMEZONE
 _ACEOF
 
-
 fi
-echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
-echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
-if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
+echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
+echo $ECHO_N "checking types of arguments for accept()... $ECHO_C" >&6
+ if test "${ac_cv_func_accept_arg1+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+   if test "${ac_cv_func_accept_arg2+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+    if test "${ac_cv_func_accept_arg3+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+     for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
+     for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
+      for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
+       cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-$ac_includes_default
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+extern int accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -10807,9 +9615,6 @@ $ac_includes_default
 int
 main ()
 {
-#ifndef vsnprintf
-  char *p = (char *) vsnprintf;
-#endif
 
   ;
   return 0;
@@ -10827,45 +9632,57 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_have_decl_vsnprintf=yes
+  ac_not_found=no; break 3
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_have_decl_vsnprintf=no
+ac_not_found=yes
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
+      done
+     done
+    done
+    if test "$ac_not_found" = yes; then
+      { { echo "$as_me:$LINENO: error: could not determine argument types" >&5
+echo "$as_me: error: could not determine argument types" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    if test "$ac_cv_func_accept_arg3" = "void"; then
+      ac_cv_func_accept_arg3=int
+    fi
+
 fi
-echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
-echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
-if test $ac_cv_have_decl_vsnprintf = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_VSNPRINTF 1
-_ACEOF
+fi
 
+fi
+ echo "$as_me:$LINENO: result: $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&5
+echo "${ECHO_T}$ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6
 
-else
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_VSNPRINTF 0
+cat >>confdefs.h <<_ACEOF
+#define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
 _ACEOF
 
 
-fi
+cat >>confdefs.h <<_ACEOF
+#define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
+_ACEOF
 
 
+cat >>confdefs.h <<_ACEOF
+#define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
+_ACEOF
 
 
-# do this one the hard way in case isinf() is a macro
-echo "$as_me:$LINENO: checking for isinf" >&5
-echo $ECHO_N "checking for isinf... $ECHO_C" >&6
-if test "${ac_cv_func_isinf+set}" = set; then
+echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
+echo $ECHO_N "checking whether gettimeofday takes only one argument... $ECHO_C" >&6
+if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <math.h>
-
+#include <sys/time.h>
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -10875,70 +9692,55 @@ else
 int
 main ()
 {
-double x = 0.0; int res = isinf(x);
+struct timeval *tp;
+struct timezone *tzp;
+gettimeofday(tp,tzp);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+         { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_func_isinf=yes
+  pgac_cv_func_gettimeofday_1arg=no
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_func_isinf=no
+pgac_cv_func_gettimeofday_1arg=yes
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
-echo "${ECHO_T}$ac_cv_func_isinf" >&6
-
-if test $ac_cv_func_isinf = yes ; then
+echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
+echo "${ECHO_T}$pgac_cv_func_gettimeofday_1arg" >&6
+if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_ISINF 1
+#define GETTIMEOFDAY_1ARG
 _ACEOF
 
-  ISINF=
-else
-  ISINF='isinf.o'
-  # Look for a way to implement a substitute for isinf()
-
-
-
+fi
 
-for ac_func in fpclass fp_class fp_class_d class
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+# SunOS doesn't handle negative byte comparisons properly with +/- return
+echo "$as_me:$LINENO: checking for working memcmp" >&5
+echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6
+if test "${ac_cv_func_memcmp_working+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_memcmp_working=no
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-char (*f) ();
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -10949,55 +9751,76 @@ char (*f) ();
 int
 main ()
 {
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
-#endif
+
+  /* Some versions of memcmp are not 8-bit clean.  */
+  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
+  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
+    exit (1);
+
+  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
+     or more and with at least one buffer not starting on a 4-byte boundary.
+     William Lewis provided this test program.   */
+  {
+    char foo[21];
+    char bar[21];
+    int i;
+    for (i = 0; i < 4; i++)
+      {
+        char *a = foo + i;
+        char *b = bar + i;
+        strcpy (a, "--------01111111");
+        strcpy (b, "--------10000000");
+        if (memcmp (a, b, 16) >= 0)
+          exit (1);
+      }
+    exit (0);
+  }
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+  ac_cv_func_memcmp_working=yes
 else
-  echo "$as_me: failed program was:" >&5
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+( exit $ac_status )
+ac_cv_func_memcmp_working=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
- break
 fi
-done
+echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
+echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6
+test $ac_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.$ac_objext"
+
+
+
+
+
+
+
+
+
+
 
-fi
 
 
 
 
-for ac_func in getrusage
+for ac_func in cbrt fcvt getopt_long getpeereid memmove pstat setproctitle setsid sigprocmask sysconf waitpid dlopen fdatasync
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -11069,35 +9892,19 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
-else
-  GETRUSAGE='getrusage.o'
 fi
 done
 
 
-
-for ac_func in srandom
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
+echo $ECHO_N "checking whether fdatasync is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_fdatasync+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-char (*f) ();
+#include <unistd.h>
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -11108,75 +9915,63 @@ char (*f) ();
 int
 main ()
 {
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
+#ifndef fdatasync
+  char *p = (char *) fdatasync;
 #endif
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+         { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+  ac_cv_have_decl_fdatasync=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_have_decl_fdatasync=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fdatasync" >&6
+if test $ac_cv_have_decl_fdatasync = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FDATASYNC 1
 _ACEOF
 
+
 else
-  SRANDOM='srandom.o'
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FDATASYNC 0
+_ACEOF
+
+
 fi
-done
 
 
 
-for ac_func in gethostname
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
+echo $ECHO_N "checking for PS_STRINGS... $ECHO_C" >&6
+if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-char (*f) ();
+#include <machine/vmparam.h>
+#include <sys/exec.h>
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -11187,15 +9982,8 @@ char (*f) ();
 int
 main ()
 {
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
-#endif
-
+PS_STRINGS->ps_nargvstr = 1;
+PS_STRINGS->ps_argvstr = "foo";
   ;
   return 0;
 }
@@ -11212,29 +10000,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+  pgac_cv_var_PS_STRINGS=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+pgac_cv_var_PS_STRINGS=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
+echo "${ECHO_T}$pgac_cv_var_PS_STRINGS" >&6
+if test "$pgac_cv_var_PS_STRINGS" = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PS_STRINGS
 _ACEOF
 
-else
-  GETHOSTNAME='gethostname.o'
 fi
-done
 
 
+# We use our snprintf.c emulation if either snprintf() or vsnprintf()
+# is missing.  Yes, there are machines that have only one.  We may
+# also decide to use snprintf.c if snprintf() is present but does not
+# have working "long long int" support -- see below.
 
-for ac_func in random
+pgac_need_repl_snprintf=no
+
+for ac_func in snprintf
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -11307,13 +10099,12 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
 _ACEOF
 
 else
-  MISSING_RANDOM='random.o'
+  pgac_need_repl_snprintf=yes
 fi
 done
 
 
-
-for ac_func in inet_aton
+for ac_func in vsnprintf
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -11386,35 +10177,26 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
 _ACEOF
 
 else
-  INET_ATON='inet_aton.o'
+  pgac_need_repl_snprintf=yes
 fi
 done
 
 
 
-for ac_func in strerror
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+# Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
+# include/c.h will provide declarations.  Note this is a separate test
+# from whether the functions exist in the C library --- there are
+# systems that have the functions but don't bother to declare them :-(
+
+echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
+echo $ECHO_N "checking whether snprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_snprintf+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-char (*f) ();
-
+$ac_includes_default
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -11424,76 +10206,59 @@ char (*f) ();
 int
 main ()
 {
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
+#ifndef snprintf
+  char *p = (char *) snprintf;
 #endif
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+         { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+  ac_cv_have_decl_snprintf=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_have_decl_snprintf=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_snprintf" >&6
+if test $ac_cv_have_decl_snprintf = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF 1
 _ACEOF
 
-else
-  STRERROR='$(top_builddir)/src/backend/port/strerror.o'
-fi
-done
 
+else
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF 0
+_ACEOF
 
 
-for ac_func in strdup
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+fi
+echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
+echo $ECHO_N "checking whether vsnprintf is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-char (*f) ();
-
+$ac_includes_default
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -11503,75 +10268,64 @@ char (*f) ();
 int
 main ()
 {
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
+#ifndef vsnprintf
+  char *p = (char *) vsnprintf;
 #endif
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+         { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+  ac_cv_have_decl_vsnprintf=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_have_decl_vsnprintf=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
+echo "${ECHO_T}$ac_cv_have_decl_vsnprintf" >&6
+if test $ac_cv_have_decl_vsnprintf = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VSNPRINTF 1
 _ACEOF
 
+
 else
-  STRDUP='$(top_builddir)/src/utils/strdup.o'
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VSNPRINTF 0
+_ACEOF
+
+
 fi
-done
 
 
 
-for ac_func in strtol
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+
+# do this one the hard way in case isinf() is a macro
+echo "$as_me:$LINENO: checking for isinf" >&5
+echo $ECHO_N "checking for isinf... $ECHO_C" >&6
+if test "${ac_cv_func_isinf+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-char (*f) ();
+#include <math.h>
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -11582,15 +10336,7 @@ char (*f) ();
 int
 main ()
 {
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
-#endif
-
+double x = 0.0; int res = isinf(x);
   ;
   return 0;
 }
@@ -11607,29 +10353,31 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+  ac_cv_func_isinf=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_func_isinf=no
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
+echo "${ECHO_T}$ac_cv_func_isinf" >&6
+
+if test $ac_cv_func_isinf = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINF 1
 _ACEOF
 
 else
-  STRTOL='strtol.o'
-fi
-done
+  LIBOBJS="$LIBOBJS isinf.$ac_objext"
+  # Look for a way to implement a substitute for isinf()
+
 
 
 
-for ac_func in strtoul
+for ac_func in fpclass fp_class fp_class_d class
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -11700,15 +10448,24 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
   cat >>confdefs.h <<_ACEOF
 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
-
-else
-  STRTOUL='strtoul.o'
+ break
 fi
 done
 
+fi
+
+
+
+
+
 
 
-for ac_func in strcasecmp
+
+
+
+
+
+for ac_func in fseeko gethostname getrusage inet_aton random srandom strcasecmp strdup strerror strtol strtoul
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -11781,18 +10538,30 @@ if test `eval echo '${'$as_ac_var'}'` = yes; then
 _ACEOF
 
 else
-  STRCASECMP='strcasecmp.o'
+  LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
 fi
 done
 
 
 
+# BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
+# We override the previous test that said fseeko/ftello didn't exist
+# OS tests are also done in include/c.h and port/fseeko.c
+case $host_os in bsdi*|netbsd*)
+ac_cv_func_fseeko=yes
+esac
+
+# Solaris has a very slow qsort in certain cases, so we replace it.
+case $host_os in
+  solaris*) LIBOBJS="$LIBOBJS qsort.$ac_objext" ;;
+esac
+
 # On HPUX 9, rint() is not in regular libm.a but in /lib/pa1.1/libm.a;
 # this hackery with HPUXMATHLIB allows us to cope.
 HPUXMATHLIB=""
 case $host_cpu in
   hppa1.1)
-       if [ -r /lib/pa1.1/libm.a ] ; then
+       if test -r /lib/pa1.1/libm.a ; then
            HPUXMATHLIB="-L /lib/pa1.1 -lm"
        fi ;;
 esac
@@ -12299,59 +11068,205 @@ if test -z "$ac_cpp_err"; then
   ac_header_preproc=yes
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: syslog.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: syslog.h: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:$LINENO: checking for syslog.h" >&5
-echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
-if test "${ac_cv_header_syslog_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_syslog_h=$ac_header_preproc
+  cat conftest.$ac_ext >&5
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;};;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: syslog.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: syslog.h: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;};;
+esac
+echo "$as_me:$LINENO: checking for syslog.h" >&5
+echo $ECHO_N "checking for syslog.h... $ECHO_C" >&6
+if test "${ac_cv_header_syslog_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_syslog_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
+echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
+
+fi
+if test $ac_cv_header_syslog_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYSLOG 1
+_ACEOF
+
+fi
+
+
+fi
+
+
+echo "$as_me:$LINENO: checking for optreset" >&5
+echo $ECHO_N "checking for optreset... $ECHO_C" >&6
+if test "${pgac_cv_var_int_optreset+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <unistd.h>
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+extern int optreset; optreset = 1;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  pgac_cv_var_int_optreset=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+pgac_cv_var_int_optreset=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
+echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
+if test x"$pgac_cv_var_int_optreset" = x"yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INT_OPTRESET 1
+_ACEOF
+
+fi
+
+
+
+for ac_func in strtoll strtoq
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_var=yes"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
-echo "${ECHO_T}$ac_cv_header_syslog_h" >&6
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-if test $ac_cv_header_syslog_h = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYSLOG 1
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
-
+ break
 fi
+done
 
 
-fi
-
 
-echo "$as_me:$LINENO: checking for optreset" >&5
-echo $ECHO_N "checking for optreset... $ECHO_C" >&6
-if test "${pgac_cv_var_int_optreset+set}" = set; then
+for ac_func in strtoull strtouq
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <unistd.h>
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -12361,7 +11276,15 @@ else
 int
 main ()
 {
-extern int optreset; optreset = 1;
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
   ;
   return 0;
 }
@@ -12378,237 +11301,232 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  pgac_cv_var_int_optreset=yes
+  eval "$as_ac_var=yes"
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-pgac_cv_var_int_optreset=no
+eval "$as_ac_var=no"
 fi
 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
-echo "${ECHO_T}$pgac_cv_var_int_optreset" >&6
-if test x"$pgac_cv_var_int_optreset" = x"yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INT_OPTRESET 1
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
-
+ break
 fi
+done
 
 
-# This test makes sure that run tests work at all.  Sometimes a shared
-# library is found by the linker, but the runtime linker can't find it.
-# This check should come after all modifications of compiler or linker
-# variables, and before any other run tests.
-echo "$as_me:$LINENO: checking test program" >&5
-echo $ECHO_N "checking test program... $ECHO_C" >&6
-if test "$cross_compiling" = yes; then
-  echo "$as_me:$LINENO: result: cross-compiling" >&5
-echo "${ECHO_T}cross-compiling" >&6
+# Check for one of atexit() or on_exit()
+
+for ac_func in atexit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-int main() { return 0; }
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6
+  eval "$as_ac_var=yes"
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-( exit $ac_status )
-echo "$as_me:$LINENO: result: failed" >&5
-echo "${ECHO_T}failed" >&6
-{ { echo "$as_me:$LINENO: error:
-*** Could not execute a simple test program.  This may be a problem
-*** related to locating shared libraries.  Check the file 'config.log'
-*** for the exact reason." >&5
-echo "$as_me: error:
-*** Could not execute a simple test program.  This may be a problem
-*** related to locating shared libraries.  Check the file 'config.log'
-*** for the exact reason." >&2;}
-   { (exit 1); exit 1; }; }
+eval "$as_ac_var=no"
 fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
+else
 
-
-echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
-echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
-if test "${pgac_cv_type_long_int_64+set}" = set; then
+for ac_func in on_exit
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  pgac_cv_type_long_int_64=no
-{ echo "$as_me:$LINENO: WARNING: 64 bit arithmetic disabled when cross-compiling" >&5
-echo "$as_me: WARNING: 64 bit arithmetic disabled when cross-compiling" >&2;}
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-typedef long int int64;
-
-/*
- * These are globals to discourage the compiler from folding all the
- * arithmetic tests down to compile-time constants.
- */
-int64 a = 20000001;
-int64 b = 40000005;
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char $ac_func ();
+char (*f) ();
 
-int does_int64_work()
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
 {
-  int64 c,d;
-
-  if (sizeof(int64) != 8)
-    return 0;                  /* definitely not the right size */
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
 
-  /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
-  c = a * b;
-  d = (c + b) / b;
-  if (d != a+1)
-    return 0;
-  return 1;
-}
-main() {
-  exit(! does_int64_work());
+  ;
+  return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  pgac_cv_type_long_int_64=yes
+  eval "$as_ac_var=yes"
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-( exit $ac_status )
-pgac_cv_type_long_int_64=no
-fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+eval "$as_ac_var=no"
 fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
-echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
-
-HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
-if test x"$pgac_cv_type_long_int_64" = xyes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LONG_INT_64
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
+else
+  { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
+echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
+   { (exit 1); exit 1; }; }
 fi
+done
 
+fi
+done
 
-if test x"$HAVE_LONG_INT_64" = x"no" ; then
-  echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
-echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
-if test "${pgac_cv_type_long_long_int_64+set}" = set; then
+
+echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_largefile_source+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if test "$cross_compiling" = yes; then
-  pgac_cv_type_long_long_int_64=no
-{ echo "$as_me:$LINENO: WARNING: 64 bit arithmetic disabled when cross-compiling" >&5
-echo "$as_me: WARNING: 64 bit arithmetic disabled when cross-compiling" >&2;}
-else
+  while :; do
+  ac_cv_sys_largefile_source=no
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-typedef long long int int64;
-
-/*
- * These are globals to discourage the compiler from folding all the
- * arithmetic tests down to compile-time constants.
- */
-int64 a = 20000001;
-int64 b = 40000005;
-
-int does_int64_work()
+#include <stdio.h>
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
 {
-  int64 c,d;
-
-  if (sizeof(int64) != 8)
-    return 0;                  /* definitely not the right size */
-
-  /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
-  c = a * b;
-  d = (c + b) / b;
-  if (d != a+1)
-    return 0;
-  return 1;
-}
-main() {
-  exit(! does_int64_work());
+return !fseeko;
+  ;
+  return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  pgac_cv_type_long_long_int_64=yes
+  break
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+  echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-( exit $ac_status )
-pgac_cv_type_long_long_int_64=no
-fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
-echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
-
-HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
-if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LONG_LONG_INT_64
-_ACEOF
-
-fi
-
 fi
-
-
-
-if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
+rm -f conftest.$ac_objext conftest.$ac_ext
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-
-#define INT64CONST(x)  x##LL
-long long int foo = INT64CONST(0x1234567890123456);
-
+#define _LARGEFILE_SOURCE 1
+#include <stdio.h>
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -12618,7 +11536,7 @@ long long int foo = INT64CONST(0x1234567890123456);
 int
 main ()
 {
-
+return !fseeko;
   ;
   return 0;
 }
@@ -12635,59 +11553,98 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LL_CONSTANTS 1
-_ACEOF
-
+  ac_cv_sys_largefile_source=1; break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
+  break
+done
 fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
+if test "$ac_cv_sys_largefile_source" != no; then
 
+cat >>confdefs.h <<_ACEOF
+#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+_ACEOF
 
+fi
+rm -f conftest*
 
-if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then
-  if [ x$SNPRINTF = x ] ; then
-    echo "$as_me:$LINENO: checking whether snprintf handles 'long long int' as %lld" >&5
-echo $ECHO_N "checking whether snprintf handles 'long long int' as %lld... $ECHO_C" >&6
-    if test "$cross_compiling" = yes; then
-   echo "$as_me:$LINENO: result: assuming not on target machine" >&5
-echo "${ECHO_T}assuming not on target machine" >&6
-       # Force usage of our own snprintf, since we cannot test foreign snprintf
-       SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o'
-       INT64_FORMAT='"%lld"'
-
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+echo "$as_me:$LINENO: checking for fseeko" >&5
+echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
+if test "${ac_cv_func_fseeko+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
 #include <stdio.h>
-typedef long long int int64;
-#define INT64_FORMAT "%lld"
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+return fseeko && fseeko (stdin, 0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_fseeko=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_fseeko=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_fseeko" >&5
+echo "${ECHO_T}$ac_cv_func_fseeko" >&6
+if test $ac_cv_func_fseeko = yes; then
 
-int64 a = 20000001;
-int64 b = 40000005;
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FSEEKO 1
+_ACEOF
 
-int does_int64_snprintf_work()
-{
-  int64 c;
-  char buf[100];
+fi
 
-  if (sizeof(int64) != 8)
-    return 0;                  /* doesn't look like the right size */
 
-  c = a * b;
-  snprintf(buf, 100, INT64_FORMAT, c);
-  if (strcmp(buf, "800000140000005") != 0)
-    return 0;                  /* either multiply or snprintf is busted */
-  return 1;
-}
-main() {
-  exit(! does_int64_snprintf_work());
-}
+
+# This test makes sure that run tests work at all.  Sometimes a shared
+# library is found by the linker, but the runtime linker can't find it.
+# This check should come after all modifications of compiler or linker
+# variables, and before any other run tests.
+echo "$as_me:$LINENO: checking test program" >&5
+echo $ECHO_N "checking test program... $ECHO_C" >&6
+if test "$cross_compiling" = yes; then
+  echo "$as_me:$LINENO: result: cross-compiling" >&5
+echo "${ECHO_T}cross-compiling" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+int main() { return 0; }
 _ACEOF
 rm -f conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -12700,53 +11657,68 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-   echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-         INT64_FORMAT='"%lld"'
-
+  echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 ( exit $ac_status )
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-    echo "$as_me:$LINENO: checking whether snprintf handles 'long long int' as %qd" >&5
-echo $ECHO_N "checking whether snprintf handles 'long long int' as %qd... $ECHO_C" >&6
-    if test "$cross_compiling" = yes; then
-   echo "$as_me:$LINENO: result: assuming not on target machine" >&5
-echo "${ECHO_T}assuming not on target machine" >&6
-       # Force usage of our own snprintf, since we cannot test foreign snprintf
-       SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o'
-       INT64_FORMAT='"%lld"'
+echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6
+{ { echo "$as_me:$LINENO: error:
+*** Could not execute a simple test program.  This may be a problem
+*** related to locating shared libraries.  Check the file 'config.log'
+*** for the exact reason." >&5
+echo "$as_me: error:
+*** Could not execute a simple test program.  This may be a problem
+*** related to locating shared libraries.  Check the file 'config.log'
+*** for the exact reason." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
 
+echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
+echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6
+if test "${pgac_cv_type_long_int_64+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  pgac_cv_type_long_int_64=no
+{ echo "$as_me:$LINENO: WARNING: 64 bit arithmetic disabled when cross-compiling" >&5
+echo "$as_me: WARNING: 64 bit arithmetic disabled when cross-compiling" >&2;}
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <stdio.h>
-typedef long long int int64;
-#define INT64_FORMAT "%qd"
+typedef long int int64;
 
+/*
+ * These are globals to discourage the compiler from folding all the
+ * arithmetic tests down to compile-time constants.
+ */
 int64 a = 20000001;
 int64 b = 40000005;
 
-int does_int64_snprintf_work()
+int does_int64_work()
 {
-  int64 c;
-  char buf[100];
+  int64 c,d;
 
   if (sizeof(int64) != 8)
-    return 0;     /* doesn't look like the right size */
+    return 0;                  /* definitely not the right size */
 
+  /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
   c = a * b;
-  snprintf(buf, 100, INT64_FORMAT, c);
-  if (strcmp(buf, "800000140000005") != 0)
-    return 0;     /* either multiply or snprintf is busted */
+  d = (c + b) / b;
+  if (d != a+1)
+    return 0;
   return 1;
 }
 main() {
-  exit(! does_int64_snprintf_work());
+  exit(! does_int64_work());
 }
 _ACEOF
 rm -f conftest$ac_exeext
@@ -12760,144 +11732,116 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-   echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-    INT64_FORMAT='"%qd"'
-
+  pgac_cv_type_long_int_64=yes
 else
   echo "$as_me: program exited with status $ac_status" >&5
 echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
 ( exit $ac_status )
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-       # Force usage of our own snprintf, since system snprintf is broken
-       SNPRINTF='$(top_builddir)/src/backend/port/snprintf.o'
-       INT64_FORMAT='"%lld"'
-
-fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+pgac_cv_type_long_int_64=no
 fi
 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-  else
-    # here if we previously decided we needed to use our own snprintf
-    INT64_FORMAT='"%lld"'
-  fi
-else
-  # Here if we are not using 'long long int' at all
-  INT64_FORMAT='"%ld"'
 fi
+echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
+echo "${ECHO_T}$pgac_cv_type_long_int_64" >&6
 
+HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
+if test x"$pgac_cv_type_long_int_64" = xyes ; then
 
-cat >>confdefs.h <<_ACEOF
-#define INT64_FORMAT $INT64_FORMAT
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_INT_64
 _ACEOF
 
+fi
 
 
-
-
-for ac_func in strtoll strtoq
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+if test x"$HAVE_LONG_INT_64" = x"no" ; then
+  echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
+echo $ECHO_N "checking whether long long int is 64 bits... $ECHO_C" >&6
+if test "${pgac_cv_type_long_long_int_64+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  pgac_cv_type_long_long_int_64=no
+{ echo "$as_me:$LINENO: WARNING: 64 bit arithmetic disabled when cross-compiling" >&5
+echo "$as_me: WARNING: 64 bit arithmetic disabled when cross-compiling" >&2;}
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-char (*f) ();
+typedef long long int int64;
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
+/*
+ * These are globals to discourage the compiler from folding all the
+ * arithmetic tests down to compile-time constants.
+ */
+int64 a = 20000001;
+int64 b = 40000005;
+
+int does_int64_work()
 {
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
-#endif
+  int64 c,d;
 
-  ;
-  return 0;
+  if (sizeof(int64) != 8)
+    return 0;                  /* definitely not the right size */
+
+  /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
+  c = a * b;
+  d = (c + b) / b;
+  if (d != a+1)
+    return 0;
+  return 1;
+}
+main() {
+  exit(! does_int64_work());
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+  pgac_cv_type_long_long_int_64=yes
 else
-  echo "$as_me: failed program was:" >&5
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+( exit $ac_status )
+pgac_cv_type_long_long_int_64=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+fi
+echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
+echo "${ECHO_T}$pgac_cv_type_long_long_int_64" >&6
+
+HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
+if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_LONG_INT_64
 _ACEOF
- break
+
 fi
-done
 
+fi
 
 
-for ac_func in strtoull strtouq
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+
+if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-char (*f) ();
+
+#define INT64CONST(x)  x##LL
+long long int foo = INT64CONST(0x1234567890123456);
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -12908,208 +11852,187 @@ char (*f) ();
 int
 main ()
 {
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
-#endif
 
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+         { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LL_CONSTANTS 1
+_ACEOF
+
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
- break
+rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-done
 
 
-# Check for one of atexit() or on_exit()
 
-for ac_func in atexit
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
+  if test $pgac_need_repl_snprintf = no; then
+    echo "$as_me:$LINENO: checking whether snprintf handles 'long long int' as %lld" >&5
+echo $ECHO_N "checking whether snprintf handles 'long long int' as %lld... $ECHO_C" >&6
+    if test "$cross_compiling" = yes; then
+   echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
+echo "${ECHO_T}cannot test (not on host machine)" >&6
+       # Force usage of our own snprintf, since we cannot test foreign snprintf
+        pgac_need_repl_snprintf=yes
+       INT64_FORMAT='"%lld"'
+
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-char (*f) ();
+#include <stdio.h>
+typedef long long int int64;
+#define INT64_FORMAT "%lld"
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
+int64 a = 20000001;
+int64 b = 40000005;
+
+int does_int64_snprintf_work()
 {
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
-#endif
+  int64 c;
+  char buf[100];
 
-  ;
-  return 0;
+  if (sizeof(int64) != 8)
+    return 0;                  /* doesn't look like the right size */
+
+  c = a * b;
+  snprintf(buf, 100, INT64_FORMAT, c);
+  if (strcmp(buf, "800000140000005") != 0)
+    return 0;                  /* either multiply or snprintf is busted */
+  return 1;
+}
+main() {
+  exit(! does_int64_snprintf_work());
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+         INT64_FORMAT='"%lld"'
 
 else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+    echo "$as_me:$LINENO: checking whether snprintf handles 'long long int' as %qd" >&5
+echo $ECHO_N "checking whether snprintf handles 'long long int' as %qd... $ECHO_C" >&6
+    if test "$cross_compiling" = yes; then
+   echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
+echo "${ECHO_T}cannot test (not on host machine)" >&6
+       # Force usage of our own snprintf, since we cannot test foreign snprintf
+        pgac_need_repl_snprintf=yes
+       INT64_FORMAT='"%lld"'
 
-for ac_func in on_exit
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-char (*f) ();
+#include <stdio.h>
+typedef long long int int64;
+#define INT64_FORMAT "%qd"
 
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
+int64 a = 20000001;
+int64 b = 40000005;
+
+int does_int64_snprintf_work()
 {
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
-#endif
+  int64 c;
+  char buf[100];
 
-  ;
-  return 0;
+  if (sizeof(int64) != 8)
+    return 0;     /* doesn't look like the right size */
+
+  c = a * b;
+  snprintf(buf, 100, INT64_FORMAT, c);
+  if (strcmp(buf, "800000140000005") != 0)
+    return 0;     /* either multiply or snprintf is busted */
+  return 1;
+}
+main() {
+  exit(! does_int64_snprintf_work());
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -f conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+    INT64_FORMAT='"%qd"'
+
 else
-  echo "$as_me: failed program was:" >&5
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+( exit $ac_status )
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+       # Force usage of our own snprintf, since system snprintf is broken
+        pgac_need_repl_snprintf=yes
+       INT64_FORMAT='"%lld"'
+
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+  else
+    # here if we previously decided we needed to use our own snprintf
+    INT64_FORMAT='"%lld"'
+  fi
 else
-  { { echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
-echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
-   { (exit 1); exit 1; }; }
+  # Here if we are not using 'long long int' at all
+  INT64_FORMAT='"%ld"'
 fi
-done
 
-fi
-done
 
+cat >>confdefs.h <<_ACEOF
+#define INT64_FORMAT $INT64_FORMAT
+_ACEOF
+
+
+if test $pgac_need_repl_snprintf = yes; then
+  LIBOBJS="$LIBOBJS snprintf.$ac_objext"
+fi
 
 
 echo "$as_me:$LINENO: checking for unsigned long" >&5
@@ -15347,9 +14270,129 @@ else
 int
 main ()
 {
-if ((int8 *) 0)
+if ((int8 *) 0)
+  return 0;
+if (sizeof (int8))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_int8=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_int8=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
+echo "${ECHO_T}$ac_cv_type_int8" >&6
+if test $ac_cv_type_int8 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INT8 1
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking for uint8" >&5
+echo $ECHO_N "checking for uint8... $ECHO_C" >&6
+if test "${ac_cv_type_uint8+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#ifdef HAVE_SUPPORTDEFS_H
+#include <SupportDefs.h>
+#endif
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+if ((uint8 *) 0)
+  return 0;
+if (sizeof (uint8))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_uint8=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_uint8=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
+echo "${ECHO_T}$ac_cv_type_uint8" >&6
+if test $ac_cv_type_uint8 = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT8 1
+_ACEOF
+
+
+fi
+echo "$as_me:$LINENO: checking for int64" >&5
+echo $ECHO_N "checking for int64... $ECHO_C" >&6
+if test "${ac_cv_type_int64+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#ifdef HAVE_SUPPORTDEFS_H
+#include <SupportDefs.h>
+#endif
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+if ((int64 *) 0)
   return 0;
-if (sizeof (int8))
+if (sizeof (int64))
   return 0;
   ;
   return 0;
@@ -15367,27 +14410,27 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_type_int8=yes
+  ac_cv_type_int64=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_type_int8=no
+ac_cv_type_int64=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
-echo "${ECHO_T}$ac_cv_type_int8" >&6
-if test $ac_cv_type_int8 = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
+echo "${ECHO_T}$ac_cv_type_int64" >&6
+if test $ac_cv_type_int64 = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_INT8 1
+#define HAVE_INT64 1
 _ACEOF
 
 
 fi
-echo "$as_me:$LINENO: checking for uint8" >&5
-echo $ECHO_N "checking for uint8... $ECHO_C" >&6
-if test "${ac_cv_type_uint8+set}" = set; then
+echo "$as_me:$LINENO: checking for uint64" >&5
+echo $ECHO_N "checking for uint64... $ECHO_C" >&6
+if test "${ac_cv_type_uint64+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -15407,9 +14450,9 @@ else
 int
 main ()
 {
-if ((uint8 *) 0)
+if ((uint64 *) 0)
   return 0;
-if (sizeof (uint8))
+if (sizeof (uint64))
   return 0;
   ;
   return 0;
@@ -15427,36 +14470,37 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_type_uint8=yes
+  ac_cv_type_uint64=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_type_uint8=no
+ac_cv_type_uint64=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
-echo "${ECHO_T}$ac_cv_type_uint8" >&6
-if test $ac_cv_type_uint8 = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
+echo "${ECHO_T}$ac_cv_type_uint64" >&6
+if test $ac_cv_type_uint64 = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT8 1
+#define HAVE_UINT64 1
 _ACEOF
 
 
 fi
-echo "$as_me:$LINENO: checking for int64" >&5
-echo $ECHO_N "checking for int64... $ECHO_C" >&6
-if test "${ac_cv_type_int64+set}" = set; then
+
+
+# We also check for sig_atomic_t, which *should* be defined per ANSI
+# C, but is missing on some old platforms.
+echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
+echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
+if test "${ac_cv_type_sig_atomic_t+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <stdio.h>
-#ifdef HAVE_SUPPORTDEFS_H
-#include <SupportDefs.h>
-#endif
+#include <signal.h>
 
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
@@ -15467,9 +14511,9 @@ else
 int
 main ()
 {
-if ((int64 *) 0)
+if ((sig_atomic_t *) 0)
   return 0;
-if (sizeof (int64))
+if (sizeof (sig_atomic_t))
   return 0;
   ;
   return 0;
@@ -15487,37 +14531,116 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_type_int64=yes
+  ac_cv_type_sig_atomic_t=yes
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_type_int64=no
+ac_cv_type_sig_atomic_t=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
-echo "${ECHO_T}$ac_cv_type_int64" >&6
-if test $ac_cv_type_int64 = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
+echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
+if test $ac_cv_type_sig_atomic_t = yes; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_INT64 1
+#define HAVE_SIG_ATOMIC_T 1
 _ACEOF
 
 
 fi
-echo "$as_me:$LINENO: checking for uint64" >&5
-echo $ECHO_N "checking for uint64... $ECHO_C" >&6
-if test "${ac_cv_type_uint64+set}" = set; then
+
+
+
+echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
+echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
+if test "${pgac_cv_func_posix_signals+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <stdio.h>
-#ifdef HAVE_SUPPORTDEFS_H
-#include <SupportDefs.h>
+#include <signal.h>
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
 #endif
+int
+main ()
+{
+struct sigaction act, oact;
+sigemptyset(&act.sa_mask);
+act.sa_flags = SA_RESTART;
+sigaction(0, &act, &oact);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  pgac_cv_func_posix_signals=yes
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+pgac_cv_func_posix_signals=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
+echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
+if test x"$pgac_cv_func_posix_signals" = xyes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_SIGNALS
+_ACEOF
+
+fi
+HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
 
+if test $ac_cv_func_fseeko = yes; then
+# Check whether --enable-largefile or --disable-largefile was given.
+if test "${enable_largefile+set}" = set; then
+  enableval="$enable_largefile"
+
+fi;
+if test "$enable_largefile" != no; then
+
+  echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
+echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_largefile_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_sys_largefile_CC=no
+     if test "$GCC" != yes; then
+       ac_save_CC=$CC
+       while :; do
+        # IRIX 6.2 and later do not support large files by default,
+        # so use the C compiler's -n32 option if that helps.
+         cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -15527,10 +14650,134 @@ else
 int
 main ()
 {
-if ((uint64 *) 0)
+
+  ;
   return 0;
-if (sizeof (uint64))
+}
+_ACEOF
+        rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext
+        CC="$CC -n32"
+        rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sys_largefile_CC=' -n32'; break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext
+         break
+       done
+       CC=$ac_save_CC
+       rm -f conftest.$ac_ext
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
+  if test "$ac_cv_sys_largefile_CC" != no; then
+    CC=$CC$ac_cv_sys_largefile_CC
+  fi
+
+  echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  while :; do
+  ac_cv_sys_file_offset_bits=no
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+  ;
   return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
   ;
   return 0;
 }
@@ -15547,38 +14794,44 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_type_uint64=yes
+  ac_cv_sys_file_offset_bits=64; break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_type_uint64=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
+  break
+done
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
-echo "${ECHO_T}$ac_cv_type_uint64" >&6
-if test $ac_cv_type_uint64 = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
+echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
+if test "$ac_cv_sys_file_offset_bits" != no; then
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT64 1
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
 _ACEOF
 
-
 fi
-
-
-# We also check for sig_atomic_t, which *should* be defined per ANSI
-# C, but is missing on some old platforms.
-echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
-echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
-if test "${ac_cv_type_sig_atomic_t+set}" = set; then
+rm -f conftest*
+  echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
+echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
+if test "${ac_cv_sys_large_files+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+  while :; do
+  ac_cv_sys_large_files=no
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <signal.h>
-
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -15588,10 +14841,7 @@ else
 int
 main ()
 {
-if ((sig_atomic_t *) 0)
-  return 0;
-if (sizeof (sig_atomic_t))
-  return 0;
+
   ;
   return 0;
 }
@@ -15608,37 +14858,25 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  ac_cv_type_sig_atomic_t=yes
+  break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-ac_cv_type_sig_atomic_t=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
-echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
-if test $ac_cv_type_sig_atomic_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SIG_ATOMIC_T 1
-_ACEOF
-
-
-fi
-
-
-
-echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
-echo $ECHO_N "checking for POSIX signal interface... $ECHO_C" >&6
-if test "${pgac_cv_func_posix_signals+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 #include "confdefs.h"
-#include <signal.h>
-
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+                      && LARGE_OFF_T % 2147483647 == 1)
+                     ? 1 : -1];
 #ifdef F77_DUMMY_MAIN
 #  ifdef __cplusplus
      extern "C"
@@ -15648,45 +14886,45 @@ else
 int
 main ()
 {
-struct sigaction act, oact;
-sigemptyset(&act.sa_mask);
-act.sa_flags = SA_RESTART;
-sigaction(0, &act, &oact);
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+         { ac_try='test -s conftest.$ac_objext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  pgac_cv_func_posix_signals=yes
+  ac_cv_sys_large_files=1; break
 else
   echo "$as_me: failed program was:" >&5
 cat conftest.$ac_ext >&5
-pgac_cv_func_posix_signals=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
+  break
+done
 fi
-echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
-echo "${ECHO_T}$pgac_cv_func_posix_signals" >&6
-if test x"$pgac_cv_func_posix_signals" = xyes ; then
+echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
+echo "${ECHO_T}$ac_cv_sys_large_files" >&6
+if test "$ac_cv_sys_large_files" != no; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_POSIX_SIGNALS
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
 _ACEOF
 
 fi
-HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
+rm -f conftest*
+fi
 
+fi
 
 
 # Select semaphore implementation type.
@@ -16092,263 +15330,6 @@ _ACEOF
 
 fi
 
-if test "$with_CXX" = yes; then
-
-
-ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-if test "${ac_cv_header_string+set}" = set; then
-  echo "$as_me:$LINENO: checking for string" >&5
-echo $ECHO_N "checking for string... $ECHO_C" >&6
-if test "${ac_cv_header_string+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_string" >&5
-echo "${ECHO_T}$ac_cv_header_string" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking string usability" >&5
-echo $ECHO_N "checking string usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-$ac_includes_default
-#include <string>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking string presence" >&5
-echo $ECHO_N "checking string presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <string>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  egrep -v '^ *\+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: string: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: string: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: string: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: string: proceeding with the preprocessor's result" >&2;};;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: string: present but cannot be compiled" >&5
-echo "$as_me: WARNING: string: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: string: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: string: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: string: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: string: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:$LINENO: checking for string" >&5
-echo $ECHO_N "checking for string... $ECHO_C" >&6
-if test "${ac_cv_header_string+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_string=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_string" >&5
-echo "${ECHO_T}$ac_cv_header_string" >&6
-
-fi
-if test $ac_cv_header_string = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CXX_STRING_HEADER 1
-_ACEOF
-
-else
-  echo "$as_me:$LINENO: checking for class string in <string.h>" >&5
-echo $ECHO_N "checking for class string in <string.h>... $ECHO_C" >&6
-if test "${pgac_cv_class_string_in_string_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-string foo = "test"
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  pgac_cv_class_string_in_string_h=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-pgac_cv_class_string_in_string_h=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $pgac_cv_class_string_in_string_h" >&5
-echo "${ECHO_T}$pgac_cv_class_string_in_string_h" >&6
-
-  if test x"$pgac_cv_class_string_in_string_h" != xyes ; then
-    { { echo "$as_me:$LINENO: error: neither <string> nor <string.h> seem to define the C++ class 'string'" >&5
-echo "$as_me: error: neither <string> nor <string.h> seem to define the C++ class 'string'" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-echo "$as_me:$LINENO: checking for namespace std in C++" >&5
-echo $ECHO_N "checking for namespace std in C++... $ECHO_C" >&6
-if test "${pgac_cv_cxx_namespace_std+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_CXX_STRING_HEADER
-#include <string>
-#endif
-using namespace std;
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  pgac_cv_cxx_namespace_std=yes
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-pgac_cv_cxx_namespace_std=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $pgac_cv_cxx_namespace_std" >&5
-echo "${ECHO_T}$pgac_cv_cxx_namespace_std" >&6
-
-if test $pgac_cv_cxx_namespace_std = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NAMESPACE_STD 1
-_ACEOF
-
-fi
-fi
-
-
 # Check for Tcl configuration script tclConfig.sh
 if test "$with_tcl" = yes; then
     for ac_prog in tclsh tcl
@@ -16614,6 +15595,7 @@ else
         sgml/stylesheets/nwalsh-modular \
         sgml/stylesheets/docbook \
         sgml/docbook/dsssl/modular \
+        sgml/docbook/stylesheet/dsssl/modular \
         sgml/docbook/dsssl-stylesheets
       do
         pgac_candidate=$pgac_prefix/$pgac_infix/$pgac_postfix
@@ -17127,7 +16109,7 @@ _ASBOX
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by PostgreSQL $as_me 7.3devel, which was
+This file was extended by PostgreSQL $as_me 7.4devel, which was
 generated by GNU Autoconf 2.53.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17189,7 +16171,7 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-PostgreSQL config.status 7.3devel
+PostgreSQL config.status 7.4devel
 configured by $0, generated by GNU Autoconf 2.53,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -17379,7 +16361,6 @@ s,@host_vendor@,$host_vendor,;t t
 s,@host_os@,$host_os,;t t
 s,@PORTNAME@,$PORTNAME,;t t
 s,@TAS@,$TAS,;t t
-s,@MULTIBYTE@,$MULTIBYTE,;t t
 s,@enable_nls@,$enable_nls,;t t
 s,@WANTED_LANGUAGES@,$WANTED_LANGUAGES,;t t
 s,@default_port@,$default_port,;t t
@@ -17408,17 +16389,7 @@ s,@with_krb5@,$with_krb5,;t t
 s,@krb_srvtab@,$krb_srvtab,;t t
 s,@with_pam@,$with_pam,;t t
 s,@with_openssl@,$with_openssl,;t t
-s,@enable_odbc@,$enable_odbc,;t t
-s,@with_unixodbc@,$with_unixodbc,;t t
-s,@with_iodbc@,$with_iodbc,;t t
-s,@odbcinst_ini_dir@,$odbcinst_ini_dir,;t t
 s,@ELF_SYS@,$ELF_SYS,;t t
-s,@CXX@,$CXX,;t t
-s,@CXXFLAGS@,$CXXFLAGS,;t t
-s,@ac_ct_CXX@,$ac_ct_CXX,;t t
-s,@CXXCPP@,$CXXCPP,;t t
-s,@with_CXX@,$with_CXX,;t t
-s,@GXX@,$GXX,;t t
 s,@AWK@,$AWK,;t t
 s,@FLEX@,$FLEX,;t t
 s,@FLEXFLAGS@,$FLEXFLAGS,;t t
@@ -17436,14 +16407,10 @@ s,@STRIP_STATIC_LIB@,$STRIP_STATIC_LIB,;t t
 s,@STRIP_SHARED_LIB@,$STRIP_SHARED_LIB,;t t
 s,@YACC@,$YACC,;t t
 s,@YFLAGS@,$YFLAGS,;t t
-s,@WISH@,$WISH,;t t
 s,@PERL@,$PERL,;t t
-s,@perl_installsitearch@,$perl_installsitearch,;t t
-s,@perl_installman3dir@,$perl_installman3dir,;t t
 s,@perl_archlibexp@,$perl_archlibexp,;t t
 s,@perl_privlibexp@,$perl_privlibexp,;t t
 s,@perl_useshrplib@,$perl_useshrplib,;t t
-s,@perl_man3ext@,$perl_man3ext,;t t
 s,@perl_embed_ldflags@,$perl_embed_ldflags,;t t
 s,@PYTHON@,$PYTHON,;t t
 s,@python_version@,$python_version,;t t
@@ -17454,19 +16421,7 @@ s,@python_moduledir@,$python_moduledir,;t t
 s,@python_moduleexecdir@,$python_moduleexecdir,;t t
 s,@python_includespec@,$python_includespec,;t t
 s,@python_libspec@,$python_libspec,;t t
-s,@MEMCMP@,$MEMCMP,;t t
-s,@SNPRINTF@,$SNPRINTF,;t t
-s,@ISINF@,$ISINF,;t t
-s,@GETRUSAGE@,$GETRUSAGE,;t t
-s,@SRANDOM@,$SRANDOM,;t t
-s,@GETHOSTNAME@,$GETHOSTNAME,;t t
-s,@MISSING_RANDOM@,$MISSING_RANDOM,;t t
-s,@INET_ATON@,$INET_ATON,;t t
-s,@STRERROR@,$STRERROR,;t t
-s,@STRDUP@,$STRDUP,;t t
-s,@STRTOL@,$STRTOL,;t t
-s,@STRTOUL@,$STRTOUL,;t t
-s,@STRCASECMP@,$STRCASECMP,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
 s,@HPUXMATHLIB@,$HPUXMATHLIB,;t t
 s,@HAVE_POSIX_SIGNALS@,$HAVE_POSIX_SIGNALS,;t t
 s,@MSGFMT@,$MSGFMT,;t t