package/dnsmasq: add libidn2 support
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Thu, 20 Jun 2019 16:23:24 +0000 (18:23 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 22 Jun 2019 07:57:00 +0000 (09:57 +0200)
libidn2 is preferred over libidn, see src/util.c:
 #if defined(HAVE_LIBIDN2)
 #include <idn2.h>
 #elif defined(HAVE_IDN)
 #include <idna.h>
 #endif

So select libidn2 if libidn is not enabled

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/dnsmasq/Config.in
package/dnsmasq/dnsmasq.mk

index cec68a9ebaf9af5f03fea7f0933d71eb1b1e9f75..d7f3d74bd4d3ffdcf662279608c48eba69eb6f29 100644 (file)
@@ -29,7 +29,7 @@ config BR2_PACKAGE_DNSMASQ_DNSSEC
 
 config BR2_PACKAGE_DNSMASQ_IDN
        bool "IDN support"
-       select BR2_PACKAGE_LIBIDN
+       select BR2_PACKAGE_LIBIDN2 if !BR2_PACKAGE_LIBIDN
        help
          Enable IDN support in dnsmasq.
          This option is a big space taker since it pulls in many
index 366cebf01254a699bb1393ccb1c0b0e84dac5c3c..f271523068170a11531653be4790cd5c4a7661aa 100644 (file)
@@ -34,9 +34,14 @@ DNSMASQ_COPTS += -DNO_TFTP
 endif
 
 ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y)
+ifeq ($(BR2_PACKAGE_LIBIDN2),y)
+DNSMASQ_DEPENDENCIES += libidn2
+DNSMASQ_COPTS += -DHAVE_LIBIDN2
+else
 DNSMASQ_DEPENDENCIES += libidn
 DNSMASQ_COPTS += -DHAVE_IDN
 endif
+endif
 
 ifeq ($(BR2_PACKAGE_DNSMASQ_CONNTRACK),y)
 DNSMASQ_DEPENDENCIES += libnetfilter_conntrack