From 14c7c8f3579a8c0a802aaac72841efed3d01445f Mon Sep 17 00:00:00 2001
From: zhangqiumiao <zhangqiumiao1@huawei.com>
Date: Sun, 27 Sep 2020 14:25:21 +0800
Subject: [PATCH] backport ITS#9010 regenerate configure

---
 configure | 1565 +++++------------------------------------------------
 1 file changed, 148 insertions(+), 1417 deletions(-)

diff --git a/configure b/configure
index 5f05f1c..5c5097a 100755
--- a/configure
+++ b/configure
@@ -667,7 +667,6 @@ LUTIL_LIBS
 LTHREAD_LIBS
 SLAPD_NDB_INCS
 SLAPD_NDB_LIBS
-BDB_LIBS
 SLAPD_LIBS
 LDAP_LIBS
 BUILD_VALSORT
@@ -704,9 +703,7 @@ BUILD_MONITOR
 BUILD_META
 BUILD_MDB
 BUILD_LDAP
-BUILD_HDB
 BUILD_DNSSRV
-BUILD_BDB
 SLAPD_SLAPI_DEPEND
 BUILD_SLAPI
 BUILD_SLAPD
@@ -764,6 +761,7 @@ DLLTOOL
 AS
 AR
 CC
+moduledir
 ldap_subdir
 top_builddir
 OPENLDAP_RELEASE_DATE
@@ -852,6 +850,7 @@ ac_user_opts='
 enable_option_checking
 enable_silent_rules
 with_subdir
+with_moduledir
 enable_debug
 enable_dynamic
 enable_syslog
@@ -881,9 +880,7 @@ enable_slp
 enable_wrappers
 enable_xxslapbackends
 enable_backends
-enable_bdb
 enable_dnssrv
-enable_hdb
 enable_ldap
 enable_mdb
 enable_meta
@@ -1583,9 +1580,7 @@ SLAPD (Standalone LDAP Daemon) Options:
 
 SLAPD Backend Options:
     --enable-backends	  enable all available backends no|yes|mod
-    --enable-bdb	  enable Berkeley DB backend no|yes|mod [yes]
     --enable-dnssrv	  enable dnssrv backend no|yes|mod [no]
-    --enable-hdb	  enable Hierarchical DB backend no|yes|mod [yes]
     --enable-ldap	  enable ldap backend no|yes|mod [no]
     --enable-mdb	  enable mdb database backend no|yes|mod [yes]
     --enable-meta	  enable metadirectory backend no|yes|mod [no]
@@ -1637,6 +1632,7 @@ 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-moduledir=DIR    change default module subdirectory used for installs
   --with-cyrus-sasl	  with Cyrus SASL support [auto]
   --with-fetch		  with fetch(3) URL support [auto]
   --with-threads	  with threads [auto]
@@ -3570,6 +3566,24 @@ esac
 fi
 
 
+
+moduledir="openldap"
+
+
+# Check whether --with-moduledir was given.
+if test "${with_moduledir+set}" = set; then :
+  withval=$with_moduledir; case "$withval" in
+	no) moduledir=""
+		;;
+	yes)
+		;;
+	*)
+		moduledir="$withval"
+		;;
+esac
+
+fi
+
 # OpenLDAP --enable-debug
 
 	# Check whether --enable-debug was given.
@@ -4126,9 +4140,7 @@ fi
 
 # end --enable-wrappers
 
-Backends="bdb \
-	dnssrv \
-	hdb \
+Backends="dnssrv \
 	ldap \
 	mdb \
 	meta \
@@ -4167,27 +4179,6 @@ if test "${enable_backends+set}" = set; then :
 fi
 
 # end --enable-backends
