mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 10:08:47 +00:00
Use ncurses OR curses, don't mix header and library. Tested by Rob Paisley.
This commit is contained in:
parent
3ed0973493
commit
c6cdab1f79
46
configure.ac
46
configure.ac
@ -162,28 +162,44 @@ PKG_CHECK_MODULES(
|
|||||||
[
|
[
|
||||||
CPPFLAGS="$LIBNCURSES_CFLAGS $CPPFLAGS"
|
CPPFLAGS="$LIBNCURSES_CFLAGS $CPPFLAGS"
|
||||||
LIBS="$LIBNCURSES_LIBS $LIBS"
|
LIBS="$LIBNCURSES_LIBS $LIBS"
|
||||||
found_curses=yes
|
found_ncurses=yes
|
||||||
],
|
],
|
||||||
[
|
found_ncurses=no
|
||||||
AC_SEARCH_LIBS(
|
|
||||||
setupterm,
|
|
||||||
[ncurses curses terminfo],
|
|
||||||
found_curses=yes,
|
|
||||||
found_curses=no
|
|
||||||
)
|
)
|
||||||
]
|
if test "x$found_ncurses" = xno; then
|
||||||
|
# pkg-config didn't work, try ncurses.
|
||||||
|
AC_CHECK_LIB(
|
||||||
|
ncurses,
|
||||||
|
setupterm,
|
||||||
|
found_ncurses=yes,
|
||||||
|
found_ncurses=no
|
||||||
)
|
)
|
||||||
AC_CHECK_HEADER(
|
AC_CHECK_HEADER(
|
||||||
ncurses.h,
|
ncurses.h,
|
||||||
AC_DEFINE(HAVE_NCURSES_H),
|
,
|
||||||
AC_CHECK_HEADER(
|
found_ncurses=no)
|
||||||
curses.h,
|
fi
|
||||||
AC_DEFINE(HAVE_CURSES_H),
|
if test "x$found_ncurses" = xyes; then
|
||||||
|
LIBS="$LIBS -lncurses"
|
||||||
|
AC_DEFINE(HAVE_NCURSES_H)
|
||||||
|
else
|
||||||
|
# No ncurses, try curses.
|
||||||
|
AC_CHECK_LIB(
|
||||||
|
curses,
|
||||||
|
setupterm,
|
||||||
|
found_curses=yes,
|
||||||
found_curses=no
|
found_curses=no
|
||||||
)
|
)
|
||||||
)
|
AC_CHECK_HEADER(
|
||||||
if test "x$found_curses" = xno; then
|
curses.h,
|
||||||
AC_MSG_ERROR("curses not found")
|
,
|
||||||
|
found_curses=no)
|
||||||
|
if test "x$found_curses" = xyes; then
|
||||||
|
LIBS="$LIBS -lcurses"
|
||||||
|
AC_DEFINE(HAVE_CURSES_H)
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR("curses or ncurses not found")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Look for utempter.
|
# Look for utempter.
|
||||||
|
Loading…
Reference in New Issue
Block a user