aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2016-09-01 20:40:03 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2016-09-01 20:40:03 +0100
commit6c94774b70f72952c4c512e4aa59a207ca1c34f2 (patch)
tree04502f9607958f3b4559e3bac5e5668e8d517ab0 /configure.ac
parentae297cb487590d0bb8e42e21e28926a1f957ad0b (diff)
downloadrtmux-6c94774b70f72952c4c512e4aa59a207ca1c34f2.tar.gz
rtmux-6c94774b70f72952c4c512e4aa59a207ca1c34f2.tar.bz2
rtmux-6c94774b70f72952c4c512e4aa59a207ca1c34f2.zip
Add support for using utf8proc with --enable-utf8proc, useful for platforms
(like OS X) where the system implementation is crap. From Joshua Rubin.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac25
1 files changed, 24 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 636bfcc1..c14a6e61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,7 +152,7 @@ if test "x$found_libevent" = xno; then
AC_MSG_ERROR("libevent not found")
fi
-# Look for ncurses
+# Look for ncurses.
PKG_CHECK_MODULES(
LIBNCURSES,
ncurses,
@@ -196,6 +196,29 @@ if test "x$found_utempter" = xyes; then
fi
fi
+# Look for utf8proc.
+AC_ARG_ENABLE(
+ utf8proc,
+ AC_HELP_STRING(--enable-utf8proc, use utf8proc if it is installed),
+ found_utf8proc=$enable_utf8proc,
+ found_utf8proc=yes
+)
+if test "x$found_utf8proc" = xyes; then
+ AC_CHECK_HEADER(utf8proc.h, found_utf8proc=yes, found_utf8proc=no)
+ if test "x$found_utf8proc" = xyes; then
+ AC_SEARCH_LIBS(
+ utf8proc_charwidth,
+ utf8proc,
+ found_utf8proc=yes,
+ found_utf8proc=no
+ )
+ if test "x$found_utf8proc" = xyes; then
+ AC_DEFINE(HAVE_UTF8PROC)
+ fi
+ fi
+fi
+AM_CONDITIONAL(HAVE_UTF8PROC, [test "x$found_utf8proc" = xyes])
+
# Check for b64_ntop.
AC_MSG_CHECKING(for b64_ntop)
AC_TRY_LINK(