--- lib.old/cyrusdb_berkeley.c 2007-04-05 01:23:42.518845824 +0200 +++ lib/cyrusdb_berkeley.c 2007-04-05 01:22:20.000000000 +0200 @@ -159,7 +159,15 @@ syslog(LOG_WARNING, "DBERROR: invalid berkeley_locks_max value, using internal default"); } else { +#if DB_VERSION_MAJOR >= 4 + r = dbenv->set_lk_max_locks(dbenv, opt); + if (!r) + r = dbenv->set_lk_max_lockers(dbenv, opt); + if (!r) + r = dbenv->set_lk_max_objects(dbenv, opt); +#else r = dbenv->set_lk_max(dbenv, opt); +#endif if (r) { dbenv->err(dbenv, r, "set_lk_max"); syslog(LOG_ERR, "DBERROR: set_lk_max(): %s", db_strerror(r)); --- cmulocal/berkdb.m4.orig 2007-05-01 18:05:00.000000000 +0200 +++ cmulocal/berkdb.m4 2007-05-01 18:05:17.000000000 +0200 @@ -212,7 +212,7 @@ fi saved_LIBS=$LIBS - for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db + for dbname in db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db do LIBS="$saved_LIBS -l$dbname" AC_TRY_LINK([#include ],