summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-01-29 14:56:24 +0200
committerSergey Poznyakoff <gray@gnu.org>2019-01-29 15:02:15 +0200
commit1a29c40ae9f491fe1f6895b383d3391450bc3736 (patch)
tree6cc2c9c3190ff526555fe3afc2290476269046db /configure.ac
parent059fab534ac609e67ee54020ba764ec7fafddf96 (diff)
downloadmailutils-1a29c40ae9f491fe1f6895b383d3391450bc3736.tar.gz
mailutils-1a29c40ae9f491fe1f6895b383d3391450bc3736.tar.bz2
imap4d: Proper case-insensitive searches over multibyte strings.
This requires libunistring. * NEWS: Update. * README: Update. * configure.ac: Check for libunistring. * libmailutils/base/version.c: Reflect libunistring usage. * imap4d/Makefile.am: Link with libunistring, if available. * imap4d/imap4d.h (unistr_downcase) (unistr_is_substring): New protos. * imap4d/search.c (_scan_header) (_scan_header_all,_match_text): Use unistr_is_substring for searches. * imap4d/unistr_c.c: New file. * imap4d/unistr_u8.c: New file. * imap4d/tests/search.at: Add new test.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac44
1 files changed, 42 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 0ef4a235d..4efd44198 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1057,8 +1057,8 @@ char *crypt(const char *key, const char *salt);
AC_CHECK_LIB(crypt, crypt)
-#When using thread support some platforms need -D_REENTRANT to get the
-#right prototypes including errno.
+# When using thread support some platforms need -D_REENTRANT to get the
+# right prototypes including errno.
dnl Check threading support
# We have to rearrange things a little, it appears that the new autoconf
# does not like long cascading AC_CHECK_LIB.
@@ -1132,6 +1132,44 @@ fi
AM_CONDITIONAL([MU_COND_READLINE], [test "$status_readline" = "yes"])
+# Check for libunistring
+AC_ARG_WITH([unistring],
+ AC_HELP_STRING([--without-unistring],
+ [do not use unistring]),
+ [
+case "${withval}" in
+ yes) status_unistring=yes ;;
+ no) status_unistring=no ;;
+ *) AC_MSG_ERROR(bad value ${withval} for --without-unistring) ;;
+esac],[status_unistring=probe])
+
+AC_SUBST(UNISTRING_LIBS)
+
+if test "$status_unistring" != "no"; then
+ AC_CHECK_HEADERS([unicase.h unistr.h])
+
+ if test "$ac_cv_header_unicase_h$ac_cv_header_unistr_h" = yesyes; then
+ AC_CHECK_LIB(unistring, u8_tolower,
+ [UNISTRING_LIBS=-lunistring
+ status_unistring=yes],
+ [if test "$status_unistring" = "yes"; then
+ AC_MSG_ERROR(required library libunistring not found)
+ else
+ status_unistring=no
+ fi])
+ elif test "$status_unistring" = "yes"; then
+ AC_MSG_ERROR(header files for the required library libunistring not found)
+ else
+ status_unistring=no
+ fi
+fi
+
+AH_TEMPLATE([WITH_UNISTRING],[Define to 1 if using libunistring])
+if test "$status_unistring" = "yes"; then
+ AC_DEFINE(WITH_UNISTRING,1,[Using libunistring])
+fi
+AM_CONDITIONAL([MU_COND_UNISTRING],[test "$status_unistring" = "yes"])
+
AH_BOTTOM([
/* Newer versions of readline have rl_completion_matches */
#ifndef HAVE_RL_COMPLETION_MATCHES
@@ -1381,6 +1419,7 @@ Use GSSAPI .................... $status_gssapi
Use TCP wrappers .............. $status_tcpwrap
Pthread support ............... $status_pthread
Readline support .............. $status_readline
+Libunistring support .......... $status_unistring
MySQL support ................. $status_mysql
PostgreSQL support ............ $status_pgsql
LDAP support .................. $status_ldap
@@ -1435,6 +1474,7 @@ status_cxx=$mu_cv_enable_cxx
status_tcpwrap=$status_tcpwrap
status_pthread=$usepthread
status_readline=$status_readline
+status_unistring=$status_unistring
status_mysql=$status_mysql
status_pgsql=$status_pgsql
status_radius=$mu_cv_enable_radius

Return to:

Send suggestions and report system problems to the System administrator.