diff --git a/configure.ac b/configure.ac index 0d4514bbc..84a02fcb1 100644 --- a/configure.ac +++ b/configure.ac @@ -327,6 +327,25 @@ AC_CHECK_FUNCS( dirfd ) AC_CHECK_DECL( [mkostemp], [ AC_CHECK_FUNCS([mkostemp]) ] ) +# +# Although setupterm is linkable thanks to SEARCH_LIBS above, some +# builds of ncurses include the actual headers in a different package +# +AC_CHECK_DECL( [setupterm], , [AC_MSG_ERROR([Could not find a curses implementation, needed to build fish. If this is Linux, try running 'sudo apt-get install libncurses5-dev' or 'sudo yum install ncurses-devel'])], [ +#if HAVE_NCURSES_H +#include +#elif HAVE_NCURSES_CURSES_H +#include +#else +#include +#endif +#if HAVE_TERM_H +#include +#elif HAVE_NCURSES_TERM_H +#include +#endif +] ) + dnl AC_CHECK_FUNCS uses C linkage, but sometimes (Solaris!) the behaviour is dnl different with C++. AC_MSG_CHECKING([for wcsdup])