diff configure.ac @ 27598:e5fdfff98aa9

When GNU Libidn is available, use it for XMPP stringprep operations. I made configure fail if libidn is unavailable and force_deps is set because glib's UTF-8 strdown and casefold operations fail one of the tests I've updated (based on running the tests with libidn). Running without libidn will still work in almost every case because people use all-ASCII JabberIDs and I had to search a fair amount to find characters for which GLib failed. This shouldn't have a performance impact on top of Mark's optimizations for all-ASCII JIDs.
author Paul Aurich <paul@darkrain42.org>
date Fri, 17 Jul 2009 21:11:25 +0000
parents 53c6b8d95ea5
children 31905a0d1c9d
line wrap: on
line diff
--- a/configure.ac	Fri Jul 17 02:19:31 2009 +0000
+++ b/configure.ac	Fri Jul 17 21:11:25 2009 +0000
@@ -808,6 +808,25 @@
 	fi
 fi
 
+AC_ARG_ENABLE(idn,
+	[AC_HELP_STRING([--disable-idn], [compile without IDN support])],
+	[enable_idn="$enableval" force_idn=$enableval], [enable_idn="yes" force_idn=no])
+if test "x$enable_idn" != "xno"; then
+	PKG_CHECK_MODULES(IDN, libidn >= 0.0.0, [
+		AC_DEFINE(USE_IDN, 1, [Use GNU Libidn for stringprep and IDN])
+		AC_SUBST(IDN_CFLAGS)
+		AC_SUBST(IDN_LIBS)
+	], [
+		AC_MSG_RESULT(no)
+		if test "x$force_deps" = "xyes" ; then
+			AC_MSG_ERROR([
+GNU Libidn development headers not found.
+Use --disable-idn if you do not need it.
+])
+		fi
+	])
+fi
+
 dnl #######################################################################
 dnl # Check for Meanwhile headers (for Sametime)
 dnl #######################################################################
@@ -2546,6 +2565,7 @@
 if test "x$enable_dbus" = "xyes" ; then
 	eval eval echo D-Bus services directory...... : $DBUS_SERVICES_DIR
 fi
+echo Build with GNU Libidn......... : $enable_idn
 echo Build with NetworkManager..... : $enable_nm
 echo SSL Library/Libraries......... : $msg_ssl
 if test "x$SSL_CERTIFICATES_DIR" != "x" ; then