Hi,
I'm hoping that the attached diff could be applied to the configure.in
file in the clamav tree? I needed these diffs for compiling on NetBSD.
(apologies if this isn't the right place to send diffs, but I couldn't
see a bugs section on the web pages)
The diff does the following:
fixes the --disable-milter command line option so it works, even if the
milter header file mfapi.h is found.
adds pthread support for NetBSD. I believe that if a valid pthread.h
file is found then some kind of support should be available, either
-current NetBSD with native pthreads or gnu-pth where native threads
aren't available.
The diff is against the 0.60 release.
Many thanks,
Chris
$NetBSD: patch-aa,v 1.4 2003/09/28 23:39:24 chris Exp $
--- configure.in.orig 2003-06-21 04:05:32.000000000 +0100
+++ configure.in 2003-09-28 23:35:17.000000000 +0100
@@ -74,12 +74,16 @@
AC_CHECK_LIB(bz2, bzReadOpen, AC_DEFINE(NOBZ2PREFIX),)
fi
-have_milter="no"
-AC_CHECK_HEADER(libmilter/mfapi.h,have_milter="yes",)
-
AC_ARG_ENABLE(milter,
[ --enable-milter Build clamav-milter (if milter library found)],
-,have_milter="no")
+want_milter=$enableval, want_milter=no)
+
+have_milter=no
+if test "$want_milter" = "yes"
+then
+ AC_CHECK_HEADER(libmilter/mfapi.h,[have_milter=yes],)
+fi
+
AC_CHECK_HEADER(syslog.h,AC_DEFINE(CLAMD_USE_SYSLOG),)
@@ -255,8 +259,12 @@
AC_DEFINE(C_BSD)
;;
netbsd*)
- AC_MSG_RESULT(NetBSD detected. Disabling thread support.)
- have_pthreads="no"
+ if test "$have_pthreads" = "yes"; then
+ LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lpthread"
+ CLAMD_LIBS="-lpthread"
+ TH_SAFE="-thread-safe"
+ AC_DEFINE(CL_THREAD_SAFE)
+ fi
AC_DEFINE(C_BSD)
;;
bsd*)