It definitely seems that something has changed (read - has been broken) in the latest version of openldap related to finding the correct version of Berkeley DB. People keep reporting it, but I think it keeps slipping past the people who have the knowledge to fix it as a simply newbie problem.
I'd open an ITS, but I don't understand the problem well enough to even make a decent report. When I moved to 2.2.15, I found that I now have to set the LD_LIBRARY_PATH variable in order to build on RedHat 9 - but I don't have to set it to build older versions of openldap. Previously, I only had to set the LDFLAGS (-L and -R) and the CPPFLAGS (-I) to make it work.
I'm going to reforward two messages to the list (from the last month or so) which appear to be related.