From: Francesco Chemolli Date: Mon, 28 Dec 2009 21:15:27 +0000 (+0100) Subject: Refactored Digest helpers selection code. X-Git-Tag: SQUID_3_2_0_1~310^2~11^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea9b7bb62ddec8474af3cf147530c7e93a3d4b78;p=thirdparty%2Fsquid.git Refactored Digest helpers selection code. --- diff --git a/configure.in b/configure.in index aa024e1f97..83034d68b8 100644 --- a/configure.in +++ b/configure.in @@ -1683,47 +1683,39 @@ AC_SUBST(NEGOTIATE_AUTH_HELPERS) dnl Select digest auth scheme helpers to build -if test -n "$AUTH_MODULES_digest"; then - DIGEST_AUTH_HELPERS=all +if test "$AUTH_MODULES_digest" = "yes" ; then + squid_opt_digest_auth_helpers="auto" +else + squid_opt_digest_auth_helpers="" fi AC_ARG_ENABLE(digest-auth-helpers, - AS_HELP_STRING([--enable-digest-auth-helpers="list of helpers"],[This option selects which digest scheme authentication + AS_HELP_STRING([--enable-digest-auth-helpers="list of helpers"], + [This option selects which digest scheme authentication helpers to build and install as part of the normal build process. For a list of available helpers see the - helpers/digest_auth directory.]), -[ case "$enableval" in - yes) - DIGEST_AUTH_HELPERS="all" - ;; - no) - DIGEST_AUTH_HELPERS="" - ;; - *) - DIGEST_AUTH_HELPERS="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`" - ;; + helpers/digest_auth directory.]), [ +case "$enableval" in + yes) squid_opt_digest_auth_helpers="all" ;; + no) squid_opt_digest_auth_helpers="" ;; + *) squid_opt_digest_auth_helpers="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`" ;; esac ]) -if test "$DIGEST_AUTH_HELPERS" = "all" ; then - DIGEST_AUTH_HELPERS="" - for dir in $srcdir/helpers/digest_auth/*; do - helper="`basename $dir`" - if test -f $dir/config.test && sh $dir/config.test "$@"; then - DIGEST_AUTH_HELPERS="$DIGEST_AUTH_HELPERS $helper" - elif test -d $srcdir/helpers/digest_auth/$helper ; then - AC_MSG_NOTICE([Digest auth helper $helper ... found but cannot be built]) - fi - done +if test "$squid_opt_digest_auth_helpers" = "auto" ; then + squid_opt_digest_auth_helpers="" + SQUID_LOOK_FOR_MODULES([$srcdir/helpers/digest_auth],[squid_opt_digest_auth_helpers]) fi -if test -n "$DIGEST_AUTH_HELPERS"; then - for helper in $DIGEST_AUTH_HELPERS; do - if test -f $srcdir/helpers/digest_auth/$helper/Makefile.in; then - : - else - AC_MSG_ERROR(digest auth helper $helper does not exist) - fi - done - AC_MSG_NOTICE([Digest auth helpers built: $DIGEST_AUTH_HELPERS]) +if test -n "$squid_opt_digest_auth_helpers" -a -z "$AUTH_MODULES_digest" ; then + AC_MSG_WARN([Digest auth helpers selected without the Digest scheme enabled]) fi +for helper in $squid_opt_digest_auth_helpers ; do + dir="$srcdir/helpers/digest_auth/$helper" + if test -f $dir/config.test && sh $dir/config.test "$@"; then + DIGEST_AUTH_HELPERS="$DIGEST_AUTH_HELPERS $helper" + elif test -d $srcdir/helpers/digest_auth/$helper ; then + AC_MSG_NOTICE([Digest auth helper $helper ... found but cannot be built]) + fi +done +AC_MSG_NOTICE([Digest auth helpers built: $DIGEST_AUTH_HELPERS]) AC_SUBST(DIGEST_AUTH_HELPERS) dnl Select logging daemon helpers to build