aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-04-26 07:08:36 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-04-26 07:08:36 +0000
commit241a4b3d45b5b09ea90add3bf12435bb58bca179 (patch)
tree8f5af55292b0e297011084f1a149b4136cb05978
parent496e81a25a27d71d97f66dde065be6ec597192f0 (diff)
--with-libidn[=PATH] is now supported
-rw-r--r--configure.ac29
1 files changed, 29 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index bada5a28d..013d285f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1227,6 +1227,35 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]),
AC_MSG_RESULT(no)
)
+AC_MSG_CHECKING([whether to build with libidn])
+AC_ARG_WITH(idn,
+AC_HELP_STRING([--with-libidn=PATH],[Enable libidn usage])
+AC_HELP_STRING([--without-libidn],[Disable libidn usage]),
+ [LIBIDN="$withval" ])
+
+case "$LIBIDN" in
+ no)
+ AC_MSG_RESULT(no)
+ ;;
+ *) AC_MSG_RESULT(yes)
+ AC_CHECK_LIB(idn, idna_to_ascii_lz, ,
+ [
+ dnl if there was a given path, try it
+ if test "x$LIBIDN" != "xyes"; then
+ oldLDFLAGS=$LDFLAGS
+ oldCPPFLAGS=$CPPFLAGS
+ LDFLAGS="$LDFLAGS -L$LIBIDN/lib"
+ CPPFLAGS="$CPPFLAGS -I$LIBIDN/include"
+ AC_CHECK_LIB(idn, idna_to_ascii_4i, ,
+ AC_MSG_WARN([no libidn found in $LIBIDN])
+ LDFLAGS=$oldLDFLAGS
+ CPPFLAGS=$oldCPPFLAGS)
+ fi
+ ])
+
+ ;;
+esac
+
AC_MSG_CHECKING([whether to enable ares])
AC_ARG_ENABLE(ares,
AC_HELP_STRING([--enable-ares=PATH],[Enable ares for name lookups])