]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/configure
Update
[bacula/bacula] / bacula / configure
index 85c2f05f2b770da0549b2ce8f082ff9b6593e7f5..c4c1ca7816da208a6fbe48f059452e0ea1d62dc3 100755 (executable)
@@ -766,6 +766,8 @@ INSTOBJEXT
 GENCAT
 INTLOBJS
 INTL_LIBTOOL_SUFFIX_PREFIX
+BDB_CPPFLAGS
+BDB_LIBS
 GNOME_INCLUDEDIR
 GNOMEUI_LIBS
 GNOME_LIBDIR
@@ -774,6 +776,8 @@ GNOME_DIR
 BAT_DIR
 QWT_INC
 QWT_LDFLAGS
+QWT_LIB
+QWT
 WXCONS_CPPFLAGS
 WXCONS_LDFLAGS
 WX_DIR
@@ -821,6 +825,8 @@ mon_fd_password
 mon_sd_password
 db_name
 db_user
+db_password
+db_port
 dir_user
 dir_group
 sd_user
@@ -832,6 +838,9 @@ SQL_LFLAGS
 SQL_INCLUDE
 SQL_BINDIR
 DBI_DBD_DRIVERDIR
+uncomment_dbi
+DB_PROG
+DB_PROG_LIB
 cats
 DB_TYPE
 GETCONF
@@ -1452,6 +1461,7 @@ Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --disable-nls           do not use Native Language Support
   --disable-rpath         do not hardcode runtime library paths
+  --disable-libdb        disable build of accurate mode with libdb
   --enable-gnome         enable build of bgnome-console GUI disabled
   --enable-bat enable build of bat Qt4 GUI disabled
   --enable-bwx-console     enable build of wxWidgets console disabled
@@ -1472,6 +1482,7 @@ Optional Features:
   --disable-readline      disable readline support disable
 
        --enable-batch-insert       enable the DB batch insert code disabled
+ --enable-batch-insert     enable the DB batch insert code disabled
   --disable-largefile     omit support for large files
 
 Optional Packages:
@@ -1483,6 +1494,7 @@ Optional Packages:
   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
   --without-libintl-prefix     don't search for libintl in includedir and libdir
   --with-included-gettext use the GNU gettext library included here
+  --with-bdb-dir=DIR      Berkeley DB installation directory
  --with-qwt[=DIR]                specify qwt library directory
  --with-readline[=DIR]        specify readline library directory
 
@@ -1508,6 +1520,8 @@ Optional Packages:
   --with-mon-sd-password=PASSWORD       specify Storage daemon's password used by the monitor
   --with-db-name=DBNAME               specify database name (default bacula)
   --with-db-user=UNAME        specify database user (default bacula)
+  --with-db-password=UNAME        specify database password (default *none*)
+  --with-db-port=DBPORT            specify a database port (default null)
   --with-dir-user=USER          specify user for Director daemon
   --with-dir-group=GROUP                specify group for Director daemon
   --with-sd-user=USER           specify user for Storage daemon
@@ -1537,6 +1551,10 @@ Optional Packages:
   --with-dbi[=DIR]     Include DBI support.  DIR is the DBD base
                           install directory, default is to search through
                           a number of common places for the DBI files.
+
+  --with-dbi-driver[=DRIVER]     Suport for DBI driver.  DRIVER is
+                          the one DBI driver like Mysql, Postgresql, others.
+                          Default is to not configure any driver.
   --with-x                use the X Window System
 
 Some influential environment variables:
@@ -13341,115 +13359,4370 @@ echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6; }
         { echo "$as_me:$LINENO: result: $LIBINTL" >&5
 echo "${ECHO_T}$LIBINTL" >&6; }
 
