~ubuntu-branches/ubuntu/saucy/clamav/saucy-backports

« back to all changes in this revision

Viewing changes to m4/reorganization/clamdtop.m4

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman
  • Date: 2014-07-15 01:08:10 UTC
  • mfrom: (0.35.47 sid)
  • Revision ID: package-import@ubuntu.com-20140715010810-ru66ek4fun2iseba
Tags: 0.98.4+dfsg-2~ubuntu13.10.1
No-change backport to saucy (LP: #1341962)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_ARG_ENABLE(clamdtop,
 
2
              AC_HELP_STRING([--enable-clamdtop],
 
3
                             [Enable 'clamdtop' tool @<:@default=auto@:>@]),
 
4
[enable_clamdtop=$enableval], [enable_clamdtop="auto"])
 
5
 
 
6
if test "$enable_clamdtop" != "no"; then
 
7
 
 
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>"],
 
13
            [])
 
14
 
 
15
if test "X$HAVE_LIBNCURSES" != "Xyes"; then
 
16
    HAVE_LIBNCURSES=
 
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>"],
 
22
            [])
 
23
fi
 
24
 
 
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])])
 
33
fi
 
34
 
 
35
if test "x$CURSES_LIBS" = "x" -a "$enable_clamdtop" = "yes"; then
 
36
    AC_MSG_ERROR([
 
37
 
 
38
ERROR!  Clamdtop was configured, but not found.  You need to install libncurses5-dev.
 
39
])
 
40
fi
 
41
 
 
42
fi
 
43
 
 
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"])