add a USE flag dns that turns on --with-dns in $myconf
It seems 3.8 already supports this out of the box without any configure directives.