Our BDB detection macro has explicit checks for -ldb45, -ldb44, ... -ldb41 before falling back to -ldb4. So right now while I have db46 (and older versions) installed on the system, RE24 configure picks the wrong library. I think we should drop the link tests for minor version and only check for -ldb4.
Another alternative would be to move the db.h tests earlier and look for the library that matches the header file version number.
Any thoughts?