dig does not support IDN without configure option
Summary
Without configure option: --with-libidn2, dig does not support IDN even though libidn2 library header is installed.
BIND version affected
# ./bin/named/named -V | head -1
BIND 9.19.21 (Development Release) <id:c030a67>
Steps to reproduce
- prepare for build
# docker run --rm -it rockylinux:9.3
(in the container)
# dnf groupinstall -y "Development Tools"
# dnf in --enablerepo=crb -y libidn2-devel openssl-devel libnghttp2-devel libuv-devel libcap-devel
# pkg-config --libs libidn2
-lidn2 <== library header is installed
2a. configure without "--with-libidn2" and make binary
# curl -O https://downloads.isc.org/isc/bind9/9.19.21/bind-9.19.21.tar.xz
# tar xf bind-9.19.21.tar.xz
# cd bind-9.19.21
# ./configure | tee configure.log
# grep idn configure.log
IDN support (--with-libidn2) <=== what's this?
# make
3a. check dig suppports +idn or not
# ./bin/dig/dig -h | grep idn
(not match)
^^^^^^^^^^^
# ./bin/dig/dig +noall +ans +idn xn--wgv71a119e.jp
;; IDN support is not available
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
xn--wgv71a119e.jp. 275 IN A 117.104.133.183
2b. configure with "--with-libidn2" and make binary
# curl -O https://downloads.isc.org/isc/bind9/9.19.21/bind-9.19.21.tar.xz
# tar xf bind-9.19.21.tar.xz
# cd bind-9.19.21
# ./configure --with-libidn2 | tee configure.log
^^^^^^^^^^^^^^
# grep idn configure.log
checking for libidn2... yes
# make
3b. check dig suppports +idn or not
# ./bin/dig/dig -h | grep idn
+[no]idn (convert international domain names)
# ./bin/dig/dig +noall +ans +idn xn--wgv71a119e.jp
日本語.jp. 300 IN A 117.104.133.183
^^^^^^^^^^
What is the current bug behavior?
configure DOES NOT find libidn2 library header automatically
What is the expected correct behavior?
configure find libidn2 library header automatically
in the other words,
dig supports +idn option without explicitly configure option when libidn2 library header is installed
Relevant configuration files
no config files
Relevant logs
no logs or see Steps to reproduce