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

« back to all changes in this revision

Viewing changes to m4/reorganization/milter/check.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
dnl --enable-milter
 
2
if test "$have_milter" = "yes"; then
 
3
    dnl libmilter checking code adapted from spamass-milter by
 
4
    dnl Tom G. Christensen <tgc@statsbiblioteket.dk>
 
5
 
 
6
    dnl Check for libmilter and it's header files in the usual locations
 
7
    save_LIBS="$LIBS"
 
8
    CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lpthread"
 
9
    if test -d /usr/lib/libmilter ; then
 
10
        CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -L/usr/lib/libmilter"
 
11
    fi
 
12
    LIBS="$LIBS -lmilter $CLAMAV_MILTER_LIBS"
 
13
    AC_CHECK_LIB([milter],[mi_stop],[CLAMAV_MILTER_LIBS="-lmilter $CLAMAV_MILTER_LIBS"],[
 
14
        dnl Older sendmails require libsm or libsmutil for support functions
 
15
        AC_SEARCH_LIBS([strlcpy], [sm smutil], [test "$ac_cv_search_strlcpy" = "none required" || CLAMAV_MILTER_XLIB="$ac_cv_search_strlcpy"])
 
16
        LIBS="$save_LIBS $CLAMAV_MILTER_LIBS $CLAMAV_MILTER_XLIB"
 
17
        $as_unset ac_cv_lib_milter_mi_stop
 
18
        AC_CHECK_LIB([milter],[mi_stop],[CLAMAV_MILTER_LIBS="-lmilter $CLAMAV_MILTER_XLIB $CLAMAV_MILTER_LIBS"],[
 
19
            AC_MSG_ERROR([Cannot find libmilter])
 
20
        ])
 
21
    ])
 
22
    LIBS="$save_LIBS"
 
23
    AC_CHECK_HEADERS([libmilter/mfapi.h],[have_milter="yes"],[
 
24
        AC_MSG_ERROR([Please install mfapi.h from the sendmail distribution])
 
25
    ])
 
26
fi
 
27
 
 
28
AM_CONDITIONAL([BUILD_CLAMD],[test "$have_pthreads" = "yes"])
 
29
AM_CONDITIONAL([HAVE_MILTER],[test "$have_milter" = "yes"])