BIND installation should be done by setting $DESTDIR during "make
install", not by setting --prefix via ./configure to the destination
directory. However, on 9.11 --prefix still needs to be set to eliminate
the compatibility mode with older BIND9 releases (see the comment in
configure.ac, lines 379-396), which does not place sysconfdir and
localstatedir to $DESTDIR/$prefix but directly to $DESTDIR. When
--prefix is set they end up in $DESTDIR/$prefix, which is the BIND 9.16+
default).
$ ./configure && make && make install DESTDIR=/tmp/bind9
$ ls /tmp/bind9/{,usr/local}
/tmp/bind9/:
etc usr var
/tmp/bind9/usr/local:
bin include lib sbin share
$ ./configure --prefix=/usr/local && make && make install DESTDIR=/tmp/bind9
$ ls /tmp/bind9/{,usr/local}
/tmp/bind9/:
usr
/tmp/bind9/usr/local:
bin etc include lib sbin share var
Make sure that installation with DESTDIR=<PATH> works by checking that
named binary and it's respective man page were installed and that
well-known BIND9 directories - and only them - are present in DESTDIR.
Also rename install path variable from BIND_INSTALL_PATH to
INSTALL_PATH to avoid namespace clash in stress tests which use
BIND_INSTALL_PATH variable to configure path to BIND9 binaries.
(cherry picked from commit 823bf3e79b)