-# OpenLDAP --enable-bdb
-
-	# Check whether --enable-bdb was given.
-if test "${enable_bdb+set}" = set; then :
-  enableval=$enable_bdb;
-	ol_arg=invalid
-	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
-		as_fn_error $? "bad value $enableval for --enable-bdb" "$LINENO" 5
-	fi
-	ol_enable_bdb="$ol_arg"
-
-else
-  	ol_enable_bdb=${ol_enable_backends:-yes}
-fi
-
-# end --enable-bdb
 # OpenLDAP --enable-dnssrv
 
 	# Check whether --enable-dnssrv was given.
@@ -4209,27 +4200,6 @@ else
 fi
 
 # end --enable-dnssrv
-# OpenLDAP --enable-hdb
-
-	# Check whether --enable-hdb was given.
-if test "${enable_hdb+set}" = set; then :
-  enableval=$enable_hdb;
-	ol_arg=invalid
-	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
-		as_fn_error $? "bad value $enableval for --enable-hdb" "$LINENO" 5
-	fi
-	ol_enable_hdb="$ol_arg"
-
-else
-  	ol_enable_hdb=${ol_enable_backends:-yes}
-fi
-
-# end --enable-hdb
 # OpenLDAP --enable-ldap
 
 	# Check whether --enable-ldap was given.
@@ -5108,9 +5078,7 @@ $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
 	ol_enable_rewrite=no
 
 elif test $ol_enable_modules != yes &&
-	test $ol_enable_bdb = no &&
 	test $ol_enable_dnssrv = no &&
-	test $ol_enable_hdb = no &&
 	test $ol_enable_ldap = no &&
 	test $ol_enable_mdb = no &&
 	test $ol_enable_meta = no &&
@@ -5150,11 +5118,22 @@ if test $ol_enable_spasswd = yes ; then
 	ol_with_cyrus_sasl=yes
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
 $as_echo "done" >&6; }
 
