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 $
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)
11 if test "$with_clamav" != no; then
13 if test -d $with_clamav; then
14 clamav_path=${with_clamav}:${with_clamav}/bin
16 clamav_path=/usr/local/bin:/usr/bin:$PATH
18 AC_PATH_PROG(CLAMAV_CONFIG,clamav-config,,[$clamav_path])
20 if test -x "$CLAMAV_CONFIG"; then
21 LIB_CLAMAV="`$CLAMAV_CONFIG --libs` -lclamav"
22 CFLAGS_CLAMAV=`$CLAMAV_CONFIG --cflags`
24 if test -n "$LIB_CLAMAV"; then
26 test -n "$CFLAGS_CLAMAV" && CPPFLAGS="$CPPFLAGS $CFLAGS_CLAMAV"
27 AC_DEFINE(HAVE_CLAMAV,[],[Do we have ClamAV?])
33 AC_MSG_CHECKING(ClamAV support)
34 AC_MSG_RESULT($have_clamav)