-  for element in $INCINTL; do
-    haveit=
-    for x in $CPPFLAGS; do
+  for element in $INCINTL; do
+    haveit=
+    for x in $CPPFLAGS; do
+
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  eval x=\"$x\"
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+    fi
+  done
+
+      fi
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETTEXT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DCGETTEXT 1
+_ACEOF
+
+    fi
+
+        POSUB=po
+  fi
+
+
+            if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+
+
+
+
+        nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+        DATADIRNAME=share
+
+
+        INSTOBJEXT=.mo
+
+
+        GENCAT=gencat
+
+
+        INTLOBJS=
+    if test "$USE_INCLUDED_LIBINTL" = yes; then
+      INTLOBJS="\$(GETTOBJS)"
+    fi
+
+
+        INTL_LIBTOOL_SUFFIX_PREFIX=
+
+
+
+    INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+fi
+
+support_mysql=no
+support_sqlite=no
+support_sqlite3=no
+support_postgresql=no
+support_dbi=no
+support_smartalloc=yes
+support_readline=yes
+support_conio=yes
+support_gnome=no
+support_bat=no
+support_wx_console=no
+support_tls=no
+support_crypto=no
+support_libdb=yes
+gnome_version=
+wx_version=
+support_static_tools=no
+support_static_fd=no
+support_static_sd=no
+support_static_dir=no
+support_static_cons=no
+support_python=no
+build_client_only=no
+build_dird=yes
+build_stored=yes
+cats=
+db_type=Internal
+DB_TYPE=bdb
+
+
+# -------------------------------------------
+# Berkeley DB (default off)
+# -------------------------------------------
+
+# Check whether --enable-libdb was given.
+if test "${enable_libdb+set}" = set; then
+  enableval=$enable_libdb; if test x$enableval = xno; then
+    support_libdb=no
+  fi
+fi
+
+
+if test x$support_libdb = xyes; then
+ support_libdb=no
+
+    ax_path_bdb_ok=no
+
+  # Add --with-bdb-dir option to configure.
+
+# Check whether --with-bdb-dir was given.
+if test "${with_bdb_dir+set}" = set; then
+  withval=$with_bdb_dir;
+fi
+
+
+  # Check if --with-bdb-dir was specified.
+  if test "x$with_bdb_dir" = "x" ; then
+    # No option specified, so just search the system.
+
+    ax_path_bdb_no_options_ok=no
+
+  # Values to add to environment to use Berkeley DB.
+  BDB_VERSION=''
+  BDB_LIBS=''
+  BDB_CPPFLAGS=''
+  BDB_LDFLAGS=''
+
+  # Check cross compilation here.
+  if test "x$cross_compiling" = "xyes" ; then
+    # If cross compiling, can't use AC_RUN_IFELSE so do these tests.
+    # The AC_PREPROC_IFELSE confirms that db.h is preprocessable,
+    # and extracts the version number from it.
+    { echo "$as_me:$LINENO: checking for db.h" >&5
+echo $ECHO_N "checking for db.h... $ECHO_C" >&6; }
+
+        ax_path_bdb_no_options_HEADER_VERSION=''
+    cat >conftest.$ac_ext <<_ACEOF
+
+      /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <db.h>
+AX_PATH_BDB_STUFF DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH
+
+
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+
+      # Extract version from preprocessor output.
+      ax_path_bdb_no_options_HEADER_VERSION=`eval "$ac_cpp conftest.$ac_ext" 2> /dev/null \
+        | grep AX_PATH_BDB_STUFF | sed 's/[^0-9,]//g;s/,/./g;1q'`
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+    if test "x$ax_path_bdb_no_options_HEADER_VERSION" = "x" ; then
+      { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    else
+      { echo "$as_me:$LINENO: result: $ax_path_bdb_no_options_HEADER_VERSION" >&5
+echo "${ECHO_T}$ax_path_bdb_no_options_HEADER_VERSION" >&6; }
+
+      # Check that version is high enough.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_no_options_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+    ax_compare_version=`echo "x$ax_compare_version_A
+x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"`
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+        # get major and minor version numbers
+                ax_path_bdb_no_options_MAJOR=`echo $ax_path_bdb_no_options_HEADER_VERSION | sed 's,\..*,,'`
+                ax_path_bdb_no_options_MINOR=`echo $ax_path_bdb_no_options_HEADER_VERSION | sed 's,^[0-9]*\.,,;s,\.[0-9]*$,,'`
+
+                ax_path_bdb_no_options_save_LIBS="$LIBS"
+
+        # Check that we can link with the library.
+        { echo "$as_me:$LINENO: checking for library containing db_version" >&5
+echo $ECHO_N "checking for library containing db_version... $ECHO_C" >&6; }
+if test "${ac_cv_search_db_version+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 db_version ();
+int
+main ()
+{
+return db_version ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' db db-$ax_path_bdb_no_options_MAJOR.$ax_path_bdb_no_options_MINOR db$ax_path_bdb_no_options_MAJOR.$ax_path_bdb_no_options_MINOR db$ax_path_bdb_no_options_MAJOR$ax_path_bdb_no_options_MINOR db-$ax_path_bdb_no_options_MAJOR db$ax_path_bdb_no_options_MAJOR; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_search_db_version=$ac_res
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_db_version+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_db_version+set}" = set; then
+  :
+else
+  ac_cv_search_db_version=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_search_db_version" >&5
+echo "${ECHO_T}$ac_cv_search_db_version" >&6; }
+ac_res=$ac_cv_search_db_version
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+            # Sucessfully found library.
+            ax_path_bdb_no_options_ok=yes
+            BDB_VERSION=$ax_path_bdb_no_options_HEADER_VERSION
+
+            # Extract library from LIBS
+            ax_path_bdb_no_options_LEN=` \
+              echo "x$ax_path_bdb_no_options_save_LIBS" \
+              | awk '{print(length)}'`
+            BDB_LIBS=`echo "x$LIBS " \
+              | sed "s/.\{$ax_path_bdb_no_options_LEN\}\$//;s/^x//;s/ //g"`
+
+fi
+
+
+                LIBS="$ax_path_bdb_no_options_save_LIBS"
+
+
+      fi
+
+    fi
+
+      else
+    # Not cross compiling.
+    # Check version of Berkeley DB in the current environment.
+
+    ax_path_bdb_env_get_version_ok=no
+
+  ax_path_bdb_env_get_version_VERSION=''
+  ax_path_bdb_env_get_version_LIBS=''
+
+
+  # Indicate status of checking for Berkeley DB library.
+  { echo "$as_me:$LINENO: checking for db.h" >&5
+echo $ECHO_N "checking for db.h... $ECHO_C" >&6; }
+
+  # Compile and run a program that determines the Berkeley DB version
+  # in the header file db.h.
+  ax_path_bdb_env_get_version_HEADER_VERSION=''
+  if test "$cross_compiling" = yes; then
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  (void) argv;
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  return 0;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by adding an argument.
+    ax_path_bdb_env_get_version_HEADER_VERSION=`./conftest$ac_exeext x`
+    { echo "$as_me:$LINENO: result: $ax_path_bdb_env_get_version_HEADER_VERSION" >&5
+echo "${ECHO_T}$ax_path_bdb_env_get_version_HEADER_VERSION" >&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
+
+( exit $ac_status )
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+  # Have header version, so try to find corresponding library.
+  # Looks for library names in the order:
+  #   nothing, db, db-X.Y, dbX.Y, dbXY, db-X, dbX
+  # and stops when it finds the first one that matches the version
+  # of the header file.
+  if test "x$ax_path_bdb_env_get_version_HEADER_VERSION" != "x" ; then
+    { echo "$as_me:$LINENO: checking for library containing Berkeley DB $ax_path_bdb_env_get_version_HEADER_VERSION" >&5
+echo $ECHO_N "checking for library containing Berkeley DB $ax_path_bdb_env_get_version_HEADER_VERSION... $ECHO_C" >&6; }
+
+
+    # get major and minor version numbers
+    ax_path_bdb_env_get_version_MAJOR=`echo $ax_path_bdb_env_get_version_HEADER_VERSION | sed 's,\..*,,'`
+    ax_path_bdb_env_get_version_MINOR=`echo $ax_path_bdb_env_get_version_HEADER_VERSION | sed 's,^[0-9]*\.,,;s,\.[0-9]*$,,'`
+
+    # see if it is already specified in LIBS
+    ax_path_bdb_env_get_version_TEST_LIBNAME=''
+
+    ax_path_bdb_env_confirm_lib_ok=no
+
+    ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+  LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME"
+
+  # Compile and run a program that compares the version defined in
+  # the header file with a version defined in the library function
+  # db_version.
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by giving an argument,
+    # which will tell the program to print the output.
+    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+    # If the versions all match up, indicate success.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`"
+    ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`"
+    ax_compare_version_A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+
+      test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true
+
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+      ax_path_bdb_env_confirm_lib_ok=yes
+
+      fi
+
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+
+
+    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+      # try format "db"
+      ax_path_bdb_env_get_version_TEST_LIBNAME='-ldb'
+
+    ax_path_bdb_env_confirm_lib_ok=no
+
+    ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+  LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME"
+
+  # Compile and run a program that compares the version defined in
+  # the header file with a version defined in the library function
+  # db_version.
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by giving an argument,
+    # which will tell the program to print the output.
+    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+    # If the versions all match up, indicate success.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`"
+    ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`"
+    ax_compare_version_A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+
+      test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true
+
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+      ax_path_bdb_env_confirm_lib_ok=yes
+
+      fi
+
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+
+    fi
+
+    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+      # try format "db-X.Y"
+      ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb-${ax_path_bdb_env_get_version_MAJOR}.$ax_path_bdb_env_get_version_MINOR"
+
+    ax_path_bdb_env_confirm_lib_ok=no
+
+    ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+  LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME"
+
+  # Compile and run a program that compares the version defined in
+  # the header file with a version defined in the library function
+  # db_version.
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by giving an argument,
+    # which will tell the program to print the output.
+    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+    # If the versions all match up, indicate success.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`"
+    ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`"
+    ax_compare_version_A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+
+      test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true
+
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+      ax_path_bdb_env_confirm_lib_ok=yes
+
+      fi
+
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+
+    fi
+
+    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+      # try format "dbX.Y"
+      ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb${ax_path_bdb_env_get_version_MAJOR}.$ax_path_bdb_env_get_version_MINOR"
+
+    ax_path_bdb_env_confirm_lib_ok=no
+
+    ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+  LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME"
+
+  # Compile and run a program that compares the version defined in
+  # the header file with a version defined in the library function
+  # db_version.
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by giving an argument,
+    # which will tell the program to print the output.
+    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+    # If the versions all match up, indicate success.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`"
+    ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`"
+    ax_compare_version_A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+
+      test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true
+
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+      ax_path_bdb_env_confirm_lib_ok=yes
+
+      fi
+
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+
+    fi
+
+    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+      # try format "dbXY"
+      ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb$ax_path_bdb_env_get_version_MAJOR$ax_path_bdb_env_get_version_MINOR"
+
+    ax_path_bdb_env_confirm_lib_ok=no
+
+    ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+  LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME"
+
+  # Compile and run a program that compares the version defined in
+  # the header file with a version defined in the library function
+  # db_version.
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by giving an argument,
+    # which will tell the program to print the output.
+    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+    # If the versions all match up, indicate success.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`"
+    ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`"
+    ax_compare_version_A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+
+      test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true
+
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+      ax_path_bdb_env_confirm_lib_ok=yes
+
+      fi
+
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+
+    fi
+
+    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+      # try format "db-X"
+      ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb-$ax_path_bdb_env_get_version_MAJOR"
+
+    ax_path_bdb_env_confirm_lib_ok=no
+
+    ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+  LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME"
+
+  # Compile and run a program that compares the version defined in
+  # the header file with a version defined in the library function
+  # db_version.
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by giving an argument,
+    # which will tell the program to print the output.
+    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+    # If the versions all match up, indicate success.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`"
+    ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`"
+    ax_compare_version_A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+
+      test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true
+
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+      ax_path_bdb_env_confirm_lib_ok=yes
+
+      fi
+
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+
+    fi
+
+    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+      # try format "dbX"
+      ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb$ax_path_bdb_env_get_version_MAJOR"
+
+    ax_path_bdb_env_confirm_lib_ok=no
+
+    ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+  LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME"
+
+  # Compile and run a program that compares the version defined in
+  # the header file with a version defined in the library function
+  # db_version.
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by giving an argument,
+    # which will tell the program to print the output.
+    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+    # If the versions all match up, indicate success.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`"
+    ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`"
+    ax_compare_version_A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+
+      test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true
+
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+      ax_path_bdb_env_confirm_lib_ok=yes
+
+      fi
+
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+
+    fi
+
+        if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then
+      if test "x$ax_path_bdb_env_get_version_TEST_LIBNAME" = "x" ; then
+        { echo "$as_me:$LINENO: result: none required" >&5
+echo "${ECHO_T}none required" >&6; }
+      else
+        { echo "$as_me:$LINENO: result: $ax_path_bdb_env_get_version_TEST_LIBNAME" >&5
+echo "${ECHO_T}$ax_path_bdb_env_get_version_TEST_LIBNAME" >&6; }
+      fi
+      ax_path_bdb_env_get_version_VERSION="$ax_path_bdb_env_get_version_HEADER_VERSION"
+      ax_path_bdb_env_get_version_LIBS="$ax_path_bdb_env_get_version_TEST_LIBNAME"
+      ax_path_bdb_env_get_version_ok=yes
+    else
+      { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    fi
+
+          fi
+
+
+    if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then
+
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_get_version_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+    ax_compare_version=`echo "x$ax_compare_version_A
+x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"`
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+        # Found acceptable version in current environment.
+        ax_path_bdb_no_options_ok=yes
+        BDB_VERSION="$ax_path_bdb_env_get_version_VERSION"
+        BDB_LIBS="$ax_path_bdb_env_get_version_LIBS"
+
+      fi
+
+
+      fi
+
+
+
+    # Determine if we need to search /usr/local/BerkeleyDB*
+    ax_path_bdb_no_options_DONE=no
+    if test "xHIGHEST" = "xENVONLY" ; then
+      ax_path_bdb_no_options_DONE=yes
+    elif test "xHIGHEST" = "xENVFIRST" ; then
+      ax_path_bdb_no_options_DONE=$ax_path_bdb_no_options_ok
+    fi
+
+    if test "$ax_path_bdb_no_options_DONE" = "no" ; then
+      # Check for highest in /usr/local/BerkeleyDB*
+
+    ax_path_bdb_path_find_highest_ok=no
+
+    ax_path_bdb_path_find_highest_VERSION=''
+
+  ax_path_bdb_path_find_highest_DIR=''
+
+  # find highest verison in default install directory for Berkeley DB
+
+  for ax_path_bdb_path_find_highest_CURDIR in `ls -d /usr/local/BerkeleyDB* 2> /dev/null`
+  do
+
+    ax_path_bdb_path_get_version_ok=no
+
+  # Indicate status of checking for Berkeley DB header.
+  { echo "$as_me:$LINENO: checking in $ax_path_bdb_path_find_highest_CURDIR/include for db.h" >&5
+echo $ECHO_N "checking in $ax_path_bdb_path_find_highest_CURDIR/include for db.h... $ECHO_C" >&6; }
+  ax_path_bdb_path_get_version_got_header=no
+  test -f "$ax_path_bdb_path_find_highest_CURDIR/include/db.h" && ax_path_bdb_path_get_version_got_header=yes
+  { echo "$as_me:$LINENO: result: $ax_path_bdb_path_get_version_got_header" >&5
+echo "${ECHO_T}$ax_path_bdb_path_get_version_got_header" >&6; }
+
+  # Indicate status of checking for Berkeley DB library.
+  { echo "$as_me:$LINENO: checking in $ax_path_bdb_path_find_highest_CURDIR/lib for library -ldb" >&5
+echo $ECHO_N "checking in $ax_path_bdb_path_find_highest_CURDIR/lib for library -ldb... $ECHO_C" >&6; }
+
+  ax_path_bdb_path_get_version_VERSION=''
+
+  if test -d "$ax_path_bdb_path_find_highest_CURDIR/include" && test -d "$ax_path_bdb_path_find_highest_CURDIR/lib" &&
+     test "$ax_path_bdb_path_get_version_got_header" = "yes" ; then
+        ax_path_bdb_path_get_version_save_CPPFLAGS="$CPPFLAGS"
+    CPPFLAGS="-I$ax_path_bdb_path_find_highest_CURDIR/include $CPPFLAGS"
+
+    ax_path_bdb_path_get_version_save_LIBS="$LIBS"
+    LIBS="$LIBS -ldb"
+
+    ax_path_bdb_path_get_version_save_LDFLAGS="$LDFLAGS"
+    LDFLAGS="-L$ax_path_bdb_path_find_highest_CURDIR/lib $LDFLAGS"
+
+    # Compile and run a program that compares the version defined in
+    # the header file with a version defined in the library function
+    # db_version.
+    if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+      /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+      # Program compiled and ran, so get version by adding argument.
+      ax_path_bdb_path_get_version_VERSION=`./conftest$ac_exeext x`
+      ax_path_bdb_path_get_version_ok=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
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+        CPPFLAGS="$ax_path_bdb_path_get_version_save_CPPFLAGS"
+    LIBS="$ax_path_bdb_path_get_version_save_LIBS"
+    LDFLAGS="$ax_path_bdb_path_get_version_save_LDFLAGS"
+  fi
+
+    if test "$ax_path_bdb_path_get_version_ok" = "yes" ; then
+    { echo "$as_me:$LINENO: result: $ax_path_bdb_path_get_version_VERSION" >&5
+echo "${ECHO_T}$ax_path_bdb_path_get_version_VERSION" >&6; }
+
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_path_get_version_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_path_find_highest_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+    ax_compare_version=`echo "x$ax_compare_version_A
+x$ax_compare_version_B" | sed 's/^ *//' | sort | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"`
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+        ax_path_bdb_path_find_highest_ok=yes
+        ax_path_bdb_path_find_highest_DIR="$ax_path_bdb_path_find_highest_CURDIR"
+        ax_path_bdb_path_find_highest_VERSION="$ax_path_bdb_path_get_version_VERSION"
+
+      fi
+
+
+  else
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+      fi
+
+  done
+
+
+    if test "$ax_path_bdb_path_find_highest_ok" = "yes" ; then
+
+        if test "$ax_path_bdb_no_options_ok" = "yes" ; then
+        # If we already have an acceptable version use this if higher.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_path_find_highest_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$BDB_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+    ax_compare_version=`echo "x$ax_compare_version_A
+x$ax_compare_version_B" | sed 's/^ *//' | sort | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"`
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+    :
+      fi
+
+        else
+          # Since we didn't have an acceptable version check if this one is.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_path_find_highest_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+    ax_compare_version=`echo "x$ax_compare_version_A
+x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"`
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+    :
+      fi
+
+        fi
+
+      fi
+
+
+
+            if test "$ax_compare_version" = "true" ; then
+        ax_path_bdb_no_options_ok=yes
+        BDB_LIBS="-ldb"
+        if test "x$ax_path_bdb_path_find_highest_DIR" != x ; then
+          BDB_CPPFLAGS="-I$ax_path_bdb_path_find_highest_DIR/include"
+          BDB_LDFLAGS="-L$ax_path_bdb_path_find_highest_DIR/lib"
+        fi
+        BDB_VERSION="$ax_path_bdb_path_find_highest_VERSION"
+      fi
+    fi
+  fi
+
+    if test "$ax_path_bdb_no_options_ok" = "yes" ; then
+    { echo "$as_me:$LINENO: using Berkeley DB version $BDB_VERSION" >&5
+echo "$as_me: using Berkeley DB version $BDB_VERSION" >&6;}
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DB_H 1
+_ACEOF
+
+
+      ax_path_bdb_ok=yes
+
+  else
+    { echo "$as_me:$LINENO: no Berkeley DB version 3 or higher found" >&5
+echo "$as_me: no Berkeley DB version 3 or higher found" >&6;}
+      fi
+
+   else
+     # Set --with-bdb-dir option.
+     ax_path_bdb_INC="$with_bdb_dir/include"
+     ax_path_bdb_LIB="$with_bdb_dir/lib"
+
+          ax_path_bdb_save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="-I$ax_path_bdb_INC $CPPFLAGS"
+
+     ax_path_bdb_save_LDFLAGS=$LDFLAGS
+     LDFLAGS="-L$ax_path_bdb_LIB $LDFLAGS"
+
+     # Check for specific header file db.h
+     { echo "$as_me:$LINENO: checking db.h presence in $ax_path_bdb_INC" >&5
+echo $ECHO_N "checking db.h presence in $ax_path_bdb_INC... $ECHO_C" >&6; }
+     if test -f "$ax_path_bdb_INC/db.h" ; then
+       { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+       # Check for library
+
+    ax_path_bdb_no_options_ok=no
+
+  # Values to add to environment to use Berkeley DB.
+  BDB_VERSION=''
+  BDB_LIBS=''
+  BDB_CPPFLAGS=''
+  BDB_LDFLAGS=''
+
+  # Check cross compilation here.
+  if test "x$cross_compiling" = "xyes" ; then
+    # If cross compiling, can't use AC_RUN_IFELSE so do these tests.
+    # The AC_PREPROC_IFELSE confirms that db.h is preprocessable,
+    # and extracts the version number from it.
+    { echo "$as_me:$LINENO: checking for db.h" >&5
+echo $ECHO_N "checking for db.h... $ECHO_C" >&6; }
+
+        ax_path_bdb_no_options_HEADER_VERSION=''
+    cat >conftest.$ac_ext <<_ACEOF
+
+      /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <db.h>
+AX_PATH_BDB_STUFF DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH
+
+
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+
+      # Extract version from preprocessor output.
+      ax_path_bdb_no_options_HEADER_VERSION=`eval "$ac_cpp conftest.$ac_ext" 2> /dev/null \
+        | grep AX_PATH_BDB_STUFF | sed 's/[^0-9,]//g;s/,/./g;1q'`
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+    if test "x$ax_path_bdb_no_options_HEADER_VERSION" = "x" ; then
+      { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    else
+      { echo "$as_me:$LINENO: result: $ax_path_bdb_no_options_HEADER_VERSION" >&5
+echo "${ECHO_T}$ax_path_bdb_no_options_HEADER_VERSION" >&6; }
+
+      # Check that version is high enough.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_no_options_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+    ax_compare_version=`echo "x$ax_compare_version_A
+x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"`
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+        # get major and minor version numbers
+                ax_path_bdb_no_options_MAJOR=`echo $ax_path_bdb_no_options_HEADER_VERSION | sed 's,\..*,,'`
+                ax_path_bdb_no_options_MINOR=`echo $ax_path_bdb_no_options_HEADER_VERSION | sed 's,^[0-9]*\.,,;s,\.[0-9]*$,,'`
+
+                ax_path_bdb_no_options_save_LIBS="$LIBS"
+
+        # Check that we can link with the library.
+        { echo "$as_me:$LINENO: checking for library containing db_version" >&5
+echo $ECHO_N "checking for library containing db_version... $ECHO_C" >&6; }
+if test "${ac_cv_search_db_version+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* 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 db_version ();
+int
+main ()
+{
+return db_version ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' db db-$ax_path_bdb_no_options_MAJOR.$ax_path_bdb_no_options_MINOR db$ax_path_bdb_no_options_MAJOR.$ax_path_bdb_no_options_MINOR db$ax_path_bdb_no_options_MAJOR$ax_path_bdb_no_options_MINOR db-$ax_path_bdb_no_options_MAJOR db$ax_path_bdb_no_options_MAJOR; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_search_db_version=$ac_res
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_db_version+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_db_version+set}" = set; then
+  :
+else
+  ac_cv_search_db_version=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_search_db_version" >&5
+echo "${ECHO_T}$ac_cv_search_db_version" >&6; }
+ac_res=$ac_cv_search_db_version
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+            # Sucessfully found library.
+            ax_path_bdb_no_options_ok=yes
+            BDB_VERSION=$ax_path_bdb_no_options_HEADER_VERSION
+
+            # Extract library from LIBS
+            ax_path_bdb_no_options_LEN=` \
+              echo "x$ax_path_bdb_no_options_save_LIBS" \
+              | awk '{print(length)}'`
+            BDB_LIBS=`echo "x$LIBS " \
+              | sed "s/.\{$ax_path_bdb_no_options_LEN\}\$//;s/^x//;s/ //g"`
+
+fi
+
+
+                LIBS="$ax_path_bdb_no_options_save_LIBS"
+
+
+      fi
+
+    fi
+
+      else
+    # Not cross compiling.
+    # Check version of Berkeley DB in the current environment.
+
+    ax_path_bdb_env_get_version_ok=no
+
+  ax_path_bdb_env_get_version_VERSION=''
+  ax_path_bdb_env_get_version_LIBS=''
+
+
+  # Indicate status of checking for Berkeley DB library.
+  { echo "$as_me:$LINENO: checking for db.h" >&5
+echo $ECHO_N "checking for db.h... $ECHO_C" >&6; }
+
+  # Compile and run a program that determines the Berkeley DB version
+  # in the header file db.h.
+  ax_path_bdb_env_get_version_HEADER_VERSION=''
+  if test "$cross_compiling" = yes; then
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  (void) argv;
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  return 0;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by adding an argument.
+    ax_path_bdb_env_get_version_HEADER_VERSION=`./conftest$ac_exeext x`
+    { echo "$as_me:$LINENO: result: $ax_path_bdb_env_get_version_HEADER_VERSION" >&5
+echo "${ECHO_T}$ax_path_bdb_env_get_version_HEADER_VERSION" >&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
+
+( exit $ac_status )
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+  # Have header version, so try to find corresponding library.
+  # Looks for library names in the order:
+  #   nothing, db, db-X.Y, dbX.Y, dbXY, db-X, dbX
+  # and stops when it finds the first one that matches the version
+  # of the header file.
+  if test "x$ax_path_bdb_env_get_version_HEADER_VERSION" != "x" ; then
+    { echo "$as_me:$LINENO: checking for library containing Berkeley DB $ax_path_bdb_env_get_version_HEADER_VERSION" >&5
+echo $ECHO_N "checking for library containing Berkeley DB $ax_path_bdb_env_get_version_HEADER_VERSION... $ECHO_C" >&6; }
+
+
+    # get major and minor version numbers
+    ax_path_bdb_env_get_version_MAJOR=`echo $ax_path_bdb_env_get_version_HEADER_VERSION | sed 's,\..*,,'`
+    ax_path_bdb_env_get_version_MINOR=`echo $ax_path_bdb_env_get_version_HEADER_VERSION | sed 's,^[0-9]*\.,,;s,\.[0-9]*$,,'`
+
+    # see if it is already specified in LIBS
+    ax_path_bdb_env_get_version_TEST_LIBNAME=''
+
+    ax_path_bdb_env_confirm_lib_ok=no
+
+    ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+  LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME"
+
+  # Compile and run a program that compares the version defined in
+  # the header file with a version defined in the library function
+  # db_version.
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by giving an argument,
+    # which will tell the program to print the output.
+    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+    # If the versions all match up, indicate success.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`"
+    ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`"
+    ax_compare_version_A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+
+      test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true
+
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+      ax_path_bdb_env_confirm_lib_ok=yes
+
+      fi
+
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+
+
+    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+      # try format "db"
+      ax_path_bdb_env_get_version_TEST_LIBNAME='-ldb'
+
+    ax_path_bdb_env_confirm_lib_ok=no
+
+    ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+  LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME"
+
+  # Compile and run a program that compares the version defined in
+  # the header file with a version defined in the library function
+  # db_version.
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by giving an argument,
+    # which will tell the program to print the output.
+    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+    # If the versions all match up, indicate success.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`"
+    ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`"
+    ax_compare_version_A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+
+      test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true
+
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+      ax_path_bdb_env_confirm_lib_ok=yes
+
+      fi
+
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+
+    fi
+
+    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+      # try format "db-X.Y"
+      ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb-${ax_path_bdb_env_get_version_MAJOR}.$ax_path_bdb_env_get_version_MINOR"
+
+    ax_path_bdb_env_confirm_lib_ok=no
+
+    ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+  LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME"
+
+  # Compile and run a program that compares the version defined in
+  # the header file with a version defined in the library function
+  # db_version.
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by giving an argument,
+    # which will tell the program to print the output.
+    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+    # If the versions all match up, indicate success.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`"
+    ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`"
+    ax_compare_version_A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+
+      test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true
+
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+      ax_path_bdb_env_confirm_lib_ok=yes
+
+      fi
+
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+
+    fi
+
+    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+      # try format "dbX.Y"
+      ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb${ax_path_bdb_env_get_version_MAJOR}.$ax_path_bdb_env_get_version_MINOR"
+
+    ax_path_bdb_env_confirm_lib_ok=no
+
+    ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+  LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME"
+
+  # Compile and run a program that compares the version defined in
+  # the header file with a version defined in the library function
+  # db_version.
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by giving an argument,
+    # which will tell the program to print the output.
+    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+    # If the versions all match up, indicate success.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`"
+    ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`"
+    ax_compare_version_A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+
+      test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true
+
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+      ax_path_bdb_env_confirm_lib_ok=yes
+
+      fi
+
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+
+    fi
+
+    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+      # try format "dbXY"
+      ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb$ax_path_bdb_env_get_version_MAJOR$ax_path_bdb_env_get_version_MINOR"
+
+    ax_path_bdb_env_confirm_lib_ok=no
+
+    ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+  LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME"
+
+  # Compile and run a program that compares the version defined in
+  # the header file with a version defined in the library function
+  # db_version.
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by giving an argument,
+    # which will tell the program to print the output.
+    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+    # If the versions all match up, indicate success.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`"
+    ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`"
+    ax_compare_version_A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+
+      test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true
+
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+      ax_path_bdb_env_confirm_lib_ok=yes
+
+      fi
+
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+
+    fi
+
+    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+      # try format "db-X"
+      ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb-$ax_path_bdb_env_get_version_MAJOR"
+
+    ax_path_bdb_env_confirm_lib_ok=no
+
+    ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+  LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME"
+
+  # Compile and run a program that compares the version defined in
+  # the header file with a version defined in the library function
+  # db_version.
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by giving an argument,
+    # which will tell the program to print the output.
+    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+    # If the versions all match up, indicate success.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`"
+    ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`"
+    ax_compare_version_A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+
+      test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true
+
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+      ax_path_bdb_env_confirm_lib_ok=yes
+
+      fi
+
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+
+    fi
+
+    if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+      # try format "dbX"
+      ax_path_bdb_env_get_version_TEST_LIBNAME="-ldb$ax_path_bdb_env_get_version_MAJOR"
+
+    ax_path_bdb_env_confirm_lib_ok=no
+
+    ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+  LIBS="$LIBS $ax_path_bdb_env_get_version_TEST_LIBNAME"
+
+  # Compile and run a program that compares the version defined in
+  # the header file with a version defined in the library function
+  # db_version.
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+    /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+    # Program compiled and ran, so get version by giving an argument,
+    # which will tell the program to print the output.
+    ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+    # If the versions all match up, indicate success.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_confirm_lib_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_env_get_version_HEADER_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+
+
+    # Pad zeros at end of numbers to make same length.
+    ax_compare_version_tmp_A="$ax_compare_version_A`echo $ax_compare_version_B | sed 's/./0/g'`"
+    ax_compare_version_B="$ax_compare_version_B`echo $ax_compare_version_A | sed 's/./0/g'`"
+    ax_compare_version_A="$ax_compare_version_tmp_A"
+
+    # Check for equality or inequality as necessary.
+
+      test "x$ax_compare_version_A" = "x$ax_compare_version_B" && ax_compare_version=true
+
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+      ax_path_bdb_env_confirm_lib_ok=yes
+
+      fi
+
+
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+    LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+
+    fi
+
+        if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then
+      if test "x$ax_path_bdb_env_get_version_TEST_LIBNAME" = "x" ; then
+        { echo "$as_me:$LINENO: result: none required" >&5
+echo "${ECHO_T}none required" >&6; }
+      else
+        { echo "$as_me:$LINENO: result: $ax_path_bdb_env_get_version_TEST_LIBNAME" >&5
+echo "${ECHO_T}$ax_path_bdb_env_get_version_TEST_LIBNAME" >&6; }
+      fi
+      ax_path_bdb_env_get_version_VERSION="$ax_path_bdb_env_get_version_HEADER_VERSION"
+      ax_path_bdb_env_get_version_LIBS="$ax_path_bdb_env_get_version_TEST_LIBNAME"
+      ax_path_bdb_env_get_version_ok=yes
+    else
+      { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+    fi
+
+          fi
+
+
+    if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then
+
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_env_get_version_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+    ax_compare_version=`echo "x$ax_compare_version_A
+x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"`
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+        # Found acceptable version in current environment.
+        ax_path_bdb_no_options_ok=yes
+        BDB_VERSION="$ax_path_bdb_env_get_version_VERSION"
+        BDB_LIBS="$ax_path_bdb_env_get_version_LIBS"
+
+      fi
+
+
+      fi
+
+
+
+    # Determine if we need to search /usr/local/BerkeleyDB*
+    ax_path_bdb_no_options_DONE=no
+    if test "xENVONLY" = "xENVONLY" ; then
+      ax_path_bdb_no_options_DONE=yes
+    elif test "xENVONLY" = "xENVFIRST" ; then
+      ax_path_bdb_no_options_DONE=$ax_path_bdb_no_options_ok
+    fi
+
+    if test "$ax_path_bdb_no_options_DONE" = "no" ; then
+      # Check for highest in /usr/local/BerkeleyDB*
+
+    ax_path_bdb_path_find_highest_ok=no
+
+    ax_path_bdb_path_find_highest_VERSION=''
+
+  ax_path_bdb_path_find_highest_DIR=''
+
+  # find highest verison in default install directory for Berkeley DB
+
+  for ax_path_bdb_path_find_highest_CURDIR in `ls -d /usr/local/BerkeleyDB* 2> /dev/null`
+  do
+
+    ax_path_bdb_path_get_version_ok=no
+
+  # Indicate status of checking for Berkeley DB header.
+  { echo "$as_me:$LINENO: checking in $ax_path_bdb_path_find_highest_CURDIR/include for db.h" >&5
+echo $ECHO_N "checking in $ax_path_bdb_path_find_highest_CURDIR/include for db.h... $ECHO_C" >&6; }
+  ax_path_bdb_path_get_version_got_header=no
+  test -f "$ax_path_bdb_path_find_highest_CURDIR/include/db.h" && ax_path_bdb_path_get_version_got_header=yes
+  { echo "$as_me:$LINENO: result: $ax_path_bdb_path_get_version_got_header" >&5
+echo "${ECHO_T}$ax_path_bdb_path_get_version_got_header" >&6; }
+
+  # Indicate status of checking for Berkeley DB library.
+  { echo "$as_me:$LINENO: checking in $ax_path_bdb_path_find_highest_CURDIR/lib for library -ldb" >&5
+echo $ECHO_N "checking in $ax_path_bdb_path_find_highest_CURDIR/lib for library -ldb... $ECHO_C" >&6; }
+
+  ax_path_bdb_path_get_version_VERSION=''
+
+  if test -d "$ax_path_bdb_path_find_highest_CURDIR/include" && test -d "$ax_path_bdb_path_find_highest_CURDIR/lib" &&
+     test "$ax_path_bdb_path_get_version_got_header" = "yes" ; then
+        ax_path_bdb_path_get_version_save_CPPFLAGS="$CPPFLAGS"
+    CPPFLAGS="-I$ax_path_bdb_path_find_highest_CURDIR/include $CPPFLAGS"
+
+    ax_path_bdb_path_get_version_save_LIBS="$LIBS"
+    LIBS="$LIBS -ldb"
+
+    ax_path_bdb_path_get_version_save_LDFLAGS="$LDFLAGS"
+    LDFLAGS="-L$ax_path_bdb_path_find_highest_CURDIR/lib $LDFLAGS"
+
+    # Compile and run a program that compares the version defined in
+    # the header file with a version defined in the library function
+    # db_version.
+    if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+
+      /* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+  int major,minor,patch;
+  (void) argv;
+  db_version(&major,&minor,&patch);
+  if (argc > 1)
+    printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+  if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+      DB_VERSION_PATCH == patch)
+    return 0;
+  else
+    return 1;
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+
+      # Program compiled and ran, so get version by adding argument.
+      ax_path_bdb_path_get_version_VERSION=`./conftest$ac_exeext x`
+      ax_path_bdb_path_get_version_ok=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
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+        CPPFLAGS="$ax_path_bdb_path_get_version_save_CPPFLAGS"
+    LIBS="$ax_path_bdb_path_get_version_save_LIBS"
+    LDFLAGS="$ax_path_bdb_path_get_version_save_LDFLAGS"
+  fi
+
+    if test "$ax_path_bdb_path_get_version_ok" = "yes" ; then
+    { echo "$as_me:$LINENO: result: $ax_path_bdb_path_get_version_VERSION" >&5
+echo "${ECHO_T}$ax_path_bdb_path_get_version_VERSION" >&6; }
+
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_path_get_version_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+  ax_compare_version_B=`echo "$ax_path_bdb_path_find_highest_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
+
+    ax_compare_version=`echo "x$ax_compare_version_A
+x$ax_compare_version_B" | sed 's/^ *//' | sort | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"`
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+
+        ax_path_bdb_path_find_highest_ok=yes
+        ax_path_bdb_path_find_highest_DIR="$ax_path_bdb_path_find_highest_CURDIR"
+        ax_path_bdb_path_find_highest_VERSION="$ax_path_bdb_path_get_version_VERSION"
+
+      fi
+
+
+  else
+    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+      fi
+
+  done
+
+
+    if test "$ax_path_bdb_path_find_highest_ok" = "yes" ; then
+
+        if test "$ax_path_bdb_no_options_ok" = "yes" ; then
+        # If we already have an acceptable version use this if higher.
+
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+  # Used to indicate true or false condition
+  ax_compare_version=false
+
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
+
+  ax_compare_version_A=`echo "$ax_path_bdb_path_find_highest_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
+
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
+  ax_compare_version_B=`echo "$BDB_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
 
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
-    fi
-  done
 
+    ax_compare_version=`echo "x$ax_compare_version_A
+x$ax_compare_version_B" | sed 's/^ *//' | sort | sed "s/x${ax_compare_version_A}/false/;s/x${ax_compare_version_B}/true/;1q"`
+
+
+
+    if test "$ax_compare_version" = "true" ; then
+    :
       fi
 
+        else
+          # Since we didn't have an acceptable version check if this one is.
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETTEXT 1
-_ACEOF
+  for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DCGETTEXT 1
-_ACEOF
 
-    fi
+  test -n "$AWK" && break
+done
 
-        POSUB=po
-  fi
 
+  # Used to indicate true or false condition
+  ax_compare_version=false
 
-            if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
-      BUILD_INCLUDED_LIBINTL=yes
-    fi
+  # Convert the two version strings to be compared into a format that
+  # allows a simple string comparison.  The end result is that a version
+  # string of the form 1.12.5-r617 will be converted to the form
+  # 0001001200050617.  In other words, each number is zero padded to four
+  # digits, and non digits are removed.
 
+  ax_compare_version_A=`echo "$ax_path_bdb_path_find_highest_VERSION" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
 
 
+  ax_compare_version_B=`echo "3" | sed -e 's/\([0-9]*\)/Z\1Z/g' \
+                     -e 's/Z\([0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/Z\([0-9][0-9][0-9]\)Z/Z0\1Z/g' \
+                     -e 's/[^0-9]//g'`
 
 
-        nls_cv_header_intl=
-    nls_cv_header_libgt=
+    ax_compare_version=`echo "x$ax_compare_version_A
+x$ax_compare_version_B" | sed 's/^ *//' | sort -r | sed "s/x${ax_compare_version_A}/true/;s/x${ax_compare_version_B}/false/;1q"`
 
-        DATADIRNAME=share
 
 
-        INSTOBJEXT=.mo
+    if test "$ax_compare_version" = "true" ; then
+    :
+      fi
 
+        fi
 
-        GENCAT=gencat
+      fi
 
 
-        INTLOBJS=
-    if test "$USE_INCLUDED_LIBINTL" = yes; then
-      INTLOBJS="\$(GETTOBJS)"
+
+            if test "$ax_compare_version" = "true" ; then
+        ax_path_bdb_no_options_ok=yes
+        BDB_LIBS="-ldb"
+        if test "x$ax_path_bdb_path_find_highest_DIR" != x ; then
+          BDB_CPPFLAGS="-I$ax_path_bdb_path_find_highest_DIR/include"
+          BDB_LDFLAGS="-L$ax_path_bdb_path_find_highest_DIR/lib"
+        fi
+        BDB_VERSION="$ax_path_bdb_path_find_highest_VERSION"
+      fi
     fi
+  fi
 
+    if test "$ax_path_bdb_no_options_ok" = "yes" ; then
+    { echo "$as_me:$LINENO: using Berkeley DB version $BDB_VERSION" >&5
+echo "$as_me: using Berkeley DB version $BDB_VERSION" >&6;}
 
-        INTL_LIBTOOL_SUFFIX_PREFIX=
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DB_H 1
+_ACEOF
 
 
+         ax_path_bdb_ok=yes
+         BDB_CPPFLAGS="-I$ax_path_bdb_INC"
+         BDB_LDFLAGS="-L$ax_path_bdb_LIB"
 
-    INTLLIBS="$LIBINTL"
+  else
+    { echo "$as_me:$LINENO: no Berkeley DB version 3 or higher found" >&5
+echo "$as_me: no Berkeley DB version 3 or higher found" >&6;}
+      fi
+
+     else
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+       { echo "$as_me:$LINENO: no usable Berkeley DB not found" >&5
+echo "$as_me: no usable Berkeley DB not found" >&6;}
+     fi
+
+          CPPFLAGS="$ax_path_bdb_save_CPPFLAGS"
+     LDFLAGS="$ax_path_bdb_save_LDFLAGS"
 
+  fi
 
+    if test "$ax_path_bdb_ok" = "yes" ; then
 
+   support_libdb=yes
 
+      fi
 
 
 fi
 
+if test x$support_libdb = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_DB 1
+_ACEOF
 
-support_mysql=no
-support_sqlite=no
-support_sqlite3=no
-support_postgresql=no
-support_dbi=no
-support_smartalloc=yes
-support_readline=yes
-support_conio=yes
-support_gnome=no
-support_bat=no
-support_wx_console=no
-support_tls=no
-support_crypto=no
-gnome_version=
-wx_version=
-support_static_tools=no
-support_static_fd=no
-support_static_sd=no
-support_static_dir=no
-support_static_cons=no
-support_python=no
-build_client_only=no
-build_dird=yes
-build_stored=yes
-cats=
-db_type=Internal
-DB_TYPE=bdb
 
 
+fi
+
 # -------------------------------------------
 # gnome (default off)
 # -------------------------------------------
@@ -13518,6 +17791,9 @@ fi
 got_qwt=no
 QWT_INC=
 QWT_LDFLAGS=
+QWT_LIB=
+QWT=
+no_qwt=no
 if test x$support_bat = xyes; then
    { echo "$as_me:$LINENO: checking for qwt support" >&5
 echo $ECHO_N "checking for qwt support... $ECHO_C" >&6; }
@@ -13527,11 +17803,14 @@ if test "${with_qwt+set}" = set; then
   withval=$with_qwt;
        case "$with_qwt" in
        no)
+          no_qwt=yes
          ;;
        yes|*)
          if test -f ${with_qwt}/include/qwt.h; then
             QWT_INC="${with_qwt}/include"
             QWT_LDFLAGS="-L${with_qwt}/lib"
+            QWT_LIB="-lqwt"
+            QWT="qwt"
          fi
          ;;
        esac
@@ -13542,7 +17821,8 @@ fi
 #
 # Search in standard places, or --with-qwt not specified
 #
-   if test x$QWT_INC = x; then
+   if test $no_qwt = no; then
+    if test x$QWT_INC = x; then
       for root in /usr /usr/local; do
         for ver in qwt qwt5 qwt-qt4; do
            if test -f ${root}/include/${ver}/qwt.h; then
               else
                  QWT_LDFLAGS="-L${root}/lib"
               fi
+              QWT_LIB="-lqwt"
+              QWT="qwt"
               got_qwt=yes
               break;
            fi
         done
       done
+    fi
    fi
    if test x$QWT_INC = x; then
       { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
-      { { echo "$as_me:$LINENO: error: Unable to find qwt package needed by bat" >&5
-echo "$as_me: error: Unable to find qwt package needed by bat" >&2;}
-   { (exit 1); exit 1; }; }
-      BAT_DIR=
-      support_bat=no
    else
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_QWT 1
+_ACEOF
+
       { echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6; }
    fi
@@ -13577,6 +17860,8 @@ fi
 
 
 
+
+
 # -------------------------------------------
 # bwx-console (default off)
 # -------------------------------------------
 
 
 
+db_password=
+
+# Check whether --with-db_password was given.
+if test "${with_db_password+set}" = set; then
+  withval=$with_db_password;
+       if test "x$withval" != "x" ; then
+            db_password=$withval
+       fi
+
+
+fi
+
+
+
+#
+# Pickup a database port
+#
+db_port=" "
+
+# Check whether --with-db_port was given.
+if test "${with_db_port+set}" = set; then
+  withval=$with_db_port;
+        if test "x$withval" != "x" ; then
+            db_port=$withval
+       fi
+
+
+fi
+
+
 
 #
 # Handle users and groups for each daemon
@@ -17963,7 +22278,8 @@ echo "$as_me: error: Invalid DBD driver directory $withval - unable to find DBD
      SQL_LIB=$DBI_LIBDIR/libdbi.a
      DBI_DBD_DRIVERDIR="-D DBI_DRIVER_DIR=\\\"$DRIVERDIR\\\""
 
-     cat >>confdefs.h <<\_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
 #define HAVE_DBI 1
 _ACEOF
 
@@ -17973,6 +22289,7 @@ echo "${ECHO_T}yes" >&6; }
      support_dbi=yes
      db_type=DBI
      DB_TYPE=dbi
+     uncomment_dbi=" "
 
   else
      { echo "$as_me:$LINENO: result: no" >&5
 
 
 
+db_found=no
+db_prog=no
+{ echo "$as_me:$LINENO: checking for DBI drivers support" >&5
+echo $ECHO_N "checking for DBI drivers support... $ECHO_C" >&6; }
+
+# Check whether --with-dbi-driver was given.
+if test "${with_dbi_driver+set}" = set; then
+  withval=$with_dbi_driver;
+  if test "$withval" != "no"; then
+     case $withval in
+        "mysql")
+           db_prog="mysql"
+           if test -f /usr/local/mysql/bin/mysql; then
+              SQL_BINDIR=/usr/local/mysql/bin
+              if test -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.a \
+                 -o -f /usr/local/mysql/lib64/mysql/libmysqlclient_r.so; then
+                 SQL_LIBDIR=/usr/local/mysql/lib64/mysql
+              else
+                 SQL_LIBDIR=/usr/local/mysql/lib/mysql
+              fi
+           elif test -f /usr/bin/mysql; then
+              SQL_BINDIR=/usr/bin
+              if test -f /usr/lib64/mysql/libmysqlclient_r.a \
+                  -o -f /usr/lib64/mysql/libmysqlclient_r.so; then
+                  SQL_LIBDIR=/usr/lib64/mysql
+              elif test -f /usr/lib/mysql/libmysqlclient_r.a \
+                  -o -f /usr/lib/mysql/libmysqlclient_r.so; then
+                  SQL_LIBDIR=/usr/lib/mysql
+              else
+                  SQL_LIBDIR=/usr/lib
+              fi
+           elif test -f /usr/local/bin/mysql; then
+              SQL_BINDIR=/usr/local/bin
+              if test -f /usr/local/lib64/mysql/libmysqlclient_r.a \
+                  -o -f /usr/local/lib64/mysql/libmysqlclient_r.so; then
+                  SQL_LIBDIR=/usr/local/lib64/mysql
+              elif test -f /usr/local/lib/mysql/libmysqlclient_r.a \
+                  -o -f /usr/local/lib/mysql/libmysqlclient_r.so; then
+                  SQL_LIBDIR=/usr/local/lib/mysql
+              else
+                  SQL_LIBDIR=/usr/local/lib
+              fi
+           elif test -f $withval/bin/mysql; then
+              SQL_BINDIR=$withval/bin
+              if test -f $withval/lib64/mysql/libmysqlclient_r.a \
+                  -o -f $withval/lib64/mysql/libmysqlclient_r.so; then
+                  SQL_LIBDIR=$withval/lib64/mysql
+              elif test -f $withval/lib64/libmysqlclient_r.a \
+                  -o -f $withval/lib64/libmysqlclient_r.so; then
+                  SQL_LIBDIR=$withval/lib64
+              elif test -f $withval/lib/libmysqlclient_r.a \
+                  -o -f $withval/lib/libmysqlclient_r.so; then
+                  SQL_LIBDIR=$withval/lib/
+              else
+                  SQL_LIBDIR=$withval/lib/mysql
+              fi
+           else
+              { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+              { { echo "$as_me:$LINENO: error: Unable to find mysql in standard locations" >&5
+echo "$as_me: error: Unable to find mysql in standard locations" >&2;}
+   { (exit 1); exit 1; }; }
+           fi
+           DB_PROG_LIB=$SQL_LIBDIR/libmysqlclient_r.a
+        ;;
+        "postgresql")
+           db_prog="postgresql"
+           PG_CONFIG=`which pg_config`
+           if test -n "$PG_CONFIG"; then
+              SQL_BINDIR=`"$PG_CONFIG" --bindir`
+              SQL_LIBDIR=`"$PG_CONFIG" --libdir`
+           elif test -f /usr/local/bin/psql; then
+              SQL_BINDIR=/usr/local/bin
+              if test -d /usr/local/lib64; then
+                 SQL_LIBDIR=/usr/local/lib64
+              else
+                 SQL_LIBDIR=/usr/local/lib
+              fi
+           elif test -f /usr/bin/psql; then
+              SQL_BINDIR=/usr/local/bin
+              if test -d /usr/lib64/postgresql; then
+                 SQL_LIBDIR=/usr/lib64/postgresql
+              elif test -d /usr/lib/postgresql; then
+                 SQL_LIBDIR=/usr/lib/postgresql
+              elif test -d /usr/lib64; then
+                 SQL_LIBDIR=/usr/lib64
+              else
+                 SQL_LIBDIR=/usr/lib
+              fi
+           elif test -f $withval/bin/psql; then
+              SQL_BINDIR=$withval/bin
+              if test -d $withval/lib64; then
+                 SQL_LIBDIR=$withval/lib64
+              else
+                 SQL_LIBDIR=$withval/lib
+              fi
+           else
+              { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+              { { echo "$as_me:$LINENO: error: Unable to find psql in standard locations" >&5
+echo "$as_me: error: Unable to find psql in standard locations" >&2;}
+   { (exit 1); exit 1; }; }
+           fi
+           DB_PROG_LIB=$SQL_LIBDIR/libpq.a
+        ;;
+        *)
+           { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+           { { echo "$as_me:$LINENO: error: Unable to set DBI driver. $withval is not supported" >&5
+echo "$as_me: error: Unable to set DBI driver. $withval is not supported" >&2;}
+   { (exit 1); exit 1; }; }
+        ;;
+     esac
+
+     { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+     DB_PROG=$db_prog
+  else
+     { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  fi
+
+else
+
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+fi
+
+
+
+
+
+
+
+
+
 
 # -------------------------------------------
 # enable batch attribute DB insert (default on)
@@ -18024,6 +22478,39 @@ if test x$DB_TYPE = xpostgresql; then
    fi
 fi
 
+if test x$DB_TYPE = xdbi; then
+   DB_TYPE=$DB_PROG
+   db_type=$DB_PROG
+   pkg=1
+   # Check for batch insert
+   if test $DB_PROG = postgresql; then
+      A=`nm $DB_PROG_LIB | grep PQputCopyData`
+      pkg=$?
+   fi
+
+   if test $DB_PROG = mysql; then
+      A=`nm $DB_PROG_LIB | grep pthread_mutex_lock`
+      pkg=$?
+   fi
+
+   if test $pkg = 0; then
+      # Check whether --enable-batch-insert was given.
+if test "${enable_batch_insert+set}" = set; then
+  enableval=$enable_batch_insert; if test x$enableval = xno; then
+        support_batch_insert=no
+       else
+        support_batch_insert=yes
+      fi
+fi
+
+   fi
+else
+# If dbi was not chosen, let the comment in file
+uncomment_dbi="#"
+fi
+
+
+
 if test $support_batch_insert = yes ; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -30025,9 +34512,37 @@ darwin)
           platforms/darwin/Makefile"
   ;;
 debian)
+       if `grep -q ubuntu /etc/apt/sources.list`; then
+          DISTNAME="ubuntu"
+       fi
        DISTVER=`cat /etc/debian_version`
-       TAPEDRIVE="/dev/nrst0"
+       if test -f /etc/lsb-release ; then
+          . /etc/lsb-release
+          if test "x$DISTRIB_ID" != "x" ; then
+             DISTNAME=$DISTRIB_ID
+          fi
+          if test "x$DISTRIB_RELEASE" != "x" ; then
+             DISTVER=$DISTRIB_RELEASE
+          fi
+       fi
+       if test "$DISTNAME" = "Ubuntu" ; then
+          DISTNAME="ubuntu"
+       fi
+       TAPEDRIVE="/dev/nst0"
        PSCMD="ps -e -o pid,command"
+       if test "$DISTNAME" = "ubuntu" ; then
+          PFILES="${PFILES} \
+             platforms/ubuntu/Makefile \
+             platforms/ubuntu/bacula-fd \
+             platforms/ubuntu/bacula-sd \
+             platforms/ubuntu/bacula-dir"
+       else
+          PFILES="${PFILES} \
+             platforms/debian/Makefile \
+             platforms/debian/bacula-fd \
+             platforms/debian/bacula-sd \
+             platforms/debian/bacula-dir"
+       fi
   ;;
 freebsd)
        DISTVER=`uname -a |awk '{print $3}'`
@@ -30235,7 +34750,7 @@ if test "x${subsysdir}" = "x${sbindir}" ; then
    exit 1
 fi
 
-ac_config_files="$ac_config_files autoconf/Make.common Makefile manpages/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/bacula-ctl-dir scripts/bacula-ctl-fd scripts/bacula-ctl-sd scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/bgnome-console.console_apps scripts/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/dvd-simulator scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf scripts/wxconsole.console_apps scripts/wxconsole.desktop.consolehelper scripts/wxconsole.desktop.xsu scripts/bat.desktop scripts/bat.desktop.xsu scripts/bat.desktop.consolehelper scripts/bat.console_apps src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome2-console/Makefile src/gnome2-console/bgnome-console.conf src/qt-console/bat.conf src/qt-console/bat.pro src/qt-console/install_conf_file src/wx-console/Makefile src/wx-console/bwx-console.conf src/tray-monitor/Makefile src/tray-monitor/tray-monitor.conf src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/create_sqlite3_database src/cats/update_sqlite3_tables src/cats/make_sqlite3_tables src/cats/grant_sqlite3_privileges src/cats/drop_sqlite3_tables src/cats/drop_sqlite3_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile po/Makefile.in $PFILES"
+ac_config_files="$ac_config_files autoconf/Make.common Makefile manpages/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/bacula-ctl-dir scripts/bacula-ctl-fd scripts/bacula-ctl-sd scripts/devel_bacula scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/bacula.desktop.gnome1.consolehelper scripts/bacula.desktop.gnome2.consolehelper scripts/bacula.desktop.gnome1.xsu scripts/bacula.desktop.gnome2.xsu scripts/bgnome-console.console_apps scripts/mtx-changer scripts/disk-changer scripts/dvd-handler scripts/dvd-simulator scripts/bacula-tray-monitor.desktop scripts/logwatch/Makefile scripts/logwatch/logfile.bacula.conf scripts/wxconsole.console_apps scripts/wxconsole.desktop.consolehelper scripts/wxconsole.desktop.xsu scripts/bat.desktop scripts/bat.desktop.xsu scripts/bat.desktop.consolehelper scripts/bat.console_apps src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome2-console/Makefile src/gnome2-console/bgnome-console.conf src/qt-console/bat.conf src/qt-console/bat.pro src/qt-console/install_conf_file src/wx-console/Makefile src/wx-console/bwx-console.conf src/tray-monitor/Makefile src/tray-monitor/tray-monitor.conf src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/create_sqlite3_database src/cats/update_sqlite3_tables src/cats/make_sqlite3_tables src/cats/grant_sqlite3_privileges src/cats/drop_sqlite3_tables src/cats/drop_sqlite3_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile po/Makefile.in updatedb/update_mysql_tables_10_to_11 updatedb/update_sqlite3_tables_10_to_11 updatedb/update_postgresql_tables_10_to_11 updatedb/update_sqlite_tables_10_to_11 $PFILES"
 
 ac_config_commands="$ac_config_commands default"
 
     "src/findlib/Makefile") CONFIG_FILES="$CONFIG_FILES src/findlib/Makefile" ;;
     "src/tools/Makefile") CONFIG_FILES="$CONFIG_FILES src/tools/Makefile" ;;
     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+    "updatedb/update_mysql_tables_10_to_11") CONFIG_FILES="$CONFIG_FILES updatedb/update_mysql_tables_10_to_11" ;;
