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@
|
||||
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 \
|
||||
|
@ -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])],
|
||||
|
Loading…
Reference in New Issue
Block a user