Skip to content

Commit

Permalink
Added detection of ncursesw and tinfo libs
Browse files Browse the repository at this point in the history
  • Loading branch information
vrza committed Jul 19, 2023
1 parent a82cd0a commit 1f7176f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
29 changes: 18 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -158,20 +158,27 @@ else

dnl On true Unix systems, test for valid curses-like libraries
if test "$CURSES_CLIENT" != "no" ; then
AC_CHECK_LIB(ncurses,newterm)
if test "$ac_cv_lib_ncurses_newterm" = "no" ; then
AC_CHECK_LIB(curses,newterm)
if test "$ac_cv_lib_curses_newterm" = "no" ; then
AC_CHECK_LIB(cur_colr,newterm)
if test "$ac_cv_lib_cur_colr_newterm" = "no" ; then
if test "$CURSES_CLIENT" = "yes" ; then
AC_MSG_ERROR(Cannot find any curses-type library)
else
AC_MSG_WARN(Cannot find any curses-type library)
CURSES_CLIENT="no"
AC_CHECK_LIB(ncursesw,newterm)
if test "$ac_cv_lib_ncursesw_newterm" = "no" ; then
AC_CHECK_LIB(ncurses,newterm)
if test "$ac_cv_lib_ncurses_newterm" = "no" ; then
AC_CHECK_LIB(curses,newterm)
if test "$ac_cv_lib_curses_newterm" = "no" ; then
AC_CHECK_LIB(cur_colr,newterm)
if test "$ac_cv_lib_cur_colr_newterm" = "no" ; then
if test "$CURSES_CLIENT" = "yes" ; then
AC_MSG_ERROR(Cannot find any curses-type library)
else
AC_MSG_WARN(Cannot find any curses-type library)
CURSES_CLIENT="no"
fi
fi
fi
else
AC_CHECK_LIB(tinfo,cbreak)
fi
else
AC_CHECK_LIB(tinfow,cbreak)
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion src/cursesport/cursesport.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void endwin(void);
#include <errno.h>

/* Include a suitable curses-type library */
#if HAVE_LIBNCURSES || defined(CURSES_HAVE_NCURSES_H)
#if HAVE_LIBNCURSESW || HAVE_LIBNCURSES || defined(CURSES_HAVE_NCURSES_H)
#include <ncurses.h>
#elif HAVE_LIBCURSES || defined(CURSES_HAVE_CURSES_H)
#include <curses.h>
Expand Down

0 comments on commit 1f7176f

Please sign in to comment.