aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac36
1 files changed, 36 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 51faeee3e..7439d36b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,6 +62,14 @@ AC_CHECK_FUNC([gethostbyname],
])
+dnl wide character support
+AC_ARG_ENABLE([wide],
+ AC_HELP_STRING([--enable-wide],
+ [Enable wide character support]),
+ [use_wide=$enableval],
+ [use_wide=auto])
+
+
dnl ncurses
ncurses=auto
AC_ARG_WITH([ncurses],
@@ -71,6 +79,17 @@ AC_ARG_WITH(ncursesw,
AC_HELP_STRING([--with-ncursesw], [compile/link with wide-char ncurses library @<:@default@:>@]),
[ncurses=ncursesw])
+if test "x$enable_wide" = "xno"; then
+ if test "x$ncurses" = "xauto"; then
+ dnl select narrow ncurses
+ ncurses=ncurses
+ fi
+
+ if test "x$ncurses" = "xncursesw"; then
+ AC_MSG_WARN([Narrow ncmpc linking against wide libncurses])
+ fi
+fi
+
if test "x$ncurses" = "xauto"; then
AC_CHECK_LIB([ncursesw],
[initscr],
@@ -90,6 +109,23 @@ if test "x$ncurses" = "xncursesw"; then
fi
+dnl wide character support II
+
+if test "x$use_wide" = "xauto" ; then
+ AC_CHECK_LIB([$ncurses],
+ [wget_wch],
+ [use_wide=yes],
+ [use_wide=no])
+fi
+
+AC_MSG_CHECKING([wide character support])
+AC_MSG_RESULT([$use_wide])
+
+if test "x$use_wide" = "xyes" ; then
+ AC_DEFINE([ENABLE_WIDE], [1], [Enable wide character support])
+fi
+
+
dnl Check for glib-2.4
PKG_CHECK_MODULES([GLIB],
[glib-2.0 >= 2.4],