+case $moduledir in
+	/*|\\*)
+		;;
+	*)
+		moduledir=$libexecdir/$moduledir
+		;;
+esac
+
+
+
+
 LDAP_LIBS=
-BDB_LIBS=
 SLAPD_NDB_LIBS=
 SLAPD_NDB_INCS=
 LTHREAD_LIBS=
@@ -5169,9 +5148,7 @@ BUILD_THREAD=no
 BUILD_SLAPI=no
 SLAPD_SLAPI_DEPEND=
 
-BUILD_BDB=no
 BUILD_DNSSRV=no
-BUILD_HDB=no
 BUILD_LDAP=no
 BUILD_MDB=no
 BUILD_META=no
@@ -22937,1388 +22914,178 @@ else
  	ol_cv_func_gethostbyaddr_r_nargs=0
 fi
 
-ol_link_bdb=no
 
-if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
-	ol_cv_berkeley_db=no
-for ac_header in db.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default"
-if test "x$ac_cv_header_db_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_DB_H 1
-_ACEOF
-
-fi
-
-done
-
-if test $ac_cv_header_db_h = yes; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB major version in db.h" >&5
-$as_echo_n "checking for Berkeley DB major version in db.h... " >&6; }
-if ${ol_cv_bdb_major+:} false; then :
-  $as_echo_n "(cached) " >&6
+if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
+	BUILD_LIBS_DYNAMIC=shared
+	$as_echo "#define LDAP_LIBS_DYNAMIC 1" >>confdefs.h
+	LTSTATIC=""
 else
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <db.h>
-#ifndef DB_VERSION_MAJOR
-#	define DB_VERSION_MAJOR 1
-#endif
-__db_version DB_VERSION_MAJOR
-
-_ACEOF
-	set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none
-	ol_cv_bdb_major=${3}
-
+	BUILD_LIBS_DYNAMIC=static
+	LTSTATIC="-static"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_major" >&5
-$as_echo "$ol_cv_bdb_major" >&6; }
-case $ol_cv_bdb_major in [1-9]*) : ;; *)
-	as_fn_error $? "Unknown Berkeley DB major version in db.h" "$LINENO" 5 ;;
-esac
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB minor version in db.h" >&5
-$as_echo_n "checking for Berkeley DB minor version in db.h... " >&6; }
-if ${ol_cv_bdb_minor+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <db.h>
-#ifndef DB_VERSION_MINOR
-#	define DB_VERSION_MINOR 0
-#endif
-__db_version DB_VERSION_MINOR
 
+if test $ol_enable_wrappers != no ; then
+	for ac_header in tcpd.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default"
+if test "x$ac_cv_header_tcpd_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_TCPD_H 1
 _ACEOF
-	set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none
-	ol_cv_bdb_minor=${3}
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_minor" >&5
-$as_echo "$ol_cv_bdb_minor" >&6; }
-case $ol_cv_bdb_minor in [0-9]*) : ;; *)
-	as_fn_error $? "Unknown Berkeley DB minor version in db.h" "$LINENO" 5 ;;
-esac
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Berkeley DB version supported by BDB/HDB backends" >&5
-$as_echo_n "checking if Berkeley DB version supported by BDB/HDB backends... " >&6; }
-if ${ol_cv_bdb_compat+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library" >&5
+$as_echo_n "checking for TCP wrappers library... " >&6; }
+		save_LIBS="$LIBS"
+		LIBS="$LIBS -lwrap"
+		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <db.h>
+#include <tcpd.h>
+int allow_severity = 0;
+int deny_severity  = 0;
 
- /* 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
-#ifndef DB_VERSION_PATCH
-#      define DB_VERSION_PATCH 0
-#endif
+struct request_info *req;
 
-#define DB_VERSION_FULL        ((DB_VERSION_MAJOR<<16)|(DB_VERSION_MINOR<<8)|DB_VERSION_PATCH)
+int
+main ()
+{
 
-/* require 4.4 or later, but less than 6.0.20 */
-#if DB_VERSION_FULL >= 0x040400 && DB_VERSION_FULL < 0x060014
-	__db_version_compat
-#endif
-#if DB_VERSION_FULL >= 0x060014
-#error "BerkeleyDB 6.0.20+ license is incompatible with LDAP"
-#endif
+hosts_access(req)
 
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "__db_version_compat" >/dev/null 2>&1; then :
-  ol_cv_bdb_compat=yes
-else
-  ol_cv_bdb_compat=no
-fi
-rm -f conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_compat" >&5
-$as_echo "$ol_cv_bdb_compat" >&6; }
-
-
-	if test $ol_cv_bdb_compat != yes ; then
-		as_fn_error $? "BerkeleyDB version incompatible with BDB/HDB backends" "$LINENO" 5
-	fi
-
-	ol_cv_lib_db=no
-
-if test $ol_cv_bdb_major = 5 ; then
-	if test $ol_cv_lib_db = no ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)" >&5
-$as_echo_n "checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)... " >&6; }
-if ${ol_cv_db_db_5_dot_m+:} false; then :
-  $as_echo_n "(cached) " >&6
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap" >&5
+$as_echo "-lwrap" >&6; }
+		have_wrappers=yes
+		LIBS="$save_LIBS"
 else
-
-	ol_DB_LIB=-ldb-5.$ol_cv_bdb_minor
-	ol_LIBS=$LIBS
-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+				LIBS="$LIBS -lnsl"
+		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end 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
+#include <tcpd.h>
+int allow_severity = 0;
+int deny_severity  = 0;
 
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
+struct request_info *req;
 
 int
 main ()
 {
 
-#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
+hosts_access(req)
 
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ol_cv_db_db_5_dot_m=yes
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap -lnsl" >&5
+$as_echo "-lwrap -lnsl" >&6; }
+		have_wrappers=yes
+		LIBS="$save_LIBS -lnsl"
 else
