Read this thread, from its starting post by Ben Collins-Sussman:
http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=24279
Basically, some systems (FreeBSD, at least) have Berkeley DB 4.x as
`db4', and plain `db' is 3.x or whatever. Our algorithm for locating
the correct lib should therefore search for db4 first, then fall back
to db. The easy answer is to change ac-helpers/berkeley-db.m4
accordingly; but Ben points out that apr-util's configury is already
Doing The Right Thing, so it might make more sense to just have it
export the answer to Subversion and avoid code duplication.