1
AC_ARG_ENABLE(clamdtop,
2
AC_HELP_STRING([--enable-clamdtop],
3
[Enable 'clamdtop' tool @<:@default=auto@:>@]),
4
[enable_clamdtop=$enableval], [enable_clamdtop="auto"])
6
if test "$enable_clamdtop" != "no"; then
8
AC_LIB_FIND([ncurses], [ncurses/ncurses.h],
9
AC_LANG_PROGRAM([#include <ncurses/ncurses.h>],
10
[initscr(); KEY_RESIZE;]),
11
[CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
12
CURSES_INCLUDE="<ncurses/ncurses.h>"],
15
if test "X$HAVE_LIBNCURSES" != "Xyes"; then
17
AC_LIB_FIND([ncurses], [ncurses.h],
18
AC_LANG_PROGRAM([#include <ncurses.h>],
19
[initscr(); KEY_RESIZE;]),
20
[CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
21
CURSES_INCLUDE="<ncurses.h>"],
25
if test "X$HAVE_LIBNCURSES" != "Xyes"; then
26
AC_LIB_FIND([pdcurses],[curses.h],
27
AC_LANG_PROGRAM([#include <curses.h>],
28
[initscr(); KEY_RESIZE;]),
29
[CURSES_CPPFLAGS="$INCPDCURSES";
30
CURSES_LIBS="$LTLIBPDCURSES";
31
CURSES_INCLUDE="<curses.h>"],
32
[AC_MSG_WARN([****** not building clamdtop: ncurses not found])])
35
if test "x$CURSES_LIBS" = "x" -a "$enable_clamdtop" = "yes"; then
38
ERROR! Clamdtop was configured, but not found. You need to install libncurses5-dev.
44
AC_DEFINE_UNQUOTED([CURSES_INCLUDE], $CURSES_INCLUDE, [curses header location])
45
AC_SUBST([CURSES_CPPFLAGS])
46
AC_SUBST([CURSES_LIBS])
47
AM_CONDITIONAL([HAVE_CURSES],
48
[test "X$HAVE_LIBNCURSES" = "Xyes" || test "X$HAVE_LIBPDCURSES" = "Xyes"])