+    "updatedb/update_sqlite3_tables_10_to_11") CONFIG_FILES="$CONFIG_FILES updatedb/update_sqlite3_tables_10_to_11" ;;
+    "updatedb/update_postgresql_tables_10_to_11") CONFIG_FILES="$CONFIG_FILES updatedb/update_postgresql_tables_10_to_11" ;;
+    "updatedb/update_sqlite_tables_10_to_11") CONFIG_FILES="$CONFIG_FILES updatedb/update_sqlite_tables_10_to_11" ;;
     "$PFILES") CONFIG_FILES="$CONFIG_FILES $PFILES" ;;
     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
 
@@ -31178,6 +35697,8 @@ INSTOBJEXT!$INSTOBJEXT$ac_delim
 GENCAT!$GENCAT$ac_delim
 INTLOBJS!$INTLOBJS$ac_delim
 INTL_LIBTOOL_SUFFIX_PREFIX!$INTL_LIBTOOL_SUFFIX_PREFIX$ac_delim
+BDB_CPPFLAGS!$BDB_CPPFLAGS$ac_delim
+BDB_LIBS!$BDB_LIBS$ac_delim
 GNOME_INCLUDEDIR!$GNOME_INCLUDEDIR$ac_delim
 GNOMEUI_LIBS!$GNOMEUI_LIBS$ac_delim
 GNOME_LIBDIR!$GNOME_LIBDIR$ac_delim
