LDAP not getting configured!!!

hi,
i m tryin to learn ldap.
but its not getting configured.
the error msg it shows is:

LDAP configure error: BDB/HDB : Berkeley DB version incompatibe.
The BDB version i have installed is bdb4.2.52 and the ldap version is openldap-2.3.12.
my machine is running on red hat linux 9.

Why is this?

what r the specifications required for a successful LDAP installation with BDB as the backend.

thanx.

Open the config.log file. It should contain a log of the ./configure tests results. What is shown around the error line?

Some months ago I compiled LDAP on a Slackware 10.0 machine without problems.