Do not require libtool in PATH at build time

The build-time requirement for libtool was introduced inadvertently:

 1. Commit 1628f5865a added a check to
    configure.ac which claims to test whether the libtool script is
    available.  There are two problems with that check:

      - it is effectively a no-op as the AC_PROG_LIBTOOL() macro always
        sets the LIBTOOL variable [1],

      - this check was intended to be performed before autoreconf is
        run, not when ./configure is run; the libtool script is supposed
        to be dynamically generated by ./configure on the build host and
        thus there is no need for a standalone libtool script to be
        installed system-wide on every host attempting to build BIND 9
        e.g. from a tarball produced by "make dist".

 2. Commit a7982d14dd was based on the
    incorrect assumption that the AC_PROG_LIBTOOL() macro looks for the
    libtool binary in PATH and sets the LIBTOOL variable accordingly,
    which is what other AC_PROG_*() macros do.  Meanwhile, the
    AC_PROG_LIBTOOL() macro only initializes libtool for use with
    Automake.  It is not necessary for a standalone libtool script to be
    available in PATH on the build host when ./configure is run.

Do not look for libtool in PATH at build time as it prevents hosts
without a libtool script available system-wide from building BIND 9 from
source tarballs prepared using "make dist".  Note that libtool m4
macros, utilities, etc. still need to be present on a given host if
autoreconf is to be run on it.

[1] https://git.savannah.gnu.org/cgit/libtool.git/tree/m4/libtool.m4?h=v2.4.6#n89
This commit is contained in:
Michał Kępień
2021-02-19 11:52:56 +01:00
parent 0b8d2bfb4c
commit b630c698f9

View File

@@ -107,9 +107,6 @@ AC_PROG_MAKE_SET
# Checks for programs.
m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) # call AM_PROG_AR only if available
AC_PATH_PROG([LIBTOOL], [libtool])
AS_IF([test -z "$LIBTOOL"],
[AC_MSG_ERROR([The libtool script could not be found.])])
AC_PROG_INSTALL
AC_PROG_LN_S
AX_POSIX_SHELL