Skip to content

Commit

Permalink
Favor linking against curses instead of ncursesw
Browse files Browse the repository at this point in the history
  • Loading branch information
mptre committed Oct 15, 2016
1 parent 485b436 commit b51ca18
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@ AC_TYPE_SSIZE_T
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memmove pledge reallocarray setlocale strdup])
AC_SEARCH_LIBS([initscr], [ncursesw ncurses], [], [
AC_MSG_ERROR([unable to find initscr() function. Try to install ncurses])
])

AC_TRY_LINK([
#include <ncursesw/curses.h>
#include <ncursesw/term.h>
], [], [
AC_DEFINE(HAVE_NCURSESW_H,, Define if ncursesw is available)
])

AC_SEARCH_LIBS([setupterm], [curses], [],
[
AC_SEARCH_LIBS([setupterm], [ncursesw],
[AC_DEFINE([HAVE_NCURSESW_H], [1], [Define if ncursesw is available])],
[AC_MSG_ERROR([unable to find setupterm function])]
)
]
)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

0 comments on commit b51ca18

Please sign in to comment.