berkeley db debian wheezy
Here is good guide (read comments too)
https://www.howtoforge.com/tutorial/how-to-compile-and-install-bitcoin-core-on-debian-wheezy/

also you can use bdb 5.1 (./configure --with-incompatible-bdb) if you don't have a plan to move bitcoin data to/from other computer