summaryrefslogtreecommitdiff
path: root/mail/libmilter/buildlink2.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mail/libmilter/buildlink2.mk')
-rw-r--r--mail/libmilter/buildlink2.mk22
1 files changed, 20 insertions, 2 deletions
diff --git a/mail/libmilter/buildlink2.mk b/mail/libmilter/buildlink2.mk
index 8a1635591a8..881fbaf1962 100644
--- a/mail/libmilter/buildlink2.mk
+++ b/mail/libmilter/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.2 2003/05/02 11:55:39 wiz Exp $
+# $NetBSD: buildlink2.mk,v 1.3 2003/09/24 12:43:57 markd Exp $
#
# This Makefile fragment is included by packages that use libmilter.
#
@@ -6,12 +6,30 @@
.if !defined(LIBMILTER_BUILDLINK2_MK)
LIBMILTER_BUILDLINK2_MK= # defined
-BUILDLINK_PACKAGES+= libmilter
+.include "../../mk/bsd.prefs.mk"
+
BUILDLINK_DEPENDS.libmilter?= libmilter>=8.12.9nb1
BUILDLINK_PKGSRCDIR.libmilter?= ../../mail/libmilter
+.if exists(/usr/lib/libmilter.a)
+_MILTER_FILELIST!= ar t /usr/lib/libmilter.a
+. if empty(_MILTER_FILELIST:Merrstring.o)
+_NEED_LIBMILTER= YES
+. else
+_NEED_LIBMILTER= NO
+. endif
+.else
+_NEED_LIBMILTER= YES
+.endif
+
+.if ${_NEED_LIBMILTER} == "YES"
+BUILDLINK_PACKAGES+= libmilter
EVAL_PREFIX+= BUILDLINK_PREFIX.libmilter=libmilter
BUILDLINK_PREFIX.libmilter_DEFAULT= ${LOCALBASE}
+.else
+BUILDLINK_PREFIX.libmilter= /usr
+.endif
+
BUILDLINK_FILES.libmilter+= include/libmilter/mfapi.h
BUILDLINK_FILES.libmilter+= include/libmilter/mfdef.h
BUILDLINK_FILES.libmilter+= lib/libmilter.*