freebsd-ports/security/cyrus-sasl/scripts/configure.sasl
David W. Chapman Jr. ce0f01c8dd USE DOCSDIR and PORTDOCS
ADD IPv6 support

PR:		29404
Submitted by:	maintainer
2001-08-13 04:01:26 +00:00

94 lines
2 KiB
Bash

#!/bin/sh
# $FreeBSD$
if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
exit
fi
tempfile=`mktemp -t checklist`
if [ "${BATCH}" ]; then
if [ "x${ENABLE_DB3}" = "xYES" ]; then
OPTIONS=\"DB3\"
fi
if [ "x${ENABLE_MYSQL}" = "xYES" ]; then
OPTIONS="${OPTIONS} \"MySQL\""
fi
if [ "x${ENABLE_LDAP}" = "xYES" ]; then
OPTIONS="${OPTIONS} \"OpenLDAP\""
fi
if [ "x${OPTIONS}" != "x" ]; then
set ${OPTIONS}
fi
else
if [ "x${ENABLE_DB3}" = "xYES" -o -f ${PREFIX}/lib/libdb3.so ] ; then
SET_DB3="ON"
else
SET_DB3="OFF"
fi
if [ "x${ENABLE_MYSQL}" = "xYES" -o -f ${PREFIX}/lib/mysql/libmysqlclient.so ] ; then
SET_MYSQL="ON"
else
SET_MYSQL="OFF"
fi
if [ "x${ENABLE_LDAP}" = "xYES" -o \
-f ${PREFIX}/lib/libldap.so -a -f ${PREFIX}/lib/liblber.so ] ; then
SET_LDAP="ON"
else
SET_LDAP="OFF"
fi
/usr/bin/dialog --title "Additional SASL options" --clear \
--checklist "\n\
Please select desired options:" -1 -1 16 \
DB3 "Berkeley DB package, revision 3" ${SET_DB3} \
MySQL "MySQL password Authentication" ${SET_MYSQL} \
OpenLDAP "OpenLDAP password Authentication" ${SET_LDAP} \
2> $tempfile
retval=$?
if [ -s $tempfile ]; then
set `cat $tempfile`
fi
rm -f $tempfile
case $retval in
0) if [ -z "$*" ]; then
echo "Nothing selected"
fi
;;
1) echo "Cancel pressed."
exit 1
;;
esac
fi
${MKDIR} ${WRKDIRPREFIX}${CURDIR}
exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
echo "PREFIX= ${PREFIX}"
while [ "$1" ]; do
case $1 in
\"DB3\")
echo "LIB_DEPENDS+= db3.2:\${PORTSDIR}/databases/db3"
echo "CONFIGURE_ARGS+=--with-dblib=berkeley"
;;
\"MySQL\")
echo "LIB_DEPENDS+= mysqlclient.10:\${PORTSDIR}/databases/mysql323-client"
echo "CONFIGURE_ARGS+=--with-mysql=\${PREFIX}"
;;
\"OpenLDAP\")
echo "LIB_DEPENDS+= ldap.1:\${PORTSDIR}/net/openldap"
echo "LIB_DEPENDS+= lber.1:\${PORTSDIR}/net/openldap"
echo "CONFIGURE_ARGS+=--with-ldap=\${PREFIX}"
;;
*)
echo "Invalid option(s): $*" > /dev/stderr
rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
exit 1
;;
esac
shift
done