ITS#8224 Simplify --disable-slapd logic

This commit is contained in:
Ryan Tandy 2020-04-18 09:51:50 -07:00 committed by Ryan Tandy
parent eadba4d0fe
commit a2882e5eae

View File

@ -261,8 +261,20 @@ dnl ----------------------------------------------------------------
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
dnl SLAPD OPTIONS dnl SLAPD OPTIONS
SlapdOptions="dynacl \
aci \
cleartext \
crypt \
spasswd \
modules \
rlookups \
slapi \
slp \
wrappers"
AC_ARG_ENABLE(xxslapdoptions,[ AC_ARG_ENABLE(xxslapdoptions,[
SLAPD (Standalone LDAP Daemon) Options:]) SLAPD (Standalone LDAP Daemon) Options:])
OL_ARG_ENABLE(slapd, [AS_HELP_STRING([--enable-slapd], [enable building slapd])], yes)dnl OL_ARG_ENABLE(slapd, [AS_HELP_STRING([--enable-slapd], [enable building slapd])], yes)dnl
OL_ARG_ENABLE(dynacl, [AS_HELP_STRING([--enable-dynacl], [enable run-time loadable ACL support (experimental)])], no)dnl OL_ARG_ENABLE(dynacl, [AS_HELP_STRING([--enable-dynacl], [enable run-time loadable ACL support (experimental)])], no)dnl
OL_ARG_ENABLE(aci, [AS_HELP_STRING([--enable-aci], [enable per-object ACIs (experimental)])], no, [no yes mod])dnl OL_ARG_ENABLE(aci, [AS_HELP_STRING([--enable-aci], [enable per-object ACIs (experimental)])], no, [no yes mod])dnl
@ -412,56 +424,23 @@ dnl ----------------------------------------------------------------
# validate options # validate options
if test $ol_enable_slapd = no ; then if test $ol_enable_slapd = no ; then
dnl SLAPD was specifically disabled dnl SLAPD was specifically disabled
if test $ol_enable_slapi = yes ; then dnl Disable all of its options
AC_MSG_WARN([slapd disabled, ignoring --enable-slapi argument])
fi for i in $SlapdOptions; do
case "$ol_enable_backends" in yes | mod) eval "ol_tmp=\$ol_enable_$i"
AC_MSG_WARN([slapd disabled, ignoring --enable-backends argument]) if test $ol_tmp = yes ; then
esac AC_MSG_WARN([slapd disabled, ignoring --enable-$i argument])
for i in $Backends; do eval "ol_enable_$i=no"
fi
done
for i in $Backends $Overlays; do
eval "ol_tmp=\$ol_enable_$i" eval "ol_tmp=\$ol_enable_$i"
if test $ol_tmp != no ; then if test $ol_tmp != no ; then
AC_MSG_WARN([slapd disabled, ignoring --enable-$i argument]) AC_MSG_WARN([slapd disabled, ignoring --enable-$i argument])
eval "ol_enable_$i=no" eval "ol_enable_$i=no"
fi fi
done done
if test $ol_enable_modules = yes ; then
AC_MSG_WARN([slapd disabled, ignoring --enable-modules argument])
fi
if test $ol_enable_wrappers = yes ; then
AC_MSG_WARN([slapd disabled, ignoring --enable-wrappers argument])
fi
if test $ol_enable_rlookups = yes ; then
AC_MSG_WARN([slapd disabled, ignoring --enable-rlookups argument])
fi
if test $ol_enable_dynacl = yes ; then
AC_MSG_WARN([slapd disabled, ignoring --enable-dynacl argument])
fi
if test $ol_enable_aci != no ; then
AC_MSG_WARN([slapd disabled, ignoring --enable-aci argument])
fi
dnl overlays
case "$ol_enable_overlays" in yes | mod)
AC_MSG_WARN([slapd disabled, ignoring --enable-overlays argument])
esac
for i in $Overlays; do
eval "ol_tmp=\$ol_enable_$i"
if test $ol_tmp != no ; then
AC_MSG_WARN([slapd disabled, ignoring --enable-$i argument])
eval "ol_enable_$i=no"
fi
done
# force settings to no
ol_enable_slapi=no
ol_enable_backends=
ol_enable_overlays=
ol_enable_modules=no
ol_enable_rlookups=no
ol_enable_dynacl=no
ol_enable_aci=no
ol_enable_wrappers=no
elif test $ol_enable_modules != yes && elif test $ol_enable_modules != yes &&
test $ol_enable_dnssrv = no && test $ol_enable_dnssrv = no &&