@@ -31186,6 +35707,8 @@ GNOME_DIR!$GNOME_DIR$ac_delim
 BAT_DIR!$BAT_DIR$ac_delim
 QWT_INC!$QWT_INC$ac_delim
 QWT_LDFLAGS!$QWT_LDFLAGS$ac_delim
+QWT_LIB!$QWT_LIB$ac_delim
+QWT!$QWT$ac_delim
 WXCONS_CPPFLAGS!$WXCONS_CPPFLAGS$ac_delim
 WXCONS_LDFLAGS!$WXCONS_LDFLAGS$ac_delim
 WX_DIR!$WX_DIR$ac_delim
@@ -31212,10 +35735,6 @@ READLINE_SRC!$READLINE_SRC$ac_delim
 PYTHON_LIBS!$PYTHON_LIBS$ac_delim
 PYTHON_INCDIR!$PYTHON_INCDIR$ac_delim
 OPENSSL_LIBS!$OPENSSL_LIBS$ac_delim
-OPENSSL_INC!$OPENSSL_INC$ac_delim
-working_dir!$working_dir$ac_delim
-archivedir!$archivedir$ac_delim
-scriptdir!$scriptdir$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -31257,6 +35776,10 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+OPENSSL_INC!$OPENSSL_INC$ac_delim
+working_dir!$working_dir$ac_delim
+archivedir!$archivedir$ac_delim
+scriptdir!$scriptdir$ac_delim
 dump_email!$dump_email$ac_delim
 job_email!$job_email$ac_delim
 smtp_host!$smtp_host$ac_delim
