summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@gmail.com>2020-02-12 21:39:42 +0100
committerBenjamin Franzke <benjaminfranzke@gmail.com>2020-02-15 13:52:56 +0100
commit4cff57f4045578bf4211f8e38db08d8b157c82a7 (patch)
tree2465441ae63b60bf35498ecdde3c1ad4cf80ee94 /configure.ac
parent4aa2b7230439dd1c5c357b685365e915f3171aa2 (diff)
downloadpa-sink-ctl-4cff57f4045578bf4211f8e38db08d8b157c82a7.tar.gz
pa-sink-ctl-4cff57f4045578bf4211f8e38db08d8b157c82a7.tar.bz2
pa-sink-ctl-4cff57f4045578bf4211f8e38db08d8b157c82a7.zip
Support UTF-8 characters
Switch to ncursesw (using pkg-config) for UTF-8 support. Fallback to a X/Open Curses specification compatible curses implementation if ncursesw is not available. The fallback is intended for non-ncurses systems only. UTF-8 multibyte does also work on the curses implementation of NetBSD. We may need a proper configure check to assert that the curses library is multibyte capable. Note that X/Open Curses doesn't specify wide character (utf-8) compatiblity.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 6 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index fc6ec3f..cfc0243 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@ AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
-AC_CHECK_HEADERS([ncurses.h sys/ioctl.h sys/signalfd.h unistd.h signal.h])
+AC_CHECK_HEADERS([sys/ioctl.h sys/signalfd.h unistd.h signal.h])
AC_CHECK_FUNCS([signalfd])
@@ -41,19 +41,20 @@ if test "x$ac_cv_func_signalfd" = "xno" -o "x$ac_cv_header_sys_signalfd_h" = "xn
fi
# Checks for libraries.
-AC_CHECK_LIB([ncurses], [newwin], [CURSES_LIBS=-lncurses], AC_MSG_ERROR([curses required]))
-
PKG_CHECK_MODULES(PULSE, [libpulse], [], AC_MSG_ERROR([libpulse required]))
PKG_CHECK_MODULES(PULSE_MAINLOOP, [libpulse-mainloop-glib], [], AC_MSG_ERROR([libpulse-mainloop-glib required]))
PKG_CHECK_MODULES(GLIB, [glib-2.0 >= $glib_version], [], AC_MSG_ERROR([glib >= $glib_version required]))
+PKG_CHECK_MODULES(CURSES, [ncursesw], [],
+ AC_CHECK_LIB([curses], [newwin], [CURSES_LIBS=-lcurses], AC_MSG_ERROR([ncursesw or curses required]))
+ AC_CHECK_HEADERS([curses.h])
+ AC_SUBST(CURSES_LIBS)
+)
if test "x$GCC" = "xyes"; then
GCC_CFLAGS="-Wall -pedantic -std=c99 -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option -fvisibility=hidden"
fi
AC_SUBST(GCC_CFLAGS)
-AC_SUBST(CURSES_LIBS)
-
AC_DEFINE([_POSIX_C_SOURCE], [1], [Enable POSIX.1-1990 definitions])
AC_C_INLINE