mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
configure: check for definition of setupterm, not just linkability
Some platforms ship the headers and libraries for ncurses in different packages, which can produce false positives when checking for their presence. Closes #3866.
This commit is contained in:
parent
fac9b2393f
commit
3444fe87fb
1 changed files with 19 additions and 0 deletions
19
configure.ac
19
configure.ac
|
@ -327,6 +327,25 @@ AC_CHECK_FUNCS( dirfd )
|
||||||
|
|
||||||
AC_CHECK_DECL( [mkostemp], [ AC_CHECK_FUNCS([mkostemp]) ] )
|
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 <ncurses.h>
|
||||||
|
#elif HAVE_NCURSES_CURSES_H
|
||||||
|
#include <ncurses/curses.h>
|
||||||
|
#else
|
||||||
|
#include <curses.h>
|
||||||
|
#endif
|
||||||
|
#if HAVE_TERM_H
|
||||||
|
#include <term.h>
|
||||||
|
#elif HAVE_NCURSES_TERM_H
|
||||||
|
#include <ncurses/term.h>
|
||||||
|
#endif
|
||||||
|
] )
|
||||||
|
|
||||||
dnl AC_CHECK_FUNCS uses C linkage, but sometimes (Solaris!) the behaviour is
|
dnl AC_CHECK_FUNCS uses C linkage, but sometimes (Solaris!) the behaviour is
|
||||||
dnl different with C++.
|
dnl different with C++.
|
||||||
AC_MSG_CHECKING([for wcsdup])
|
AC_MSG_CHECKING([for wcsdup])
|
||||||
|
|
Loading…
Reference in a new issue