@@ -31274,6 +35797,8 @@ mon_fd_password!$mon_fd_password$ac_delim
 mon_sd_password!$mon_sd_password$ac_delim
 db_name!$db_name$ac_delim
 db_user!$db_user$ac_delim
+db_password!$db_password$ac_delim
+db_port!$db_port$ac_delim
 dir_user!$dir_user$ac_delim
 dir_group!$dir_group$ac_delim
 sd_user!$sd_user$ac_delim
@@ -31285,6 +35810,9 @@ SQL_LFLAGS!$SQL_LFLAGS$ac_delim
 SQL_INCLUDE!$SQL_INCLUDE$ac_delim
 SQL_BINDIR!$SQL_BINDIR$ac_delim
 DBI_DBD_DRIVERDIR!$DBI_DBD_DRIVERDIR$ac_delim
+uncomment_dbi!$uncomment_dbi$ac_delim
+DB_PROG!$DB_PROG$ac_delim
+DB_PROG_LIB!$DB_PROG_LIB$ac_delim
 cats!$cats$ac_delim
 DB_TYPE!$DB_TYPE$ac_delim
 GETCONF!$GETCONF$ac_delim
@@ -31313,7 +35841,7 @@ DISTVER!$DISTVER$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 54; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -31875,12 +36403,11 @@ if test "${support_bat}" = "yes" ; then
     QMAKEBIN=qmake-qt4
   fi
 
