I built on RHEL5 with 4.6.21.3 with the db4internal option on my package,
which builds db4 as follows:
../dist/configure --build=x86_64-redhat-linux --prefix=/usr \
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc \
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 \
--libexecdir=/usr/sbin --localstatedir=/var --sharedstatedir=/usr/com \
--mandir=/usr/share/man --infodir=/usr/share/info --enable-shared \
--disable-static --with-uniquename=_openldap_slapd24_mdv \
--program-prefix=slapd2.4_ \
--with-mutex=POSIX/pthreads/library
Exactly the same behaviour.
Will post the entire build log tomorrow, and maybe test on 4.7 as well.