BuildSystem: Enable ncurses for menuselect in Solaris 11.

The check for the library ncurses should use not use the header <curses.h> but
<ncurses.h>, because on some platforms <curses.h> is not a drop-in replacement
for <ncurses.h>: For example in Solaris, the symbol initscr is a typedef in
<curses.h> to a symbol which does not exist in the library ncurses (initscr32).
Simply use <ncurses.h> when you link to ncurses.

Furthermore in Solaris, the header <ncurses.h> is in a subdirectory
/usr/include/ncurses and not available via pkg-config.

ASTERISK-15331
ASTERISK-14935
ASTERISK-12382
ASTERISK-9107

Change-Id: Ife367776b0ccf17d3fefed868245376bfb93745d
This commit is contained in:
Alexander Traud
2018-07-28 18:49:17 +02:00
parent 4265391859
commit 7418dfa2c7
5 changed files with 223 additions and 96 deletions

View File

@@ -67,8 +67,17 @@ AST_EXT_LIB_SETUP([NCURSES], [ncurses], [ncurses])
AST_EXT_LIB_SETUP([LIBXML2], [LibXML2], [libxml2])
AST_EXT_LIB_CHECK([NEWT], [newt], [newtBell], [newt.h])
AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])
AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [ncurses.h])
if test "${PBX_NCURSES}" != 1; then
# some platforms have the header in a sub-directory, for example Solaris
AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [ncurses/ncurses.h])
if test "${PBX_NCURSES}" != 1; then
AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
else
HAVE_NCURSES_SUBDIR=yes
fi
fi
AC_SUBST(HAVE_NCURSES_SUBDIR)
AST_EXT_TOOL_CHECK([LIBXML2], [xml2-config], , ,
[#include <libxml/tree.h>
#include <libxml/parser.h>],