. "$GRIMOIRE/FUNCTIONS" &&

depends gmp &&
depends nspr &&
depends nss &&
depends PKG-CONFIG &&
depends iptables &&

if is_version_less $(get_kernel_version) 2.6.9; then
  depends ipsec-tools
else
  depends iproute2 &&

  if spell_ok iproute2 && is_version_less $(installed_version iproute2) 2.6.8; then
    force_depends iproute2
  fi
fi &&

optional_depends linux-pam \
                 "USE_XAUTHPAM=true" \
                 "USE_XAUTHPAM=false" \
                 "for pam/xauth support" &&

optional_depends curl \
                 "USE_LIBCURL=true" \
                 "USE_LIBCURL=false" \
                 "for CRL fetching support via curl" &&

optional_depends openldap \
                 "USE_LDAP=true" \
                 "USE_LDAP=false" \
                 "for CRL fetching support via openldap" &&

optional_depends libselinux \
                 "USE_LABELED_IPSEC=true" \
                 "USE_LABELED_IPSEC=false" \
                 "for Labeled IPSec Functionality" &&

optional_depends unbound \
                 "USE_DNSSEC=true" \
                 "USE_DNSSEC=false" \
                 "for DNSSEC support" &&

optional_depends libcap-ng \
                 "USE_LIBCAP_NG=true" \
                 "USE_LIBCAP_NG=false" \
                 "to drop unneeded capabilities for the pluto daemon"
