Commit ebeb2b40 authored by Rafaël Carré's avatar Rafaël Carré

ncurses: simplify check

Do not leak -lncursesw in LIBS
parent ad549b62
...@@ -3757,31 +3757,27 @@ dnl ...@@ -3757,31 +3757,27 @@ 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 if test "${enable_ncurses}" != "no"; then
AC_CHECK_HEADER(ncurses.h, VLC_SAVE_FLAGS
[AC_CHECK_LIB(ncursesw, mvprintw, LIBS=""
[VLC_ADD_PLUGIN([ncurses]) AC_CHECK_HEADER(ncurses.h, [
VLC_ADD_LIBS([ncurses],[-lncursesw]) AC_CHECK_LIB(ncursesw, mvprintw, [
AC_SEARCH_LIBS([tgetent], [ncursesw tinfow tinfo], [
VLC_ADD_PLUGIN([ncurses])
ALIASES="${ALIASES} nvlc" ALIASES="${ALIASES} nvlc"
AC_CHECK_LIB(ncursesw, tgetent, [], VLC_ADD_LIBS([ncurses],[-lncursesw ${LIBS}])
AC_CHECK_LIB(tinfow, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfow])], ], [
[AC_CHECK_LIB(tinfo, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfo])], AS_IF([test "${enable_ncurses}" = "yes"], [AC_MSG_ERROR([tgetent not found])])
[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])])
], ])
[AS_IF([test "${enable_ncurses}" = "yes"], [ VLC_RESTORE_FLAGS
AC_MSG_ERROR([libncursesw not found])])] fi
)],
[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