Commit 42e7d91c authored by Rafaël Carré's avatar Rafaël Carré

ncurses: link with libtinfo(w) only if needed

parent 37558f4a
......@@ -5395,13 +5395,26 @@ AC_ARG_ENABLE(ncurses,
VLC_ADD_LIBS([ncurses],[-lncursesw])
ALIASES="${ALIASES} nvlc"
AC_DEFINE([HAVE_NCURSESW], 1, [Define to 1 if you have libncursesw.])
AC_CHECK_LIB(tinfo, tgetent, VLC_ADD_LIBS([ncurses],[-ltinfo]))
AC_CHECK_LIB(ncursesw, tgetent, [],
AC_CHECK_LIB(tinfow, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfow])],
[AC_CHECK_LIB(tinfo, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfo])],
[AS_IF([test "x${enable_ncurses}" != "x"],
[AC_MSG_ERROR([tgetent not found in ncursesw tinfow tinfo]
)])])
]
)
)
],
[AC_CHECK_LIB( ncurses, mvprintw,
[VLC_ADD_PLUGINS([ncurses])
ALIASES="${ALIASES} nvlc"
VLC_ADD_LIBS([ncurses],[-lncurses])
AC_CHECK_LIB(tinfo, tgetent, VLC_ADD_LIBS([ncurses],[-ltinfo]))],
AC_CHECK_LIB(ncurses, tgetent, [],
[AC_CHECK_LIB(tinfo, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfo])],
[AS_IF([test "x${enable_ncurses}" != "x"],
[AC_MSG_ERROR([tgetent not found in ncurses tinfo])])]
)]
)],
[AS_IF([test "x${enable_ncurses}" != "x"], [
AC_MSG_ERROR([libncurses not found])])]
)]
......
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