Merge pull request #28 from MikePetullo/master
authorMikael Berthe <mikael@lilotux.net>
Sat, 08 Apr 2017 19:07:29 +0200
changeset 717 de936894985f
parent 715 e098e49fcc34 (current diff)
parent 716 ec4cf766b31f (diff)
child 718 a1d2735ccda8
child 720 5d41102c2812
Merge pull request #28 from MikePetullo/master Allow explicit disable of libidn at configure time committer: GitHub <noreply@github.com>
--- a/configure.ac	Sun Jan 29 21:10:56 2017 +0100
+++ b/configure.ac	Sat Apr 08 19:07:29 2017 +0200
@@ -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}