A few of the BIND9 programs have common code that is statically
linked. For example `dighost.c` is used by both `dig` and `host`.
`libdighost.la` is specified to automake in noinst_LTLIBRARIES, which
eventually becomes a libtool --mode=link invocation without a -rpath
argument.
GNU libtool interprets a link invocation without -rpath this as an
instruction to make a static library only, which agrees with the
comment in `link_fixup()` in jlibtool. But when cmd->output ==
OUT_LIB, jlibtool still tries to build a dynamic library. This fails
on my Mac; if I remove ERROR("Installation mode requires -rpath")
it links dynamically and fails at runtime.
I am not sure if jlibtool should have worked out the correct
cmd->output mode earlier, but if so the comment would be in the wrong
place.
if (cmd->options.shared == SHARE_SHARED) {
cmd->install_path = LIBDIR;
}
+ if (cmd->output == OUT_LIB) {
+ cmd->output = OUT_STATIC_LIB_ONLY;
+ }
}
if (cmd->output == OUT_DYNAMIC_LIB_ONLY ||