Move the include Makefile.tests to the bottom of Makefile.am(s)
The Makefile.tests was modifying global AM_CFLAGS and LDADD and could accidentally pull /usr/include to be listed before the internal libraries, which is known to cause problems if the headers from the previous version of BIND 9 has been installed on the build machine.
Edited by Ondřej Surý