Just to be elegant about it... (and since we have bash for sure)
C_INCLUDE_PATH=${C_INCLUDE_PATH:+$C_INCLUDE_PATH:}/usr/include/db4
(advantage: no external calls to /usr/bin/test) The whole slew of ${blah:funnychar blah} constructs in bash are pretty handy.
It's almost certainly the package being dim-witted, but Patrick puts the db.h from BerkleyDB v3 in /usr/include (as a symlink) so it
should have been able to detect it that way.
You also might want to look at
http://www.linuxquestions.org/questi...d.php?t=427945 for more hints. They had essentially the same problem.