* aclocal.m4 (KRB5_AC_CHOOSE_DB): New macro.
authorKen Raeburn <raeburn@mit.edu>
Fri, 13 Sep 2002 22:57:41 +0000 (22:57 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 13 Sep 2002 22:57:41 +0000 (22:57 +0000)
(CONFIG_RULES): Invoke it.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14854 dc483132-0cff-0310-8789-dd5450dbe970

src/ChangeLog
src/aclocal.m4

index 25b579c1a2fcfecf1e291ea7106e61ecba5f6155..a451755e8b1dbe23343b3b7cb7d9ad869f40d099 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-13  Ken Raeburn  <raeburn@mit.edu>
+
+       * aclocal.m4 (KRB5_AC_CHOOSE_DB): New macro.
+       (CONFIG_RULES): Invoke it.
+
 2002-09-03  Ken Raeburn  <raeburn@mit.edu>
 
        * aclocal.m4 (KRB_INCLUDE): Put in-tree include dirs before
index b54b07c4be5cba1fb04f85bf9152840ce5de0a82..896348b0174b027be63d6a17047615da354499f5 100644 (file)
@@ -53,6 +53,7 @@ WITH_LDOPTS dnl
 WITH_KRB4 dnl
 KRB5_AC_CHOOSE_ET dnl
 KRB5_AC_CHOOSE_SS dnl
+KRB5_AC_CHOOSE_DB dnl
 dnl allow stuff in tree to access deprecated/private stuff for now
 ADD_DEF([-DKRB5_PRIVATE=1]) dnl
 ifdef([AC_PROG_CC_STDC], [AC_PROG_CC_STDC])
@@ -1447,3 +1448,38 @@ fi
 AC_SUBST(SS_LIB)
 AC_SUBST(SS_VERSION)
 ])
+dnl
+AC_DEFUN([KRB5_AC_CHOOSE_DB],[
+AC_ARG_WITH(system-db,
+           AC_HELP_STRING(--with-system-db,use system Berkeley db library @<:@default: use a private version@:>@))
+AC_ARG_VAR(DB_HEADER,[header file to include for Berkeley db package, if --with-system-db was specified [db.h]])
+AC_ARG_VAR(DB_LIB,[system library for Berkeley db package, if --with-system-db was specified [-ldb]])
+if test "x$with_system_db" = xyes ; then
+  DB_VERSION=sys
+  # TODO: Do we have specific routines we should check for?
+  # How about known, easily recognizable bugs?
+  # We want to use bt_rseq in some cases, but no other version but
+  # ours has it right now.
+  #
+  # Okay, check the variables.
+  test "x${DB_HEADER+set}" = xset || DB_HEADER=db.h
+  test "x${DB_LIB+set}" = xset || DB_LIB=-ldb
+  #
+  if test "x${DB_HEADER}" = xdb.h ; then
+    DB_HEADER_VERSION=sys
+  else
+    DB_HEADER_VERSION=redirect
+  fi
+else
+  DB_VERSION=k5
+  AC_DEFINE(HAVE_BT_RSEQ,1,[Define if bt_rseq is available, for recursive btree traversal.])
+  DB_HEADER=db.h
+  DB_HEADER_VERSION=k5
+  DB_LIB=-ldb
+fi
+AC_SUBST(DB_VERSION)
+AC_SUBST(DB_HEADER)
+AC_SUBST(DB_HEADER_VERSION)
+AC_SUBST(DB_LIB)
+])
+dnl