summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac25
1 files changed, 18 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 1cca2406b3..73174c358f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -464,24 +464,32 @@ fi
PKG_CHECK_MODULES(CMOCKA, cmocka, [with_cmocka=yes], [with_cmocka=no])
AM_CONDITIONAL(HAVE_CMOCKA, test "$with_cmocka" != "no")
-AC_ARG_WITH(idn, AS_HELP_STRING([--without-idn],
- [disable support for libidn]),
- try_libidn="$withval",
- try_libidn=yes)
-
with_old_nettle=no
if ! $PKG_CONFIG --atleast-version=3.3 nettle; then
with_old_nettle=yes
fi
AM_CONDITIONAL(WITH_OLD_NETTLE, test "$with_old_nettle" != "no")
+
+AC_ARG_WITH(idn, AS_HELP_STRING([--without-idn],
+ [disable support for libidn]),
+ try_libidn="$withval",
+ try_libidn=yes)
+
+AC_ARG_WITH(libidn2, AS_HELP_STRING([--without-libidn2],
+ [force support for libidn instead of libidn2]),
+ try_libidn2="$withval",
+ try_libidn2=yes)
+
idna_support=no
with_libidn2=no
with_libidn=no
if test "$try_libidn" = yes;then
+
+ if test "$try_libidn2" = yes;then
AC_SEARCH_LIBS(idn2_lookup_u8, idn2, [
with_libidn2=yes;
- idna_support="IDNA 2008"
+ idna_support="IDNA 2008 (libidn2)"
AC_DEFINE([HAVE_LIBIDN2], 1, [Define if IDNA 2008 support is enabled.])
AC_SUBST([LIBIDN_LIBS], [-lidn2])
if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then
@@ -493,11 +501,14 @@ if test "$try_libidn" = yes;then
with_libidn2=no;
AC_MSG_WARN(*** LIBIDN2 was not found. You will not be able to use IDN2008 support)
])
+ else
+ with_libidn2=no
+ fi
if test "$with_libidn2" = "no"; then
PKG_CHECK_MODULES(LIBIDN, libidn >= 0.5.6, [with_libidn=yes], [with_libidn=no])
if test "$with_libidn" != "no";then
- idna_support="IDNA 2003"
+ idna_support="IDNA 2003 (libidn)"
if ! $PKG_CONFIG --atleast-version=1.31 libidn; then
with_buggy_libidn=yes
fi