-  ol_cv_db_db_5_dot_m=no
+  
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		have_wrappers=no
+		LIBS=$save_LIBS
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-
-	LIBS="$ol_LIBS"
-
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_dot_m" >&5
-$as_echo "$ol_cv_db_db_5_dot_m" >&6; }
-
-	if test $ol_cv_db_db_5_dot_m = yes ; then
-		ol_cv_lib_db=-ldb-5.$ol_cv_bdb_minor
-	fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+else
+  have_wrappers=no
 fi
 
-	if test $ol_cv_lib_db = no ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)" >&5
-$as_echo_n "checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)... " >&6; }
-if ${ol_cv_db_db5m+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+done
 
-	ol_DB_LIB=-ldb5$ol_cv_bdb_minor
-	ol_LIBS=$LIBS
-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
 
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+	if test $have_wrappers = yes ; then
 
-#ifdef HAVE_DB_185_H
-# include <db_185.h>
-#else
-# include <db.h>
-#endif
+$as_echo "#define HAVE_TCPD 1" >>confdefs.h
 
-#ifndef DB_VERSION_MAJOR
-# define DB_VERSION_MAJOR 1
-#endif
+		WRAP_LIBS="-lwrap"
+	elif test $ol_enable_wrappers = yes ; then
+		as_fn_error "could not find TCP wrappers, select appropriate options or disable" "$LINENO" 5
+	else
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find TCP wrappers, support disabled" >&5
+$as_echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
+		WRAP_LIBS=""
+	fi
+fi
 
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
+if test $ol_enable_syslog != no ; then
+	ac_fn_c_check_func "$LINENO" "openlog" "ac_cv_func_openlog"
+if test "x$ac_cv_func_openlog" = x""yes; then :
 
-int
-main ()
-{
+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 $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
+		{ as_fn_set_status select appropriate options or disable
+as_fn_error "could not find syslog" "$LINENO" 5; }
+	fi
+	ol_enable_syslog=$ac_cv_func_openlog
+fi
 
-  ;
-  return 0;
-}
+ol_link_sql=no
+if test $ol_enable_sql != no ; then
+	for ac_header in sql.h sqlext.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ol_cv_db_db5m=yes
+
 else
-  ol_cv_db_db5m=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
 
-	LIBS="$ol_LIBS"
+	as_fn_error "could not locate SQL headers" "$LINENO" 5
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5m" >&5
-$as_echo "$ol_cv_db_db5m" >&6; }
 
-	if test $ol_cv_db_db5m = yes ; then
-		ol_cv_lib_db=-ldb5$ol_cv_bdb_minor
+done
+
+
+	sql_LIBS="$LIBS"
+	LIBS="$LTHREAD_LIBS $LIBS"
+
+	if test $ol_with_odbc = auto ; then
+		ol_with_odbc="iodbc unixodbc odbc32"
 	fi
-fi
 
