[vlc-commits] ncurses: rewrite configure detection with pkg-config
Rémi Denis-Courmont
git at videolan.org
Thu Aug 30 22:40:42 CEST 2012
vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug 30 23:34:51 2012 +0300| [be1b84a5544fa80514662f44d42fe6e429807c5c] | committer: 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 65d11fbb2ab3ca24a3df687b65b1837286d23329)
Conflicts:
configure.ac
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=be1b84a5544fa80514662f44d42fe6e429807c5c
---
configure.ac | 38 +++++++++++++-------------------------
1 file changed, 13 insertions(+), 25 deletions(-)
diff --git a/configure.ac b/configure.ac
index df31db5..07b6700 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3796,31 +3796,19 @@ dnl
dnl ncurses module
dnl
AC_ARG_ENABLE(ncurses,
- [ --disable-ncurses ncurses interface support (default disabled)],
- [if test "${enable_ncurses}" != "no"; then
- AC_CHECK_HEADER(ncurses.h,
- [AC_CHECK_LIB(ncursesw, mvprintw,
- [VLC_ADD_PLUGIN([ncurses])
- VLC_ADD_LIBS([ncurses],[-lncursesw])
- ALIASES="${ALIASES} nvlc"
- 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 "${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]
-)
+[AS_HELP_STRING([--disable-ncurses],[ncurses text-based interface (default auto)])])
+AS_IF([test "${enable_ncurses}" != "no"] ,[
+ PKG_CHECK_MODULES([NCURSES], [ncursesw], [
+ VLC_ADD_PLUGIN([ncurses])
+ VLC_ADD_CFLAGS([ncurses],[${NCURSES_CFLAGS}])
+ VLC_ADD_LIBS([ncurses],[${NCURSES_LIBS}])
+ ALIASES="${ALIASES} nvlc"
+ ], [
+ AS_IF([test -n "${enable_ncurses}"], [
+ AC_MSG_ERROR([${NCURSES_PKG_ERRORS}.])
+ ])
+ ])
+])
dnl
dnl XOSD plugin
More information about the vlc-commits
mailing list