empserver/m4/my_terminfo.m4
Markus Armbruster 26a03abfd8 configure: Fix check for term.h to include curses.h first
Traditional curses needs this.  Observed on AIX 7.1.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2013-08-17 17:57:37 +02:00

25 lines
721 B
Text

AC_DEFUN([MY_CURSES_TERMINFO],
[
AC_SEARCH_LIBS([setupterm], [termlib termcap curses ncurses],
[have_terminfo=yes], [have_terminfo=no])
AC_CHECK_HEADERS([curses.h term.h], [], [have_terminfo=no],
[[#include <curses.h>]])
if test "$have_terminfo" = yes
then AC_DEFINE([HAVE_CURSES_TERMINFO], 1,
[Define if you have the curses interface to terminfo])
fi
])
AC_DEFUN([MY_WITH_TERMINFO],
[
AC_ARG_WITH([terminfo],
AS_HELP_STRING([--with-terminfo],
[use terminfo for highlighting (default check)]))
if test "x$with_terminfo" != xno; then
MY_CURSES_TERMINFO
if test "$have_terminfo$with_terminfo" = noyes
then AC_MSG_FAILURE([Can't satisfy --with-terminfo])
fi
with_terminfo="$have_terminfo"
fi
])