OpenLDAP's slapd(8) MDB primary database backend uses the LMDB software included with the OpenLDAP source. There is no need to download any additional software to have MDB support.
OpenLDAP's slapd(8) BDB and HDB deprecated database backends require Oracle Corporation's Berkeley DB. If not available at configure time, you will not be able to build slapd(8) with these deprecated database backends.
Your operating system may provide a supported version of Berkeley DB in the base system or as an optional software component. If not, you'll have to obtain and install it yourself. Berkeley DB is available from Oracle Corporation's Berkeley DB download page if required.
There are several versions available from Oracle Corporation. Berkeley DB version 6.0.20 and later uses a software license that is incompatible with LDAP technology and should not be used with OpenLDAP.