configure.ac: use pkg-config to get ncursesw header location
Don't assume ncursesw headers are in ../usr/include/ncursesw/.. On a pure build/system without legacy ncurses that may not be true. Since we're using pkg-config let it provide the correct include path. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
b4fdb27a05
commit
58559a5b64
@ -102,6 +102,7 @@ slabtop_SOURCES = slabtop.c lib/strutils.c lib/fileutils.c
|
|||||||
slabtop_LDADD = $(LDADD) @NCURSES_LIBS@
|
slabtop_LDADD = $(LDADD) @NCURSES_LIBS@
|
||||||
watch_SOURCES = watch.c lib/strutils.c lib/fileutils.c
|
watch_SOURCES = watch.c lib/strutils.c lib/fileutils.c
|
||||||
watch_LDADD = @WATCH_NCURSES_LIBS@ $(CYGWINFLAGS)
|
watch_LDADD = @WATCH_NCURSES_LIBS@ $(CYGWINFLAGS)
|
||||||
|
watch_CFLAGS = @WATCH_NCURSES_CFLAGS@
|
||||||
top_top_SOURCES = \
|
top_top_SOURCES = \
|
||||||
top/top.h \
|
top/top.h \
|
||||||
top/top.c \
|
top/top.c \
|
||||||
|
@ -134,7 +134,8 @@ else
|
|||||||
])
|
])
|
||||||
AM_CONDITIONAL(WITH_NCURSES, true)
|
AM_CONDITIONAL(WITH_NCURSES, true)
|
||||||
if test "$enable_watch8bit" = yes; then
|
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_CHECK_LIB([ncursesw], [addwstr], [WATCH_NCURSES_LIBS=-lncursesw],
|
||||||
[AC_MSG_ERROR([Cannot find ncurses wide library ncursesw with --enable-watch8bit])])
|
[AC_MSG_ERROR([Cannot find ncurses wide library ncursesw with --enable-watch8bit])])
|
||||||
])
|
])
|
||||||
@ -144,6 +145,7 @@ else
|
|||||||
fi
|
fi
|
||||||
AC_SUBST([NCURSES_LIBS])
|
AC_SUBST([NCURSES_LIBS])
|
||||||
AC_SUBST([WATCH_NCURSES_LIBS])
|
AC_SUBST([WATCH_NCURSES_LIBS])
|
||||||
|
AC_SUBST([WATCH_NCURSES_CFLAGS])
|
||||||
|
|
||||||
AC_ARG_WITH([systemd],
|
AC_ARG_WITH([systemd],
|
||||||
[AS_HELP_STRING([--with-systemd], [enable systemd support])],
|
[AS_HELP_STRING([--with-systemd], [enable systemd support])],
|
||||||
|
4
watch.c
4
watch.c
@ -52,10 +52,8 @@
|
|||||||
# define _XOPEN_SOURCE_EXTENDED 1
|
# define _XOPEN_SOURCE_EXTENDED 1
|
||||||
# include <wchar.h>
|
# include <wchar.h>
|
||||||
# include <wctype.h>
|
# include <wctype.h>
|
||||||
# include <ncursesw/ncurses.h>
|
|
||||||
#else
|
|
||||||
# include <ncurses.h>
|
|
||||||
#endif /* WITH_WATCH8BIT */
|
#endif /* WITH_WATCH8BIT */
|
||||||
|
#include <ncurses.h>
|
||||||
|
|
||||||
#ifdef FORCE_8BIT
|
#ifdef FORCE_8BIT
|
||||||
# undef isprint
|
# undef isprint
|
||||||
|
Loading…
Reference in New Issue
Block a user