GSS_S_PROMPTING_NEEDED is a bit
[cyrus-sasl.git] / cmulocal / clamav.m4
1 dnl
2 dnl macros for configure.in to detect clamav library
3 dnl $Id: clamav.m4,v 1.2 2005/05/28 02:26:59 shadow Exp $
4 dnl
5
6 AC_DEFUN([CMU_CLAMAV], [
7 AC_REQUIRE([CMU_FIND_LIB_SUBDIR])
8 AC_ARG_WITH(clamav,[  --with-clamav=PATH        use ClamAV - PATH to clamav-config (yes)],
9         with_clamav=$withval, with_clamav=yes)
10   have_clamav=no
11   if test "$with_clamav" != no; then
12         
13         if test -d $with_clamav; then
14                 clamav_path=${with_clamav}:${with_clamav}/bin
15         else
16                 clamav_path=/usr/local/bin:/usr/bin:$PATH
17         fi
18         AC_PATH_PROG(CLAMAV_CONFIG,clamav-config,,[$clamav_path])
19
20         if test -x "$CLAMAV_CONFIG"; then
21                 LIB_CLAMAV="`$CLAMAV_CONFIG --libs` -lclamav"
22                 CFLAGS_CLAMAV=`$CLAMAV_CONFIG --cflags`
23
24                 if test -n "$LIB_CLAMAV"; then
25                         have_clamav=yes
26                         test -n "$CFLAGS_CLAMAV" && CPPFLAGS="$CPPFLAGS $CFLAGS_CLAMAV"
27                         AC_DEFINE(HAVE_CLAMAV,[],[Do we have ClamAV?])
28                         AC_SUBST(LIB_CLAMAV)
29                 fi
30         fi
31    fi
32
33    AC_MSG_CHECKING(ClamAV support)
34    AC_MSG_RESULT($have_clamav)
35 ])