1 # $NetBSD: krb5.buildlink3.mk,v 1.10 2006/11/04 22:18:58 rillig Exp $
3 # This Makefile fragment is meant to be included by packages that
4 # require a Kerberos 5 implementation. krb5.buildlink3.mk will:
6 # * set KRB5BASE to the base directory of the Kerberos 5 files;
7 # * set KRB5_TYPE to the Kerberos 5 implementation used.
9 # User-settable variables:
12 # The default Kerberos 5 implementation to use.
14 # Possible values: heimdal mit-krb5
16 # Package-settable variables:
19 # The list of Kerberos 5 implementations that can be used by the
22 # Possible values: (see KRB5_DEFAULT)
24 # Keywords: kerberos heimdal krb krb5 mit-krb5
26 KRB5_BUILDLINK3_MK
:= ${KRB5_BUILDLINK3_MK}+
28 .
include "../../mk/bsd.prefs.mk"
30 .if
!empty
(KRB5_BUILDLINK3_MK
:M
+)
31 .if
${OPSYS} != Darwin
32 KRB5_DEFAULT?
= heimdal
34 KRB5_DEFAULT?
= mit-krb5
36 KRB5_ACCEPTED?
= ${_KRB5_PKGS}
38 # This is an exhaustive list of all of the Kerberos 5 implementations
39 # that may be used with krb5.buildlink3.mk, in order of precedence.
41 _KRB5_PKGS?
= heimdal mit-krb5
43 _KRB5_DEFAULT
= ${KRB5_DEFAULT}
44 _KRB5_ACCEPTED
= ${KRB5_ACCEPTED}
46 _KRB5_TYPE?
= ${_KRB5_DEFAULT}
48 . if
!empty
(_KRB5_ACCEPTED
:M
${_KRB5_TYPE})
49 KRB5_TYPE
= ${_KRB5_TYPE}
53 KRB5BASE
= ${BUILDLINK_PREFIX.
${KRB5_TYPE}}
55 BUILD_DEFS
+= KRB5_DEFAULT
56 BUILD_DEFS_EFFECTS
+= KRB5BASE KRB5_TYPE
58 # Packages that use Kerberos are automatically categorized as restricted
61 CRYPTO
+= uses Kerberos encryption code
63 .
endif # KRB5_BUILDLINK3_MK
65 .if
${KRB5_TYPE} == "none"
67 "${_KRB5_TYPE} is not an acceptable Kerberos 5 type for ${PKGNAME}."
68 .elif
${KRB5_TYPE} == "heimdal"
69 .
include "../../security/heimdal/buildlink3.mk"
70 .elif
${KRB5_TYPE} == "mit-krb5"
71 .
include "../../security/mit-krb5/buildlink3.mk"