]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Francesco Chemolli <kinkie@squid-cache.org>
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 17 Oct 2008 12:17:45 +0000 (01:17 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 17 Oct 2008 12:17:45 +0000 (01:17 +1300)
Bug 2489: Testsuite doesn't obey authentication scheme ./configure parameters

I've added a couple of AC_DEFINEs and a couple of #ifdefs to make the
offending tests conditional on the actually-built builtin auth-methods.

1  2 
configure.in
src/tests/testAuth.cc
src/tests/testAuth.h

diff --combined configure.in
index 0e3d42de2e257e989a87ef275c08ba8620ebc07a,8aadb737a315c984ddda2f023591417afa5bfece..99ddf18b0059ae7a5f342ac6579bfc110aa8e8e2
@@@ -31,12 -31,8 +31,12 @@@ AC_PROG_CX
  AC_CANONICAL_HOST
  
  dnl Make location configure settings available to the code
 -AC_DEFINE_UNQUOTED([DEFAULT_SQUID_CONFIG_DIR], "${sysconfdir}" , [Location of Configuration files] )
 -AC_DEFINE_UNQUOTED([DEFAULT_SQUID_DATA_DIR], "${datadir}" , [Location of other data files] )
 +dnl Pass squid data directory (icons, errors etc)  base location to code files as a compiler define
 +CFLAGS="-DDEFAULT_SQUID_DATA_DIR=\\\"$datadir\\\" $CFLAGS"
 +CXXFLAGS="-DDEFAULT_SQUID_DATA_DIR=\\\"$datadir\\\" $CXXFLAGS"
 +dnl Pass squid.conf directory base location to code files as a compiler define
 +CFLAGS="-DDEFAULT_SQUID_CONFIG_DIR=\\\"$sysconfdir\\\" $CFLAGS"
 +CXXFLAGS="-DDEFAULT_SQUID_CONFIG_DIR=\\\"$sysconfdir\\\" $CXXFLAGS"
  
  use_loadable_modules=1
  AC_MSG_CHECKING(whether to use loadable modules)
@@@ -58,7 -54,7 +58,7 @@@ AC_ARG_ENABLE(loadable-modules
          use_loadable_modules=yes;
          AC_MSG_RESULT([$use_loadable_modules, implicitly])
      ]
 -)        
 +)
  
  AM_CONDITIONAL(USE_LOADABLE_MODULES, test $use_loadable_modules = yes)
  
@@@ -167,21 -163,6 +167,21 @@@ AC_ARG_WITH(default-user
  )
  AC_SUBST(CACHE_EFFECTIVE_USER)
  
 +DEFAULT_LOG_DIR="$localstatedir/logs"
 +AC_ARG_WITH(logdir,
 + [  --with-logdir=PATH Default location for squid logs. default: $DEFAULT_LOG_DIR],
 + [ case $withval in
 +   yes|no)
 +     AC_MSG_ERROR( --with-logdir requires a directory PATH. --with-logdir=PATH )
 +     ;;
 +   *)
 +     DEFAULT_LOG_DIR="$withval"
 +     ;;
 +   esac
 + ]
 +)
 +AC_SUBST(DEFAULT_LOG_DIR)
 +
  dnl Gerben Wierda <Gerben_Wierda@RnA.nl>
  case "$host" in
      mab-next-nextstep3)