-
-
   cd src/qt-console
   chmod 755 install_conf_file build-depkgs-qt-console
   echo "Creating bat Makefile"
   $QMAKEBIN
+  make clean
   cd ${BUILD_DIR}
 fi
 
@@ -31893,6 +36420,10 @@ chmod 755 dvd-handler dvd-simulator
 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
 cd ..
 
+c=updatedb
+chmod 755 $c/update_mysql_tables_10_to_11      $c/update_sqlite3_tables_10_to_11
+chmod 755 $c/update_postgresql_tables_10_to_11 $c/update_sqlite_tables_10_to_11
+
 c=src/cats
 
 chmod 755 $c/create_bacula_database   $c/update_bacula_tables  $c/make_bacula_tables
 echo "
 Configuration on `date`:
 
-  Host:                      $host -- ${DISTNAME} ${DISTVER}
-  Bacula version:            ${VERSION} (${DATE})
+  Host:                       $host -- ${DISTNAME} ${DISTVER}
+  Bacula version:             ${VERSION} (${DATE})
   Source code location:       ${srcdir}
-  Install binaries:          ${sbindir}
+  Install binaries:           ${sbindir}
   Install config files:       ${sysconfdir}
-  Scripts directory:         ${scriptdir}
-  Archive directory:         ${archivedir}
-  Working directory:         ${working_dir}
-  PID directory:             ${piddir}
-  Subsys directory:          ${subsysdir}
-  Man directory:             ${mandir}
-  Data directory:            ${datadir}
-  C Compiler:                ${CC} ${CCVERSION}
-  C++ Compiler:              ${CXX} ${CXXVERSION}
-  Compiler flags:            ${WCFLAGS} ${CFLAGS}
-  Linker flags:              ${WLDFLAGS} ${LDFLAGS}
-  Libraries:                 ${LIBS}
+  Scripts directory:          ${scriptdir}
+  Archive directory:          ${archivedir}
+  Working directory:          ${working_dir}
+  PID directory:              ${piddir}
+  Subsys directory:           ${subsysdir}
+  Man directory:              ${mandir}
+  Data directory:             ${datadir}
+  C Compiler:                 ${CC} ${CCVERSION}
+  C++ Compiler:               ${CXX} ${CXXVERSION}
+  Compiler flags:             ${WCFLAGS} ${CFLAGS}
+  Linker flags:               ${WLDFLAGS} ${LDFLAGS}
+  Libraries:                  ${LIBS}
   Statically Linked Tools:    ${support_static_tools}
   Statically Linked FD:       ${support_static_fd}
   Statically Linked SD:       ${support_static_sd}
   Statically Linked DIR:      ${support_static_dir}
   Statically Linked CONS:     ${support_static_cons}
