aboutsummaryrefslogtreecommitdiff
path: root/libs/loudmouth/patches/001-allow-disable-libidn.patch
blob: 88aac5bdcad9540aeceb27f4b47dccc68ccfb931 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff --git a/configure.ac b/configure.ac
index 8435d9a..148453c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -109,9 +109,22 @@ else
 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 @@ echo "
 
         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}