aboutsummaryrefslogtreecommitdiff
path: root/security/cyrus-sasl2/scripts/configure.sasl
diff options
context:
space:
mode:
Diffstat (limited to 'security/cyrus-sasl2/scripts/configure.sasl')
-rw-r--r--security/cyrus-sasl2/scripts/configure.sasl81
1 files changed, 74 insertions, 7 deletions
diff --git a/security/cyrus-sasl2/scripts/configure.sasl b/security/cyrus-sasl2/scripts/configure.sasl
index 0ced2b0a6a71..de595adfc6bb 100644
--- a/security/cyrus-sasl2/scripts/configure.sasl
+++ b/security/cyrus-sasl2/scripts/configure.sasl
@@ -8,7 +8,11 @@ fi
tempfile=`mktemp -t checklist`
if [ "${BATCH}" ]; then
- if [ "${WITH_DB3}" ]; then
+ if [ "${WITH_DB41}" ]; then
+ OPTIONS="\"DB41\""
+ elif [ "${WITH_DB4}" ]; then
+ OPTIONS="\"DB4\""
+ elif [ "${WITH_DB3}" ]; then
OPTIONS="\"DB3\""
else
OPTIONS="\"NDBM\""
@@ -16,7 +20,9 @@ if [ "${BATCH}" ]; then
if [ "${WITH_MYSQL}" ]; then
OPTIONS="${OPTIONS} \"MySQL\""
fi
- if [ "${WITH_LDAP}" ]; then
+ if [ "${WITH_LDAP21}" ]; then
+ OPTIONS="${OPTIONS} \"OpenLDAP21\""
+ elif [ "${WITH_LDAP}" ]; then
OPTIONS="${OPTIONS} \"OpenLDAP\""
fi
if [ "${OPTIONS}" != "x" ]; then
@@ -24,10 +30,24 @@ if [ "${BATCH}" ]; then
set ${OPTIONS}
fi
else
- if [ "${WITH_DB3}" -o -f ${PREFIX}/lib/libdb3.so ] ; then
+ if [ "${WITH_DB41}" -o -f ${PREFIX}/lib/libdb41.so ] ; then
+ SET_DB41="ON"
+ SET_DB4="OFF"
+ SET_DB3="OFF"
+ SET_NDBM="OFF"
+ elif [ "${WITH_DB4}" -o -f ${PREFIX}/lib/libdb4.so ] ; then
+ SET_DB41="OFF"
+ SET_DB4="ON"
+ SET_DB3="OFF"
+ SET_NDBM="OFF"
+ elif [ "${WITH_DB3}" -o -f ${PREFIX}/lib/libdb3.so ] ; then
+ SET_DB41="OFF"
+ SET_DB4="OFF"
SET_DB3="ON"
SET_NDBM="OFF"
else
+ SET_DB41="OFF"
+ SET_DB4="OFF"
SET_DB3="OFF"
SET_NDBM="ON"
fi
@@ -36,9 +56,15 @@ else
else
SET_MYSQL="OFF"
fi
- if [ "${WITH_LDAP}" -o -f ${PREFIX}/lib/libldap.so.2 -a -f ${PREFIX}/lib/liblber.so.2 ] ; then
+ if [ "${WITH_LDAP}" -o -f ${PREFIX}/lib/libldap.so.2 -a -f ${PREFIX}/lib/liblber.so.2 \
+ -a -f ${PREFIX}/bin/ldapwhoami ] ; then
+ SET_LDAP21="ON"
+ SET_LDAP="OFF"
+ elif [ "${WITH_LDAP}" -o -f ${PREFIX}/lib/libldap.so.2 -a -f ${PREFIX}/lib/liblber.so.2 ] ; then
+ SET_LDAP21="OFF"
SET_LDAP="ON"
else
+ SET_LDAP21="OFF"
SET_LDAP="OFF"
fi
@@ -47,8 +73,11 @@ else
Please select desired options:" -1 -1 16 \
NDBM "ndbm DB" ${SET_NDBM} \
DB3 "Berkeley DB, revision 3" ${SET_DB3} \
+DB4 "Berkeley DB, revision 4" ${SET_DB4} \
+DB41 "Berkeley DB, revision 4.1" ${SET_DB41} \
MySQL "MySQL password Authentication" ${SET_MYSQL} \
-OpenLDAP "OpenLDAP 2.x password Authentication w/TLS" ${SET_LDAP} \
+OpenLDAP "OpenLDAP 2.0 password Authentication w/TLS" ${SET_LDAP} \
+OpenLDAP21 "OpenLDAP 2.1 password Authentication w/TLS" ${SET_LDAP21} \
SASLAUTHD "Use saslauthd for password Authentication" ON \
2> $tempfile
@@ -81,7 +110,7 @@ while [ "$1" ]; do
case $1 in
\"NDBM\")
if [ "${DBLIB}" ]; then
- echo "ndbm and db3 are mutually exclusive." > /dev/stderr
+ echo "ndbm, db3, db4 and db41 are mutually exclusive." > /dev/stderr
rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
exit 1
fi
@@ -89,9 +118,31 @@ while [ "$1" ]; do
echo "SASLDB_NAME= sasldb2.db"
DBLIB=1
;;
+ \"DB41\")
+ if [ "${DBLIB}" ]; then
+ echo "ndbm, db3, db4 and db41 are mutually exclusive." > /dev/stderr
+ rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+ exit 1
+ fi
+ echo "LIB_DEPENDS+= db41.1:\${PORTSDIR}/databases/db41"
+ echo "CONFIGURE_ARGS+= --with-dblib=berkeley --with-bdb-incdir=${PREFIX}/include/db41 --with-bdb-libdir=${PREFIX}/lib"
+ echo "SASLDB_NAME= sasldb2"
+ DBLIB=1
+ ;;
+ \"DB4\")
+ if [ "${DBLIB}" ]; then
+ echo "ndbm, db3, db4 and db41 are mutually exclusive." > /dev/stderr
+ rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+ exit 1
+ fi
+ echo "LIB_DEPENDS+= db4.0:\${PORTSDIR}/databases/db4"
+ echo "CONFIGURE_ARGS+= --with-dblib=berkeley --with-bdb-incdir=${PREFIX}/include/db4 --with-bdb-libdir=${PREFIX}/lib"
+ echo "SASLDB_NAME= sasldb2"
+ DBLIB=1
+ ;;
\"DB3\")
if [ "${DBLIB}" ]; then
- echo "ndbm and db3 are mutually exclusive." > /dev/stderr
+ echo "ndbm, db3, db4 and db41 are mutually exclusive." > /dev/stderr
rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
exit 1
fi
@@ -106,7 +157,23 @@ while [ "$1" ]; do
echo "PLIST_SUB+= MYSQL=\"\""
DEFMYSQL=1
;;
+ \"OpenLDAP21\")
+ if [ "${OPENLDAP}" ]; then
+ echo "OpenLDAP 2.0 and 2.1 are mutually exclusive." > /dev/stderr
+ rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+ exit 1
+ fi
+ echo "LIB_DEPENDS+= ldap.2:\${PORTSDIR}/net/openldap21"
+ echo "LIB_DEPENDS+= lber.2:\${PORTSDIR}/net/openldap21"
+ echo "CONFIGURE_ARGS+= --with-ldap=\${PREFIX}"
+ OPENLDAP=1
+ ;;
\"OpenLDAP\")
+ if [ "${OPENLDAP}" ]; then
+ echo "OpenLDAP 2.0 and 2.1 are mutually exclusive." > /dev/stderr
+ rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+ exit 1
+ fi
echo "LIB_DEPENDS+= ldap.2:\${PORTSDIR}/net/openldap20"
echo "LIB_DEPENDS+= lber.2:\${PORTSDIR}/net/openldap20"
echo "CONFIGURE_ARGS+= --with-ldap=\${PREFIX}"