client: Unbreak standalone build
[empserver] / m4 / my_terminfo.m4
1 AC_DEFUN([MY_CURSES_TERMINFO],
2 [
3         AC_SEARCH_LIBS([setupterm], [termlib termcap curses ncurses],
4                 [have_terminfo=yes], [have_terminfo=no])
5         AC_CHECK_HEADERS([curses.h term.h], [], [have_terminfo=no],
6         [[#include <curses.h>]])
7         if test "$have_terminfo" = yes
8         then AC_DEFINE([HAVE_CURSES_TERMINFO], 1,
9                 [Define if you have the curses interface to terminfo])
10         fi
11 ])
12
13 AC_DEFUN([MY_WITH_TERMINFO],
14 [
15         AC_ARG_WITH([terminfo],
16                 AS_HELP_STRING([--with-terminfo],
17                         [use terminfo for highlighting @<:@default check@:>@]))
18         if test "x$with_terminfo" != xno; then
19                 MY_CURSES_TERMINFO
20                 if test "$have_terminfo$with_terminfo" = noyes
21                 then AC_MSG_FAILURE([--with-terminfo was given, but test for terminfo failed])
22                 fi
23                 with_terminfo="$have_terminfo"
24         fi
25 ])