This is a really old thread (

!) but I ran into the same problem and was able to eventually get it fixed.
The problem was two-fold...
A) Didn't have the Berkeley DB libraries and headers installed
B) Had to do a 'make clean' before doing a new 'make'
== A ==
When you configure webalizer, even with the --enable-dns option, you need to be on the lookout for this warning:
configure: WARNING: db.h not found.. DNS/GeoDB code disabled!
configure will complete even with that warning message and tell you to run 'make'... but DNS support won't be included. You have to watch for that warning message. If you see it, it means Berkeley DB isn't installed.
== B ==
After installing Berkeley DB, I redid the ./configure and it showed that db.h was found, but after doing a make && make install, webalizer was still saying that DNS support wasn't present. This was because re-running ./configure didn't invalidate all the old '*.o' files in the webalizer src dir and dns support was still missing from them. I had to do an explicit 'make clean' before doing the 'make && make install'.
Hope this helps someone!
---Lawrence