-  Database type:             ${db_type}
-  Database lib:              ${DB_LIBS}
-  Database name:             ${db_name}
-  Database user:             ${db_user}
-
-  Job Output Email:          ${job_email}
-  Traceback Email:           ${dump_email}
-  SMTP Host Address:         ${smtp_host}
-
-  Director Port:             ${dir_port}
-  File daemon Port:          ${fd_port}
-  Storage daemon Port:       ${sd_port}
-
-  Director User:             ${dir_user}
-  Director Group:            ${dir_group}
-  Storage Daemon User:       ${sd_user}
-  Storage DaemonGroup:       ${sd_group}
-  File Daemon User:          ${fd_user}
-  File Daemon Group:         ${fd_group}
+  Database type:              ${db_type}
+  Database port:              ${db_port}
+  Database lib:               ${DB_LIBS}
+  Database name:              ${db_name}
+  Database user:              ${db_user}
+
+  Job Output Email:           ${job_email}
+  Traceback Email:            ${dump_email}
+  SMTP Host Address:          ${smtp_host}
+
+  Director Port:              ${dir_port}
+  File daemon Port:           ${fd_port}
+  Storage daemon Port:        ${sd_port}
+
+  Director User:              ${dir_user}
+  Director Group:             ${dir_group}
+  Storage Daemon User:        ${sd_user}
+  Storage DaemonGroup:        ${sd_group}
+  File Daemon User:           ${fd_user}
+  File Daemon Group:          ${fd_group}
 
   SQL binaries Directory      ${SQL_BINDIR}
 
