The configure script tests for various versions of BDB. Unfortunately not the latest BDB 5.3 that is in the ports tree as databases/db5.
I've been manually fixing this for a while, but the latest PHP update again broke it so I finally caved in and made an actual patch :-)
Seems to work for me, php5-dba is able to handle db53 as is if configure finds it.
Fix: Attached is a replacement for the patch included in the php5-dba port right now. This is not a patch of the patch, but a complete replacement. For completeness sake I added all current versions of BDB, not just 5.3 which is in the ports tree.
Try to build databases/php5-dba
Enjoy configure choke in BDB tests
Over to maintainer (via the GNATS Auto Assign Tool)
A different patch has been committed, please contact me if it doesn't work as expected.