freebsd-ports/net/gnu-radius/scripts/configure
Mathieu Arnold 4031a6967c Remove databases/postgresql-client because there can't be a -server, and having
it installed prevents databases/postgresql7 from being installed, leading to
some dependencies problems
2004-05-25 09:19:42 +00:00

94 lines
2 KiB
Bash

#!/bin/sh
if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
exit
fi
tempfile=`/usr/bin/mktemp -t checklist`
if [ "${BATCH}" ]; then
set \"MySQL\"
else
/usr/bin/dialog --title "GNU-Radius configuration options" --clear \
--checklist "\n\
Please select desired options:" -1 -1 16 \
Client "Enable build client" OFF \
DBM "Enable DBM support" OFF \
MySQL "Enable MySQL support" ON \
PostgreSQL "Enable PostgreSQL support" OFF \
SNMP "Enable SNMP support" ON \
Notify "Enable TTL notification" OFF \
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
INCLUDE_PATH=${LOCALBASE}/include/
LIB_PATH=${LOCALBASE}/lib/
while [ "$1" ]; do
case $1 in
\"Client\")
echo "CONFIGURE_ARGS+= --with-client"
export GUILE=Yes
;;
\"DBM\")
echo "CONFIGURE_ARGS+= --enable-dbm=ndbm"
;;
\"MySQL\")
echo "USE_MYSQL= YES"
echo "CONFIGURE_ARGS+= --with-mysql"
LIB_PATH="$LIB_PATH:${LOCALBASE}/lib/mysql/"
;;
\"PostgreSQL\")
echo "POSTGRESQL_PORT?= databases/postgresql7"
echo "LIB_DEPENDS+= pq.3:\${PORTSDIR}/\${POSTGRESQL_PORT}"
echo "CONFIGURE_ARGS+= --with-postgres"
INCLUDE_PATH="$INCLUDE_PATH:${LOCALBASE}/include/pgsql/"
;;
\"SNMP\")
echo "CONFIGURE_ARGS+= --enable-snmp"
;;
\"Notify\")
echo "CONFIGURE_ARGS+= --enable-notify"
;;
*)
echo "Invalid option(s): $*" > /dev/stderr
rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
exit 1
;;
esac
shift
done
echo "CONFIGURE_ARGS+= --with-include-path=\"$INCLUDE_PATH\""
echo "CONFIGURE_ARGS+= --with-lib-path=\"$LIB_PATH\""
if [ -z $GUILE ]; then
echo "CONFIGURE_ARGS+= --without-guile"
echo "GUILE= \"@comment \""
else
echo "BUILD_DEPENDS+= guile:${PORTSDIR}/lang/guile"
echo "GUILE= \"\""
unset GUILE
fi
echo "PLIST_SUB+= GUILE=\${GUILE}"