package/libldns: add an option to build and install drill

The libldns library also comes with a CLI tool named drill, allowing to
perform DNS requests. Drill build is currently disabled by default.

Add a KConfig option to allow building and installing drill tool. Set
the default value to n to preserve the current behavior. Similarly to
linktest (see the comment in the .mk), drill fails to build correctly as
a static binary, so make the new option depend on non-static build.

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Alexis Lothoré
2025-12-09 09:54:11 +01:00
committed by Julien Olivain
parent 1bd758209e
commit 70a689f9dc
2 changed files with 20 additions and 0 deletions

View File

@@ -8,3 +8,16 @@ config BR2_PACKAGE_LIBLDNS
experimental software for current Internet Drafts.
http://www.nlnetlabs.nl/projects/ldns
if BR2_PACKAGE_LIBLDNS
config BR2_PACKAGE_LIBLDNS_DRILL
bool "drill binary"
depends on !BR2_STATIC_LIBS
help
Install the drill binary
comment "drill needs a toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS
endif # BR2_PACKAGE_LIBLDNS

View File

@@ -45,4 +45,11 @@ endif
# interested in the lib target anyway
LIBLDNS_MAKE_OPTS = lib
ifeq ($(BR2_PACKAGE_LIBLDNS_DRILL),y)
LIBLDNS_CONF_OPTS += --with-drill
LIBLDNS_MAKE_OPTS += drill
else
LIBLDNS_CONF_OPTS += --without-drill
endif
$(eval $(autotools-package))