mirror of
https://github.com/rfc1036/whois.git
synced 2026-05-03 06:51:09 +00:00
Autodetect libidn/libidn2 support with pkg-config
libidn2 >= 2.0.3 must be used, or else it would silently remove characters not valid in hostnames like "/" and "_". For details see https://github.com/rfc1036/whois/issues/50 . For more information about IDNA2003 vs. IDNA2008 and TR46 see: http://nmav.gnutls.org/2017/04/the-mess-with-internationalized-domain.html http://unicode.org/faq/idn.html https://fedoraproject.org/wiki/Changes/IDNA2008
This commit is contained in:
parent
a786e83add
commit
e20b8bbab3
14
Makefile
14
Makefile
@ -32,14 +32,12 @@ ifdef LOCALEDIR
|
||||
DEFS += -DLOCALEDIR=\"$(BASEDIR)$(prefix)/share/locale\"
|
||||
endif
|
||||
|
||||
ifdef HAVE_LIBIDN2
|
||||
whois_LDADD += -lidn2
|
||||
DEFS += -DHAVE_LIBIDN2
|
||||
else
|
||||
ifdef HAVE_LIBIDN
|
||||
whois_LDADD += -lidn
|
||||
DEFS += -DHAVE_LIBIDN
|
||||
endif
|
||||
ifeq ($(shell pkg-config --exists 'libidn2 >= 2.0.3' || echo NO),)
|
||||
whois_LDADD += $(shell pkg-config --libs libidn2)
|
||||
DEFS += -DHAVE_LIBIDN2 $(shell pkg-config --cflags libidn2)
|
||||
else ifeq ($(shell pkg-config --exists 'libidn' || echo NO),)
|
||||
whois_LDADD += $(shell pkg-config --libs libidn)
|
||||
DEFS += -DHAVE_LIBIDN $(shell pkg-config --cflags libidn)
|
||||
endif
|
||||
|
||||
ifdef HAVE_ICONV
|
||||
|
||||
2
debian/rules
vendored
2
debian/rules
vendored
@ -16,7 +16,7 @@ D := $(CURDIR)/debian/whois
|
||||
|
||||
build:
|
||||
dh_testdir
|
||||
$(MAKE) CONFIG_FILE="/etc/whois.conf" HAVE_LIBIDN=1 HAVE_ICONV=1
|
||||
$(MAKE) CONFIG_FILE="/etc/whois.conf" HAVE_ICONV=1
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user