diff --git a/Makefile.am b/Makefile.am index 5d96b7a5..9f052c0e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -102,6 +102,7 @@ slabtop_SOURCES = slabtop.c lib/strutils.c lib/fileutils.c slabtop_LDADD = $(LDADD) @NCURSES_LIBS@ watch_SOURCES = watch.c lib/strutils.c lib/fileutils.c watch_LDADD = @WATCH_NCURSES_LIBS@ $(CYGWINFLAGS) +watch_CFLAGS = @WATCH_NCURSES_CFLAGS@ top_top_SOURCES = \ top/top.h \ top/top.c \ diff --git a/configure.ac b/configure.ac index e553e999..75976d8d 100644 --- a/configure.ac +++ b/configure.ac @@ -134,7 +134,8 @@ else ]) AM_CONDITIONAL(WITH_NCURSES, true) if test "$enable_watch8bit" = yes; then - PKG_CHECK_MODULES([NCURSESW], [ncursesw], [WATCH_NCURSES_LIBS="$NCURSESW_LIBS"], [ + PKG_CHECK_MODULES([NCURSESW], [ncursesw], [WATCH_NCURSES_LIBS="$NCURSESW_LIBS"] + [WATCH_NCURSES_CFLAGS="$NCURSESW_CFLAGS"], [ AC_CHECK_LIB([ncursesw], [addwstr], [WATCH_NCURSES_LIBS=-lncursesw], [AC_MSG_ERROR([Cannot find ncurses wide library ncursesw with --enable-watch8bit])]) ]) @@ -144,6 +145,7 @@ else fi AC_SUBST([NCURSES_LIBS]) AC_SUBST([WATCH_NCURSES_LIBS]) +AC_SUBST([WATCH_NCURSES_CFLAGS]) AC_ARG_WITH([systemd], [AS_HELP_STRING([--with-systemd], [enable systemd support])], diff --git a/watch.c b/watch.c index 69c8fc80..215b4bf5 100644 --- a/watch.c +++ b/watch.c @@ -52,10 +52,8 @@ # define _XOPEN_SOURCE_EXTENDED 1 # include # include -# include -#else -# include #endif /* WITH_WATCH8BIT */ +#include #ifdef FORCE_8BIT # undef isprint