@@@ -717,10 -698,12 +717,10 @@@ AC_SUBST(REPL_LIBS
  
  AM_CONDITIONAL(ENABLE_PINGER, false)
  AC_ARG_ENABLE(icmp,
 -[  --enable-icmp           Enable ICMP pinging],
 +      AC_HELP_STRING([--enable-icmp],[Enable ICMP pinging and Network Measurement]),
  [ if test "$enableval" = "yes" ; then
      echo "ICMP enabled"
 -    AC_DEFINE(USE_ICMP,1,
 -    [ Defined this to use Squid's ICMP features (highly recommended!)
 -      When USE_ICMP is defined, Squid will send ICMP pings to origin server sites.])
 +    AC_DEFINE(USE_ICMP,1,[Define to use Squid's ICMP and Network Measurement features (highly recommended!)])
      AM_CONDITIONAL(ENABLE_PINGER, true)
    fi
  ])
@@@ -797,21 -780,13 +797,21 @@@ the
              eCAP support requires loadable modules. Please do not use
              --disable-loadable-modules with --enable-ecap.]);
      fi
 +
 +    dnl eCAP support requires libecap
 +    AC_CHECK_LIB([ecap], [main],
 +        [ECAP_LIBS="-lecap"],
 +        [AC_MSG_FAILURE([
 +            eCAP support requires libecap library,
 +            but no usable library was found])]
 +    )
  fi
  
  AM_CONDITIONAL(USE_ECAP, test $use_ecap = yes)
  if test $use_ecap = yes;
  then
      AC_DEFINE(USE_ECAP,1,[Enable eCAP support])
 -    ECAP_LIBS="eCAP/libeCAP.la"
 +    ECAP_LIBS="eCAP/libeCAP.la $ECAP_LIBS"
      use_adaptation=yes
  else
      AC_DEFINE(USE_ECAP,0,[Disable eCAP support])
@@@ -1052,7 -1027,7 +1052,7 @@@ AC_ARG_ENABLE(forw-via-db
  
  AC_ARG_ENABLE(cache-digests,
  [  --enable-cache-digests  Use Cache Digests
 -                          see http://www.squid-cache.org/FAQ/FAQ-16.html],
 +                          see http://wiki.squid-cache.org/SquidFaq/CacheDigests],
  [ if test "$enableval" = "yes" ; then
      echo "USE_CACHE_DIGESTS enabled"
      AC_DEFINE(USE_CACHE_DIGESTS,1,[Use Cache Digests for locating objects in neighbor caches.  This code is still semi-experimental.])
@@@ -1483,6 -1458,12 +1483,12 @@@ AC_SUBST(AUTH_LIBS
  AC_SUBST(AUTH_LINKOBJS)
  AC_SUBST(AUTH_OBJS)
  
+ dnl bundled auth modules, in order to have handy defines for the cppunit testsuite
+ test -n "$AUTH_MODULE_basic" && AC_DEFINE([HAVE_AUTH_MODULE_BASIC],1,[Basic auth module is built])
+ test -n "$AUTH_MODULE_digest" && AC_DEFINE([HAVE_AUTH_MODULE_DIGEST],1,[Digest auth module is built])
+ test -n "$AUTH_MODULE_ntlm" && AC_DEFINE([HAVE_AUTH_MODULE_NTLM],1,[NTLM auth module is built])
+ test -n "$AUTH_MODULE_negotiate" && AC_DEFINE([HAVE_AUTH_MODULE_NEGOTIATE],1,[Negotiate auth module is built])
  dnl Select basic auth scheme helpers to build
  if test -n "$AUTH_MODULE_basic"; then
        BASIC_AUTH_HELPERS="all"
@@@ -1615,15 -1596,6 +1621,15 @@@ if test -n "$NEGOTIATE_AUTH_HELPERS"; t
        else
            AC_MSG_ERROR(Negotiate Auth helper $helper does not exist)
        fi
 +      # Kerberos helper has its own configure system
 +      if test "$srcdir/helpers/negotiate_auth/$helper/configure" ; then
 +          if test $helper = squid_kerb_auth; then
 +              AC_CONFIG_SUBDIRS(helpers/negotiate_auth/squid_kerb_auth)
 +          else
 +              echo "ERROR: configure.in needs to be extended to support $helper!"
 +              exit 1
 +          fi
 +      fi
      done
      echo "Negotiate auth helpers built: $NEGOTIATE_AUTH_HELPERS"
  fi
@@@ -1855,9 -1827,9 +1861,9 @@@ AC_ARG_ENABLE(x_accelerator_vary
  
  dnl Enable IPv6 support
  AC_MSG_CHECKING([whether to enable IPv6])
 -use_ipng=no
 +use_ipng=yes
  AC_ARG_ENABLE(ipv6,
 -[  --enable-ipv6           Enable ipv6 support],
 +      AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
  [ AC_MSG_RESULT(yes)
    AC_CACHE_CHECK([if PF_INET6 is available], $enableval,
      AC_TRY_RUN(
          AC_MSG_RESULT(yes)
          use_ipng=yes
        ],
 -      [ AC_DEFINE(USE_IPV6,0,[0 == Disable support for IPv6])
 -        AC_DEFINE(IPV6_SPECIAL_SPLITSTACK,0,[Enable support for IPv6 on split-stack implementations])
 -        AC_DEFINE(IPV6_SPECIAL_LOCALHOST,0,[Convert IPv4-localhost requests to IPv6. Default: Keep seperate.])
 -        AC_DEFINE(IPV6_SPECIAL_V4MAPPED,0,[Enable v4-mapping through v6 sockets])
 -        AC_MSG_RESULT(no)
 +      [ AC_MSG_RESULT(no)
 +        use_ipng=no
        ])
     )
  ],
 -[ AC_DEFINE(USE_IPV6,0,[Disable support for IPv6])
 -  AC_DEFINE(IPV6_SPECIAL_SPLITSTACK,0,[Enable support for IPv6 on split-stack implementations])
 -  AC_DEFINE(IPV6_SPECIAL_LOCALHOST,0,[Convert IPv4-localhost requests to IPv6. Default: Keep seperate.])
 -  AC_DEFINE(IPV6_SPECIAL_V4MAPPED,0,[Enable v4-mapping through v6 sockets])
 -  AC_MSG_RESULT(no)
 +[ AC_MSG_RESULT(no)
 +  use_ipng=no
  ])
  
  if test "$use_ipng" = "yes"; then
  
 +dnl Check for IPv6 Windows Vista option
 +dnl Also useful for other OS with hybrid-stack defaults turned OFF
 +AC_DEFINE(IPV6_SPECIAL_V4MAPPED, 1, [Enable v4-mapping through v6 sockets])
 +
  dnl Check for Windows XP option
  AC_MSG_CHECKING([for IPv6 split-stack requirement])
  AC_ARG_WITH(ipv6-split-stack,
 -  [  --with-ipv6-split-stack  Require IPv6 split-stack support. Requires IPv6 Support.],
 -  [AC_DEFINE(IPV6_SPECIAL_SPLITSTACK, 1, [Enable support for IPv6 on split-stack implementations]) AC_MSG_RESULT(yes)],
 +      AC_HELP_STRING([--with-ipv6-split-stack],[Require IPv6 split-stack support. Requires IPv6 Support.]),
 +  [ AC_DEFINE(IPV6_SPECIAL_SPLITSTACK, 1, [Enable support for IPv6 on split-stack implementations])
 +    AC_DEFINE(IPV6_SPECIAL_V4MAPPED, 0, [Enable v4-mapping through v6 sockets. Requires IPv6 hybrid-stack.])
 +    AC_MSG_RESULT(yes)
 +  ],
    [AC_DEFINE(IPV6_SPECIAL_SPLITSTACK, 0, [Enable support for IPv6 on split-stack implementations]) AC_MSG_RESULT(no)]
  )
  
 -dnl Check for IPv6 Windows Vista option
 -dnl Also useful for other OS
 -AC_MSG_CHECKING([for IPv6 v4-mapping requirement])
 -AC_ARG_WITH(ipv4-mapped,
 -  [  --with-ipv4-mapped  Hybrid-Stack OS require Squid to do any v4-mapping. Requires IPv6 Support.],
 -  [AC_DEFINE(IPV6_SPECIAL_V4MAPPED, 1, [Enable v4-mapping through v6 sockets]) AC_MSG_RESULT(yes)],
 -  [AC_DEFINE(IPV6_SPECIAL_V4MAPPED, 0, [Enable v4-mapping through v6 sockets]) AC_MSG_RESULT(no)]
 -)
 -
 -dnl Check for IPv6-pure option
 +dnl Check for IPv6-localhost option
  AC_MSG_CHECKING([for IPv6-Localhost requirement])
  AC_ARG_WITH(localhost-ipv6,
 -  [  --with-localhost-ipv6    Prefer IPv6 localhost address over IPv4. Requires IPv6 Support.
 -                           Treats 127.0.0.1 and ::1 as identical and converts all inputs of to ::1
 -                           This depends on Dual-Stack support in the OS and all applications
 -                           squid contacts via localhost being IPv6 enabled.
 -                           Default: OFF. Treats these two IP as different, squid.conf must
 -                           define both 127.0.0.1 and ::1 for the localhost ACL, etc. ],
 +  AC_HELP_STRING([--with-localhost-ipv6], [ WARNING: This is an RFC violation!][
 +              Treat 127.0.0.1 and ::1 as identical and convert all inputs of localhost to ::1
 +              This depends on IPv6 support and all applications squid contacts via localhost being IPv6 enabled.]),
    [AC_DEFINE(IPV6_SPECIAL_LOCALHOST, 1, [Convert IPv4-localhost requests to IPv6. Default: keep seperate.]) AC_MSG_RESULT(yes)],
    [AC_DEFINE(IPV6_SPECIAL_LOCALHOST, 0, [Convert IPv4-localhost requests to IPv6. Default: Keep seperate.]) AC_MSG_RESULT(no)]
  )
  
 -# end IPv6-only options
 +else
 +  # NP: semi-silent failure as IPv4-only mode is perfectly usable on this system.
 +  echo "WARNING: IPv6 is not available on this system."
 +  AC_DEFINE(USE_IPV6,0,[Enable support for IPv6])
 +  AC_DEFINE(IPV6_SPECIAL_SPLITSTACK,0,[Enable support for IPv6 on split-stack implementations])
 +  AC_DEFINE(IPV6_SPECIAL_LOCALHOST,0,[Convert IPv4-localhost requests to IPv6. Default: Keep seperate.])
 +  AC_DEFINE(IPV6_SPECIAL_V4MAPPED,0,[Enable v4-mapping through v6 sockets])
  fi
  
  AC_ARG_ENABLE(zph-qos,
    fi
  ])
  
 -dnl Optional CNAME-Recursion by Internal DNS engine
 -AC_MSG_CHECKING([whether DNS CNAME recursion wanted])
 -AC_ARG_WITH(dns-cname,
 -  [  --with-dns-cname         Enable CNAME-Recursion in Internal DNS stub.],
 -  [AC_DEFINE(DNS_CNAME, 1, [ 1 == Enable expermental CNAME recursion inside Squid DNS resolver stub]) AC_MSG_RESULT(yes)],
 -  [AC_DEFINE(DNS_CNAME, 0, [ 0 == Disable expermental CNAME recursion inside Squid DNS resolver stub]) AC_MSG_RESULT(no)]
 -)
 -
  dnl Check whether this OS defines ss_len as a member of sockaddr_storage
  AC_CACHE_CHECK([for ss_len field in struct sockaddr_storage],
                ac_cv_have_ss_len_in_struct_ss, [
@@@ -3299,7 -3284,7 +3305,7 @@@ AC_DEFINE_UNQUOTED(SQUID_MAXFD, $SQUID_
  if test "$SQUID_MAXFD" -lt 512 ; then
      echo "WARNING: $SQUID_MAXFD may not be enough filedescriptors if your"
      echo "         cache will be very busy.  Please see the FAQ page"
 -    echo "         http://www.squid-cache.org/FAQ/FAQ-11.html#filedescriptors"
 +    echo "         http://wiki.squid-cache.org/SquidFaq/TroubleShooting"
      echo "         on how to increase your filedescriptor limit"
      sleep 10
  fi
@@@ -3682,22 -3667,19 +3688,22 @@@ AC_SUBST(PO2HTML
  
  dnl Squid now has limited locale handling ...
  dnl on error pages
 +use_errlocale=yes
  AC_ARG_ENABLE(auto-locale,
 -[  --enable-auto-locale  This enables squid to lookup translated error pages
 -                          based on the clients request headers. Without it squid
 -                          is limited to a single language set in squid.conf],
 -[ if test "$enableval" = "yes" ; then
 +      AC_HELP_STRING([--disable-auto-locale],
 +                      [This prevets Squid providing localized error pages based on the clients request headers.
 +                       When disabled Squid requires explicit language configuration.]),
 +[ if test "$enableval" = "no" ; then
 +    use_errlocale=no
 +  fi
 +])
 +if test "$use_errlocale" = "yes" ; then
      echo "Enabling Multi-Language Support"
      AC_DEFINE(USE_ERR_LOCALES,1,[Use multi-language support on error pages])
 - else
 +else
      echo "Disabling Multi-Language Support"
      AC_DEFINE(USE_ERR_LOCALES,0,[Use multi-language support on error pages])
 -  fi
 -])
 -
 +fi
  
  dnl Need the debugging version of malloc if available
  XTRA_OBJS=''
@@@ -3709,6 -3691,7 +3715,6 @@@ if test "$ac_cv_lib_malloc_main" = "yes
                XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/mallocmap.o"
        fi
  fi
 -
  AC_SUBST(XTRA_OBJS)
  
  if test -z "$XTRA_LIBS"; then
@@@ -3734,7 -3717,6 +3740,7 @@@ AC_CONFIG_FILES([
        src/auth/Makefile \
        src/adaptation/Makefile \
        src/ICAP/Makefile \
 +      src/icmp/Makefile \
        src/eCAP/Makefile \
        contrib/Makefile \
        snmplib/Makefile \
        helpers/ntlm_auth/mswin_sspi/Makefile \
        helpers/negotiate_auth/Makefile \
        helpers/negotiate_auth/mswin_sspi/Makefile \
 -      helpers/negotiate_auth/squid_kerb_auth/Makefile \
        helpers/external_acl/Makefile \
        helpers/external_acl/ip_user/Makefile \
        helpers/external_acl/ldap_group/Makefile \
@@@ -3785,4 -3768,5 +3791,4 @@@ AC_CONFIG_SUBDIRS(lib/libTrie
  # must configure libltdl subdir unconditionally for "make distcheck" to work
  AC_CONFIG_SUBDIRS(lib/libLtdl)
  
 -
  AC_OUTPUT
diff --combined src/tests/testAuth.cc
index 9cfd4fbd2a55f9eea067f238e9a0df563a0e93d8,b2a9623c928b1bd707be0bc3c50c24321454a8db..40b20155a645ffcd9cb45b5d01e39d6ab773fad6
@@@ -1,7 -1,7 +1,7 @@@
  #define SQUID_UNIT_TEST 1
  
 -#include "testAuth.h"
  #include "squid.h"
 +#include "testAuth.h"
  #include "authenticate.h"
  #include "AuthUserRequest.h"
  #include "AuthScheme.h"
  CPPUNIT_TEST_SUITE_REGISTRATION( testAuth );
  CPPUNIT_TEST_SUITE_REGISTRATION( testAuthConfig );
  CPPUNIT_TEST_SUITE_REGISTRATION( testAuthUserRequest );
+ #ifdef HAVE_AUTH_MODULE_BASIC
  CPPUNIT_TEST_SUITE_REGISTRATION( testAuthBasicUserRequest );
+ #endif
+ #ifdef HAVE_AUTH_MODULE_DIGEST
  CPPUNIT_TEST_SUITE_REGISTRATION( testAuthDigestUserRequest );
+ #endif
+ #ifdef HAVE_AUTH_MODULE_NTLM
  CPPUNIT_TEST_SUITE_REGISTRATION( testAuthNTLMUserRequest );
+ #endif
+ #ifdef HAVE_AUTH_MODULE_NEGOTIATE
  CPPUNIT_TEST_SUITE_REGISTRATION( testAuthNegotiateUserRequest );
+ #endif
  
  /* Instantiate all auth framework types */
  void
@@@ -34,10 -42,10 +42,10 @@@ find_proxy_auth(char const *type
  {
      char const * proxy_auths[][2]= { {"basic","Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="},
  
 -                                     {"digest", "Digest username=\"robertdig\", realm=\"Squid proxy-caching web server\", nonce=\"yy8rQXjEWwixXVBj\", uri=\"/images/bg8.gif\", response=\"f75a7d3edd48d93c681c75dc4fb58700\", qop=auth, nc=00000012, cnonce=\"e2216641961e228e\" "},
 -                                     {"ntlm", "NTLM "},
 -                                     {"negotiate", "Negotiate "}
 -                                   };
 +        {"digest", "Digest username=\"robertdig\", realm=\"Squid proxy-caching web server\", nonce=\"yy8rQXjEWwixXVBj\", uri=\"/images/bg8.gif\", response=\"f75a7d3edd48d93c681c75dc4fb58700\", qop=auth, nc=00000012, cnonce=\"e2216641961e228e\" "},
 +        {"ntlm", "NTLM "},
 +        {"negotiate", "Negotiate "}
 +    };
  
      for (unsigned count = 0; count < 4 ; count++) {
          if (strcasecmp(type, proxy_auths[count][0]) == 0)
@@@ -60,7 -68,8 +68,8 @@@ getConfig(char const *type_str
          AuthScheme *theScheme;
  
          if ((theScheme = AuthScheme::Find(type_str)) == NULL) {
-             fatalf("Unknown authentication scheme '%s'.\n", type_str);
+             return NULL;
+             //fatalf("Unknown authentication scheme '%s'.\n", type_str);
          }
  
          config.push_back(theScheme->createConfig());
@@@ -116,13 -125,21 +125,21 @@@ fake_auth_setup(
      }
  
      params[]={ {"digest", digest_parms, 2},
 -               {"basic", basic_parms, 2},
 -               {"ntlm", ntlm_parms, 1},
 -               {"negotiate", negotiate_parms, 1}
 -             };
 +        {"basic", basic_parms, 2},
 +        {"ntlm", ntlm_parms, 1},
 +        {"negotiate", negotiate_parms, 1}
 +    };
  
-     for (unsigned scheme=0; scheme < 4; scheme++)
-         setup_scheme(getConfig(params[scheme].name), params[scheme].params, params[scheme].paramlength);
+     for (unsigned scheme=0; scheme < 4; scheme++) {
+         AuthConfig *schemeConfig;
+         schemeConfig = getConfig(params[scheme].name);
+         if (schemeConfig != NULL)
+             setup_scheme (schemeConfig, params[scheme].params, 
+                 params[scheme].paramlength);
+               else
+             fprintf(stderr,"Skipping unknown authentication scheme '%s'.\n", 
+                 params[scheme].name);
+     }
  
      authenticateInit(&config);
  
@@@ -163,6 -180,7 +180,7 @@@ testAuthUserRequest::scheme(
      }
  }
  
+ #ifdef HAVE_AUTH_MODULE_BASIC
  #include "auth/basic/auth_basic.h"
  /* AuthBasicUserRequest::AuthBasicUserRequest works
   */
@@@ -186,7 -204,9 +204,9 @@@ testAuthBasicUserRequest::username(
      CPPUNIT_ASSERT_EQUAL(0, strcmp("John", temp->username()));
      delete temp;
  }
+ #endif /* HAVE_AUTH_MODULE_BASIC */
  
+ #ifdef HAVE_AUTH_MODULE_DIGEST
  #include "auth/digest/auth_digest.h"
  /* AuthDigestUserRequest::AuthDigestUserRequest works
   */
@@@ -210,7 -230,9 +230,9 @@@ testAuthDigestUserRequest::username(
      CPPUNIT_ASSERT_EQUAL(0, strcmp("John", temp->username()));
      delete temp;
  }
+ #endif /* HAVE_AUTH_MODULE_DIGEST */
  
+ #ifdef HAVE_AUTH_MODULE_NTLM
  #include "auth/ntlm/auth_ntlm.h"
  /* AuthNTLMUserRequest::AuthNTLMUserRequest works
   */
@@@ -234,7 -256,9 +256,9 @@@ testAuthNTLMUserRequest::username(
      CPPUNIT_ASSERT_EQUAL(0, strcmp("John", temp->username()));
      delete temp;
  }
+ #endif /* HAVE_AUTH_MODULE_NTLM */
  
+ #ifdef HAVE_AUTH_MODULE_NEGOTIATE
  #include "auth/negotiate/auth_negotiate.h"
  /* AuthNegotiateUserRequest::AuthNegotiateUserRequest works
   */
@@@ -258,3 -282,5 +282,5 @@@ testAuthNegotiateUserRequest::username(
      CPPUNIT_ASSERT_EQUAL(0, strcmp("John", temp->username()));
      delete temp;
  }
+ #endif /* HAVE_AUTH_MODULE_NEGOTIATE */
diff --combined src/tests/testAuth.h
index c59b09fde2115adb2092fbb18764f9c499dbbac9,7fa7ce5c88129f60f6829d42daa9a68f7d007c88..b1704aa0cab801730ee0089c8e2a906b4c8c79ab
@@@ -2,8 -2,9 +2,10 @@@
  #ifndef SQUID_SRC_TEST_AUTH_H
  #define SQUID_SRC_TEST_AUTH_H
  
 -#include <cppunit/extensions/HelperMacros.h>
+ #include "config.h"
 +#include <cppunit/extensions/HelperMacros.h>
 +
  /*
   * test the auth Config framework
   */
@@@ -45,6 -46,7 +47,7 @@@ protected
      void construction();
  };
  
+ #ifdef HAVE_AUTH_MODULE_BASIC
  class testAuthBasicUserRequest : public CPPUNIT_NS::TestFixture
  {
      CPPUNIT_TEST_SUITE( testAuthBasicUserRequest );
@@@ -58,7 -60,9 +61,9 @@@ protected
      void construction();
      void username();
  };
+ #endif
  
+ #ifdef HAVE_AUTH_MODULE_DIGEST
  class testAuthDigestUserRequest : public CPPUNIT_NS::TestFixture
  {
      CPPUNIT_TEST_SUITE( testAuthDigestUserRequest );
@@@ -72,7 -76,9 +77,9 @@@ protected
      void construction();
      void username();
  };
+ #endif
  
+ #ifdef HAVE_AUTH_MODULE_NTLM
  class testAuthNTLMUserRequest : public CPPUNIT_NS::TestFixture
  {
      CPPUNIT_TEST_SUITE( testAuthNTLMUserRequest );
@@@ -86,7 -92,9 +93,9 @@@ protected
      void construction();
      void username();
  };
+ #endif
  
+ #ifdef HAVE_AUTH_MODULE_NEGOTIATE
  class testAuthNegotiateUserRequest : public CPPUNIT_NS::TestFixture
  {
      CPPUNIT_TEST_SUITE( testAuthNegotiateUserRequest );
@@@ -100,6 -108,7 +109,7 @@@ protected
      void construction();
      void username();
  };
+ #endif
  
  #endif