# HG changeset patch # User W. Michael Petullo # Date 1490394571 14400 # Node ID ec4cf766b31f434d512d366c9064c9d6afa36c64 # Parent e098e49fcc3477d78e098b5fba481c6f3e6d97ba Allow explicit disable of libidn at configure time Signed-off-by: W. Michael Petullo diff -r e098e49fcc34 -r ec4cf766b31f configure.ac --- a/configure.ac Sun Jan 29 21:10:56 2017 +0100 +++ b/configure.ac Fri Mar 24 18:29:31 2017 -0400 @@ -109,9 +109,22 @@ fi AC_SUBST([TEST_DIRS]) -PKG_CHECK_MODULES(LIBIDN, libidn, have_idn=yes, have_idn=no) -if test "x$have_idn" = "xyes"; then - AC_DEFINE(HAVE_IDN, 1, [Define if IDN support is included]) +dnl +--------------------------------------------------------+ +dnl | Checking for libidn support |- +dnl +--------------------------------------------------------+ +AC_ARG_WITH(idn, + AS_HELP_STRING([--with-idn=@<:@auto|no@:>@], + [Whether to use libidn [[default=auto]]]), + ac_idn=$withval, + ac_idn=auto) + +if test "x$ac_idn" = "xauto"; then + PKG_CHECK_MODULES(LIBIDN, libidn, enable_idn=yes, enable_idn=no) + if test "x$enable_idn" = "xyes"; then + AC_DEFINE(HAVE_IDN, 1, [Define if IDN support is included]) + fi +else + enable_idn=no fi dnl Gtk doc @@ -323,7 +336,7 @@ prefix: ${prefix} compiler: ${CC} - Have IDN support: ${have_idn} + Enable IDN support: ${enable_idn} Enable SSL: ${enable_ssl} Asynchronous DNS: ${enable_asyncns} Linux TCP keepalives: ${use_keepalives}