-  Large file support:        $largefile_support
+  Large file support:         $largefile_support
   Bacula conio support:       ${got_conio} ${CONS_LIBS}
-  readline support:          ${got_readline} ${PRTREADLINE_SRC}
+  readline support:           ${got_readline} ${PRTREADLINE_SRC}
   TCP Wrappers support:       ${TCPW_MSG} ${WRAPLIBS}
-  TLS support:               ${support_tls}
-  Encryption support:        ${support_crypto}
-  ZLIB support:              ${have_zlib}
-  enable-smartalloc:         ${support_smartalloc}
-  bat support:               ${support_bat} ${QWT_LDFLAGS}
-  enable-gnome:              ${support_gnome} ${gnome_version}
-  enable-bwx-console:        ${support_wx_console} ${wx_version}
-  enable-tray-monitor:       ${support_tray_monitor}
-  client-only:               ${build_client_only}
-  build-dird:                ${build_dird}
-  build-stored:              ${build_stored}
-  ACL support:               ${have_acl}
-  Python support:            ${support_python} ${PYTHON_LIBS}
+  TLS support:                ${support_tls}
+  Encryption support:         ${support_crypto}
+  ZLIB support:               ${have_zlib}
+  enable-smartalloc:          ${support_smartalloc}
+  bat support:                ${support_bat} ${QWT_LDFLAGS}
+  enable-gnome:               ${support_gnome} ${gnome_version}
+  enable-bwx-console:         ${support_wx_console} ${wx_version}
+  enable-tray-monitor:        ${support_tray_monitor}
+  client-only:                ${build_client_only}
+  build-dird:                 ${build_dird}
+  build-stored:               ${build_stored}
+  ACL support:                ${have_acl}
+  Python support:             ${support_python} ${PYTHON_LIBS}
   Batch insert enabled:       ${support_batch_insert}
+  Berkeley DB support:        ${support_libdb} ${BDB_LIBS}
 
   " > config.out