For clarity I suggest putting double quotes around the options, i.e.
LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib/" CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include/"

Also: does redefining those options lose any built-in options like optimization flags? I'd still prefer to have specific settings to specify the BDB paths (see #3921).