[vlc-devel] commit: ncurses: link with libtinfo(w) only if needed ( Rafaël Carré )
git version control
git at videolan.org
Sat Mar 22 03:00:06 CET 2008
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sat Mar 22 02:39:34 2008 +0100| [42e7d91c277a879cb3fed58fa68836168e4e5208]
ncurses: link with libtinfo(w) only if needed
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=42e7d91c277a879cb3fed58fa68836168e4e5208
---
configure.ac | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 5ae665a..29f24ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])])]
)]
More information about the vlc-devel
mailing list