Solved.
* Get the latest DB from oricle
http://www.oracle.com/technology/sof.../db/index.html
* Compile and install it
cd build_unix
../dist/configure
make
sudo make install
Now I had the DB in /usr/BerkeleyDB.4.5/
remove all /usr/lib/libdb files. (I had some libdbh that I left alone)
manually remove /usr/lib/db* - best not do it blindly. butI had references to db3 and db4
Now copy /usr/BerkeleyDB.4.5/bin lib and include to /usr/bin lib and include.
run ldconfig
openldaps configure should work now