]> git.sur5r.net Git - openldap/blobdiff - configure
Import ITS#3857 fix from HEAD (hdb modrdn)
[openldap] / configure
index c83c997aac83b8025cdcbcf857c471abc722045e..aa3214d717913bbc74698739eb55a1f780b73f79 100755 (executable)
--- a/configure
+++ b/configure
 #! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.57.
+# $OpenLDAP$
+# from OpenLDAP: pkg/ldap/configure.in,v 1.478.2.24 2005/03/14 17:06:26 kurt Exp  
+
+# This work is part of OpenLDAP Software <http://www.openldap.org/>.
 #
-# Copyright 1998-2003 The OpenLDAP Foundation. All Rights Reserved.
+# Copyright 1998-2005 The OpenLDAP Foundation.
+# All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted only as authorized by the OpenLDAP
-# Public License.  A copy of this license is available at
-# http://www.OpenLDAP.org/license.html or in file LICENSE in the
-# top-level directory of the distribution.
+# Public License.
 #
+# A copy of this license is available in the file LICENSE in the
+# top-level directory of the distribution or, alternatively, at
+# <http://www.OpenLDAP.org/license.html>.
+
+echo "Copyright 1998-2005 The OpenLDAP Foundation. All rights reserved."
+echo " Restrictions apply, see COPYRIGHT and LICENSE files."
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13.1 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
 #
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
-fi
-
-# Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    $as_unset $as_var
-  fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)$' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-         /^X\/\(\/\/\)$/{ s//\1/; q; }
-         /^X\/\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-        case $as_dir in
-        /*)
-          if ("$as_dir/$as_base" -c '
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-            CONFIG_SHELL=$as_dir/$as_base
-            export CONFIG_SHELL
-            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-          fi;;
-        esac
-       done
-done
-;;
-  esac
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, and appends trailing '-' during
-  # substitution so that $LINENO is not a special case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
-    sed '
-      N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
-      t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
-    ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensible to this).
-  . ./$as_me.lineno
-  # Exit status is that of the last command.
-  exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='     ' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
-    as_ln_s='cp -p'
-  else
-    as_ln_s='ln -s'
-  fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS="  $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
 
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_default_prefix=/usr/local
+ac_help="$ac_help
+  --with-subdir=DIR       change default subdirectory used for installs"
+ac_help="$ac_help
+  --enable-debug         enable debugging [yes]"
+ac_help="$ac_help
+  --enable-dynamic       enable linking built binaries with dynamic libs [no]"
+ac_help="$ac_help
+  --enable-syslog        enable syslog support [auto]"
+ac_help="$ac_help
+  --enable-proctitle     enable proctitle support [yes]"
+ac_help="$ac_help
+  --enable-ipv6          enable IPv6 support [auto]"
+ac_help="$ac_help
+  --enable-local         enable AF_LOCAL (AF_UNIX) socket support [auto]"
+ac_help="$ac_help
+  --with-cyrus-sasl      with Cyrus SASL support [auto]"
+ac_help="$ac_help
+  --with-fetch           with fetch(3) URL support [auto]"
+ac_help="$ac_help
+  --with-threads         with threads [auto]"
+ac_help="$ac_help
+  --with-tls             with TLS/SSL support [auto]"
+ac_help="$ac_help
+  --with-yielding-select  with implicitly yielding select [auto]"
+ac_help="$ac_help
+
+SLAPD (Standalone LDAP Daemon) Options:"
+ac_help="$ac_help
+  --enable-slapd         enable building slapd [yes]"
+ac_help="$ac_help
+    --enable-aci         enable per-object ACIs (experimental) [no]"
+ac_help="$ac_help
+    --enable-cleartext   enable cleartext passwords [yes]"
+ac_help="$ac_help
+    --enable-crypt       enable crypt(3) passwords [no]"
+ac_help="$ac_help
+    --enable-lmpasswd    enable LAN Manager passwords [no]"
+ac_help="$ac_help
+    --enable-spasswd     enable (Cyrus) SASL password verification [no]"
+ac_help="$ac_help
+    --enable-modules     enable dynamic module support [no]"
+ac_help="$ac_help
+    --enable-rewrite     enable DN rewriting in back-ldap and the rwm overlay [auto]"
+ac_help="$ac_help
+    --enable-rlookups    enable reverse lookups of client hostnames [no]"
+ac_help="$ac_help
+    --enable-slapi        enable SLAPI support (experimental) [no]"
+ac_help="$ac_help
+    --enable-slp          enable SLPv2 support [no]"
+ac_help="$ac_help
+    --enable-wrappers    enable tcp wrapper support [no]"
+ac_help="$ac_help
+
+SLAPD Backend Options:"
+ac_help="$ac_help
+    --enable-bdb         enable Berkeley DB backend no|yes|mod [yes]"
+ac_help="$ac_help
+    --enable-dnssrv      enable dnssrv backend no|yes|mod [no]"
+ac_help="$ac_help
+    --enable-hdb         enable Hierarchical DB backend no|yes|mod [no]"
+ac_help="$ac_help
+    --enable-ldap        enable ldap backend no|yes|mod [no]"
+ac_help="$ac_help
+    --enable-ldbm        enable ldbm backend no|yes|mod [no]"
+ac_help="$ac_help
+      --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
+ac_help="$ac_help
+      --with-ldbm-type   use LDBM type auto|btree|hash [auto]"
+ac_help="$ac_help
+    --enable-meta        enable metadirectory backend no|yes|mod [no]"
+ac_help="$ac_help
+    --enable-monitor     enable monitor backend no|yes|mod [yes]"
+ac_help="$ac_help
+    --enable-null        enable null backend no|yes|mod [no]"
+ac_help="$ac_help
+    --enable-passwd      enable passwd backend no|yes|mod [no]"
+ac_help="$ac_help
+    --enable-perl        enable perl backend no|yes|mod [no]"
+ac_help="$ac_help
+    --enable-shell       enable shell backend no|yes|mod [no]"
+ac_help="$ac_help
+    --enable-sql         enable sql backend no|yes|mod [no]"
+ac_help="$ac_help
+
+SLAPD Overlay Options:"
+ac_help="$ac_help
+    --enable-dyngroup    Dynamic Group overlay no|yes|mod [no]"
+ac_help="$ac_help
+    --enable-proxycache          Proxy Cache overlay no|yes|mod [no]"
+ac_help="$ac_help
+
+SLURPD (Replication Daemon) Options:"
+ac_help="$ac_help
+  --enable-slurpd        enable building slurpd [auto]"
+ac_help="$ac_help
+
+Library Generation & Linking Options"
+ac_help="$ac_help
+  --enable-static[=PKGS]  build static libraries [default=yes]"
+ac_help="$ac_help
+  --enable-shared[=PKGS]  build shared libraries [default=yes]"
+ac_help="$ac_help
+  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
+ac_help="$ac_help
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
 
 # Find the correct PATH separator.  Usually this is `:', but
 # DJGPP uses `;' like DOS.
@@ -407,88 +294,23 @@ if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
 fi
 
 
+ac_help="$ac_help
+  --disable-libtool-lock  avoid locking (might break parallel builds)"
+ac_help="$ac_help
+  --with-pic              try to use only PIC/non-PIC objects [default=use both]"
+ac_help="$ac_help
 
-# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-exec 6>&1
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_config_libobj_dir=.
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete.  It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
-# Identity of this package.
-PACKAGE_NAME=
-PACKAGE_TARNAME=
-PACKAGE_VERSION=
-PACKAGE_STRING=
-PACKAGE_BUGREPORT=
-
-ac_unique_file="OpenLDAP"
-ac_unique_file="include/ldap.h"
-ac_default_prefix=/usr/local
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# if HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OPENLDAP_PACKAGE OPENLDAP_VERSION OPENLDAP_LIBVERSION OPENLDAP_RELEASE_DATE top_builddir ldap_subdir SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC AR CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP EGREP LIBTOOL LN_H PERLBIN OL_MKDEP OL_MKDEP_FLAGS LTSTATIC LIBOBJS LIBSRCS PLAT BUILD_LIBS_DYNAMIC BUILD_SLAPD BUILD_SLAPI SLAPD_SLAPI_DEPEND BUILD_BDB BUILD_DNSSRV BUILD_LDAP BUILD_LDBM BUILD_META BUILD_MONITOR BUILD_NULL BUILD_PASSWD BUILD_PERL BUILD_SHELL BUILD_SQL BUILD_TCL BUILD_BDB_DYNAMIC BUILD_DNSSRV_DYNAMIC BUILD_LDAP_DYNAMIC BUILD_LDBM_DYNAMIC BUILD_META_DYNAMIC BUILD_MONITOR_DYNAMIC BUILD_NULL_DYNAMIC BUILD_PASSWD_DYNAMIC BUILD_PERL_DYNAMIC BUILD_SHELL_DYNAMIC BUILD_SQL_DYNAMIC BUILD_TCL_DYNAMIC BUILD_SLURPD LDAP_LIBS LDIF_LIBS SLAPD_LIBS SLURPD_LIBS LDBM_LIBS LTHREAD_LIBS LUTIL_LIBS WRAP_LIBS MOD_TCL_LIB SLAPD_MODULES_CPPFLAGS SLAPD_MODULES_LDFLAGS SLAPD_NO_STATIC SLAPD_STATIC_BACKENDS SLAPD_DYNAMIC_BACKENDS PERL_CPPFLAGS SLAPD_PERL_LDFLAGS MOD_PERL_LDFLAGS KRB4_LIBS KRB5_LIBS READLINE_LIBS SASL_LIBS TERMCAP_LIBS TLS_LIBS MODULES_LIBS SLAPI_LIBS LIBSLAPI LIBSLAPITOOLS AUTH_LIBS SLAPD_SLP_LIBS SLAPD_SQL_LDFLAGS SLAPD_SQL_LIBS SLAPD_SQL_INCLUDES LTLIBOBJS'
-ac_subst_files=''
+See INSTALL file for further details."
 
 # Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
-cache_file=/dev/null
+build=NONE
+cache_file=./config.cache
 exec_prefix=NONE
+host=NONE
 no_create=
+nonopt=NONE
 no_recursion=
 prefix=NONE
 program_prefix=NONE
@@ -497,15 +319,10 @@ program_transform_name=s,x,x,
 silent=
 site=
 srcdir=
+target=NONE
 verbose=
 x_includes=NONE
 x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
@@ -519,9 +336,17 @@ oldincludedir='/usr/include'
 infodir='${prefix}/info'
 mandir='${prefix}/man'
 
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
 ac_prev=
 for ac_option
 do
+
   # If the previous option needs an argument, assign it.
   if test -n "$ac_prev"; then
     eval "$ac_prev=\$ac_option"
@@ -529,59 +354,59 @@ do
     continue
   fi
 
-  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+  case "$ac_option" in
+  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
-  case $ac_option in
+  case "$ac_option" in
 
   -bindir | --bindir | --bindi | --bind | --bin | --bi)
     ac_prev=bindir ;;
   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
+    bindir="$ac_optarg" ;;
 
   -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
+    ac_prev=build ;;
   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
+    build="$ac_optarg" ;;
 
   -cache-file | --cache-file | --cache-fil | --cache-fi \
   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
     ac_prev=cache_file ;;
   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
+    cache_file="$ac_optarg" ;;
 
   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
     ac_prev=datadir ;;
   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
   | --da=*)
-    datadir=$ac_optarg ;;
+    datadir="$ac_optarg" ;;
 
   -disable-* | --disable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-    eval "enable_$ac_feature=no" ;;
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
 
   -enable-* | --enable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
       *) ac_optarg=yes ;;
     esac
-    eval "enable_$ac_feature='$ac_optarg'" ;;
+    eval "enable_${ac_feature}='$ac_optarg'" ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -590,47 +415,95 @@ do
   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
   | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
+    exec_prefix="$ac_optarg" ;;
 
   -gas | --gas | --ga | --g)
     # Obsolete; use --with-gas.
     with_gas=yes ;;
 
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
+  -help | --help | --hel | --he)
+    # 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 << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --program-prefix=PREFIX prepend PREFIX to installed program names
+  --program-suffix=SUFFIX append SUFFIX to installed program names
+  --program-transform-name=PROGRAM
+                          run sed PROGRAM on installed program names
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
 
   -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
+    ac_prev=host ;;
   -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
+    host="$ac_optarg" ;;
 
   -includedir | --includedir | --includedi | --included | --include \
   | --includ | --inclu | --incl | --inc)
     ac_prev=includedir ;;
   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
   | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
+    includedir="$ac_optarg" ;;
 
   -infodir | --infodir | --infodi | --infod | --info | --inf)
     ac_prev=infodir ;;
   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
+    infodir="$ac_optarg" ;;
 
   -libdir | --libdir | --libdi | --libd)
     ac_prev=libdir ;;
   -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
+    libdir="$ac_optarg" ;;
 
   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
   | --libexe | --libex | --libe)
     ac_prev=libexecdir ;;
   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
   | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
+    libexecdir="$ac_optarg" ;;
 
   -localstatedir | --localstatedir | --localstatedi | --localstated \
   | --localstate | --localstat | --localsta | --localst \
@@ -639,19 +512,19 @@ do
   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir=$ac_optarg ;;
+    localstatedir="$ac_optarg" ;;
 
   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
     ac_prev=mandir ;;
   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
+    mandir="$ac_optarg" ;;
 
   -nfp | --nfp | --nf)
     # Obsolete; use --without-fp.
     with_fp=no ;;
 
   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
+  | --no-cr | --no-c)
     no_create=yes ;;
 
   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -665,26 +538,26 @@ do
   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
+    oldincludedir="$ac_optarg" ;;
 
   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
     ac_prev=prefix ;;
   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
+    prefix="$ac_optarg" ;;
 
   -program-prefix | --program-prefix | --program-prefi | --program-pref \
   | --program-pre | --program-pr | --program-p)
     ac_prev=program_prefix ;;
   -program-prefix=* | --program-prefix=* | --program-prefi=* \
   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
+    program_prefix="$ac_optarg" ;;
 
   -program-suffix | --program-suffix | --program-suffi | --program-suff \
   | --program-suf | --program-su | --program-s)
     ac_prev=program_suffix ;;
   -program-suffix=* | --program-suffix=* | --program-suffi=* \
   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
+    program_suffix="$ac_optarg" ;;
 
   -program-transform-name | --program-transform-name \
   | --program-transform-nam | --program-transform-na \
@@ -701,7 +574,7 @@ do
   | --program-transfo=* | --program-transf=* \
   | --program-trans=* | --program-tran=* \
   | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
+    program_transform_name="$ac_optarg" ;;
 
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil)
@@ -711,7 +584,7 @@ do
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
   | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
+    sbindir="$ac_optarg" ;;
 
   -sharedstatedir | --sharedstatedir | --sharedstatedi \
   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -722,57 +595,58 @@ do
   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
   | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
+    sharedstatedir="$ac_optarg" ;;
 
   -site | --site | --sit)
     ac_prev=site ;;
   -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
+    site="$ac_optarg" ;;
 
   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
     ac_prev=srcdir ;;
   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
+    srcdir="$ac_optarg" ;;
 
   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
   | --syscon | --sysco | --sysc | --sys | --sy)
     ac_prev=sysconfdir ;;
   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
+    sysconfdir="$ac_optarg" ;;
 
   -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
+    ac_prev=target ;;
   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
+    target="$ac_optarg" ;;
 
   -v | -verbose | --verbose | --verbos | --verbo | --verb)
     verbose=yes ;;
 
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.13.1"
+    exit 0 ;;
 
   -with-* | --with-*)
-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
     ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+    case "$ac_option" in
+      *=*) ;;
       *) ac_optarg=yes ;;
     esac
-    eval "with_$ac_package='$ac_optarg'" ;;
+    eval "with_${ac_package}='$ac_optarg'" ;;
 
   -without-* | --without-*)
-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/-/_/g'`
-    eval "with_$ac_package=no" ;;
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    eval "with_${ac_package}=no" ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -783,110 +657,99 @@ do
     ac_prev=x_includes ;;
   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
+    x_includes="$ac_optarg" ;;
 
   -x-libraries | --x-libraries | --x-librarie | --x-librari \
   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
     ac_prev=x_libraries ;;
   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
+    x_libraries="$ac_optarg" ;;
 
-  -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
+  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
     ;;
 
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
-    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
-    eval "$ac_envvar='$ac_optarg'"
-    export $ac_envvar ;;
-
   *)
-    # FIXME: should be removed in autoconf 3.0.
-    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
     ;;
 
   esac
 done
 
 if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
 fi
 
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
-  eval ac_val=$`echo $ac_var`
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
-  esac
-done
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
 
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-              localstatedir libdir includedir oldincludedir infodir mandir
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
 do
-  eval ac_val=$`echo $ac_var`
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
   esac
 done
 
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 
-test "$silent" = yes && exec 6>/dev/null
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
 
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=build/version.sh
 
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
   # Try the directory containing this script, then its parent.
-  ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$0" : 'X\(//\)[^/]' \| \
-         X"$0" : 'X\(//\)$' \| \
-         X"$0" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
-echo X"$0" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
   srcdir=$ac_confdir
   if test ! -r $srcdir/$ac_unique_file; then
     srcdir=..
@@ -896,812 +759,605 @@ else
 fi
 if test ! -r $srcdir/$ac_unique_file; then
   if test "$ac_srcdir_defaulted" = yes; then
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
-   { (exit 1); exit 1; }; }
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
   else
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
   fi
 fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
-  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
-   { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
 
-#
-# Report the --help message.
-#
-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 this package to adapt to many kinds of systems.
 
-Usage: $0 [OPTION]... [VAR=VALUE]...
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='       '
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
 
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
 
-Defaults for the options are specified in brackets.
+# set unset (borrowed from autoconf 2.49c)
+if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
+  ol_unset=unset
+else
+  ol_unset=false
+fi
+# unset CDPATH
+$ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
 
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-_ACEOF
-
-  cat <<_ACEOF
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
+ac_aux_dir=
+for ac_dir in build $srcdir/build; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
+eval `$ac_aux_dir/version.sh`
+if test -z "$OL_STRING"; then
+       { echo "configure: error: could not determine version" 1>&2; exit 1; }
+fi
 
-For better control, use the options below.
+if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
+       ac_cv_shtool="$ac_aux_dir/shtool"
+else
+       { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
+fi
 
-Fine tuning of the installation directories:
-  --bindir=DIR           user executables [EPREFIX/bin]
-  --sbindir=DIR          system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
-  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
-  --libdir=DIR           object code libraries [EPREFIX/lib]
-  --includedir=DIR       C header files [PREFIX/include]
-  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --infodir=DIR          info documentation [PREFIX/info]
-  --mandir=DIR           man documentation [PREFIX/man]
-_ACEOF
+SHTOOL="$ac_cv_shtool"
 
-  cat <<\_ACEOF
+TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
+TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
 
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-  --target=TARGET   configure for building compilers for TARGET [HOST]
-_ACEOF
+OPENLDAP_CVS=""
+if test -d $ac_aux_dir/CVS; then
+       OPENLDAP_CVS="(from CVS sources) "
 fi
 
-if test -n "$ac_init_help"; then
+echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
 
-  cat <<\_ACEOF
 
-Optional Features:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-debug         enable debugging yes
-  --enable-dynamic       enable linking built binaries with dynamic libs no
-  --enable-syslog        enable syslog support auto
-  --enable-proctitle     enable proctitle support yes
-  --enable-ipv6          enable IPv6 support auto
-  --enable-local         enable AF_LOCAL (AF_UNIX) socket support auto
-  --enable-x-compile     enable cross compiling no
-  --enable-slapd         enable building slapd yes
-    --enable-aci         enable per-object ACIs (experimental) no
-    --enable-cleartext   enable cleartext passwords yes
-    --enable-crypt       enable crypt(3) passwords no
-    --enable-kpasswd     enable Kerberos password verification no
-    --enable-lmpasswd    enable LAN Manager passwords no
-    --enable-spasswd     enable (Cyrus) SASL password verification no
-    --enable-modules     enable dynamic module support no
-    --enable-phonetic    enable phonetic/soundex no
-    --enable-rewrite     enable DN rewriting in back-ldap and back-meta no
-    --enable-rlookups    enable reverse lookups of client hostnames no
-    --enable-slapi        enable installation of slapi library no
-    --enable-slp          enable SLPv2 support no
-    --enable-wrappers    enable tcp wrapper support no
-    --enable-bdb         enable Berkeley DB backend yes
-    --enable-dnssrv      enable dnssrv backend no
-    --enable-ldap        enable ldap backend no
-    --enable-ldbm        enable ldbm backend no
-    --enable-meta        enable metadirectory backend no
-    --enable-monitor     enable monitor backend no
-    --enable-null        enable null backend no
-    --enable-passwd      enable passwd backend no
-    --enable-perl        enable perl backend no
-    --enable-shell       enable shell backend no
-    --enable-sql         enable sql backend no
-    --enable-tcl         enable tcl backend no
-  --enable-slurpd        enable building slurpd auto
-  --enable-static=PKGS  build static libraries default=yes
-  --enable-shared=PKGS  build shared libraries default=yes
-  --enable-fast-install=PKGS  optimize for fast installation default=yes
-  --disable-libtool-lock  avoid locking (might break parallel builds)
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-subdir=DIR       change default subdirectory used for installs
-  --with-cyrus-sasl      with Cyrus SASL support auto
-  --with-fetch           with fetch(3) URL support auto
-  --with-kerberos        with Kerberos support auto
-  --with-readline        with readline support auto
-  --with-threads         with threads auto
-  --with-tls             with TLS/SSL support auto
-  --with-yielding-select  with implicitly yielding select auto
-
-SLAPD (Standalone LDAP Daemon) Options:
-    --with-bdb-module     module type static|dynamic static
-    --with-dnssrv-module  module type static|dynamic static
-    --with-ldap-module   module type static|dynamic static
-    --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm auto
-    --with-ldbm-module   module type static|dynamic static
-    --with-ldbm-type     use LDBM type auto|btree|hash auto
-    --with-meta-module   module type static|dynamic static
-    --with-monitor-module module type static|dynamic static
-    --with-null-module   module type static|dynamic static
-    --with-passwd-module  module type static|dynamic static
-    --with-perl-module   module type static|dynamic static
-    --with-shell-module          module type static|dynamic static
-    --with-sql-module    module type static|dynamic static
-    --with-tcl-module    module type static|dynamic static
-
-SLURPD (Replication Daemon) Options:
-
-Library Generation & Linking Options
-  --with-gnu-ld           assume the C compiler uses GNU ld default=no
-  --with-pic              try to use only PIC/non-PIC objects default=use both
-
-See INSTALL file for further details.
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
-              headers in a nonstandard directory <include dir>
-  CPP         C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-_ACEOF
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  ac_popdir=`pwd`
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d $ac_dir || continue
-    ac_builddir=.
-
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
-    ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
-
-    cd $ac_dir
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $ac_srcdir/configure.gnu; then
-      echo
-      $SHELL $ac_srcdir/configure.gnu  --help=recursive
-    elif test -f $ac_srcdir/configure; then
-      echo
-      $SHELL $ac_srcdir/configure  --help=recursive
-    elif test -f $ac_srcdir/configure.ac ||
-           test -f $ac_srcdir/configure.in; then
-      echo
-      $ac_configure --help
-    else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi
-    cd $ac_popdir
-  done
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:865: checking host system type" >&5
+if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
+
+# Make sure we can run config.sub.
+  if $ac_config_sub sun4 >/dev/null 2>&1; then :
+    else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+  fi
+
+  ac_cv_host_alias=$host
+  case "$ac_cv_host_alias" in
+  NONE)
+    case $nonopt in
+    NONE)
+      if ac_cv_host_alias=`$ac_config_guess`; then :
+      else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+      fi ;;
+    *) ac_cv_host_alias=$nonopt ;;
+    esac ;;
+  esac
+
+  ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
+  ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+  ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+  ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+else
+  echo $ac_n "(cached) $ac_c" 1>&6
 fi
 
-test -n "$ac_init_help" && exit 0
-if $ac_init_version; then
-  cat <<\_ACEOF
+echo "$ac_t""$ac_cv_host" 1>&6
 
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
+host=$ac_cv_host
+host_alias=$ac_cv_host_alias
+host_cpu=$ac_cv_host_cpu
+host_vendor=$ac_cv_host_vendor
+host_os=$ac_cv_host_os
 
-Copyright 1998-2003 The OpenLDAP Foundation. All Rights Reserved.
 
-Redistribution and use in source and binary forms, with or without
-modification, are permitted only as authorized by the OpenLDAP
-Public License.  A copy of this license is available at
-http://www.OpenLDAP.org/license.html or in file LICENSE in the
-top-level directory of the distribution.
 
-_ACEOF
-  exit 0
+
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:906: checking target system type" >&5
+if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
+
+# Make sure we can run config.sub.
+  if $ac_config_sub sun4 >/dev/null 2>&1; then :
+    else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+  fi
+
+  ac_cv_target_alias=$target
+  case "$ac_cv_target_alias" in
+  NONE)
+    case $nonopt in
+    NONE)
+      ac_cv_target_alias=$host_alias ;;
+
+    *) ac_cv_target_alias=$nonopt ;;
+    esac ;;
+  esac
+
+  ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
+  ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+  ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+  ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+else
+  echo $ac_n "(cached) $ac_c" 1>&6
 fi
-exec 5>config.log
-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 $as_me, which was
-generated by GNU Autoconf 2.57.  Invocation command line was
+echo "$ac_t""$ac_cv_target" 1>&6
 
-  $ $0 $@
+target=$ac_cv_target
+target_alias=$ac_cv_target_alias
+target_cpu=$ac_cv_target_cpu
+target_vendor=$ac_cv_target_vendor
+target_os=$ac_cv_target_os
 
-_ACEOF
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
 
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
 
-} >&5
 
-cat >&5 <<_ACEOF
 
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:946: checking build system type" >&5
+if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
 
-## ----------- ##
-## Core tests. ##
-## ----------- ##
+# Make sure we can run config.sub.
+  if $ac_config_sub sun4 >/dev/null 2>&1; then :
+    else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+  fi
 
-_ACEOF
+  ac_cv_build_alias=$build
+  case "$ac_cv_build_alias" in
+  NONE)
+    case $nonopt in
+    NONE)
+      ac_cv_build_alias=$host_alias ;;
 
+    *) ac_cv_build_alias=$nonopt ;;
+    esac ;;
+  esac
 
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_sep=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
-    2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-        ac_must_keep_next=false # Got value, back to normal.
-      else
-        case $ac_arg in
-          *=* | --config-cache | -C | -disable-* | --disable-* \
-          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-          | -with-* | --with-* | -without-* | --without-* | --x)
-            case "$ac_configure_args0 " in
-              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-            esac
-            ;;
-          -* ) ac_must_keep_next=true ;;
-        esac
-      fi
-      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
-      # Get rid of the leading space.
-      ac_sep=" "
-      ;;
-    esac
-  done
-done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    cat <<\_ASBOX
-## ---------------- ##
-## Cache variables. ##
-## ---------------- ##
-_ASBOX
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-{
-  (set) 2>&1 |
-    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
-      sed -n \
-        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
-      ;;
-    *)
-      sed -n \
-        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
-      ;;
-    esac;
-}
-    echo
-
-    cat <<\_ASBOX
-## ----------------- ##
-## Output variables. ##
-## ----------------- ##
-_ASBOX
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=$`echo $ac_var`
-      echo "$ac_var='"'"'$ac_val'"'"'"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
-_ASBOX
-      echo
-      for ac_var in $ac_subst_files
-      do
-       eval ac_val=$`echo $ac_var`
-        echo "$ac_var='"'"'$ac_val'"'"'"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
-## confdefs.h. ##
-## ----------- ##
-_ASBOX
-      echo
-      sed "/^$/d" confdefs.h | sort
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      echo "$as_me: caught signal $ac_signal"
-    echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core core.* *.core &&
-  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-     ' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
+  ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
+  ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+  ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+  ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+else
+  echo $ac_n "(cached) $ac_c" 1>&6
+fi
 
+echo "$ac_t""$ac_cv_build" 1>&6
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
+build=$ac_cv_build
+build_alias=$ac_cv_build_alias
+build_cpu=$ac_cv_build_cpu
+build_vendor=$ac_cv_build_vendor
+build_os=$ac_cv_build_os
 
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
 
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
 
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+#    same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+#    as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
 
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
 
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
 
-# Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
-  fi
-done
 
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
-    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . $cache_file;;
-      *)                      . ./$cache_file;;
-    esac
-  fi
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:1023: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"\${ac_cv_path_install+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
-               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
-  eval ac_new_val="\$ac_env_${ac_var}_value"
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
+    IFS="${IFS=        }"; ac_save_IFS="$IFS"; IFS=":"
+  for ac_dir in $PATH; do
+    # Account for people who put trailing slashes in PATH elements.
+    case "$ac_dir/" in
+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
     *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
-echo "$as_me:   former value:  $ac_old_val" >&2;}
-        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
-echo "$as_me:   current value: $ac_new_val" >&2;}
-        ac_cache_corrupted=:
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *" "*|*"   "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall scoinst install; do
+        if test -f $ac_dir/$ac_prog; then
+         if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           :
+         elif test $ac_prog = install &&
+           grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
+           # program-specific install script used by HP pwplus--don't use.
+           :
+         else
+           ac_cv_path_install="$ac_dir/$ac_prog -c"
+           break 2
+         fi
+       fi
+      done
+      ;;
     esac
+  done
+  IFS="$ac_save_IFS"
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL="$ac_cv_path_install"
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL="$ac_install_sh"
   fi
-done
-if $ac_cache_corrupted; then
-  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
 fi
+echo "$ac_t""$INSTALL" 1>&6
 
-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
-
-
-
-
-
-
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:1080: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftestfile`
+   fi
+   if test "$*" != "X $srcdir/configure conftestfile" \
+      && test "$*" != "X conftestfile $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+   fi
+
+   test "$2" = conftestfile
+   )
+then
+   # Ok.
+   :
+else
+   { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+  program_transform_name=
+else
+  # Double any \ or $.  echo might interpret backslashes.
+  cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+  rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,${program_prefix},;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+for ac_prog in mawk gawk nawk awk
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1141: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_AWK="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+AWK="$ac_cv_prog_AWK"
+if test -n "$AWK"; then
+  echo "$ac_t""$AWK" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
 
+test -n "$AWK" && break
+done
 
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:1171: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftestmake <<\EOF
+all:
+       @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  SET_MAKE=
+else
+  echo "$ac_t""no" 1>&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
 
 
 
+PACKAGE=$OL_PACKAGE
 
+VERSION=$OL_VERSION
 
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
 
 
 
-ac_aux_dir=
-for ac_dir in build $srcdir/build; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f $ac_dir/shtool; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build $srcdir/build" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in build $srcdir/build" >&2;}
-   { (exit 1); exit 1; }; }
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:1211: checking for working aclocal" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+   ACLOCAL=aclocal
+   echo "$ac_t""found" 1>&6
+else
+   ACLOCAL="$missing_dir/missing aclocal"
+   echo "$ac_t""missing" 1>&6
 fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
-eval `$ac_aux_dir/version.sh`
-if test -z "$OL_STRING"; then
-       { { echo "$as_me:$LINENO: error: could not determine version" >&5
-echo "$as_me: error: could not determine version" >&2;}
-   { (exit 1); exit 1; }; }
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:1224: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+   AUTOCONF=autoconf
+   echo "$ac_t""found" 1>&6
+else
+   AUTOCONF="$missing_dir/missing autoconf"
+   echo "$ac_t""missing" 1>&6
 fi
 
-if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
-       ac_cv_shtool="$ac_aux_dir/shtool"
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:1237: checking for working automake" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+   AUTOMAKE=automake
+   echo "$ac_t""found" 1>&6
 else
-       { { echo "$as_me:$LINENO: error: no shtool found in $ac_aux_dir" >&5
-echo "$as_me: error: no shtool found in $ac_aux_dir" >&2;}
-   { (exit 1); exit 1; }; }
+   AUTOMAKE="$missing_dir/missing automake"
+   echo "$ac_t""missing" 1>&6
 fi
 
-SHTOOL="$ac_cv_shtool"
-
-TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
-TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
-
-OPENLDAP_CVS=""
-if test -d $ac_aux_dir/CVS; then
-       OPENLDAP_CVS="(from CVS sources) "
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:1250: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+   AUTOHEADER=autoheader
+   echo "$ac_t""found" 1>&6
+else
+   AUTOHEADER="$missing_dir/missing autoheader"
+   echo "$ac_t""missing" 1>&6
 fi
 
-echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
-
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
-   { (exit 1); exit 1; }; }
-
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
-  ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:1263: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+   MAKEINFO=makeinfo
+   echo "$ac_t""found" 1>&6
 else
-  ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
-  ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
+   MAKEINFO="$missing_dir/missing makeinfo"
+   echo "$ac_t""missing" 1>&6
 fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
+install_sh="$missing_dir/install-sh"
+test -f "$install_sh" || install_sh="$missing_dir/install.sh"
 
-echo "$as_me:$LINENO: checking target system type" >&5
-echo $ECHO_N "checking target system type... $ECHO_C" >&6
-if test "${ac_cv_target+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+for ac_prog in gnutar gtar tar
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1283: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_cv_target_alias=$target_alias
-test "x$ac_cv_target_alias" = "x" &&
-  ac_cv_target_alias=$ac_cv_host_alias
-ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
-
+  if test -n "$AMTAR"; then
+  ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_AMTAR="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+AMTAR="$ac_cv_prog_AMTAR"
+if test -n "$AMTAR"; then
+  echo "$ac_t""$AMTAR" 1>&6
+else
+  echo "$ac_t""no" 1>&6
 fi
-echo "$as_me:$LINENO: result: $ac_cv_target" >&5
-echo "${ECHO_T}$ac_cv_target" >&6
-target=$ac_cv_target
-target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-
-OPENLDAP_PACKAGE=$OL_PACKAGE
-OPENLDAP_VERSION=$OL_VERSION
-
-
-
 
+test -n "$AMTAR" && break
+done
 
-cat >>confdefs.h <<_ACEOF
-#define OPENLDAP_PACKAGE "$OL_PACKAGE"
-_ACEOF
 
+AMTARFLAGS=
+if test -n "$AMTAR"; then
+  if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
+        AMTARFLAGS=o
+  fi
+fi
 
-cat >>confdefs.h <<_ACEOF
-#define OPENLDAP_VERSION "$OL_VERSION"
-_ACEOF
+cat >> confdefs.h <<EOF
+#define OPENLDAP_PACKAGE "$PACKAGE"
+EOF
 
+cat >> confdefs.h <<EOF
+#define OPENLDAP_VERSION "$VERSION"
+EOF
 
 
-cat >>confdefs.h <<_ACEOF
+cat >> confdefs.h <<EOF
 #define LDAP_VENDOR_VERSION $OL_API_INC
-_ACEOF
-
+EOF
 
-cat >>confdefs.h <<_ACEOF
+cat >> confdefs.h <<EOF
 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
-_ACEOF
-
+EOF
 
-cat >>confdefs.h <<_ACEOF
+cat >> confdefs.h <<EOF
 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
-_ACEOF
-
+EOF
 
-cat >>confdefs.h <<_ACEOF
+cat >> confdefs.h <<EOF
 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
-_ACEOF
+EOF
+
 
+OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
 
-OPENLDAP_LIBVERSION=$OL_API_LIB
+OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
 
 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
 
 
-                              ac_config_headers="$ac_config_headers include/portable.h include/ldap_features.h include/lber_types.h"
 
-echo "$as_me:$LINENO: checking configure arguments" >&5
-echo $ECHO_N "checking configure arguments... $ECHO_C" >&6
+echo $ac_n "checking configure arguments""... $ac_c" 1>&6
+echo "configure:1355: checking configure arguments" >&5
 
 
 top_builddir=`pwd`
 
 ldap_subdir="/openldap"
 
-
 # Check whether --with-subdir or --without-subdir was given.
 if test "${with_subdir+set}" = set; then
   withval="$with_subdir"
@@ -1718,13 +1374,14 @@ if test "${with_subdir+set}" = set; then
                ;;
 esac
 
-fi;
+fi
+
 
 # OpenLDAP --enable-debug
        # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -1732,20 +1389,19 @@ if test "${enable_debug+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-debug" >&5
-echo "$as_me: error: bad value $enableval for --enable-debug" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
        fi
        ol_enable_debug="$ol_arg"
 
 else
        ol_enable_debug="yes"
-fi; # end --enable-debug
+fi
+# end --enable-debug
 # OpenLDAP --enable-dynamic
        # Check whether --enable-dynamic or --disable-dynamic was given.
 if test "${enable_dynamic+set}" = set; then
   enableval="$enable_dynamic"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -1753,20 +1409,19 @@ if test "${enable_dynamic+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynamic" >&5
-echo "$as_me: error: bad value $enableval for --enable-dynamic" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
        fi
        ol_enable_dynamic="$ol_arg"
 
 else
        ol_enable_dynamic="no"
-fi; # end --enable-dynamic
+fi
+# end --enable-dynamic
 # OpenLDAP --enable-syslog
        # Check whether --enable-syslog or --disable-syslog was given.
 if test "${enable_syslog+set}" = set; then
   enableval="$enable_syslog"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -1774,20 +1429,19 @@ if test "${enable_syslog+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syslog" >&5
-echo "$as_me: error: bad value $enableval for --enable-syslog" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
        fi
        ol_enable_syslog="$ol_arg"
 
 else
        ol_enable_syslog="auto"
-fi; # end --enable-syslog
+fi
+# end --enable-syslog
 # OpenLDAP --enable-proctitle
        # Check whether --enable-proctitle or --disable-proctitle was given.
 if test "${enable_proctitle+set}" = set; then
   enableval="$enable_proctitle"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -1795,22 +1449,21 @@ if test "${enable_proctitle+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proctitle" >&5
-echo "$as_me: error: bad value $enableval for --enable-proctitle" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
        fi
        ol_enable_proctitle="$ol_arg"
 
 else
        ol_enable_proctitle="yes"
-fi; # end --enable-proctitle
+fi
+# end --enable-proctitle
 ol_enable_referrals=${ol_enable_referrals-no}
 ol_enable_kbind=${ol_enable_kbind-no}
 # OpenLDAP --enable-ipv6
        # Check whether --enable-ipv6 or --disable-ipv6 was given.
 if test "${enable_ipv6+set}" = set; then
   enableval="$enable_ipv6"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -1818,20 +1471,19 @@ if test "${enable_ipv6+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ipv6" >&5
-echo "$as_me: error: bad value $enableval for --enable-ipv6" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
        fi
        ol_enable_ipv6="$ol_arg"
 
 else
        ol_enable_ipv6="auto"
-fi; # end --enable-ipv6
+fi
+# end --enable-ipv6
 # OpenLDAP --enable-local
        # Check whether --enable-local or --disable-local was given.
 if test "${enable_local+set}" = set; then
   enableval="$enable_local"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -1839,44 +1491,21 @@ if test "${enable_local+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-local" >&5
-echo "$as_me: error: bad value $enableval for --enable-local" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
        fi
        ol_enable_local="$ol_arg"
 
 else
        ol_enable_local="auto"
-fi; # end --enable-local
-# OpenLDAP --enable-x_compile
-       # Check whether --enable-x_compile or --disable-x_compile was given.
-if test "${enable_x_compile+set}" = set; then
-  enableval="$enable_x_compile"
-
-       ol_arg=invalid
-       for ol_val in yes no ; do
-               if test "$enableval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-x_compile" >&5
-echo "$as_me: error: bad value $enableval for --enable-x_compile" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_enable_x_compile="$ol_arg"
-
-else
-       ol_enable_x_compile="no"
-fi; # end --enable-x_compile
+fi
+# end --enable-local
 
 
 # OpenLDAP --with-cyrus_sasl
-
-# Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
+       # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
 if test "${with_cyrus_sasl+set}" = set; then
   withval="$with_cyrus_sasl"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no  ; do
                if test "$withval" = "$ol_val" ; then
@@ -1884,22 +1513,20 @@ if test "${with_cyrus_sasl+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-cyrus_sasl" >&5
-echo "$as_me: error: bad value $withval for --with-cyrus_sasl" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
        fi
        ol_with_cyrus_sasl="$ol_arg"
 
 else
        ol_with_cyrus_sasl="auto"
-fi; # end --with-cyrus_sasl
+fi
+# end --with-cyrus_sasl
 
 # OpenLDAP --with-fetch
-
-# Check whether --with-fetch or --without-fetch was given.
+       # Check whether --with-fetch or --without-fetch was given.
 if test "${with_fetch+set}" = set; then
   withval="$with_fetch"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no  ; do
                if test "$withval" = "$ol_val" ; then
@@ -1907,114 +1534,63 @@ if test "${with_fetch+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-fetch" >&5
-echo "$as_me: error: bad value $withval for --with-fetch" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
        fi
        ol_with_fetch="$ol_arg"
 
 else
        ol_with_fetch="auto"
-fi; # end --with-fetch
-
-# OpenLDAP --with-kerberos
-
-# Check whether --with-kerberos or --without-kerberos was given.
-if test "${with_kerberos+set}" = set; then
-  withval="$with_kerberos"
+fi
+# end --with-fetch
 
+ol_with_kerberos=${ol_with_kerberos-auto}
+# OpenLDAP --with-threads
+       # Check whether --with-threads or --without-threads was given.
+if test "${with_threads+set}" = set; then
+  withval="$with_threads"
+  
        ol_arg=invalid
-       for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
+       for ol_val in auto nt posix mach pth lwp yes no manual  ; do
                if test "$withval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-kerberos" >&5
-echo "$as_me: error: bad value $withval for --with-kerberos" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
        fi
-       ol_with_kerberos="$ol_arg"
+       ol_with_threads="$ol_arg"
 
 else
-       ol_with_kerberos="auto"
-fi; # end --with-kerberos
-
-# OpenLDAP --with-readline
-
-# Check whether --with-readline or --without-readline was given.
-if test "${with_readline+set}" = set; then
-  withval="$with_readline"
+       ol_with_threads="auto"
+fi
+# end --with-threads
 
+# OpenLDAP --with-tls
+       # Check whether --with-tls or --without-tls was given.
+if test "${with_tls+set}" = set; then
+  withval="$with_tls"
+  
        ol_arg=invalid
-       for ol_val in auto yes no  ; do
+       for ol_val in auto ssleay openssl yes no  ; do
                if test "$withval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-readline" >&5
-echo "$as_me: error: bad value $withval for --with-readline" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
        fi
-       ol_with_readline="$ol_arg"
+       ol_with_tls="$ol_arg"
 
 else
-       ol_with_readline="auto"
-fi; # end --with-readline
-
-# OpenLDAP --with-threads
-
-# Check whether --with-threads or --without-threads was given.
-if test "${with_threads+set}" = set; then
-  withval="$with_threads"
-
-       ol_arg=invalid
-       for ol_val in auto nt posix mach pth lwp yes no manual  ; do
-               if test "$withval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-threads" >&5
-echo "$as_me: error: bad value $withval for --with-threads" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_with_threads="$ol_arg"
-
-else
-       ol_with_threads="auto"
-fi; # end --with-threads
-
-# OpenLDAP --with-tls
-
-# Check whether --with-tls or --without-tls was given.
-if test "${with_tls+set}" = set; then
-  withval="$with_tls"
-
-       ol_arg=invalid
-       for ol_val in auto ssleay openssl yes no  ; do
-               if test "$withval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-tls" >&5
-echo "$as_me: error: bad value $withval for --with-tls" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_with_tls="$ol_arg"
-
-else
-       ol_with_tls="auto"
-fi; # end --with-tls
+       ol_with_tls="auto"
+fi
+# end --with-tls
 
 # OpenLDAP --with-yielding_select
-
-# Check whether --with-yielding_select or --without-yielding_select was given.
+       # Check whether --with-yielding_select or --without-yielding_select was given.
 if test "${with_yielding_select+set}" = set; then
   withval="$with_yielding_select"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no manual  ; do
                if test "$withval" = "$ol_val" ; then
@@ -2022,29 +1598,28 @@ if test "${with_yielding_select+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-yielding_select" >&5
-echo "$as_me: error: bad value $withval for --with-yielding_select" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
        fi
        ol_with_yielding_select="$ol_arg"
 
 else
        ol_with_yielding_select="auto"
-fi; # end --with-yielding_select
-
+fi
+# end --with-yielding_select
 
 
 
 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
 if test "${with_xxslapdoptions+set}" = set; then
   withval="$with_xxslapdoptions"
+  :
+fi
 
-fi;
 # OpenLDAP --enable-slapd
        # Check whether --enable-slapd or --disable-slapd was given.
 if test "${enable_slapd+set}" = set; then
   enableval="$enable_slapd"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -2052,20 +1627,19 @@ if test "${enable_slapd+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapd" >&5
-echo "$as_me: error: bad value $enableval for --enable-slapd" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
        fi
        ol_enable_slapd="$ol_arg"
 
 else
        ol_enable_slapd="yes"
-fi; # end --enable-slapd
+fi
+# end --enable-slapd
 # OpenLDAP --enable-aci
        # Check whether --enable-aci or --disable-aci was given.
 if test "${enable_aci+set}" = set; then
   enableval="$enable_aci"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -2073,20 +1647,19 @@ if test "${enable_aci+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-aci" >&5
-echo "$as_me: error: bad value $enableval for --enable-aci" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
        fi
        ol_enable_aci="$ol_arg"
 
 else
        ol_enable_aci="no"
-fi; # end --enable-aci
+fi
+# end --enable-aci
 # OpenLDAP --enable-cleartext
        # Check whether --enable-cleartext or --disable-cleartext was given.
 if test "${enable_cleartext+set}" = set; then
   enableval="$enable_cleartext"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -2094,20 +1667,19 @@ if test "${enable_cleartext+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-cleartext" >&5
-echo "$as_me: error: bad value $enableval for --enable-cleartext" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
        fi
        ol_enable_cleartext="$ol_arg"
 
 else
        ol_enable_cleartext="yes"
-fi; # end --enable-cleartext
+fi
+# end --enable-cleartext
 # OpenLDAP --enable-crypt
        # Check whether --enable-crypt or --disable-crypt was given.
 if test "${enable_crypt+set}" = set; then
   enableval="$enable_crypt"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -2115,41 +1687,19 @@ if test "${enable_crypt+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-crypt" >&5
-echo "$as_me: error: bad value $enableval for --enable-crypt" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
        fi
        ol_enable_crypt="$ol_arg"
 
 else
        ol_enable_crypt="no"
-fi; # end --enable-crypt
-# OpenLDAP --enable-kpasswd
-       # Check whether --enable-kpasswd or --disable-kpasswd was given.
-if test "${enable_kpasswd+set}" = set; then
-  enableval="$enable_kpasswd"
-
-       ol_arg=invalid
-       for ol_val in auto yes no ; do
-               if test "$enableval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-kpasswd" >&5
-echo "$as_me: error: bad value $enableval for --enable-kpasswd" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_enable_kpasswd="$ol_arg"
-
-else
-       ol_enable_kpasswd="no"
-fi; # end --enable-kpasswd
+fi
+# end --enable-crypt
 # OpenLDAP --enable-lmpasswd
        # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
 if test "${enable_lmpasswd+set}" = set; then
   enableval="$enable_lmpasswd"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -2157,20 +1707,19 @@ if test "${enable_lmpasswd+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-lmpasswd" >&5
-echo "$as_me: error: bad value $enableval for --enable-lmpasswd" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
        fi
        ol_enable_lmpasswd="$ol_arg"
 
 else
        ol_enable_lmpasswd="no"
-fi; # end --enable-lmpasswd
+fi
+# end --enable-lmpasswd
 # OpenLDAP --enable-spasswd
        # Check whether --enable-spasswd or --disable-spasswd was given.
 if test "${enable_spasswd+set}" = set; then
   enableval="$enable_spasswd"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -2178,20 +1727,19 @@ if test "${enable_spasswd+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-spasswd" >&5
-echo "$as_me: error: bad value $enableval for --enable-spasswd" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
        fi
        ol_enable_spasswd="$ol_arg"
 
 else
        ol_enable_spasswd="no"
-fi; # end --enable-spasswd
+fi
+# end --enable-spasswd
 # OpenLDAP --enable-modules
        # Check whether --enable-modules or --disable-modules was given.
 if test "${enable_modules+set}" = set; then
   enableval="$enable_modules"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -2199,42 +1747,20 @@ if test "${enable_modules+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-modules" >&5
-echo "$as_me: error: bad value $enableval for --enable-modules" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
        fi
        ol_enable_modules="$ol_arg"
 
 else
        ol_enable_modules="no"
-fi; # end --enable-modules
+fi
+# end --enable-modules
 ol_enable_multimaster=${ol_enable_multimaster-no}
-# OpenLDAP --enable-phonetic
-       # Check whether --enable-phonetic or --disable-phonetic was given.
-if test "${enable_phonetic+set}" = set; then
-  enableval="$enable_phonetic"
-
-       ol_arg=invalid
-       for ol_val in auto yes no ; do
-               if test "$enableval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-phonetic" >&5
-echo "$as_me: error: bad value $enableval for --enable-phonetic" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_enable_phonetic="$ol_arg"
-
-else
-       ol_enable_phonetic="no"
-fi; # end --enable-phonetic
 # OpenLDAP --enable-rewrite
        # Check whether --enable-rewrite or --disable-rewrite was given.
 if test "${enable_rewrite+set}" = set; then
   enableval="$enable_rewrite"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -2242,20 +1768,19 @@ if test "${enable_rewrite+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rewrite" >&5
-echo "$as_me: error: bad value $enableval for --enable-rewrite" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
        fi
        ol_enable_rewrite="$ol_arg"
 
 else
-       ol_enable_rewrite="no"
-fi; # end --enable-rewrite
+       ol_enable_rewrite="auto"
+fi
+# end --enable-rewrite
 # OpenLDAP --enable-rlookups
        # Check whether --enable-rlookups or --disable-rlookups was given.
 if test "${enable_rlookups+set}" = set; then
   enableval="$enable_rlookups"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -2263,20 +1788,19 @@ if test "${enable_rlookups+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rlookups" >&5
-echo "$as_me: error: bad value $enableval for --enable-rlookups" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
        fi
        ol_enable_rlookups="$ol_arg"
 
 else
        ol_enable_rlookups="no"
-fi; # end --enable-rlookups
+fi
+# end --enable-rlookups
 # OpenLDAP --enable-slapi
        # Check whether --enable-slapi or --disable-slapi was given.
 if test "${enable_slapi+set}" = set; then
   enableval="$enable_slapi"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -2284,20 +1808,19 @@ if test "${enable_slapi+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapi" >&5
-echo "$as_me: error: bad value $enableval for --enable-slapi" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
        fi
        ol_enable_slapi="$ol_arg"
 
 else
        ol_enable_slapi="no"
-fi; # end --enable-slapi
+fi
+# end --enable-slapi
 # OpenLDAP --enable-slp
        # Check whether --enable-slp or --disable-slp was given.
 if test "${enable_slp+set}" = set; then
   enableval="$enable_slp"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -2305,20 +1828,19 @@ if test "${enable_slp+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slp" >&5
-echo "$as_me: error: bad value $enableval for --enable-slp" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
        fi
        ol_enable_slp="$ol_arg"
 
 else
        ol_enable_slp="no"
-fi; # end --enable-slp
+fi
+# end --enable-slp
 # OpenLDAP --enable-wrappers
        # Check whether --enable-wrappers or --disable-wrappers was given.
 if test "${enable_wrappers+set}" = set; then
   enableval="$enable_wrappers"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -2326,176 +1848,130 @@ if test "${enable_wrappers+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-wrappers" >&5
-echo "$as_me: error: bad value $enableval for --enable-wrappers" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
        fi
        ol_enable_wrappers="$ol_arg"
 
 else
        ol_enable_wrappers="no"
-fi; # end --enable-wrappers
+fi
+# end --enable-wrappers
+
+Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
+       passwd perl shell sql"
+
+# Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
+if test "${with_xxslapoverlays+set}" = set; then
+  withval="$with_xxslapoverlays"
+  :
+fi
 
 
 # OpenLDAP --enable-bdb
        # Check whether --enable-bdb or --disable-bdb was given.
 if test "${enable_bdb+set}" = set; then
   enableval="$enable_bdb"
-
+  
        ol_arg=invalid
-       for ol_val in auto yes no ; do
+       for ol_val in no yes mod ; do
                if test "$enableval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-bdb" >&5
-echo "$as_me: error: bad value $enableval for --enable-bdb" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
        fi
        ol_enable_bdb="$ol_arg"
 
 else
        ol_enable_bdb="yes"
-fi; # end --enable-bdb
-# OpenLDAP --with-bdb_module
-
-# Check whether --with-bdb_module or --without-bdb_module was given.
-if test "${with_bdb_module+set}" = set; then
-  withval="$with_bdb_module"
-
-       ol_arg=invalid
-       for ol_val in static dynamic ; do
-               if test "$withval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-bdb_module" >&5
-echo "$as_me: error: bad value $withval for --with-bdb_module" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_with_bdb_module="$ol_arg"
-
-else
-       ol_with_bdb_module="static"
-fi; # end --with-bdb_module
-
+fi
+# end --enable-bdb
 # OpenLDAP --enable-dnssrv
        # Check whether --enable-dnssrv or --disable-dnssrv was given.
 if test "${enable_dnssrv+set}" = set; then
   enableval="$enable_dnssrv"
-
+  
        ol_arg=invalid
-       for ol_val in auto yes no ; do
+       for ol_val in no yes mod ; do
                if test "$enableval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dnssrv" >&5
-echo "$as_me: error: bad value $enableval for --enable-dnssrv" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
        fi
        ol_enable_dnssrv="$ol_arg"
 
 else
        ol_enable_dnssrv="no"
-fi; # end --enable-dnssrv
-# OpenLDAP --with-dnssrv_module
-
-# Check whether --with-dnssrv_module or --without-dnssrv_module was given.
-if test "${with_dnssrv_module+set}" = set; then
-  withval="$with_dnssrv_module"
-
+fi
+# end --enable-dnssrv
+# OpenLDAP --enable-hdb
+       # Check whether --enable-hdb or --disable-hdb was given.
+if test "${enable_hdb+set}" = set; then
+  enableval="$enable_hdb"
+  
        ol_arg=invalid
-       for ol_val in static dynamic ; do
-               if test "$withval" = "$ol_val" ; then
+       for ol_val in no yes mod ; do
+               if test "$enableval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-dnssrv_module" >&5
-echo "$as_me: error: bad value $withval for --with-dnssrv_module" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
        fi
-       ol_with_dnssrv_module="$ol_arg"
+       ol_enable_hdb="$ol_arg"
 
 else
-       ol_with_dnssrv_module="static"
-fi; # end --with-dnssrv_module
-
+       ol_enable_hdb="no"
+fi
+# end --enable-hdb
 # OpenLDAP --enable-ldap
        # Check whether --enable-ldap or --disable-ldap was given.
 if test "${enable_ldap+set}" = set; then
   enableval="$enable_ldap"
-
+  
        ol_arg=invalid
-       for ol_val in auto yes no ; do
+       for ol_val in no yes mod ; do
                if test "$enableval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldap" >&5
-echo "$as_me: error: bad value $enableval for --enable-ldap" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
        fi
        ol_enable_ldap="$ol_arg"
 
 else
        ol_enable_ldap="no"
-fi; # end --enable-ldap
-# OpenLDAP --with-ldap_module
-
-# Check whether --with-ldap_module or --without-ldap_module was given.
-if test "${with_ldap_module+set}" = set; then
-  withval="$with_ldap_module"
-
-       ol_arg=invalid
-       for ol_val in static dynamic ; do
-               if test "$withval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-ldap_module" >&5
-echo "$as_me: error: bad value $withval for --with-ldap_module" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_with_ldap_module="$ol_arg"
-
-else
-       ol_with_ldap_module="static"
-fi; # end --with-ldap_module
-
+fi
+# end --enable-ldap
 # OpenLDAP --enable-ldbm
        # Check whether --enable-ldbm or --disable-ldbm was given.
 if test "${enable_ldbm+set}" = set; then
   enableval="$enable_ldbm"
-
+  
        ol_arg=invalid
-       for ol_val in auto yes no ; do
+       for ol_val in no yes mod ; do
                if test "$enableval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldbm" >&5
-echo "$as_me: error: bad value $enableval for --enable-ldbm" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
        fi
        ol_enable_ldbm="$ol_arg"
 
 else
        ol_enable_ldbm="no"
-fi; # end --enable-ldbm
+fi
+# end --enable-ldbm
 # OpenLDAP --with-ldbm_api
-
-# Check whether --with-ldbm_api or --without-ldbm_api was given.
+       # Check whether --with-ldbm_api or --without-ldbm_api was given.
 if test "${with_ldbm_api+set}" = set; then
   withval="$with_ldbm_api"
-
+  
        ol_arg=invalid
        for ol_val in auto berkeley bcompat mdbm gdbm ; do
                if test "$withval" = "$ol_val" ; then
@@ -2503,45 +1979,20 @@ if test "${with_ldbm_api+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-ldbm_api" >&5
-echo "$as_me: error: bad value $withval for --with-ldbm_api" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
        fi
        ol_with_ldbm_api="$ol_arg"
 
 else
        ol_with_ldbm_api="auto"
-fi; # end --with-ldbm_api
-
-# OpenLDAP --with-ldbm_module
-
-# Check whether --with-ldbm_module or --without-ldbm_module was given.
-if test "${with_ldbm_module+set}" = set; then
-  withval="$with_ldbm_module"
-
-       ol_arg=invalid
-       for ol_val in static dynamic ; do
-               if test "$withval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-ldbm_module" >&5
-echo "$as_me: error: bad value $withval for --with-ldbm_module" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_with_ldbm_module="$ol_arg"
-
-else
-       ol_with_ldbm_module="static"
-fi; # end --with-ldbm_module
+fi
+# end --with-ldbm_api
 
 # OpenLDAP --with-ldbm_type
-
-# Check whether --with-ldbm_type or --without-ldbm_type was given.
+       # Check whether --with-ldbm_type or --without-ldbm_type was given.
 if test "${with_ldbm_type+set}" = set; then
   withval="$with_ldbm_type"
-
+  
        ol_arg=invalid
        for ol_val in auto btree hash ; do
                if test "$withval" = "$ol_val" ; then
@@ -2549,380 +2000,219 @@ if test "${with_ldbm_type+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-ldbm_type" >&5
-echo "$as_me: error: bad value $withval for --with-ldbm_type" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
        fi
        ol_with_ldbm_type="$ol_arg"
 
 else
        ol_with_ldbm_type="auto"
-fi; # end --with-ldbm_type
+fi
+# end --with-ldbm_type
 
 # OpenLDAP --enable-meta
        # Check whether --enable-meta or --disable-meta was given.
 if test "${enable_meta+set}" = set; then
   enableval="$enable_meta"
-
+  
        ol_arg=invalid
-       for ol_val in auto yes no ; do
+       for ol_val in no yes mod ; do
                if test "$enableval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-meta" >&5
-echo "$as_me: error: bad value $enableval for --enable-meta" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
        fi
        ol_enable_meta="$ol_arg"
 
 else
        ol_enable_meta="no"
-fi; # end --enable-meta
-# OpenLDAP --with-meta_module
-
-# Check whether --with-meta_module or --without-meta_module was given.
-if test "${with_meta_module+set}" = set; then
-  withval="$with_meta_module"
-
-       ol_arg=invalid
-       for ol_val in static dynamic ; do
-               if test "$withval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-meta_module" >&5
-echo "$as_me: error: bad value $withval for --with-meta_module" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_with_meta_module="$ol_arg"
-
-else
-       ol_with_meta_module="static"
-fi; # end --with-meta_module
-
+fi
+# end --enable-meta
 # OpenLDAP --enable-monitor
        # Check whether --enable-monitor or --disable-monitor was given.
 if test "${enable_monitor+set}" = set; then
   enableval="$enable_monitor"
-
+  
        ol_arg=invalid
-       for ol_val in auto yes no ; do
+       for ol_val in no yes mod ; do
                if test "$enableval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-monitor" >&5
-echo "$as_me: error: bad value $enableval for --enable-monitor" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
        fi
        ol_enable_monitor="$ol_arg"
 
 else
-       ol_enable_monitor="no"
-fi; # end --enable-monitor
-# OpenLDAP --with-monitor_module
-
-# Check whether --with-monitor_module or --without-monitor_module was given.
-if test "${with_monitor_module+set}" = set; then
-  withval="$with_monitor_module"
-
-       ol_arg=invalid
-       for ol_val in static dynamic ; do
-               if test "$withval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-monitor_module" >&5
-echo "$as_me: error: bad value $withval for --with-monitor_module" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_with_monitor_module="$ol_arg"
-
-else
-       ol_with_monitor_module="static"
-fi; # end --with-monitor_module
-
+       ol_enable_monitor="yes"
+fi
+# end --enable-monitor
 # OpenLDAP --enable-null
        # Check whether --enable-null or --disable-null was given.
 if test "${enable_null+set}" = set; then
   enableval="$enable_null"
-
+  
        ol_arg=invalid
-       for ol_val in auto yes no ; do
+       for ol_val in no yes mod ; do
                if test "$enableval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-null" >&5
-echo "$as_me: error: bad value $enableval for --enable-null" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
        fi
        ol_enable_null="$ol_arg"
 
 else
        ol_enable_null="no"
-fi; # end --enable-null
-# OpenLDAP --with-null_module
-
-# Check whether --with-null_module or --without-null_module was given.
-if test "${with_null_module+set}" = set; then
-  withval="$with_null_module"
-
-       ol_arg=invalid
-       for ol_val in static dynamic ; do
-               if test "$withval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-null_module" >&5
-echo "$as_me: error: bad value $withval for --with-null_module" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_with_null_module="$ol_arg"
-
-else
-       ol_with_null_module="static"
-fi; # end --with-null_module
-
+fi
+# end --enable-null
 # OpenLDAP --enable-passwd
        # Check whether --enable-passwd or --disable-passwd was given.
 if test "${enable_passwd+set}" = set; then
   enableval="$enable_passwd"
-
+  
        ol_arg=invalid
-       for ol_val in auto yes no ; do
+       for ol_val in no yes mod ; do
                if test "$enableval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-passwd" >&5
-echo "$as_me: error: bad value $enableval for --enable-passwd" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
        fi
        ol_enable_passwd="$ol_arg"
 
 else
        ol_enable_passwd="no"
-fi; # end --enable-passwd
-# OpenLDAP --with-passwd_module
-
-# Check whether --with-passwd_module or --without-passwd_module was given.
-if test "${with_passwd_module+set}" = set; then
-  withval="$with_passwd_module"
-
-       ol_arg=invalid
-       for ol_val in static dynamic ; do
-               if test "$withval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-passwd_module" >&5
-echo "$as_me: error: bad value $withval for --with-passwd_module" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_with_passwd_module="$ol_arg"
-
-else
-       ol_with_passwd_module="static"
-fi; # end --with-passwd_module
-
+fi
+# end --enable-passwd
 # OpenLDAP --enable-perl
        # Check whether --enable-perl or --disable-perl was given.
 if test "${enable_perl+set}" = set; then
   enableval="$enable_perl"
-
+  
        ol_arg=invalid
-       for ol_val in auto yes no ; do
+       for ol_val in no yes mod ; do
                if test "$enableval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-perl" >&5
-echo "$as_me: error: bad value $enableval for --enable-perl" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
        fi
        ol_enable_perl="$ol_arg"
 
 else
        ol_enable_perl="no"
-fi; # end --enable-perl
-# OpenLDAP --with-perl_module
-
-# Check whether --with-perl_module or --without-perl_module was given.
-if test "${with_perl_module+set}" = set; then
-  withval="$with_perl_module"
-
-       ol_arg=invalid
-       for ol_val in static dynamic ; do
-               if test "$withval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-perl_module" >&5
-echo "$as_me: error: bad value $withval for --with-perl_module" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_with_perl_module="$ol_arg"
-
-else
-       ol_with_perl_module="static"
-fi; # end --with-perl_module
-
+fi
+# end --enable-perl
 # OpenLDAP --enable-shell
        # Check whether --enable-shell or --disable-shell was given.
 if test "${enable_shell+set}" = set; then
   enableval="$enable_shell"
-
+  
        ol_arg=invalid
-       for ol_val in auto yes no ; do
+       for ol_val in no yes mod ; do
                if test "$enableval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-shell" >&5
-echo "$as_me: error: bad value $enableval for --enable-shell" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
        fi
        ol_enable_shell="$ol_arg"
 
 else
        ol_enable_shell="no"
-fi; # end --enable-shell
-# OpenLDAP --with-shell_module
-
-# Check whether --with-shell_module or --without-shell_module was given.
-if test "${with_shell_module+set}" = set; then
-  withval="$with_shell_module"
-
-       ol_arg=invalid
-       for ol_val in static dynamic ; do
-               if test "$withval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-shell_module" >&5
-echo "$as_me: error: bad value $withval for --with-shell_module" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_with_shell_module="$ol_arg"
-
-else
-       ol_with_shell_module="static"
-fi; # end --with-shell_module
-
+fi
+# end --enable-shell
 # OpenLDAP --enable-sql
        # Check whether --enable-sql or --disable-sql was given.
 if test "${enable_sql+set}" = set; then
   enableval="$enable_sql"
-
+  
        ol_arg=invalid
-       for ol_val in auto yes no ; do
+       for ol_val in no yes mod ; do
                if test "$enableval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sql" >&5
-echo "$as_me: error: bad value $enableval for --enable-sql" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
        fi
        ol_enable_sql="$ol_arg"
 
 else
        ol_enable_sql="no"
-fi; # end --enable-sql
-# OpenLDAP --with-sql_module
+fi
+# end --enable-sql
+
+Overlays="dyngroup proxycache"
+
+# Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
+if test "${with_xxslapoverlays+set}" = set; then
+  withval="$with_xxslapoverlays"
+  :
+fi
 
-# Check whether --with-sql_module or --without-sql_module was given.
-if test "${with_sql_module+set}" = set; then
-  withval="$with_sql_module"
 
+# OpenLDAP --enable-dyngroup
+       # Check whether --enable-dyngroup or --disable-dyngroup was given.
+if test "${enable_dyngroup+set}" = set; then
+  enableval="$enable_dyngroup"
+  
        ol_arg=invalid
-       for ol_val in static dynamic ; do
-               if test "$withval" = "$ol_val" ; then
+       for ol_val in no yes mod ; do
+               if test "$enableval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-sql_module" >&5
-echo "$as_me: error: bad value $withval for --with-sql_module" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
        fi
-       ol_with_sql_module="$ol_arg"
+       ol_enable_dyngroup="$ol_arg"
 
 else
-       ol_with_sql_module="static"
-fi; # end --with-sql_module
-
-# OpenLDAP --enable-tcl
-       # Check whether --enable-tcl or --disable-tcl was given.
-if test "${enable_tcl+set}" = set; then
-  enableval="$enable_tcl"
+       ol_enable_dyngroup="no"
+fi
+# end --enable-dyngroup
 
+# OpenLDAP --enable-proxycache
+       # Check whether --enable-proxycache or --disable-proxycache was given.
+if test "${enable_proxycache+set}" = set; then
+  enableval="$enable_proxycache"
+  
        ol_arg=invalid
-       for ol_val in auto yes no ; do
+       for ol_val in no yes mod ; do
                if test "$enableval" = "$ol_val" ; then
                        ol_arg="$ol_val"
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-tcl" >&5
-echo "$as_me: error: bad value $enableval for --enable-tcl" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
        fi
-       ol_enable_tcl="$ol_arg"
+       ol_enable_proxycache="$ol_arg"
 
 else
-       ol_enable_tcl="no"
-fi; # end --enable-tcl
-# OpenLDAP --with-tcl_module
-
-# Check whether --with-tcl_module or --without-tcl_module was given.
-if test "${with_tcl_module+set}" = set; then
-  withval="$with_tcl_module"
-
-       ol_arg=invalid
-       for ol_val in static dynamic ; do
-               if test "$withval" = "$ol_val" ; then
-                       ol_arg="$ol_val"
-               fi
-       done
-       if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $withval for --with-tcl_module" >&5
-echo "$as_me: error: bad value $withval for --with-tcl_module" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       ol_with_tcl_module="$ol_arg"
-
-else
-       ol_with_tcl_module="static"
-fi; # end --with-tcl_module
-
+       ol_enable_proxycache="no"
+fi
+# end --enable-proxycache
 
 
 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
 if test "${with_xxslurpdoptions+set}" = set; then
   withval="$with_xxslurpdoptions"
+  :
+fi
 
-fi;
 # OpenLDAP --enable-slurpd
        # Check whether --enable-slurpd or --disable-slurpd was given.
 if test "${enable_slurpd+set}" = set; then
   enableval="$enable_slurpd"
-
+  
        ol_arg=invalid
        for ol_val in auto yes no ; do
                if test "$enableval" = "$ol_val" ; then
@@ -2930,22 +2220,21 @@ if test "${enable_slurpd+set}" = set; then
                fi
        done
        if test "$ol_arg" = "invalid" ; then
-               { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slurpd" >&5
-echo "$as_me: error: bad value $enableval for --enable-slurpd" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
        fi
        ol_enable_slurpd="$ol_arg"
 
 else
        ol_enable_slurpd="auto"
-fi; # end --enable-slurpd
-
+fi
+# end --enable-slurpd
 
 # Check whether --with-xxliboptions or --without-xxliboptions was given.
 if test "${with_xxliboptions+set}" = set; then
   withval="$with_xxliboptions"
+  :
+fi
 
-fi;
 # Check whether --enable-static or --disable-static was given.
 if test "${enable_static+set}" = set; then
   enableval="$enable_static"
@@ -2967,7 +2256,8 @@ no) enable_static=no ;;
 esac
 else
   enable_static=yes
-fi;
+fi
+
 # Check whether --enable-shared or --disable-shared was given.
 if test "${enable_shared+set}" = set; then
   enableval="$enable_shared"
@@ -2989,216 +2279,87 @@ no) enable_shared=no ;;
 esac
 else
   enable_shared=yes
-fi;
+fi
+
 
 
 # validate options
 if test $ol_enable_slapd = no ; then
                if test $ol_enable_slapi = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
-       fi
-       if test $ol_enable_bdb = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-bdb argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-bdb argument" >&2;}
-       fi
-       if test $ol_enable_dnssrv = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-dnssrv argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-dnssrv argument" >&2;}
-       fi
-       if test $ol_enable_ldap = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldap argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldap argument" >&2;}
-       fi
-       if test $ol_enable_ldbm = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-ldbm argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-ldbm argument" >&2;}
-       fi
-       if test $ol_enable_meta = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-meta argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-meta argument" >&2;}
-       fi
-       if test $ol_enable_monitor = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-monitor argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-monitor argument" >&2;}
-       fi
-       if test $ol_enable_null = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-null argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-null argument" >&2;}
-       fi
-       if test $ol_enable_passwd = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-passwd argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-passwd argument" >&2;}
-       fi
-       if test $ol_enable_perl = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-perl argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-perl argument" >&2;}
-       fi
-       if test $ol_enable_shell = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-shell argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-shell argument" >&2;}
-       fi
-       if test $ol_enable_tcl = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-tcl argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-tcl argument" >&2;}
-       fi
-       if test $ol_enable_sql = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-sql argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-sql argument" >&2;}
+               echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
        fi
+       for i in $Backends; do
+               eval "ol_tmp=\$ol_enable_$i"
+               if test $ol_tmp != no ; then
+                       echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
+                       eval "ol_enable_$i=no"
+               fi
+       done
        if test $ol_enable_modules = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
+               echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
        fi
        if test $ol_enable_multimaster = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-multimaster argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-multimaster argument" >&2;}
+               echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
        fi
        if test $ol_enable_wrappers = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
-       fi
-       if test $ol_enable_phonetic = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-phonetic argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-phonetic argument" >&2;}
+               echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
        fi
        if test $ol_enable_rlookups = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
+               echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
        fi
        if test $ol_enable_aci = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
+               echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
        fi
        if test $ol_with_ldbm_api != auto ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-ldbm-api argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --with-ldbm-api argument" >&2;}
+               echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
        fi
        if test $ol_with_ldbm_type != auto ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-ldbm-type argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --with-ldbm-type argument" >&2;}
-       fi
-       if test $ol_with_bdb_module != static ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-bdb-module argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --with-bdb-module argument" >&2;}
-       fi
-       if test $ol_with_dnssrv_module != static ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-dnssrv-module argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --with-dnssrv-module argument" >&2;}
-       fi
-       if test $ol_with_ldap_module != static ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-ldap-module argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --with-ldap-module argument" >&2;}
-       fi
-       if test $ol_with_ldbm_module != static ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-ldbm-module argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --with-ldbm-module argument" >&2;}
-       fi
-       if test $ol_with_meta_module != static ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-meta-module argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --with-meta-module argument" >&2;}
-       fi
-       if test $ol_with_monitor_module != static ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-monitor-module argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --with-monitor-module argument" >&2;}
-       fi
-       if test $ol_with_null_module != static ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-null-module argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --with-null-module argument" >&2;}
-       fi
-       if test $ol_with_passwd_module != static ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-passwd-module argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --with-passwd-module argument" >&2;}
-       fi
-       if test $ol_with_perl_module != static ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-perl-module argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --with-perl-module argument" >&2;}
-       fi
-       if test $ol_with_shell_module != static ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-shell-module argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --with-shell-module argument" >&2;}
-       fi
-       if test $ol_with_tcl_module != static ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-tcl-module argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --with-tcl-module argument" >&2;}
-       fi
-       if test $ol_with_sql_module != static ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --with-sql-module argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --with-sql-module argument" >&2;}
+               echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
        fi
        if test $ol_enable_slurpd = yes ; then
-               { { echo "$as_me:$LINENO: error: slurpd requires slapd" >&5
-echo "$as_me: error: slurpd requires slapd" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
        fi
        if test $ol_enable_rewrite = yes ; then
-               { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
-echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
+               echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
        fi
+               for i in $Overlays; do
+               eval "ol_tmp=\$ol_enable_$i"
+               if test $ol_tmp != no ; then
+                       echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
+                       eval "ol_enable_$i=no"
+               fi
+       done
 
        # force settings to no
        ol_enable_slapi=no
-       ol_enable_bdb=no
-       ol_enable_dnssrv=no
-       ol_enable_ldap=no
-       ol_enable_ldbm=no
-       ol_enable_meta=no
-       ol_enable_monitor=no
-       ol_enable_null=no
-       ol_enable_passwd=no
-       ol_enable_perl=no
-       ol_enable_shell=no
-       ol_enable_tcl=no
-       ol_enable_sql=no
 
        ol_enable_modules=no
        ol_enable_multimaster=no
-       ol_enable_phonetic=no
        ol_enable_rlookups=no
        ol_enable_aci=no
        ol_enable_wrappers=no
-       ol_enable_dynamic=no
 
        ol_with_ldbm_api=no
        ol_with_ldbm_type=no
 
-       ol_with_bdb_module=static
-       ol_with_dnssrv_module=static
-       ol_with_ldap_module=static
-       ol_with_ldbm_module=static
-       ol_with_meta_module=static
-       ol_with_monitor_module=static
-       ol_with_null_module=static
-       ol_with_passwd_module=static
-       ol_with_perl_module=static
-       ol_with_shell_module=static
-       ol_with_tcl_module=static
-       ol_with_sql_module=static
-
        ol_enable_slurpd=no
 
        ol_enable_rewrite=no
 
 elif test $ol_enable_ldbm = no ; then
-
+       
        if test $ol_with_ldbm_api != auto ; then
-               { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --with-ldbm-api argument" >&5
-echo "$as_me: WARNING: LDBM disabled, ignoring --with-ldbm-api argument" >&2;}
+               echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
        fi
 
        if test $ol_with_ldbm_type != auto ; then
-               { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --with-ldbm-type argument" >&5
-echo "$as_me: WARNING: LDBM disabled, ignoring --with-ldbm-type argument" >&2;}
-       fi
-
-       if test $ol_with_ldbm_module != static ; then
-               { echo "$as_me:$LINENO: WARNING: LDBM disabled, ignoring --with-ldbm-module argument" >&5
-echo "$as_me: WARNING: LDBM disabled, ignoring --with-ldbm-module argument" >&2;}
+               echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
        fi
 
        if test $ol_enable_modules != yes -a \
                $ol_enable_bdb = no -a \
                $ol_enable_dnssrv = no -a \
+               $ol_enable_hdb = no -a \
                $ol_enable_ldap = no -a \
                $ol_enable_meta = no -a \
                $ol_enable_monitor = no -a \
@@ -3206,116 +2367,88 @@ echo "$as_me: WARNING: LDBM disabled, ignoring --with-ldbm-module argument" >&2;
                $ol_enable_passwd = no -a \
                $ol_enable_perl = no -a \
                $ol_enable_shell = no -a \
-               $ol_enable_sql = no -a \
-               $ol_enable_tcl = no ; then
+               $ol_enable_sql = no ; then
 
                if test $ol_enable_slapd = yes ; then
-                       { { echo "$as_me:$LINENO: error: slapd requires a backend" >&5
-echo "$as_me: error: slapd requires a backend" >&2;}
-   { (exit 1); exit 1; }; }
+                       { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
                else
-                       { echo "$as_me:$LINENO: WARNING: skipping slapd, no backend specified" >&5
-echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
+                       echo "configure: warning: skipping slapd, no backend specified" 1>&2
                        ol_enable_slapd=no
                fi
        fi
 
        ol_with_ldbm_api=no
        ol_with_ldbm_type=no
-       ol_with_ldbm_module=static
 
-       if test $ol_enable_bdb != no ; then
+       if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
                ol_with_ldbm_api=berkeley
        fi
 
 else
                if test $ol_with_ldbm_api = gdbm -a \
                $ol_with_ldbm_type = btree ; then
-               { { echo "$as_me:$LINENO: error: GDBM only supports LDBM type hash" >&5
-echo "$as_me: error: GDBM only supports LDBM type hash" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
        fi
        if test $ol_with_ldbm_api = mdbm -a \
                $ol_with_ldbm_type = btree ; then
-               { { echo "$as_me:$LINENO: error: MDBM only supports LDBM type hash" >&5
-echo "$as_me: error: MDBM only supports LDBM type hash" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
        fi
        if test $ol_with_ldbm_api = ndbm -a \
                $ol_with_ldbm_type = btree ; then
-               { { echo "$as_me:$LINENO: error: NDBM only supports LDBM type hash" >&5
-echo "$as_me: error: NDBM only supports LDBM type hash" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
        fi
 
-       if test $ol_enable_bdb = yes ; then
+       if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
                if test $ol_with_ldbm_api = auto ; then
                        ol_with_ldbm_api=berkeley
                elif test $ol_with_ldbm_api != berkeley ; then
-                       { { echo "$as_me:$LINENO: error: LDBM API not compatible with BDB" >&5
-echo "$as_me: error: LDBM API not compatible with BDB" >&2;}
-   { (exit 1); exit 1; }; }
-               fi
-
-       elif test $ol_enable_bdb = auto ; then
-               if test $ol_with_ldbm_api != berkeley \
-                       -o $ol_with_ldbm_api != auto ; then
-                       { echo "$as_me:$LINENO: WARNING: LDBM API not compatible with BDB, disabling BDB" >&5
-echo "$as_me: WARNING: LDBM API not compatible with BDB, disabling BDB" >&2;}
-                       ol_enable_bdb=no
+                       { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
                fi
        fi
 fi
 
+if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
+       { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
+fi
+
 if test $ol_enable_slurpd = yes ; then
                if test $ol_with_threads = no ; then
-               { { echo "$as_me:$LINENO: error: slurpd requires threads" >&5
-echo "$as_me: error: slurpd requires threads" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
        fi
 fi
 
 if test $ol_enable_lmpasswd = yes ; then
        if test $ol_with_tls = no ; then
-               { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
-echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
        fi
 fi
 
-if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
+if test $ol_enable_kbind = yes ; then
        if test $ol_with_kerberos = no ; then
-               { { echo "$as_me:$LINENO: error: options require --with-kerberos" >&5
-echo "$as_me: error: options require --with-kerberos" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
        elif test $ol_with_kerberos = auto ; then
                ol_with_kerberos=yes
        fi
 
-elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
+elif test $ol_enable_kbind = no ; then
        if test $ol_with_kerberos = auto ; then
                ol_with_kerberos=no
        elif test $ol_with_kerberos != no ; then
-               { echo "$as_me:$LINENO: WARNING: Kerberos detection enabled unnecessarily" >&5
-echo "$as_me: WARNING: Kerberos detection enabled unnecessarily" >&2;};
+               echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
                ol_with_kerberos=no
        fi
 fi
 
 if test $ol_enable_spasswd = yes ; then
        if test $ol_with_cyrus_sasl = no ; then
-               { { echo "$as_me:$LINENO: error: options require --with-cyrus-sasl" >&5
-echo "$as_me: error: options require --with-cyrus-sasl" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
        fi
        ol_with_cyrus_sasl=yes
 fi
 
-echo "$as_me:$LINENO: result: done" >&5
-echo "${ECHO_T}done" >&6
+echo "$ac_t""done" 1>&6
 
 LDAP_LIBS=
-LDIF_LIBS=
 LDBM_LIBS=
 LTHREAD_LIBS=
 LUTIL_LIBS=
@@ -3333,6 +2466,7 @@ SLAPD_SLAPI_DEPEND=
 
 BUILD_BDB=no
 BUILD_DNSSRV=no
+BUILD_HDB=no
 BUILD_LDAP=no
 BUILD_LDBM=no
 BUILD_META=no
@@ -3342,20 +2476,11 @@ BUILD_PASSWD=no
 BUILD_PERL=no
 BUILD_SHELL=no
 BUILD_SQL=no
-BUILD_TCL=no
-
-BUILD_BDB_DYNAMIC=static
-BUILD_DNSSRV_DYNAMIC=static
-BUILD_LDAP_DYNAMIC=static
-BUILD_LDBM_DYNAMIC=static
-BUILD_META_DYNAMIC=static
-BUILD_MONITOR_DYNAMIC=static
-BUILD_NULL_DYNAMIC=static
-BUILD_PASSWD_DYNAMIC=static
-BUILD_PERL_DYNAMIC=static
-BUILD_SHELL_DYNAMIC=static
-BUILD_TCL_DYNAMIC=static
-BUILD_SQL_DYNAMIC=static
+
+BUILD_DYNGROUP=no
+BUILD_PROXYCACHE=no
+
+SLAPD_DYNAMIC_OVERLAYS=
 
 SLAPD_MODULES_LDFLAGS=
 SLAPD_MODULES_CPPFLAGS=
@@ -3371,12 +2496,9 @@ SLAPD_SQL_LDFLAGS=
 SLAPD_SQL_LIBS=
 SLAPD_SQL_INCLUDES=
 
-MOD_TCL_LIB=
 KRB4_LIBS=
 KRB5_LIBS=
-READLINE_LIBS=
 SASL_LIBS=
-TERMCAP_LIBS=
 TLS_LIBS=
 MODULES_LIBS=
 SLAPI_LIBS=
@@ -3387,35 +2509,6 @@ AUTH_LIBS=
 SLAPD_SLP_LIBS=
 
 
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.make <<\_ACEOF
-all:
-       @echo 'ac_maketemp="$(MAKE)"'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftest.make
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-  SET_MAKE=
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
 # incompatible versions:
@@ -3423,67 +2516,58 @@ fi
 # SunOS /usr/etc/install
 # IRIX /sbin/install
 # AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:2525: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if eval "test \"\${ac_cv_path_install+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-          if test $ac_prog = install &&
-            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-            # AIX install.  It has an incompatible calling convention.
-            :
-          elif test $ac_prog = install &&
-            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-            # program-specific install script used by HP pwplus--don't use.
-            :
-          else
-            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-            break 3
-          fi
-        fi
+    IFS="${IFS=        }"; ac_save_IFS="$IFS"; IFS=":"
+  for ac_dir in $PATH; do
+    # Account for people who put trailing slashes in PATH elements.
+    case "$ac_dir/" in
+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall scoinst install; do
+        if test -f $ac_dir/$ac_prog; then
+         if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           :
+         elif test $ac_prog = install &&
+           grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
+           # program-specific install script used by HP pwplus--don't use.
+           :
+         else
+           ac_cv_path_install="$ac_dir/$ac_prog -c"
+           break 2
+         fi
+       fi
       done
-    done
-    ;;
-esac
-done
-
+      ;;
+    esac
+  done
+  IFS="$ac_save_IFS"
 
 fi
   if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
+    INSTALL="$ac_cv_path_install"
   else
     # As a last resort, use the slow shell script.  We don't cache a
     # path for INSTALL within a source directory, because that will
     # break other packages using the cache if that directory is
     # removed, or if the path is relative.
-    INSTALL=$ac_install_sh
+    INSTALL="$ac_install_sh"
   fi
 fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
+echo "$ac_t""$INSTALL" 1>&6
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
@@ -3494,10 +2578,9 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 
-
-cat >>confdefs.h <<\_ACEOF
+cat >> confdefs.h <<\EOF
 #define HAVE_MKVERSION 1
-_ACEOF
+EOF
 
 
 
@@ -3516,53 +2599,44 @@ if test $ol_aix_threads = yes ; then
        if test -z "${CC}" ; then
                for ac_prog in cc_r xlc_r cc
 do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
+# 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_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2606: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-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_CC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
 fi
 fi
-CC=$ac_cv_prog_CC
+CC="$ac_cv_prog_CC"
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  echo "$ac_t""$CC" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
-  test -n "$CC" && break
+test -n "$CC" && break
 done
 
 
                if test "$CC" = cc ; then
                                                if test $ol_with_threads != auto ; then
-                               { { echo "$as_me:$LINENO: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&5
-echo "$as_me: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&2;}
-   { (exit 1); exit 1; }; }
+                               { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
                        else
-                               { echo "$as_me:$LINENO: WARNING: disabling threads, no cc_r on AIX" >&5
-echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
+                               echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
                        fi
                        ol_with_threads=no
                fi
 if test -z "${CC}"; then
        for ac_prog in cc gcc
 do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
+# 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_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2658: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-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_CC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
 fi
 fi
-CC=$ac_cv_prog_CC
+CC="$ac_cv_prog_CC"
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  echo "$ac_t""$CC" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
-  test -n "$CC" && break
+test -n "$CC" && break
 done
 test -n "$CC" || CC="missing"
 
 
        if test "${CC}" = "missing" ; then
-               { { echo "$as_me:$LINENO: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&5
-echo "$as_me: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
        fi
 fi
 
 if test -z "${AR}"; then
        for ac_prog in ar gar
 do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
+# 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_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2700: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$AR"; then
   ac_cv_prog_AR="$AR" # Let the user override the test.
 else
-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_AR="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_AR="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
 fi
 fi
-AR=$ac_cv_prog_AR
+AR="$ac_cv_prog_AR"
 if test -n "$AR"; then
-  echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
+  echo "$ac_t""$AR" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
-  test -n "$AR" && break
+test -n "$AR" && break
 done
 test -n "$AR" || AR="missing"
 
 
        if test "${AR}" = "missing" ; then
-               { { echo "$as_me:$LINENO: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&5
-echo "$as_me: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
        fi
 fi
 
 
 
+# Find the correct PATH separator.  Usually this is `:', but
+# DJGPP uses `;' like DOS.
+if test "X${PATH_SEPARATOR+set}" != Xset; then
+  UNAME=${UNAME-`uname 2>/dev/null`}
+  case X$UNAME in
+    *-DOS) lt_cv_sys_path_separator=';' ;;
+    *)     lt_cv_sys_path_separator=':' ;;
+  esac
+  PATH_SEPARATOR=$lt_cv_sys_path_separator
+fi
+
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:2750: checking for Cygwin environment" >&5
+if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2755 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:2766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_cygwin=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_cygwin=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_cygwin" 1>&6
+CYGWIN=
+test "$ac_cv_cygwin" = yes && CYGWIN=yes
+echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
+echo "configure:2782: checking for mingw32 environment" >&5
+if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2787 "configure"
+#include "confdefs.h"
+
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:2794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_mingw32=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_mingw32=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_mingw32" 1>&6
+MINGW32=
+test "$ac_cv_mingw32" = yes && MINGW32=yes
+echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
+echo "configure:2810: checking for EMX OS/2 environment" >&5
+if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2815 "configure"
+#include "confdefs.h"
+
+int main() {
+return __EMX__;
+; return 0; }
+EOF
+if { (eval echo configure:2822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_emxos2=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_emxos2=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_emxos2" 1>&6
+EMXOS2=
+test "$ac_cv_emxos2" = yes && EMXOS2=yes
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:2838: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 2853 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 2870 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 2887 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
 # Check whether --enable-fast-install or --disable-fast-install was given.
 if test "${enable_fast_install+set}" = set; then
   enableval="$enable_fast_install"
@@ -3697,644 +2934,216 @@ no) enable_fast_install=no ;;
 esac
 else
   enable_fast_install=yes
-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 -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; 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_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2943: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-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_CC="${ac_tool_prefix}gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="gcc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
 fi
 fi
-CC=$ac_cv_prog_CC
+CC="$ac_cv_prog_CC"
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  echo "$ac_t""$CC" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; 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_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  CC=$ac_ct_CC
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; 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_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # 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_CC="${ac_tool_prefix}cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; 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_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  CC=$ac_ct_CC
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2973: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
   ac_prog_rejected=no
-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
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+       continue
+      fi
+      ac_cv_prog_CC="cc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
 if test $ac_prog_rejected = yes; then
   # We found a bogon in the path, so make sure we never use it.
   set dummy $ac_cv_prog_CC
   shift
-  if test $# != 0; then
+  if test $# -gt 0; then
     # We chose a different compiler from the bogus one.
     # However, it has the same basename, so the bogon will be chosen
     # first if we set CC to just the basename; use the full file name.
     shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+    set dummy "$ac_dir/$ac_word" "$@"
+    shift
+    ac_cv_prog_CC="$@"
   fi
 fi
 fi
 fi
-CC=$ac_cv_prog_CC
+CC="$ac_cv_prog_CC"
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  echo "$ac_t""$CC" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl
-  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_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  if test -z "$CC"; then
+    case "`uname -s`" in
+    *win32* | *WIN32* | *CYGWIN*)
+      # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3024: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
-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_CC="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="cl"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
 fi
 fi
-CC=$ac_cv_prog_CC
+CC="$ac_cv_prog_CC"
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  echo "$ac_t""$CC" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-    test -n "$CC" && break
-  done
+  echo "$ac_t""no" 1>&6
 fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl
-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_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
+ ;;
+    esac
   fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 fi
 
-  test -n "$ac_ct_CC" && break
-done
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:3056: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
 
-  CC=$ac_ct_CC
-fi
-
-fi
-
-
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-
-# 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); }
-
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
 
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output" >&5
-echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
-  (eval $ac_link_default) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # Find the output, starting from the most likely.  This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
-        ;;
-    conftest.$ac_ext )
-        # This is the source file.
-        ;;
-    [ab].out )
-        # We found the default executable, but exeext='' is most
-        # certainly right.
-        break;;
-    *.* )
-        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-        # FIXME: I believe we export ac_cv_exeext for Libtool,
-        # but it would be cool to find out if it's true.  Does anybody
-        # maintain Libtool? --akim.
-        export ac_cv_exeext
-        break;;
-    * )
-        break;;
-  esac
-done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-fi
-
-ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-
-# Check the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
-  if { ac_try='./$ac_file'
-  { (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
-    cross_compiling=no
+cat > conftest.$ac_ext << EOF
+
+#line 3067 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  ac_cv_prog_cc_works=yes
+  # If we can't run a trivial program, we are probably using a cross compiler.
+  if (./conftest; exit) 2>/dev/null; then
+    ac_cv_prog_cc_cross=no
   else
-    if test "$cross_compiling" = maybe; then
-       cross_compiling=yes
-    else
-       { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-    fi
+    ac_cv_prog_cc_cross=yes
   fi
-fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-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); }; then
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-          export ac_cv_exeext
-          break;;
-    * ) break;;
-  esac
-done
 else
-  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_prog_cc_works=no
 fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
 
-rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
-if test "${ac_cv_objext+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:3098: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-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); }; then
-  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:3103: checking whether we are using GNU C" >&5
+if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+  cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
+else
+  ac_cv_prog_gcc=no
 fi
-
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-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_c_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-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
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_compiler_gnu=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
 
-  ;
-  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_cc_g=yes
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  GCC=
+fi
 
-ac_cv_prog_cc_g=no
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:3131: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_g=yes
+else
+  ac_cv_prog_cc_g=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
+
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
 if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
+  CFLAGS="$ac_save_CFLAGS"
 elif test $ac_cv_prog_cc_g = yes; then
   if test "$GCC" = yes; then
     CFLAGS="-g -O2"
@@ -4348,235 +3157,6 @@ else
     CFLAGS=
   fi
 fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX                  -qlanglvl=ansi
-# Ultrix and OSF/1     -std1
-# HP-UX 10.20 and later        -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4                 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  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_cc_stdc=$ac_arg
-break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
-  x|xno)
-    echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
-  *)
-    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
-    CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-# Some people use a C++ compiler to compile C.  Since we use `exit',
-# in C++ we need to declare it.  In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
-  choke me
-#endif
-_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
-  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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-$ac_declaration
-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
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-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
-sed 's/^/| /' 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
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-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
-
-# Find the correct PATH separator.  Usually this is `:', but
-# DJGPP uses `;' like DOS.
-if test "X${PATH_SEPARATOR+set}" != Xset; then
-  UNAME=${UNAME-`uname 2>/dev/null`}
-  case X$UNAME in
-    *-DOS) lt_cv_sys_path_separator=';' ;;
-    *)     lt_cv_sys_path_separator=':' ;;
-  esac
-  PATH_SEPARATOR=$lt_cv_sys_path_separator
-fi
-
 
 # Check whether --with-gnu-ld or --without-gnu-ld was given.
 if test "${with_gnu_ld+set}" = set; then
@@ -4584,12 +3164,13 @@ if test "${with_gnu_ld+set}" = set; then
   test "$withval" = no || with_gnu_ld=yes
 else
   with_gnu_ld=no
-fi;
+fi
+
 ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
-  echo "$as_me:$LINENO: checking for ld used by GCC" >&5
-echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
+  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
+echo "configure:3174: checking for ld used by GCC" >&5
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return which upsets mingw
@@ -4618,14 +3199,14 @@ echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
     ;;
   esac
 elif test "$with_gnu_ld" = yes; then
-  echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+  echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
+echo "configure:3204: checking for GNU ld" >&5
 else
-  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+echo "configure:3207: checking for non-GNU ld" >&5
 fi
-if test "${lt_cv_path_LD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -z "$LD"; then
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
@@ -4651,19 +3232,15 @@ fi
 
 LD="$lt_cv_path_LD"
 if test -n "$LD"; then
-  echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
+  echo "$ac_t""$LD" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
+echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
+echo "configure:3242: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
@@ -4672,27 +3249,27 @@ else
   lt_cv_prog_gnu_ld=no
 fi
 fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+
+echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
 with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
-if test "${lt_cv_ld_reload_flag+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
+echo "configure:3259: checking for $LD option to reload object files" >&5
+if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   lt_cv_ld_reload_flag='-r'
 fi
-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+
+echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
 reload_flag=$lt_cv_ld_reload_flag
 test -n "$reload_flag" && reload_flag=" $reload_flag"
 
-echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
-if test "${lt_cv_path_NM+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
+echo "configure:3271: checking for BSD-compatible nm" >&5
+if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$NM"; then
   # Let the user override the test.
@@ -4725,13 +3302,12 @@ fi
 fi
 
 NM="$lt_cv_path_NM"
-echo "$as_me:$LINENO: result: $NM" >&5
-echo "${ECHO_T}$NM" >&6
+echo "$ac_t""$NM" 1>&6
 
-echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
-if test "${lt_cv_path_SED+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
+echo "configure:3309: checking for a sed that does not truncate output" >&5
+if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   # Loop through the user's path and test for sed and gsed.
 # Then use that list of sed's as ones to test for truncation.
@@ -4810,24 +3386,33 @@ if test "X$SED" != "X"; then
 else
   SED=$lt_cv_path_SED
 fi
-echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6
+echo "$ac_t""$SED" 1>&6
 
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:3393: checking whether ln -s works" >&5
+if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
+  rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+  rm -f conftestdata
+  ac_cv_prog_LN_S="ln -s"
+else
+  ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
-echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
-if test "${lt_cv_deplibs_check_method+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
+echo "configure:3414: checking how to recognise dependent libraries" >&5
+if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   lt_cv_file_magic_cmd='$MAGIC_CMD'
 lt_cv_file_magic_test_file=
@@ -4959,6 +3544,10 @@ openbsd*)
   fi
   ;;
 
+openedition*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
 osf3* | osf4* | osf5*)
   # this will be overridden with pass_all, but let us keep it just in case
   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
@@ -5005,25 +3594,85 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 esac
 
 fi
-echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
+
+echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
 file_magic_cmd=$lt_cv_file_magic_cmd
 deplibs_check_method=$lt_cv_deplibs_check_method
 
+echo $ac_n "checking for object suffix""... $ac_c" 1>&6
+echo "configure:3604: checking for object suffix" >&5
+if eval "test \"\${ac_cv_objext+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  rm -f conftest*
+echo 'int i = 1;' > conftest.$ac_ext
+if { (eval echo configure:3610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  for ac_file in conftest.*; do
+    case $ac_file in
+    *.c) ;;
+    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
+    esac
+  done
+else
+  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+fi
+rm -f conftest*
+fi
 
+echo "$ac_t""$ac_cv_objext" 1>&6
+OBJEXT=$ac_cv_objext
+ac_objext=$ac_cv_objext
 
 
 
 
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:3631: checking for executable suffix" >&5
+if eval "test \"\${ac_cv_exeext+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
+  ac_cv_exeext=.exe
+else
+  rm -f conftest*
+  echo 'int main () { return 0; }' > conftest.$ac_ext
+  ac_cv_exeext=
+  if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+    for file in conftest.*; do
+      case $file in
+      *.c | *.C | *.o | *.obj | *.xcoff) ;;
+      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+      esac
+    done
+  else
+    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+  fi
+  rm -f conftest*
+  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
 
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
 
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-echo "$as_me:$LINENO: checking command to parse $NM output" >&5
-echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $host != $build; then
+  ac_tool_prefix=${host_alias}-
 else
+  ac_tool_prefix=
+fi
+
+
+
 
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
+echo "configure:3672: checking command to parse $NM output" >&5
+if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
 # These are sane defaults that work on at least a few old systems.
 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
@@ -5102,18 +3751,10 @@ void nm_test_func(){}
 int main(){nm_test_var='a';nm_test_func();return(0);}
 EOF
 
-  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); }; then
+  if { (eval echo configure:3755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
-  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s "$nlist"; then
+    if { (eval echo configure:3758: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
        mv -f "$nlist"T "$nlist"
@@ -5164,11 +3805,7 @@ EOF
          save_CFLAGS="$CFLAGS"
          LIBS="conftstm.$ac_objext"
          CFLAGS="$CFLAGS$no_builtin_flag"
-         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); } && test -s conftest$ac_exeext; then
+         if { (eval echo configure:3809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
            pipe_works=yes
          fi
          LIBS="$save_LIBS"
@@ -5208,626 +3845,49 @@ else
 fi
 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
 then
-  echo "$as_me:$LINENO: result: failed" >&5
-echo "${ECHO_T}failed" >&6
-else
-  echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6
-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 how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                     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=$?
-  grep -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
-  :
+  echo "$ac_t""failed" 1>&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' 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
+  echo "$ac_t""ok" 1>&6
 fi
 
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
+for ac_hdr in dlfcn.h
 do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                     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=$?
-  grep -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
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' 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 \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&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
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-    then ac_cv_prog_egrep='grep -E'
-    else ac_cv_prog_egrep='egrep'
-    fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-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_header_stdc=yes
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3858: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f conftest.$ac_objext 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-fi
-rm -f conftest*
-
-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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
+  cat > conftest.$ac_ext <<EOF
+#line 3863 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  ac_cv_header_stdc=no
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
 rm -f conftest*
-
-fi
-
-if 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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)))
-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_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'
-  { (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: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
 fi
-rm -f core core.* *.core gmon.out bb.out 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
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f 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
-_ACEOF
-
-fi
-
-done
-
-
-
-for ac_header in dlfcn.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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 eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
 else
-  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
-
+  echo "$ac_t""no" 1>&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
-
-fi
-
 done
 
 
@@ -5839,10 +3899,10 @@ done
 case $deplibs_check_method in
 file_magic*)
   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
+echo "configure:3904: checking for ${ac_tool_prefix}file" >&5
+if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   case $MAGIC_CMD in
   /*)
@@ -5894,19 +3954,17 @@ fi
 
 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 if test -n "$MAGIC_CMD"; then
-  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
+  echo "$ac_t""$MAGIC_CMD" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
 if test -z "$lt_cv_path_MAGIC_CMD"; then
   if test -n "$ac_tool_prefix"; then
-    echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    echo $ac_n "checking for file""... $ac_c" 1>&6
+echo "configure:3966: checking for file" >&5
+if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   case $MAGIC_CMD in
   /*)
@@ -5958,11 +4016,9 @@ fi
 
 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 if test -n "$MAGIC_CMD"; then
-  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
+  echo "$ac_t""$MAGIC_CMD" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
   else
   ;;
 esac
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4037: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
 fi
 fi
-RANLIB=$ac_cv_prog_RANLIB
+RANLIB="$ac_cv_prog_RANLIB"
 if test -n "$RANLIB"; then
-  echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
+  echo "$ac_t""$RANLIB" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
-fi
+
 if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
+if test -n "$ac_tool_prefix"; then
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4069: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
 fi
 fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
-  RANLIB=$ac_ct_RANLIB
 else
-  RANLIB="$ac_cv_prog_RANLIB"
+  RANLIB=":"
+fi
 fi
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
 set dummy ${ac_tool_prefix}strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4104: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test -n "$STRIP"; then
   ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
 fi
 fi
-STRIP=$ac_cv_prog_STRIP
+STRIP="$ac_cv_prog_STRIP"
 if test -n "$STRIP"; then
-  echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
+  echo "$ac_t""$STRIP" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
-fi
+
 if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
+if test -n "$ac_tool_prefix"; then
   # Extract the first word of "strip", so it can be a program name with args.
 set dummy strip; 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_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4136: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_STRIP="strip"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
 fi
 fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+  echo "$ac_t""$STRIP" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
-  STRIP=$ac_ct_STRIP
 else
-  STRIP="$ac_cv_prog_STRIP"
+  STRIP=":"
+fi
 fi
 
 
-enable_dlopen=no
-enable_win32_dll=no
+enable_dlopen=yes
+enable_win32_dll=yes
 
 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
 if test "${enable_libtool_lock+set}" = set; then
   enableval="$enable_libtool_lock"
+  :
+fi
 
-fi;
 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
 # Some flags need to be propagated to the compiler or linker for good
@@ -6150,12 +4181,8 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 case $host in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6153 "configure"' > conftest.$ac_ext
-  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); }; then
+  echo '#line 4185 "configure"' > conftest.$ac_ext
+  if { (eval echo configure:4186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     case `/usr/bin/file conftest.$ac_objext` in
     *32-bit*)
       LD="${LD-ld} -32"
@@ -6175,71 +4202,326 @@ case $host in
   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
   SAVE_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -belf"
-  echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
-if test "${lt_cv_cc_needs_belf+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
+echo "configure:4207: checking whether the C compiler needs -belf" >&5
+if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-
+  
      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -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
-
-     cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
 
-  ;
-  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
+     cat > conftest.$ac_ext <<EOF
+#line 4220 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:4227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   lt_cv_cc_needs_belf=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-lt_cv_cc_needs_belf=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  lt_cv_cc_needs_belf=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -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
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
 
 fi
-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
+
+echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
     CFLAGS="$SAVE_CFLAGS"
   fi
   ;;
 
+*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4257: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+DLLTOOL="$ac_cv_prog_DLLTOOL"
+if test -n "$DLLTOOL"; then
+  echo "$ac_t""$DLLTOOL" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_DLLTOOL"; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4289: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_DLLTOOL="dlltool"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
+fi
+fi
+DLLTOOL="$ac_cv_prog_DLLTOOL"
+if test -n "$DLLTOOL"; then
+  echo "$ac_t""$DLLTOOL" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  DLLTOOL="false"
+fi
+fi
+
+  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4324: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$AS"; then
+  ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_AS="${ac_tool_prefix}as"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+AS="$ac_cv_prog_AS"
+if test -n "$AS"; then
+  echo "$ac_t""$AS" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_AS"; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4356: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$AS"; then
+  ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_AS="as"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
+fi
+fi
+AS="$ac_cv_prog_AS"
+if test -n "$AS"; then
+  echo "$ac_t""$AS" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  AS="false"
+fi
+fi
+
+  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4391: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+OBJDUMP="$ac_cv_prog_OBJDUMP"
+if test -n "$OBJDUMP"; then
+  echo "$ac_t""$OBJDUMP" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_OBJDUMP"; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:4423: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_OBJDUMP="objdump"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
+fi
+fi
+OBJDUMP="$ac_cv_prog_OBJDUMP"
+if test -n "$OBJDUMP"; then
+  echo "$ac_t""$OBJDUMP" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  OBJDUMP="false"
+fi
+fi
+
+
+  # recent cygwin and mingw systems supply a stub DllMain which the user
+  # can override, but on older systems we have to supply one
+  echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
+echo "configure:4459: checking if libtool should supply DllMain function" >&5
+if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4464 "configure"
+#include "confdefs.h"
+
+int main() {
+extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
+      DllMain (0, 0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:4472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  lt_cv_need_dllmain=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  lt_cv_need_dllmain=yes
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$lt_cv_need_dllmain" 1>&6
+
+  case $host/$CC in
+  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
+    # old mingw systems require "-dll" to link a DLL, while more recent ones
+    # require "-mdll"
+    SAVE_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -mdll"
+    echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
+echo "configure:4493: checking how to link DLLs" >&5
+if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 4498 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:4505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  lt_cv_cc_dll_switch=-mdll
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  lt_cv_cc_dll_switch=-dll
+fi
+rm -f conftest*
+fi
 
+echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
+    CFLAGS="$SAVE_CFLAGS" ;;
+  *-*-cygwin* | *-*-pw32*)
+    # cygwin systems need to pass --dll to the linker, and not link
+    # crt.o which will require a WinMain@16 definition.
+    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
+  esac
+  ;;
+  
 esac
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
@@ -6332,8 +4614,8 @@ fi
 set dummy $CC
 compiler="$2"
 
-echo "$as_me:$LINENO: checking for objdir" >&5
-echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+echo $ac_n "checking for objdir""... $ac_c" 1>&6
+echo "configure:4619: checking for objdir" >&5
 rm -f .libs 2>/dev/null
 mkdir .libs 2>/dev/null
 if test -d .libs; then
@@ -6343,9 +4625,7 @@ else
   objdir=_libs
 fi
 rmdir .libs 2>/dev/null
-echo "$as_me:$LINENO: result: $objdir" >&5
-echo "${ECHO_T}$objdir" >&6
-
+echo "$ac_t""$objdir" 1>&6
 
 
 # Check whether --with-pic or --without-pic was given.
@@ -6354,16 +4634,17 @@ if test "${with_pic+set}" = set; then
   pic_mode="$withval"
 else
   pic_mode=default
-fi;
+fi
+
 test -z "$pic_mode" && pic_mode=default
 
 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
 # in isolation, and that seeing it set (from the cache) indicates that
 # the associated values are set (in the cache) correctly too.
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
-if test "${lt_cv_prog_cc_pic+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
+echo "configure:4646: checking for $compiler option to produce PIC" >&5
+if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
    lt_cv_prog_cc_pic=
   lt_cv_prog_cc_shlib=
@@ -6451,6 +4732,10 @@ else
       lt_cv_prog_cc_pic='-KPIC'
       lt_cv_prog_cc_static='-Bstatic'
       ;;
+    
+    openedition)
+      # XPLINK code is PIC by default
+      ;;
 
     osf3* | osf4* | osf5*)
       # All OSF/1 code is PIC.
@@ -6503,48 +4788,28 @@ else
 fi
 
 if test -z "$lt_cv_prog_cc_pic"; then
-  echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
+  echo "$ac_t""none" 1>&6
 else
-  echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5
-echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6
+  echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
 
   # Check to make sure the pic_flag actually works.
-  echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6
-  if test "${lt_cv_prog_cc_pic_works+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
+echo "configure:4798: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
+  if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
       save_CFLAGS="$CFLAGS"
     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
+    cat > conftest.$ac_ext <<EOF
+#line 4805 "configure"
+#include "confdefs.h"
 
-  ;
-  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
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:4812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
         case $host_os in
       hpux9* | hpux10* | hpux11*)
        # On HP-UX, both CC and GCC only warn that PIC is supported... then
@@ -6560,17 +4825,17 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
        lt_cv_prog_cc_pic_works=yes
        ;;
       esac
-
+    
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-      lt_cv_prog_cc_pic_works=no
-
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+        lt_cv_prog_cc_pic_works=no
+    
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
     CFLAGS="$save_CFLAGS"
-
+  
 fi
 
 
@@ -6581,65 +4846,43 @@ fi
     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
   fi
 
-  echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5
-echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6
+  echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
 fi
 
 # Check for any special shared library compilation flags.
 if test -n "$lt_cv_prog_cc_shlib"; then
-  { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5
-echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;}
+  echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
   if echo "$old_CC $old_CFLAGS " | egrep -e "[         ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
   else
-   { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
-echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
+   echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
     lt_cv_prog_cc_can_build_shared=no
   fi
 fi
 
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6
-if test "${lt_cv_prog_cc_static_works+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
+echo "configure:4864: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
+if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
     lt_cv_prog_cc_static_works=no
   save_LDFLAGS="$LDFLAGS"
   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
+  cat > conftest.$ac_ext <<EOF
+#line 4872 "configure"
+#include "confdefs.h"
 
-  ;
-  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
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:4879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   lt_cv_prog_cc_static_works=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
   LDFLAGS="$save_LDFLAGS"
 
 fi
@@ -6647,8 +4890,7 @@ fi
 
 # Belt *and* braces to stop my trousers falling down:
 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
-echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5
-echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6
+echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
 
 pic_flag="$lt_cv_prog_cc_pic"
 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
@@ -6659,12 +4901,12 @@ can_build_shared="$lt_cv_prog_cc_can_build_shared"
 
 
 # Check to see if options -o and -c are simultaneously supported by compiler
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_compiler_c_o+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
+echo "configure:4906: checking if $compiler supports -c -o file.$ac_objext" >&5
+if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
 $rm -r conftest 2>/dev/null
 mkdir conftest
 cd conftest
@@ -6679,7 +4921,7 @@ chmod -w .
 save_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
 compiler_c_o=no
-if { (eval echo configure:6682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:4925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
   # The compiler can only warn and ignore the option if not recognized
   # So say no if there are warnings
   if test -s out/conftest.err; then
@@ -6703,50 +4945,31 @@ $rm -r conftest 2>/dev/null
 fi
 
 compiler_c_o=$lt_cv_compiler_c_o
-echo "$as_me:$LINENO: result: $compiler_c_o" >&5
-echo "${ECHO_T}$compiler_c_o" >&6
+echo "$ac_t""$compiler_c_o" 1>&6
 
 if test x"$compiler_c_o" = x"yes"; then
   # Check to see if we can write to a .lo
-  echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6
-  if test "${lt_cv_compiler_o_lo+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
+echo "configure:4954: checking if $compiler supports -c -o file.lo" >&5
+  if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
   lt_cv_compiler_o_lo=no
   save_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -c -o conftest.lo"
   save_objext="$ac_objext"
   ac_objext=lo
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
+  cat > conftest.$ac_ext <<EOF
+#line 4965 "configure"
+#include "confdefs.h"
+
+int main() {
 int some_variable = 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
+; return 0; }
+EOF
+if { (eval echo configure:4972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
       # The compiler can only warn and ignore the option if not recognized
     # So say no if there are warnings
     if test -s conftest.err; then
@@ -6754,21 +4977,19 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     else
       lt_cv_compiler_o_lo=yes
     fi
-
+  
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
   ac_objext="$save_objext"
   CFLAGS="$save_CFLAGS"
-
+  
 fi
 
   compiler_o_lo=$lt_cv_compiler_o_lo
-  echo "$as_me:$LINENO: result: $compiler_o_lo" >&5
-echo "${ECHO_T}$compiler_o_lo" >&6
+  echo "$ac_t""$compiler_o_lo" 1>&6
 else
   compiler_o_lo=no
 fi
@@ -6777,19 +4998,17 @@ fi
 hard_links="nottested"
 if test "$compiler_c_o" = no && test "$need_locks" != no; then
   # do not overwrite the value of need_locks provided by the user
-  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+  echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
+echo "configure:5003: checking if we can lock with hard links" >&5
   hard_links=yes
   $rm conftest*
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   touch conftest.a
   ln conftest.a conftest.b 2>&5 || hard_links=no
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
+  echo "$ac_t""$hard_links" 1>&6
   if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
     need_locks=warn
   fi
 else
@@ -6798,40 +5017,22 @@ fi
 
 if test "$GCC" = yes; then
   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
-  echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+  echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
+echo "configure:5022: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
   echo "int some_variable = 0;" > conftest.$ac_ext
   save_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
   compiler_rtti_exceptions=no
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
+  cat > conftest.$ac_ext <<EOF
+#line 5028 "configure"
+#include "confdefs.h"
+
+int main() {
 int some_variable = 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
+; return 0; }
+EOF
+if { (eval echo configure:5035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
       # The compiler can only warn and ignore the option if not recognized
     # So say no if there are warnings
     if test -s conftest.err; then
@@ -6839,16 +5040,14 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
     else
       compiler_rtti_exceptions=yes
     fi
-
+  
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
   CFLAGS="$save_CFLAGS"
-  echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$compiler_rtti_exceptions" >&6
+  echo "$ac_t""$compiler_rtti_exceptions" 1>&6
 
   if test "$compiler_rtti_exceptions" = "yes"; then
     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
@@ -6858,8 +5057,8 @@ echo "${ECHO_T}$compiler_rtti_exceptions" >&6
 fi
 
 # See if the linker supports building shared libraries.
-echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6
+echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
+echo "configure:5062: checking whether the linker ($LD) supports shared libraries" >&5
 
 allow_undefined_flag=
 no_undefined_flag=
@@ -7362,6 +5561,12 @@ else
     fi
     ;;
 
+  openedition*)
+    archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
+       cp \$linknames \$output_objdir && linknames=''"
+    export_dynamic_flag_spec="-Wl,DLL"
+    ;;
+
   os2*)
     hardcode_libdir_flag_spec='-L$libdir'
     hardcode_minus_L=yes
@@ -7553,13 +5758,12 @@ EOF
     ;;
   esac
 fi
-echo "$as_me:$LINENO: result: $ld_shlibs" >&5
-echo "${ECHO_T}$ld_shlibs" >&6
+echo "$ac_t""$ld_shlibs" 1>&6
 test "$ld_shlibs" = no && can_build_shared=no
 
 # Check hardcoding attributes.
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
+echo "configure:5767: checking how to hardcode library paths into programs" >&5
 hardcode_action=
 if test -n "$hardcode_libdir_flag_spec" || \
    test -n "$runpath_var"; then
@@ -7582,29 +5786,26 @@ else
   # directories.
   hardcode_action=unsupported
 fi
-echo "$as_me:$LINENO: result: $hardcode_action" >&5
-echo "${ECHO_T}$hardcode_action" >&6
+echo "$ac_t""$hardcode_action" 1>&6
 
 striplib=
 old_striplib=
-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
+echo "configure:5795: checking whether stripping libraries is possible" >&5
 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+  echo "$ac_t""yes" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 # PORTME Fill in your ld.so characteristics
-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
+echo "configure:5809: checking dynamic linker characteristics" >&5
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
@@ -7906,6 +6107,17 @@ openbsd*)
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
+openedition*)
+  need_lib_prefix=no
+  need_version=no
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=LIBPATH
+  postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
+  # the library's exports are in libname.x; this is the file that must
+  # actually be linked with to use a DLL.
+  library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
+  ;;
+
 os2*)
   libname_spec='$name'
   need_lib_prefix=no
@@ -8010,18 +6222,16 @@ sysv4*MP*)
   dynamic_linker=no
   ;;
 esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
+echo "$ac_t""$dynamic_linker" 1>&6
 test "$dynamic_linker" = no && can_build_shared=no
 
 # Report the final consequences.
-echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6
+echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
+echo "configure:6231: checking if libtool supports shared libraries" >&5
+echo "$ac_t""$can_build_shared" 1>&6
 
-echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
+echo "configure:6235: checking whether to build shared libraries" >&5
 test "$can_build_shared" = "no" && enable_shared=no
 
 # On AIX, shared libraries and static libraries use the same namespace, and
@@ -8041,15 +6251,13 @@ aix4*)
   fi
   ;;
 esac
-echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6
+echo "$ac_t""$enable_shared" 1>&6
 
-echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
+echo "configure:6258: checking whether to build static libraries" >&5
 # Make sure either enable_shared or enable_static is yes.
 test "$enable_shared" = yes || enable_static=yes
-echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6
+echo "$ac_t""$enable_static" 1>&6
 
 if test "$hardcode_action" = relink; then
   # Fast installation is not supported
@@ -8086,398 +6294,317 @@ else
    ;;
 
   *)
-    echo "$as_me:$LINENO: checking for shl_load" >&5
-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
-if test "${ac_cv_func_shl_load+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+    echo $ac_n "checking for dllload""... $ac_c" 1>&6
+echo "configure:6299: checking for dllload" >&5
+if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6304 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char shl_load (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    which can conflict with char dllload(); 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 shl_load ();
+    builtin and then its argument prototype would still apply.  */
+char dllload();
+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_shl_load) || defined (__stub___shl_load)
+#if defined (__stub_dllload) || defined (__stub___dllload)
 choke me
 #else
-char (*f) () = shl_load;
-#endif
-#ifdef __cplusplus
-}
+f = dllload;
 #endif
 
-int
-main ()
-{
-return f != shl_load;
-  ;
-  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_shl_load=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_shl_load=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-echo "${ECHO_T}$ac_cv_func_shl_load" >&6
-if test $ac_cv_func_shl_load = yes; then
-  lt_cv_dlopen="shl_load"
-else
-  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+; return 0; }
+EOF
+if { (eval echo configure:6328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_dllload=yes"
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_dllload=no"
+fi
+rm -f conftest*
+fi
 
-/* 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 shl_load ();
-int
-main ()
-{
-shl_load ();
-  ;
-  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_dld_shl_load=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dld_shl_load=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_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
-if test $ac_cv_lib_dld_shl_load = yes; then
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  lt_cv_dlopen="dllload"
 else
-  echo "$as_me:$LINENO: checking for dlopen" >&5
-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
-if test "${ac_cv_func_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for shl_load""... $ac_c" 1>&6
+echo "configure:6346: checking for shl_load" >&5
+if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6351 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dlopen (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    which can conflict with char shl_load(); 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 dlopen ();
+    builtin and then its argument prototype would still apply.  */
+char shl_load();
+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_dlopen) || defined (__stub___dlopen)
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
 choke me
 #else
-char (*f) () = dlopen;
-#endif
-#ifdef __cplusplus
-}
+f = shl_load;
 #endif
 
-int
-main ()
-{
-return f != dlopen;
-  ;
-  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_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_dlopen=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-echo "${ECHO_T}$ac_cv_func_dlopen" >&6
-if test $ac_cv_func_dlopen = yes; then
-  lt_cv_dlopen="dlopen"
+; return 0; }
+EOF
+if { (eval echo configure:6375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_shl_load=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_shl_load=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  lt_cv_dlopen="shl_load"
 else
-  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
+echo "configure:6393: checking for shl_load in -ldld" >&5
+ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  ac_save_LIBS="$LIBS"
+LIBS="-ldld  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 6401 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char shl_load();
 
+int main() {
+shl_load()
+; return 0; }
+EOF
+if { (eval echo configure:6412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dlopen""... $ac_c" 1>&6
+echo "configure:6431: checking for dlopen" >&5
+if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 6436 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen(); below.  */
+#include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dlopen();
+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_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+f = dlopen;
 #endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_dlopen=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_dlopen=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  lt_cv_dlopen="dlopen"
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+echo "configure:6478: checking for dlopen in -ldl" >&5
+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-ldl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 6486 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dlopen ();
-int
-main ()
-{
-dlopen ();
-  ;
-  return 0;
-}
-_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_dl_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
+    builtin and then its argument prototype would still apply.  */
+char dlopen();
+
+int main() {
+dlopen()
+; return 0; }
+EOF
+if { (eval echo configure:6497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
 else
-  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
+echo "configure:6516: checking for dlopen in -lsvld" >&5
+ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lsvld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 6524 "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 dlopen ();
-int
-main ()
-{
-dlopen ();
-  ;
-  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_svld_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_svld_dlopen=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_svld_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
-if test $ac_cv_lib_svld_dlopen = yes; then
+    builtin and then its argument prototype would still apply.  */
+char dlopen();
+
+int main() {
+dlopen()
+; return 0; }
+EOF
+if { (eval echo configure:6535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
 else
-  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
+echo "configure:6554: checking for dld_link in -ldld" >&5
+ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 6562 "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 dld_link ();
-int
-main ()
-{
-dld_link ();
-  ;
-  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_dld_dld_link=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dld_dld_link=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_dld_dld_link" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
-if test $ac_cv_lib_dld_dld_link = yes; then
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
-fi
-
+    builtin and then its argument prototype would still apply.  */
+char dld_link();
 
+int main() {
+dld_link()
+; return 0; }
+EOF
+if { (eval echo configure:6573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
-
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
 fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+else
+  echo "$ac_t""no" 1>&6
+fi
 
+             
+fi
 
+           
 fi
 
+         
+fi
 
+       
 fi
 
+      
+fi
 
+    
 fi
 
     ;;
@@ -8500,10 +6627,10 @@ fi
     save_LIBS="$LIBS"
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
-    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
+echo "configure:6632: checking whether a program can dlopen itself" >&5
+if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
          if test "$cross_compiling" = yes; then :
   lt_cv_dlopen_self=cross
@@ -8511,7 +6638,7 @@ else
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 8514 "configure"
+#line 6642 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -8572,11 +6699,7 @@ int main ()
     exit (status);
 }
 EOF
-  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); } && test -s conftest${ac_exeext} 2>/dev/null; then
+  if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
     (./conftest; exit; ) 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -8591,17 +6714,17 @@ EOF
 fi
 rm -fr conftest*
 
-
+    
 fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+echo "$ac_t""$lt_cv_dlopen_self" 1>&6
 
     if test "x$lt_cv_dlopen_self" = xyes; then
       LDFLAGS="$LDFLAGS $link_static_flag"
-      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self_static+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+      echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
+echo "configure:6726: checking whether a statically linked program can dlopen itself" >&5
+if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
          if test "$cross_compiling" = yes; then :
   lt_cv_dlopen_self_static=cross
@@ -8609,7 +6732,7 @@ else
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 8612 "configure"
+#line 6736 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -8670,11 +6793,7 @@ int main ()
     exit (status);
 }
 EOF
-  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); } && test -s conftest${ac_exeext} 2>/dev/null; then
+  if { (eval echo configure:6797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
     (./conftest; exit; ) 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -8689,10 +6808,10 @@ EOF
 fi
 rm -fr conftest*
 
-
+      
 fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+
+echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
     fi
 
     CPPFLAGS="$save_CPPFLAGS"
@@ -8722,19 +6841,15 @@ if test "$enable_shared" = yes && test "$GCC" = yes; then
     # Test whether the compiler implicitly links with -lc since on some
     # systems, -lgcc has to come before -lc. If gcc already passes -lc
     # to ld, don't add -lc before -lgcc.
-    echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
-    if test "${lt_cv_archive_cmds_need_lc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
+echo "configure:6846: checking whether -lc should be explicitly linked in" >&5
+    if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   $rm conftest*
     echo 'static int dummy;' > conftest.$ac_ext
 
-    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); }; then
+    if { (eval echo configure:6853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
       soname=conftest
       lib=conftest
       libobjs=conftest.$ac_objext
@@ -8747,11 +6862,7 @@ else
       libname=conftest
       save_allow_undefined_flag=$allow_undefined_flag
       allow_undefined_flag=
-      if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
+      if { (eval echo configure:6866: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
       then
        lt_cv_archive_cmds_need_lc=no
       else
@@ -8763,8 +6874,7 @@ else
     fi
 fi
 
-    echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5
-echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
+    echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
     ;;
   esac
 fi
@@ -9338,10 +7448,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 # test for ln hardlink support
-echo "$as_me:$LINENO: checking whether ln works" >&5
-echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
-if test "${ol_cv_prog_LN_H+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking whether ln works""... $ac_c" 1>&6
+echo "configure:7453: checking whether ln works" >&5
+if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   rm -f conftest.src conftest.dst
 echo "conftest" > conftest.src
@@ -9356,22 +7466,30 @@ rm -f conftest.src conftest.dst
 fi
 LN_H="$ol_cv_prog_LN_H"
 if test "$ol_cv_prog_LN_H" = "ln"; then
-       echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+       echo "$ac_t""yes" 1>&6
 else
-       echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+       echo "$ac_t""no" 1>&6
 fi
 
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:7476: checking whether ln -s works" >&5
+if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+  rm -f conftestdata
+  ac_cv_prog_LN_S="ln -s"
 else
-  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
+  ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
 fi
 
 
@@ -9379,407 +7497,314 @@ ol_link_perl=no
 if test $ol_enable_perl != no ; then
        # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; 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_PERLBIN+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:7502: checking for $ac_word" >&5
+if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  case $PERLBIN in
-  [\\/]* | ?:[\\/]*)
+  case "$PERLBIN" in
+  /*)
   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
   ;;
+  ?:/*)
+  ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos 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_PERLBIN="$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
-
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_PERLBIN="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
   ;;
 esac
 fi
-PERLBIN=$ac_cv_path_PERLBIN
-
+PERLBIN="$ac_cv_path_PERLBIN"
 if test -n "$PERLBIN"; then
-  echo "$as_me:$LINENO: result: $PERLBIN" >&5
-echo "${ECHO_T}$PERLBIN" >&6
+  echo "$ac_t""$PERLBIN" 1>&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  echo "$ac_t""no" 1>&6
 fi
 
 
        if test "no$PERLBIN" = "no" ; then
                if test $ol_enable_perl = yes ; then
-                       { { echo "$as_me:$LINENO: error: could not locate perl" >&5
-echo "$as_me: error: could not locate perl" >&2;}
-   { (exit 1); exit 1; }; }
+                       { echo "configure: error: could not locate perl" 1>&2; exit 1; }
                fi
 
        else
                PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
-               if test x"$ol_with_perl_module" = "xstatic" ; then
-                       SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
+               PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
+
+               if test x"$ol_enable_perl" = "xyes" ; then
+                       SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
                else
-                       MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
+                       MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
                fi
                                ol_link_perl=yes
        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 how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:7555: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
+if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
   # 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                     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=$?
-  grep -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
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 7570 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
 else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 7587 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
   :
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 7604 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
 else
-  ac_cpp_err=yes
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
 fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
+  CPP="$ac_cv_prog_CPP"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  # Passes both tests.
-ac_preproc_ok=:
-break
+  ac_cv_prog_CPP="$CPP"
 fi
-rm -f conftest.err conftest.$ac_ext
+echo "$ac_t""$CPP" 1>&6
 
-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_CPP=$CPP
 
-fi
-  CPP=$ac_cv_prog_CPP
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:7637: checking for Cygwin environment" >&5
+if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_cv_prog_CPP=$CPP
-fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-                     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=$?
-  grep -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
+  cat > conftest.$ac_ext <<EOF
+#line 7642 "configure"
+#include "confdefs.h"
+
+int main() {
+
+#ifndef __CYGWIN__
+#define __CYGWIN__ __CYGWIN32__
+#endif
+return __CYGWIN__;
+; return 0; }
+EOF
+if { (eval echo configure:7653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_cygwin=yes
 else
-  ac_cpp_err=yes
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_cygwin=no
 fi
-if test -z "$ac_cpp_err"; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+rm -f conftest*
 fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
+echo "$ac_t""$ac_cv_cygwin" 1>&6
+CYGWIN=
+test "$ac_cv_cygwin" = yes && CYGWIN=yes
+echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
+echo "configure:7669: checking for mingw32 environment" >&5
+if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7674 "configure"
+#include "confdefs.h"
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
+int main() {
+return __MINGW32__;
+; return 0; }
+EOF
+if { (eval echo configure:7681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_mingw32=yes
 else
-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_mingw32=no
 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 $cross_compiling = yes -a $ol_enable_x_compile = yes; then
-       { echo "$as_me:$LINENO: WARNING: cross compiling....  some functionality will be removed." >&5
-echo "$as_me: WARNING: cross compiling....  some functionality will be removed." >&2;}
-
-elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
-       { echo "$as_me:$LINENO: WARNING: programs compiled here do run here..." >&5
-echo "$as_me: WARNING: programs compiled here do run here..." >&2;}
-       { { echo "$as_me:$LINENO: error:   if not cross compiling, use --disable-x-compile." >&5
-echo "$as_me: error:   if not cross compiling, use --disable-x-compile." >&2;}
-   { (exit 1); exit 1; }; }
-
-elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
-       { echo "$as_me:$LINENO: WARNING: programs compiled here do not run here..." >&5
-echo "$as_me: WARNING: programs compiled here do not run here..." >&2;}
-       { { echo "$as_me:$LINENO: error:   if cross compiling,  add --enable-x-compile." >&5
-echo "$as_me: error:   if cross compiling,  add --enable-x-compile." >&2;}
-   { (exit 1); exit 1; }; }
+rm -f conftest*
 fi
 
+echo "$ac_t""$ac_cv_mingw32" 1>&6
+MINGW32=
+test "$ac_cv_mingw32" = yes && MINGW32=yes
 
 
-case $host_os in
-  *cygwin* ) CYGWIN=yes;;
-         * ) CYGWIN=no;;
-esac
 
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:7700: checking for executable suffix" >&5
+if eval "test \"\${ac_cv_exeext+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
+  ac_cv_exeext=.exe
+else
+  rm -f conftest*
+  echo 'int main () { return 0; }' > conftest.$ac_ext
+  ac_cv_exeext=
+  if { (eval echo configure:7710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+    for file in conftest.*; do
+      case $file in
+      *.c | *.C | *.o | *.obj | *.xcoff) ;;
+      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+      esac
+    done
+  else
+    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+  fi
+  rm -f conftest*
+  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
 
-case $host_os in
-  *mingw32* ) MINGW32=yes;;
-          * ) MINGW32=no;;
-esac
-
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
 
+echo $ac_n "checking for object suffix""... $ac_c" 1>&6
+echo "configure:7731: checking for object suffix" >&5
+if eval "test \"\${ac_cv_objext+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  rm -f conftest*
+echo 'int i = 1;' > conftest.$ac_ext
+if { (eval echo configure:7737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  for ac_file in conftest.*; do
+    case $ac_file in
+    *.c) ;;
+    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
+    esac
+  done
+else
+  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+fi
+rm -f conftest*
+fi
 
+echo "$ac_t""$ac_cv_objext" 1>&6
+OBJEXT=$ac_cv_objext
+ac_objext=$ac_cv_objext
 
 
-cat >>confdefs.h <<_ACEOF
+cat >> confdefs.h <<EOF
 #define EXEEXT "${EXEEXT}"
-_ACEOF
+EOF
 
 
-echo "$as_me:$LINENO: checking for be_app in -lbe" >&5
-echo $ECHO_N "checking for be_app in -lbe... $ECHO_C" >&6
-if test "${ac_cv_lib_be_be_app+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
+echo "configure:7761: checking for be_app in -lbe" >&5
+ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lbe -lroot -lnet $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 7769 "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 be_app ();
-int
-main ()
-{
-be_app ();
-  ;
-  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_be_be_app=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_be_be_app=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_be_be_app" >&5
-echo "${ECHO_T}$ac_cv_lib_be_be_app" >&6
-if test $ac_cv_lib_be_be_app = yes; then
+    builtin and then its argument prototype would still apply.  */
+char be_app();
+
+int main() {
+be_app()
+; return 0; }
+EOF
+if { (eval echo configure:7780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   LIBS="$LIBS -lbe -lroot -lnet"
 else
-  :
+  echo "$ac_t""no" 1>&6
+:
 fi
 
 
 
 
 
-echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5
-echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
-if test "${am_cv_prog_cc_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
+echo "configure:7806: checking for ${CC-cc} option to accept ANSI C" >&5
+if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   am_cv_prog_cc_stdc=no
 ac_save_CC="$CC"
@@ -9793,13 +7818,9 @@ ac_save_CC="$CC"
 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 7823 "configure"
+#include "confdefs.h"
 #include <stdarg.h>
 #include <stdio.h>
 #include <sys/types.h>
@@ -9829,46 +7850,29 @@ int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, i
 int argc;
 char **argv;
 
-int
-main ()
-{
+int main() {
 
 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
 
-  ;
-  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
+; return 0; }
+EOF
+if { (eval echo configure:7860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
   am_cv_prog_cc_stdc="$ac_arg"; break
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 done
 CC="$ac_save_CC"
 
 fi
 
 if test -z "$am_cv_prog_cc_stdc"; then
-  echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6
+  echo "$ac_t""none needed" 1>&6
 else
-  echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6
+  echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
 fi
 case "x$am_cv_prog_cc_stdc" in
   x|xno) ;;
@@ -9876,9 +7880,7 @@ case "x$am_cv_prog_cc_stdc" in
 esac
 
 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
-       { { echo "$as_me:$LINENO: error: OpenLDAP requires compiler to support STDC constructs." >&5
-echo "$as_me: error: OpenLDAP requires compiler to support STDC constructs." >&2;}
-   { (exit 1); exit 1; }; }
+       { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
 fi
 
 # test for make depend flag
@@ -9887,23 +7889,18 @@ OL_MKDEP_FLAGS=
 if test -z "${MKDEP}"; then
        OL_MKDEP="${CC-cc}"
        if test -z "${MKDEP_FLAGS}"; then
-               echo "$as_me:$LINENO: checking for ${OL_MKDEP} depend flag" >&5
-echo $ECHO_N "checking for ${OL_MKDEP} depend flag... $ECHO_C" >&6
-if test "${ol_cv_mkdep+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
+echo "configure:7894: checking for ${OL_MKDEP} depend flag" >&5
+if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                        ol_cv_mkdep=no
                        for flag in "-M" "-xM"; do
                                cat > conftest.c <<EOF
  noCode;
 EOF
-                               if { ac_try='$OL_MKDEP $flag conftest.c'
-  { (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); }; } \
+                               if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:7904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
                                        | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
                                then
                                        if test ! -f conftest."${ac_object}" ; then
@@ -9914,10 +7911,10 @@ EOF
                                fi
                        done
                        rm -f conftest*
-
+               
 fi
-echo "$as_me:$LINENO: result: $ol_cv_mkdep" >&5
-echo "${ECHO_T}$ol_cv_mkdep" >&6
+
+echo "$ac_t""$ol_cv_mkdep" 1>&6
        else
                cc_cv_mkdep=yes
                OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
 
 if test "${ol_cv_mkdep}" = no ; then
        # this will soon become an error
-       { echo "$as_me:$LINENO: WARNING: do not know how to generate dependencies" >&5
-echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
+       echo "configure: warning: do not know how to generate dependencies" 1>&2
 fi
 
-echo "$as_me:$LINENO: checking for afopen in -ls" >&5
-echo $ECHO_N "checking for afopen in -ls... $ECHO_C" >&6
-if test "${ac_cv_lib_s_afopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
+echo "configure:7937: checking for afopen in -ls" >&5
+ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-ls  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 7945 "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 afopen ();
-int
-main ()
-{
-afopen ();
-  ;
-  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_s_afopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_s_afopen=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_s_afopen" >&5
-echo "${ECHO_T}$ac_cv_lib_s_afopen" >&6
-if test $ac_cv_lib_s_afopen = yes; then
+    builtin and then its argument prototype would still apply.  */
+char afopen();
 
-       AUTH_LIBS=-ls
+int main() {
+afopen()
+; return 0; }
+EOF
+if { (eval echo configure:7956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-cat >>confdefs.h <<\_ACEOF
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+       AUTH_LIBS=-ls
+       cat >> confdefs.h <<\EOF
 #define HAVE_AIX_SECURITY 1
-_ACEOF
+EOF
 
 
+else
+  echo "$ac_t""no" 1>&6
 fi
 
 
 case "$target" in
 *-ibm-openedition)
        ac_cv_func_getopt=no
-
-cat >>confdefs.h <<\_ACEOF
+       cat >> confdefs.h <<\EOF
 #define BOTH_STRINGS_H 1
-_ACEOF
+EOF
 
        ;;
 esac
 
 ol_link_modules=no
 if test $ol_enable_modules != no ; then
-
-for ac_header in ltdl.h
+       for ac_hdr in ltdl.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:7999: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 8004 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:8009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
 
        if test $ac_cv_header_ltdl_h = no ; then
-               { { echo "$as_me:$LINENO: error: could not locate libtool ltdl.h" >&5
-echo "$as_me: error: could not locate libtool ltdl.h" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
        fi
 
-       echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
-echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
-if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
+echo "configure:8041: checking for lt_dlinit in -lltdl" >&5
+ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lltdl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 8049 "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 lt_dlinit ();
-int
-main ()
-{
-lt_dlinit ();
-  ;
-  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_ltdl_lt_dlinit=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_ltdl_lt_dlinit=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_ltdl_lt_dlinit" >&5
-echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
-if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
+    builtin and then its argument prototype would still apply.  */
+char lt_dlinit();
 
-               MODULES_LIBS=-lltdl
+int main() {
+lt_dlinit()
+; return 0; }
+EOF
+if { (eval echo configure:8060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-cat >>confdefs.h <<\_ACEOF
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+               MODULES_LIBS=-lltdl
+               cat >> confdefs.h <<\EOF
 #define HAVE_LIBLTDL 1
-_ACEOF
-
+EOF
 
+       
+else
+  echo "$ac_t""no" 1>&6
 fi
 
 
        if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
-               { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
-echo "$as_me: error: could not locate libtool -lltdl" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
        fi
        ol_link_modules=yes
+
 else
-       ol_with_bdb_module=static
-       ol_with_dnssrv_module=static
-       ol_with_ldap_module=static
-       ol_with_ldbm_module=static
-       ol_with_meta_module=static
-       ol_with_monitor_module=static
-       ol_with_null_module=static
-       ol_with_passwd_module=static
-       ol_with_perl_module=static
-       ol_with_shell_module=static
-       ol_with_tcl_module=static
-       ol_with_sql_module=static
+       for i in $Backends; do
+               eval "ol_tmp=\$ol_enable_$i"
+               if test $ol_tmp = mod ; then
+                       echo "configure: warning: building static $i backend" 1>&2
+                       eval "ol_enable_$i=yes"
+               fi
+       done
+       for i in $Overlays; do
+               eval "ol_tmp=\$ol_enable_$i"
+               if test $ol_tmp = mod ; then
+                       echo "configure: warning: building static $i overlay" 1>&2
+                       eval "ol_enable_$i=yes"
+               fi
+       done
 fi
 
 # test for EBCDIC
-echo "$as_me:$LINENO: checking for EBCDIC" >&5
-echo $ECHO_N "checking for EBCDIC... $ECHO_C" >&6
-if test "${ol_cv_cpp_ebcdic+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
+echo "configure:8111: checking for EBCDIC" >&5
+if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       cat > conftest.$ac_ext <<EOF
+#line 8117 "configure"
+#include "confdefs.h"
 
 #if !('M' == 0xd4)
 #include <__ASCII__/generate_error.h>
 #endif
 
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/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
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:8126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
   ol_cv_cpp_ebcdic=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
   ol_cv_cpp_ebcdic=no
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $ol_cv_cpp_ebcdic" >&5
-echo "${ECHO_T}$ol_cv_cpp_ebcdic" >&6
-if test $ol_cv_cpp_ebcdic = yes ; then
 
-cat >>confdefs.h <<\_ACEOF
+echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
+if test $ol_cv_cpp_ebcdic = yes ; then
+       cat >> confdefs.h <<\EOF
 #define HAVE_EBCDIC 1
-_ACEOF
+EOF
 
 fi
 
-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 "${ol_cv_header_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:8150: checking for ANSI C header files" >&5
+if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 8155 "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=$?
-  grep -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
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:8163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
   ol_cv_header_stdc=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
   ol_cv_header_stdc=no
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest*
 
 if test $ol_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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat > conftest.$ac_ext <<EOF
+#line 8180 "configure"
+#include "confdefs.h"
 #include <string.h>
-
-_ACEOF
+EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
+  egrep "memchr" >/dev/null 2>&1; then
   :
 else
+  rm -rf conftest*
   ol_cv_header_stdc=no
 fi
 rm -f conftest*
 
 if test $ol_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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat > conftest.$ac_ext <<EOF
+#line 8198 "configure"
+#include "confdefs.h"
 #include <stdlib.h>
-
-_ACEOF
+EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
+  egrep "free" >/dev/null 2>&1; then
   :
 else
+  rm -rf conftest*
   ol_cv_header_stdc=no
 fi
 rm -f conftest*
@@ -10399,13 +8214,9 @@ if test $ol_cv_header_stdc = yes; then
 if test "$cross_compiling" = yes; then
   :
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 8219 "configure"
+#include "confdefs.h"
 #include <ctype.h>
 #ifndef HAVE_EBCDIC
 #      define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -10421,519 +8232,304 @@ 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_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'
-  { (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
+EOF
+if { (eval echo configure:8237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   :
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_header_stdc=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_header_stdc=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
+
 fi
 fi
-echo "$as_me:$LINENO: result: $ol_cv_header_stdc" >&5
-echo "${ECHO_T}$ol_cv_header_stdc" >&6
+
+echo "$ac_t""$ol_cv_header_stdc" 1>&6
 if test $ol_cv_header_stdc = yes; then
-  cat >>confdefs.h <<\_ACEOF
+  cat >> confdefs.h <<\EOF
 #define STDC_HEADERS 1
-_ACEOF
+EOF
 
 fi
 ac_cv_header_stdc=disable
 
 
 if test $ol_cv_header_stdc != yes; then
-       { echo "$as_me:$LINENO: WARNING: could not locate Standard C compliant headers" >&5
-echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
+       echo "configure: warning: could not locate Standard C compliant headers" 1>&2
 fi
 
-
-
-
-
-
 ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
-echo $ECHO_N "checking for $ac_hdr that defines DIR... $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
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
+echo "configure:8271: checking for $ac_hdr that defines DIR" >&5
+if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 8276 "configure"
+#include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
-
-int
-main ()
-{
-if ((DIR *) 0)
-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
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f 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_hdr" | $as_tr_cpp` 1
-_ACEOF
-
-ac_header_dirent=$ac_hdr; break
+int main() {
+DIR *dirp = 0;
+; return 0; }
+EOF
+if { (eval echo configure:8284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  eval "ac_cv_header_dirent_$ac_safe=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_dirent_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ ac_header_dirent=$ac_hdr; break
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
-  echo "$as_me:$LINENO: checking for library containing opendir" >&5
-echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
-if test "${ac_cv_search_opendir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_opendir=no
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
+echo "configure:8309: checking for opendir in -ldir" >&5
+ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-ldir  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 8317 "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 opendir ();
-int
-main ()
-{
-opendir ();
-  ;
-  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_search_opendir="none required"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_opendir" = no; then
-  for ac_lib in dir; do
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+    builtin and then its argument prototype would still apply.  */
+char opendir();
 
-/* 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 opendir ();
-int
-main ()
-{
-opendir ();
-  ;
-  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_search_opendir="-l$ac_lib"
-break
+int main() {
+opendir()
+; return 0; }
+EOF
+if { (eval echo configure:8328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  done
-fi
-LIBS=$ac_func_search_save_LIBS
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-echo "${ECHO_T}$ac_cv_search_opendir" >&6
-if test "$ac_cv_search_opendir" != no; then
-  test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
 fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  LIBS="$LIBS -ldir"
+else
+  echo "$ac_t""no" 1>&6
+fi
 
 else
-  echo "$as_me:$LINENO: checking for library containing opendir" >&5
-echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
-if test "${ac_cv_search_opendir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
+echo "configure:8350: checking for opendir in -lx" >&5
+ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_opendir=no
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+  ac_save_LIBS="$LIBS"
+LIBS="-lx  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 8358 "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 opendir ();
-int
-main ()
-{
-opendir ();
-  ;
-  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_search_opendir="none required"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_opendir" = no; then
-  for ac_lib in x; do
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+    builtin and then its argument prototype would still apply.  */
+char opendir();
 
-/* 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 opendir ();
-int
-main ()
-{
-opendir ();
-  ;
-  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_search_opendir="-l$ac_lib"
-break
+int main() {
+opendir()
+; return 0; }
+EOF
+if { (eval echo configure:8369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  done
-fi
-LIBS=$ac_func_search_save_LIBS
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-echo "${ECHO_T}$ac_cv_search_opendir" >&6
-if test "$ac_cv_search_opendir" != no; then
-  test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
 fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  LIBS="$LIBS -lx"
+else
+  echo "$ac_t""no" 1>&6
+fi
 
 fi
 
-echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
-echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
-if test "${ac_cv_header_sys_wait_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
+echo "configure:8392: checking for sys/wait.h that is POSIX.1 compatible" >&5
+if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 8397 "configure"
+#include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
 #ifndef WEXITSTATUS
-# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
 #endif
 #ifndef WIFEXITED
-# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
 #endif
-
-int
-main ()
-{
-  int s;
-  wait (&s);
-  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
-  ;
-  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
+int main() {
+int s;
+wait (&s);
+s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+; return 0; }
+EOF
+if { (eval echo configure:8413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_sys_wait_h=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_sys_wait_h=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
-echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
-if test $ac_cv_header_sys_wait_h = yes; then
 
-cat >>confdefs.h <<\_ACEOF
+echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
+if test $ac_cv_header_sys_wait_h = yes; then
+  cat >> confdefs.h <<\EOF
 #define HAVE_SYS_WAIT_H 1
-_ACEOF
+EOF
 
 fi
 
-echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5
-echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6
-if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
+echo "configure:8434: checking POSIX termios" >&5
+if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 8439 "configure"
+#include "confdefs.h"
 #include <sys/types.h>
+#include <unistd.h>
 #include <termios.h>
-#ifdef TIOCGWINSZ
-  yes
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
-  ac_cv_sys_tiocgwinsz_in_termios_h=yes
+int main() {
+/* SunOS 4.0.3 has termios.h but not the library calls.  */
+   tcgetattr(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:8449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  am_cv_sys_posix_termios=yes
 else
-  ac_cv_sys_tiocgwinsz_in_termios_h=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  am_cv_sys_posix_termios=no
 fi
 rm -f conftest*
-
 fi
-echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
-echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6
 
-if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
-  echo "$as_me:$LINENO: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
-echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6
-if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
+
+
+ echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
+echo "configure:8465: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
+if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#ifdef TIOCGWINSZ
-  yes
-#endif
+  am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
 
-_ACEOF
+  gwinsz_in_termios_h=no
+  if test $am_cv_sys_posix_termios = yes; then
+    cat > conftest.$ac_ext <<EOF
+#line 8474 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#     include <termios.h>
+#     ifdef TIOCGWINSZ
+        yes
+#     endif
+    
+EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
-  ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
-else
-  ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
+  gwinsz_in_termios_h=yes
 fi
 rm -f conftest*
 
+  fi
+
+  if test $gwinsz_in_termios_h = no; then
+    cat > conftest.$ac_ext <<EOF
+#line 8494 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#     include <sys/ioctl.h>
+#     ifdef TIOCGWINSZ
+        yes
+#     endif
+    
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
+  am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
 fi
-echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
-echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6
+rm -f conftest*
 
-  if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
+  fi
+  
+fi
 
-cat >>confdefs.h <<\_ACEOF
+echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
+  if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
+    cat >> confdefs.h <<\EOF
 #define GWINSZ_IN_SYS_IOCTL 1
-_ACEOF
+EOF
 
   fi
-fi
 
 if test $am_cv_sys_posix_termios = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
+       cat >> confdefs.h <<\EOF
 #define HAVE_POSIX_TERMIOS 1
-_ACEOF
+EOF
 
 fi
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in \
+for ac_hdr in \
        arpa/inet.h             \
        arpa/nameser.h  \
        assert.h                \
+       bits/types.h    \
        conio.h                 \
        crypt.h                 \
        direct.h                \
@@ -10952,6 +8548,7 @@ for ac_header in \
        psap.h                  \
        pwd.h                   \
        process.h               \
+       resolv.h                \
        sgtty.h                 \
        shadow.h                \
        stddef.h                \
@@ -10970,6 +8567,7 @@ for ac_header in \
        sys/syslog.h    \
        sys/time.h              \
        sys/types.h             \
+       sys/ucred.h             \
        sys/uio.h               \
        syslog.h                \
        termios.h               \
@@ -10978,1560 +8576,774 @@ for ac_header in \
        winsock2.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:8582: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 8587 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:8592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  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
-
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+rm -f conftest*
 fi
-
-done
-
-
-
-for ac_header in sys/ucred.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
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-
-#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
-  eval "$as_ac_Header=yes"
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f 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
-_ACEOF
-
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
 
-for ac_header in resolv.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
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-
-
-#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
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f 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
-_ACEOF
-
-fi
-
-done
-
 
 
-echo "$as_me:$LINENO: checking for dlopen" >&5
-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
-if test "${ac_cv_func_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+for ac_func in sigaction sigset 
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:8624: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 8629 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dlopen (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    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 dlopen ();
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+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_dlopen) || defined (__stub___dlopen)
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
-char (*f) () = dlopen;
+f = $ac_func;
 #endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != dlopen;
-  ;
-  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_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_dlopen=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-echo "${ECHO_T}$ac_cv_func_dlopen" >&6
-if test $ac_cv_func_dlopen = yes; then
-  :
-else
 
-echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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 dlopen ();
-int
-main ()
-{
-dlopen ();
-  ;
-  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_dl_dlopen=yes
+; return 0; }
+EOF
+if { (eval echo configure:8653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBDL 1
-_ACEOF
-
-  LIBS="-ldl $LIBS"
-
+rm -f conftest*
 fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
+done
 
 
-
-echo "$as_me:$LINENO: checking for sigset in -lV3" >&5
-echo $ECHO_N "checking for sigset in -lV3... $ECHO_C" >&6
-if test "${ac_cv_lib_V3_sigset+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
+       echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
+echo "configure:8680: checking for sigset in -lV3" >&5
+ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lV3  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 8688 "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 sigset ();
-int
-main ()
-{
-sigset ();
-  ;
-  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_V3_sigset=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_V3_sigset=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_V3_sigset" >&5
-echo "${ECHO_T}$ac_cv_lib_V3_sigset" >&6
-if test $ac_cv_lib_V3_sigset = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBV3 1
-_ACEOF
+    builtin and then its argument prototype would still apply.  */
+char sigset();
+
+int main() {
+sigset()
+; return 0; }
+EOF
+if { (eval echo configure:8699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
 
   LIBS="-lV3 $LIBS"
 
+else
+  echo "$ac_t""no" 1>&6
 fi
 
+fi
 
-echo "$as_me:$LINENO: checking for winsock" >&5
-echo $ECHO_N "checking for winsock... $ECHO_C" >&6
-save_LIBS="$LIBS"
+if test "$ac_cv_header_winsock_h" = yes; then
+echo $ac_n "checking for winsock""... $ac_c" 1>&6
+echo "configure:8730: checking for winsock" >&5
+if eval "test \"\${ol_cv_winsock+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  save_LIBS="$LIBS"
 for curlib in ws2_32 wsock32; do
        LIBS="$LIBS -l$curlib"
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-                       char socket@12();
-                       char select@20();
-                       char closesocket@4();
-                       char gethostname@8();
-
-int
-main ()
-{
-
-                       socket@12();
-                       select@20();
-                       closesocket@4();
-                       gethostname@8();
+       cat > conftest.$ac_ext <<EOF
+#line 8738 "configure"
+#include "confdefs.h"
+#include <winsock.h>
+                       
+int main() {
+
+                       socket(0,0,0);
+                       select(0,NULL,NULL,NULL,NULL);
+                       closesocket(0);
+                       gethostname(NULL,0);
+                       
+; return 0; }
+EOF
+if { (eval echo configure:8751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_winsock=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_winsock=no
+fi
+rm -f conftest*
 
-  ;
-  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
-  have_winsock=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-have_winsock=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-
-       if test $have_winsock = yes; then
-
-cat >>confdefs.h <<\_ACEOF
+       if test $ol_cv_winsock = yes; then
+               cat >> confdefs.h <<\EOF
 #define HAVE_WINSOCK 1
-_ACEOF
+EOF
 
                ac_cv_func_socket=yes
                ac_cv_func_select=yes
                ac_cv_func_closesocket=yes
                ac_cv_func_gethostname=yes
                if test $curlib = ws2_32; then
-                       have_winsock=winsock2
-
-cat >>confdefs.h <<\_ACEOF
+                       ol_cv_winsock=winsock2
+                       cat >> confdefs.h <<\EOF
 #define HAVE_WINSOCK2 1
-_ACEOF
+EOF
 
                fi
                break
        fi
        LIBS="$save_LIBS"
 done
-echo "$as_me:$LINENO: result: $have_winsock" >&5
-echo "${ECHO_T}$have_winsock" >&6
-
-
-echo "$as_me:$LINENO: checking for socket" >&5
-echo $ECHO_N "checking for socket... $ECHO_C" >&6
-if test "${ac_cv_func_socket+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+fi
+
+echo "$ac_t""$ol_cv_winsock" 1>&6
+fi
+
+
+echo $ac_n "checking for socket""... $ac_c" 1>&6
+echo "configure:8789: checking for socket" >&5
+if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 8794 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char socket (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    which can conflict with char socket(); 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 socket ();
+    builtin and then its argument prototype would still apply.  */
+char socket();
+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_socket) || defined (__stub___socket)
 choke me
 #else
-char (*f) () = socket;
-#endif
-#ifdef __cplusplus
-}
+f = socket;
 #endif
 
-int
-main ()
-{
-return f != socket;
-  ;
-  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_socket=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_socket=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
-echo "${ECHO_T}$ac_cv_func_socket" >&6
-if test $ac_cv_func_socket = yes; then
-  :
+; return 0; }
+EOF
+if { (eval echo configure:8818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_socket=yes"
 else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_socket=no"
+fi
+rm -f conftest*
+fi
 
-
-echo "$as_me:$LINENO: checking for main in -lsocket" >&5
-echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6
-if test "${ac_cv_lib_socket_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
 else
-  ac_check_lib_save_LIBS=$LIBS
+  echo "$ac_t""no" 1>&6
+       
+       echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
+echo "configure:8837: checking for main in -lsocket" >&5
+ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat > conftest.$ac_ext <<EOF
+#line 8845 "configure"
+#include "confdefs.h"
 
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:8852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-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_socket_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_socket_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_socket_main" >&5
-echo "${ECHO_T}$ac_cv_lib_socket_main" >&6
-if test $ac_cv_lib_socket_main = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBSOCKET 1
-_ACEOF
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
 
   LIBS="-lsocket $LIBS"
 
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-
-echo "$as_me:$LINENO: checking for main in -lnet" >&5
-echo $ECHO_N "checking for main in -lnet... $ECHO_C" >&6
-if test "${ac_cv_lib_net_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
+echo "configure:8880: checking for main in -lnet" >&5
+ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lnet  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat > conftest.$ac_ext <<EOF
+#line 8888 "configure"
+#include "confdefs.h"
 
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:8895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-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_net_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_net_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_net_main" >&5
-echo "${ECHO_T}$ac_cv_lib_net_main" >&6
-if test $ac_cv_lib_net_main = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNET 1
-_ACEOF
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
 
   LIBS="-lnet $LIBS"
 
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-
-echo "$as_me:$LINENO: checking for main in -lnsl_s" >&5
-echo $ECHO_N "checking for main in -lnsl_s... $ECHO_C" >&6
-if test "${ac_cv_lib_nsl_s_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
+echo "configure:8923: checking for main in -lnsl_s" >&5
+ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lnsl_s  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat > conftest.$ac_ext <<EOF
+#line 8931 "configure"
+#include "confdefs.h"
 
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:8938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-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_nsl_s_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_nsl_s_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_nsl_s_main" >&5
-echo "${ECHO_T}$ac_cv_lib_nsl_s_main" >&6
-if test $ac_cv_lib_nsl_s_main = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNSL_S 1
-_ACEOF
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
 
   LIBS="-lnsl_s $LIBS"
 
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-
-echo "$as_me:$LINENO: checking for main in -lnsl" >&5
-echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
-if test "${ac_cv_lib_nsl_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
+echo "configure:8966: checking for main in -lnsl" >&5
+ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat > conftest.$ac_ext <<EOF
+#line 8974 "configure"
+#include "confdefs.h"
 
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:8981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-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_nsl_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_nsl_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_nsl_main" >&5
-echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
-if test $ac_cv_lib_nsl_main = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBNSL 1
-_ACEOF
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
 
   LIBS="-lnsl $LIBS"
 
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-
-echo "$as_me:$LINENO: checking for socket in -linet" >&5
-echo $ECHO_N "checking for socket in -linet... $ECHO_C" >&6
-if test "${ac_cv_lib_inet_socket+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
+echo "configure:9009: checking for socket in -linet" >&5
+ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-linet  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 9017 "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 socket ();
-int
-main ()
-{
-socket ();
-  ;
-  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_inet_socket=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_inet_socket=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_inet_socket" >&5
-echo "${ECHO_T}$ac_cv_lib_inet_socket" >&6
-if test $ac_cv_lib_inet_socket = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBINET 1
-_ACEOF
+    builtin and then its argument prototype would still apply.  */
+char socket();
 
-  LIBS="-linet $LIBS"
+int main() {
+socket()
+; return 0; }
+EOF
+if { (eval echo configure:9028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
 fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-linet $LIBS"
 
+else
+  echo "$ac_t""no" 1>&6
+fi
 
-echo "$as_me:$LINENO: checking for main in -lgen" >&5
-echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6
-if test "${ac_cv_lib_gen_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
+echo "configure:9056: checking for main in -lgen" >&5
+ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lgen  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat > conftest.$ac_ext <<EOF
+#line 9064 "configure"
+#include "confdefs.h"
 
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:9071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-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_gen_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_gen_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_gen_main" >&5
-echo "${ECHO_T}$ac_cv_lib_gen_main" >&6
-if test $ac_cv_lib_gen_main = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGEN 1
-_ACEOF
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
 
   LIBS="-lgen $LIBS"
 
+else
+  echo "$ac_t""no" 1>&6
 fi
 
 
 fi
 
 
-echo "$as_me:$LINENO: checking for select" >&5
-echo $ECHO_N "checking for select... $ECHO_C" >&6
-if test "${ac_cv_func_select+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for select""... $ac_c" 1>&6
+echo "configure:9103: checking for select" >&5
+if eval "test \"\${ac_cv_func_select+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 9108 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char select (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    which can conflict with char select(); 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 select ();
+    builtin and then its argument prototype would still apply.  */
+char select();
+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_select) || defined (__stub___select)
 choke me
 #else
-char (*f) () = select;
-#endif
-#ifdef __cplusplus
-}
+f = select;
 #endif
 
-int
-main ()
-{
-return f != select;
-  ;
-  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_select=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_select=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_select" >&5
-echo "${ECHO_T}$ac_cv_func_select" >&6
-if test $ac_cv_func_select = yes; then
+; return 0; }
+EOF
+if { (eval echo configure:9132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_select=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_select=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   :
 else
-  { { echo "$as_me:$LINENO: error: select() required." >&5
-echo "$as_me: error: select() required." >&2;}
-   { (exit 1); exit 1; }; }
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: select() required." 1>&2; exit 1; }
 fi
 
 
 if test "${ac_cv_header_winsock_h}" != yes; then
+                               echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
+echo "configure:9155: checking types of arguments for select()" >&5
+ if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+   if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+     for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
+     for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
+      for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
+       cat > conftest.$ac_ext <<EOF
+#line 9169 "configure"
+#include "confdefs.h"
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);
+int main() {
 
-
-for ac_header in sys/select.h sys/socket.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+; return 0; }
+EOF
+if { (eval echo configure:9188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+          ac_not_found=no ; break 3
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_not_found=yes
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
+rm -f conftest*
+      done
+     done
+    done
+   
 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
-
-done
-
-echo "$as_me:$LINENO: checking types of arguments for select" >&5
-echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6
-if test "${ac_cv_func_select_args+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
- for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
-  for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
-   cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#if HAVE_SYS_SELECT_H
-# include <sys/select.h>
-#endif
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-
-int
-main ()
-{
-extern int select ($ac_arg1,
-                                            $ac_arg234, $ac_arg234, $ac_arg234,
-                                            $ac_arg5);
-  ;
-  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_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  done
- done
-done
-# Provide a safe default value.
-: ${ac_cv_func_select_args='int,int *,struct timeval *'}
-
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
-echo "${ECHO_T}$ac_cv_func_select_args" >&6
-ac_save_IFS=$IFS; IFS=','
-set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
-IFS=$ac_save_IFS
-shift
-
-cat >>confdefs.h <<_ACEOF
-#define SELECT_TYPE_ARG1 $1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define SELECT_TYPE_ARG234 ($2)
-_ACEOF
+ if test "$ac_not_found" = yes; then
+  ac_cv_func_select_arg1=int 
+  ac_cv_func_select_arg234='int *' 
+  ac_cv_func_select_arg5='struct timeval *'
+ fi
+ echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
+ cat >> confdefs.h <<EOF
+#define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
+EOF
 
+ cat >> confdefs.h <<EOF
+#define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
+EOF
 
-cat >>confdefs.h <<_ACEOF
-#define SELECT_TYPE_ARG5 ($3)
-_ACEOF
+ cat >> confdefs.h <<EOF
+#define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
+EOF
 
-rm -f conftest*
 
 fi
 
 
-
-for ac_header in regex.h
+for ac_hdr in regex.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:9233: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 9238 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:9243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
 if test "$ac_cv_header_regex_h" != yes ; then
-       { { echo "$as_me:$LINENO: error: POSIX regex.h required." >&5
-echo "$as_me: error: POSIX regex.h required." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-echo "$as_me:$LINENO: checking for library containing regfree" >&5
-echo $ECHO_N "checking for library containing regfree... $ECHO_C" >&6
-if test "${ac_cv_search_regfree+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_regfree=no
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
+fi
 
+echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
+echo "configure:9274: checking for library containing regfree" >&5
+if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_regfree="no"
+cat > conftest.$ac_ext <<EOF
+#line 9281 "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 regfree ();
-int
-main ()
-{
-regfree ();
-  ;
-  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
+    builtin and then its argument prototype would still apply.  */
+char regfree();
+
+int main() {
+regfree()
+; return 0; }
+EOF
+if { (eval echo configure:9292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ac_cv_search_regfree="none required"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  echo "configure: 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_regfree" = no; then
-  for ac_lib in regex gnuregex; do
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+rm -f conftest*
+test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
+LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 9303 "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 regfree ();
-int
-main ()
-{
-regfree ();
-  ;
-  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
+    builtin and then its argument prototype would still apply.  */
+char regfree();
+
+int main() {
+regfree()
+; return 0; }
+EOF
+if { (eval echo configure:9314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ac_cv_search_regfree="-l$ac_lib"
 break
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  done
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
 fi
-LIBS=$ac_func_search_save_LIBS
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_search_regfree" >&5
-echo "${ECHO_T}$ac_cv_search_regfree" >&6
-if test "$ac_cv_search_regfree" != no; then
+
+echo "$ac_t""$ac_cv_search_regfree" 1>&6
+if test "$ac_cv_search_regfree" != "no"; then
   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
   :
-else
-  { { echo "$as_me:$LINENO: error: POSIX regex required." >&5
-echo "$as_me: error: POSIX regex required." >&2;}
-   { (exit 1); exit 1; }; }
+else :
+  { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
 fi
 
 
-
-echo "$as_me:$LINENO: checking for compatible POSIX regex" >&5
-echo $ECHO_N "checking for compatible POSIX regex... $ECHO_C" >&6
-if test "${ol_cv_c_posix_regex+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
+echo "configure:9337: checking for compatible POSIX regex" >&5
+if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
        if test "$cross_compiling" = yes; then
   ol_cv_c_posix_regex=cross
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 9346 "configure"
+#include "confdefs.h"
 
 #include <sys/types.h>
 #include <regex.h>
@@ -12546,309 +9358,148 @@ main()
        if(regcomp(&re, pattern, 0)) {
                return -1;
        }
-
+       
        string = "ALL MATCH";
-
+       
        rc = regexec(&re, string, 0, (void*)0, 0);
 
        regfree(&re);
 
        return rc;
 }
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:9372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_c_posix_regex=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_c_posix_regex=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_c_posix_regex=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
+
 fi
-echo "$as_me:$LINENO: result: $ol_cv_c_posix_regex" >&5
-echo "${ECHO_T}$ol_cv_c_posix_regex" >&6
+
+echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
 
 if test "$ol_cv_c_posix_regex" = no ; then
-       { { echo "$as_me:$LINENO: error: broken POSIX regex!" >&5
-echo "$as_me: error: broken POSIX regex!" >&2;}
-   { (exit 1); exit 1; }; }
+       { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
 fi
 
 
 have_uuid=no
-
-for ac_header in sys/uuid.h
+for ac_hdr in sys/uuid.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:9398: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 9403 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:9408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
 if test $ac_cv_header_sys_uuid_h = yes ; then
        save_LIBS="$LIBS"
-       echo "$as_me:$LINENO: checking for library containing uuid_to_str" >&5
-echo $ECHO_N "checking for library containing uuid_to_str... $ECHO_C" >&6
-if test "${ac_cv_search_uuid_to_str+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_uuid_to_str=no
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+       
+echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
+echo "configure:9438: checking for library containing uuid_to_str" >&5
+if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_uuid_to_str="no"
+cat > conftest.$ac_ext <<EOF
+#line 9445 "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 uuid_to_str ();
-int
-main ()
-{
-uuid_to_str ();
-  ;
-  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
+    builtin and then its argument prototype would still apply.  */
+char uuid_to_str();
+
+int main() {
+uuid_to_str()
+; return 0; }
+EOF
+if { (eval echo configure:9456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ac_cv_search_uuid_to_str="none required"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  echo "configure: 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_uuid_to_str" = no; then
-  for ac_lib in uuid; do
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-    cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+rm -f conftest*
+test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
+LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 9467 "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 uuid_to_str ();
-int
-main ()
-{
-uuid_to_str ();
-  ;
-  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
+    builtin and then its argument prototype would still apply.  */
+char uuid_to_str();
+
+int main() {
+uuid_to_str()
+; return 0; }
+EOF
+if { (eval echo configure:9478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ac_cv_search_uuid_to_str="-l$ac_lib"
 break
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-  done
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
 fi
-LIBS=$ac_func_search_save_LIBS
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_search_uuid_to_str" >&5
-echo "${ECHO_T}$ac_cv_search_uuid_to_str" >&6
-if test "$ac_cv_search_uuid_to_str" != no; then
+
+echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
+if test "$ac_cv_search_uuid_to_str" != "no"; then
   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
   have_uuid=yes
-else
+else :
   :
 fi
-
        LIBS="$save_LIBS"
 
        if test have_uuid = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
+               cat >> confdefs.h <<\EOF
 #define HAVE_UUID_TO_STR 1
-_ACEOF
+EOF
 
 
                test "$ac_cv_search_uuid_to_str" = "none required" || \
@@ -12857,591 +9508,467 @@ _ACEOF
 fi
 
 if test $have_uuid = no ; then
-       echo "$as_me:$LINENO: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
-echo $ECHO_N "checking to see if -lrpcrt4 is needed for win32 UUID support... $ECHO_C" >&6
+       echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
+echo "configure:9513: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
        save_LIBS="$LIBS"
        LIBS="$LIBS -lrpcrt4"
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-               char UuidCreate@4();
-               char UuidToStringA@8();
-
-int
-main ()
-{
+       cat > conftest.$ac_ext <<EOF
+#line 9517 "configure"
+#include "confdefs.h"
 
-               UuidCreate@4();
-               UuidToStringA@8();
+               int __stdcall UuidCreate(void *);
+               int __stdcall UuidToStringA(void *,void **);
+               
+int 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
+               UuidCreate(0);
+               UuidToStringA(0,0);
+               
+; return 0; }
+EOF
+if { (eval echo configure:9530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   need_rpcrt=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-need_rpcrt=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  need_rpcrt=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
        if test $need_rpcrt = yes; then
                SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
        fi
        LIBS="$save_LIBS"
-       echo "$as_me:$LINENO: result: $need_rpcrt" >&5
-echo "${ECHO_T}$need_rpcrt" >&6
+       echo "$ac_t""$need_rpcrt" 1>&6
 fi
 
 ol_link_dnssrv=no
-echo "$as_me:$LINENO: checking for res_query" >&5
-echo $ECHO_N "checking for res_query... $ECHO_C" >&6
-if test "${ac_cv_func_res_query+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+echo $ac_n "checking for res_query""... $ac_c" 1>&6
+echo "configure:9549: checking for res_query" >&5
+if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 9554 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char res_query (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    which can conflict with char res_query(); 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 res_query ();
+    builtin and then its argument prototype would still apply.  */
+char res_query();
+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_res_query) || defined (__stub___res_query)
 choke me
 #else
-char (*f) () = res_query;
-#endif
-#ifdef __cplusplus
-}
+f = res_query;
 #endif
 
-int
-main ()
-{
-return f != res_query;
-  ;
-  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_res_query=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_res_query=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_res_query" >&5
-echo "${ECHO_T}$ac_cv_func_res_query" >&6
-if test $ac_cv_func_res_query = yes; then
+; return 0; }
+EOF
+if { (eval echo configure:9578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_res_query=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_res_query=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   :
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-if test $ac_cv_func_res_query = no ; then
-       echo "$as_me:$LINENO: checking for __res_query" >&5
-echo $ECHO_N "checking for __res_query... $ECHO_C" >&6
-if test "${ac_cv_func___res_query+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ac_cv_func_res_query = no ; then 
+       echo $ac_n "checking for __res_query""... $ac_c" 1>&6
+echo "configure:9599: checking for __res_query" >&5
+if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 9604 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char __res_query (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    which can conflict with char __res_query(); 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 __res_query ();
+    builtin and then its argument prototype would still apply.  */
+char __res_query();
+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___res_query) || defined (__stub_____res_query)
 choke me
 #else
-char (*f) () = __res_query;
-#endif
-#ifdef __cplusplus
-}
+f = __res_query;
 #endif
 
-int
-main ()
-{
-return f != __res_query;
-  ;
-  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___res_query=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func___res_query=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func___res_query" >&5
-echo "${ECHO_T}$ac_cv_func___res_query" >&6
-if test $ac_cv_func___res_query = yes; then
+; return 0; }
+EOF
+if { (eval echo configure:9628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func___res_query=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func___res_query=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   :
+else
+  echo "$ac_t""no" 1>&6
 fi
 
        ac_cv_func_res_query=$ac_cv_func___res_query
 fi
 
-if test $ac_cv_func_res_query = no ; then
-
-echo "$as_me:$LINENO: checking for res_query in -lbind" >&5
-echo $ECHO_N "checking for res_query in -lbind... $ECHO_C" >&6
-if test "${ac_cv_lib_bind_res_query+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ac_cv_func_res_query = no ; then 
+       echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
+echo "configure:9652: checking for res_query in -lbind" >&5
+ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lbind  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 9660 "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 res_query ();
-int
-main ()
-{
-res_query ();
-  ;
-  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_bind_res_query=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_bind_res_query=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_res_query" >&5
-echo "${ECHO_T}$ac_cv_lib_bind_res_query" >&6
-if test $ac_cv_lib_bind_res_query = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBBIND 1
-_ACEOF
+    builtin and then its argument prototype would still apply.  */
+char res_query();
+
+int main() {
+res_query()
+; return 0; }
+EOF
+if { (eval echo configure:9671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
 
   LIBS="-lbind $LIBS"
 
+else
+  echo "$ac_t""no" 1>&6
 fi
 
        ac_cv_func_res_query=$ac_cv_lib_bind_res_query
 fi
 
-if test $ac_cv_func_res_query = no ; then
-
-echo "$as_me:$LINENO: checking for __res_query in -lbind" >&5
-echo $ECHO_N "checking for __res_query in -lbind... $ECHO_C" >&6
-if test "${ac_cv_lib_bind___res_query+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ac_cv_func_res_query = no ; then 
+       echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
+echo "configure:9703: checking for __res_query in -lbind" >&5
+ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lbind  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 9711 "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 __res_query ();
-int
-main ()
-{
-__res_query ();
-  ;
-  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_bind___res_query=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_bind___res_query=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___res_query" >&5
-echo "${ECHO_T}$ac_cv_lib_bind___res_query" >&6
-if test $ac_cv_lib_bind___res_query = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBBIND 1
-_ACEOF
+    builtin and then its argument prototype would still apply.  */
+char __res_query();
+
+int main() {
+__res_query()
+; return 0; }
+EOF
+if { (eval echo configure:9722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
 
   LIBS="-lbind $LIBS"
 
+else
+  echo "$ac_t""no" 1>&6
 fi
 
        ac_cv_func_res_query=$ac_cv_lib_bind___res_query
 fi
 
-if test $ac_cv_func_res_query = no ; then
-
-echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5
-echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6
-if test "${ac_cv_lib_resolv_res_query+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ac_cv_func_res_query = no ; then 
+       echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
+echo "configure:9754: checking for res_query in -lresolv" >&5
+ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 9762 "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 res_query ();
-int
-main ()
-{
-res_query ();
-  ;
-  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_resolv_res_query=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_resolv_res_query=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_resolv_res_query" >&5
-echo "${ECHO_T}$ac_cv_lib_resolv_res_query" >&6
-if test $ac_cv_lib_resolv_res_query = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRESOLV 1
-_ACEOF
-
-  LIBS="-lresolv $LIBS"
+    builtin and then its argument prototype would still apply.  */
+char res_query();
 
+int main() {
+res_query()
+; return 0; }
+EOF
+if { (eval echo configure:9773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-       ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lresolv $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-if test $ac_cv_func_res_query = no ; then
+       ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
+fi
 
-echo "$as_me:$LINENO: checking for __res_query in -lresolv" >&5
-echo $ECHO_N "checking for __res_query in -lresolv... $ECHO_C" >&6
-if test "${ac_cv_lib_resolv___res_query+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ac_cv_func_res_query = no ; then 
+       echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
+echo "configure:9805: checking for __res_query in -lresolv" >&5
+ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lresolv  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 9813 "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 __res_query ();
-int
-main ()
-{
-__res_query ();
-  ;
-  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_resolv___res_query=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_resolv___res_query=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_resolv___res_query" >&5
-echo "${ECHO_T}$ac_cv_lib_resolv___res_query" >&6
-if test $ac_cv_lib_resolv___res_query = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRESOLV 1
-_ACEOF
+    builtin and then its argument prototype would still apply.  */
+char __res_query();
+
+int main() {
+__res_query()
+; return 0; }
+EOF
+if { (eval echo configure:9824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
 
   LIBS="-lresolv $LIBS"
 
+else
+  echo "$ac_t""no" 1>&6
 fi
 
        ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
 fi
 
-if test "$ac_cv_func_res_query" = yes ; then
+if test $ac_cv_func_res_query = no ; then 
+       echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
+echo "configure:9856: checking for _res_9_query in -lresolv" >&5
+ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lresolv  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 9864 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char _res_9_query();
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_RES_QUERY 1
-_ACEOF
+int main() {
+_res_9_query()
+; return 0; }
+EOF
+if { (eval echo configure:9875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
 
-       if test $ol_enable_dnssrv != no ; then
-               ol_link_dnssrv=yes
-       fi
+  LIBS="-lresolv $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
-       { { echo "$as_me:$LINENO: error: DNSSRV requires res_query()" >&5
-echo "$as_me: error: DNSSRV requires res_query()" >&2;}
-   { (exit 1); exit 1; }; }
+       ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
 fi
 
+if test "$ac_cv_func_res_query" = yes ; then
+       cat >> confdefs.h <<\EOF
+#define HAVE_RES_QUERY 1
+EOF
 
 
+       if test $ol_enable_dnssrv != no ; then
+               ol_link_dnssrv=yes
+       fi
+fi
 
+if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
+       { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
+fi
 
-for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
+for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:9923: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 9928 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    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 ();
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+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
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
+f = $ac_func;
 #endif
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-sed 's/^/| /' 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
+; return 0; }
+EOF
+if { (eval echo configure:9952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
 done
 
@@ -13449,266 +9976,135 @@ done
 ol_link_ipv6=no
 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
        if test $ol_enable_ipv6 = yes ; then
-               { { echo "$as_me:$LINENO: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&5
-echo "$as_me: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
        fi
 elif test $ol_enable_ipv6 != no ; then
-       echo "$as_me:$LINENO: checking INET6_ADDRSTRLEN" >&5
-echo $ECHO_N "checking INET6_ADDRSTRLEN... $ECHO_C" >&6
-if test "${ol_cv_inet6_addrstrlen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-               cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
+echo "configure:9984: checking INET6_ADDRSTRLEN" >&5
+if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+               cat > conftest.$ac_ext <<EOF
+#line 9990 "configure"
+#include "confdefs.h"
 
 #                      include <netinet/in.h>
 #                      ifdef INET6_ADDRSTRLEN
                                __has_inet6_addrstrlen__;
 #                      endif
-
-_ACEOF
+               
+EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
+  egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
+  rm -rf conftest*
   ol_cv_inet6_addrstrlen=yes
 else
+  rm -rf conftest*
   ol_cv_inet6_addrstrlen=no
 fi
 rm -f conftest*
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_inet6_addrstrlen" >&5
-echo "${ECHO_T}$ol_cv_inet6_addrstrlen" >&6
 
+echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
 
-       echo "$as_me:$LINENO: checking struct sockaddr_storage" >&5
-echo $ECHO_N "checking struct sockaddr_storage... $ECHO_C" >&6
-if test "${ol_cv_struct_sockaddr_storage+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
-               cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
+echo "configure:10015: checking struct sockaddr_storage" >&5
+if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+               cat > conftest.$ac_ext <<EOF
+#line 10021 "configure"
+#include "confdefs.h"
 
 #include <sys/types.h>
 #include <sys/socket.h>
 
-int
-main ()
-{
+int main() {
 
                        struct sockaddr_storage ss;
 
-  ;
-  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
+; return 0; }
+EOF
+if { (eval echo configure:10033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
   ol_cv_struct_sockaddr_storage=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_struct_sockaddr_storage=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_struct_sockaddr_storage=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $ol_cv_struct_sockaddr_storage" >&5
-echo "${ECHO_T}$ol_cv_struct_sockaddr_storage" >&6
+
+echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
 
        if test $ol_cv_inet6_addrstrlen = yes \
                -a $ol_cv_struct_sockaddr_storage = yes ; then
                ol_link_ipv6=yes
        elif test $ol_enable_ipv6 = yes \
                        -a $ol_cv_inet6_addrstrlen = no ; then
-               { { echo "$as_me:$LINENO: error: IPv6 support requires INET6_ADDRSTRLEN" >&5
-echo "$as_me: error: IPv6 support requires INET6_ADDRSTRLEN" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
        elif test $ol_enable_ipv6 = yes \
                        -a $ol_cv_struct_sockaddr_storage = no ; then
-               { { echo "$as_me:$LINENO: error: IPv6 support requires struct sockaddr_storage" >&5
-echo "$as_me: error: IPv6 support requires struct sockaddr_storage" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
        fi
 fi
 
 if test $ol_enable_local != no ; then
-
-for ac_header in sys/un.h
+       for ac_hdr in sys/un.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:10064: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 10069 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
 
        if test $ol_enable_local = auto ; then
                ol_enable_local=$ac_cv_header_sys_un_h
        elif test $ac_cv_header_sys_un_h = no ; then
-               { { echo "$as_me:$LINENO: error: AF_LOCAL domain support requires sys/un.h" >&5
-echo "$as_me: error: AF_LOCAL domain support requires sys/un.h" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
        fi
 fi
 
 ol_link_kbind=no
-ol_link_kpasswd=no
 ol_link_krb5=no
 ol_link_krb4=no
 
@@ -13716,290 +10112,86 @@ if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
        -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
        -o $ol_with_kerberos = k425 ; then
 
-
-for ac_header in krb5.h
+       for ac_hdr in krb5.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:10120: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 10125 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
 
        if test $ac_cv_header_krb5_h = yes ; then
-
-for ac_header in heim_err.h
+                               for ac_hdr in heim_err.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:10162: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 10167 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
                if test $ac_cv_header_heim_err_h = yes ; then
                fi
 
                if test $krb5_impl = mit; then
-                       echo "$as_me:$LINENO: checking for main in -lk5crypto" >&5
-echo $ECHO_N "checking for main in -lk5crypto... $ECHO_C" >&6
-if test "${ac_cv_lib_k5crypto_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
+echo "configure:10206: checking for main in -lk5crypto" >&5
+ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lk5crypto  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat > conftest.$ac_ext <<EOF
+#line 10214 "configure"
+#include "confdefs.h"
 
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:10221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-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_k5crypto_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_k5crypto_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_k5crypto_main" >&5
-echo "${ECHO_T}$ac_cv_lib_k5crypto_main" >&6
-if test $ac_cv_lib_k5crypto_main = yes; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   krb5crypto=k5crypto
 else
-  krb5crypto=crypto
+  echo "$ac_t""no" 1>&6
+krb5crypto=crypto
 fi
 
 
-                       echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
-echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
-if test "${ac_cv_lib_krb5_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
+echo "configure:10244: checking for main in -lkrb5" >&5
+ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat > conftest.$ac_ext <<EOF
+#line 10252 "configure"
+#include "confdefs.h"
 
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:10259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-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_krb5_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_krb5_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_krb5_main" >&5
-echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
-if test $ac_cv_lib_krb5_main = yes; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   have_krb5=yes
                                KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
 else
-  have_krb5=no
+  echo "$ac_t""no" 1>&6
+have_krb5=no
 fi
 
 
                elif test $krb5_impl = heimdal; then
-                       echo "$as_me:$LINENO: checking for main in -ldes" >&5
-echo $ECHO_N "checking for main in -ldes... $ECHO_C" >&6
-if test "${ac_cv_lib_des_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
+echo "configure:10284: checking for main in -ldes" >&5
+ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-ldes  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat > conftest.$ac_ext <<EOF
+#line 10292 "configure"
+#include "confdefs.h"
 
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:10299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-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_des_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_des_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_des_main" >&5
-echo "${ECHO_T}$ac_cv_lib_des_main" >&6
-if test $ac_cv_lib_des_main = yes; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   krb5crypto=des
 else
-  krb5crypto=crypto
+  echo "$ac_t""no" 1>&6
+krb5crypto=crypto
 fi
 
 
-                       echo "$as_me:$LINENO: checking for main in -lkrb5" >&5
-echo $ECHO_N "checking for main in -lkrb5... $ECHO_C" >&6
-if test "${ac_cv_lib_krb5_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
+echo "configure:10322: checking for main in -lkrb5" >&5
+ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat > conftest.$ac_ext <<EOF
+#line 10330 "configure"
+#include "confdefs.h"
 
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:10337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-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_krb5_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_krb5_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_krb5_main" >&5
-echo "${ECHO_T}$ac_cv_lib_krb5_main" >&6
-if test $ac_cv_lib_krb5_main = yes; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   have_krb5=yes
                                KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
 else
-  have_krb5=no
+  echo "$ac_t""no" 1>&6
+have_krb5=no
 fi
 
 
-
-cat >>confdefs.h <<\_ACEOF
+                       cat >> confdefs.h <<\EOF
 #define HAVE_HEIMDAL_KERBEROS 1
-_ACEOF
+EOF
 
 
                else
                        have_krb5=no
-                       { echo "$as_me:$LINENO: WARNING: Unrecognized Kerberos5 Implementation" >&5
-echo "$as_me: WARNING: Unrecognized Kerberos5 Implementation" >&2;}
+                       echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
                fi
 
                if test $have_krb5 = yes ; then
                        ol_link_krb5=yes
 
-
-cat >>confdefs.h <<\_ACEOF
+                       cat >> confdefs.h <<\EOF
 #define HAVE_KRB5 1
-_ACEOF
-
+EOF
 
-                       if test $ol_enable_kpasswd != no ; then
-                               ol_link_kpasswd=yes;
-                       fi
 
                        if test $ol_with_kerberos = k5only ; then
                                ol_with_kerberos=found
                        fi
 
                elif test $ol_with_kerberos != auto ; then
-                       { { echo "$as_me:$LINENO: error: Required Kerberos 5 support not available" >&5
-echo "$as_me: error: Required Kerberos 5 support not available" >&2;}
-   { (exit 1); exit 1; }; }
+                       { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
                fi
 
        fi
 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
        $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
 
-
-
-for ac_header in kerberosIV/krb.h kerberosIV/des.h
+       for ac_hdr in kerberosIV/krb.h kerberosIV/des.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:10396: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 10401 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
 
        if test $ac_cv_header_kerberosIV_krb_h = yes ; then
                if test $krb5_impl = mit; then
-                       echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
-echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
-if test "${ac_cv_lib_krb4_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
+echo "configure:10436: checking for main in -lkrb4" >&5
+ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat > conftest.$ac_ext <<EOF
+#line 10444 "configure"
+#include "confdefs.h"
 
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:10451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-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_krb4_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_krb4_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_krb4_main" >&5
-echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
-if test $ac_cv_lib_krb4_main = yes; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   have_k425=yes
                                KRB4_LIBS="-lkrb4 -ldes425"
 else
-  have_k425=no
+  echo "$ac_t""no" 1>&6
+have_k425=no
 fi
 
 
                elif test $krb5_impl = heimdal; then
-                       echo "$as_me:$LINENO: checking for main in -lkrb4" >&5
-echo $ECHO_N "checking for main in -lkrb4... $ECHO_C" >&6
-if test "${ac_cv_lib_krb4_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
+echo "configure:10476: checking for main in -lkrb4" >&5
+ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat > conftest.$ac_ext <<EOF
+#line 10484 "configure"
+#include "confdefs.h"
 
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:10491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-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_krb4_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_krb4_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_krb4_main" >&5
-echo "${ECHO_T}$ac_cv_lib_krb4_main" >&6
-if test $ac_cv_lib_krb4_main = yes; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   have_k425=yes
                                KRB4_LIBS="-lkrb4"
 else
-  have_k425=no
+  echo "$ac_t""no" 1>&6
+have_k425=no
 fi
 
 
                else
                        have_425=no
-                       { echo "$as_me:$LINENO: WARNING: Unrecongized Kerberos V Implementation" >&5
-echo "$as_me: WARNING: Unrecongized Kerberos V Implementation" >&2;}
+                       echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
                fi
 
                if test $have_k425 = yes ; then
                        ol_with_kerberos=found
                        ol_link_krb4=yes
 
-
-cat >>confdefs.h <<\_ACEOF
+                       cat >> confdefs.h <<\EOF
 #define HAVE_KRB425 1
-_ACEOF
-
+EOF
 
-cat >>confdefs.h <<\_ACEOF
+                       cat >> confdefs.h <<\EOF
 #define HAVE_KRB4 1
-_ACEOF
+EOF
 
 
-                       echo "$as_me:$LINENO: checking for des_debug in Kerberos libraries" >&5
-echo $ECHO_N "checking for des_debug in Kerberos libraries... $ECHO_C" >&6
-if test "${ol_cv_var_des_debug+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
+echo "configure:10533: checking for des_debug in Kerberos libraries" >&5
+if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                                                                save_LIBS="$LIBS"
                                LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
-                               cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+                               cat > conftest.$ac_ext <<EOF
+#line 10541 "configure"
+#include "confdefs.h"
 
 #include <kerberosIV/krb.h>
 #include <kerberosIV/des.h>
 extern int des_debug;
 
-int
-main ()
-{
+int main() {
 
 des_debug = 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
-  ol_cv_var_des_debug=yes
+; return 0; }
+EOF
+if { (eval echo configure:10554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_var_des_debug=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_var_des_debug=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_var_des_debug=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
                                                                LIBS="$save_LIBS"
-
+                       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_var_des_debug" >&5
-echo "${ECHO_T}$ol_cv_var_des_debug" >&6
 
-                       if test $ol_cv_var_des_debug = yes ; then
+echo "$ac_t""$ol_cv_var_des_debug" 1>&6
 
-cat >>confdefs.h <<\_ACEOF
+                       if test $ol_cv_var_des_debug = yes ; then
+                               cat >> confdefs.h <<\EOF
 #define HAVE_DES_DEBUG 1
-_ACEOF
+EOF
 
                        fi
 
 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
        -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
 
-
-
-
-for ac_header in krb.h des.h krb-archaeology.h
+       for ac_hdr in krb.h des.h krb-archaeology.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:10593: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 10598 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
 
        if test $ac_cv_header_krb_h = yes ; then
-               echo "$as_me:$LINENO: checking for main in -lkrb" >&5
-echo $ECHO_N "checking for main in -lkrb... $ECHO_C" >&6
-if test "${ac_cv_lib_krb_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
+echo "configure:10632: checking for main in -lkrb" >&5
+ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lkrb -ldes $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+cat > conftest.$ac_ext <<EOF
+#line 10640 "configure"
+#include "confdefs.h"
 
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:10647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-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_krb_main=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_krb_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_krb_main" >&5
-echo "${ECHO_T}$ac_cv_lib_krb_main" >&6
-if test $ac_cv_lib_krb_main = yes; then
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   have_k4=yes
 else
-  have_k4=no
+  echo "$ac_t""no" 1>&6
+have_k4=no
 fi
 
 
                        ol_with_kerberos=found
                        ol_link_krb4=yes
 
-
-cat >>confdefs.h <<\_ACEOF
+                       cat >> confdefs.h <<\EOF
 #define HAVE_KRB4 1
-_ACEOF
+EOF
 
 
                        KRB4_LIBS="-lkrb -ldes"
 
                        if test $ac_cv_header_krb_archaeology_h = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
+                               cat >> confdefs.h <<\EOF
 #define HAVE_KTH_KERBEROS 1
-_ACEOF
+EOF
 
                        fi
                fi
        fi
 fi
 
-if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
-       ol_link_kpasswd=yes
-fi
-
 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
        ol_link_kbind=yes
 
 elif test $ol_enable_kbind = yes ; then
-       { { echo "$as_me:$LINENO: error: Kerberos IV detection failed" >&5
-echo "$as_me: error: Kerberos IV detection failed" >&2;}
-   { (exit 1); exit 1; }; }
+       { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
 fi
 
 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
+       cat >> confdefs.h <<\EOF
 #define HAVE_KERBEROS 1
-_ACEOF
+EOF
 
 
 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
-       { { echo "$as_me:$LINENO: error: Kerberos detection failed" >&5
-echo "$as_me: error: Kerberos detection failed" >&2;}
-   { (exit 1); exit 1; }; }
+       { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
 fi
 
 ol_link_tls=no
 if test $ol_with_tls != no ; then
-
-
-for ac_header in openssl/ssl.h ssl.h
+       for ac_hdr in openssl/ssl.h ssl.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:10713: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 10718 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
-
+       
        if test $ac_cv_header_openssl_ssl_h = yes \
                -o $ac_cv_header_ssl_h = yes ; then
-               echo "$as_me:$LINENO: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
-echo $ECHO_N "checking for SSLeay_add_ssl_algorithms in -lssl... $ECHO_C" >&6
-if test "${ac_cv_lib_ssl_SSLeay_add_ssl_algorithms+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
+echo "configure:10753: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
+ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lssl -lcrypto $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 10761 "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 SSLeay_add_ssl_algorithms ();
-int
-main ()
-{
-SSLeay_add_ssl_algorithms ();
-  ;
-  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_ssl_SSLeay_add_ssl_algorithms=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_ssl_SSLeay_add_ssl_algorithms=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_SSLeay_add_ssl_algorithms" >&5
-echo "${ECHO_T}$ac_cv_lib_ssl_SSLeay_add_ssl_algorithms" >&6
-if test $ac_cv_lib_ssl_SSLeay_add_ssl_algorithms = yes; then
+    builtin and then its argument prototype would still apply.  */
+char SSLeay_add_ssl_algorithms();
+
+int main() {
+SSLeay_add_ssl_algorithms()
+; return 0; }
+EOF
+if { (eval echo configure:10772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   have_ssleay=yes
                        need_rsaref=no
 else
-  have_ssleay=no
+  echo "$ac_t""no" 1>&6
+have_ssleay=no
 fi
 
-
+                       
                if test $have_ssleay = no ; then
-                       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
+                       echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
+echo "configure:10797: checking for SSL_library_init in -lssl" >&5
+ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lssl -lcrypto $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 10805 "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 SSL_library_init ();
-int
-main ()
-{
-SSL_library_init ();
-  ;
-  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_ssl_SSL_library_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' 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
+    builtin and then its argument prototype would still apply.  */
+char SSL_library_init();
+
+int main() {
+SSL_library_init()
+; return 0; }
+EOF
+if { (eval echo configure:10816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   have_ssleay=yes
                                need_rsaref=no
 else
-  have_ssleay=no
+  echo "$ac_t""no" 1>&6
+have_ssleay=no
 fi
 
                fi
 
                if test $have_ssleay = no ; then
-                       echo "$as_me:$LINENO: checking for ssl3_accept in -lssl" >&5
-echo $ECHO_N "checking for ssl3_accept in -lssl... $ECHO_C" >&6
-if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
+echo "configure:10842: checking for ssl3_accept in -lssl" >&5
+ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 10850 "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 ssl3_accept ();
-int
-main ()
-{
-ssl3_accept ();
-  ;
-  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_ssl_ssl3_accept=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_ssl_ssl3_accept=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_ssl3_accept" >&5
-echo "${ECHO_T}$ac_cv_lib_ssl_ssl3_accept" >&6
-if test $ac_cv_lib_ssl_ssl3_accept = yes; then
+    builtin and then its argument prototype would still apply.  */
+char ssl3_accept();
+
+int main() {
+ssl3_accept()
+; return 0; }
+EOF
+if { (eval echo configure:10861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   have_ssleay=yes
                                need_rsaref=yes
 else
-  have_ssleay=no
+  echo "$ac_t""no" 1>&6
+have_ssleay=no
 fi
 
                fi
                        ol_with_tls=found
                        ol_link_tls=yes
 
-
-cat >>confdefs.h <<\_ACEOF
+                       cat >> confdefs.h <<\EOF
 #define HAVE_SSLEAY 1
-_ACEOF
+EOF
 
 
                        if test $need_rsaref = yes; then
-
-cat >>confdefs.h <<\_ACEOF
+                               cat >> confdefs.h <<\EOF
 #define HAVE_RSAREF 1
-_ACEOF
+EOF
 
 
                                TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
@@ -15242,40 +10904,33 @@ _ACEOF
        fi
 
 else
-       { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
-echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
+       echo "configure: warning: TLS data protection not supported!" 1>&2
 fi
 
+WITH_TLS=no
 if test $ol_link_tls = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
+       cat >> confdefs.h <<\EOF
 #define HAVE_TLS 1
-_ACEOF
+EOF
 
+       WITH_TLS=yes
 
 elif test $ol_with_tls = auto ; then
-       { echo "$as_me:$LINENO: WARNING: Could not locate TLS/SSL package" >&5
-echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
-       { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
-echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
+       echo "configure: warning: Could not locate TLS/SSL package" 1>&2
+       echo "configure: warning: TLS data protection not supported!" 1>&2
 
 elif test $ol_with_tls != no ; then
-       { { echo "$as_me:$LINENO: error: Could not locate TLS/SSL package" >&5
-echo "$as_me: error: Could not locate TLS/SSL package" >&2;}
-   { (exit 1); exit 1; }; }
+       { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
 fi
 
 if test $ol_enable_lmpasswd != no; then
        if test $ol_link_tls != yes ; then
-               { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
-echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
        fi
 
-
-cat >>confdefs.h <<\_ACEOF
+       cat >> confdefs.h <<\EOF
 #define SLAPD_LMHASH 1
-_ACEOF
+EOF
 
 fi
 
@@ -15284,86 +10939,61 @@ ol_link_threads=no
 if test $ol_with_threads = auto -o $ol_with_threads = yes \
        -o $ol_with_threads = nt ; then
 
-
-       echo "$as_me:$LINENO: checking for _beginthread" >&5
-echo $ECHO_N "checking for _beginthread... $ECHO_C" >&6
-if test "${ac_cv_func__beginthread+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       
+       echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
+echo "configure:10945: checking for _beginthread" >&5
+if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 10950 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char _beginthread (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    which can conflict with char _beginthread(); 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 _beginthread ();
+    builtin and then its argument prototype would still apply.  */
+char _beginthread();
+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__beginthread) || defined (__stub____beginthread)
 choke me
 #else
-char (*f) () = _beginthread;
-#endif
-#ifdef __cplusplus
-}
+f = _beginthread;
 #endif
 
-int
-main ()
-{
-return f != _beginthread;
-  ;
-  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__beginthread=yes
+; return 0; }
+EOF
+if { (eval echo configure:10974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func__beginthread=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func__beginthread=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func__beginthread=no"
+fi
+rm -f conftest*
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func__beginthread" >&5
-echo "${ECHO_T}$ac_cv_func__beginthread" >&6
 
 
        if test $ac_cv_func__beginthread = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
+               cat >> confdefs.h <<\EOF
 #define HAVE_NT_THREADS 1
-_ACEOF
+EOF
 
                ol_cv_nt_threads=yes
        fi
@@ -15374,547 +11004,299 @@ _ACEOF
                ol_with_threads=found
                ol_with_yielding_select=yes
 
-
-cat >>confdefs.h <<\_ACEOF
+               cat >> confdefs.h <<\EOF
 #define HAVE_NT_SERVICE_MANAGER 1
-_ACEOF
-
+EOF
 
-cat >>confdefs.h <<\_ACEOF
+               cat >> confdefs.h <<\EOF
 #define HAVE_NT_EVENT_LOG 1
-_ACEOF
+EOF
 
        fi
 
        if test $ol_with_threads = nt ; then
-               { { echo "$as_me:$LINENO: error: could not locate NT Threads" >&5
-echo "$as_me: error: could not locate NT Threads" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
        fi
 fi
 
 if test $ol_with_threads = auto -o $ol_with_threads = yes \
        -o $ol_with_threads = posix ; then
 
-
-for ac_header in pthread.h
+       for ac_hdr in pthread.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:11030: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 11035 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:11040: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
 
        if test $ac_cv_header_pthread_h = yes ; then
-               echo "$as_me:$LINENO: checking POSIX thread version" >&5
-echo $ECHO_N "checking POSIX thread version... $ECHO_C" >&6
-if test "${ol_cv_pthread_version+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+               echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
+echo "configure:11069: checking POSIX thread version" >&5
+if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       cat > conftest.$ac_ext <<EOF
+#line 11075 "configure"
+#include "confdefs.h"
 
 #              include <pthread.h>
-
-int
-main ()
-{
+       
+int main() {
 
                int i = PTHREAD_CREATE_JOINABLE;
-
-  ;
-  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
-
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       
+; return 0; }
+EOF
+if { (eval echo configure:11086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  
+       cat > conftest.$ac_ext <<EOF
+#line 11090 "configure"
+#include "confdefs.h"
 #include <pthread.h>
-
-_ACEOF
+EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "pthread_detach" >/dev/null 2>&1; then
+  egrep "pthread_detach" >/dev/null 2>&1; then
+  rm -rf conftest*
   ol_cv_pthread_version=10
 else
+  rm -rf conftest*
   ol_cv_pthread_version=8
 fi
 rm -f conftest*
 
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  
+       cat > conftest.$ac_ext <<EOF
+#line 11110 "configure"
+#include "confdefs.h"
 
 #              include <pthread.h>
 #              ifdef PTHREAD_CREATE_UNDETACHED
                draft7
 #              endif
-
-_ACEOF
+       
+EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "draft7" >/dev/null 2>&1; then
+  egrep "draft7" >/dev/null 2>&1; then
+  rm -rf conftest*
   ol_cv_pthread_version=7
 else
-
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  rm -rf conftest*
+  
+       cat > conftest.$ac_ext <<EOF
+#line 11127 "configure"
+#include "confdefs.h"
 #include <pthread.h>
-
-_ACEOF
+EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "pthread_attr_init" >/dev/null 2>&1; then
+  egrep "pthread_attr_init" >/dev/null 2>&1; then
+  rm -rf conftest*
   ol_cv_pthread_version=6
 else
-
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  rm -rf conftest*
+  
+       cat > conftest.$ac_ext <<EOF
+#line 11139 "configure"
+#include "confdefs.h"
 
 #              include <pthread.h>
 #ifdef         PTHREAD_MUTEX_INITIALIZER
                draft5
 #endif
-
-_ACEOF
+       
+EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "draft5" >/dev/null 2>&1; then
+  egrep "draft5" >/dev/null 2>&1; then
+  rm -rf conftest*
   ol_cv_pthread_version=5
 else
+  rm -rf conftest*
   ol_cv_pthread_version=4
 fi
 rm -f conftest*
-
 fi
 rm -f conftest*
-
 fi
 rm -f conftest*
-
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_version" >&5
-echo "${ECHO_T}$ol_cv_pthread_version" >&6
 
+echo "$ac_t""$ol_cv_pthread_version" 1>&6
 
-               if test $ol_cv_pthread_version != 0 ; then
 
-cat >>confdefs.h <<_ACEOF
+               if test $ol_cv_pthread_version != 0 ; then
+                       cat >> confdefs.h <<EOF
 #define HAVE_PTHREADS $ol_cv_pthread_version
-_ACEOF
+EOF
 
                else
-                       { { echo "$as_me:$LINENO: error: unknown pthread version" >&5
-echo "$as_me: error: unknown pthread version" >&2;}
-   { (exit 1); exit 1; }; }
+                       { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
                fi
 
                # consider threads found
                ol_with_threads=found
 
-
-       echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
-echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
-if test "${ol_cv_header_linux_threads+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               
+       echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
+echo "configure:11186: checking for LinuxThreads pthread.h" >&5
+if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 11191 "configure"
+#include "confdefs.h"
 #include <pthread.h>
-_ACEOF
+EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
+  egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
+  rm -rf conftest*
   ol_cv_header_linux_threads=yes
 else
+  rm -rf conftest*
   ol_cv_header_linux_threads=no
 fi
 rm -f conftest*
 
-
+               
 fi
-echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
-echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
-       if test $ol_cv_header_linux_threads = yes; then
 
-cat >>confdefs.h <<\_ACEOF
+echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
+       if test $ol_cv_header_linux_threads = yes; then
+               cat >> confdefs.h <<\EOF
 #define HAVE_LINUX_THREADS 1
-_ACEOF
+EOF
 
        fi
 
-
-       echo "$as_me:$LINENO: checking for GNU Pth pthread.h" >&5
-echo $ECHO_N "checking for GNU Pth pthread.h... $ECHO_C" >&6
-if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               
+       echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
+echo "configure:11218: checking for GNU Pth pthread.h" >&5
+if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 11223 "configure"
+#include "confdefs.h"
 #include <pthread.h>
 #ifdef _POSIX_THREAD_IS_GNU_PTH
        __gnu_pth__;
 #endif
 
-_ACEOF
+EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "__gnu_pth__" >/dev/null 2>&1; then
+  egrep "__gnu_pth__" >/dev/null 2>&1; then
+  rm -rf conftest*
   ol_cv_header_gnu_pth_pthread_h=yes
 else
+  rm -rf conftest*
   ol_cv_header_gnu_pth_pthread_h=no
 fi
 rm -f conftest*
 
-
+               
 fi
-echo "$as_me:$LINENO: result: $ol_cv_header_gnu_pth_pthread_h" >&5
-echo "${ECHO_T}$ol_cv_header_gnu_pth_pthread_h" >&6
 
+echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
 
-               if test $ol_cv_header_gnu_pth_pthread_h = no ; then
 
-for ac_header in sched.h
+               if test $ol_cv_header_gnu_pth_pthread_h = no ; then
+                       for ac_hdr in sched.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:11252: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 11257 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:11262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
                fi
 
-
-                               echo "$as_me:$LINENO: checking for pthread_create in default libraries" >&5
-echo $ECHO_N "checking for pthread_create in default libraries... $ECHO_C" >&6
-if test "${ol_cv_pthread_create+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
+                               echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
+echo "configure:11292: checking for pthread_create in default libraries" >&5
+if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 11299 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -15930,9 +11312,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -15980,38 +11360,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:11366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_create=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_create=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_create=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 11378 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -16081,59 +11445,45 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:11450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_create=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_create=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_create=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
+
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_create" >&5
-echo "${ECHO_T}$ol_cv_pthread_create" >&6
+
+echo "$ac_t""$ol_cv_pthread_create" 1>&6
 
                if test $ol_cv_pthread_create != no ; then
                        ol_link_threads=posix
                        ol_link_pthreads=""
                fi
-
+               
                # Pthread try link: -kthread (ol_cv_pthread_kthread)
 if test "$ol_link_threads" = no ; then
        # try -kthread
-       echo "$as_me:$LINENO: checking for pthread link with -kthread" >&5
-echo $ECHO_N "checking for pthread link with -kthread... $ECHO_C" >&6
-if test "${ol_cv_pthread_kthread+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
+echo "configure:11475: checking for pthread link with -kthread" >&5
+if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-kthread $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 11486 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -16149,9 +11499,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -16199,38 +11547,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:11553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_kthread=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_kthread=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_kthread=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 11565 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -16300,36 +11632,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:11637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_kthread=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_kthread=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_kthread=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_kthread" >&5
-echo "${ECHO_T}$ol_cv_pthread_kthread" >&6
+
+echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
 
        if test $ol_cv_pthread_kthread = yes ; then
                ol_link_pthreads="-kthread"
                # Pthread try link: -pthread (ol_cv_pthread_pthread)
 if test "$ol_link_threads" = no ; then
        # try -pthread
-       echo "$as_me:$LINENO: checking for pthread link with -pthread" >&5
-echo $ECHO_N "checking for pthread link with -pthread... $ECHO_C" >&6
-if test "${ol_cv_pthread_pthread+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
+echo "configure:11667: checking for pthread link with -pthread" >&5
+if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-pthread $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 11678 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -16373,9 +11691,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -16423,38 +11739,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:11745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_pthread=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_pthread=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_pthread=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 11757 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -16524,36 +11824,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:11829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_pthread=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_pthread=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_pthread=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_pthread" >&5
-echo "${ECHO_T}$ol_cv_pthread_pthread" >&6
+
+echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
 
        if test $ol_cv_pthread_pthread = yes ; then
                ol_link_pthreads="-pthread"
                # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
 if test "$ol_link_threads" = no ; then
        # try -pthreads
-       echo "$as_me:$LINENO: checking for pthread link with -pthreads" >&5
-echo $ECHO_N "checking for pthread link with -pthreads... $ECHO_C" >&6
-if test "${ol_cv_pthread_pthreads+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
+echo "configure:11859: checking for pthread link with -pthreads" >&5
+if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-pthreads $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 11870 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -16597,9 +11883,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -16647,38 +11931,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:11937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_pthreads=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_pthreads=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_pthreads=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 11949 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -16748,36 +12016,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:12021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_pthreads=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_pthreads=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_pthreads=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_pthreads" >&5
-echo "${ECHO_T}$ol_cv_pthread_pthreads" >&6
+
+echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
 
        if test $ol_cv_pthread_pthreads = yes ; then
                ol_link_pthreads="-pthreads"
                # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
 if test "$ol_link_threads" = no ; then
        # try -mthreads
-       echo "$as_me:$LINENO: checking for pthread link with -mthreads" >&5
-echo $ECHO_N "checking for pthread link with -mthreads... $ECHO_C" >&6
-if test "${ol_cv_pthread_mthreads+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
+echo "configure:12051: checking for pthread link with -mthreads" >&5
+if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-mthreads $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 12062 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -16821,9 +12075,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -16871,38 +12123,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:12129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_mthreads=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_mthreads=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_mthreads=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 12141 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -16972,36 +12208,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:12213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_mthreads=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_mthreads=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_mthreads=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_mthreads" >&5
-echo "${ECHO_T}$ol_cv_pthread_mthreads" >&6
+
+echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
 
        if test $ol_cv_pthread_mthreads = yes ; then
                ol_link_pthreads="-mthreads"
                # Pthread try link: -thread (ol_cv_pthread_thread)
 if test "$ol_link_threads" = no ; then
        # try -thread
-       echo "$as_me:$LINENO: checking for pthread link with -thread" >&5
-echo $ECHO_N "checking for pthread link with -thread... $ECHO_C" >&6
-if test "${ol_cv_pthread_thread+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
+echo "configure:12243: checking for pthread link with -thread" >&5
+if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-thread $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 12254 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -17045,9 +12267,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -17095,38 +12315,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:12321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_thread=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_thread=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_thread=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 12333 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -17196,36 +12400,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:12405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_thread=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_thread=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_thread=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_thread" >&5
-echo "${ECHO_T}$ol_cv_pthread_thread" >&6
+
+echo "$ac_t""$ol_cv_pthread_thread" 1>&6
 
        if test $ol_cv_pthread_thread = yes ; then
                ol_link_pthreads="-thread"
                # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
 if test "$ol_link_threads" = no ; then
        # try -lpthread -lmach -lexc -lc_r
-       echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
-echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc -lc_r... $ECHO_C" >&6
-if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
+echo "configure:12436: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
+if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 12447 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -17270,9 +12460,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -17320,38 +12508,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:12514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 12526 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -17421,36 +12593,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:12598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
-echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6
+
+echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
 
        if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
                ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
                # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
 if test "$ol_link_threads" = no ; then
        # try -lpthread -lmach -lexc
-       echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc" >&5
-echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc... $ECHO_C" >&6
-if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
+echo "configure:12628: checking for pthread link with -lpthread -lmach -lexc" >&5
+if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-lpthread -lmach -lexc $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 12639 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -17494,9 +12652,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -17544,38 +12700,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:12706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_lpthread_lmach_lexc=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_lpthread_lmach_lexc=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_lpthread_lmach_lexc=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 12718 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -17645,36 +12785,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:12790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_lpthread_lmach_lexc=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_lpthread_lmach_lexc=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_lpthread_lmach_lexc=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
-echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc" >&6
+
+echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
 
        if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
                ol_link_pthreads="-lpthread -lmach -lexc"
                # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
 if test "$ol_link_threads" = no ; then
        # try -lpthread -Wl,-woff,85
-       echo "$as_me:$LINENO: checking for pthread link with -lpthread -Wl,-woff,85" >&5
-echo $ECHO_N "checking for pthread link with -lpthread -Wl,-woff,85... $ECHO_C" >&6
-if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
+echo "configure:12821: checking for pthread link with -lpthread -Wl,-woff,85" >&5
+if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-lpthread -Wl,-woff,85 $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 12832 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -17719,9 +12845,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -17769,38 +12893,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:12899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_lib_lpthread_woff=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_lib_lpthread_woff=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_lib_lpthread_woff=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 12911 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -17870,36 +12978,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:12983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_lib_lpthread_woff=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_lib_lpthread_woff=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_lib_lpthread_woff=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthread_woff" >&5
-echo "${ECHO_T}$ol_cv_pthread_lib_lpthread_woff" >&6
+
+echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
 
        if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
                ol_link_pthreads="-lpthread -Wl,-woff,85"
                # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
 if test "$ol_link_threads" = no ; then
        # try -lpthread
-       echo "$as_me:$LINENO: checking for pthread link with -lpthread" >&5
-echo $ECHO_N "checking for pthread link with -lpthread... $ECHO_C" >&6
-if test "${ol_cv_pthread_lpthread+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
+echo "configure:13014: checking for pthread link with -lpthread" >&5
+if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-lpthread $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 13025 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -17944,9 +13038,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -17994,38 +13086,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:13092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_lpthread=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_lpthread=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_lpthread=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 13104 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -18095,36 +13171,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:13176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_lpthread=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_lpthread=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_lpthread=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread" >&5
-echo "${ECHO_T}$ol_cv_pthread_lpthread" >&6
+
+echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
 
        if test $ol_cv_pthread_lpthread = yes ; then
                ol_link_pthreads="-lpthread"
                # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
 if test "$ol_link_threads" = no ; then
        # try -lc_r
-       echo "$as_me:$LINENO: checking for pthread link with -lc_r" >&5
-echo $ECHO_N "checking for pthread link with -lc_r... $ECHO_C" >&6
-if test "${ol_cv_pthread_lc_r+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
+echo "configure:13206: checking for pthread link with -lc_r" >&5
+if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-lc_r $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 13217 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -18168,9 +13230,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -18218,38 +13278,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:13284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_lc_r=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_lc_r=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_lc_r=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 13296 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -18319,36 +13363,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:13368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_lc_r=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_lc_r=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_lc_r=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_lc_r" >&5
-echo "${ECHO_T}$ol_cv_pthread_lc_r" >&6
+
+echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
 
        if test $ol_cv_pthread_lc_r = yes ; then
                ol_link_pthreads="-lc_r"
                # Pthread try link: -threads (ol_cv_pthread_threads)
 if test "$ol_link_threads" = no ; then
        # try -threads
-       echo "$as_me:$LINENO: checking for pthread link with -threads" >&5
-echo $ECHO_N "checking for pthread link with -threads... $ECHO_C" >&6
-if test "${ol_cv_pthread_threads+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
+echo "configure:13399: checking for pthread link with -threads" >&5
+if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-threads $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 13410 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -18393,9 +13423,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -18443,38 +13471,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:13477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_threads=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_threads=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_threads=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 13489 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -18544,36 +13556,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:13561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_threads=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_threads=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_threads=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_threads" >&5
-echo "${ECHO_T}$ol_cv_pthread_threads" >&6
+
+echo "$ac_t""$ol_cv_pthread_threads" 1>&6
 
        if test $ol_cv_pthread_threads = yes ; then
                ol_link_pthreads="-threads"
                # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
 if test "$ol_link_threads" = no ; then
        # try -lpthreads -lmach -lexc -lc_r
-       echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
-echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc -lc_r... $ECHO_C" >&6
-if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
+echo "configure:13592: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
+if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 13603 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -18618,9 +13616,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -18668,38 +13664,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:13670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 13682 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -18769,36 +13749,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:13754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
-echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6
+
+echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
 
        if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
                ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
                # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
 if test "$ol_link_threads" = no ; then
        # try -lpthreads -lmach -lexc
-       echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc" >&5
-echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc... $ECHO_C" >&6
-if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
+echo "configure:13784: checking for pthread link with -lpthreads -lmach -lexc" >&5
+if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-lpthreads -lmach -lexc $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 13795 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -18842,9 +13808,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -18892,38 +13856,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:13862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_lpthreads_lmach_lexc=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_lpthreads_lmach_lexc=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_lpthreads_lmach_lexc=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 13874 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -18993,36 +13941,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:13946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_lpthreads_lmach_lexc=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_lpthreads_lmach_lexc=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_lpthreads_lmach_lexc=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
-echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc" >&6
+
+echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
 
        if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
                ol_link_pthreads="-lpthreads -lmach -lexc"
                # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
 if test "$ol_link_threads" = no ; then
        # try -lpthreads -lexc
-       echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lexc" >&5
-echo $ECHO_N "checking for pthread link with -lpthreads -lexc... $ECHO_C" >&6
-if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
+echo "configure:13976: checking for pthread link with -lpthreads -lexc" >&5
+if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-lpthreads -lexc $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 13987 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -19066,9 +14000,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -19116,38 +14048,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:14054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_lpthreads_lexc=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_lpthreads_lexc=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_lpthreads_lexc=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 14066 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -19217,36 +14133,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:14138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_lpthreads_lexc=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_lpthreads_lexc=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_lpthreads_lexc=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lexc" >&5
-echo "${ECHO_T}$ol_cv_pthread_lpthreads_lexc" >&6
+
+echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
 
        if test $ol_cv_pthread_lpthreads_lexc = yes ; then
                ol_link_pthreads="-lpthreads -lexc"
                # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
 if test "$ol_link_threads" = no ; then
        # try -lpthreads
-       echo "$as_me:$LINENO: checking for pthread link with -lpthreads" >&5
-echo $ECHO_N "checking for pthread link with -lpthreads... $ECHO_C" >&6
-if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
+echo "configure:14169: checking for pthread link with -lpthreads" >&5
+if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                # save the flags
                ol_LIBS="$LIBS"
                LIBS="-lpthreads $LIBS"
 
                if test "$cross_compiling" = yes; then
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 14180 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -19291,9 +14193,7 @@ static void *task(p)
        return (void *) (p == NULL);
 }
 
-int
-main ()
-{
+int main() {
 
        /* pthread test function */
 #ifndef PTHREAD_CREATE_DETACHED
@@ -19341,38 +14241,22 @@ main ()
 
        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
-  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
+; return 0; }
+EOF
+if { (eval echo configure:14247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_pthread_lib_lpthreads=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_pthread_lib_lpthreads=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_pthread_lib_lpthreads=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 14259 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -19442,36 +14326,26 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:14331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_lib_lpthreads=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_lib_lpthreads=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_lib_lpthreads=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
 
+
                # restore the LIBS
                LIBS="$ol_LIBS"
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthreads" >&5
-echo "${ECHO_T}$ol_cv_pthread_lib_lpthreads" >&6
+
+echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
 
        if test $ol_cv_pthread_lib_lpthreads = yes ; then
                ol_link_pthreads="-lpthreads"
                        save_LIBS="$LIBS"
                        LIBS="$LTHREAD_LIBS $LIBS"
 
-
-
-
-for ac_func in sched_yield pthread_yield thr_yield
+                                                                                               for ac_func in sched_yield pthread_yield thr_yield
 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:14368: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 14373 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    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 ();
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+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
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
+f = $ac_func;
 #endif
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-sed 's/^/| /' 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
+; return 0; }
+EOF
+if { (eval echo configure:14397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
 done
 
                        if test $ac_cv_func_sched_yield = no -a \
                                $ac_cv_func_pthread_yield = no -a \
                                $ac_cv_func_thr_yield = no ; then
-                                                               echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5
-echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6
-if test "${ac_cv_lib_rt_sched_yield+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                                                               echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
+echo "configure:14426: checking for sched_yield in -lrt" >&5
+ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lrt  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 14434 "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 sched_yield ();
-int
-main ()
-{
-sched_yield ();
-  ;
-  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_rt_sched_yield=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_rt_sched_yield=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_rt_sched_yield" >&5
-echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6
-if test $ac_cv_lib_rt_sched_yield = yes; then
-  LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
+    builtin and then its argument prototype would still apply.  */
+char sched_yield();
+
+int main() {
+sched_yield()
+; return 0; }
+EOF
+if { (eval echo configure:14445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-cat >>confdefs.h <<\_ACEOF
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
+                                       cat >> confdefs.h <<\EOF
 #define HAVE_SCHED_YIELD 1
-_ACEOF
+EOF
 
                                        ac_cv_func_sched_yield=yes
 else
-  ac_cv_func_sched_yield=no
+  echo "$ac_t""no" 1>&6
+ac_cv_func_sched_yield=no
 fi
 
                        fi
                        if test $ac_cv_func_sched_yield = no -a \
                                $ac_cv_func_pthread_yield = no -a \
                                "$ac_cv_func_thr_yield" = no ; then
-                               { echo "$as_me:$LINENO: WARNING: could not locate sched_yield() or pthread_yield()" >&5
-echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
+                               echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
                        fi
 
-
-
-for ac_func in pthread_kill pthread_rwlock_destroy
+                                               for ac_func in pthread_kill pthread_rwlock_destroy
 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:14481: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 14486 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    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 ();
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+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
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
+f = $ac_func;
 #endif
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-sed 's/^/| /' 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
+; return 0; }
+EOF
+if { (eval echo configure:14510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
 done
 
 
-                                                                       echo "$as_me:$LINENO: checking for pthread_detach with <pthread.h>" >&5
-echo $ECHO_N "checking for pthread_detach with <pthread.h>... $ECHO_C" >&6
-if test "${ol_cv_func_pthread_detach+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                                                                       echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
+echo "configure:14536: checking for pthread_detach with <pthread.h>" >&5
+if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-                                                               cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  
+                                                               cat > conftest.$ac_ext <<EOF
+#line 14542 "configure"
+#include "confdefs.h"
 
 #include <pthread.h>
 #ifndef NULL
 #define NULL (void*)0
 #endif
 
-int
-main ()
-{
+int main() {
 pthread_detach(NULL);
-  ;
-  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
+; return 0; }
+EOF
+if { (eval echo configure:14554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_func_pthread_detach=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_func_pthread_detach=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_func_pthread_detach=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-
+rm -f conftest*
+                       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_func_pthread_detach" >&5
-echo "${ECHO_T}$ol_cv_func_pthread_detach" >&6
+
+echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
 
                        if test $ol_cv_func_pthread_detach = no ; then
-                               { { echo "$as_me:$LINENO: error: could not locate pthread_detach()" >&5
-echo "$as_me: error: could not locate pthread_detach()" >&2;}
-   { (exit 1); exit 1; }; }
+                               { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
                        fi
 
-
-cat >>confdefs.h <<\_ACEOF
+                       cat >> confdefs.h <<\EOF
 #define HAVE_PTHREAD_DETACH 1
-_ACEOF
-
-
-
-
+EOF
 
 
-for ac_func in \
+                                               for ac_func in \
                                pthread_setconcurrency \
                                pthread_getconcurrency \
                                thr_setconcurrency \
                                thr_getconcurrency \
-
+                       
 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:14586: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 14591 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    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 ();
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+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
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
+f = $ac_func;
 #endif
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-sed 's/^/| /' 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
+; return 0; }
+EOF
+if { (eval echo configure:14615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
 done
 
 
-
-
-for ac_func in pthread_kill_other_threads_np
+                       
+       for ac_func in pthread_kill_other_threads_np
 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:14644: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 14649 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    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 ();
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+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
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
+f = $ac_func;
 #endif
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-sed 's/^/| /' 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
+; return 0; }
+EOF
+if { (eval echo configure:14673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
 done
 
-       echo "$as_me:$LINENO: checking for LinuxThreads implementation" >&5
-echo $ECHO_N "checking for LinuxThreads implementation... $ECHO_C" >&6
-if test "${ol_cv_sys_linux_threads+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
+echo "configure:14698: checking for LinuxThreads implementation" >&5
+if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
 fi
-echo "$as_me:$LINENO: result: $ol_cv_sys_linux_threads" >&5
-echo "${ECHO_T}$ol_cv_sys_linux_threads" >&6
 
+echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
 
-
-
-       echo "$as_me:$LINENO: checking for LinuxThreads consistency" >&5
-echo $ECHO_N "checking for LinuxThreads consistency... $ECHO_C" >&6
-if test "${ol_cv_linux_threads+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       
+       
+       
+       echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
+echo "configure:14711: checking for LinuxThreads consistency" >&5
+if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                if test $ol_cv_header_linux_threads = yes -a \
                        $ol_cv_sys_linux_threads = yes; then
                        ol_cv_linux_threads=yes
@@ -20007,34 +14721,28 @@ else
                else
                        ol_cv_linux_threads=error
                fi
-
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_linux_threads" >&5
-echo "${ECHO_T}$ol_cv_linux_threads" >&6
+
+echo "$ac_t""$ol_cv_linux_threads" 1>&6
 
 
                        if test $ol_cv_linux_threads = error; then
-                               { { echo "$as_me:$LINENO: error: LinuxThreads header/library mismatch" >&5
-echo "$as_me: error: LinuxThreads header/library mismatch" >&2;}
-   { (exit 1); exit 1; }; };
+                               { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
                        fi
 
-                       echo "$as_me:$LINENO: checking if pthread_create() works" >&5
-echo $ECHO_N "checking if pthread_create() works... $ECHO_C" >&6
-if test "${ol_cv_pthread_create_works+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
+echo "configure:14736: checking if pthread_create() works" >&5
+if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                        if test "$cross_compiling" = yes; then
                                ol_cv_pthread_create_works=yes
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 14745 "configure"
+#include "confdefs.h"
 /* pthread test headers */
 #include <pthread.h>
 #if HAVE_PTHREADS < 7
@@ -20104,56 +14812,40 @@ int main(argc, argv)
 
 }
 
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:14817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_create_works=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_create_works=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_create_works=no
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
+
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_create_works" >&5
-echo "${ECHO_T}$ol_cv_pthread_create_works" >&6
+
+echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
 
                        if test $ol_cv_pthread_create_works = no ; then
-                               { { echo "$as_me:$LINENO: error: pthread_create is not usable, check environment settings" >&5
-echo "$as_me: error: pthread_create is not usable, check environment settings" >&2;}
-   { (exit 1); exit 1; }; }
+                               { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
                        fi
 
                                                if test $ol_with_yielding_select = auto ; then
-                               echo "$as_me:$LINENO: checking if select yields when using pthreads" >&5
-echo $ECHO_N "checking if select yields when using pthreads... $ECHO_C" >&6
-if test "${ol_cv_pthread_select_yields+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                               echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
+echo "configure:14839: checking if select yields when using pthreads" >&5
+if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                                if test "$cross_compiling" = yes; then
   ol_cv_pthread_select_yields=cross
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 14848 "configure"
+#include "confdefs.h"
 
 #include <sys/types.h>
 #include <sys/time.h>
@@ -20228,37 +14920,25 @@ int main(argc, argv)
 
        exit(2);
 }
-_ACEOF
-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='./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
+EOF
+if { (eval echo configure:14925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
   ol_cv_pthread_select_yields=no
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_pthread_select_yields=yes
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_pthread_select_yields=yes
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -fr conftest*
 fi
+
 fi
-echo "$as_me:$LINENO: result: $ol_cv_pthread_select_yields" >&5
-echo "${ECHO_T}$ol_cv_pthread_select_yields" >&6
+
+echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
 
                                if test $ol_cv_pthread_select_yields = cross ; then
-                                       { { echo "$as_me:$LINENO: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&5
-echo "$as_me: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&2;}
-   { (exit 1); exit 1; }; }
+                                       { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
                                fi
 
                                if test $ol_cv_pthread_select_yields = yes ; then
@@ -20269,297 +14949,145 @@ echo "$as_me: error: crossing compiling: use --with-yielding_select=yes|no|manua
                                                CPPFLAGS="$save_CPPFLAGS"
                        LIBS="$save_LIBS"
                else
-                       { { echo "$as_me:$LINENO: error: could not locate usable POSIX Threads" >&5
-echo "$as_me: error: could not locate usable POSIX Threads" >&2;}
-   { (exit 1); exit 1; }; }
+                       { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
                fi
        fi
 
        if test $ol_with_threads = posix ; then
-               { { echo "$as_me:$LINENO: error: could not locate POSIX Threads" >&5
-echo "$as_me: error: could not locate POSIX Threads" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
        fi
 fi
 
 if test $ol_with_threads = auto -o $ol_with_threads = yes \
        -o $ol_with_threads = mach ; then
 
-
-
-for ac_header in mach/cthreads.h cthreads.h
+               for ac_hdr in mach/cthreads.h cthreads.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:14969: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 14974 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:14979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
        if test $ac_cv_header_mach_cthreads_h = yes ; then
                ol_with_threads=found
 
-                               echo "$as_me:$LINENO: checking for cthread_fork" >&5
-echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
-if test "${ac_cv_func_cthread_fork+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+                               echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
+echo "configure:15009: checking for cthread_fork" >&5
+if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 15014 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char cthread_fork (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    which can conflict with char cthread_fork(); 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 cthread_fork ();
+    builtin and then its argument prototype would still apply.  */
+char cthread_fork();
+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_cthread_fork) || defined (__stub___cthread_fork)
 choke me
 #else
-char (*f) () = cthread_fork;
-#endif
-#ifdef __cplusplus
-}
+f = cthread_fork;
 #endif
 
-int
-main ()
-{
-return f != cthread_fork;
-  ;
-  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_cthread_fork=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_cthread_fork=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
-echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
-if test $ac_cv_func_cthread_fork = yes; then
+; return 0; }
+EOF
+if { (eval echo configure:15038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_cthread_fork=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_cthread_fork=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   ol_link_threads=yes
+else
+  echo "$ac_t""no" 1>&6
 fi
 
 
                if test $ol_link_threads = no ; then
-                                                                       echo "$as_me:$LINENO: checking for cthread_fork with -all_load" >&5
-echo $ECHO_N "checking for cthread_fork with -all_load... $ECHO_C" >&6
-if test "${ol_cv_cthread_all_load+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                                                                       echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
+echo "configure:15060: checking for cthread_fork with -all_load" >&5
+if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
                                                                save_LIBS="$LIBS"
                                LIBS="-all_load $LIBS"
-                               cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+                               cat > conftest.$ac_ext <<EOF
+#line 15068 "configure"
+#include "confdefs.h"
 #include <mach/cthreads.h>
-int
-main ()
-{
+int main() {
 
                                        cthread_fork((void *)0, (void *)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
+                                       
+; return 0; }
+EOF
+if { (eval echo configure:15077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_cthread_all_load=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_cthread_all_load=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_cthread_all_load=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
                                                                LIBS="$save_LIBS"
-
+                       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_cthread_all_load" >&5
-echo "${ECHO_T}$ol_cv_cthread_all_load" >&6
+
+echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
 
                        if test $ol_cv_cthread_all_load = yes ; then
                                LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
@@ -20569,85 +15097,58 @@ echo "${ECHO_T}$ol_cv_cthread_all_load" >&6
                fi
 
        elif test $ac_cv_header_cthreads_h = yes ; then
-
+                               
                ol_with_threads=found
-
                                save_LIBS="$LIBS"
                LIBS="$LIBS -lthreads"
-               echo "$as_me:$LINENO: checking for cthread_fork" >&5
-echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6
-if test "${ac_cv_func_cthread_fork+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+               echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
+echo "configure:15107: checking for cthread_fork" >&5
+if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 15112 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char cthread_fork (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    which can conflict with char cthread_fork(); 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 cthread_fork ();
+    builtin and then its argument prototype would still apply.  */
+char cthread_fork();
+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_cthread_fork) || defined (__stub___cthread_fork)
 choke me
 #else
-char (*f) () = cthread_fork;
-#endif
-#ifdef __cplusplus
-}
+f = cthread_fork;
 #endif
 
-int
-main ()
-{
-return f != cthread_fork;
-  ;
-  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_cthread_fork=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_cthread_fork=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
-echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6
-if test $ac_cv_func_cthread_fork = yes; then
+; return 0; }
+EOF
+if { (eval echo configure:15136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_cthread_fork=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_cthread_fork=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   ol_link_threads=yes
+else
+  echo "$ac_t""no" 1>&6
 fi
 
                LIBS="$save_LIBS"
                        ol_link_threads=mach
                        ol_with_threads=found
                else
-                       { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
-echo "$as_me: error: could not link with Mach CThreads" >&2;}
-   { (exit 1); exit 1; }; }
+                       { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
                fi
 
        elif test $ol_with_threads = mach ; then
-               { { echo "$as_me:$LINENO: error: could not locate Mach CThreads" >&5
-echo "$as_me: error: could not locate Mach CThreads" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
        fi
 
        if test $ol_link_threads = mach ; then
-
-cat >>confdefs.h <<\_ACEOF
+               cat >> confdefs.h <<\EOF
 #define HAVE_MACH_CTHREADS 1
-_ACEOF
+EOF
 
        elif test $ol_with_threads = found ; then
-               { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
-echo "$as_me: error: could not link with Mach CThreads" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
        fi
 fi
 
 if test $ol_with_threads = auto -o $ol_with_threads = yes \
        -o $ol_with_threads = pth ; then
 
-
-for ac_header in pth.h
+       for ac_hdr in pth.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:15186: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 15191 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:15196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
 
        if test $ac_cv_header_pth_h = yes ; then
-               echo "$as_me:$LINENO: checking for pth_version in -lpth" >&5
-echo $ECHO_N "checking for pth_version in -lpth... $ECHO_C" >&6
-if test "${ac_cv_lib_pth_pth_version+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
+echo "configure:15225: checking for pth_version in -lpth" >&5
+ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lpth  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 15233 "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 pth_version ();
-int
-main ()
-{
-pth_version ();
-  ;
-  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_pth_pth_version=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_pth_pth_version=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_pth_pth_version" >&5
-echo "${ECHO_T}$ac_cv_lib_pth_pth_version" >&6
-if test $ac_cv_lib_pth_pth_version = yes; then
+    builtin and then its argument prototype would still apply.  */
+char pth_version();
+
+int main() {
+pth_version()
+; return 0; }
+EOF
+if { (eval echo configure:15244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   have_pth=yes
 else
-  have_pth=no
+  echo "$ac_t""no" 1>&6
+have_pth=no
 fi
 
 
                if test $have_pth = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
+                       cat >> confdefs.h <<\EOF
 #define HAVE_GNU_PTH 1
-_ACEOF
+EOF
 
                        LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
                        ol_link_threads=pth
 if test $ol_with_threads = auto -o $ol_with_threads = yes \
        -o $ol_with_threads = lwp ; then
 
-
-
-for ac_header in thread.h synch.h
+               for ac_hdr in thread.h synch.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:15289: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 15294 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:15299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
        if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
-               echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
-echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
-if test "${ac_cv_lib_thread_thr_create+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
+echo "configure:15327: checking for thr_create in -lthread" >&5
+ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-lthread  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 15335 "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 thr_create ();
-int
-main ()
-{
-thr_create ();
-  ;
-  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_thread_thr_create=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_thread_thr_create=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_thread_thr_create" >&5
-echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
-if test $ac_cv_lib_thread_thr_create = yes; then
+    builtin and then its argument prototype would still apply.  */
+char thr_create();
+
+int main() {
+thr_create()
+; return 0; }
+EOF
+if { (eval echo configure:15346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   have_thr=yes
 else
-  have_thr=no
+  echo "$ac_t""no" 1>&6
+have_thr=no
 fi
 
 
                if test $have_thr = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
+                       cat >> confdefs.h <<\EOF
 #define HAVE_THR 1
-_ACEOF
+EOF
 
                        LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
                        ol_link_threads=thr
@@ -21127,306 +15376,155 @@ _ACEOF
                                ol_with_yielding_select=yes
                        fi
 
-
-
-for ac_func in \
+                                               for ac_func in \
                                thr_setconcurrency \
                                thr_getconcurrency \
-
+                       
 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:15386: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 15391 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    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 ();
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+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
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
+f = $ac_func;
 #endif
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-sed 's/^/| /' 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
+; return 0; }
+EOF
+if { (eval echo configure:15415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
 done
 
                fi
        fi
 
-
-for ac_header in lwp/lwp.h
+               for ac_hdr in lwp/lwp.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:15446: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 15451 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:15456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
        if test $ac_cv_header_lwp_lwp_h = yes ; then
-               echo "$as_me:$LINENO: checking for lwp_create in -llwp" >&5
-echo $ECHO_N "checking for lwp_create in -llwp... $ECHO_C" >&6
-if test "${ac_cv_lib_lwp_lwp_create+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
+echo "configure:15484: checking for lwp_create in -llwp" >&5
+ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
+  ac_save_LIBS="$LIBS"
 LIBS="-llwp  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
+cat > conftest.$ac_ext <<EOF
+#line 15492 "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 lwp_create ();
-int
-main ()
-{
-lwp_create ();
-  ;
-  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_lwp_lwp_create=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_lwp_lwp_create=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_lwp_lwp_create" >&5
-echo "${ECHO_T}$ac_cv_lib_lwp_lwp_create" >&6
-if test $ac_cv_lib_lwp_lwp_create = yes; then
+    builtin and then its argument prototype would still apply.  */
+char lwp_create();
+
+int main() {
+lwp_create()
+; return 0; }
+EOF
+if { (eval echo configure:15503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   have_lwp=yes
 else
-  have_lwp=no
+  echo "$ac_t""no" 1>&6
+have_lwp=no
 fi
 
 
                if test $have_lwp = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
+                       cat >> confdefs.h <<\EOF
 #define HAVE_LWP 1
-_ACEOF
+EOF
 
                        LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
                        ol_link_threads=lwp
@@ -21439,835 +15537,355 @@ _ACEOF
 fi
 
 if test $ol_with_yielding_select = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
+       cat >> confdefs.h <<\EOF
 #define HAVE_YIELDING_SELECT 1
-_ACEOF
+EOF
 
 fi
 
 if test $ol_with_threads = manual ; then
                ol_link_threads=yes
 
-       { echo "$as_me:$LINENO: WARNING: thread defines and link options must be set manually" >&5
-echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
-
-
+       echo "configure: warning: thread defines and link options must be set manually" 1>&2
 
-for ac_header in pthread.h sched.h
+       for ac_hdr in pthread.h sched.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:15556: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 15561 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:15566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
-
-
-for ac_func in sched_yield pthread_yield
+       for ac_func in sched_yield pthread_yield
 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:15595: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 15600 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    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 ();
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+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
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
+f = $ac_func;
 #endif
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-sed 's/^/| /' 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
+; return 0; }
+EOF
+if { (eval echo configure:15624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
 done
 
-
-       echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
-echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6
-if test "${ol_cv_header_linux_threads+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       
+       echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
+echo "configure:15650: checking for LinuxThreads pthread.h" >&5
+if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 15655 "configure"
+#include "confdefs.h"
 #include <pthread.h>
-_ACEOF
+EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
+  egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
+  rm -rf conftest*
   ol_cv_header_linux_threads=yes
 else
+  rm -rf conftest*
   ol_cv_header_linux_threads=no
 fi
 rm -f conftest*
 
-
+               
 fi
-echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
-echo "${ECHO_T}$ol_cv_header_linux_threads" >&6
-       if test $ol_cv_header_linux_threads = yes; then
 
-cat >>confdefs.h <<\_ACEOF
+echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
+       if test $ol_cv_header_linux_threads = yes; then
+               cat >> confdefs.h <<\EOF
 #define HAVE_LINUX_THREADS 1
-_ACEOF
+EOF
 
        fi
 
 
-
-for ac_header in mach/cthreads.h
+       for ac_hdr in mach/cthreads.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:15685: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 15690 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:15695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
-
-for ac_header in lwp/lwp.h
+       for ac_hdr in lwp/lwp.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:15725: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 15730 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:15735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
-
-
-for ac_header in thread.h synch.h
+       for ac_hdr in thread.h synch.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:15765: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 15770 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:15775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
 fi
 
-if test $ol_link_threads != no -a $ol_link_threads != nt ; then
-                       cat >>confdefs.h <<\_ACEOF
+if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
+                       cat >> confdefs.h <<\EOF
 #define REENTRANT 1
-_ACEOF
+EOF
 
-       cat >>confdefs.h <<\_ACEOF
+       cat >> confdefs.h <<\EOF
 #define _REENTRANT 1
-_ACEOF
+EOF
 
-       cat >>confdefs.h <<\_ACEOF
+       cat >> confdefs.h <<\EOF
 #define THREAD_SAFE 1
-_ACEOF
+EOF
 
-       cat >>confdefs.h <<\_ACEOF
+       cat >> confdefs.h <<\EOF
 #define _THREAD_SAFE 1
-_ACEOF
+EOF
 
-       cat >>confdefs.h <<\_ACEOF
+       cat >> confdefs.h <<\EOF
 #define THREADSAFE 1
-_ACEOF
+EOF
 
-       cat >>confdefs.h <<\_ACEOF
+       cat >> confdefs.h <<\EOF
 #define _THREADSAFE 1
-_ACEOF
+EOF
 
-       cat >>confdefs.h <<\_ACEOF
+       cat >> confdefs.h <<\EOF
 #define _SGI_MP_SOURCE 1
-_ACEOF
+EOF
 
 
-                       echo "$as_me:$LINENO: checking for thread specific errno" >&5
-echo $ECHO_N "checking for thread specific errno... $ECHO_C" >&6
-if test "${ol_cv_errno_thread_specific+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
+echo "configure:15834: checking for thread specific errno" >&5
+if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-               cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  
+               cat > conftest.$ac_ext <<EOF
+#line 15840 "configure"
+#include "confdefs.h"
 #include <errno.h>
-int
-main ()
-{
+int main() {
 errno = 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
+; return 0; }
+EOF
+if { (eval echo configure:15847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_errno_thread_specific=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_errno_thread_specific=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_errno_thread_specific=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-
+rm -f conftest*
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_errno_thread_specific" >&5
-echo "${ECHO_T}$ol_cv_errno_thread_specific" >&6
 
-                       echo "$as_me:$LINENO: checking for thread specific h_errno" >&5
-echo $ECHO_N "checking for thread specific h_errno... $ECHO_C" >&6
-if test "${ol_cv_h_errno_thread_specific+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
 
-               cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+                       echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
+echo "configure:15863: checking for thread specific h_errno" >&5
+if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+               cat > conftest.$ac_ext <<EOF
+#line 15869 "configure"
+#include "confdefs.h"
 #include <netdb.h>
-int
-main ()
-{
+int main() {
 h_errno = 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
+; return 0; }
+EOF
+if { (eval echo configure:15876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_h_errno_thread_specific=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_h_errno_thread_specific=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_h_errno_thread_specific=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-
+rm -f conftest*
+       
 fi
-echo "$as_me:$LINENO: result: $ol_cv_h_errno_thread_specific" >&5
-echo "${ECHO_T}$ol_cv_h_errno_thread_specific" >&6
+
+echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
 
        if test $ol_cv_errno_thread_specific != yes \
                -o $ol_cv_h_errno_thread_specific != yes ; then
@@ -22275,122 +15893,88 @@ echo "${ECHO_T}$ol_cv_h_errno_thread_specific" >&6
                LTHREAD_LIBS=""
        fi
 
-fi
+fi  
 
 if test $ol_link_threads = no ; then
        if test $ol_with_threads = yes ; then
-               { { echo "$as_me:$LINENO: error: no suitable thread support" >&5
-echo "$as_me: error: no suitable thread support" >&2;}
-   { (exit 1); exit 1; }; }
+               { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
        fi
 
        if test $ol_with_threads = auto ; then
-               { echo "$as_me:$LINENO: WARNING: no suitable thread support, disabling threads" >&5
-echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
+               echo "configure: warning: no suitable thread support, disabling threads" 1>&2
                ol_with_threads=no
        fi
 
-
-cat >>confdefs.h <<\_ACEOF
+       cat >> confdefs.h <<\EOF
 #define NO_THREADS 1
-_ACEOF
+EOF
 
        LTHREAD_LIBS=""
 fi
 
 if test $ol_link_threads != no ; then
-       cat >>confdefs.h <<\_ACEOF
+       cat >> confdefs.h <<\EOF
 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
-_ACEOF
+EOF
 
 fi
 
-
-
-
 for ac_func in \
        ctime_r                 \
        gethostbyname_r gethostbyaddr_r \
 
 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:15929: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 15934 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    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 ();
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+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
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
+f = $ac_func;
 #endif
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-sed 's/^/| /' 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
+; return 0; }
+EOF
+if { (eval echo configure:15958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
 done
 
@@ -22398,84 +15982,48 @@ done
 if test "$ac_cv_func_ctime_r" = no ; then
        ol_cv_func_ctime_r_nargs=0
 else
-       echo "$as_me:$LINENO: checking number of arguments of ctime_r" >&5
-echo $ECHO_N "checking number of arguments of ctime_r... $ECHO_C" >&6
-if test "${ol_cv_func_ctime_r_nargs+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
+echo "configure:15987: checking number of arguments of ctime_r" >&5
+if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 15992 "configure"
+#include "confdefs.h"
 #include <time.h>
-int
-main ()
-{
+int main() {
 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
-  ;
-  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
+; return 0; }
+EOF
+if { (eval echo configure:15999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
   ol_cv_func_ctime_r_nargs3=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_func_ctime_r_nargs3=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_func_ctime_r_nargs3=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 16011 "configure"
+#include "confdefs.h"
 #include <time.h>
-int
-main ()
-{
+int main() {
 time_t ti; char *buffer; ctime_r(&ti,buffer);
-  ;
-  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
+; return 0; }
+EOF
+if { (eval echo configure:16018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
   ol_cv_func_ctime_r_nargs2=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_func_ctime_r_nargs2=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_func_ctime_r_nargs2=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 
        if test $ol_cv_func_ctime_r_nargs3 = yes -a \
                $ol_cv_func_ctime_r_nargs2 = no ; then
@@ -22490,115 +16038,78 @@ rm -f conftest.$ac_objext conftest.$ac_ext
        else
                ol_cv_func_ctime_r_nargs=0
        fi
-
+  
 fi
-echo "$as_me:$LINENO: result: $ol_cv_func_ctime_r_nargs" >&5
-echo "${ECHO_T}$ol_cv_func_ctime_r_nargs" >&6
 
-  if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
+echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
 
-cat >>confdefs.h <<_ACEOF
+  if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
+       cat >> confdefs.h <<EOF
 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
-_ACEOF
+EOF
 
   fi
 
 fi
 
 if test "$ac_cv_func_gethostbyname_r" = yes ; then
-       echo "$as_me:$LINENO: checking number of arguments of gethostbyname_r" >&5
-echo $ECHO_N "checking number of arguments of gethostbyname_r... $ECHO_C" >&6
-if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
+echo "configure:16058: checking number of arguments of gethostbyname_r" >&5
+if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 16063 "configure"
+#include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netdb.h>
 #define BUFSIZE (sizeof(struct hostent)+10)
-int
-main ()
-{
+int main() {
 struct hostent hent; char buffer[BUFSIZE];
                int bufsize=BUFSIZE;int h_errno;
                (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
                        buffer, bufsize, &h_errno);
-  ;
-  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
+; return 0; }
+EOF
+if { (eval echo configure:16077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
   ol_cv_func_gethostbyname_r_nargs5=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_func_gethostbyname_r_nargs5=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_func_gethostbyname_r_nargs5=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 16089 "configure"
+#include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netdb.h>
 #define BUFSIZE (sizeof(struct hostent)+10)
-int
-main ()
-{
+int main() {
 struct hostent hent;struct hostent *rhent;
                char buffer[BUFSIZE];
                int bufsize=BUFSIZE;int h_errno;
                (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
                        &rhent, &h_errno);
-  ;
-  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
+; return 0; }
+EOF
+if { (eval echo configure:16104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
   ol_cv_func_gethostbyname_r_nargs6=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_func_gethostbyname_r_nargs6=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_func_gethostbyname_r_nargs6=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 
        if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
                $ol_cv_func_gethostbyname_r_nargs6 = no ; then
@@ -22613,121 +16124,84 @@ rm -f conftest.$ac_objext conftest.$ac_ext
        else
                ol_cv_func_gethostbyname_r_nargs=0
        fi
-
+  
 fi
-echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyname_r_nargs" >&5
-echo "${ECHO_T}$ol_cv_func_gethostbyname_r_nargs" >&6
-  if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
 
-cat >>confdefs.h <<_ACEOF
+echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
+  if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
+       cat >> confdefs.h <<EOF
 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
-_ACEOF
+EOF
 
   fi
 
 else
        ol_cv_func_gethostbyname_r_nargs=0
 fi
-
 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
-       echo "$as_me:$LINENO: checking number of arguments of gethostbyaddr_r" >&5
-echo $ECHO_N "checking number of arguments of gethostbyaddr_r... $ECHO_C" >&6
-if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
+echo "configure:16145: checking number of arguments of gethostbyaddr_r" >&5
+if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 16150 "configure"
+#include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netdb.h>
 #define BUFSIZE (sizeof(struct hostent)+10)
-int
-main ()
-{
-struct hostent hent; char buffer[BUFSIZE];
+int main() {
+struct hostent hent; char buffer[BUFSIZE]; 
            struct in_addr add;
            size_t alen=sizeof(struct in_addr);
            int bufsize=BUFSIZE;int h_errno;
                (void)gethostbyaddr_r( (void *)&(add.s_addr),
                        alen, AF_INET, &hent, buffer, bufsize, &h_errno);
-  ;
-  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
+; return 0; }
+EOF
+if { (eval echo configure:16166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
   ol_cv_func_gethostbyaddr_r_nargs7=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_func_gethostbyaddr_r_nargs7=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_func_gethostbyaddr_r_nargs7=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 16178 "configure"
+#include "confdefs.h"
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netdb.h>
 #define BUFSIZE (sizeof(struct hostent)+10)
-int
-main ()
-{
+int main() {
 struct hostent hent;
-               struct hostent *rhent; char buffer[BUFSIZE];
+               struct hostent *rhent; char buffer[BUFSIZE]; 
                struct in_addr add;
                size_t alen=sizeof(struct in_addr);
                int bufsize=BUFSIZE;int h_errno;
                (void)gethostbyaddr_r( (void *)&(add.s_addr),
-                       alen, AF_INET, &hent, buffer, bufsize,
+                       alen, AF_INET, &hent, buffer, bufsize, 
                        &rhent, &h_errno);
-  ;
-  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
+; return 0; }
+EOF
+if { (eval echo configure:16196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
   ol_cv_func_gethostbyaddr_r_nargs8=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_func_gethostbyaddr_r_nargs8=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_func_gethostbyaddr_r_nargs8=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 
        if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
                $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
@@ -22742,15 +16216,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext
        else
                ol_cv_func_gethostbyaddr_r_nargs=0
        fi
-
+  
 fi
-echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
-echo "${ECHO_T}$ol_cv_func_gethostbyaddr_r_nargs" >&6
-  if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
 
-cat >>confdefs.h <<_ACEOF
+echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
+  if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
+    cat >> confdefs.h <<EOF
 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
-_ACEOF
+EOF
 
   fi
 
@@ -22758,170 +16231,63 @@ else
        ol_cv_func_gethostbyaddr_r_nargs=0
 fi
 
-ol_link_ldbm=no
+ol_link_ldbm=no 
 
 if test $ol_with_ldbm_api = auto \
        -o $ol_with_ldbm_api = berkeley \
        -o $ol_with_ldbm_api = bcompat ; then
 
        if test $ol_with_ldbm_api = bcompat; then \
-
-
-for ac_header in db_185.h db.h
+               for ac_hdr in db_185.h db.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:16246: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+  cat > conftest.$ac_ext <<EOF
+#line 16251 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:16256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-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
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
 fi
-
 done
 
 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
-       echo "$as_me:$LINENO: checking if Berkeley DB header compatibility" >&5
-echo $ECHO_N "checking if Berkeley DB header compatibility... $ECHO_C" >&6
-if test "${ol_cv_header_db1+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-               cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
+echo "configure:16284: checking if Berkeley DB header compatibility" >&5
+if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+               cat > conftest.$ac_ext <<EOF
+#line 16290 "configure"
+#include "confdefs.h"
 
 #if HAVE_DB_185_H
 #      include <db_185.h>
@@ -22934,43 +16300,41 @@ cat >>conftest.$ac_ext <<_ACEOF
 #      define DB_VERSION_MAJOR 1
 #endif
 
-#if DB_VERSION_MAJOR == 1
+#if DB_VERSION_MAJOR == 1 
        __db_version_1
 #endif
 
-_ACEOF
+EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "__db_version_1" >/dev/null 2>&1; then
+  egrep "__db_version_1" >/dev/null 2>&1; then
+  rm -rf conftest*
   ol_cv_header_db1=yes
 else
+  rm -rf conftest*
   ol_cv_header_db1=no
 fi
 rm -f conftest*
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_header_db1" >&5
-echo "${ECHO_T}$ol_cv_header_db1" >&6
+
+echo "$ac_t""$ol_cv_header_db1" 1>&6
 
        if test $ol_cv_header_db1 = yes ; then
                ol_cv_lib_db=no
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
-echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
-if test "${ol_cv_db_none+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
+echo "configure:16327: checking for Berkeley DB link (default)" >&5
+if eval "test \"\${ol_cv_db_none+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
+  
        ol_DB_LIB=
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 16337 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -22986,9 +16350,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -23001,7 +16363,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -23016,36 +16378,24 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
+; return 0; }
+EOF
+if { (eval echo configure:16384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
   ol_cv_db_none=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_none=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_none=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
-echo "${ECHO_T}$ol_cv_db_none" >&6
+
+echo "$ac_t""$ol_cv_db_none" 1>&6
 
        if test $ol_cv_db_none = yes ; then
                ol_cv_lib_db=yes
@@ -23053,23 +16403,19 @@ echo "${ECHO_T}$ol_cv_db_none" >&6
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
-if test "${ol_cv_db_db41+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
+echo "configure:16408: checking for Berkeley DB link (-ldb43)" >&5
+if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb41
+  
+       ol_DB_LIB=-ldb43
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 16418 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -23085,9 +16431,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -23100,7 +16444,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -23115,60 +16459,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db41=yes
+; return 0; }
+EOF
+if { (eval echo configure:16465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db43=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db41=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db43=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
-echo "${ECHO_T}$ol_cv_db_db41" >&6
 
-       if test $ol_cv_db_db41 = yes ; then
-               ol_cv_lib_db=-ldb41
+echo "$ac_t""$ol_cv_db_db43" 1>&6
+
+       if test $ol_cv_db_db43 = yes ; then
+               ol_cv_lib_db=-ldb43
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
-if test "${ol_cv_db_db_41+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
+echo "configure:16489: checking for Berkeley DB link (-ldb-43)" >&5
+if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb-41
+  
+       ol_DB_LIB=-ldb-43
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 16499 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -23184,9 +16512,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -23199,7 +16525,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -23214,60 +16540,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db_41=yes
+; return 0; }
+EOF
+if { (eval echo configure:16546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_43=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db_41=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_43=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
-echo "${ECHO_T}$ol_cv_db_db_41" >&6
 
-       if test $ol_cv_db_db_41 = yes ; then
-               ol_cv_lib_db=-ldb-41
+echo "$ac_t""$ol_cv_db_db_43" 1>&6
+
+       if test $ol_cv_db_db_43 = yes ; then
+               ol_cv_lib_db=-ldb-43
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
-if test "${ol_cv_db_db_4_dot_1+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
+echo "configure:16570: checking for Berkeley DB link (-ldb-4.3)" >&5
+if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb-4.1
+  
+       ol_DB_LIB=-ldb-4.3
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 16580 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -23283,9 +16593,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -23298,7 +16606,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -23313,60 +16621,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db_4_dot_1=yes
+; return 0; }
+EOF
+if { (eval echo configure:16627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_4_dot_3=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db_4_dot_1=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_4_dot_3=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
-echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
 
-       if test $ol_cv_db_db_4_dot_1 = yes ; then
-               ol_cv_lib_db=-ldb-4.1
+echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
+
+       if test $ol_cv_db_db_4_dot_3 = yes ; then
+               ol_cv_lib_db=-ldb-4.3
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
-if test "${ol_cv_db_db_4_1+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
+echo "configure:16651: checking for Berkeley DB link (-ldb-4-3)" >&5
+if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb-4-1
+  
+       ol_DB_LIB=-ldb-4-3
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 16661 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -23382,9 +16674,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -23397,7 +16687,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -23412,60 +16702,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db_4_1=yes
+; return 0; }
+EOF
+if { (eval echo configure:16708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_4_3=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db_4_1=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_4_3=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
-echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
 
-       if test $ol_cv_db_db_4_1 = yes ; then
-               ol_cv_lib_db=-ldb-4-1
+echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
+
+       if test $ol_cv_db_db_4_3 = yes ; then
+               ol_cv_lib_db=-ldb-4-3
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
-if test "${ol_cv_db_db_4+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
+echo "configure:16732: checking for Berkeley DB link (-ldb42)" >&5
+if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb-4
+  
+       ol_DB_LIB=-ldb42
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 16742 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -23481,9 +16755,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -23496,7 +16768,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -23511,60 +16783,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db_4=yes
+; return 0; }
+EOF
+if { (eval echo configure:16789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db42=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db_4=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db42=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
-echo "${ECHO_T}$ol_cv_db_db_4" >&6
 
-       if test $ol_cv_db_db_4 = yes ; then
-               ol_cv_lib_db=-ldb-4
+echo "$ac_t""$ol_cv_db_db42" 1>&6
+
+       if test $ol_cv_db_db42 = yes ; then
+               ol_cv_lib_db=-ldb42
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
-if test "${ol_cv_db_db4+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
+echo "configure:16813: checking for Berkeley DB link (-ldb-42)" >&5
+if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb4
+  
+       ol_DB_LIB=-ldb-42
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 16823 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -23580,9 +16836,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -23595,7 +16849,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -23610,60 +16864,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db4=yes
+; return 0; }
+EOF
+if { (eval echo configure:16870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_42=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db4=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_42=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
-echo "${ECHO_T}$ol_cv_db_db4" >&6
 
-       if test $ol_cv_db_db4 = yes ; then
-               ol_cv_lib_db=-ldb4
+echo "$ac_t""$ol_cv_db_db_42" 1>&6
+
+       if test $ol_cv_db_db_42 = yes ; then
+               ol_cv_lib_db=-ldb-42
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
-if test "${ol_cv_db_db+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
+echo "configure:16894: checking for Berkeley DB link (-ldb-4.2)" >&5
+if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb
+  
+       ol_DB_LIB=-ldb-4.2
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 16904 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -23679,9 +16917,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -23694,7 +16930,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -23709,60 +16945,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db=yes
+; return 0; }
+EOF
+if { (eval echo configure:16951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_4_dot_2=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_4_dot_2=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
-echo "${ECHO_T}$ol_cv_db_db" >&6
 
-       if test $ol_cv_db_db = yes ; then
-               ol_cv_lib_db=-ldb
+echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
+
+       if test $ol_cv_db_db_4_dot_2 = yes ; then
+               ol_cv_lib_db=-ldb-4.2
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
-if test "${ol_cv_db_db3+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
+echo "configure:16975: checking for Berkeley DB link (-ldb-4-2)" >&5
+if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb3
+  
+       ol_DB_LIB=-ldb-4-2
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 16985 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -23778,9 +16998,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -23793,7 +17011,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -23808,60 +17026,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db3=yes
+; return 0; }
+EOF
+if { (eval echo configure:17032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_4_2=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db3=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_4_2=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
-echo "${ECHO_T}$ol_cv_db_db3" >&6
 
-       if test $ol_cv_db_db3 = yes ; then
-               ol_cv_lib_db=-ldb3
+echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
+
+       if test $ol_cv_db_db_4_2 = yes ; then
+               ol_cv_lib_db=-ldb-4-2
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
-if test "${ol_cv_db_db_3+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
+echo "configure:17056: checking for Berkeley DB link (-ldb-4)" >&5
+if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb-3
+  
+       ol_DB_LIB=-ldb-4
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 17066 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -23877,9 +17079,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -23892,7 +17092,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -23907,60 +17107,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db_3=yes
+; return 0; }
+EOF
+if { (eval echo configure:17113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_4=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db_3=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_4=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
-echo "${ECHO_T}$ol_cv_db_db_3" >&6
 
-       if test $ol_cv_db_db_3 = yes ; then
-               ol_cv_lib_db=-ldb-3
+echo "$ac_t""$ol_cv_db_db_4" 1>&6
+
+       if test $ol_cv_db_db_4 = yes ; then
+               ol_cv_lib_db=-ldb-4
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
-if test "${ol_cv_db_db2+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
+echo "configure:17137: checking for Berkeley DB link (-ldb4)" >&5
+if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb2
+  
+       ol_DB_LIB=-ldb4
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 17147 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -23976,9 +17160,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -23991,7 +17173,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -24006,60 +17188,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db2=yes
+; return 0; }
+EOF
+if { (eval echo configure:17194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db4=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db2=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db4=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
-echo "${ECHO_T}$ol_cv_db_db2" >&6
 
-       if test $ol_cv_db_db2 = yes ; then
-               ol_cv_lib_db=-ldb2
+echo "$ac_t""$ol_cv_db_db4" 1>&6
+
+       if test $ol_cv_db_db4 = yes ; then
+               ol_cv_lib_db=-ldb4
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
-if test "${ol_cv_db_db_2+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
+echo "configure:17218: checking for Berkeley DB link (-ldb)" >&5
+if eval "test \"\${ol_cv_db_db+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb-2
+  
+       ol_DB_LIB=-ldb
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 17228 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -24075,9 +17241,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -24090,7 +17254,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -24105,60 +17269,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db_2=yes
+; return 0; }
+EOF
+if { (eval echo configure:17275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db_2=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
-echo "${ECHO_T}$ol_cv_db_db_2" >&6
 
-       if test $ol_cv_db_db_2 = yes ; then
-               ol_cv_lib_db=-ldb-2
+echo "$ac_t""$ol_cv_db_db" 1>&6
+
+       if test $ol_cv_db_db = yes ; then
+               ol_cv_lib_db=-ldb
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
-if test "${ol_cv_db_db1+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
+echo "configure:17299: checking for Berkeley DB link (-ldb41)" >&5
+if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb1
+  
+       ol_DB_LIB=-ldb41
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 17309 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -24174,9 +17322,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -24189,7 +17335,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -24204,60 +17350,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db1=yes
+; return 0; }
+EOF
+if { (eval echo configure:17356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db41=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db1=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db41=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
-echo "${ECHO_T}$ol_cv_db_db1" >&6
 
-       if test $ol_cv_db_db1 = yes ; then
-               ol_cv_lib_db=-ldb1
+echo "$ac_t""$ol_cv_db_db41" 1>&6
+
+       if test $ol_cv_db_db41 = yes ; then
+               ol_cv_lib_db=-ldb41
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
-if test "${ol_cv_db_db_1+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
+echo "configure:17380: checking for Berkeley DB link (-ldb-41)" >&5
+if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb-1
+  
+       ol_DB_LIB=-ldb-41
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 17390 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -24273,9 +17403,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -24288,7 +17416,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -24303,213 +17431,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db_1=yes
+; return 0; }
+EOF
+if { (eval echo configure:17437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_41=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db_1=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_41=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
-fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
-echo "${ECHO_T}$ol_cv_db_db_1" >&6
-
-       if test $ol_cv_db_db_1 = yes ; then
-               ol_cv_lib_db=-ldb-1
-       fi
 fi
 
+echo "$ac_t""$ol_cv_db_db_41" 1>&6
 
-               if test "$ol_cv_lib_db" != no ; then
-                       ol_cv_berkeley_db=yes
-               fi
+       if test $ol_cv_db_db_41 = yes ; then
+               ol_cv_lib_db=-ldb-41
        fi
 fi
 
-       else
-               ol_cv_berkeley_db=no
-
-for ac_header in db.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
-
-fi
-
-done
-
-if test $ac_cv_header_db_h = yes; then
-       ol_cv_lib_db=no
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
-echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6
-if test "${ol_cv_db_none+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
+echo "configure:17461: checking for Berkeley DB link (-ldb-4.1)" >&5
+if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=
+  
+       ol_DB_LIB=-ldb-4.1
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 17471 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -24525,9 +17484,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -24540,7 +17497,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -24555,60 +17512,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_none=yes
+; return 0; }
+EOF
+if { (eval echo configure:17518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_4_dot_1=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_none=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_4_dot_1=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
-echo "${ECHO_T}$ol_cv_db_none" >&6
 
-       if test $ol_cv_db_none = yes ; then
-               ol_cv_lib_db=yes
+echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
+
+       if test $ol_cv_db_db_4_dot_1 = yes ; then
+               ol_cv_lib_db=-ldb-4.1
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb41)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb41)... $ECHO_C" >&6
-if test "${ol_cv_db_db41+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
+echo "configure:17542: checking for Berkeley DB link (-ldb-4-1)" >&5
+if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb41
+  
+       ol_DB_LIB=-ldb-4-1
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 17552 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -24624,9 +17565,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -24639,7 +17578,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -24654,60 +17593,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db41=yes
+; return 0; }
+EOF
+if { (eval echo configure:17599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_4_1=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db41=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_4_1=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db41" >&5
-echo "${ECHO_T}$ol_cv_db_db41" >&6
 
-       if test $ol_cv_db_db41 = yes ; then
-               ol_cv_lib_db=-ldb41
+echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
+
+       if test $ol_cv_db_db_4_1 = yes ; then
+               ol_cv_lib_db=-ldb-4-1
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-41)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb-41)... $ECHO_C" >&6
-if test "${ol_cv_db_db_41+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
+echo "configure:17623: checking for Berkeley DB link (-ldb3)" >&5
+if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb-41
+  
+       ol_DB_LIB=-ldb3
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 17633 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -24723,9 +17646,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -24738,7 +17659,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -24753,60 +17674,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db_41=yes
+; return 0; }
+EOF
+if { (eval echo configure:17680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db3=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db_41=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db3=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db_41" >&5
-echo "${ECHO_T}$ol_cv_db_db_41" >&6
 
-       if test $ol_cv_db_db_41 = yes ; then
-               ol_cv_lib_db=-ldb-41
+echo "$ac_t""$ol_cv_db_db3" 1>&6
+
+       if test $ol_cv_db_db3 = yes ; then
+               ol_cv_lib_db=-ldb3
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.1)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb-4.1)... $ECHO_C" >&6
-if test "${ol_cv_db_db_4_dot_1+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
+echo "configure:17704: checking for Berkeley DB link (-ldb-3)" >&5
+if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb-4.1
+  
+       ol_DB_LIB=-ldb-3
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 17714 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -24822,9 +17727,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -24837,7 +17740,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -24852,60 +17755,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db_4_dot_1=yes
+; return 0; }
+EOF
+if { (eval echo configure:17761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_3=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db_4_dot_1=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_3=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_1" >&5
-echo "${ECHO_T}$ol_cv_db_db_4_dot_1" >&6
 
-       if test $ol_cv_db_db_4_dot_1 = yes ; then
-               ol_cv_lib_db=-ldb-4.1
+echo "$ac_t""$ol_cv_db_db_3" 1>&6
+
+       if test $ol_cv_db_db_3 = yes ; then
+               ol_cv_lib_db=-ldb-3
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-1)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb-4-1)... $ECHO_C" >&6
-if test "${ol_cv_db_db_4_1+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
+echo "configure:17785: checking for Berkeley DB link (-ldb2)" >&5
+if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb-4-1
+  
+       ol_DB_LIB=-ldb2
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 17795 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -24921,9 +17808,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -24936,7 +17821,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -24951,60 +17836,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db_4_1=yes
+; return 0; }
+EOF
+if { (eval echo configure:17842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db2=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db_4_1=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db2=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db_4_1" >&5
-echo "${ECHO_T}$ol_cv_db_db_4_1" >&6
 
-       if test $ol_cv_db_db_4_1 = yes ; then
-               ol_cv_lib_db=-ldb-4-1
+echo "$ac_t""$ol_cv_db_db2" 1>&6
+
+       if test $ol_cv_db_db2 = yes ; then
+               ol_cv_lib_db=-ldb2
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6
-if test "${ol_cv_db_db_4+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
+echo "configure:17866: checking for Berkeley DB link (-ldb-2)" >&5
+if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb-4
+  
+       ol_DB_LIB=-ldb-2
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 17876 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -25020,9 +17889,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -25035,7 +17902,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -25050,60 +17917,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db_4=yes
+; return 0; }
+EOF
+if { (eval echo configure:17923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_2=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db_4=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_2=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
-echo "${ECHO_T}$ol_cv_db_db_4" >&6
 
-       if test $ol_cv_db_db_4 = yes ; then
-               ol_cv_lib_db=-ldb-4
+echo "$ac_t""$ol_cv_db_db_2" 1>&6
+
+       if test $ol_cv_db_db_2 = yes ; then
+               ol_cv_lib_db=-ldb-2
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6
-if test "${ol_cv_db_db4+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
+echo "configure:17947: checking for Berkeley DB link (-ldb1)" >&5
+if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb4
+  
+       ol_DB_LIB=-ldb1
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 17957 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -25119,9 +17970,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -25134,7 +17983,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -25149,60 +17998,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db4=yes
+; return 0; }
+EOF
+if { (eval echo configure:18004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db1=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db4=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db1=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
-echo "${ECHO_T}$ol_cv_db_db4" >&6
 
-       if test $ol_cv_db_db4 = yes ; then
-               ol_cv_lib_db=-ldb4
+echo "$ac_t""$ol_cv_db_db1" 1>&6
+
+       if test $ol_cv_db_db1 = yes ; then
+               ol_cv_lib_db=-ldb1
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6
-if test "${ol_cv_db_db+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
+echo "configure:18028: checking for Berkeley DB link (-ldb-1)" >&5
+if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb
+  
+       ol_DB_LIB=-ldb-1
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 18038 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -25218,9 +18051,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -25233,7 +18064,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -25248,60 +18079,95 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db=yes
+; return 0; }
+EOF
+if { (eval echo configure:18085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_1=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_1=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
-echo "${ECHO_T}$ol_cv_db_db" >&6
 
-       if test $ol_cv_db_db = yes ; then
-               ol_cv_lib_db=-ldb
+echo "$ac_t""$ol_cv_db_db_1" 1>&6
+
+       if test $ol_cv_db_db_1 = yes ; then
+               ol_cv_lib_db=-ldb-1
        fi
 fi
 
-if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb3)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb3)... $ECHO_C" >&6
-if test "${ol_cv_db_db3+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+               if test "$ol_cv_lib_db" != no ; then
+                       ol_cv_berkeley_db=yes
+               fi
+       fi
+fi
+
+       else
+               ol_cv_berkeley_db=no
+for ac_hdr in db.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:18120: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 18125 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:18130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
 else
+  echo "$ac_t""no" 1>&6
+fi
+done
 
-       ol_DB_LIB=-ldb3
+if test $ac_cv_header_db_h = yes; then
+       ol_cv_lib_db=no
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
+echo "configure:18160: checking for Berkeley DB link (default)" >&5
+if eval "test \"\${ol_cv_db_none+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       ol_DB_LIB=
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 18170 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -25317,9 +18183,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -25332,7 +18196,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -25347,60 +18211,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db3=yes
+; return 0; }
+EOF
+if { (eval echo configure:18217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_none=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db3=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_none=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db3" >&5
-echo "${ECHO_T}$ol_cv_db_db3" >&6
 
-       if test $ol_cv_db_db3 = yes ; then
-               ol_cv_lib_db=-ldb3
+echo "$ac_t""$ol_cv_db_none" 1>&6
+
+       if test $ol_cv_db_none = yes ; then
+               ol_cv_lib_db=yes
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-3)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb-3)... $ECHO_C" >&6
-if test "${ol_cv_db_db_3+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb43)""... $ac_c" 1>&6
+echo "configure:18241: checking for Berkeley DB link (-ldb43)" >&5
+if eval "test \"\${ol_cv_db_db43+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb-3
+  
+       ol_DB_LIB=-ldb43
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 18251 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -25416,9 +18264,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -25431,7 +18277,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -25446,60 +18292,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db_3=yes
+; return 0; }
+EOF
+if { (eval echo configure:18298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db43=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db_3=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db43=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db_3" >&5
-echo "${ECHO_T}$ol_cv_db_db_3" >&6
 
-       if test $ol_cv_db_db_3 = yes ; then
-               ol_cv_lib_db=-ldb-3
+echo "$ac_t""$ol_cv_db_db43" 1>&6
+
+       if test $ol_cv_db_db43 = yes ; then
+               ol_cv_lib_db=-ldb43
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb2)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb2)... $ECHO_C" >&6
-if test "${ol_cv_db_db2+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-43)""... $ac_c" 1>&6
+echo "configure:18322: checking for Berkeley DB link (-ldb-43)" >&5
+if eval "test \"\${ol_cv_db_db_43+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb2
+  
+       ol_DB_LIB=-ldb-43
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 18332 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -25515,9 +18345,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -25530,7 +18358,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -25545,60 +18373,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db2=yes
+; return 0; }
+EOF
+if { (eval echo configure:18379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_43=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db2=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_43=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db2" >&5
-echo "${ECHO_T}$ol_cv_db_db2" >&6
 
-       if test $ol_cv_db_db2 = yes ; then
-               ol_cv_lib_db=-ldb2
+echo "$ac_t""$ol_cv_db_db_43" 1>&6
+
+       if test $ol_cv_db_db_43 = yes ; then
+               ol_cv_lib_db=-ldb-43
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-2)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb-2)... $ECHO_C" >&6
-if test "${ol_cv_db_db_2+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-4.3)""... $ac_c" 1>&6
+echo "configure:18403: checking for Berkeley DB link (-ldb-4.3)" >&5
+if eval "test \"\${ol_cv_db_db_4_dot_3+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb-2
+  
+       ol_DB_LIB=-ldb-4.3
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 18413 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -25614,9 +18426,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -25629,7 +18439,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -25644,60 +18454,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db_2=yes
+; return 0; }
+EOF
+if { (eval echo configure:18460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_4_dot_3=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db_2=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_4_dot_3=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db_2" >&5
-echo "${ECHO_T}$ol_cv_db_db_2" >&6
 
-       if test $ol_cv_db_db_2 = yes ; then
-               ol_cv_lib_db=-ldb-2
+echo "$ac_t""$ol_cv_db_db_4_dot_3" 1>&6
+
+       if test $ol_cv_db_db_4_dot_3 = yes ; then
+               ol_cv_lib_db=-ldb-4.3
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb1)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb1)... $ECHO_C" >&6
-if test "${ol_cv_db_db1+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb-4-3)""... $ac_c" 1>&6
+echo "configure:18484: checking for Berkeley DB link (-ldb-4-3)" >&5
+if eval "test \"\${ol_cv_db_db_4_3+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb1
+  
+       ol_DB_LIB=-ldb-4-3
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 18494 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -25713,9 +18507,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -25728,7 +18520,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -25743,60 +18535,44 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db1=yes
+; return 0; }
+EOF
+if { (eval echo configure:18541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_4_3=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db1=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_4_3=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db1" >&5
-echo "${ECHO_T}$ol_cv_db_db1" >&6
 
-       if test $ol_cv_db_db1 = yes ; then
-               ol_cv_lib_db=-ldb1
+echo "$ac_t""$ol_cv_db_db_4_3" 1>&6
+
+       if test $ol_cv_db_db_4_3 = yes ; then
+               ol_cv_lib_db=-ldb-4-3
        fi
 fi
 
 if test $ol_cv_lib_db = no ; then
-       echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-1)" >&5
-echo $ECHO_N "checking for Berkeley DB link (-ldb-1)... $ECHO_C" >&6
-if test "${ol_cv_db_db_1+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+       echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
+echo "configure:18565: checking for Berkeley DB link (-ldb42)" >&5
+if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       ol_DB_LIB=-ldb-1
+  
+       ol_DB_LIB=-ldb42
        ol_LIBS=$LIBS
        LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 18575 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
 # include <db_185.h>
@@ -25812,9 +18588,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 #define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
+int main() {
 
 #if DB_VERSION_MAJOR > 1
        {
@@ -25827,7 +18601,7 @@ main ()
                        minor < DB_VERSION_MINOR )
                {
                        printf("Berkeley DB version mismatch\n"
-                               "\texpected: %s\n\tgot: %s\n",
+                               "\theader: %s\n\tlibrary: %s\n",
                                DB_VERSION_STRING, version);
                        return 1;
                }
@@ -25842,8919 +18616,6191 @@ main ()
        (void) dbopen( NULL, 0, 0, 0, NULL);
 #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
-  ol_cv_db_db_1=yes
+; return 0; }
+EOF
+if { (eval echo configure:18622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db42=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_db_db_1=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db42=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_db_db_1" >&5
-echo "${ECHO_T}$ol_cv_db_db_1" >&6
 
-       if test $ol_cv_db_db_1 = yes ; then
-               ol_cv_lib_db=-ldb-1
+echo "$ac_t""$ol_cv_db_db42" 1>&6
+
+       if test $ol_cv_db_db42 = yes ; then
+               ol_cv_lib_db=-ldb42
        fi
 fi
 
-
-       if test "$ol_cv_lib_db" != no ; then
-               ol_cv_berkeley_db=yes
-               echo "$as_me:$LINENO: checking for Berkeley DB thread support" >&5
-echo $ECHO_N "checking for Berkeley DB thread support... $ECHO_C" >&6
-if test "${ol_cv_berkeley_db_thread+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
+echo "configure:18646: checking for Berkeley DB link (-ldb-42)" >&5
+if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
+  
+       ol_DB_LIB=-ldb-42
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       ol_LIBS="$LIBS"
-       LIBS="$LTHREAD_LIBS $LIBS"
-       if test $ol_cv_lib_db != yes ; then
-               LIBS="$ol_cv_lib_db $LIBS"
-       fi
-
-       if test "$cross_compiling" = yes; then
-  ol_cv_berkeley_db_thread=cross
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 18656 "configure"
+#include "confdefs.h"
 
 #ifdef HAVE_DB_185_H
-       choke me;
+# include <db_185.h>
 #else
-#include <db.h>
-#endif
-#ifndef NULL
-#define NULL ((void *)0)
-#endif
-main()
-{
-       int rc;
-       u_int32_t flags = DB_CREATE |
-#ifdef DB_PRIVATE
-               DB_PRIVATE |
+# include <db.h>
 #endif
-               DB_THREAD;
-
-#if DB_VERSION_MAJOR > 2
-       DB_ENV *env = NULL;
-
-       rc = db_env_create( &env, 0 );
 
-       flags |= DB_INIT_MPOOL;
-#ifdef DB_MPOOL_PRIVATE
-       flags |= DB_MPOOL_PRIVATE;
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
 #endif
 
-       if( rc ) {
-               printf("BerkeleyDB: %s\n", db_strerror(rc) );
-               return rc;
-       }
-
-#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
-       rc = env->open( env, NULL, flags, 0 );
-#else
-       rc = env->open( env, NULL, NULL, flags, 0 );
+#ifndef NULL
+#define NULL ((void*)0)
 #endif
 
-       if ( rc == 0 ) {
-               rc = env->close( env, 0 );
-       }
-
-       if( rc ) {
-               printf("BerkeleyDB: %s\n", db_strerror(rc) );
-               return rc;
-       }
+int main() {
 
-#else
-       DB_ENV env;
-       memset( &env, '\0', sizeof(env) );
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
-       rc = db_appinit( NULL, NULL, &env, flags );
+               version = db_version( &major, &minor, &patch );
 
-       if( rc == 0 ) {
-               db_appexit( &env );
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
        }
+#endif
 
-       unlink("__db_mpool.share");
-       unlink("__db_lock.share");
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
+#else
+       (void) dbopen( NULL, 0, 0, 0, NULL);
 #endif
 
-       return rc;
-}
-_ACEOF
-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='./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
-  ol_cv_berkeley_db_thread=yes
+; return 0; }
+EOF
+if { (eval echo configure:18703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_42=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_berkeley_db_thread=no
-fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_42=no
 fi
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_thread" >&5
-echo "${ECHO_T}$ol_cv_berkeley_db_thread" >&6
 
-       if test $ol_cv_berkeley_db_thread != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BERKELEY_DB_THREAD 1
-_ACEOF
-
-       fi
+echo "$ac_t""$ol_cv_db_db_42" 1>&6
 
+       if test $ol_cv_db_db_42 = yes ; then
+               ol_cv_lib_db=-ldb-42
        fi
 fi
 
-       fi
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
+echo "configure:18727: checking for Berkeley DB link (-ldb-4.2)" >&5
+if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       ol_DB_LIB=-ldb-4.2
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       if test $ol_cv_berkeley_db != no ; then
+       cat > conftest.$ac_ext <<EOF
+#line 18737 "configure"
+#include "confdefs.h"
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BERKELEY_DB 1
-_ACEOF
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
+#else
+# include <db.h>
+#endif
 
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
+#endif
 
-               ol_link_ldbm=berkeley
-               ol_with_ldbm_api=berkeley
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
 
-               if test $ol_with_ldbm_type = hash ; then
+int main() {
 
-cat >>confdefs.h <<\_ACEOF
-#define LDBM_USE_DBHASH 1
-_ACEOF
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
-               else
+               version = db_version( &major, &minor, &patch );
 
-cat >>confdefs.h <<\_ACEOF
-#define LDBM_USE_DBBTREE 1
-_ACEOF
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
+#endif
 
-               fi
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
+#else
+       (void) dbopen( NULL, 0, 0, 0, NULL);
+#endif
 
-                                               if test $ol_cv_lib_db != yes ; then
-                       LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
-               fi
+; return 0; }
+EOF
+if { (eval echo configure:18784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_4_dot_2=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_4_dot_2=no
+fi
+rm -f conftest*
+
+       LIBS="$ol_LIBS"
+
+fi
+
+echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
+
+       if test $ol_cv_db_db_4_dot_2 = yes ; then
+               ol_cv_lib_db=-ldb-4.2
        fi
 fi
 
-if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
-       { { echo "$as_me:$LINENO: error: BDB: BerkeleyDB not available" >&5
-echo "$as_me: error: BDB: BerkeleyDB not available" >&2;}
-   { (exit 1); exit 1; }; }
-elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
-       echo "$as_me:$LINENO: checking Berkeley DB version for BDB backend" >&5
-echo $ECHO_N "checking Berkeley DB version for BDB backend... $ECHO_C" >&6
-if test "${ol_cv_bdb_compat+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
+echo "configure:18808: checking for Berkeley DB link (-ldb-4-2)" >&5
+if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
+  
+       ol_DB_LIB=-ldb-4-2
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 18818 "configure"
+#include "confdefs.h"
 
-#include <db.h>
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
+#else
+# include <db.h>
+#endif
 
- /* this check could be improved */
 #ifndef DB_VERSION_MAJOR
-#      define DB_VERSION_MAJOR 1
+# define DB_VERSION_MAJOR 1
 #endif
-#ifndef DB_VERSION_MINOR
-#      define DB_VERSION_MINOR 0
+
+#ifndef NULL
+#define NULL ((void*)0)
 #endif
 
-/* require 4.1 or later */
-#if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
-       __db_version_compat
+int main() {
+
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
+
+               version = db_version( &major, &minor, &patch );
+
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
 #endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "__db_version_compat" >/dev/null 2>&1; then
-  ol_cv_bdb_compat=yes
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
+#else
+       (void) dbopen( NULL, 0, 0, 0, NULL);
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:18865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_4_2=yes
 else
-  ol_cv_bdb_compat=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_4_2=no
 fi
 rm -f conftest*
 
+       LIBS="$ol_LIBS"
+
 fi
-echo "$as_me:$LINENO: result: $ol_cv_bdb_compat" >&5
-echo "${ECHO_T}$ol_cv_bdb_compat" >&6
 
+echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
 
-       if test $ol_cv_bdb_compat = yes ; then
-               ol_enable_bdb=yes
-       elif test $ol_enable_bdb = yes ; then
-               { { echo "$as_me:$LINENO: error: BDB: BerkeleyDB version incompatible" >&5
-echo "$as_me: error: BDB: BerkeleyDB version incompatible" >&2;}
-   { (exit 1); exit 1; }; }
-       else
-               ol_enable_bdb=no
+       if test $ol_cv_db_db_4_2 = yes ; then
+               ol_cv_lib_db=-ldb-4-2
        fi
 fi
 
-if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
-       { echo "$as_me:$LINENO: WARNING: Could not find LDBM with BTREE support" >&5
-echo "$as_me: WARNING: Could not find LDBM with BTREE support" >&2;}
-       ol_with_ldbm_api=none
-fi
-
-if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
-       echo "$as_me:$LINENO: checking for MDBM library" >&5
-echo $ECHO_N "checking for MDBM library... $ECHO_C" >&6
-if test "${ol_cv_lib_mdbm+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
+echo "configure:18889: checking for Berkeley DB link (-ldb-4)" >&5
+if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-       ol_LIBS="$LIBS"
-       echo "$as_me:$LINENO: checking for mdbm_set_chain" >&5
-echo $ECHO_N "checking for mdbm_set_chain... $ECHO_C" >&6
-if test "${ac_cv_func_mdbm_set_chain+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char mdbm_set_chain (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
+  
+       ol_DB_LIB=-ldb-4
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
+
+       cat > conftest.$ac_ext <<EOF
+#line 18899 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
 #else
-# include <assert.h>
-#endif
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
+# include <db.h>
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char mdbm_set_chain ();
-/* 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_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
-choke me
-#else
-char (*f) () = mdbm_set_chain;
+
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
 #endif
-#ifdef __cplusplus
-}
+
+#ifndef NULL
+#define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
-return f != mdbm_set_chain;
-  ;
-  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_mdbm_set_chain=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_mdbm_set_chain=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_mdbm_set_chain" >&5
-echo "${ECHO_T}$ac_cv_func_mdbm_set_chain" >&6
-if test $ac_cv_func_mdbm_set_chain = yes; then
-  ol_cv_lib_mdbm=yes
-else
+int main() {
 
-               echo "$as_me:$LINENO: checking for mdbm_set_chain in -lmdbm" >&5
-echo $ECHO_N "checking for mdbm_set_chain in -lmdbm... $ECHO_C" >&6
-if test "${ac_cv_lib_mdbm_mdbm_set_chain+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmdbm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
+               version = db_version( &major, &minor, &patch );
+
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char mdbm_set_chain ();
-int
-main ()
-{
-mdbm_set_chain ();
-  ;
-  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_mdbm_mdbm_set_chain=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_mdbm_mdbm_set_chain=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_mdbm_mdbm_set_chain" >&5
-echo "${ECHO_T}$ac_cv_lib_mdbm_mdbm_set_chain" >&6
-if test $ac_cv_lib_mdbm_mdbm_set_chain = yes; then
-  ol_cv_lib_mdbm=-lmdbm
-else
-  ol_cv_lib_mdbm=no
-fi
 
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
+#else
+       (void) dbopen( NULL, 0, 0, 0, NULL);
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:18946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_4=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_4=no
 fi
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_lib_mdbm" >&5
-echo "${ECHO_T}$ol_cv_lib_mdbm" >&6
 
+echo "$ac_t""$ol_cv_db_db_4" 1>&6
 
-
-for ac_header in mdbm.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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"
+       if test $ol_cv_db_db_4 = yes ; then
+               ol_cv_lib_db=-ldb-4
+       fi
 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
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
+echo "configure:18970: checking for Berkeley DB link (-ldb4)" >&5
+if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       ol_DB_LIB=-ldb4
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-fi
+       cat > conftest.$ac_ext <<EOF
+#line 18980 "configure"
+#include "confdefs.h"
 
-done
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
+#else
+# include <db.h>
+#endif
 
- echo "$as_me:$LINENO: checking for db" >&5
-echo $ECHO_N "checking for db... $ECHO_C" >&6
-if test "${ol_cv_mdbm+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
+#endif
 
-       if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
-               ol_cv_mdbm=no
-       else
-               ol_cv_mdbm=yes
-       fi
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
 
-fi
-echo "$as_me:$LINENO: result: $ol_cv_mdbm" >&5
-echo "${ECHO_T}$ol_cv_mdbm" >&6
- if test $ol_cv_mdbm = yes ; then
+int main() {
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MDBM 1
-_ACEOF
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
- fi
+               version = db_version( &major, &minor, &patch );
 
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
+#endif
 
-       if test $ol_cv_mdbm = yes ; then
-               ol_link_ldbm=mdbm
-               ol_with_ldbm_api=mdbm
-               if test $ol_cv_lib_mdbm != yes ; then
-                       LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
-               fi
-       fi
-fi
-
-if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
-       echo "$as_me:$LINENO: checking for GDBM library" >&5
-echo $ECHO_N "checking for GDBM library... $ECHO_C" >&6
-if test "${ol_cv_lib_gdbm+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-       ol_LIBS="$LIBS"
-       echo "$as_me:$LINENO: checking for gdbm_open" >&5
-echo $ECHO_N "checking for gdbm_open... $ECHO_C" >&6
-if test "${ac_cv_func_gdbm_open+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char gdbm_open (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-/* 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 gdbm_open ();
-/* 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_gdbm_open) || defined (__stub___gdbm_open)
-choke me
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
 #else
-char (*f) () = gdbm_open;
-#endif
-#ifdef __cplusplus
-}
+       (void) dbopen( NULL, 0, 0, 0, NULL);
 #endif
 
-int
-main ()
-{
-return f != gdbm_open;
-  ;
-  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_gdbm_open=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_gdbm_open=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_gdbm_open" >&5
-echo "${ECHO_T}$ac_cv_func_gdbm_open" >&6
-if test $ac_cv_func_gdbm_open = yes; then
-  ol_cv_lib_gdbm=yes
+; return 0; }
+EOF
+if { (eval echo configure:19027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db4=yes
 else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db4=no
+fi
+rm -f conftest*
 
-               echo "$as_me:$LINENO: checking for gdbm_open in -lgdbm" >&5
-echo $ECHO_N "checking for gdbm_open in -lgdbm... $ECHO_C" >&6
-if test "${ac_cv_lib_gdbm_gdbm_open+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgdbm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       LIBS="$ol_LIBS"
 
-/* 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 gdbm_open ();
-int
-main ()
-{
-gdbm_open ();
-  ;
-  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_gdbm_gdbm_open=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_gdbm_gdbm_open=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_gdbm_gdbm_open" >&5
-echo "${ECHO_T}$ac_cv_lib_gdbm_gdbm_open" >&6
-if test $ac_cv_lib_gdbm_gdbm_open = yes; then
-  ol_cv_lib_gdbm=-lgdbm
-else
-  ol_cv_lib_gdbm=no
 fi
 
+echo "$ac_t""$ol_cv_db_db4" 1>&6
 
+       if test $ol_cv_db_db4 = yes ; then
+               ol_cv_lib_db=-ldb4
+       fi
 fi
 
-       LIBS="$ol_LIBS"
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
+echo "configure:19051: checking for Berkeley DB link (-ldb)" >&5
+if eval "test \"\${ol_cv_db_db+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       ol_DB_LIB=-ldb
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-fi
-echo "$as_me:$LINENO: result: $ol_cv_lib_gdbm" >&5
-echo "${ECHO_T}$ol_cv_lib_gdbm" >&6
+       cat > conftest.$ac_ext <<EOF
+#line 19061 "configure"
+#include "confdefs.h"
 
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
+#else
+# include <db.h>
+#endif
 
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
+#endif
 
-for ac_header in gdbm.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+int main() {
 
-fi
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
-done
+               version = db_version( &major, &minor, &patch );
 
- echo "$as_me:$LINENO: checking for db" >&5
-echo $ECHO_N "checking for db... $ECHO_C" >&6
-if test "${ol_cv_gdbm+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
+#endif
 
-       if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
-               ol_cv_gdbm=no
-       else
-               ol_cv_gdbm=yes
-       fi
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
+#else
+       (void) dbopen( NULL, 0, 0, 0, NULL);
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:19108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db=no
 fi
-echo "$as_me:$LINENO: result: $ol_cv_gdbm" >&5
-echo "${ECHO_T}$ol_cv_gdbm" >&6
- if test $ol_cv_gdbm = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GDBM 1
-_ACEOF
+rm -f conftest*
 
- fi
+       LIBS="$ol_LIBS"
 
+fi
 
-       if test $ol_cv_gdbm = yes ; then
-               ol_link_ldbm=gdbm
-               ol_with_ldbm_api=gdbm
+echo "$ac_t""$ol_cv_db_db" 1>&6
 
-               if test $ol_cv_lib_gdbm != yes ; then
-                       LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
-               fi
+       if test $ol_cv_db_db = yes ; then
+               ol_cv_lib_db=-ldb
        fi
 fi
 
-if test $ol_with_ldbm_api = ndbm ; then
-       echo "$as_me:$LINENO: checking for NDBM library" >&5
-echo $ECHO_N "checking for NDBM library... $ECHO_C" >&6
-if test "${ol_cv_lib_ndbm+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
+echo "configure:19132: checking for Berkeley DB link (-ldb41)" >&5
+if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-       ol_LIBS="$LIBS"
-       echo "$as_me:$LINENO: checking for dbm_open" >&5
-echo $ECHO_N "checking for dbm_open... $ECHO_C" >&6
-if test "${ac_cv_func_dbm_open+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dbm_open (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-/* 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 dbm_open ();
-/* 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_dbm_open) || defined (__stub___dbm_open)
-choke me
+  
+       ol_DB_LIB=-ldb41
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
+
+       cat > conftest.$ac_ext <<EOF
+#line 19142 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
 #else
-char (*f) () = dbm_open;
+# include <db.h>
 #endif
-#ifdef __cplusplus
-}
+
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
 #endif
 
-int
-main ()
-{
-return f != dbm_open;
-  ;
-  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_dbm_open=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_dbm_open=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_dbm_open" >&5
-echo "${ECHO_T}$ac_cv_func_dbm_open" >&6
-if test $ac_cv_func_dbm_open = yes; then
-  ol_cv_lib_ndbm=yes
-else
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
 
-               echo "$as_me:$LINENO: checking for dbm_open in -lndbm" >&5
-echo $ECHO_N "checking for dbm_open in -lndbm... $ECHO_C" >&6
-if test "${ac_cv_lib_ndbm_dbm_open+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lndbm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+int main() {
 
-/* 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 dbm_open ();
-int
-main ()
-{
-dbm_open ();
-  ;
-  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_ndbm_dbm_open=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_ndbm_dbm_open=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_ndbm_dbm_open" >&5
-echo "${ECHO_T}$ac_cv_lib_ndbm_dbm_open" >&6
-if test $ac_cv_lib_ndbm_dbm_open = yes; then
-  ol_cv_lib_ndbm=-lndbm
-else
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
-                       echo "$as_me:$LINENO: checking for dbm_open in -ldbm" >&5
-echo $ECHO_N "checking for dbm_open in -ldbm... $ECHO_C" >&6
-if test "${ac_cv_lib_dbm_dbm_open+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldbm  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+               version = db_version( &major, &minor, &patch );
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dbm_open ();
-int
-main ()
-{
-dbm_open ();
-  ;
-  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_dbm_dbm_open=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_dbm_dbm_open=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_dbm_dbm_open" >&5
-echo "${ECHO_T}$ac_cv_lib_dbm_dbm_open" >&6
-if test $ac_cv_lib_dbm_dbm_open = yes; then
-  ol_cv_lib_ndbm=-ldbm
-else
-  ol_cv_lib_ndbm=no
-fi
-
-fi
 
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
+#else
+       (void) dbopen( NULL, 0, 0, 0, NULL);
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:19189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db41=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db41=no
 fi
+rm -f conftest*
 
        LIBS="$ol_LIBS"
 
 fi
-echo "$as_me:$LINENO: result: $ol_cv_lib_ndbm" >&5
-echo "${ECHO_T}$ol_cv_lib_ndbm" >&6
-
 
+echo "$ac_t""$ol_cv_db_db41" 1>&6
 
-for ac_header in ndbm.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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"
+       if test $ol_cv_db_db41 = yes ; then
+               ol_cv_lib_db=-ldb41
+       fi
 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
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
+echo "configure:19213: checking for Berkeley DB link (-ldb-41)" >&5
+if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       ol_DB_LIB=-ldb-41
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-fi
+       cat > conftest.$ac_ext <<EOF
+#line 19223 "configure"
+#include "confdefs.h"
 
-done
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
+#else
+# include <db.h>
+#endif
 
- echo "$as_me:$LINENO: checking for db" >&5
-echo $ECHO_N "checking for db... $ECHO_C" >&6
-if test "${ol_cv_ndbm+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
+#endif
 
-       if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
-               ol_cv_ndbm=no
-       else
-               ol_cv_ndbm=yes
-       fi
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
 
-fi
-echo "$as_me:$LINENO: result: $ol_cv_ndbm" >&5
-echo "${ECHO_T}$ol_cv_ndbm" >&6
- if test $ol_cv_ndbm = yes ; then
+int main() {
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NDBM 1
-_ACEOF
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
- fi
+               version = db_version( &major, &minor, &patch );
 
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
+#endif
 
-       if test $ol_cv_ndbm = yes ; then
-               ol_link_ldbm=ndbm
-               ol_with_ldbm_api=ndbm
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
+#else
+       (void) dbopen( NULL, 0, 0, 0, NULL);
+#endif
 
-               if test $ol_cv_lib_ndbm != yes ; then
-                       LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
-               fi
-       fi
+; return 0; }
+EOF
+if { (eval echo configure:19270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_41=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_41=no
 fi
+rm -f conftest*
 
-if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
-       { echo "$as_me:$LINENO: WARNING: could not find suitable LDBM backend" >&5
-echo "$as_me: WARNING: could not find suitable LDBM backend" >&2;}
-       if test $ol_enable_ldbm = yes ; then
-               { { echo "$as_me:$LINENO: error: select appropriate LDBM options or disable" >&5
-echo "$as_me: error: select appropriate LDBM options or disable" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
+       LIBS="$ol_LIBS"
 
-       { echo "$as_me:$LINENO: WARNING: disabling LDBM" >&5
-echo "$as_me: WARNING: disabling LDBM" >&2;}
-       ol_enable_ldbm=no
 fi
 
+echo "$ac_t""$ol_cv_db_db_41" 1>&6
 
-if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
-       BUILD_LIBS_DYNAMIC=shared
-
-cat >>confdefs.h <<\_ACEOF
-#define LDAP_LIBS_DYNAMIC 1
-_ACEOF
-
-       LTSTATIC=""
-else
-       BUILD_LIBS_DYNAMIC=static
-       LTSTATIC="-static"
+       if test $ol_cv_db_db_41 = yes ; then
+               ol_cv_lib_db=-ldb-41
+       fi
 fi
 
-if test $ol_enable_wrappers != no ; then
-
-for ac_header in tcpd.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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 $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
+echo "configure:19294: checking for Berkeley DB link (-ldb-4.1)" >&5
+if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&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
-
-               echo "$as_me:$LINENO: checking for TCP wrappers library" >&5
-echo $ECHO_N "checking for TCP wrappers library... $ECHO_C" >&6
-               save_LIBS="$LIBS"
-               LIBS="$LIBS -lwrap"
-               cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <tcpd.h>
-int allow_severity = 0;
-int deny_severity  = 0;
-
-struct request_info *req;
-
-int
-main ()
-{
-
-hosts_access(req)
+  
+       ol_DB_LIB=-ldb-4.1
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-  ;
-  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
-  echo "$as_me:$LINENO: result: -lwrap" >&5
-echo "${ECHO_T}-lwrap" >&6
-               have_wrappers=yes
-               LIBS="$save_LIBS"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       cat > conftest.$ac_ext <<EOF
+#line 19304 "configure"
+#include "confdefs.h"
 
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
+#else
+# include <db.h>
+#endif
 
-                               LIBS="$LIBS -lnsl"
-               cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
+#endif
 
-#include <tcpd.h>
-int allow_severity = 0;
-int deny_severity  = 0;
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
 
-struct request_info *req;
+int main() {
 
-int
-main ()
-{
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
-hosts_access(req)
+               version = db_version( &major, &minor, &patch );
 
-  ;
-  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
-  echo "$as_me:$LINENO: result: -lwrap -lnsl" >&5
-echo "${ECHO_T}-lwrap -lnsl" >&6
-               have_wrappers=yes
-               LIBS="$save_LIBS -lnsl"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
+#endif
 
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
+#else
+       (void) dbopen( NULL, 0, 0, 0, NULL);
+#endif
 
-               echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-               have_wrappers=no
-               LIBS=$save_LIBS
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+; return 0; }
+EOF
+if { (eval echo configure:19351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_4_dot_1=yes
 else
-  have_wrappers=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_4_dot_1=no
 fi
+rm -f conftest*
 
-done
-
+       LIBS="$ol_LIBS"
 
-       if test $have_wrappers = yes ; then
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TCPD 1
-_ACEOF
+echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
 
-               WRAP_LIBS="-lwrap"
-       elif test $ol_enable_wrappers = yes ; then
-               { { echo "$as_me:$LINENO: error: could not find TCP wrappers, select apppropriate options ore disable" >&5
-echo "$as_me: error: could not find TCP wrappers, select apppropriate options ore disable" >&2;}
-   { (exit 1); exit 1; }; }
-       else
-               { echo "$as_me:$LINENO: WARNING: could not find TCP wrappers, support disabled" >&5
-echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
-               WRAP_LIBS=""
+       if test $ol_cv_db_db_4_dot_1 = yes ; then
+               ol_cv_lib_db=-ldb-4.1
        fi
 fi
 
-if test $ol_enable_syslog != no ; then
-       echo "$as_me:$LINENO: checking for openlog" >&5
-echo $ECHO_N "checking for openlog... $ECHO_C" >&6
-if test "${ac_cv_func_openlog+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char openlog (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
+echo "configure:19375: checking for Berkeley DB link (-ldb-4-1)" >&5
+if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       ol_DB_LIB=-ldb-4-1
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
+
+       cat > conftest.$ac_ext <<EOF
+#line 19385 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
 #else
-# include <assert.h>
-#endif
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
+# include <db.h>
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char openlog ();
-/* 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_openlog) || defined (__stub___openlog)
-choke me
-#else
-char (*f) () = openlog;
+
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
 #endif
-#ifdef __cplusplus
-}
+
+#ifndef NULL
+#define NULL ((void*)0)
 #endif
 
-int
-main ()
-{
-return f != openlog;
-  ;
-  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_openlog=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_openlog=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_openlog" >&5
-echo "${ECHO_T}$ac_cv_func_openlog" >&6
+int main() {
 
-       if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
-               { { echo "$as_me:$LINENO: error: could not find syslog" >&5
-echo "$as_me: error: could not find syslog" >&2;}
-   { (exit select appropriate options or disable); exit select appropriate options or disable; }; }
-       fi
-       ol_enable_syslog=$ac_cv_func_openlog
-fi
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
+               version = db_version( &major, &minor, &patch );
 
-ol_link_sql=no
-if test $ol_enable_sql != no ; then
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
+#endif
 
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
+#else
+       (void) dbopen( NULL, 0, 0, 0, NULL);
+#endif
 
-for ac_header in sql.h sqlext.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+; return 0; }
+EOF
+if { (eval echo configure:19432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_4_1=yes
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_4_1=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
+       LIBS="$ol_LIBS"
 
-else
+fi
 
-               { { echo "$as_me:$LINENO: error: could not locate SQL headers" >&5
-echo "$as_me: error: could not locate SQL headers" >&2;}
-   { (exit 1); exit 1; }; }
+echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
 
+       if test $ol_cv_db_db_4_1 = yes ; then
+               ol_cv_lib_db=-ldb-4-1
+       fi
 fi
 
-done
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
+echo "configure:19456: checking for Berkeley DB link (-ldb3)" >&5
+if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       ol_DB_LIB=-ldb3
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
+       cat > conftest.$ac_ext <<EOF
+#line 19466 "configure"
+#include "confdefs.h"
 
-       echo "$as_me:$LINENO: checking for SQLDriverConnect in -liodbc" >&5
-echo $ECHO_N "checking for SQLDriverConnect in -liodbc... $ECHO_C" >&6
-if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liodbc  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
+#else
+# include <db.h>
+#endif
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char SQLDriverConnect ();
-int
-main ()
-{
-SQLDriverConnect ();
-  ;
-  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_iodbc_SQLDriverConnect=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_iodbc_SQLDriverConnect=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_iodbc_SQLDriverConnect" >&5
-echo "${ECHO_T}$ac_cv_lib_iodbc_SQLDriverConnect" >&6
-if test $ac_cv_lib_iodbc_SQLDriverConnect = yes; then
-  have_iodbc=yes
-else
-  have_iodbc=no
-fi
 
-       if test $have_iodbc = yes ; then
-               ol_link_sql="-liodbc"
-       else
-               echo "$as_me:$LINENO: checking for SQLDriverConnect in -lodbc" >&5
-echo $ECHO_N "checking for SQLDriverConnect in -lodbc... $ECHO_C" >&6
-if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lodbc  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
+#ifndef NULL
+#define NULL ((void*)0)
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char SQLDriverConnect ();
-int
-main ()
-{
-SQLDriverConnect ();
-  ;
-  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_odbc_SQLDriverConnect=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_odbc_SQLDriverConnect=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_odbc_SQLDriverConnect" >&5
-echo "${ECHO_T}$ac_cv_lib_odbc_SQLDriverConnect" >&6
-if test $ac_cv_lib_odbc_SQLDriverConnect = yes; then
-  have_odbc=yes
-else
-  have_odbc=no
-fi
 
-               if test $have_odbc = yes ; then
-                       ol_link_sql="-lodbc"
-               fi
-       fi
+int main() {
 
-       if test $ol_link_sql != no ; then
-               SLAPD_SQL_LIBS="$ol_link_sql"
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
-       elif test $ol_enable_sql != auto ; then
-               { { echo "$as_me:$LINENO: error: could not locate suitable ODBC library" >&5
-echo "$as_me: error: could not locate suitable ODBC library" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-fi
+               version = db_version( &major, &minor, &patch );
+
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
+#endif
 
-if test $ol_enable_tcl != no ; then
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
+#else
+       (void) dbopen( NULL, 0, 0, 0, NULL);
+#endif
 
-for ac_header in tcl.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+; return 0; }
+EOF
+if { (eval echo configure:19513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db3=yes
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db3=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
+       LIBS="$ol_LIBS"
 
 fi
 
-done
-
-
-       if test $ac_cv_header_tcl_h != yes ; then
-               have_tcl=no
-       else
-               for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
-                       as_ac_Lib=`echo "ac_cv_lib_$lib''_main" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for main in -l$lib" >&5
-echo $ECHO_N "checking for main in -l$lib... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Lib+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-l$lib  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-
-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
-  eval "$as_ac_Lib=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Lib=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: `eval echo '${'$as_ac_Lib'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
-if test `eval echo '${'$as_ac_Lib'}'` = yes; then
-  have_tcl=yes
-                          if test x"$ol_with_tcl_module" = "xstatic" ; then
-                                       SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
-                          else
-                                       MOD_TCL_LIB="-l${lib}"
-                          fi;break
-else
-  have_tcl=no
-fi
-
-               done
-       fi
-
-       if test $have_tcl != yes ; then
-               { echo "$as_me:$LINENO: WARNING: could not find -ltcl" >&5
-echo "$as_me: WARNING: could not find -ltcl" >&2;}
-               if test $ol_enable_tcl = yes ; then
-                       { { echo "$as_me:$LINENO: error: could not find tcl, select appropriate options or disable" >&5
-echo "$as_me: error: could not find tcl, select appropriate options or disable" >&2;}
-   { (exit 1); exit 1; }; }
-               fi
+echo "$ac_t""$ol_cv_db_db3" 1>&6
 
-               ol_enable_tcl=no
+       if test $ol_cv_db_db3 = yes ; then
+               ol_cv_lib_db=-ldb3
        fi
 fi
 
-ol_link_termcap=no
-
-
-for ac_header in termcap.h ncurses.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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 $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
+echo "configure:19537: checking for Berkeley DB link (-ldb-3)" >&5
+if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&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
-
-fi
-
-done
+  
+       ol_DB_LIB=-ldb-3
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
+       cat > conftest.$ac_ext <<EOF
+#line 19547 "configure"
+#include "confdefs.h"
 
-if test $ol_link_termcap = no ; then
-       echo "$as_me:$LINENO: checking for tputs in -ltermcap" >&5
-echo $ECHO_N "checking for tputs in -ltermcap... $ECHO_C" >&6
-if test "${ac_cv_lib_termcap_tputs+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltermcap  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
+#else
+# include <db.h>
+#endif
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char tputs ();
-int
-main ()
-{
-tputs ();
-  ;
-  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_termcap_tputs=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_termcap_tputs=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_termcap_tputs" >&5
-echo "${ECHO_T}$ac_cv_lib_termcap_tputs" >&6
-if test $ac_cv_lib_termcap_tputs = yes; then
-  have_termcap=yes
-else
-  have_termcap=no
-fi
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
 
-       if test $have_termcap = yes ; then
+int main() {
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TERMCAP 1
-_ACEOF
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
-               ol_link_termcap=yes
-               TERMCAP_LIBS=-ltermcap
-       fi
-fi
+               version = db_version( &major, &minor, &patch );
 
-if test $ol_link_termcap = no ; then
-       echo "$as_me:$LINENO: checking for initscr in -lncurses" >&5
-echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6
-if test "${ac_cv_lib_ncurses_initscr+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lncurses  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
+#endif
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
+#else
+       (void) dbopen( NULL, 0, 0, 0, NULL);
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char initscr ();
-int
-main ()
-{
-initscr ();
-  ;
-  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_ncurses_initscr=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_ncurses_initscr=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_ncurses_initscr" >&5
-echo "${ECHO_T}$ac_cv_lib_ncurses_initscr" >&6
-if test $ac_cv_lib_ncurses_initscr = yes; then
-  have_ncurses=yes
+; return 0; }
+EOF
+if { (eval echo configure:19594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_3=yes
 else
-  have_ncurses=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_3=no
 fi
+rm -f conftest*
 
-       if test $have_ncurses = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NCURSES 1
-_ACEOF
+       LIBS="$ol_LIBS"
 
-               ol_link_termcap=yes
-               TERMCAP_LIBS=-lncurses
-       fi
 fi
 
-if test $ol_link_termcap = no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_TERMCAP 1
-_ACEOF
+echo "$ac_t""$ol_cv_db_db_3" 1>&6
 
-       TERMCAP_LIBS=
+       if test $ol_cv_db_db_3 = yes ; then
+               ol_cv_lib_db=-ldb-3
+       fi
 fi
 
-ol_link_sasl=no
-ol_link_spasswd=no
-if test $ol_with_cyrus_sasl != no ; then
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
+echo "configure:19618: checking for Berkeley DB link (-ldb2)" >&5
+if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       ol_DB_LIB=-ldb2
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
+       cat > conftest.$ac_ext <<EOF
+#line 19628 "configure"
+#include "confdefs.h"
 
-for ac_header in sasl/sasl.h sasl.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
+#else
+# include <db.h>
+#endif
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
+#endif
 
-fi
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
 
-done
+int main() {
 
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
-       if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
-               echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl2" >&5
-echo $ECHO_N "checking for sasl_client_init in -lsasl2... $ECHO_C" >&6
-if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsasl2  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+               version = db_version( &major, &minor, &patch );
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char sasl_client_init ();
-int
-main ()
-{
-sasl_client_init ();
-  ;
-  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_sasl2_sasl_client_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_sasl2_sasl_client_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_sasl2_sasl_client_init" >&5
-echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_client_init" >&6
-if test $ac_cv_lib_sasl2_sasl_client_init = yes; then
-  ol_link_sasl="-lsasl2"
-else
-  echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl" >&5
-echo $ECHO_N "checking for sasl_client_init in -lsasl... $ECHO_C" >&6
-if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsasl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
+#else
+       (void) dbopen( NULL, 0, 0, 0, NULL);
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char sasl_client_init ();
-int
-main ()
-{
-sasl_client_init ();
-  ;
-  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_sasl_sasl_client_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_sasl_sasl_client_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_sasl_sasl_client_init" >&5
-echo "${ECHO_T}$ac_cv_lib_sasl_sasl_client_init" >&6
-if test $ac_cv_lib_sasl_sasl_client_init = yes; then
-  ol_link_sasl="-lsasl"
+
+; return 0; }
+EOF
+if { (eval echo configure:19675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db2=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db2=no
 fi
+rm -f conftest*
+
+       LIBS="$ol_LIBS"
 
 fi
 
+echo "$ac_t""$ol_cv_db_db2" 1>&6
+
+       if test $ol_cv_db_db2 = yes ; then
+               ol_cv_lib_db=-ldb2
        fi
+fi
 
-       if test $ol_link_sasl = no ; then
-               if test $ol_with_cyrus_sasl != auto ; then
-                       { { echo "$as_me:$LINENO: error: Could not locate Cyrus SASL" >&5
-echo "$as_me: error: Could not locate Cyrus SASL" >&2;}
-   { (exit 1); exit 1; }; }
-               else
-                       { echo "$as_me:$LINENO: WARNING: Could not locate Cyrus SASL" >&5
-echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
-                       { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
-echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
-                       if test $ol_link_tls = no ; then
-                               { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
-echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
-                       fi
-               fi
-       else
-               echo "$as_me:$LINENO: checking Cyrus SASL library version" >&5
-echo $ECHO_N "checking Cyrus SASL library version... $ECHO_C" >&6
-if test "${ol_cv_sasl_compat+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
+echo "configure:19699: checking for Berkeley DB link (-ldb-2)" >&5
+if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
+  
+       ol_DB_LIB=-ldb-2
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       cat > conftest.$ac_ext <<EOF
+#line 19709 "configure"
+#include "confdefs.h"
 
-#ifdef HAVE_SASL_SASL_H
-#include <sasl/sasl.h>
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
 #else
-#include <sasl.h>
+# include <db.h>
 #endif
 
-/* require 2.1.3 or later */
-#if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
-       char *__sasl_compat = "1.5.x okay";
-#elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
-       __sasl_compat "2.2+ or better okay (we guess)";
-#elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
-       && SASL_VERSION_STEP >=3
-       __sasl_compat = "2.1.3+ or better okay";
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
 #endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "__sasl_compat" >/dev/null 2>&1; then
-  ol_cv_sasl_compat=yes
-else
-  ol_cv_sasl_compat=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ol_cv_sasl_compat" >&5
-echo "${ECHO_T}$ol_cv_sasl_compat" >&6
-
-               if test $ol_cv_sasl_compat = no ; then
-                       ol_link_sasl=no
-                       { { echo "$as_me:$LINENO: error: Cyrus SASL library located but incompatible" >&5
-echo "$as_me: error: Cyrus SASL library located but incompatible" >&2;}
-   { (exit 1); exit 1; }; }
-               fi
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
 
+int main() {
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CYRUS_SASL 1
-_ACEOF
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
-               SASL_LIBS="$ol_link_sasl"
-               if test $ol_enable_spasswd != no ; then
-                       ol_link_spasswd=yes
-               fi
+               version = db_version( &major, &minor, &patch );
 
-               ac_save_LIBS="$LIBS"
-               LIBS="$LIBS $ol_link_sasl"
-               echo "$as_me:$LINENO: checking for sasl_version" >&5
-echo $ECHO_N "checking for sasl_version... $ECHO_C" >&6
-if test "${ac_cv_func_sasl_version+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char sasl_version (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char sasl_version ();
-/* 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_sasl_version) || defined (__stub___sasl_version)
-choke me
+
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
 #else
-char (*f) () = sasl_version;
-#endif
-#ifdef __cplusplus
-}
+       (void) dbopen( NULL, 0, 0, 0, NULL);
 #endif
 
-int
-main ()
-{
-return f != sasl_version;
-  ;
-  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_sasl_version=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_sasl_version=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_sasl_version" >&5
-echo "${ECHO_T}$ac_cv_func_sasl_version" >&6
-if test $ac_cv_func_sasl_version = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SASL_VERSION 1
-_ACEOF
+; return 0; }
+EOF
+if { (eval echo configure:19756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_2=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_2=no
+fi
+rm -f conftest*
+
+       LIBS="$ol_LIBS"
 
 fi
 
-               LIBS="$ac_save_LIBS"
-       fi
+echo "$ac_t""$ol_cv_db_db_2" 1>&6
 
-else
-       { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
-echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
-       if test $ol_link_tls = no ; then
-               { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
-echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
+       if test $ol_cv_db_db_2 = yes ; then
+               ol_cv_lib_db=-ldb-2
        fi
 fi
 
-if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
-       dev=no
-       if test -r /dev/urandom ; then
-               dev="/dev/urandom";
-       elif test -r /idev/urandom ; then
-               dev="/idev/urandom";
-       elif test -r /dev/srandom ; then
-               dev="/dev/srandom";
-       elif test -r /dev/random ; then
-               dev="/dev/random";
-       elif test -r /idev/random ; then
-               dev="/idev/random";
-       fi
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
+echo "configure:19780: checking for Berkeley DB link (-ldb1)" >&5
+if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       ol_DB_LIB=-ldb1
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-       if test $dev != no ; then
+       cat > conftest.$ac_ext <<EOF
+#line 19790 "configure"
+#include "confdefs.h"
 
-cat >>confdefs.h <<_ACEOF
-#define URANDOM_DEVICE "$dev"
-_ACEOF
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
+#else
+# include <db.h>
+#endif
 
-       fi
-fi
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
+#endif
 
-ol_link_fetch=no
-if test $ol_with_fetch != no ; then
-       ol_LIBS=$LIBS
-LIBS="-lfetch -lcom_err $LIBS"
-echo "$as_me:$LINENO: checking fetch(3) library" >&5
-echo $ECHO_N "checking fetch(3) library... $ECHO_C" >&6
-if test "${ol_cv_lib_fetch+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
 
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+int main() {
 
-#include <sys/param.h>
-#include <stdio.h>
-#include <fetch.h>
-int
-main ()
-{
-struct url *u = fetchParseURL("file:///");
-  ;
-  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
-  ol_cv_lib_fetch=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
-ol_cv_lib_fetch=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ol_cv_lib_fetch" >&5
-echo "${ECHO_T}$ol_cv_lib_fetch" >&6
-LIBS=$ol_LIBS
-if test $ol_cv_lib_fetch != no ; then
-       ol_link_fetch="-lfetch -lcom_err"
+               version = db_version( &major, &minor, &patch );
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FETCH 1
-_ACEOF
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
+#endif
+
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
+#else
+       (void) dbopen( NULL, 0, 0, 0, NULL);
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:19837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db1=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db1=no
 fi
+rm -f conftest*
 
+       LIBS="$ol_LIBS"
 
-       if test $ol_cv_lib_fetch != no ; then
-               LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
-               ol_link_fetch=freebsd
+fi
 
-       elif test $ol_with_fetch != auto ; then
-               { { echo "$as_me:$LINENO: error: no suitable API for --with-fetch=$ol_with_fetch" >&5
-echo "$as_me: error: no suitable API for --with-fetch=$ol_with_fetch" >&2;}
-   { (exit 1); exit 1; }; }
+echo "$ac_t""$ol_cv_db_db1" 1>&6
+
+       if test $ol_cv_db_db1 = yes ; then
+               ol_cv_lib_db=-ldb1
        fi
 fi
 
-ol_link_readline=no
-if test $ol_with_readline != no ; then
+if test $ol_cv_lib_db = no ; then
+       echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
+echo "configure:19861: checking for Berkeley DB link (-ldb-1)" >&5
+if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       ol_DB_LIB=-ldb-1
+       ol_LIBS=$LIBS
+       LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
+       cat > conftest.$ac_ext <<EOF
+#line 19871 "configure"
+#include "confdefs.h"
 
-for ac_header in readline/readline.h 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: `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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+#ifdef HAVE_DB_185_H
+# include <db_185.h>
+#else
+# include <db.h>
+#endif
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
+#endif
 
-fi
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
 
-done
+int main() {
 
+#if DB_VERSION_MAJOR > 1
+       {
+               char *version;
+               int major, minor, patch;
 
-       if test $ac_cv_header_readline_readline_h = yes ; then
-               save_LIBS="$LIBS"
-               LIBS="$TERMCAP_LIBS $LIBS"
-               echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
-echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
-if test "${ac_cv_lib_readline_readline+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lreadline  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+               version = db_version( &major, &minor, &patch );
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
+               if( major != DB_VERSION_MAJOR ||
+                       minor < DB_VERSION_MINOR )
+               {
+                       printf("Berkeley DB version mismatch\n"
+                               "\theader: %s\n\tlibrary: %s\n",
+                               DB_VERSION_STRING, version);
+                       return 1;
+               }
+       }
 #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 ();
-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
-  ac_cv_lib_readline_readline=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_readline_readline=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_readline_readline" >&5
-echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
-if test $ac_cv_lib_readline_readline = yes; then
-  have_readline=yes
+#if DB_VERSION_MAJOR > 2
+       db_env_create( NULL, 0 );
+#elif DB_VERSION_MAJOR > 1
+       db_appexit( NULL );
+#else
+       (void) dbopen( NULL, 0, 0, 0, NULL);
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:19918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_db_db_1=yes
 else
-  have_readline=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_db_db_1=no
 fi
+rm -f conftest*
 
-               LIBS="$save_LIBS"
-
-               if test $have_readline = yes ; then
-                       ol_with_readline=found
-                       ol_link_readline=yes
+       LIBS="$ol_LIBS"
 
-                       READLINE_LIBS="-lreadline"
-               fi
-       fi
 fi
 
-if test $ol_link_readline = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_READLINE 1
-_ACEOF
+echo "$ac_t""$ol_cv_db_db_1" 1>&6
 
+       if test $ol_cv_db_db_1 = yes ; then
+               ol_cv_lib_db=-ldb-1
+       fi
 fi
 
 
-if test $ol_enable_crypt != no ; then
-       save_LIBS="$LIBS"
-       LIBS="$TLS_LIBS $LIBS"
+       if test "$ol_cv_lib_db" != no ; then
+               ol_cv_berkeley_db=yes
+               echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
+echo "configure:19944: checking for Berkeley DB version match" >&5
+if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       ol_LIBS="$LIBS"
+       LIBS="$LTHREAD_LIBS $LIBS"
+       if test $ol_cv_lib_db != yes ; then
+               LIBS="$ol_cv_lib_db $LIBS"
+       fi
 
-       echo "$as_me:$LINENO: checking for crypt" >&5
-echo $ECHO_N "checking for crypt... $ECHO_C" >&6
-if test "${ac_cv_func_crypt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char crypt (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
+       if test "$cross_compiling" = yes; then
+  ol_cv_berkeley_db_version=cross
+else
+  cat > conftest.$ac_ext <<EOF
+#line 19959 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_DB_185_H
+       choke me;
 #else
-# include <assert.h>
-#endif
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
+#include <db.h>
 #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 ();
-/* 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_crypt) || defined (__stub___crypt)
-choke me
-#else
-char (*f) () = crypt;
+#ifndef DB_VERSION_MAJOR
+# define DB_VERSION_MAJOR 1
 #endif
-#ifdef __cplusplus
-}
+#ifndef NULL
+#define NULL ((void *)0)
 #endif
-
-int
-main ()
+main()
 {
-return f != crypt;
-  ;
-  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_crypt=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_crypt=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
-echo "${ECHO_T}$ac_cv_func_crypt" >&6
-if test $ac_cv_func_crypt = yes; then
-  have_crypt=yes
-else
+#if DB_VERSION_MAJOR > 1
+       char *version;
+       int major, minor, patch;
 
-               LIBS="$save_LIBS"
-               echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
-echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
-if test "${ac_cv_lib_crypt_crypt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcrypt  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       version = db_version( &major, &minor, &patch );
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
+       if( major != DB_VERSION_MAJOR ||
+               minor != DB_VERSION_MINOR ||
+               patch != DB_VERSION_PATCH )
+       {
+               printf("Berkeley DB version mismatch\n"
+                       "\theader: %s\n\tlibrary: %s\n",
+                       DB_VERSION_STRING, version);
+               return 1;
+       }
 #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 ();
-int
-main ()
-{
-crypt ();
-  ;
-  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
-  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_crypt_crypt=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_crypt_crypt=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_crypt_crypt" >&5
-echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
-if test $ac_cv_lib_crypt_crypt = yes; then
-  LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
-                       have_crypt=yes
+EOF
+if { (eval echo configure:19995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
+  ol_cv_berkeley_db_version=yes
 else
-  have_crypt=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_berkeley_db_version=no
 fi
-
+rm -fr conftest*
 fi
 
 
-       LIBS="$save_LIBS"
+       LIBS="$ol_LIBS"
 
-       if test $have_crypt = yes ; then
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CRYPT 1
-_ACEOF
+echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
 
-       else
-               { echo "$as_me:$LINENO: WARNING: could not find crypt" >&5
-echo "$as_me: WARNING: could not find crypt" >&2;}
-               if test $ol_enable_crypt = yes ; then
-                       { { echo "$as_me:$LINENO: error: could not find crypt" >&5
-echo "$as_me: error: could not find crypt" >&2;}
-   { (exit select appropriate options or disable); exit select appropriate options or disable; }; }
-               fi
+       if test $ol_cv_berkeley_db_version = no ; then
+               { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
+       fi
 
-               { echo "$as_me:$LINENO: WARNING: disabling crypt support" >&5
-echo "$as_me: WARNING: disabling crypt support" >&2;}
-               ol_enable_crypt=no
+               echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
+echo "configure:20019: checking for Berkeley DB thread support" >&5
+if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       ol_LIBS="$LIBS"
+       LIBS="$LTHREAD_LIBS $LIBS"
+       if test $ol_cv_lib_db != yes ; then
+               LIBS="$ol_cv_lib_db $LIBS"
        fi
-fi
 
-if test $ol_enable_proctitle != no ; then
-       echo "$as_me:$LINENO: checking for setproctitle" >&5
-echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6
-if test "${ac_cv_func_setproctitle+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char setproctitle (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
+       if test "$cross_compiling" = yes; then
+  ol_cv_berkeley_db_thread=cross
+else
+  cat > conftest.$ac_ext <<EOF
+#line 20034 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_DB_185_H
+       choke me;
 #else
-# include <assert.h>
+#include <db.h>
 #endif
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
+#ifndef NULL
+#define NULL ((void *)0)
+#endif
+main()
 {
+       int rc;
+       u_int32_t flags = DB_CREATE |
+#ifdef DB_PRIVATE
+               DB_PRIVATE |
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char setproctitle ();
-/* 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_setproctitle) || defined (__stub___setproctitle)
-choke me
-#else
-char (*f) () = setproctitle;
+               DB_THREAD;
+
+#if DB_VERSION_MAJOR > 2
+       DB_ENV *env = NULL;
+
+       rc = db_env_create( &env, 0 );
+
+       flags |= DB_INIT_MPOOL;
+#ifdef DB_MPOOL_PRIVATE
+       flags |= DB_MPOOL_PRIVATE;
 #endif
-#ifdef __cplusplus
-}
+
+       if( rc ) {
+               printf("BerkeleyDB: %s\n", db_strerror(rc) );
+               return rc;
+       }
+
+#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
+       rc = env->open( env, NULL, flags, 0 );
+#else
+       rc = env->open( env, NULL, NULL, flags, 0 );
 #endif
 
-int
-main ()
-{
-return f != setproctitle;
-  ;
-  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_setproctitle=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_setproctitle=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
-echo "${ECHO_T}$ac_cv_func_setproctitle" >&6
-if test $ac_cv_func_setproctitle = yes; then
-  have_setproctitle=yes
-else
+       if ( rc == 0 ) {
+               rc = env->close( env, 0 );
+       }
 
-               echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
-echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6
-if test "${ac_cv_lib_util_setproctitle+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lutil  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       if( rc ) {
+               printf("BerkeleyDB: %s\n", db_strerror(rc) );
+               return rc;
+       }
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
+#else
+       DB_ENV env;
+       memset( &env, '\0', sizeof(env) );
+
+       rc = db_appinit( NULL, NULL, &env, flags );
+
+       if( rc == 0 ) {
+               db_appexit( &env );
+       }
+
+       unlink("__db_mpool.share");
+       unlink("__db_lock.share");
 #endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char setproctitle ();
-int
-main ()
-{
-setproctitle ();
-  ;
-  return 0;
+
+       return rc;
 }
-_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_util_setproctitle=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_util_setproctitle=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_util_setproctitle" >&5
-echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6
-if test $ac_cv_lib_util_setproctitle = yes; then
-  have_setproctitle=yes
-                       LUTIL_LIBS="$LUTIL_LIBS -lutil"
+EOF
+if { (eval echo configure:20101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
+  ol_cv_berkeley_db_thread=yes
 else
-  have_setproctitle=no
-                       LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
-                       LIBSRCS="$LIBSRCS setproctitle.c"
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_berkeley_db_thread=no
 fi
-
+rm -fr conftest*
 fi
 
 
-       if test $have_setproctitle = yes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SETPROCTITLE 1
-_ACEOF
+       LIBS="$ol_LIBS"
 
-       fi
 fi
 
-if test $ol_enable_slp != no ; then
+echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
 
-for ac_header in slp.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+       if test $ol_cv_berkeley_db_thread != no ; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_BERKELEY_DB_THREAD 1
+EOF
 
-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
 
+       fi
 fi
 
-done
+       fi
 
+       if test $ol_cv_berkeley_db != no ; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_BERKELEY_DB 1
+EOF
 
-       if test $ac_cv_header_slp_h = yes ; then
-               echo "$as_me:$LINENO: checking for SLPOpen in -lslp" >&5
-echo $ECHO_N "checking for SLPOpen in -lslp... $ECHO_C" >&6
-if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lslp  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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 SLPOpen ();
-int
-main ()
-{
-SLPOpen ();
-  ;
-  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_slp_SLPOpen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_slp_SLPOpen=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_slp_SLPOpen" >&5
-echo "${ECHO_T}$ac_cv_lib_slp_SLPOpen" >&6
-if test $ac_cv_lib_slp_SLPOpen = yes; then
-  have_slp=yes
-else
-  have_slp=no
-fi
+               ol_link_ldbm=berkeley
+               ol_with_ldbm_api=berkeley
 
-               if test $have_slp = yes ; then
+               if test $ol_with_ldbm_type = hash ; then
+                       cat >> confdefs.h <<\EOF
+#define LDBM_USE_DBHASH 1
+EOF
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SLP 1
-_ACEOF
+               else
+                       cat >> confdefs.h <<\EOF
+#define LDBM_USE_DBBTREE 1
+EOF
 
-                       SLAPD_SLP_LIBS=-lslp
                fi
 
-       elif test $ol_enable_slp = yes ; then
-               { { echo "$as_me:$LINENO: error: SLP not found" >&5
-echo "$as_me: error: SLP not found" >&2;}
-   { (exit 1); exit 1; }; }
+                                               if test $ol_cv_lib_db != yes ; then
+                       LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
+               fi
        fi
 fi
 
-echo "$as_me:$LINENO: checking for mode_t" >&5
-echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
-if test "${ac_cv_type_mode_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((mode_t *) 0)
-  return 0;
-if (sizeof (mode_t))
-  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_mode_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_mode_t=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
-echo "${ECHO_T}$ac_cv_type_mode_t" >&6
-if test $ac_cv_type_mode_t = yes; then
-  :
-else
+if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
+       if test $ol_link_ldbm != berkeley ; then
+               { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
+       else
+               echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
+echo "configure:20164: checking Berkeley DB version for BDB backend" >&5
+if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       cat > conftest.$ac_ext <<EOF
+#line 20170 "configure"
+#include "confdefs.h"
 
-cat >>confdefs.h <<_ACEOF
-#define mode_t int
-_ACEOF
+#include <db.h>
 
-fi
+ /* this check could be improved */
+#ifndef DB_VERSION_MAJOR
+#      define DB_VERSION_MAJOR 1
+#endif
+#ifndef DB_VERSION_MINOR
+#      define DB_VERSION_MINOR 0
+#endif
 
-echo "$as_me:$LINENO: checking for off_t" >&5
-echo $ECHO_N "checking for off_t... $ECHO_C" >&6
-if test "${ac_cv_type_off_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((off_t *) 0)
-  return 0;
-if (sizeof (off_t))
-  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_off_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_off_t=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-echo "${ECHO_T}$ac_cv_type_off_t" >&6
-if test $ac_cv_type_off_t = yes; then
-  :
+/* require 4.2 or later */
+#if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
+       __db_version_compat
+#endif
+       
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "__db_version_compat" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ol_cv_bdb_compat=yes
 else
-
-cat >>confdefs.h <<_ACEOF
-#define off_t long
-_ACEOF
+  rm -rf conftest*
+  ol_cv_bdb_compat=no
+fi
+rm -f conftest*
 
 fi
 
-echo "$as_me:$LINENO: checking for pid_t" >&5
-echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
-if test "${ac_cv_type_pid_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((pid_t *) 0)
-  return 0;
-if (sizeof (pid_t))
-  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_pid_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_pid_t=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
-echo "${ECHO_T}$ac_cv_type_pid_t" >&6
-if test $ac_cv_type_pid_t = yes; then
-  :
-else
+echo "$ac_t""$ol_cv_bdb_compat" 1>&6
 
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
-_ACEOF
 
+               if test $ol_cv_bdb_compat != yes ; then
+                       { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
+               fi
+       fi
+fi
+
+if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
+       echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
+       ol_with_ldbm_api=none
 fi
 
-echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
-echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6
-if test "${ac_cv_type_ptrdiff_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
+       echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
+echo "configure:20217: checking for MDBM library" >&5
+if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((ptrdiff_t *) 0)
-  return 0;
-if (sizeof (ptrdiff_t))
-  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_ptrdiff_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_ptrdiff_t=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
-echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6
-if test $ac_cv_type_ptrdiff_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PTRDIFF_T 1
-_ACEOF
+       ol_LIBS="$LIBS"
+       echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
+echo "configure:20223: checking for mdbm_set_chain" >&5
+if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 20228 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char mdbm_set_chain(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char mdbm_set_chain();
+char (*f)();
 
+int main() {
 
-fi
-echo "$as_me:$LINENO: checking for uintmax_t" >&5
-echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6
-if test "${ac_cv_type_uintmax_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((uintmax_t *) 0)
-  return 0;
-if (sizeof (uintmax_t))
-  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_uintmax_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_uintmax_t=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uintmax_t" >&5
-echo "${ECHO_T}$ac_cv_type_uintmax_t" >&6
-if test $ac_cv_type_uintmax_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINTMAX_T 1
-_ACEOF
-
-
-fi
-
-echo "$as_me:$LINENO: checking return type of signal handlers" >&5
-echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
-if test "${ac_cv_type_signal+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-# undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
+/* 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_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
+choke me
 #else
-void (*signal ()) ();
+f = mdbm_set_chain;
 #endif
 
-int
-main ()
-{
-int i;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_signal=void
+; return 0; }
+EOF
+if { (eval echo configure:20252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_mdbm_set_chain=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_signal=int
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_mdbm_set_chain=no"
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
-echo "${ECHO_T}$ac_cv_type_signal" >&6
 
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
-_ACEOF
-
-
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((size_t *) 0)
-  return 0;
-if (sizeof (size_t))
-  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_size_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_size_t=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
-  :
+if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ol_cv_lib_mdbm=yes
 else
+  echo "$ac_t""no" 1>&6
 
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
-
-fi
-
-
-echo "$as_me:$LINENO: checking for ssize_t" >&5
-echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
-if test "${ac_cv_type_ssize_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
+echo "configure:20271: checking for mdbm_set_chain in -lmdbm" >&5
+ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((ssize_t *) 0)
-  return 0;
-if (sizeof (ssize_t))
-  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_ssize_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_ssize_t=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
-echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
-if test $ac_cv_type_ssize_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SSIZE_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for signed int" >&5
-echo $ECHO_N "checking for signed int... $ECHO_C" >&6
-if test "${ac_cv_type_signed_int+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((signed int *) 0)
-  return 0;
-if (sizeof (signed int))
-  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_signed_int=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_signed_int=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_signed_int" >&5
-echo "${ECHO_T}$ac_cv_type_signed_int" >&6
-if test $ac_cv_type_signed_int = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGNED_INT 1
-_ACEOF
-
-
-fi
-
-echo "$as_me:$LINENO: checking for caddr_t" >&5
-echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6
-if test "${ac_cv_type_caddr_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((caddr_t *) 0)
-  return 0;
-if (sizeof (caddr_t))
-  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_caddr_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_caddr_t=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
-echo "${ECHO_T}$ac_cv_type_caddr_t" >&6
-if test $ac_cv_type_caddr_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_CADDR_T 1
-_ACEOF
-
-
-fi
-echo "$as_me:$LINENO: checking for char *" >&5
-echo $ECHO_N "checking for char *... $ECHO_C" >&6
-if test "${ac_cv_type_char_p+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-if ((char * *) 0)
-  return 0;
-if (sizeof (char *))
-  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_char_p=yes
+  ac_save_LIBS="$LIBS"
+LIBS="-lmdbm  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 20279 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char mdbm_set_chain();
+
+int main() {
+mdbm_set_chain()
+; return 0; }
+EOF
+if { (eval echo configure:20290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-ac_cv_type_char_p=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ol_cv_lib_mdbm=-lmdbm
+else
+  echo "$ac_t""no" 1>&6
+ol_cv_lib_mdbm=no
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_char_p" >&5
-echo "${ECHO_T}$ac_cv_type_char_p" >&6
-if test $ac_cv_type_char_p = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_CHAR_P 1
-_ACEOF
+       
+fi
 
+       LIBS="$ol_LIBS"
 
 fi
 
+echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
 
-echo "$as_me:$LINENO: checking for socklen_t" >&5
-echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
-if test "${ol_cv_type_socklen_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 
-int
-main ()
-{
-socklen_t len;
-  ;
-  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
-  ol_cv_type_socklen_t=yes
+ for ac_hdr in mdbm.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:20325: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_type_socklen_t=no
+  cat > conftest.$ac_ext <<EOF
+#line 20330 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:20335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $ol_cv_type_socklen_t" >&5
-echo "${ECHO_T}$ol_cv_type_socklen_t" >&6
-  if test $ol_cv_type_socklen_t = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define socklen_t int
-_ACEOF
-
-  fi
-
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
 
-echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
-echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
-if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static struct stat ac_aggr;
-if (ac_aggr.st_blksize)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_member_struct_stat_st_blksize=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-static struct stat ac_aggr;
-if (sizeof ac_aggr.st_blksize)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_member_struct_stat_st_blksize=yes
+ echo $ac_n "checking for db""... $ac_c" 1>&6
+echo "configure:20362: checking for db" >&5
+if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  
+       if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
+               ol_cv_mdbm=no
+       else
+               ol_cv_mdbm=yes
+       fi
 
-ac_cv_member_struct_stat_st_blksize=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
-echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
-if test $ac_cv_member_struct_stat_st_blksize = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-_ACEOF
+echo "$ac_t""$ol_cv_mdbm" 1>&6
+ if test $ol_cv_mdbm = yes ; then
+       cat >> confdefs.h <<\EOF
+#define HAVE_MDBM 1
+EOF
 
+ fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ST_BLKSIZE 1
-_ACEOF
 
+       if test $ol_cv_mdbm = yes ; then
+               ol_link_ldbm=mdbm
+               ol_with_ldbm_api=mdbm
+               if test $ol_cv_lib_mdbm != yes ; then
+                       LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
+               fi
+       fi
 fi
 
-
-echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
-if test "${ac_cv_header_time+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
+       echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
+echo "configure:20395: checking for GDBM library" >&5
+if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int
-main ()
-{
-if ((struct tm *) 0)
-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_header_time=yes
+       ol_LIBS="$LIBS"
+       echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
+echo "configure:20401: checking for gdbm_open" >&5
+if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  cat > conftest.$ac_ext <<EOF
+#line 20406 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char gdbm_open(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char gdbm_open();
+char (*f)();
 
-ac_cv_header_time=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-echo "${ECHO_T}$ac_cv_header_time" >&6
-if test $ac_cv_header_time = yes; then
+int main() {
 
-cat >>confdefs.h <<\_ACEOF
-#define TIME_WITH_SYS_TIME 1
-_ACEOF
+/* 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_gdbm_open) || defined (__stub___gdbm_open)
+choke me
+#else
+f = gdbm_open;
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:20430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_gdbm_open=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_gdbm_open=no"
+fi
+rm -f conftest*
 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
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ol_cv_lib_gdbm=yes
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <time.h>
+  echo "$ac_t""no" 1>&6
 
-int
-main ()
-{
-struct tm *tp; tp->tm_sec;
-  ;
-  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_struct_tm=time.h
+               echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
+echo "configure:20449: checking for gdbm_open in -lgdbm" >&5
+ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_save_LIBS="$LIBS"
+LIBS="-lgdbm  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 20457 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char gdbm_open();
 
-ac_cv_struct_tm=sys/time.h
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+int main() {
+gdbm_open()
+; return 0; }
+EOF
+if { (eval echo configure:20468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
-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 TM_IN_SYS_TIME 1
-_ACEOF
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
 fi
-
-echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
-echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
-if test "${ac_cv_type_uid_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "uid_t" >/dev/null 2>&1; then
-  ac_cv_type_uid_t=yes
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ol_cv_lib_gdbm=-lgdbm
 else
-  ac_cv_type_uid_t=no
+  echo "$ac_t""no" 1>&6
+ol_cv_lib_gdbm=no
 fi
-rm -f conftest*
 
+       
 fi
-echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
-echo "${ECHO_T}$ac_cv_type_uid_t" >&6
-if test $ac_cv_type_uid_t = no; then
 
-cat >>confdefs.h <<\_ACEOF
-#define uid_t int
-_ACEOF
+       LIBS="$ol_LIBS"
 
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define gid_t int
-_ACEOF
+echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
 
-fi
 
-echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
-echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
-if test "${ol_cv_type_sig_atomic_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+ for ac_hdr in gdbm.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:20503: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <signal.h>
-int
-main ()
-{
-sig_atomic_t atomic;
-  ;
-  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
-  ol_cv_type_sig_atomic_t=yes
+  cat > conftest.$ac_ext <<EOF
+#line 20508 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:20513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_type_sig_atomic_t=no
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $ol_cv_type_sig_atomic_t" >&5
-echo "${ECHO_T}$ol_cv_type_sig_atomic_t" >&6
-  if test $ol_cv_type_sig_atomic_t = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define sig_atomic_t int
-_ACEOF
-
-  fi
-
-
-
-# test for pw_gecos in struct passwd
-echo "$as_me:$LINENO: checking struct passwd for pw_gecos" >&5
-echo $ECHO_N "checking struct passwd for pw_gecos... $ECHO_C" >&6
-if test "${ol_cv_struct_passwd_pw_gecos+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <pwd.h>
-int
-main ()
-{
-
-       struct passwd pwd;
-       pwd.pw_gecos = pwd.pw_name;
-
-  ;
-  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
-  ol_cv_struct_passwd_pw_gecos=yes
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_struct_passwd_pw_gecos=no
+  echo "$ac_t""no" 1>&6
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ol_cv_struct_passwd_pw_gecos" >&5
-echo "${ECHO_T}$ol_cv_struct_passwd_pw_gecos" >&6
-if test $ol_cv_struct_passwd_pw_gecos = yes ; then
+done
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PW_GECOS 1
-_ACEOF
+ echo $ac_n "checking for db""... $ac_c" 1>&6
+echo "configure:20540: checking for db" >&5
+if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
+               ol_cv_gdbm=no
+       else
+               ol_cv_gdbm=yes
+       fi
 
 fi
 
-# test for pw_passwd in struct passwd
-echo "$as_me:$LINENO: checking struct passwd for pw_passwd" >&5
-echo $ECHO_N "checking struct passwd for pw_passwd... $ECHO_C" >&6
-if test "${ol_cv_struct_passwd_pw_passwd+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <pwd.h>
-int
-main ()
-{
-
-       struct passwd pwd;
-       pwd.pw_passwd = pwd.pw_name;
+echo "$ac_t""$ol_cv_gdbm" 1>&6
+ if test $ol_cv_gdbm = yes ; then
+       cat >> confdefs.h <<\EOF
+#define HAVE_GDBM 1
+EOF
 
-  ;
-  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
-  ol_cv_struct_passwd_pw_passwd=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ fi
 
-ol_cv_struct_passwd_pw_passwd=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ol_cv_struct_passwd_pw_passwd" >&5
-echo "${ECHO_T}$ol_cv_struct_passwd_pw_passwd" >&6
-if test $ol_cv_struct_passwd_pw_passwd = yes ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PW_PASSWD 1
-_ACEOF
+       if test $ol_cv_gdbm = yes ; then
+               ol_link_ldbm=gdbm
+               ol_with_ldbm_api=gdbm
 
+               if test $ol_cv_lib_gdbm != yes ; then
+                       LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
+               fi
+       fi
 fi
 
-
-echo "$as_me:$LINENO: checking if toupper() requires islower()" >&5
-echo $ECHO_N "checking if toupper() requires islower()... $ECHO_C" >&6
-if test "${ol_cv_c_upper_lower+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test $ol_with_ldbm_api = ndbm ; then
+       echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
+echo "configure:20574: checking for NDBM library" >&5
+if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       if test "$cross_compiling" = yes; then
-  ol_cv_c_upper_lower=safe
+       ol_LIBS="$LIBS"
+       echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
+echo "configure:20580: checking for dbm_open" >&5
+if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 20585 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dbm_open(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dbm_open();
+char (*f)();
 
-#include <ctype.h>
-main()
-{
-       if ('C' == toupper('C'))
-               exit(0);
-       else
-               exit(1);
-}
-_ACEOF
-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='./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
-  ol_cv_c_upper_lower=no
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ol_cv_c_upper_lower=yes
-fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ol_cv_c_upper_lower" >&5
-echo "${ECHO_T}$ol_cv_c_upper_lower" >&6
-if test $ol_cv_c_upper_lower != no ; then
+int main() {
 
-cat >>confdefs.h <<\_ACEOF
-#define C_UPPER_LOWER 1
-_ACEOF
+/* 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_dbm_open) || defined (__stub___dbm_open)
+choke me
+#else
+f = dbm_open;
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:20609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_dbm_open=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_dbm_open=no"
+fi
+rm -f conftest*
 fi
 
-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
+if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ol_cv_lib_ndbm=yes
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  echo "$ac_t""no" 1>&6
 
-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
+               echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
+echo "configure:20628: checking for dbm_open in -lndbm" >&5
+ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_save_LIBS="$LIBS"
+LIBS="-lndbm  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 20636 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dbm_open();
 
-ac_cv_c_const=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+int main() {
+dbm_open()
+; return 0; }
+EOF
+if { (eval echo configure:20647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
-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
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
 fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ol_cv_lib_ndbm=-lndbm
+else
+  echo "$ac_t""no" 1>&6
 
-echo "$as_me:$LINENO: checking if compiler understands volatile" >&5
-echo $ECHO_N "checking if compiler understands volatile... $ECHO_C" >&6
-if test "${ol_cv_c_volatile+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                       echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
+echo "configure:20667: checking for dbm_open in -ldbm" >&5
+ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-int x, y, z;
-int
-main ()
-{
-volatile int a; int * volatile b = x ? &y : &z;
-      /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
-      *b = 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
-  ol_cv_c_volatile=yes
+  ac_save_LIBS="$LIBS"
+LIBS="-ldbm  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 20675 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dbm_open();
+
+int main() {
+dbm_open()
+; return 0; }
+EOF
+if { (eval echo configure:20686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-ol_cv_c_volatile=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ol_cv_lib_ndbm=-ldbm
+else
+  echo "$ac_t""no" 1>&6
+ol_cv_lib_ndbm=no
+fi
+               
 fi
-echo "$as_me:$LINENO: result: $ol_cv_c_volatile" >&5
-echo "${ECHO_T}$ol_cv_c_volatile" >&6
-  if test $ol_cv_c_volatile = yes; then
-    :
-  else
-
-cat >>confdefs.h <<\_ACEOF
-#define volatile
-_ACEOF
-
-  fi
-
 
-if test $cross_compiling = yes ; then
+       
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define CROSS_COMPILING 1
-_ACEOF
-
-else
-       echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
-echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
-if test "${ac_cv_c_bigendian+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # See if sys/param.h defines the BYTE_ORDER macro.
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/param.h>
+       LIBS="$ol_LIBS"
 
-int
-main ()
-{
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#endif
+fi
 
-  ;
-  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
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/param.h>
+echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
 
-int
-main ()
-{
-#if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#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_bigendian=yes
+ for ac_hdr in ndbm.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:20723: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_bigendian=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+  cat > conftest.$ac_ext <<EOF
+#line 20728 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:20733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-# It does not; compile a test program.
-if test "$cross_compiling" = yes; then
-  # try to guess the endianness by grepping values into an object file
-  ac_cv_c_bigendian=unknown
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
-int
-main ()
-{
- _ascii (); _ebcdic ();
-  ;
-  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
-  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
-  ac_cv_c_bigendian=yes
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-  if test "$ac_cv_c_bigendian" = unknown; then
-    ac_cv_c_bigendian=no
-  else
-    # finding both strings is unlikely to happen, but who knows?
-    ac_cv_c_bigendian=unknown
-  fi
+rm -f conftest*
 fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+  echo "$ac_t""no" 1>&6
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-int
-main ()
-{
-  /* Are we little or big endian?  From Harbison&Steele.  */
-  union
-  {
-    long l;
-    char c[sizeof (long)];
-  } u;
-  u.l = 1;
-  exit (u.c[sizeof (long) - 1] == 1);
-}
-_ACEOF
-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='./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_c_bigendian=no
+done
+
+ echo $ac_n "checking for db""... $ac_c" 1>&6
+echo "configure:20760: checking for db" >&5
+if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  
+       if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
+               ol_cv_ndbm=no
+       else
+               ol_cv_ndbm=yes
+       fi
 
-( exit $ac_status )
-ac_cv_c_bigendian=yes
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
-echo "${ECHO_T}$ac_cv_c_bigendian" >&6
-case $ac_cv_c_bigendian in
-  yes)
-
-cat >>confdefs.h <<\_ACEOF
-#define WORDS_BIGENDIAN 1
-_ACEOF
- ;;
-  no)
-     ;;
-  *)
-    { { echo "$as_me:$LINENO: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&5
-echo "$as_me: error: unknown endianness
-presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
-   { (exit 1); exit 1; }; } ;;
-esac
 
-fi
+echo "$ac_t""$ol_cv_ndbm" 1>&6
+ if test $ol_cv_ndbm = yes ; then
+       cat >> confdefs.h <<\EOF
+#define HAVE_NDBM 1
+EOF
 
-echo "$as_me:$LINENO: checking size of short" >&5
-echo $ECHO_N "checking size of short... $ECHO_C" >&6
-if test "${ac_cv_sizeof_short+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include "confdefs.h"
-#include <sys/types.h>
+ fi
 
 
-int
-main ()
-{
-switch (0) case 0: case (sizeof (short) == $ac_size):;
-  ;
-  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_sizeof_short=$ac_size
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       if test $ol_cv_ndbm = yes ; then
+               ol_link_ldbm=ndbm
+               ol_with_ldbm_api=ndbm
 
+               if test $ol_cv_lib_ndbm != yes ; then
+                       LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
+               fi
+       fi
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  if test x$ac_cv_sizeof_short != x ; then break; fi
-done
 
-fi
+if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
+       echo "configure: warning: could not find suitable LDBM backend" 1>&2
+       if test $ol_enable_ldbm = yes ; then
+               { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
+       fi
 
-if test x$ac_cv_sizeof_short = x ; then
-  { { echo "$as_me:$LINENO: error: cannot determine a size for short" >&5
-echo "$as_me: error: cannot determine a size for short" >&2;}
-   { (exit 1); exit 1; }; }
+       echo "configure: warning: disabling LDBM" 1>&2
+       ol_enable_ldbm=no
 fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
-echo "${ECHO_T}$ac_cv_sizeof_short" >&6
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
-_ACEOF
 
+if test $ol_enable_bdb = yes -o \
+       $ol_enable_hdb = yes -o \
+       $ol_enable_ldbm = yes ; then
+       SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
+fi
 
-echo "$as_me:$LINENO: checking size of int" >&5
-echo $ECHO_N "checking size of int... $ECHO_C" >&6
-if test "${ac_cv_sizeof_int+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include "confdefs.h"
-#include <sys/types.h>
 
+if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
+       BUILD_LIBS_DYNAMIC=shared
+       cat >> confdefs.h <<\EOF
+#define LDAP_LIBS_DYNAMIC 1
+EOF
 
-int
-main ()
-{
-switch (0) case 0: case (sizeof (int) == $ac_size):;
-  ;
-  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_sizeof_int=$ac_size
+       LTSTATIC=""
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+       BUILD_LIBS_DYNAMIC=static
+       LTSTATIC="-static"
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  if test x$ac_cv_sizeof_int != x ; then break; fi
-done
 
+if test $ol_enable_wrappers != no ; then
+       for ac_hdr in tcpd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:20826: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 20831 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:20836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-
-if test x$ac_cv_sizeof_int = x ; then
-  { { echo "$as_me:$LINENO: error: cannot determine a size for int" >&5
-echo "$as_me: error: cannot determine a size for int" >&2;}
-   { (exit 1); exit 1; }; }
+rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
-echo "${ECHO_T}$ac_cv_sizeof_int" >&6
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+               echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
+echo "configure:20858: checking for TCP wrappers library" >&5
+               save_LIBS="$LIBS"
+               LIBS="$LIBS -lwrap"
+               cat > conftest.$ac_ext <<EOF
+#line 20862 "configure"
+#include "confdefs.h"
 
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
+#include <tcpd.h>
+int allow_severity = 0;
+int deny_severity  = 0;
 
+struct request_info *req;
+               
+int main() {
 
-echo "$as_me:$LINENO: checking size of long" >&5
-echo $ECHO_N "checking size of long... $ECHO_C" >&6
-if test "${ac_cv_sizeof_long+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+hosts_access(req)
+               
+; return 0; }
+EOF
+if { (eval echo configure:20877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  echo "$ac_t""-lwrap" 1>&6
+               have_wrappers=yes
+               LIBS="$save_LIBS"
 else
-  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence.
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  
+                               LIBS="$LIBS -lnsl"
+               cat > conftest.$ac_ext <<EOF
+#line 20889 "configure"
 #include "confdefs.h"
-#include <sys/types.h>
 
+#include <tcpd.h>
+int allow_severity = 0;
+int deny_severity  = 0;
 
-int
-main ()
-{
-switch (0) case 0: case (sizeof (long) == $ac_size):;
-  ;
-  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_sizeof_long=$ac_size
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+struct request_info *req;
+               
+int main() {
 
+hosts_access(req)
+               
+; return 0; }
+EOF
+if { (eval echo configure:20904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  echo "$ac_t""-lwrap -lnsl" 1>&6
+               have_wrappers=yes
+               LIBS="$save_LIBS -lnsl"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  
+               echo "$ac_t""no" 1>&6
+               have_wrappers=no
+               LIBS=$save_LIBS
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-  if test x$ac_cv_sizeof_long != x ; then break; fi
-done
-
+rm -f conftest*
 fi
-
-if test x$ac_cv_sizeof_long = x ; then
-  { { echo "$as_me:$LINENO: error: cannot determine a size for long" >&5
-echo "$as_me: error: cannot determine a size for long" >&2;}
-   { (exit 1); exit 1; }; }
+rm -f conftest*
+else
+  echo "$ac_t""no" 1>&6
+have_wrappers=no
 fi
-echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
-echo "${ECHO_T}$ac_cv_sizeof_long" >&6
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-
-if test "$ac_cv_sizeof_int" -lt 4 ; then
-       { echo "$as_me:$LINENO: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
-echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
+done
 
-       cat >>confdefs.h <<\_ACEOF
-#define LBER_INT_T long
-_ACEOF
 
-else
-       cat >>confdefs.h <<\_ACEOF
-#define LBER_INT_T int
-_ACEOF
+       if test $have_wrappers = yes ; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_TCPD 1
+EOF
 
+               WRAP_LIBS="-lwrap"
+       elif test $ol_enable_wrappers = yes ; then
+               { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
+       else
+               echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
+               WRAP_LIBS=""
+       fi
 fi
 
-cat >>confdefs.h <<\_ACEOF
-#define LBER_LEN_T long
-_ACEOF
+if test $ol_enable_syslog != no ; then
+       echo $ac_n "checking for openlog""... $ac_c" 1>&6
+echo "configure:20944: checking for openlog" >&5
+if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 20949 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char openlog(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char openlog();
+char (*f)();
 
-cat >>confdefs.h <<\_ACEOF
-#define LBER_SOCKET_T int
-_ACEOF
+int main() {
 
-cat >>confdefs.h <<\_ACEOF
-#define LBER_TAG_T long
-_ACEOF
+/* 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_openlog) || defined (__stub___openlog)
+choke me
+#else
+f = openlog;
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:20973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_openlog=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_openlog=no"
+fi
+rm -f conftest*
+fi
 
-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
+if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
 else
-  if test "$cross_compiling" = yes; then
-  ac_cv_func_memcmp_working=no
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-int
-main ()
-{
+  echo "$ac_t""no" 1>&6
+fi
 
-  /* 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);
+       if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
+               { echo "configure: error: could not find syslog" 1>&2; exit 1; }
+       fi
+       ol_enable_syslog=$ac_cv_func_openlog
+fi
 
-  /* 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_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'
-  { (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_memcmp_working=yes
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-ac_cv_func_memcmp_working=no
+ol_link_sql=no
+if test $ol_enable_sql != no ; then
+       for ac_hdr in sql.h sqlext.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:21005: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 21010 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:21015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
+       
 fi
-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"
+done
 
 
-for ac_func in strftime
-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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+       echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
+echo "configure:21045: checking for SQLDriverConnect in -liodbc" >&5
+ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-liodbc  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 21053 "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 $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
+    builtin and then its argument prototype would still apply.  */
+char SQLDriverConnect();
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-sed 's/^/| /' 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
-
-else
-  # strftime is in -lintl on SCO UNIX.
-echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
-echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6
-if test "${ac_cv_lib_intl_strftime+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+int main() {
+SQLDriverConnect()
+; return 0; }
+EOF
+if { (eval echo configure:21064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_iodbc=yes
+else
+  echo "$ac_t""no" 1>&6
+have_iodbc=no
+fi
+
+       if test $have_iodbc = yes ; then
+               ol_link_sql="-liodbc"
+       else
+               echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
+echo "configure:21089: checking for SQLDriverConnect in -lodbc" >&5
+ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lodbc  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 21097 "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 strftime ();
-int
-main ()
-{
-strftime ();
-  ;
-  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_intl_strftime=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_intl_strftime=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_intl_strftime" >&5
-echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6
-if test $ac_cv_lib_intl_strftime = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_STRFTIME 1
-_ACEOF
+    builtin and then its argument prototype would still apply.  */
+char SQLDriverConnect();
 
-LIBS="-lintl $LIBS"
+int main() {
+SQLDriverConnect()
+; return 0; }
+EOF
+if { (eval echo configure:21108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
 fi
-done
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_odbc=yes
+else
+  echo "$ac_t""no" 1>&6
+have_odbc=no
+fi
 
+               if test $have_odbc = yes ; then
+                       ol_link_sql="-lodbc"
+               fi
+       fi
 
-echo "$as_me:$LINENO: checking for inet_aton()" >&5
-echo $ECHO_N "checking for inet_aton()... $ECHO_C" >&6
-if test "${ol_cv_func_inet_aton+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       if test $ol_link_sql != no ; then
+               SLAPD_SQL_LIBS="$ol_link_sql"
 
-#ifdef HAVE_SYS_TYPES_H
-#      include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#      include <sys/socket.h>
-#      ifdef HAVE_SYS_SELECT_H
-#              include <sys/select.h>
-#      endif
-#      include <netinet/in.h>
-#      ifdef HAVE_ARPA_INET_H
-#              include <arpa/inet.h>
-#      endif
-#endif
+       elif test $ol_enable_sql != auto ; then
+               { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
+       fi
+fi
 
-int
-main ()
-{
-struct in_addr in;
-int rc = inet_aton( "255.255.255.255", &in );
-  ;
-  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
-  ol_cv_func_inet_aton=yes
+ol_link_sasl=no
+ol_link_spasswd=no
+if test $ol_with_cyrus_sasl != no ; then
+       for ac_hdr in sasl/sasl.h sasl.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:21149: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_func_inet_aton=no
+  cat > conftest.$ac_ext <<EOF
+#line 21154 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:21159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $ol_cv_func_inet_aton" >&5
-echo "${ECHO_T}$ol_cv_func_inet_aton" >&6
-  if test $ol_cv_func_inet_aton != no; then
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INET_ATON 1
-_ACEOF
 
-  fi
+       if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
+               echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
+echo "configure:21188: checking for sasl_client_init in -lsasl2" >&5
+ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lsasl2  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 21196 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char sasl_client_init();
 
+int main() {
+sasl_client_init()
+; return 0; }
+EOF
+if { (eval echo configure:21207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-echo "$as_me:$LINENO: checking for _spawnlp" >&5
-echo $ECHO_N "checking for _spawnlp... $ECHO_C" >&6
-if test "${ac_cv_func__spawnlp+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ol_link_sasl="-lsasl2"
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char _spawnlp (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
+echo "configure:21226: checking for sasl_client_init in -lsasl" >&5
+ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lsasl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 21234 "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 _spawnlp ();
-/* 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__spawnlp) || defined (__stub____spawnlp)
-choke me
+    builtin and then its argument prototype would still apply.  */
+char sasl_client_init();
+
+int main() {
+sasl_client_init()
+; return 0; }
+EOF
+if { (eval echo configure:21245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ol_link_sasl="-lsasl"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+       fi
+
+       if test $ol_link_sasl = no ; then
+               if test $ol_with_cyrus_sasl != auto ; then
+                       { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
+               else
+                       echo "configure: warning: Could not locate Cyrus SASL" 1>&2
+                       echo "configure: warning: SASL authentication not supported!" 1>&2
+                       if test $ol_link_tls = no ; then
+                               echo "configure: warning: Strong authentication not supported!" 1>&2
+                       fi
+               fi
+       else
+               echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
+echo "configure:21281: checking Cyrus SASL library version" >&5
+if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       cat > conftest.$ac_ext <<EOF
+#line 21287 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_SASL_SASL_H
+#include <sasl/sasl.h>
 #else
-char (*f) () = _spawnlp;
-#endif
-#ifdef __cplusplus
-}
+#include <sasl.h>
 #endif
 
-int
-main ()
-{
-return f != _spawnlp;
-  ;
-  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__spawnlp=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func__spawnlp=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func__spawnlp" >&5
-echo "${ECHO_T}$ac_cv_func__spawnlp" >&6
-if test $ac_cv_func__spawnlp = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SPAWNLP 1
-_ACEOF
+/* Require 2.1.15+ */
+#if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
+       char *__sasl_compat = "2.2+ or better okay (we guess)";
+#elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
+       && SASL_VERSION_STEP >=15
+       char *__sasl_compat = "2.1.15+ or better okay";
+#endif
+       
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "__sasl_compat" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ol_cv_sasl_compat=yes
+else
+  rm -rf conftest*
+  ol_cv_sasl_compat=no
+fi
+rm -f conftest*
 
 fi
 
+echo "$ac_t""$ol_cv_sasl_compat" 1>&6
+
+               if test $ol_cv_sasl_compat = no ; then
+                       ol_link_sasl=no
+                       { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
+               fi
+
+               cat >> confdefs.h <<\EOF
+#define HAVE_CYRUS_SASL 1
+EOF
+
+               SASL_LIBS="$ol_link_sasl"
+               if test $ol_enable_spasswd != no ; then
+                       ol_link_spasswd=yes
+               fi
 
-echo "$as_me:$LINENO: checking for _snprintf" >&5
-echo $ECHO_N "checking for _snprintf... $ECHO_C" >&6
-if test "${ac_cv_func__snprintf+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+               ac_save_LIBS="$LIBS"
+               LIBS="$LIBS $ol_link_sasl"
+               echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
+echo "configure:21336: checking for sasl_version" >&5
+if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  cat > conftest.$ac_ext <<EOF
+#line 21341 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char _snprintf (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    which can conflict with char sasl_version(); 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 _snprintf ();
+    builtin and then its argument prototype would still apply.  */
+char sasl_version();
+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__snprintf) || defined (__stub____snprintf)
+#if defined (__stub_sasl_version) || defined (__stub___sasl_version)
 choke me
 #else
-char (*f) () = _snprintf;
-#endif
-#ifdef __cplusplus
-}
+f = sasl_version;
 #endif
 
-int
-main ()
-{
-return f != _snprintf;
-  ;
-  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__snprintf=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func__snprintf=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func__snprintf" >&5
-echo "${ECHO_T}$ac_cv_func__snprintf" >&6
-if test $ac_cv_func__snprintf = yes; then
-  ac_cv_func_snprintf=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define snprintf _snprintf
-_ACEOF
+; return 0; }
+EOF
+if { (eval echo configure:21365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_sasl_version=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_sasl_version=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define HAVE_SASL_VERSION 1
+EOF
 
+else
+  echo "$ac_t""no" 1>&6
 fi
 
+               LIBS="$ac_save_LIBS"
+       fi
 
-echo "$as_me:$LINENO: checking for _vsnprintf" >&5
-echo $ECHO_N "checking for _vsnprintf... $ECHO_C" >&6
-if test "${ac_cv_func__vsnprintf+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char _vsnprintf (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-/* 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 _vsnprintf ();
-/* 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__vsnprintf) || defined (__stub____vsnprintf)
-choke me
-#else
-char (*f) () = _vsnprintf;
-#endif
-#ifdef __cplusplus
-}
-#endif
+       echo "configure: warning: SASL authentication not supported!" 1>&2
+       if test $ol_link_tls = no ; then
+               echo "configure: warning: Strong authentication not supported!" 1>&2
+       fi
+fi
 
-int
-main ()
-{
-return f != _vsnprintf;
-  ;
-  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__vsnprintf=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func__vsnprintf=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func__vsnprintf" >&5
-echo "${ECHO_T}$ac_cv_func__vsnprintf" >&6
-if test $ac_cv_func__vsnprintf = yes; then
-  ac_cv_func_vsnprintf=yes
+if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
+       dev=no
+       if test -r /dev/urandom ; then
+               dev="/dev/urandom";
+       elif test -r /idev/urandom ; then
+               dev="/idev/urandom";
+       elif test -r /dev/srandom ; then
+               dev="/dev/srandom";
+       elif test -r /dev/random ; then
+               dev="/dev/random";
+       elif test -r /idev/random ; then
+               dev="/idev/random";
+       fi
 
-cat >>confdefs.h <<\_ACEOF
-#define vsnprintf _vsnprintf
-_ACEOF
+       if test $dev != no ; then
+               cat >> confdefs.h <<EOF
+#define URANDOM_DEVICE "$dev"
+EOF
+
+       fi
+fi
+
+ol_link_fetch=no
+if test $ol_with_fetch != no ; then
+       ol_LIBS=$LIBS
+LIBS="-lfetch -lcom_err $LIBS"
+echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
+echo "configure:21424: checking fetch(3) library" >&5
+if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       cat > conftest.$ac_ext <<EOF
+#line 21430 "configure"
+#include "confdefs.h"
+
+#include <sys/param.h>
+#include <stdio.h>
+#include <fetch.h>
+int main() {
+struct url *u = fetchParseURL("file:///"); 
+; return 0; }
+EOF
+if { (eval echo configure:21440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_lib_fetch=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_lib_fetch=no
+fi
+rm -f conftest*
+fi
 
+echo "$ac_t""$ol_cv_lib_fetch" 1>&6
+LIBS=$ol_LIBS
+if test $ol_cv_lib_fetch != no ; then
+       ol_link_fetch="-lfetch -lcom_err"
+       cat >> confdefs.h <<\EOF
+#define HAVE_FETCH 1
+EOF
 
 fi
 
 
+       if test $ol_cv_lib_fetch != no ; then
+               LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
+               ol_link_fetch=freebsd
 
-for ac_func in vprintf
-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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+       elif test $ol_with_fetch != auto ; then
+               { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
+       fi 
+fi
+
+if test $ol_enable_crypt != no ; then
+       save_LIBS="$LIBS"
+       LIBS="$TLS_LIBS $LIBS"
+
+       echo $ac_n "checking for crypt""... $ac_c" 1>&6
+echo "configure:21477: checking for crypt" >&5
+if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 21482 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    which can conflict with char crypt(); 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 ();
+    builtin and then its argument prototype would still apply.  */
+char crypt();
+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)
+#if defined (__stub_crypt) || defined (__stub___crypt)
 choke me
 #else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
+f = crypt;
 #endif
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-sed 's/^/| /' 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: checking for _doprnt" >&5
-echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
-if test "${ac_cv_func__doprnt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char _doprnt (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+; return 0; }
+EOF
+if { (eval echo configure:21506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_crypt=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_crypt=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_crypt=yes
+else
+  echo "$ac_t""no" 1>&6
+
+               LIBS="$save_LIBS"
+               echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
+echo "configure:21526: checking for crypt in -lcrypt" >&5
+ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lcrypt  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 21534 "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 _doprnt ();
-/* 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__doprnt) || defined (__stub____doprnt)
-choke me
-#else
-char (*f) () = _doprnt;
-#endif
-#ifdef __cplusplus
-}
-#endif
+    builtin and then its argument prototype would still apply.  */
+char crypt();
 
-int
-main ()
-{
-return f != _doprnt;
-  ;
-  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__doprnt=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func__doprnt=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
-echo "${ECHO_T}$ac_cv_func__doprnt" >&6
-if test $ac_cv_func__doprnt = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DOPRNT 1
-_ACEOF
+int main() {
+crypt()
+; return 0; }
+EOF
+if { (eval echo configure:21545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
+                       have_crypt=yes
+else
+  echo "$ac_t""no" 1>&6
+have_crypt=no
 fi
 
 fi
-done
 
 
+       LIBS="$save_LIBS"
 
-if test $ac_cv_func_vprintf = yes ; then
+       if test $have_crypt = yes ; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_CRYPT 1
+EOF
 
+       else
+               echo "configure: warning: could not find crypt" 1>&2
+               if test $ol_enable_crypt = yes ; then
+                       { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
+               fi
 
-for ac_func in snprintf 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
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+               echo "configure: warning: disabling crypt support" 1>&2
+               ol_enable_crypt=no
+       fi
+fi
+
+if test $ol_enable_proctitle != no ; then
+       echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
+echo "configure:21590: checking for setproctitle" >&5
+if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 21595 "configure"
+#include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+    which can conflict with char setproctitle(); 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 ();
+    builtin and then its argument prototype would still apply.  */
+char setproctitle();
+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)
+#if defined (__stub_setproctitle) || defined (__stub___setproctitle)
 choke me
 #else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
+f = setproctitle;
 #endif
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-sed 's/^/| /' 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
-
+; return 0; }
+EOF
+if { (eval echo configure:21619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_setproctitle=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_setproctitle=no"
 fi
-done
-
+rm -f conftest*
 fi
 
+if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_setproctitle=yes
+else
+  echo "$ac_t""no" 1>&6
 
+               echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
+echo "configure:21638: checking for setproctitle in -lutil" >&5
+ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lutil  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 21646 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char setproctitle();
 
+int main() {
+setproctitle()
+; return 0; }
+EOF
+if { (eval echo configure:21657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_setproctitle=yes
+                       LUTIL_LIBS="$LUTIL_LIBS -lutil"
+else
+  echo "$ac_t""no" 1>&6
+have_setproctitle=no
+                       LIBOBJS="$LIBOBJS setproctitle.o"
+                       LIBSRCS="$LIBSRCS setproctitle.c"
+fi
 
+fi
 
 
+       if test $have_setproctitle = yes ; then
+               cat >> confdefs.h <<\EOF
+#define HAVE_SETPROCTITLE 1
+EOF
 
+       fi
+fi
 
+if test $ol_enable_slp != no ; then
+       for ac_hdr in slp.h 
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:21697: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 21702 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:21707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
 
 
+       if test $ac_cv_header_slp_h = yes ; then
+               echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
+echo "configure:21736: checking for SLPOpen in -lslp" >&5
+ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lslp  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 21744 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char SLPOpen();
 
+int main() {
+SLPOpen()
+; return 0; }
+EOF
+if { (eval echo configure:21755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  have_slp=yes
+else
+  echo "$ac_t""no" 1>&6
+have_slp=no
+fi
 
+               if test $have_slp = yes ; then
+                       cat >> confdefs.h <<\EOF
+#define HAVE_SLP 1
+EOF
 
+                       SLAPD_SLP_LIBS=-lslp
+               fi
 
+       elif test $ol_enable_slp = yes ; then
+               { echo "configure: error: SLP not found" 1>&2; exit 1; }
+       fi
+fi
 
 
+echo $ac_n "checking long long""... $ac_c" 1>&6
+echo "configure:21791: checking long long" >&5
+if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       cat > conftest.$ac_ext <<EOF
+#line 21797 "configure"
+#include "confdefs.h"
 
+int main() {
+long long x;
+; return 0; }
+EOF
+if { (eval echo configure:21804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ol_cv_type_long_long=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_type_long_long=no
+fi
+rm -f conftest*
+fi
 
+echo "$ac_t""$ol_cv_type_long_long" 1>&6
+if test $ol_cv_type_long_long = yes; then
+       cat >> confdefs.h <<\EOF
+#define HAVE_LONG_LONG 1
+EOF
 
+fi
 
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:21825: checking for ANSI C header files" >&5
+if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 21830 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:21838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  ac_cv_header_stdc=yes
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 21855 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "memchr" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
+fi
 
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 21873 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "free" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
+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
+  :
+else
+  cat > conftest.$ac_ext <<EOF
+#line 21894 "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)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
 
+EOF
+if { (eval echo configure:21912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
 
+fi
+fi
 
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+  cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
 
+fi
 
+echo $ac_n "checking for mode_t""... $ac_c" 1>&6
+echo "configure:21936: checking for mode_t" >&5
+if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 21941 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
 
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  eval "ac_cv_type_mode_t=yes"
+else
+  rm -rf conftest*
+  eval "ac_cv_type_mode_t=no"
+fi
+rm -f conftest*
 
+fi
+if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+  cat >> confdefs.h <<EOF
+#define mode_t int
+EOF
 
+fi
 
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:21972: checking for off_t" >&5
+if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 21977 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
 
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  eval "ac_cv_type_off_t=yes"
+else
+  rm -rf conftest*
+  eval "ac_cv_type_off_t=no"
+fi
+rm -f conftest*
 
+fi
+if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+  cat >> confdefs.h <<EOF
+#define off_t long
+EOF
 
+fi
 
+echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+echo "configure:22008: checking for pid_t" >&5
+if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22013 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
 
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  eval "ac_cv_type_pid_t=yes"
+else
+  rm -rf conftest*
+  eval "ac_cv_type_pid_t=no"
+fi
+rm -f conftest*
 
+fi
+if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+  cat >> confdefs.h <<EOF
+#define pid_t int
+EOF
 
+fi
 
+echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
+echo "configure:22044: checking for ptrdiff_t" >&5
+if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22049 "configure"
+#include "confdefs.h"
+#include <stddef.h>
+int main() {
+ptrdiff_t p
+; return 0; }
+EOF
+if { (eval echo configure:22056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  am_cv_type_ptrdiff_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  am_cv_type_ptrdiff_t=no
+fi
+rm -f conftest*
+fi
 
+echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
+   if test $am_cv_type_ptrdiff_t = yes; then
+     cat >> confdefs.h <<\EOF
+#define HAVE_PTRDIFF_T 1
+EOF
 
+   fi
 
+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+echo "configure:22077: checking return type of signal handlers" >&5
+if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22082 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
 
+int main() {
+int i;
+; return 0; }
+EOF
+if { (eval echo configure:22099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_type_signal=void
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_type_signal=int
+fi
+rm -f conftest*
+fi
 
+echo "$ac_t""$ac_cv_type_signal" 1>&6
+cat >> confdefs.h <<EOF
+#define RETSIGTYPE $ac_cv_type_signal
+EOF
 
 
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:22118: checking for size_t" >&5
+if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22123 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
 
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  eval "ac_cv_type_size_t=yes"
+else
+  rm -rf conftest*
+  eval "ac_cv_type_size_t=no"
+fi
+rm -f conftest*
 
+fi
+if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+  cat >> confdefs.h <<EOF
+#define size_t unsigned
+EOF
 
-for ac_func in \
-       bcopy                   \
-       closesocket             \
-       chroot                  \
-       endgrent                \
-       endpwent                \
-       fcntl                   \
-       flock                   \
-       fstat                   \
-       getdtablesize   \
-       getgrgid                \
-       gethostname             \
-       getpass                 \
-       getpassphrase   \
-       getpwuid                \
-       getpwnam                \
-       getspnam                \
-       gettimeofday    \
-       initgroups              \
-       lockf                   \
-       memcpy                  \
-       memmove                 \
-       mkstemp                 \
-       mktemp                  \
-       pipe                    \
-       read                    \
-       recv                    \
-       recvfrom                \
-       setpwfile               \
-       setgid                  \
-       setegid                 \
-       setsid                  \
-       setuid                  \
-       seteuid                 \
-       sigaction               \
-       signal                  \
-       sigset                  \
-       strdup                  \
-       strerror                \
-       strpbrk                 \
-       strrchr                 \
-       strsep                  \
-       strstr                  \
-       strtol                  \
-       strtoul                 \
-       strspn                  \
-       sysconf                 \
-       usleep                  \
-       waitpid                 \
-       wait4                   \
-       write                   \
-       send                    \
-       sendmsg                 \
-       sendto                  \
+fi
 
-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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-/* 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 ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
+
+echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
+echo "configure:22155: checking for ssize_t" >&5
+if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22160 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
 #endif
-#ifdef __cplusplus
-}
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  eval "ac_cv_type_ssize_t=yes"
+else
+  rm -rf conftest*
+  eval "ac_cv_type_ssize_t=no"
+fi
+rm -f conftest*
+
+fi
+if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+  cat >> confdefs.h <<EOF
+#define ssize_t signed int
+EOF
+
+fi
+
+echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
+echo "configure:22191: checking for caddr_t" >&5
+if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22196 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
 #endif
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-sed 's/^/| /' 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
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  eval "ac_cv_type_caddr_t=yes"
+else
+  rm -rf conftest*
+  eval "ac_cv_type_caddr_t=no"
+fi
+rm -f conftest*
 
 fi
-done
+if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+  cat >> confdefs.h <<EOF
+#define caddr_t char *
+EOF
 
+fi
 
 
+echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
+echo "configure:22228: checking for socklen_t" >&5
+if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22233 "configure"
+#include "confdefs.h"
 
-for ac_func in getopt getpeereid
-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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-/* 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 ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
 #endif
-#ifdef __cplusplus
-}
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
 #endif
 
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  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
-sed 's/^/| /' 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
-
-else
-  LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+int main() {
+socklen_t len;
+; return 0; }
+EOF
+if { (eval echo configure:22247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ol_cv_type_socklen_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_type_socklen_t=no
+fi
+rm -f conftest*
 fi
-done
 
+echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
+  if test $ol_cv_type_socklen_t = no; then
+    cat >> confdefs.h <<\EOF
+#define socklen_t int
+EOF
 
+  fi
+echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
+echo "configure:22268: checking for member st_blksize in aggregate type struct stat" >&5
+if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22273 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+int main() {
+struct stat foo; foo.st_blksize;
+; return 0; }
+EOF
+if { (eval echo configure:22281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_struct_member_st_blksize=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_struct_member_st_blksize=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
+st_blksize="$ac_cv_c_struct_member_st_blksize"
+if test $ac_cv_c_struct_member_st_blksize = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_ST_BLKSIZE 1
+EOF
 
-if test "$ac_cv_func_getopt" != yes; then
-       LIBSRCS="$LIBSRCS getopt.c"
 fi
-if test "$ac_cv_func_getpeereid" != yes; then
-       echo "$as_me:$LINENO: checking for msg_accrights in msghdr" >&5
-echo $ECHO_N "checking for msg_accrights in msghdr... $ECHO_C" >&6
-if test "${ol_cv_msghdr_msg_accrights+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/socket.h>
-int
-main ()
-{
-struct msghdr m; m.msg_accrightslen=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
-  ol_cv_msghdr_msg_accrights=yes
+
+echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+echo "configure:22303: checking whether time.h and sys/time.h may both be included" >&5
+if eval "test \"\${ac_cv_header_time+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22308 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+int main() {
+struct tm *tp;
+; return 0; }
+EOF
+if { (eval echo configure:22317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_header_time=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_time=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_time" 1>&6
+if test $ac_cv_header_time = yes; then
+  cat >> confdefs.h <<\EOF
+#define TIME_WITH_SYS_TIME 1
+EOF
+
+fi
+
+echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
+echo "configure:22338: checking whether struct tm is in sys/time.h or time.h" >&5
+if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22343 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <time.h>
+int main() {
+struct tm *tp; tp->tm_sec;
+; return 0; }
+EOF
+if { (eval echo configure:22351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_struct_tm=time.h
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_msghdr_msg_accrights=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_struct_tm=sys/time.h
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
+rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $ol_cv_msghdr_msg_accrights" >&5
-echo "${ECHO_T}$ol_cv_msghdr_msg_accrights" >&6
-  if test $ol_cv_msghdr_msg_accrights = "yes" ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MSGHDR_MSG_ACCRIGHTS 1
-_ACEOF
+echo "$ac_t""$ac_cv_struct_tm" 1>&6
+if test $ac_cv_struct_tm = sys/time.h; then
+  cat >> confdefs.h <<\EOF
+#define TM_IN_SYS_TIME 1
+EOF
 
-  fi
+fi
 
-       LIBSRCS="$LIBSRCS getpeereid.c"
+echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
+echo "configure:22372: checking for uid_t in sys/types.h" >&5
+if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22377 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "uid_t" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_uid_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_uid_t=no
 fi
-if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
-       if test "$ac_cv_func_snprintf" != yes; then
+rm -f conftest*
 
-cat >>confdefs.h <<\_ACEOF
-#define snprintf ber_pvt_snprintf
-_ACEOF
+fi
 
-       fi
-       if test "$ac_cv_func_vsnprintf" != yes; then
+echo "$ac_t""$ac_cv_type_uid_t" 1>&6
+if test $ac_cv_type_uid_t = no; then
+  cat >> confdefs.h <<\EOF
+#define uid_t int
+EOF
 
-cat >>confdefs.h <<\_ACEOF
-#define vsnprintf ber_pvt_vsnprintf
-_ACEOF
+  cat >> confdefs.h <<\EOF
+#define gid_t int
+EOF
 
-       fi
 fi
 
-# Check Configuration
-echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
-echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6
-if test "${ol_cv_dcl_sys_errlist+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
+echo "configure:22406: checking for sig_atomic_t" >&5
+if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-
-       cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <errno.h>
-#ifdef WINNT
-#include <stdlib.h>
-#endif
-int
-main ()
-{
-char *c = (char *) *sys_errlist
-  ;
-  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
-  ol_cv_dcl_sys_errlist=yes
-       ol_cv_have_sys_errlist=yes
+  cat > conftest.$ac_ext <<EOF
+#line 22411 "configure"
+#include "confdefs.h"
+#include <signal.h>
+int main() {
+sig_atomic_t atomic;
+; return 0; }
+EOF
+if { (eval echo configure:22418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ol_cv_type_sig_atomic_t=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ol_cv_dcl_sys_errlist=no
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_type_sig_atomic_t=no
 fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
-echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6
-#
-# It's possible (for near-UNIX clones) that sys_errlist doesn't exist
-if test $ol_cv_dcl_sys_errlist = no ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define DECL_SYS_ERRLIST 1
-_ACEOF
+echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
+  if test $ol_cv_type_sig_atomic_t = no; then
+    cat >> confdefs.h <<\EOF
+#define sig_atomic_t int
+EOF
 
+  fi
 
-       echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
-echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6
-if test "${ol_cv_have_sys_errlist+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
-               cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <errno.h>
-int
-main ()
-{
-char *c = (char *) *sys_errlist
-  ;
-  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
-  ol_cv_have_sys_errlist=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+# test for pw_gecos in struct passwd
+echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
+echo "configure:22442: checking struct passwd for pw_gecos" >&5
+if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       cat > conftest.$ac_ext <<EOF
+#line 22448 "configure"
+#include "confdefs.h"
+#include <pwd.h>
+int main() {
 
-ol_cv_have_sys_errlist=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+       struct passwd pwd;
+       pwd.pw_gecos = pwd.pw_name;
+
+; return 0; }
+EOF
+if { (eval echo configure:22458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ol_cv_struct_passwd_pw_gecos=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_struct_passwd_pw_gecos=no
 fi
-echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
-echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6
+rm -f conftest*
 fi
-if test $ol_cv_have_sys_errlist = yes ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYS_ERRLIST 1
-_ACEOF
+echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
+if test $ol_cv_struct_passwd_pw_gecos = yes ; then
+       cat >> confdefs.h <<\EOF
+#define HAVE_PW_GECOS 1
+EOF
 
 fi
 
+# test for pw_passwd in struct passwd
+echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
+echo "configure:22480: checking struct passwd for pw_passwd" >&5
+if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       cat > conftest.$ac_ext <<EOF
+#line 22486 "configure"
+#include "confdefs.h"
+#include <pwd.h>
+int main() {
 
+       struct passwd pwd;
+       pwd.pw_passwd = pwd.pw_name;
 
-if test "$ol_enable_slapi" != no ; then
-
-for ac_header in ltdl.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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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
-sed 's/^/| /' 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"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end 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=$?
-  grep -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
-sed 's/^/| /' 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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&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
+; return 0; }
+EOF
+if { (eval echo configure:22496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ol_cv_struct_passwd_pw_passwd=yes
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_struct_passwd_pw_passwd=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
+echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
+if test $ol_cv_struct_passwd_pw_passwd = yes ; then
+       cat >> confdefs.h <<\EOF
+#define HAVE_PW_PASSWD 1
+EOF
 
-done
+fi
 
 
-       if test $ac_cv_header_ltdl_h != yes ; then
-               { { echo "$as_me:$LINENO: error: could not locate <ltdl.h>" >&5
-echo "$as_me: error: could not locate <ltdl.h>" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
-echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6
-if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
+echo "configure:22518: checking if toupper() requires islower()" >&5
+if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lltdl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  
+       if test "$cross_compiling" = yes; then
+  ol_cv_c_upper_lower=safe
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22527 "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 lt_dlinit ();
-int
-main ()
+#include <ctype.h>
+main()
 {
-lt_dlinit ();
-  ;
-  return 0;
+       if ('C' == toupper('C'))
+               exit(0);
+       else
+               exit(1);
 }
-_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_ltdl_lt_dlinit=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_ltdl_lt_dlinit=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_ltdl_lt_dlinit" >&5
-echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6
-if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
+EOF
+if { (eval echo configure:22539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
+  ol_cv_c_upper_lower=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ol_cv_c_upper_lower=yes
+fi
+rm -fr conftest*
+fi
 
-               SLAPI_LIBS=-lltdl
-               LIBSLAPI=./libslapi.a
-               LIBSLAPITOOLS=../libslapi.a
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBLTDL 1
-_ACEOF
+echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
+if test $ol_cv_c_upper_lower != no ; then
+       cat >> confdefs.h <<\EOF
+#define C_UPPER_LOWER 1
+EOF
 
+fi
 
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:22562: checking for working const" >&5
+if eval "test \"\${ac_cv_c_const+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
-echo "$as_me: error: could not locate libtool -lltdl" >&2;}
-   { (exit 1); exit 1; }; }
-fi
+  cat > conftest.$ac_ext <<EOF
+#line 22567 "configure"
+#include "confdefs.h"
 
+int main() {
+
+/* 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;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:22616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_const=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
 
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+  cat >> confdefs.h <<\EOF
+#define const 
+EOF
 
-cat >>confdefs.h <<\_ACEOF
-#define LDAP_SLAPI 1
-_ACEOF
+fi
 
+echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
+echo "configure:22637: checking if compiler understands volatile" >&5
+if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22642 "configure"
+#include "confdefs.h"
+int x, y, z;
+int main() {
+volatile int a; int * volatile b = x ? &y : &z;
+      /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
+      *b = 0;
+; return 0; }
+EOF
+if { (eval echo configure:22651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ol_cv_c_volatile=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_c_volatile=no
+fi
+rm -f conftest*
 fi
 
-if test "$ol_enable_debug" != no ; then
+echo "$ac_t""$ol_cv_c_volatile" 1>&6
+  if test $ol_cv_c_volatile = yes; then
+    : 
+  else
+    cat >> confdefs.h <<\EOF
+#define volatile 
+EOF
 
-cat >>confdefs.h <<\_ACEOF
-#define LDAP_DEBUG 1
-_ACEOF
+  fi
 
-fi
-if test "$ol_enable_syslog" = yes ; then
+if test $cross_compiling = yes ; then
+       echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
+       cat >> confdefs.h <<\EOF
+#define CROSS_COMPILING 1
+EOF
 
-cat >>confdefs.h <<\_ACEOF
-#define LDAP_SYSLOG 1
-_ACEOF
+else
+       echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
+echo "configure:22682: checking whether byte ordering is bigendian" >&5
+if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_cv_c_bigendian=unknown
+# See if sys/param.h defines the BYTE_ORDER macro.
+cat > conftest.$ac_ext <<EOF
+#line 22689 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+int main() {
 
-fi
-if test "$ol_link_kbind" != no ; then
-       cat >>confdefs.h <<\_ACEOF
-#define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
-_ACEOF
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:22700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+cat > conftest.$ac_ext <<EOF
+#line 22704 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+int main() {
 
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:22715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_bigendian=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_bigendian=no
 fi
-if test "$ol_enable_proctitle" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define LDAP_PROCTITLE 1
-_ACEOF
-
+rm -f conftest*
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
 fi
-if test "$ol_enable_referrals" != no ; then
-       cat >>confdefs.h <<\_ACEOF
-#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
-_ACEOF
-
+rm -f conftest*
+if test $ac_cv_c_bigendian = unknown; then
+if test "$cross_compiling" = yes; then
+    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22735 "configure"
+#include "confdefs.h"
+main () {
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long l;
+    char c[sizeof (long)];
+  } u;
+  u.l = 1;
+  exit (u.c[sizeof (long) - 1] == 1);
+}
+EOF
+if { (eval echo configure:22748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
+  ac_cv_c_bigendian=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_c_bigendian=yes
+fi
+rm -fr conftest*
 fi
-if test "$ol_enable_local" != no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define LDAP_PF_LOCAL 1
-_ACEOF
 
 fi
-if test "$ol_link_ipv6" != no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define LDAP_PF_INET6 1
-_ACEOF
-
 fi
-if test "$ol_enable_cleartext" != no ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_CLEARTEXT 1
-_ACEOF
+echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+if test $ac_cv_c_bigendian = yes; then
+  cat >> confdefs.h <<\EOF
+#define WORDS_BIGENDIAN 1
+EOF
 
 fi
-if test "$ol_enable_crypt" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_CRYPT 1
-_ACEOF
 
 fi
-if test "$ol_link_kpasswd" != no ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_KPASSWD 1
-_ACEOF
+echo $ac_n "checking size of short""... $ac_c" 1>&6
+echo "configure:22774: checking size of short" >&5 
+if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
+  cat > conftest.$ac_ext <<EOF
+#line 22780 "configure"
+#include "confdefs.h"
+#include "confdefs.h" 
+#include <stdlib.h>
+#include <sys/types.h> 
 
+int main() {
+switch (0) case 0: case (sizeof (short) == $ac_size):;
+; return 0; }
+EOF
+if { (eval echo configure:22791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_short=$ac_size
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
 fi
-if test "$ol_link_spasswd" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_SPASSWD 1
-_ACEOF
+rm -f conftest* 
+  if test x$ac_cv_sizeof_short != x ; then break; fi 
+done 
 
 fi
-if test "$ol_enable_multimaster" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_MULTIMASTER 1
-_ACEOF
+if test x$ac_cv_sizeof_short = x ; then 
+  { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
+fi 
+echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
+cat >> confdefs.h <<EOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+EOF
+echo $ac_n "checking size of int""... $ac_c" 1>&6
+echo "configure:22814: checking size of int" >&5 
+if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
+  cat > conftest.$ac_ext <<EOF
+#line 22820 "configure"
+#include "confdefs.h"
+#include "confdefs.h" 
+#include <stdlib.h>
+#include <sys/types.h> 
 
+int main() {
+switch (0) case 0: case (sizeof (int) == $ac_size):;
+; return 0; }
+EOF
+if { (eval echo configure:22831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_int=$ac_size
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
 fi
-if test "$ol_enable_phonetic" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_PHONETIC 1
-_ACEOF
+rm -f conftest* 
+  if test x$ac_cv_sizeof_int != x ; then break; fi 
+done 
 
 fi
-if test "$ol_enable_rlookups" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_RLOOKUPS 1
-_ACEOF
+if test x$ac_cv_sizeof_int = x ; then 
+  { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
+fi 
+echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
+cat >> confdefs.h <<EOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+EOF
+echo $ac_n "checking size of long""... $ac_c" 1>&6
+echo "configure:22854: checking size of long" >&5 
+if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
+  cat > conftest.$ac_ext <<EOF
+#line 22860 "configure"
+#include "confdefs.h"
+#include "confdefs.h" 
+#include <stdlib.h>
+#include <sys/types.h> 
 
+int main() {
+switch (0) case 0: case (sizeof (long) == $ac_size):;
+; return 0; }
+EOF
+if { (eval echo configure:22871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_long=$ac_size
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
 fi
-if test "$ol_enable_aci" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_ACI_ENABLED 1
-_ACEOF
+rm -f conftest* 
+  if test x$ac_cv_sizeof_long != x ; then break; fi 
+done 
 
 fi
+if test x$ac_cv_sizeof_long = x ; then 
+  { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
+fi 
+echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+EOF
 
-if test "$ol_link_modules" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_MODULES 1
-_ACEOF
+echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
+echo "configure:22894: checking size of wchar_t" >&5 
+if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
+  cat > conftest.$ac_ext <<EOF
+#line 22900 "configure"
+#include "confdefs.h"
+#include "confdefs.h" 
+#include <stdlib.h>
+#include <sys/types.h> 
 
-       BUILD_SLAPD=yes
-       SLAPD_MODULES_LDFLAGS="-dlopen self"
+int main() {
+switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
+; return 0; }
+EOF
+if { (eval echo configure:22911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_wchar_t=$ac_size
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
 fi
+rm -f conftest* 
+  if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
+done 
 
-if test "$ol_enable_bdb" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_BDB 1
-_ACEOF
-
-       BUILD_SLAPD=yes
-       BUILD_BDB=yes
-       if test "$ol_with_bdb_module" != static ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_BDB_DYNAMIC 1
-_ACEOF
-
-               BUILD_BDB=mod
-               BUILD_BDB_DYNAMIC=shared
-               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
-       else
-               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
-       fi
 fi
+if test x$ac_cv_sizeof_wchar_t = x ; then 
+  { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
+fi 
+echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
+cat >> confdefs.h <<EOF
+#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
+EOF
 
-if test "$ol_link_dnssrv" != no ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_DNSSRV 1
-_ACEOF
+if test "$ac_cv_sizeof_int" -lt 4 ; then
+       echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
 
-       BUILD_SLAPD=yes
-       BUILD_DNSSRV=yes
-       if test "$ol_with_dnssrv_module" != static ; then
+       cat >> confdefs.h <<\EOF
+#define LBER_INT_T long
+EOF
 
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_DNSSRV_DYNAMIC 1
-_ACEOF
+else
+       cat >> confdefs.h <<\EOF
+#define LBER_INT_T int
+EOF
 
-               BUILD_DNSSRV=mod
-               BUILD_DNSSRV_DYNAMIC=shared
-               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
-       else
-               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
-       fi
 fi
 
-if test "$ol_enable_ldap" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_LDAP 1
-_ACEOF
-
-       BUILD_SLAPD=yes
-       BUILD_LDAP=yes
-       if test "$ol_with_ldap_module" != static ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_LDAP_DYNAMIC 1
-_ACEOF
+cat >> confdefs.h <<\EOF
+#define LBER_LEN_T long
+EOF
 
-               BUILD_LDAP=mod
-               BUILD_LDAP_DYNAMIC=shared
-               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
-       else
-               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
-       fi
-fi
+cat >> confdefs.h <<\EOF
+#define LBER_SOCKET_T int
+EOF
 
-if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
+cat >> confdefs.h <<\EOF
+#define LBER_TAG_T long
+EOF
 
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_LDBM 1
-_ACEOF
 
-       BUILD_SLAPD=yes
-       BUILD_LDBM=yes
-       if test "$ol_with_ldbm_module" != static ; then
+echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
+echo "configure:22962: checking for 8-bit clean memcmp" >&5
+if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_memcmp_clean=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 22970 "configure"
+#include "confdefs.h"
 
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_LDBM_DYNAMIC 1
-_ACEOF
+main()
+{
+  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
+  exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
+}
 
-               BUILD_LDBM=mod
-               BUILD_LDBM_DYNAMIC=shared
-               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
-       else
-               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
-       fi
+EOF
+if { (eval echo configure:22980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>&5
+then
+  ac_cv_func_memcmp_clean=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_memcmp_clean=no
 fi
-
-if test "$ol_enable_meta" != no ; then
-       if test "$ol_enable_ldap" = no ; then
-               { { echo "$as_me:$LINENO: error: need --enable-ldap to use --enable-meta" >&5
-echo "$as_me: error: need --enable-ldap to use --enable-meta" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-       if test "$ol_enable_rewrite" = no ; then
-               { { echo "$as_me:$LINENO: error: need --enable-rewrite to use --enable-meta" >&5
-echo "$as_me: error: need --enable-rewrite to use --enable-meta" >&2;}
-   { (exit 1); exit 1; }; }
-       fi
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_META 1
-_ACEOF
-
-       BUILD_SLAPD=yes
-       BUILD_META=yes
-       BUILD_LDAP=yes
-       BUILD_REWRITE=yes
-       if test "$ol_with_meta_module" != static ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_META_DYNAMIC 1
-_ACEOF
-
-               BUILD_META=mod
-               BUILD_META_DYNAMIC=shared
-               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
-       else
-               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
-       fi
+rm -fr conftest*
 fi
 
-if test "$ol_enable_monitor" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_MONITOR 1
-_ACEOF
-
-       BUILD_SLAPD=yes
-       BUILD_MONITOR=yes
-       if test "$ol_with_monitor_module" != static ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_MONITOR_DYNAMIC 1
-_ACEOF
-
-               BUILD_MONITOR=mod
-               BUILD_MONITOR_DYNAMIC=shared
-               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
-       else
-               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
-       fi
 fi
 
-if test "$ol_enable_null" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_NULL 1
-_ACEOF
+echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
+test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
 
-       BUILD_SLAPD=yes
-       BUILD_NULL=yes
-       if test "$ol_with_null_module" != static ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_NULL_DYNAMIC 1
-_ACEOF
+if test $ac_cv_func_memcmp_clean = no ; then
+       cat >> confdefs.h <<\EOF
+#define NEED_MEMCMP_REPLACEMENT 1
+EOF
 
-               BUILD_NULL=mod
-               BUILD_NULL_DYNAMIC=shared
-               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
-       else
-               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
-       fi
 fi
 
-if test "$ol_enable_passwd" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_PASSWD 1
-_ACEOF
+echo $ac_n "checking for strftime""... $ac_c" 1>&6
+echo "configure:23006: checking for strftime" >&5
+if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 23011 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char strftime(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char strftime();
+char (*f)();
 
-       BUILD_SLAPD=yes
-       BUILD_PASSWD=yes
-       if test "$ol_with_passwd_module" != static ; then
+int main() {
 
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_PASSWD_DYNAMIC 1
-_ACEOF
+/* 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_strftime) || defined (__stub___strftime)
+choke me
+#else
+f = strftime;
+#endif
 
-               BUILD_PASSWD=mod
-               BUILD_PASSWD_DYNAMIC=shared
-               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
-       else
-               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
-       fi
+; return 0; }
+EOF
+if { (eval echo configure:23035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_strftime=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_strftime=no"
 fi
-
-if test "$ol_link_perl" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_PERL 1
-_ACEOF
-
-       BUILD_SLAPD=yes
-       BUILD_PERL=yes
-       if test "$ol_with_perl_module" != static ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_PERL_DYNAMIC 1
-_ACEOF
-
-               BUILD_PERL=mod
-               BUILD_PERL_DYNAMIC=shared
-               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
-       else
-               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
-       fi
+rm -f conftest*
 fi
 
-if test "$ol_enable_shell" != no ; then
-       if test "$ol_link_thread" != no ; then
-               { echo "$as_me:$LINENO: WARNING: Use of --without-threads is recommended with back-shell" >&5
-echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
-       fi
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_SHELL 1
-_ACEOF
-
-       BUILD_SLAPD=yes
-       BUILD_SHELL=yes
-       if test "$ol_with_shell_module" != static ; then
+if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define HAVE_STRFTIME 1
+EOF
 
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_SHELL_DYNAMIC 1
-_ACEOF
+else
+  echo "$ac_t""no" 1>&6
+# strftime is in -lintl on SCO UNIX.
+echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
+echo "configure:23057: checking for strftime in -lintl" >&5
+ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lintl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 23065 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char strftime();
 
-               BUILD_SHELL=mod
-               BUILD_SHELL_DYNAMIC=shared
-               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
-       else
-               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
-       fi
+int main() {
+strftime()
+; return 0; }
+EOF
+if { (eval echo configure:23076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
 fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
-if test "$ol_enable_tcl" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_TCL 1
-_ACEOF
-
-       BUILD_SLAPD=yes
-       BUILD_TCL=yes
-       if test "$ol_with_tcl_module" != static; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_TCL_DYNAMIC 1
-_ACEOF
-
-               BUILD_TCL=mod
-               BUILD_TCL_DYNAMIC=shared
-               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
-       else
-               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
-       fi
 fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define HAVE_STRFTIME 1
+EOF
 
-if test "$ol_link_sql" != no ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_SQL 1
-_ACEOF
-
-       BUILD_SLAPD=yes
-       BUILD_SQL=yes
-       if test "$ol_with_sql_module" != static; then
-
-cat >>confdefs.h <<\_ACEOF
-#define SLAPD_SQL_DYNAMIC 1
-_ACEOF
-
-               BUILD_SQL=mod
-               BUILD_SQL_DYNAMIC=shared
-               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
-       else
-               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
-       fi
+LIBS="-lintl $LIBS"
+else
+  echo "$ac_t""no" 1>&6
 fi
 
-if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
-       $BUILD_SLAPD = yes ; then
-       BUILD_SLURPD=yes
 fi
 
-if test "$ol_enable_rewrite" != no ; then
 
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_REWRITE 1
-_ACEOF
+echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
+echo "configure:23104: checking for inet_aton()" >&5
+if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 23109 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_SYS_TYPES_H
+#      include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#      include <sys/socket.h>
+#      ifdef HAVE_SYS_SELECT_H
+#              include <sys/select.h>
+#      endif
+#      include <netinet/in.h>
+#      ifdef HAVE_ARPA_INET_H
+#              include <arpa/inet.h>
+#      endif
+#endif
 
-       BUILD_REWRITE=yes
+int main() {
+struct in_addr in;
+int rc = inet_aton( "255.255.255.255", &in );
+; return 0; }
+EOF
+if { (eval echo configure:23131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_func_inet_aton=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_func_inet_aton=no
+fi
+rm -f conftest*
 fi
 
-if test "$ol_enable_slapi" != no ; then
+echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
+  if test $ol_cv_func_inet_aton != no; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_INET_ATON 1
+EOF
 
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_SLAPI 1
-_ACEOF
+  fi
 
-       BUILD_SLAPI=yes
-       SLAPD_SLAPI_DEPEND=libslapi.a
-fi
+echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
+echo "configure:23153: checking for _spawnlp" >&5
+if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 23158 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char _spawnlp(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char _spawnlp();
+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__spawnlp) || defined (__stub____spawnlp)
+choke me
+#else
+f = _spawnlp;
+#endif
 
-if test "$ac_cv_mingw32" = yes ; then
-       PLAT=NT
-       SLAPD_MODULES_LDFLAGS=
+; return 0; }
+EOF
+if { (eval echo configure:23182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func__spawnlp=yes"
 else
-       PLAT=UNIX
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func__spawnlp=no"
 fi
-
-if test -z "$SLAPD_STATIC_BACKENDS"; then
-       SLAPD_NO_STATIC='#'
-else
-       SLAPD_NO_STATIC=
+rm -f conftest*
 fi
 
+if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define HAVE_SPAWNLP 1
+EOF
 
+else
+  echo "$ac_t""no" 1>&6
+fi
 
 
+echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
+echo "configure:23206: checking for _snprintf" >&5
+if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 23211 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char _snprintf(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char _snprintf();
+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__snprintf) || defined (__stub____snprintf)
+choke me
+#else
+f = _snprintf;
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:23235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func__snprintf=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func__snprintf=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_cv_func_snprintf=yes
+       cat >> confdefs.h <<\EOF
+#define snprintf _snprintf
+EOF
 
 
+else
+  echo "$ac_t""no" 1>&6
+fi
 
 
+echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
+echo "configure:23261: checking for _vsnprintf" >&5
+if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 23266 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char _vsnprintf(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char _vsnprintf();
+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__vsnprintf) || defined (__stub____vsnprintf)
+choke me
+#else
+f = _vsnprintf;
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:23290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func__vsnprintf=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func__vsnprintf=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_cv_func_vsnprintf=yes
+       cat >> confdefs.h <<\EOF
+#define vsnprintf _vsnprintf
+EOF
 
 
+else
+  echo "$ac_t""no" 1>&6
+fi
 
 
+echo $ac_n "checking for vprintf""... $ac_c" 1>&6
+echo "configure:23316: checking for vprintf" >&5
+if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 23321 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char vprintf(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char vprintf();
+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_vprintf) || defined (__stub___vprintf)
+choke me
+#else
+f = vprintf;
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:23345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_vprintf=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_vprintf=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define HAVE_VPRINTF 1
+EOF
 
+else
+  echo "$ac_t""no" 1>&6
+fi
 
+if test "$ac_cv_func_vprintf" != yes; then
+echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
+echo "configure:23369: checking for _doprnt" >&5
+if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 23374 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char _doprnt(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char _doprnt();
+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__doprnt) || defined (__stub____doprnt)
+choke me
+#else
+f = _doprnt;
+#endif
 
+; return 0; }
+EOF
+if { (eval echo configure:23398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func__doprnt=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func__doprnt=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define HAVE_DOPRNT 1
+EOF
 
+else
+  echo "$ac_t""no" 1>&6
+fi
 
+fi
 
 
+if test $ac_cv_func_vprintf = yes ; then
+               for ac_func in snprintf vsnprintf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:23427: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 23432 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+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; }
+EOF
+if { (eval echo configure:23456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
 
+fi
 
+for ac_func in \
+       bcopy                   \
+       closesocket             \
+       chroot                  \
+       endgrent                \
+       endpwent                \
+       fcntl                   \
+       flock                   \
+       fstat                   \
+       getdtablesize   \
+       getgrgid                \
+       gethostname             \
+       getpass                 \
+       getpassphrase   \
+       getpwuid                \
+       getpwnam                \
+       getspnam                \
+       gettimeofday    \
+       initgroups              \
+       lockf                   \
+       memcpy                  \
+       memmove                 \
+       mkstemp                 \
+       mktemp                  \
+       pipe                    \
+       read                    \
+       recv                    \
+       recvfrom                \
+       setpwfile               \
+       setgid                  \
+       setegid                 \
+       setsid                  \
+       setuid                  \
+       seteuid                 \
+       signal                  \
+       strdup                  \
+       strerror                \
+       strpbrk                 \
+       strrchr                 \
+       strsep                  \
+       strstr                  \
+       strtol                  \
+       strtoul                 \
+       strtoq                  \
+       strtouq                 \
+       strtoll                 \
+       strspn                  \
+       sysconf                 \
+       usleep                  \
+       waitpid                 \
+       wait4                   \
+       write                   \
+       send                    \
+       sendmsg                 \
+       sendto                  \
 
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:23540: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 23545 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+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; }
+EOF
+if { (eval echo configure:23569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
 
 
+for ac_func in getopt getpeereid
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:23597: checking for $ac_func" >&5
+if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 23602 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+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; }
+EOF
+if { (eval echo configure:23626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
 
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
+fi
+done
 
 
 
+if test "$ac_cv_func_getopt" != yes; then
+       LIBSRCS="$LIBSRCS getopt.c"
+fi
+if test "$ac_cv_func_getpeereid" != yes; then
+       echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
+echo "configure:23658: checking for msg_accrights in msghdr" >&5
+if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 23663 "configure"
+#include "confdefs.h"
+#include <sys/socket.h>
+int main() {
+struct msghdr m; m.msg_accrightslen=0
+; return 0; }
+EOF
+if { (eval echo configure:23670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ol_cv_msghdr_msg_accrights=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_msghdr_msg_accrights=no
+fi
+rm -f conftest*
+       
+fi
 
+echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
+  if test $ol_cv_msghdr_msg_accrights = "yes" ; then
+       cat >> confdefs.h <<\EOF
+#define HAVE_MSGHDR_MSG_ACCRIGHTS 1
+EOF
 
+  fi
 
+       LIBSRCS="$LIBSRCS getpeereid.c"
+fi
+if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
+       if test "$ac_cv_func_snprintf" != yes; then
+               cat >> confdefs.h <<\EOF
+#define snprintf ber_pvt_snprintf
+EOF
 
+       fi
+       if test "$ac_cv_func_vsnprintf" != yes; then
+               cat >> confdefs.h <<\EOF
+#define vsnprintf ber_pvt_vsnprintf
+EOF
 
+       fi
+fi
 
+# Check Configuration
+echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
+echo "configure:23710: checking declaration of sys_errlist" >&5
+if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+       cat > conftest.$ac_ext <<EOF
+#line 23716 "configure"
+#include "confdefs.h"
 
+#include <stdio.h>
+#include <sys/types.h>
+#include <errno.h>
+#ifdef WINNT
+#include <stdlib.h>
+#endif 
+int main() {
+char *c = (char *) *sys_errlist
+; return 0; }
+EOF
+if { (eval echo configure:23729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ol_cv_dcl_sys_errlist=yes
+       ol_cv_have_sys_errlist=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_dcl_sys_errlist=no
+fi
+rm -f conftest*
+fi
 
+echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
+#
+# It's possible (for near-UNIX clones) that sys_errlist doesn't exist
+if test $ol_cv_dcl_sys_errlist = no ; then
+       cat >> confdefs.h <<\EOF
+#define DECL_SYS_ERRLIST 1
+EOF
 
 
+       echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
+echo "configure:23752: checking existence of sys_errlist" >&5
+if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+               cat > conftest.$ac_ext <<EOF
+#line 23758 "configure"
+#include "confdefs.h"
+#include <errno.h>
+int main() {
+char *c = (char *) *sys_errlist
+; return 0; }
+EOF
+if { (eval echo configure:23765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ol_cv_have_sys_errlist=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ol_cv_have_sys_errlist=no
+fi
+rm -f conftest*
+fi
 
+echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
+fi
+if test $ol_cv_have_sys_errlist = yes ; then
+       cat >> confdefs.h <<\EOF
+#define HAVE_SYS_ERRLIST 1
+EOF
 
+fi
 
 
 
+if test "$ol_enable_slapi" != no ; then
+                       for ac_hdr in ltdl.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:23793: checking for $ac_hdr" >&5
+if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 23798 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:23803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
 
 
+       if test $ac_cv_header_ltdl_h != yes ; then
+               { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
+       fi
+       echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
+echo "configure:23834: checking for lt_dlinit in -lltdl" >&5
+ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
+if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lltdl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 23842 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char lt_dlinit();
 
+int main() {
+lt_dlinit()
+; return 0; }
+EOF
+if { (eval echo configure:23853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+               SLAPI_LIBS=-lltdl
+               LIBSLAPI=libslapi.a
+               LIBSLAPITOOLS=../libslapi.a
+               cat >> confdefs.h <<\EOF
+#define HAVE_LIBLTDL 1
+EOF
 
-# Check whether --with-xxinstall or --without-xxinstall was given.
-if test "${with_xxinstall+set}" = set; then
-  withval="$with_xxinstall"
-
-fi;
-
-          ac_config_files="$ac_config_files Makefile:build/top.mk:Makefile.in:build/dir.mk"
-
-          ac_config_files="$ac_config_files doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk"
-
-          ac_config_files="$ac_config_files doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk"
+       
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
+fi
 
-          ac_config_files="$ac_config_files doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk"
 
-          ac_config_files="$ac_config_files doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk"
+       cat >> confdefs.h <<\EOF
+#define LDAP_SLAPI 1
+EOF
 
-          ac_config_files="$ac_config_files doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk"
+fi
 
-          ac_config_files="$ac_config_files doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk"
+if test "$ol_enable_debug" != no ; then
+       cat >> confdefs.h <<\EOF
+#define LDAP_DEBUG 1
+EOF
 
-          ac_config_files="$ac_config_files clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk"
+fi
+if test "$ol_enable_syslog" = yes ; then
+       cat >> confdefs.h <<\EOF
+#define LDAP_SYSLOG 1
+EOF
 
-          ac_config_files="$ac_config_files clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk"
+fi
+if test "$ol_link_kbind" != no ; then
+       cat >> confdefs.h <<\EOF
+#define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
+EOF
 
-          ac_config_files="$ac_config_files include/Makefile:build/top.mk:include/Makefile.in"
+fi
+if test "$ol_enable_proctitle" != no ; then
+       cat >> confdefs.h <<\EOF
+#define LDAP_PROCTITLE 1
+EOF
 
-          ac_config_files="$ac_config_files libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk"
+fi
+if test "$ol_enable_referrals" != no ; then
+       cat >> confdefs.h <<\EOF
+#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
+EOF
 
-          ac_config_files="$ac_config_files libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk"
+fi
+if test "$ol_enable_local" != no; then
+       cat >> confdefs.h <<\EOF
+#define LDAP_PF_LOCAL 1
+EOF
 
-          ac_config_files="$ac_config_files libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk"
+fi
+if test "$ol_link_ipv6" != no; then
+       cat >> confdefs.h <<\EOF
+#define LDAP_PF_INET6 1
+EOF
 
-          ac_config_files="$ac_config_files libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk"
+fi
+if test "$ol_enable_cleartext" != no ; then
+       cat >> confdefs.h <<\EOF
+#define SLAPD_CLEARTEXT 1
+EOF
 
-          ac_config_files="$ac_config_files libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk"
+fi
+if test "$ol_enable_crypt" != no ; then
+       cat >> confdefs.h <<\EOF
+#define SLAPD_CRYPT 1
+EOF
 
-          ac_config_files="$ac_config_files libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk"
+fi
+if test "$ol_link_spasswd" != no ; then
+       cat >> confdefs.h <<\EOF
+#define SLAPD_SPASSWD 1
+EOF
 
-          ac_config_files="$ac_config_files libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk"
+fi
+if test "$ol_enable_multimaster" != no ; then
+       cat >> confdefs.h <<\EOF
+#define SLAPD_MULTIMASTER 1
+EOF
 
-          ac_config_files="$ac_config_files libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk"
+fi
+if test "$ol_enable_rlookups" != no ; then
+       cat >> confdefs.h <<\EOF
+#define SLAPD_RLOOKUPS 1
+EOF
 
-          ac_config_files="$ac_config_files libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk"
+fi
+if test "$ol_enable_aci" != no ; then
+       cat >> confdefs.h <<\EOF
+#define SLAPD_ACI_ENABLED 1
+EOF
 
-          ac_config_files="$ac_config_files libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk"
+fi
 
-          ac_config_files="$ac_config_files servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk"
+if test "$ol_link_modules" != no ; then
+       cat >> confdefs.h <<\EOF
+#define SLAPD_MODULES 1
+EOF
 
-          ac_config_files="$ac_config_files servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk"
+       BUILD_SLAPD=yes
+       SLAPD_MODULES_LDFLAGS="-dlopen self"
+fi
 
-          ac_config_files="$ac_config_files servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk"
+cat >> confdefs.h <<\EOF
+#define SLAPD_MOD_STATIC 1
+EOF
 
-          ac_config_files="$ac_config_files servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk"
+cat >> confdefs.h <<\EOF
+#define SLAPD_MOD_DYNAMIC 2
+EOF
 
-          ac_config_files="$ac_config_files servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk"
 
-          ac_config_files="$ac_config_files servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk"
+if test "$ol_enable_bdb" != no ; then
+       BUILD_SLAPD=yes
+       BUILD_BDB=$ol_enable_bdb
+       if test "$ol_enable_bdb" = mod ; then
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
+               MFLAG=SLAPD_MOD_DYNAMIC
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       cat >> confdefs.h <<EOF
+#define SLAPD_BDB $MFLAG
+EOF
 
-          ac_config_files="$ac_config_files servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk"
+fi
 
-          ac_config_files="$ac_config_files servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk"
+if test "$ol_enable_dnssrv" != no ; then
+       BUILD_SLAPD=yes
+       BUILD_DNSSRV=$ol_enable_dnssrv
+       if test "$ol_enable_dnssrv" = mod ; then
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
+               MFLAG=SLAPD_MOD_DYNAMIC
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       cat >> confdefs.h <<EOF
+#define SLAPD_DNSSRV $MFLAG
+EOF
 
-          ac_config_files="$ac_config_files servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk"
+fi
 
-          ac_config_files="$ac_config_files servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk"
+if test "$ol_enable_hdb" != no ; then
+       BUILD_SLAPD=yes
+       BUILD_HDB=$ol_enable_hdb
+       if test "$ol_enable_hdb" = mod ; then
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
+               MFLAG=SLAPD_MOD_DYNAMIC
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       cat >> confdefs.h <<EOF
+#define SLAPD_HDB $MFLAG
+EOF
 
-          ac_config_files="$ac_config_files servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk"
+fi
 
-          ac_config_files="$ac_config_files servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk"
+if test "$ol_enable_ldap" != no ; then
+       BUILD_SLAPD=yes
+       BUILD_LDAP=$ol_enable_ldap
+       if test "$ol_enable_ldap" = mod ; then
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
+               MFLAG=SLAPD_MOD_DYNAMIC
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       cat >> confdefs.h <<EOF
+#define SLAPD_LDAP $MFLAG
+EOF
 
-          ac_config_files="$ac_config_files servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk"
+fi
 
-          ac_config_files="$ac_config_files servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk"
+if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
+       BUILD_SLAPD=yes
+       BUILD_LDBM=$ol_enable_ldbm
+       if test "$ol_enable_ldbm" = mod ; then
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
+               MFLAG=SLAPD_MOD_DYNAMIC
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       cat >> confdefs.h <<EOF
+#define SLAPD_LDBM $MFLAG
+EOF
 
-          ac_config_files="$ac_config_files servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk"
+fi
 
-          ac_config_files="$ac_config_files servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk"
+if test "$ol_enable_meta" != no ; then
+       BUILD_SLAPD=yes
+       BUILD_META=$ol_enable_meta
+       BUILD_REWRITE=yes
+       if test "$ol_enable_meta" = mod ; then
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
+               MFLAG=SLAPD_MOD_DYNAMIC
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       cat >> confdefs.h <<EOF
+#define SLAPD_META $MFLAG
+EOF
 
-          ac_config_files="$ac_config_files servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in"
+fi
 
-          ac_config_files="$ac_config_files servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk"
+if test "$ol_enable_monitor" != no ; then
+       BUILD_SLAPD=yes
+       BUILD_MONITOR=$ol_enable_monitor
+       if test "$ol_enable_monitor" = mod ; then
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
+               MFLAG=SLAPD_MOD_DYNAMIC
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       cat >> confdefs.h <<EOF
+#define SLAPD_MONITOR $MFLAG
+EOF
 
-          ac_config_files="$ac_config_files tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk"
+fi
 
-          ac_config_files="$ac_config_files tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk"
+if test "$ol_enable_null" != no ; then
+       BUILD_SLAPD=yes
+       BUILD_NULL=$ol_enable_null
+       if test "$ol_enable_null" = mod ; then
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
+               MFLAG=SLAPD_MOD_DYNAMIC
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       cat >> confdefs.h <<EOF
+#define SLAPD_NULL $MFLAG
+EOF
 
+fi
 
-          ac_config_commands="$ac_config_commands time-stamp"
+if test "$ol_enable_passwd" != no ; then
+       BUILD_SLAPD=yes
+       BUILD_PASSWD=$ol_enable_passwd
+       if test "$ol_enable_passwd" = mod ; then
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
+               MFLAG=SLAPD_MOD_DYNAMIC
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       cat >> confdefs.h <<EOF
+#define SLAPD_PASSWD $MFLAG
+EOF
 
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
+fi
 
-_ACEOF
+if test "$ol_link_perl" != no ; then
+       BUILD_SLAPD=yes
+       BUILD_PERL=$ol_enable_perl
+       if test "$ol_enable_perl" = mod ; then
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
+               MFLAG=SLAPD_MOD_DYNAMIC
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       cat >> confdefs.h <<EOF
+#define SLAPD_PERL $MFLAG
+EOF
 
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
-  (set) 2>&1 |
-    case `(ac_space=' '; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
-      sed -n \
-        "s/'/'\\\\''/g;
-         s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;;
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n \
-        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
-      ;;
-    esac;
-} |
-  sed '
-     t clear
-     : clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
-  if test -w $cache_file; then
-    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
-    cat confcache >$cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
 fi
-rm -f confcache
 
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+if test "$ol_enable_shell" != no ; then
+       if test "$ol_link_thread" != no ; then
+               echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
+       fi
+       BUILD_SLAPD=yes
+       BUILD_SHELL=$ol_enable_shell
+       if test "$ol_enable_shell" = mod ; then
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
+               MFLAG=SLAPD_MOD_DYNAMIC
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       cat >> confdefs.h <<EOF
+#define SLAPD_SHELL $MFLAG
+EOF
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[        ]*VPATH[        ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[   ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[     ]*$//;
-}'
 fi
 
-DEFS=-DHAVE_CONFIG_H
+if test "$ol_link_sql" != no ; then
+       BUILD_SLAPD=yes
+       BUILD_SQL=$ol_enable_sql
+       if test "$ol_enable_sql" = mod; then
+               SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
+               MFLAG=SLAPD_MOD_DYNAMIC
+       else
+               SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       cat >> confdefs.h <<EOF
+#define SLAPD_SQL $MFLAG
+EOF
 
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_i=`echo "$ac_i" |
-         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
-  # 2. Add them.
-  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
+fi
 
-LTLIBOBJS=$ac_ltlibobjs
+if test "$ol_enable_dyngroup" != no ; then
+       BUILD_DYNGROUP=$ol_enable_dyngroup
+       if test "$ol_enable_dyngroup" = mod ; then
+               MFLAG=SLAPD_MOD_DYNAMIC
+               SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
+       else
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       cat >> confdefs.h <<EOF
+#define SLAPD_OVER_DYNGROUP $MFLAG
+EOF
 
+fi
 
+if test "$ol_enable_proxycache" != no ; then
+       BUILD_PROXYCACHE=$ol_enable_proxycache
+       if test "$ol_enable_proxycache" = mod ; then
+               MFLAG=SLAPD_MOD_DYNAMIC
+               SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
+       else
+               MFLAG=SLAPD_MOD_STATIC
+       fi
+       cat >> confdefs.h <<EOF
+#define SLAPD_OVER_PROXYCACHE $MFLAG
+EOF
 
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
+fi
 
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
+if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
+       $BUILD_SLAPD = yes ; then
+       BUILD_SLURPD=yes
+fi
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+if test "$ol_enable_rewrite" != no ; then
+       cat >> confdefs.h <<\EOF
+#define ENABLE_REWRITE 1
+EOF
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
+       BUILD_REWRITE=yes
 fi
 
-# Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
+if test "$ol_enable_slapi" != no ; then
+       cat >> confdefs.h <<\EOF
+#define ENABLE_SLAPI 1
+EOF
 
+       BUILD_SLAPI=yes
+       SLAPD_SLAPI_DEPEND=libslapi.a
+fi
 
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
 
-# NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    $as_unset $as_var
-  fi
-done
 
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
+if test "$ac_cv_mingw32" = yes ; then
+       PLAT=NT
+       SLAPD_MODULES_LDFLAGS=
 else
-  as_expr=false
+       PLAT=UNIX
 fi
 
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
-  as_basename=basename
+if test -z "$SLAPD_STATIC_BACKENDS"; then
+       SLAPD_NO_STATIC='#'
 else
-  as_basename=false
+       SLAPD_NO_STATIC=
 fi
 
 
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)$' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-         /^X\/\(\/\/\)$/{ s//\1/; q; }
-         /^X\/\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
 
 
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
 
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-        case $as_dir in
-        /*)
-          if ("$as_dir/$as_base" -c '
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-            CONFIG_SHELL=$as_dir/$as_base
-            export CONFIG_SHELL
-            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-          fi;;
-        esac
-       done
-done
-;;
-  esac
 
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, and appends trailing '-' during
-  # substitution so that $LINENO is not a special case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
-    sed '
-      N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
-      t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
-    ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
-    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensible to this).
-  . ./$as_me.lineno
-  # Exit status is that of the last command.
-  exit
-}
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
 
 
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='     ' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
 
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
 
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
-    as_ln_s='cp -p'
-  else
-    as_ln_s='ln -s'
-  fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
 
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  as_mkdir_p=false
-fi
 
-as_executable_p="test -f"
 
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
 
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS="  $as_nl"
 
-# CDPATH.
-$as_unset CDPATH
 
-exec 6>&1
 
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.  Logging --version etc. is OK.
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
 
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.57.  Invocation command line was
 
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
 
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
 
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
-  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
 
-if test -n "$ac_config_headers"; then
-  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
 
-if test -n "$ac_config_links"; then
-  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
 
-if test -n "$ac_config_commands"; then
-  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
 
-cat >>$CONFIG_STATUS <<\_ACEOF
 
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
 
-Usage: $0 [OPTIONS] [FILE]...
 
-  -h, --help       print this help, then exit
-  -V, --version    print version number, then exit
-  -q, --quiet      do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-  --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
-  --header=FILE[:TEMPLATE]
-                   instantiate the configuration header FILE
 
-Configuration files:
-$config_files
 
-Configuration headers:
-$config_headers
 
-Configuration commands:
-$config_commands
 
-Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
 
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.57,
-  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value.  By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=*)
-    ac_option=`expr "x$1" : 'x\([^=]*\)='`
-    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  -*)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  *) # This is not an option, so the user has probably given explicit
-     # arguments.
-     ac_option=$1
-     ac_need_defaults=false;;
-  esac
 
-  case $ac_option in
-  # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --vers* | -V )
-    echo "$ac_cs_version"; exit 0 ;;
-  --he | --h)
-    # Conflict between --help and --header
-    { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit 0 ;;
-  --debug | --d* | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
-    ac_need_defaults=false;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
 
-  # This is an error.
-  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; } ;;
 
-  *) ac_config_targets="$ac_config_targets $1" ;;
 
-  esac
-  shift
-done
 
-ac_configure_extra_args=
 
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
 
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
-  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
-  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+# Check whether --with-xxinstall or --without-xxinstall was given.
+if test "${with_xxinstall+set}" = set; then
+  withval="$with_xxinstall"
+  :
 fi
 
-_ACEOF
 
 
+trap '' 1 2 15
 
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
 
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
-  case "$ac_config_target" in
-  # Handling of arguments.
-  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
-  "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
-  "doc/man/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
-  "doc/man/man1/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
-  "doc/man/man3/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
-  "doc/man/man5/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
-  "doc/man/man8/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
-  "clients/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
-  "clients/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
-  "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
-  "libraries/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
-  "libraries/libavl/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
-  "libraries/liblber/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
-  "libraries/libldap/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
-  "libraries/libldap_r/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
-  "libraries/libldbm/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
-  "libraries/libldif/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
-  "libraries/liblunicode/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
-  "libraries/liblutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
-  "libraries/librewrite/Makefile" ) CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
-  "servers/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
-  "servers/slapd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
-  "servers/slapd/back-bdb/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk" ;;
-  "servers/slapd/back-dnssrv/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk" ;;
-  "servers/slapd/back-ldap/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk" ;;
-  "servers/slapd/back-ldbm/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk" ;;
-  "servers/slapd/back-meta/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk" ;;
-  "servers/slapd/back-monitor/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk" ;;
-  "servers/slapd/back-null/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk" ;;
-  "servers/slapd/back-passwd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk" ;;
-  "servers/slapd/back-perl/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk" ;;
-  "servers/slapd/back-shell/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk" ;;
-  "servers/slapd/back-sql/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk" ;;
-  "servers/slapd/back-tcl/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk" ;;
-  "servers/slapd/shell-backends/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk" ;;
-  "servers/slapd/slapi/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
-  "servers/slapd/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in" ;;
-  "servers/slurpd/Makefile" ) CONFIG_FILES="$CONFIG_FILES servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk" ;;
-  "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
-  "tests/progs/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
-  "time-stamp" ) CONFIG_COMMANDS="$CONFIG_COMMANDS time-stamp" ;;
-  "include/portable.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h" ;;
-  "include/ldap_features.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h" ;;
-  "include/lber_types.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h" ;;
-  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
-  esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[        ]*VPATH[        ]*=[^:]*$/d'
 fi
 
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=./confstat$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
-{
-   echo "$me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
 
-_ACEOF
+DEFS=-DHAVE_CONFIG_H
 
-cat >>$CONFIG_STATUS <<_ACEOF
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
 
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 #
-# CONFIG_FILES section.
+# $0 $ac_configure_args
 #
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "\
+Makefile:build/top.mk:Makefile.in:build/dir.mk \
+doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
+doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
+doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
+doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
+doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
+doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
+clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
+clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
+include/Makefile:build/top.mk:include/Makefile.in \
+libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk     \
+libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk \
+libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk \
+libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk     \
+libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk \
+libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk       \
+libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
+servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
+servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
+servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
+servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
+servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
+servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
+servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
+servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
+servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
+servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
+servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
+servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
+servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
+servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
+servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
+servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
+servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
+servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
+tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
+tests/run \
+tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
+ include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@install_sh@%$install_sh%g
+s%@AMTAR@%$AMTAR%g
+s%@AWK@%$AWK%g
+s%@AMTARFLAGS@%$AMTARFLAGS%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
+s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
+s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
+s%@top_builddir@%$top_builddir%g
+s%@ldap_subdir@%$ldap_subdir%g
+s%@CC@%$CC%g
+s%@AR@%$AR%g
+s%@LN_S@%$LN_S%g
+s%@OBJEXT@%$OBJEXT%g
+s%@EXEEXT@%$EXEEXT%g
+s%@ECHO@%$ECHO%g
+s%@RANLIB@%$RANLIB%g
+s%@STRIP@%$STRIP%g
+s%@DLLTOOL@%$DLLTOOL%g
+s%@AS@%$AS%g
+s%@OBJDUMP@%$OBJDUMP%g
+s%@CPP@%$CPP%g
+s%@LIBTOOL@%$LIBTOOL%g
+s%@LN_H@%$LN_H%g
+s%@PERLBIN@%$PERLBIN%g
+s%@OL_MKDEP@%$OL_MKDEP%g
+s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
+s%@LTSTATIC@%$LTSTATIC%g
+s%@LIBOBJS@%$LIBOBJS%g
+s%@LIBSRCS@%$LIBSRCS%g
+s%@PLAT@%$PLAT%g
+s%@WITH_TLS@%$WITH_TLS%g
+s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
+s%@BUILD_SLAPD@%$BUILD_SLAPD%g
+s%@BUILD_SLAPI@%$BUILD_SLAPI%g
+s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
+s%@BUILD_BDB@%$BUILD_BDB%g
+s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
+s%@BUILD_HDB@%$BUILD_HDB%g
+s%@BUILD_LDAP@%$BUILD_LDAP%g
+s%@BUILD_LDBM@%$BUILD_LDBM%g
+s%@BUILD_META@%$BUILD_META%g
+s%@BUILD_MONITOR@%$BUILD_MONITOR%g
+s%@BUILD_NULL@%$BUILD_NULL%g
+s%@BUILD_PASSWD@%$BUILD_PASSWD%g
+s%@BUILD_PERL@%$BUILD_PERL%g
+s%@BUILD_SHELL@%$BUILD_SHELL%g
+s%@BUILD_SQL@%$BUILD_SQL%g
+s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
+s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
+s%@BUILD_SLURPD@%$BUILD_SLURPD%g
+s%@LDAP_LIBS@%$LDAP_LIBS%g
+s%@SLAPD_LIBS@%$SLAPD_LIBS%g
+s%@SLURPD_LIBS@%$SLURPD_LIBS%g
+s%@LDBM_LIBS@%$LDBM_LIBS%g
+s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
+s%@LUTIL_LIBS@%$LUTIL_LIBS%g
+s%@WRAP_LIBS@%$WRAP_LIBS%g
+s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
+s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
+s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
+s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
+s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
+s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
+s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
+s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
+s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
+s%@KRB4_LIBS@%$KRB4_LIBS%g
+s%@KRB5_LIBS@%$KRB5_LIBS%g
+s%@SASL_LIBS@%$SASL_LIBS%g
+s%@TLS_LIBS@%$TLS_LIBS%g
+s%@MODULES_LIBS@%$MODULES_LIBS%g
+s%@SLAPI_LIBS@%$SLAPI_LIBS%g
+s%@LIBSLAPI@%$LIBSLAPI%g
+s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
+s%@AUTH_LIBS@%$AUTH_LIBS%g
+s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
+s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
+s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
+s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
 
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
-  # Protect against being on the right side of a sed subst in config.status.
-  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
-   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@target@,$target,;t t
-s,@target_cpu@,$target_cpu,;t t
-s,@target_vendor@,$target_vendor,;t t
-s,@target_os@,$target_os,;t t
-s,@OPENLDAP_PACKAGE@,$OPENLDAP_PACKAGE,;t t
-s,@OPENLDAP_VERSION@,$OPENLDAP_VERSION,;t t
-s,@OPENLDAP_LIBVERSION@,$OPENLDAP_LIBVERSION,;t t
-s,@OPENLDAP_RELEASE_DATE@,$OPENLDAP_RELEASE_DATE,;t t
-s,@top_builddir@,$top_builddir,;t t
-s,@ldap_subdir@,$ldap_subdir,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@CC@,$CC,;t t
-s,@AR@,$AR,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@LN_S@,$LN_S,;t t
-s,@ECHO@,$ECHO,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@STRIP@,$STRIP,;t t
-s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@LIBTOOL@,$LIBTOOL,;t t
-s,@LN_H@,$LN_H,;t t
-s,@PERLBIN@,$PERLBIN,;t t
-s,@OL_MKDEP@,$OL_MKDEP,;t t
-s,@OL_MKDEP_FLAGS@,$OL_MKDEP_FLAGS,;t t
-s,@LTSTATIC@,$LTSTATIC,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@LIBSRCS@,$LIBSRCS,;t t
-s,@PLAT@,$PLAT,;t t
-s,@BUILD_LIBS_DYNAMIC@,$BUILD_LIBS_DYNAMIC,;t t
-s,@BUILD_SLAPD@,$BUILD_SLAPD,;t t
-s,@BUILD_SLAPI@,$BUILD_SLAPI,;t t
-s,@SLAPD_SLAPI_DEPEND@,$SLAPD_SLAPI_DEPEND,;t t
-s,@BUILD_BDB@,$BUILD_BDB,;t t
-s,@BUILD_DNSSRV@,$BUILD_DNSSRV,;t t
-s,@BUILD_LDAP@,$BUILD_LDAP,;t t
-s,@BUILD_LDBM@,$BUILD_LDBM,;t t
-s,@BUILD_META@,$BUILD_META,;t t
-s,@BUILD_MONITOR@,$BUILD_MONITOR,;t t
-s,@BUILD_NULL@,$BUILD_NULL,;t t
-s,@BUILD_PASSWD@,$BUILD_PASSWD,;t t
-s,@BUILD_PERL@,$BUILD_PERL,;t t
-s,@BUILD_SHELL@,$BUILD_SHELL,;t t
-s,@BUILD_SQL@,$BUILD_SQL,;t t
-s,@BUILD_TCL@,$BUILD_TCL,;t t
-s,@BUILD_BDB_DYNAMIC@,$BUILD_BDB_DYNAMIC,;t t
-s,@BUILD_DNSSRV_DYNAMIC@,$BUILD_DNSSRV_DYNAMIC,;t t
-s,@BUILD_LDAP_DYNAMIC@,$BUILD_LDAP_DYNAMIC,;t t
-s,@BUILD_LDBM_DYNAMIC@,$BUILD_LDBM_DYNAMIC,;t t
-s,@BUILD_META_DYNAMIC@,$BUILD_META_DYNAMIC,;t t
-s,@BUILD_MONITOR_DYNAMIC@,$BUILD_MONITOR_DYNAMIC,;t t
-s,@BUILD_NULL_DYNAMIC@,$BUILD_NULL_DYNAMIC,;t t
-s,@BUILD_PASSWD_DYNAMIC@,$BUILD_PASSWD_DYNAMIC,;t t
-s,@BUILD_PERL_DYNAMIC@,$BUILD_PERL_DYNAMIC,;t t
-s,@BUILD_SHELL_DYNAMIC@,$BUILD_SHELL_DYNAMIC,;t t
-s,@BUILD_SQL_DYNAMIC@,$BUILD_SQL_DYNAMIC,;t t
-s,@BUILD_TCL_DYNAMIC@,$BUILD_TCL_DYNAMIC,;t t
-s,@BUILD_SLURPD@,$BUILD_SLURPD,;t t
-s,@LDAP_LIBS@,$LDAP_LIBS,;t t
-s,@LDIF_LIBS@,$LDIF_LIBS,;t t
-s,@SLAPD_LIBS@,$SLAPD_LIBS,;t t
-s,@SLURPD_LIBS@,$SLURPD_LIBS,;t t
-s,@LDBM_LIBS@,$LDBM_LIBS,;t t
-s,@LTHREAD_LIBS@,$LTHREAD_LIBS,;t t
-s,@LUTIL_LIBS@,$LUTIL_LIBS,;t t
-s,@WRAP_LIBS@,$WRAP_LIBS,;t t
-s,@MOD_TCL_LIB@,$MOD_TCL_LIB,;t t
-s,@SLAPD_MODULES_CPPFLAGS@,$SLAPD_MODULES_CPPFLAGS,;t t
-s,@SLAPD_MODULES_LDFLAGS@,$SLAPD_MODULES_LDFLAGS,;t t
-s,@SLAPD_NO_STATIC@,$SLAPD_NO_STATIC,;t t
-s,@SLAPD_STATIC_BACKENDS@,$SLAPD_STATIC_BACKENDS,;t t
-s,@SLAPD_DYNAMIC_BACKENDS@,$SLAPD_DYNAMIC_BACKENDS,;t t
-s,@PERL_CPPFLAGS@,$PERL_CPPFLAGS,;t t
-s,@SLAPD_PERL_LDFLAGS@,$SLAPD_PERL_LDFLAGS,;t t
-s,@MOD_PERL_LDFLAGS@,$MOD_PERL_LDFLAGS,;t t
-s,@KRB4_LIBS@,$KRB4_LIBS,;t t
-s,@KRB5_LIBS@,$KRB5_LIBS,;t t
-s,@READLINE_LIBS@,$READLINE_LIBS,;t t
-s,@SASL_LIBS@,$SASL_LIBS,;t t
-s,@TERMCAP_LIBS@,$TERMCAP_LIBS,;t t
-s,@TLS_LIBS@,$TLS_LIBS,;t t
-s,@MODULES_LIBS@,$MODULES_LIBS,;t t
-s,@SLAPI_LIBS@,$SLAPI_LIBS,;t t
-s,@LIBSLAPI@,$LIBSLAPI,;t t
-s,@LIBSLAPITOOLS@,$LIBSLAPITOOLS,;t t
-s,@AUTH_LIBS@,$AUTH_LIBS,;t t
-s,@SLAPD_SLP_LIBS@,$SLAPD_SLP_LIBS,;t t
-s,@SLAPD_SQL_LDFLAGS@,$SLAPD_SQL_LDFLAGS,;t t
-s,@SLAPD_SQL_LIBS@,$SLAPD_SQL_LIBS,;t t
-s,@SLAPD_SQL_INCLUDES@,$SLAPD_SQL_INCLUDES,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
 CEOF
+EOF
 
-_ACEOF
-
-  cat >>$CONFIG_STATUS <<\_ACEOF
-  # Split the substitutions into bite-sized pieces for seds with
-  # small command number limits, like on Digital OSF/1 and HP-UX.
-  ac_max_sed_lines=48
-  ac_sed_frag=1 # Number of current file.
-  ac_beg=1 # First line for current file.
-  ac_end=$ac_max_sed_lines # Line after last line for current file.
-  ac_more_lines=:
-  ac_sed_cmds=
-  while $ac_more_lines; do
-    if test $ac_beg -gt 1; then
-      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    else
-      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    fi
-    if test ! -s $tmp/subs.frag; then
-      ac_more_lines=false
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
     else
-      # The purpose of the label and of the branching condition is to
-      # speed up the sed processing (if there are no `@' at all, there
-      # is no need to browse any of the substitutions).
-      # These are the two extra sed commands mentioned above.
-      (echo ':t
-  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
-      if test -z "$ac_sed_cmds"; then
-       ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
-      else
-       ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
-      fi
-      ac_sed_frag=`expr $ac_sed_frag + 1`
-      ac_beg=$ac_end
-      ac_end=`expr $ac_end + $ac_max_sed_lines`
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
     fi
-  done
-  if test -z "$ac_sed_cmds"; then
-    ac_sed_cmds=cat
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
   fi
-fi # test -n "$CONFIG_FILES"
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
 
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"\
+Makefile:build/top.mk:Makefile.in:build/dir.mk \
+doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
+doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
+doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
+doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
+doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
+doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
+clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
+clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
+include/Makefile:build/top.mk:include/Makefile.in \
+libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk     \
+libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk \
+libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk \
+libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk     \
+libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk \
+libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk       \
+libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
+servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
+servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
+servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
+servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
+servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
+servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
+servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
+servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
+servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
+servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
+servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
+servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
+servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
+servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
+servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
+servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
+servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
+servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
+tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
+tests/run \
+tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
+"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-        cat >$tmp/stdin
-        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
   esac
 
-  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
-  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$ac_file" : 'X\(//\)[^/]' \| \
-         X"$ac_file" : 'X\(//\)$' \| \
-         X"$ac_file" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-  { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$as_dir" : 'X\(//\)[^/]' \| \
-         X"$as_dir" : 'X\(//\)$' \| \
-         X"$as_dir" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
-
-  ac_builddir=.
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
 
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
 
-case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
-    ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
   *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
-
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
   esac
 
-  if test x"$ac_file" != x-; then
-    { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    rm -f "$ac_file"
-  fi
-  # Let's still pretend it is `configure' which instantiates (i.e., don't
-  # use $as_me), people would be surprised to read:
-  #    /* config.h.  Generated by config.status.  */
-  if test x"$ac_file" = x-; then
-    configure_input=
-  else
-    configure_input="$ac_file.  "
-  fi
-  configure_input=$configure_input"Generated from `echo $ac_file_in |
-                                     sed 's,.*/,,'` by configure."
-
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-         # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-         echo $f;;
-      *) # Relative
-         if test -f "$f"; then
-           # Build tree
-           echo $f
-         elif test -f "$srcdir/$f"; then
-           # Source tree
-           echo $srcdir/$f
-         else
-           # /dev/null tree
-           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-         fi;;
-      esac
-    done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-  sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
-  rm -f $tmp/stdin
-  if test x"$ac_file" != x-; then
-    mv $tmp/out $ac_file
-  else
-    cat $tmp/out
-    rm -f $tmp/out
-  fi
+  case "$ac_given_INSTALL" in
+  [/$]*) INSTALL="$ac_given_INSTALL" ;;
+  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+  esac
 
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *[Mm]akefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
 
-#
-# CONFIG_HEADER section.
-#
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
 
 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
 # NAME is the cpp macro being defined and VALUE is the value it is being given.
 #
 # ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([  ]*\)#\([        ]*define[       ][      ]*\)'
-ac_dB='[       ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
-ac_uB='$,\1#\2define\3'
+ac_dA='s%^\([  ]*\)#\([        ]*define[       ][      ]*\)'
+ac_dB='\([     ][      ]*\)[^  ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ac_uB='\([     ]\)%\1#\2define\3'
 ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+  CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-        cat >$tmp/stdin
-        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
   esac
 
-  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-         # Absolute (can't be DOS-style, as IFS=:)
-         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-         echo $f;;
-      *) # Relative
-         if test -f "$f"; then
-           # Build tree
-           echo $f
-         elif test -f "$srcdir/$f"; then
-           # Source tree
-           echo $srcdir/$f
-         else
-           # /dev/null tree
-           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-         fi;;
-      esac
-    done` || { (exit 1); exit 1; }
-  # Remove the trailing spaces.
-  sed 's/[     ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h.  The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status.  Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[   ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[   ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless.  Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
+  echo creating $ac_file
+
+  rm -f conftest.frag conftest.in conftest.out
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h.  And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
 
 # This sed command replaces #undef with comments.  This is necessary, for
 # example, in the case of _POSIX_SOURCE, which is predefined and required
 # on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
-s,^[   ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo '  if grep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo '  :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
-  # Write a limited-size here document to $tmp/defines.sed.
-  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#define' lines.
-  echo '/^[    ]*#[    ]*define/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
-  echo 'CEOF
-  sed -f $tmp/defines.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
-  rm -f conftest.defines
-  mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo '  fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
+cat >> conftest.vals <<\EOF
+s%^[   ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
 
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
 rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
+while :
 do
-  # Write a limited-size here document to $tmp/undefs.sed.
-  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#undef'
-  echo '/^[    ]*#[    ]*undef/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  ac_lines=`grep -c . conftest.vals`
+  # grep -c gives empty output for an empty file on some AIX systems.
+  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+  # Write a limited-size here document to conftest.frag.
+  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
   echo 'CEOF
-  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
-  rm -f conftest.undefs
-  mv conftest.tail conftest.undefs
+  sed -f conftest.frag conftest.in > conftest.out
+  rm -f conftest.in
+  mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+  rm -f conftest.vals
+  mv conftest.tail conftest.vals
 done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-  # Let's still pretend it is `configure' which instantiates (i.e., don't
-  # use $as_me), people would be surprised to read:
-  #    /* config.h.  Generated by config.status.  */
-  if test x"$ac_file" = x-; then
-    echo "/* Generated by configure.  */" >$tmp/config.h
-  else
-    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
-  fi
-  cat $tmp/in >>$tmp/config.h
-  rm -f $tmp/in
-  if test x"$ac_file" != x-; then
-    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
-      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$ac_file" : 'X\(//\)[^/]' \| \
-         X"$ac_file" : 'X\(//\)$' \| \
-         X"$ac_file" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-      { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+  rm -f conftest.frag conftest.h
+  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
+  cat conftest.in >> conftest.h
+  rm -f conftest.in
+  if cmp -s $ac_file conftest.h 2>/dev/null; then
+    echo "$ac_file is unchanged"
+    rm -f conftest.h
   else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$as_dir" : 'X\(//\)[^/]' \| \
-         X"$as_dir" : 'X\(//\)$' \| \
-         X"$as_dir" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
-
-      rm -f $ac_file
-      mv $tmp/config.h $ac_file
+    # Remove last slash and all that follows it.  Not all systems have dirname.
+      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+      # The file is in a subdirectory.
+      test ! -d "$ac_dir" && mkdir "$ac_dir"
     fi
-  else
-    cat $tmp/config.h
-    rm -f $tmp/config.h
+    rm -f $ac_file
+    mv conftest.h $ac_file
   fi
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+fi; done
 
-#
-# CONFIG_COMMANDS section.
-#
-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
-  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
-  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
-  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-         X"$ac_dest" : 'X\(//\)[^/]' \| \
-         X"$ac_dest" : 'X\(//\)$' \| \
-         X"$ac_dest" : 'X\(/\)' \| \
-         .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-  ac_builddir=.
-
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
-    ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
-
-
-  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
-echo "$as_me: executing $ac_dest commands" >&6;}
-  case $ac_dest in
-    time-stamp ) date >stamp-h
-echo Please run \"make depend\" to build dependencies ;;
-  esac
-done
-_ACEOF
+EOF
+cat >> $CONFIG_STATUS <<EOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+chmod +x tests/run
+date > stamp-h
+echo Please run \"make depend\" to build dependencies
 
-{ (exit 0); exit 0; }
-_ACEOF
+exit 0
+EOF
 chmod +x $CONFIG_STATUS
-ac_clean_files=$ac_clean_files_save
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || { (exit 1); exit 1; }
-fi
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1