-	if test $ol_cv_lib_db = no ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)" >&5
-$as_echo_n "checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)... " >&6; }
-if ${ol_cv_db_db_5m+:} false; then :
+	for odbc in $ol_with_odbc ; do
+		if test $ol_link_sql = no ; then
+			case $odbc in
+			iodbc)
+				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -liodbc" >&5
+$as_echo_n "checking for SQLDriverConnect in -liodbc... " >&6; }
+if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-
-	ol_DB_LIB=-ldb-5$ol_cv_bdb_minor
-	ol_LIBS=$LIBS
-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-liodbc  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end 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
-
-#ifndef NULL
-#define NULL ((void*)0)
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
-
+char SQLDriverConnect ();
 int
 main ()
 {
-
-#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;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ol_cv_db_db_5m=yes
-else
-  ol_cv_db_db_5m=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-	LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5m" >&5
-$as_echo "$ol_cv_db_db_5m" >&6; }
-
-	if test $ol_cv_db_db_5m = yes ; then
-		ol_cv_lib_db=-ldb-5$ol_cv_bdb_minor
-	fi
-fi
-
-	if test $ol_cv_lib_db = no ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)" >&5
-$as_echo_n "checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)... " >&6; }
-if ${ol_cv_db_db_5_m+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	ol_DB_LIB=-ldb-5-$ol_cv_bdb_minor
-	ol_LIBS=$LIBS
-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end 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
-
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
-
-int
-main ()
-{
-
-#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;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ol_cv_db_db_5_m=yes
-else
-  ol_cv_db_db_5_m=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-	LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_m" >&5
-$as_echo "$ol_cv_db_db_5_m" >&6; }
-
-	if test $ol_cv_db_db_5_m = yes ; then
-		ol_cv_lib_db=-ldb-5-$ol_cv_bdb_minor
-	fi
-fi
-
-	if test $ol_cv_lib_db = no ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5)" >&5
-$as_echo_n "checking for Berkeley DB link (-ldb-5)... " >&6; }
-if ${ol_cv_db_db_5+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	ol_DB_LIB=-ldb-5
-	ol_LIBS=$LIBS
-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end 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
-
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
-
-int
-main ()
-{
-
-#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;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ol_cv_db_db_5=yes
-else
-  ol_cv_db_db_5=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-	LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5" >&5
-$as_echo "$ol_cv_db_db_5" >&6; }
-
-	if test $ol_cv_db_db_5 = yes ; then
-		ol_cv_lib_db=-ldb-5
-	fi
-fi
-
-	if test $ol_cv_lib_db = no ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5)" >&5
-$as_echo_n "checking for Berkeley DB link (-ldb5)... " >&6; }
-if ${ol_cv_db_db5+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	ol_DB_LIB=-ldb5
-	ol_LIBS=$LIBS
-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end 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
-
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
-
-int
-main ()
-{
-
-#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;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ol_cv_db_db5=yes
-else
-  ol_cv_db_db5=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-	LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5" >&5
-$as_echo "$ol_cv_db_db5" >&6; }
-
-	if test $ol_cv_db_db5 = yes ; then
-		ol_cv_lib_db=-ldb5
-	fi
-fi
-
-elif test $ol_cv_bdb_major = 4 ; then
-	if test $ol_cv_lib_db = no ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)" >&5
-$as_echo_n "checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)... " >&6; }
-if ${ol_cv_db_db_4_dot_m+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	ol_DB_LIB=-ldb-4.$ol_cv_bdb_minor
-	ol_LIBS=$LIBS
-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end 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
-
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
-
-int
-main ()
-{
-
-#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;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ol_cv_db_db_4_dot_m=yes
-else
-  ol_cv_db_db_4_dot_m=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-	LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_dot_m" >&5
-$as_echo "$ol_cv_db_db_4_dot_m" >&6; }
-
-	if test $ol_cv_db_db_4_dot_m = yes ; then
-		ol_cv_lib_db=-ldb-4.$ol_cv_bdb_minor
-	fi
-fi
-
-	if test $ol_cv_lib_db = no ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)" >&5
-$as_echo_n "checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)... " >&6; }
-if ${ol_cv_db_db4m+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	ol_DB_LIB=-ldb4$ol_cv_bdb_minor
-	ol_LIBS=$LIBS
-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end 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
-
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
-
-int
-main ()
-{
-
-#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;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ol_cv_db_db4m=yes
-else
-  ol_cv_db_db4m=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-	LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4m" >&5
-$as_echo "$ol_cv_db_db4m" >&6; }
-
-	if test $ol_cv_db_db4m = yes ; then
-		ol_cv_lib_db=-ldb4$ol_cv_bdb_minor
-	fi
-fi
-
-	if test $ol_cv_lib_db = no ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)" >&5
-$as_echo_n "checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)... " >&6; }
-if ${ol_cv_db_db_4m+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	ol_DB_LIB=-ldb-4$ol_cv_bdb_minor
-	ol_LIBS=$LIBS
-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end 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
-
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
-
-int
-main ()
-{
-
-#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;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ol_cv_db_db_4m=yes
-else
-  ol_cv_db_db_4m=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-	LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4m" >&5
-$as_echo "$ol_cv_db_db_4m" >&6; }
-
-	if test $ol_cv_db_db_4m = yes ; then
-		ol_cv_lib_db=-ldb-4$ol_cv_bdb_minor
-	fi
-fi
-
-	if test $ol_cv_lib_db = no ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)" >&5
-$as_echo_n "checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)... " >&6; }
-if ${ol_cv_db_db_4_m+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	ol_DB_LIB=-ldb-4-$ol_cv_bdb_minor
-	ol_LIBS=$LIBS
-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end 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
-
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
-
-int
-main ()
-{
-
-#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;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ol_cv_db_db_4_m=yes
-else
-  ol_cv_db_db_4_m=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-	LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_m" >&5
-$as_echo "$ol_cv_db_db_4_m" >&6; }
-
-	if test $ol_cv_db_db_4_m = yes ; then
-		ol_cv_lib_db=-ldb-4-$ol_cv_bdb_minor
-	fi
-fi
-
-	if test $ol_cv_lib_db = no ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4)" >&5
-$as_echo_n "checking for Berkeley DB link (-ldb-4)... " >&6; }
-if ${ol_cv_db_db_4+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	ol_DB_LIB=-ldb-4
-	ol_LIBS=$LIBS
-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end 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
-
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
-
-int
-main ()
-{
-
-#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;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ol_cv_db_db_4=yes
-else
-  ol_cv_db_db_4=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-	LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4" >&5
-$as_echo "$ol_cv_db_db_4" >&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
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4)" >&5
-$as_echo_n "checking for Berkeley DB link (-ldb4)... " >&6; }
-if ${ol_cv_db_db4+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	ol_DB_LIB=-ldb4
-	ol_LIBS=$LIBS
-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end 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
-
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
-
-int
-main ()
-{
-
-#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;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ol_cv_db_db4=yes
-else
-  ol_cv_db_db4=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-	LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4" >&5
-$as_echo "$ol_cv_db_db4" >&6; }
-
-	if test $ol_cv_db_db4 = yes ; then
-		ol_cv_lib_db=-ldb4
-	fi
-fi
-
-fi
-if test $ol_cv_lib_db = no ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb)" >&5
-$as_echo_n "checking for Berkeley DB link (-ldb)... " >&6; }
-if ${ol_cv_db_db+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	ol_DB_LIB=-ldb
-	ol_LIBS=$LIBS
-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end 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
-
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
-
-int
-main ()
-{
-
-#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;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ol_cv_db_db=yes
-else
-  ol_cv_db_db=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-	LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db" >&5
-$as_echo "$ol_cv_db_db" >&6; }
-
-	if test $ol_cv_db_db = yes ; then
-		ol_cv_lib_db=-ldb
-	fi
-fi
-
-if test $ol_cv_lib_db = no ; then
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (default)" >&5
-$as_echo_n "checking for Berkeley DB link (default)... " >&6; }
-if ${ol_cv_db_none+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	ol_DB_LIB=
-	ol_LIBS=$LIBS
-	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
-
-	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end 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
-
-#ifndef NULL
-#define NULL ((void*)0)
-#endif
-
-int
-main ()
-{
-
-#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;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ol_cv_db_none=yes
-else
-  ol_cv_db_none=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
-	LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_none" >&5
-$as_echo "$ol_cv_db_none" >&6; }
-
-	if test $ol_cv_db_none = yes ; then
-		ol_cv_lib_db=yes
-	fi
-fi
-
-
-	if test "$ol_cv_lib_db" != no ; then
-		ol_cv_berkeley_db=yes
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB library and header version match" >&5
-$as_echo_n "checking for Berkeley DB library and header version match... " >&6; }
-if ${ol_cv_berkeley_db_version+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	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_version=cross
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef HAVE_DB_185_H
-	choke me;
-#else
-#include <db.h>
-#endif
-#ifndef DB_VERSION_MAJOR
-# define DB_VERSION_MAJOR 1
-#endif
-#ifndef NULL
-#define NULL ((void *)0)
-#endif
-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 ||
-		patch != DB_VERSION_PATCH )
-	{
-		printf("Berkeley DB version mismatch\n"
-			"\theader: %s\n\tlibrary: %s\n",
-			DB_VERSION_STRING, version);
-		return 1;
-	}
-#endif
-
-	return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ol_cv_berkeley_db_version=yes
-else
-  ol_cv_berkeley_db_version=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-	LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_version" >&5
-$as_echo "$ol_cv_berkeley_db_version" >&6; }
-
-	if test $ol_cv_berkeley_db_version = no ; then
-		as_fn_error $? "Berkeley DB version mismatch" "$LINENO" 5
-	fi
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB thread support" >&5
-$as_echo_n "checking for Berkeley DB thread support... " >&6; }
-if ${ol_cv_berkeley_db_thread+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-	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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef HAVE_DB_185_H
-	choke me;
-#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 |
-#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;
-#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 );
-#endif
-
-	if ( rc == 0 ) {
-		rc = env->close( env, 0 );
-	}
-
-	if( rc ) {
-		printf("BerkeleyDB: %s\n", db_strerror(rc) );
-		return rc;
-	}
-
-#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
-
-	return rc;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ol_cv_berkeley_db_thread=yes
-else
-  ol_cv_berkeley_db_thread=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-	LIBS="$ol_LIBS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_thread" >&5
-$as_echo "$ol_cv_berkeley_db_thread" >&6; }
-
-	if test $ol_cv_berkeley_db_thread != no ; then
-
-$as_echo "#define HAVE_BERKELEY_DB_THREAD 1" >>confdefs.h
-
-	fi
-
-	fi
-fi
-
-
-	if test $ol_cv_berkeley_db = no ; then
-		as_fn_error $? "BDB/HDB: BerkeleyDB not available" "$LINENO" 5
-	fi
-
-
-$as_echo "#define HAVE_BERKELEY_DB 1" >>confdefs.h
-
-
-			if test $ol_cv_lib_db != yes ; then
-		BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
-	fi
-
-			if test $ol_enable_bdb/$ol_enable_hdb != mod/mod ; then
-		if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
-			SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"
-		fi
-	fi
-
-	ol_link_bdb=yes
-fi
-
-
-if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
-	BUILD_LIBS_DYNAMIC=shared
-
-$as_echo "#define LDAP_LIBS_DYNAMIC 1" >>confdefs.h
-
-	LTSTATIC=""
-else
-	BUILD_LIBS_DYNAMIC=static
-	LTSTATIC="-static"
-fi
-
-if test $ol_enable_wrappers != no ; then
-	for ac_header in tcpd.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default"
-if test "x$ac_cv_header_tcpd_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_TCPD_H 1
-_ACEOF
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library" >&5
-$as_echo_n "checking for TCP wrappers library... " >&6; }
-		save_LIBS="$LIBS"
-		LIBS="$LIBS -lwrap"
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <tcpd.h>
-int allow_severity = 0;
-int deny_severity  = 0;
-
-struct request_info *req;
-
-int
-main ()
-{
-
-hosts_access(req)
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap" >&5
-$as_echo "-lwrap" >&6; }
-		have_wrappers=yes
-		LIBS="$save_LIBS"
-else
-
-				LIBS="$LIBS -lnsl"
-		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <tcpd.h>
-int allow_severity = 0;
-int deny_severity  = 0;
-
-struct request_info *req;
-
-int
-main ()
-{
-
-hosts_access(req)
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap -lnsl" >&5
-$as_echo "-lwrap -lnsl" >&6; }
-		have_wrappers=yes
-		LIBS="$save_LIBS -lnsl"
-else
-
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-		have_wrappers=no
-		LIBS=$save_LIBS
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-else
-  have_wrappers=no
-fi
-
-done
-
-
-	if test $have_wrappers = yes ; then
-
-$as_echo "#define HAVE_TCPD 1" >>confdefs.h
-
-		WRAP_LIBS="-lwrap"
-	elif test $ol_enable_wrappers = yes ; then
-		as_fn_error $? "could not find TCP wrappers, select apppropriate options or disable" "$LINENO" 5
-	else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find TCP wrappers, support disabled" >&5
-$as_echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
-		WRAP_LIBS=""
-	fi
-fi
-
-if test $ol_enable_syslog != no ; then
-	ac_fn_c_check_func "$LINENO" "openlog" "ac_cv_func_openlog"
-if test "x$ac_cv_func_openlog" = xyes; then :
-
-fi
-
-	if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
-		as_fn_error select appropriate options or disable "could not find syslog" "$LINENO" 5
-	fi
-	ol_enable_syslog=$ac_cv_func_openlog
-fi
-
-ol_link_sql=no
-if test $ol_enable_sql != no ; then
-	for ac_header in sql.h sqlext.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-else
-
-		as_fn_error $? "could not locate SQL headers" "$LINENO" 5
-
-fi
-
-done
-
-
-	sql_LIBS="$LIBS"
-	LIBS="$LTHREAD_LIBS $LIBS"
-
-	if test $ol_with_odbc = auto ; then
-		ol_with_odbc="iodbc unixodbc odbc32"
-	fi
-
-	for odbc in $ol_with_odbc ; do
-		if test $ol_link_sql = no ; then
-			case $odbc in
-			iodbc)
-				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -liodbc" >&5
-$as_echo_n "checking for SQLDriverConnect in -liodbc... " >&6; }
-if ${ac_cv_lib_iodbc_SQLDriverConnect+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-liodbc  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char SQLDriverConnect ();
-int
-main ()
-{
-return SQLDriverConnect ();
+return SQLDriverConnect ();
   ;
   return 0;
 }
@@ -26763,23 +25530,6 @@ _ACEOF
 
 fi
 
-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 <<_ACEOF
-#define SLAPD_BDB $MFLAG
-_ACEOF
-
-fi
-
 if test "$ol_enable_dnssrv" != no ; then
 	BUILD_SLAPD=yes
 	BUILD_DNSSRV=$ol_enable_dnssrv
@@ -26797,23 +25547,6 @@ _ACEOF
 
 fi
 
-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 <<_ACEOF
-#define SLAPD_HDB $MFLAG
-_ACEOF
-
-fi
-
 if test "$ol_enable_ldap" != no ; then
 	BUILD_SLAPD=yes
 	BUILD_LDAP=$ol_enable_ldap
@@ -27447,7 +26180,7 @@ fi
 
 
 
-ac_config_files="$ac_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-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk servers/slapd/back-mdb/Makefile:build/top.mk:servers/slapd/back-mdb/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-ndb/Makefile:build/top.mk:servers/slapd/back-ndb/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-relay/Makefile:build/top.mk:servers/slapd/back-relay/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-sock/Makefile:build/top.mk:servers/slapd/back-sock/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 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"
+ac_config_files="$ac_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-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/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-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk servers/slapd/back-mdb/Makefile:build/top.mk:servers/slapd/back-mdb/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-ndb/Makefile:build/top.mk:servers/slapd/back-ndb/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-relay/Makefile:build/top.mk:servers/slapd/back-relay/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-sock/Makefile:build/top.mk:servers/slapd/back-sock/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 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"
 
 
 ac_config_commands="$ac_config_commands default"
@@ -28411,9 +27144,7 @@ do
     "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-hdb/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/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-ldif/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk" ;;
     "servers/slapd/back-mdb/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-mdb/Makefile:build/top.mk:servers/slapd/back-mdb/Makefile.in:build/mod.mk" ;;
-- 
2.19.1

