|
|
|
@ -15,16 +15,27 @@
|
|
|
|
|
# install development headers by default |
|
|
|
|
var_append confopt ' ' "--enable-header-install" |
|
|
|
|
|
|
|
|
|
# LDAP support |
|
|
|
|
if pkginstalled openldap ; then |
|
|
|
|
pkgprefix -t openldap |
|
|
|
|
var_append extraconfopt ' ' "--with-ldap" |
|
|
|
|
fi |
|
|
|
|
# package/option mappings for auto-configuration |
|
|
|
|
pkg_dovecot_options="openldap:ldap postgresql:pgsql" |
|
|
|
|
|
|
|
|
|
# generic SQL support |
|
|
|
|
var_append extraconfopt ' ' "--with-sql=plugin" |
|
|
|
|
|
|
|
|
|
# postgresql support |
|
|
|
|
if pkginstalled -f postgresql; then |
|
|
|
|
var_append extraconfopt ' ' "--with-pgsql" |
|
|
|
|
fi |
|
|
|
|
# automatic feature selection according to the package/option mappings |
|
|
|
|
pkg_dovecot_autoconfig() { |
|
|
|
|
local args="$@" |
|
|
|
|
for x in $args; do |
|
|
|
|
local package="${x%:*}" |
|
|
|
|
local option="${x#*:}" |
|
|
|
|
[ ! -z "$option" ] || option="$package" |
|
|
|
|
if pkginstalled -f "$package"; then |
|
|
|
|
pkgprefix -t "$package" |
|
|
|
|
var_append extraconfopt ' ' "--with-$option" |
|
|
|
|
case $package in |
|
|
|
|
*sql*) enable_sql=true ;; |
|
|
|
|
esac |
|
|
|
|
fi |
|
|
|
|
done |
|
|
|
|
# generic SQL support/build drivers as plugins |
|
|
|
|
if $enable_sql; then |
|
|
|
|
var_append extraconfopt ' ' "--with-sql=plugin" |
|
|
|
|
fi |
|
|
|
|
} |
|
|
|
|
pkg_dovecot_autoconfig "$pkg_dovecot_options" |
|
|
|
|