Commit be1b84a5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

ncurses: rewrite configure detection with pkg-config

This makes sure that the correct header files are checked and used.
That is to say the ncursesw headers as opposed to ncurses.
(cherry picked from commit 65d11fbb)

Conflicts:
	configure.ac
parent b0a60302
...@@ -3796,31 +3796,19 @@ dnl ...@@ -3796,31 +3796,19 @@ dnl
dnl ncurses module dnl ncurses module
dnl dnl
AC_ARG_ENABLE(ncurses, AC_ARG_ENABLE(ncurses,
[ --disable-ncurses ncurses interface support (default disabled)], [AS_HELP_STRING([--disable-ncurses],[ncurses text-based interface (default auto)])])
[if test "${enable_ncurses}" != "no"; then AS_IF([test "${enable_ncurses}" != "no"] ,[
AC_CHECK_HEADER(ncurses.h, PKG_CHECK_MODULES([NCURSES], [ncursesw], [
[AC_CHECK_LIB(ncursesw, mvprintw, VLC_ADD_PLUGIN([ncurses])
[VLC_ADD_PLUGIN([ncurses]) VLC_ADD_CFLAGS([ncurses],[${NCURSES_CFLAGS}])
VLC_ADD_LIBS([ncurses],[-lncursesw]) VLC_ADD_LIBS([ncurses],[${NCURSES_LIBS}])
ALIASES="${ALIASES} nvlc" ALIASES="${ALIASES} nvlc"
AC_CHECK_LIB(ncursesw, tgetent, [], ], [
AC_CHECK_LIB(tinfow, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfow])], AS_IF([test -n "${enable_ncurses}"], [
[AC_CHECK_LIB(tinfo, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfo])], AC_MSG_ERROR([${NCURSES_PKG_ERRORS}.])
[AS_IF([test "${enable_ncurses}" = "yes"], ])
[AC_MSG_ERROR([tgetent not found in ncursesw tinfow tinfo] ])
)])]) ])
]
)
)
],
[AS_IF([test "${enable_ncurses}" = "yes"], [
AC_MSG_ERROR([libncursesw not found])])]
)],
[AS_IF([test "${enable_ncurses}" = "yes"], [
AC_MSG_ERROR([ncurses.h not found])])]
)
fi]
)
dnl dnl
dnl XOSD plugin dnl XOSD plugin
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment