]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/Makefile.am
Merged from trunk (r13356).
[thirdparty/squid.git] / src / Makefile.am
index 52abf5faa3d8c8b613f925cd87e1cd6a22e14e11..ae6743edb2c08be7c6d87eb2ba017a3aaae27547 100644 (file)
@@ -8,23 +8,37 @@ include $(top_srcdir)/src/Common.am
 
 AUTOMAKE_OPTIONS = subdir-objects
 
-if ENABLE_DNSHELPER
-DNSSOURCE = dns.cc
-DNSHELPER = dnsserver
-else
-DNSSOURCE = dns_internal.cc
-DNSHELPER =
-endif
-
-DNSSOURCE += \
+DNSSOURCE = \
+       dns_internal.cc \
        SquidDns.h \
        DnsLookupDetails.h \
        DnsLookupDetails.cc
 
 SBUF_SOURCE= \
+       base/CharacterSet.h \
        base/InstanceId.h \
        MemBlob.h \
-       MemBlob.cc
+       MemBlob.cc \
+       OutOfBoundsException.h \
+       SBuf.h \
+       SBuf.cc \
+       SBufExceptions.h \
+       SBufExceptions.cc
+
+STOREMETA_SOURCE = \
+       StoreMeta.cc \
+       StoreMeta.h \
+       StoreMetaMD5.cc \
+       StoreMetaMD5.h \
+       StoreMetaSTD.cc \
+       StoreMetaSTD.h \
+       StoreMetaSTDLFS.cc \
+       StoreMetaSTDLFS.h \
+       StoreMetaObjSize.h \
+       StoreMetaURL.cc \
+       StoreMetaURL.h \
+       StoreMetaVary.cc \
+       StoreMetaVary.h
 
 LOADABLE_MODULES_SOURCES = \
        LoadableModule.h \
@@ -159,7 +173,7 @@ WIN32_SOURCE =
 WINSVC_SOURCE =
 endif
 
-if USE_IPC_WIN32
+if ENABLE_WIN32_IPC
 IPC_SOURCE = SquidIpc.h ipc_win32.cc
 else
 IPC_SOURCE = SquidIpc.h ipc.cc
@@ -168,13 +182,13 @@ endif
 AIO_WIN32_ALL_SOURCES = \
        DiskIO/AIO/aio_win32.cc \
        DiskIO/AIO/aio_win32.h
-if USE_AIO_WIN32
+if ENABLE_WIN32_AIO
 AIO_WIN32_SOURCES = $(AIO_WIN32_ALL_SOURCES)
 else
 AIO_WIN32_SOURCES =
 endif
 
-if USE_AIOPS_WIN32
+if ENABLE_WIN32_AIOPS
 AIOPS_SOURCE = DiskIO/DiskThreads/aiops_win32.cc \
        DiskIO/DiskThreads/CommIO.cc \
        DiskIO/DiskThreads/CommIO.h
@@ -192,10 +206,8 @@ noinst_LTLIBRARIES = libsquid.la
 EXTRA_PROGRAMS = \
        DiskIO/DiskDaemon/diskd \
        unlinkd \
-       dnsserver \
        recv-announce \
        tests/testUfs \
-       tests/testCoss \
        tests/testRock \
        ufsdump
 
@@ -212,7 +224,6 @@ bin_PROGRAMS =
 
 
 libexec_PROGRAMS = \
-       $(DNSHELPER) \
        $(DISK_PROGRAMS) \
        $(UNLINKD)
 
@@ -302,6 +313,8 @@ squid_SOURCES = \
        ClientRequestContext.h \
        clientStream.cc \
        clientStream.h \
+       CollapsedForwarding.cc \
+       CollapsedForwarding.h \
        CompletionDispatcher.cc \
        CompletionDispatcher.h \
        CommRead.h \
@@ -353,10 +366,10 @@ squid_SOURCES = \
        fqdncache.cc \
        ftp.h \
        ftp.cc \
-       FtpServer.h \
-       FtpServer.cc \
        FtpGatewayServer.h \
        FtpGatewayServer.cc \
+       FtpServer.h \
+       FtpServer.cc \
        FwdState.cc \
        FwdState.h \
        Generic.h \
@@ -436,6 +449,7 @@ squid_SOURCES = \
        MemBuf.cc \
        MemObject.cc \
        MemObject.h \
+       MessageSizes.h \
        mime.h \
        mime.cc \
        mime_header.h \
@@ -444,8 +458,8 @@ squid_SOURCES = \
        multicast.cc \
        neighbors.h \
        neighbors.cc \
-       Notes.cc \
        Notes.h \
+       Notes.cc \
        Packer.cc \
        Packer.h \
        Parsing.cc \
@@ -474,6 +488,10 @@ squid_SOURCES = \
        send-announce.h \
        send-announce.cc \
        $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       SBufDetailedStats.cc \
+       SBufStatsAction.h \
+       SBufStatsAction.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
@@ -515,21 +533,9 @@ squid_SOURCES = \
        store_swapin.cc \
        store_swapmeta.cc \
        store_swapout.cc \
-       StoreMeta.cc \
-       StoreMeta.h \
-       StoreMetaMD5.cc \
-       StoreMetaMD5.h \
-       StoreMetaSTD.cc \
-       StoreMetaSTD.h \
-       StoreMetaSTDLFS.cc \
-       StoreMetaSTDLFS.h \
-       StoreMetaObjSize.h \
        StoreMetaUnpacker.cc \
        StoreMetaUnpacker.h \
-       StoreMetaURL.cc \
-       StoreMetaURL.h \
-       StoreMetaVary.cc \
-       StoreMetaVary.h \
+       $(STOREMETA_SOURCE) \
        StoreSearch.h \
        StoreStats.cc \
        StoreStats.h \
@@ -540,6 +546,8 @@ squid_SOURCES = \
        swap_log_op.h \
        SwapDir.cc \
        SwapDir.h \
+       Transients.cc \
+       Transients.h \
        MemStore.cc \
        MemStore.h \
        time.cc \
@@ -551,8 +559,6 @@ squid_SOURCES = \
        $(UNLINKDSOURCE) \
        url.cc \
        URL.h \
-       URLScheme.cc \
-       URLScheme.h \
        urn.h \
        urn.cc \
        wccp.h \
@@ -571,11 +577,6 @@ EXTRA_squid_SOURCES = \
        $(all_AUTHMODULES) \
        ConfigOption.h \
        $(DELAY_POOL_ALL_SOURCE) \
-       dns.cc \
-       dnsserver.cc \
-       dns_internal.cc \
-       DnsLookupDetails.cc \
-       DnsLookupDetails.h \
        htcp.cc \
        htcp.h \
        ipc.cc \
@@ -592,7 +593,6 @@ noinst_HEADERS = \
        client_side_request.cci \
        MemBuf.cci \
        MemBuf.h \
-       Store.cci \
        StoreEntryStream.h \
        String.cci \
        SquidString.h \
@@ -629,6 +629,7 @@ squid_LDADD = \
        libsquid.la \
        ip/libip.la \
        fs/libfs.la \
+       $(SSL_LIBS) \
        ipc/libipc.la \
        mgr/libmgr.la \
        anyp/libanyp.la \
@@ -642,11 +643,11 @@ squid_LDADD = \
        $(DISK_LINKOBJS) \
        $(REPL_OBJS) \
        $(DISK_OS_LIBS) \
+       $(NETTLELIB) \
        $(CRYPTLIB) \
        $(REGEXLIB) \
        $(ADAPTATION_LIBS) \
        $(ESI_LIBS) \
-       $(SSL_LIBS) \
        $(SNMP_LIBS) \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
@@ -679,7 +680,7 @@ squid_DEPENDENCIES = \
        ipc/libipc.la \
        mgr/libmgr.la
 
-if USE_LOADABLE_MODULES
+if ENABLE_LOADABLE_MODULES
 squid_SOURCES += $(LOADABLE_MODULES_SOURCES)
 squid_LDADD += -L$(top_builddir) $(LIBLTDL)
 squid_LDFLAGS = -export-dynamic -dlopen force
@@ -699,12 +700,6 @@ unlinkd_LDADD = \
        $(COMPAT_LIB) \
        $(XTRA_LIBS)
 
-## dnsserver is a standalone helper. Do not link to any internal libraries
-dnsserver_SOURCES = dnsserver.cc
-dnsserver_LDADD = \
-       $(COMPAT_LIB) \
-       $(XTRA_LIBS)
-
 recv_announce_SOURCES = recv-announce.cc
 
 ## What requires what..
@@ -741,16 +736,11 @@ ufsdump_SOURCES = \
        Parsing.h \
        store_key_md5.h \
        store_key_md5.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        String.cc \
        SquidNew.cc \
-       time.cc \
+       tests/stub_time.cc \
        ufsdump.cc \
        dlink.h \
        dlink.cc \
@@ -762,12 +752,10 @@ ufsdump_SOURCES = \
        fd.h \
        tests/stub_fd.cc
 ufsdump_LDADD = \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        eui/libeui.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
@@ -777,6 +765,7 @@ ufsdump_LDADD = \
        mgr/libmgr.la \
        $(XTRA_OBJS) \
        $(REPL_OBJS) \
+       $(NETTLELIB) \
        $(CRYPTLIB) \
        $(REGEXLIB) \
        $(SSLLIB) \
@@ -785,12 +774,10 @@ ufsdump_LDADD = \
        $(MINGW_LIBS) \
        $(XTRA_LIBS)
 ufsdump_DEPENDENCIES = \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        eui/libeui.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
@@ -926,7 +913,6 @@ DEFAULT_PREFIX              = $(prefix)
 DEFAULT_CONFIG_DIR     = $(sysconfdir)
 DEFAULT_CONFIG_FILE    = $(DEFAULT_CONFIG_DIR)/squid.conf
 DEFAULT_MIME_TABLE     = $(DEFAULT_CONFIG_DIR)/mime.conf
-DEFAULT_DNSSERVER      = $(libexecdir)/`echo dnsserver | sed '$(transform);s/$$/$(EXEEXT)/'`
 DEFAULT_SSL_CRTD       = $(libexecdir)/`echo ssl_crtd  | sed '$(transform);s/$$/$(EXEEXT)/'`
 DEFAULT_LOG_PREFIX     = $(DEFAULT_LOG_DIR)
 DEFAULT_CACHE_LOG      = $(DEFAULT_LOG_PREFIX)/cache.log
@@ -944,7 +930,7 @@ DEFAULT_ERROR_DIR   = $(datadir)/errors
 # Make location configure settings available to the code
 DEFS += -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" -DDEFAULT_SQUID_DATA_DIR=\"$(datadir)\" -DDEFAULT_SQUID_CONFIG_DIR=\"$(sysconfdir)\"
 
-snmp_core.o snmp_agent.o: ../snmplib/libsnmplib.a $(top_srcdir)/include/cache_snmp.h
+snmp_core.o snmp_agent.o: ../lib/snmplib/libsnmplib.la $(top_srcdir)/include/cache_snmp.h
 
 globals.cc: globals.h mk-globals-c.awk
        $(AWK) -f $(srcdir)/mk-globals-c.awk < $(srcdir)/globals.h > $@ || ($(RM) -f $@ && exit 1)
@@ -1008,7 +994,6 @@ cf.data: cf.data.pre Makefile
        -e "s%[@]DEFAULT_ICP_PORT[@]%$(DEFAULT_ICP_PORT)%g" \
        -e "s%[@]DEFAULT_CACHE_EFFECTIVE_USER[@]%$(CACHE_EFFECTIVE_USER)%g" \
        -e "s%[@]DEFAULT_MIME_TABLE[@]%$(DEFAULT_MIME_TABLE)%g" \
-       -e "s%[@]DEFAULT_DNSSERVER[@]%$(DEFAULT_DNSSERVER)%g" \
        -e "s%[@]DEFAULT_SSL_CRTD[@]%$(DEFAULT_SSL_CRTD)%g" \
        -e "s%[@]DEFAULT_UNLINKD[@]%$(DEFAULT_UNLINKD)%g" \
        -e "s%[@]DEFAULT_PINGER[@]%$(DEFAULT_PINGER)%g" \
@@ -1095,10 +1080,17 @@ check_PROGRAMS+=\
        tests/testStore \
        tests/testString \
        tests/testURL \
+       tests/testSBuf \
+       tests/testSBufList \
        tests/testConfigParser \
-       tests/testStatHist \
-       tests/testVector \
-       $(STORE_TESTS)
+       tests/testStatHist
+
+if HAVE_FS_ROCK
+check_PROGRAMS += tests/testRock
+endif
+if HAVE_FS_UFS
+check_PROGRAMS += tests/testUfs
+endif
 
 ## NP: required to run the above list. check_PROGRAMS only builds the binaries...
 TESTS += $(check_PROGRAMS)
@@ -1131,7 +1123,7 @@ tests_testHttpReply_SOURCES=\
        cbdata.cc \
        cbdata.h \
        ConfigParser.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        fatal.h \
        tests/stub_fatal.cc \
        HttpBody.h \
@@ -1159,17 +1151,22 @@ tests_testHttpReply_SOURCES=\
        HttpReply.cc \
        HttpReply.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        RegexList.h \
        RegexList.cc \
        MemBuf.cc \
        MemBuf.h \
        mime_header.h \
        mime_header.cc \
+       Notes.h \
+       Notes.cc \
        Packer.cc \
        Packer.h \
        SquidString.h \
        SquidTime.h \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        String.cc \
        StrList.h \
        StrList.cc \
@@ -1183,6 +1180,7 @@ tests_testHttpReply_SOURCES=\
        tests/stub_errorpage.cc \
        tests/stub_HelperChildConfig.cc \
        tests/stub_libformat.cc \
+       tests/stub_libauth.cc \
        StatCounters.h \
        StatCounters.cc \
        StatHist.h \
@@ -1196,9 +1194,8 @@ tests_testHttpReply_SOURCES=\
        tests/testHttpReply.cc \
        tests/testHttpReply.h \
        tests/testMain.cc \
-       time.cc \
+       tests/stub_time.cc \
        url.cc \
-       URLScheme.cc \
        wordlist.h \
        wordlist.cc
 nodist_tests_testHttpReply_SOURCES=\
@@ -1209,7 +1206,6 @@ tests_testHttpReply_LDADD=\
        acl/libacls.la \
        acl/libapi.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        anyp/libanyp.la \
        ip/libip.la \
        base/libbase.la \
@@ -1219,6 +1215,7 @@ tests_testHttpReply_LDADD=\
        $(top_builddir)/lib/libmiscutil.la \
        $(SQUID_CPPUNIT_LIBS) \
        $(SQUID_CPPUNIT_LA) \
+       $(NETTLELIB) \
        $(SSLLIB) \
        $(COMPAT_LIB) \
        $(XTRA_LIBS)
@@ -1227,11 +1224,12 @@ tests_testHttpReply_DEPENDENCIES= $(SQUID_CPPUNIT_LA)
 tests_testACLMaxUserIP_SOURCES= \
        cbdata.cc \
        ClientInfo.h \
+       tests/stub_CollapsedForwarding.cc \
        ConfigOption.cc \
        ConfigParser.cc \
        DiskIO/ReadRequest.cc \
        DiskIO/WriteRequest.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        event.cc \
        fatal.h \
        tests/stub_fatal.cc \
@@ -1259,6 +1257,8 @@ tests_testACLMaxUserIP_SOURCES= \
        int.cc \
        MasterXaction.cc \
        MasterXaction.h \
+       Notes.cc \
+       Notes.h \
        SquidList.h \
        SquidList.cc \
        mem_node.cc \
@@ -1272,23 +1272,22 @@ tests_testACLMaxUserIP_SOURCES= \
        StrList.cc \
        tests/stub_StatHist.cc \
        stmem.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        String.cc \
        store_dir.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        store_key_md5.h \
        store_key_md5.cc \
        swap_log_op.cc \
        swap_log_op.h \
-       SwapDir.cc \
+       tests/stub_SwapDir.cc \
        SwapDir.h \
+       Transients.cc \
        log/access_log.h \
        tests/stub_access_log.cc \
        cache_cf.h \
@@ -1304,6 +1303,7 @@ tests_testACLMaxUserIP_SOURCES= \
        tests/stub_HttpRequest.cc \
        tests/stub_HttpReply.cc \
        tests/stub_ipc_TypedMsgHdr.cc \
+       tests/stub_libauth.cc \
        tests/stub_libcomm.cc \
        tests/stub_libformat.cc \
        tests/stub_libsslsquid.cc \
@@ -1315,6 +1315,7 @@ tests_testACLMaxUserIP_SOURCES= \
        tests/stub_Port.cc \
        repl_modules.h \
        tests/stub_store.cc \
+       tests/stub_store_client.cc \
        store_rebuild.h \
        tests/stub_store_rebuild.cc \
        tests/stub_store_stats.cc \
@@ -1326,13 +1327,11 @@ tests_testACLMaxUserIP_SOURCES= \
        tests/testACLMaxUserIP.cc \
        tests/testACLMaxUserIP.h \
        tests/testMain.cc \
-       time.cc \
+       tests/stub_time.cc \
        url.cc \
        URL.h \
-       URLScheme.cc \
-       URLScheme.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        MemBuf.cc \
        wordlist.h \
        wordlist.cc
@@ -1345,7 +1344,6 @@ tests_testACLMaxUserIP_LDADD= \
        acl/libacls.la \
        eui/libeui.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        anyp/libanyp.la \
        base/libbase.la \
@@ -1357,6 +1355,7 @@ tests_testACLMaxUserIP_LDADD= \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
        $(DISK_OS_LIBS) \
+       $(NETTLELIB) \
        $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SSLLIB) \
@@ -1372,7 +1371,7 @@ tests_testBoilerplate_SOURCES = \
        tests/testBoilerplate.cc \
        tests/testMain.cc \
        tests/testBoilerplate.h \
-       time.cc
+       tests/stub_time.cc
 nodist_tests_testBoilerplate_SOURCES = \
        $(TESTSOURCES)
 tests_testBoilerplate_LDADD= \
@@ -1387,7 +1386,6 @@ tests_testBoilerplate_DEPENDENCIES = \
 ## Tests of the CacheManager module.
 tests_testCacheManager_SOURCES = \
        AccessLogEntry.cc \
-       $(ACL_REGISTRATION_SOURCES) \
        debug.cc \
        HttpParser.cc \
        HttpParser.h \
@@ -1396,7 +1394,7 @@ tests_testCacheManager_SOURCES = \
        HttpRequest.cc \
        HttpRequestMethod.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        String.cc \
        tests/testCacheManager.cc \
        tests/testCacheManager.h \
@@ -1404,6 +1402,7 @@ tests_testCacheManager_SOURCES = \
        tests/stub_main_cc.cc \
        tests/stub_ipc_Forwarder.cc \
        tests/stub_store_stats.cc \
+       tests/stub_EventLoop.cc \
        time.cc \
        BodyPipe.cc \
        cache_manager.cc \
@@ -1414,9 +1413,9 @@ tests_testCacheManager_SOURCES = \
        RefreshPattern.h \
        cache_cf.cc \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        carp.h \
-       carp.cc \
+       tests/stub_carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
        client_db.h \
@@ -1427,6 +1426,7 @@ tests_testCacheManager_SOURCES = \
        client_side_request.cc \
        ClientInfo.h \
        clientStream.cc \
+       tests/stub_CollapsedForwarding.cc \
        ConfigOption.cc \
        ConfigParser.cc \
        CpuAffinityMap.cc \
@@ -1441,7 +1441,7 @@ tests_testCacheManager_SOURCES = \
        dlink.cc \
        $(DNSSOURCE) \
        errorpage.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        event.cc \
        external_acl.cc \
        ExternalACLEntry.cc \
@@ -1456,6 +1456,10 @@ tests_testCacheManager_SOURCES = \
        fqdncache.cc \
        ftp.h \
        ftp.cc \
+       FtpGatewayServer.h \
+       FtpGatewayServer.cc \
+       FtpServer.h \
+       FtpServer.cc \
        FwdState.cc \
        FwdState.h \
        gopher.h \
@@ -1501,7 +1505,6 @@ tests_testCacheManager_SOURCES = \
        multicast.h \
        multicast.cc \
        mem_node.cc \
-       MemBlob.cc \
        MemBuf.cc \
        MemObject.cc \
        mime.h \
@@ -1524,11 +1527,14 @@ tests_testCacheManager_SOURCES = \
        peer_userhash.h \
        peer_userhash.cc \
        redirect.h \
-       redirect.cc \
+       tests/stub_redirect.cc \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
@@ -1540,13 +1546,15 @@ tests_testCacheManager_SOURCES = \
        StatHist.h \
        StrList.h \
        StrList.cc \
+       tests/stub_libauth_acls.cc \
+       tests/stub_libauth.cc \
        tests/stub_StatHist.cc \
        stmem.cc \
        repl_modules.h \
        store.cc \
        store_client.cc \
        store_digest.h \
-       store_digest.cc \
+       tests/stub_store_digest.cc \
        store_dir.cc \
        store_io.cc \
        store_key_md5.h \
@@ -1561,28 +1569,23 @@ tests_testCacheManager_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
-       SwapDir.cc \
+       Transients.cc \
+       tests/stub_tunnel.cc \
+       tests/stub_SwapDir.cc \
        MemStore.cc \
        $(UNLINKDSOURCE) \
        url.cc \
-       URLScheme.cc \
        urn.h \
        urn.cc \
        wccp2.h \
-       wccp2.cc \
+       tests/stub_wccp2.cc \
        whois.h \
-       whois.cc \
+       tests/stub_whois.cc \
        FadingCounter.cc \
        $(WIN32_SOURCE) \
        wordlist.h \
@@ -1593,11 +1596,9 @@ nodist_tests_testCacheManager_SOURCES = \
 # comm.cc only requires comm/libcomm.la until fdc_table is dead.
 tests_testCacheManager_LDADD = \
        http/libsquid-http.la \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
@@ -1621,6 +1622,7 @@ tests_testCacheManager_LDADD = \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
+       $(NETTLELIB) \
        $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SQUID_CPPUNIT_LA) \
@@ -1635,17 +1637,18 @@ tests_testCacheManager_DEPENDENCIES = \
 
 tests_testDiskIO_SOURCES = \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        cbdata.cc \
        client_db.h \
        ClientInfo.h \
+       tests/stub_CollapsedForwarding.cc \
        ConfigOption.cc \
        ConfigParser.cc \
        $(DELAY_POOL_SOURCE) \
        $(DISKIO_SOURCE) \
        disk.h \
        disk.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        EventLoop.cc \
        event.cc \
        fatal.h \
@@ -1684,7 +1687,9 @@ tests_testDiskIO_SOURCES = \
        MemObject.cc \
        mem_node.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
+       Notes.h \
+       Notes.cc \
        Packer.cc \
        Parsing.cc \
        refresh.h \
@@ -1697,15 +1702,13 @@ tests_testDiskIO_SOURCES = \
        StatHist.h \
        tests/stub_StatHist.cc \
        stmem.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        store_dir.cc \
        store_io.cc \
@@ -1718,7 +1721,8 @@ tests_testDiskIO_SOURCES = \
        String.cc \
        StrList.h \
        StrList.cc \
-       SwapDir.cc \
+       tests/stub_SwapDir.cc \
+       Transients.cc \
        log/access_log.h \
        tests/stub_access_log.cc \
        tests/stub_acl.cc \
@@ -1740,6 +1744,8 @@ tests_testDiskIO_SOURCES = \
        tests/stub_internal.cc \
        tests/stub_ipc.cc \
        tests/stub_ipcache.cc \
+       tests/stub_libauth_acls.cc \
+       tests/stub_libauth.cc \
        tests/stub_libeui.cc \
        tests/stub_libformat.cc \
        tests/stub_libicmp.cc \
@@ -1748,6 +1754,7 @@ tests_testDiskIO_SOURCES = \
        tests/stub_mime.cc \
        tests/stub_pconn.cc \
        tests/stub_Port.cc \
+       tests/stub_stat.cc \
        tests/stub_store_client.cc \
        tests/stub_store_stats.cc \
        store_rebuild.h \
@@ -1758,10 +1765,9 @@ tests_testDiskIO_SOURCES = \
        tests/testMain.cc \
        tests/testStoreSupport.cc \
        tests/testStoreSupport.h \
-       time.cc \
+       tests/stub_time.cc \
        $(UNLINKDSOURCE) \
        url.cc \
-       URLScheme.cc \
        $(WIN32_SOURCE) \
        wordlist.h \
        wordlist.cc \
@@ -1778,11 +1784,9 @@ tests_testDiskIO_LDADD = \
        SquidConfig.o \
        CommCalls.o \
        DnsLookupDetails.o \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        libsquid.la \
        comm/libcomm.la \
        anyp/libanyp.la \
@@ -1794,12 +1798,13 @@ tests_testDiskIO_LDADD = \
        $(DISK_OS_LIBS) \
        acl/libapi.la \
        mgr/libmgr.la \
+       $(SSL_LIBS) \
        ipc/libipc.la \
        base/libbase.la \
-       $(SSL_LIBS) \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
+       $(NETTLELIB) \
        $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SSLLIB) \
@@ -1815,10 +1820,9 @@ tests_testDiskIO_DEPENDENCIES = \
 ## Tests of the Even module.
 tests_testEvent_SOURCES = \
        AccessLogEntry.cc \
-       $(ACL_REGISTRATION_SOURCES) \
        BodyPipe.cc \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        cache_cf.h \
        AuthReg.h \
        YesNoNone.h \
@@ -1827,7 +1831,7 @@ tests_testEvent_SOURCES = \
        cache_cf.cc \
        cache_manager.cc \
        carp.h \
-       carp.cc \
+       tests/stub_carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
        client_db.h \
@@ -1838,6 +1842,7 @@ tests_testEvent_SOURCES = \
        client_side_request.cc \
        ClientInfo.h \
        clientStream.cc \
+       tests/stub_CollapsedForwarding.cc \
        ConfigOption.cc \
        ConfigParser.cc \
        CpuAffinityMap.cc \
@@ -1853,7 +1858,7 @@ tests_testEvent_SOURCES = \
        dlink.cc \
        $(DNSSOURCE) \
        errorpage.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        event.cc \
        EventLoop.h \
        EventLoop.cc \
@@ -1871,6 +1876,10 @@ tests_testEvent_SOURCES = \
        fqdncache.cc \
        ftp.h \
        ftp.cc \
+       FtpGatewayServer.h \
+       FtpGatewayServer.cc \
+       FtpServer.h \
+       FtpServer.cc \
        FwdState.cc \
        FwdState.h \
        gopher.h \
@@ -1919,9 +1928,8 @@ tests_testEvent_SOURCES = \
        MasterXaction.cc \
        MasterXaction.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
-       MemBlob.cc \
        MemBuf.cc \
        MemObject.cc \
        mime.h \
@@ -1946,13 +1954,16 @@ tests_testEvent_SOURCES = \
        peer_userhash.h \
        peer_userhash.cc \
        redirect.h \
-       redirect.cc \
+       tests/stub_redirect.cc \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
        StrList.h \
        StrList.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        $(SNMP_SOURCE) \
        SquidMath.cc \
        SquidMath.h \
@@ -1968,7 +1979,7 @@ tests_testEvent_SOURCES = \
        store.cc \
        store_client.cc \
        store_digest.h \
-       store_digest.cc \
+       tests/stub_store_digest.cc \
        store_dir.cc \
        store_io.cc \
        store_key_md5.h \
@@ -1983,38 +1994,35 @@ tests_testEvent_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        String.cc \
-       SwapDir.cc \
+       tests/stub_SwapDir.cc \
        tests/CapturingStoreEntry.h \
        tests/testEvent.cc \
        tests/testEvent.h \
        tests/testMain.cc \
        tests/stub_main_cc.cc \
        tests/stub_ipc_Forwarder.cc \
+       tests/stub_libauth_acls.cc \
+       tests/stub_libauth.cc \
        tests/stub_libeui.cc \
        tests/stub_store_stats.cc \
        time.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
+       Transients.cc \
+       tests/stub_tunnel.cc \
        MemStore.cc \
        $(UNLINKDSOURCE) \
        url.cc \
-       URLScheme.cc \
        urn.h \
        urn.cc \
        wccp2.h \
-       wccp2.cc \
+       tests/stub_wccp2.cc \
        whois.h \
-       whois.cc \
+       tests/stub_whois.cc \
        $(WIN32_SOURCE) \
        wordlist.h \
        wordlist.cc
@@ -2023,11 +2031,9 @@ nodist_tests_testEvent_SOURCES = \
        $(DISKIO_GEN_SOURCE)
 tests_testEvent_LDADD = \
        http/libsquid-http.la \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
@@ -2050,6 +2056,7 @@ tests_testEvent_LDADD = \
        ipc/libipc.la \
        mgr/libmgr.la \
        $(SNMP_LIBS) \
+       $(NETTLELIB) \
        $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SQUID_CPPUNIT_LA) \
@@ -2065,10 +2072,9 @@ tests_testEvent_DEPENDENCIES = \
 ## Tests of the EventLoop module.
 tests_testEventLoop_SOURCES = \
        AccessLogEntry.cc \
-       $(ACL_REGISTRATION_SOURCES) \
        BodyPipe.cc \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        cache_manager.cc \
        cache_cf.h \
        AuthReg.h \
@@ -2077,7 +2083,7 @@ tests_testEventLoop_SOURCES = \
        RefreshPattern.h \
        cache_cf.cc \
        carp.h \
-       carp.cc \
+       tests/stub_carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
        client_db.h \
@@ -2088,6 +2094,7 @@ tests_testEventLoop_SOURCES = \
        client_side_request.cc \
        ClientInfo.h \
        clientStream.cc \
+       tests/stub_CollapsedForwarding.cc \
        ConfigOption.cc \
        ConfigParser.cc \
        CpuAffinityMap.cc \
@@ -2103,7 +2110,7 @@ tests_testEventLoop_SOURCES = \
        dlink.cc \
        $(DNSSOURCE) \
        errorpage.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        EventLoop.h \
        EventLoop.cc \
        event.cc \
@@ -2121,6 +2128,10 @@ tests_testEventLoop_SOURCES = \
        fqdncache.cc \
        ftp.h \
        ftp.cc \
+       FtpGatewayServer.h \
+       FtpGatewayServer.cc \
+       FtpServer.h \
+       FtpServer.cc \
        FwdState.cc \
        FwdState.h \
        gopher.h \
@@ -2168,11 +2179,10 @@ tests_testEventLoop_SOURCES = \
        SquidList.cc \
        MasterXaction.cc \
        MasterXaction.h \
-       MemBlob.cc \
        MemBuf.cc \
        MemObject.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
        mime.h \
        mime.cc \
@@ -2197,10 +2207,13 @@ tests_testEventLoop_SOURCES = \
        peer_userhash.cc \
        RemovalPolicy.cc \
        redirect.h \
-       redirect.cc \
+       tests/stub_redirect.cc \
        refresh.h \
        refresh.cc \
        Server.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
@@ -2217,7 +2230,7 @@ tests_testEventLoop_SOURCES = \
        store.cc \
        store_client.cc \
        store_digest.h \
-       store_digest.cc \
+       tests/stub_store_digest.cc \
        store_dir.cc \
        store_io.cc \
        store_key_md5.h \
@@ -2232,39 +2245,36 @@ tests_testEventLoop_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        String.cc \
        StrList.h \
        StrList.cc \
-       SwapDir.cc \
+       tests/stub_SwapDir.cc \
        tests/testEventLoop.cc \
        tests/testEventLoop.h \
        tests/testMain.cc \
        tests/stub_main_cc.cc \
        tests/stub_ipc_Forwarder.cc \
+       tests/stub_libauth_acls.cc \
+       tests/stub_libauth.cc \
        tests/stub_libeui.cc \
        tests/stub_store_stats.cc \
        time.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
+       Transients.cc \
+       tests/stub_tunnel.cc \
        MemStore.cc \
        $(UNLINKDSOURCE) \
        url.cc \
-       URLScheme.cc \
        urn.h \
        urn.cc \
        wccp2.h \
-       wccp2.cc \
+       tests/stub_wccp2.cc \
        whois.h \
-       whois.cc \
+       tests/stub_whois.cc \
        $(WIN32_SOURCE) \
        wordlist.h \
        wordlist.cc
@@ -2273,11 +2283,9 @@ nodist_tests_testEventLoop_SOURCES = \
        $(DISKIO_GEN_SOURCE)
 tests_testEventLoop_LDADD = \
        http/libsquid-http.la \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
@@ -2300,6 +2308,7 @@ tests_testEventLoop_LDADD = \
        ipc/libipc.la \
        mgr/libmgr.la \
        $(SNMP_LIBS) \
+       $(NETTLELIB) \
        $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SQUID_CPPUNIT_LA) \
@@ -2314,7 +2323,6 @@ tests_testEventLoop_DEPENDENCIES = \
 
 tests_test_http_range_SOURCES = \
        AccessLogEntry.cc \
-       $(ACL_REGISTRATION_SOURCES) \
        BodyPipe.cc \
        cache_cf.h \
        AuthReg.h \
@@ -2324,9 +2332,9 @@ tests_test_http_range_SOURCES = \
        cache_cf.cc \
        cache_manager.cc \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        carp.h \
-       carp.cc \
+       tests/stub_carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
        client_db.h \
@@ -2337,6 +2345,7 @@ tests_test_http_range_SOURCES = \
        client_side_request.cc \
        ClientInfo.h \
        clientStream.cc \
+       tests/stub_CollapsedForwarding.cc \
        ConfigOption.cc \
        ConfigParser.cc \
        CpuAffinityMap.cc \
@@ -2352,12 +2361,11 @@ tests_test_http_range_SOURCES = \
        dlink.cc \
        $(DNSSOURCE) \
        errorpage.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        event.cc \
-       external_acl.cc \
-       ExternalACLEntry.cc \
        FadingCounter.cc \
        fatal.h \
+       tests/stub_libauth.cc \
        tests/stub_fatal.cc \
        fd.h \
        fd.cc \
@@ -2368,6 +2376,10 @@ tests_test_http_range_SOURCES = \
        fqdncache.cc \
        ftp.h \
        ftp.cc \
+       FtpGatewayServer.h \
+       FtpGatewayServer.cc \
+       FtpServer.h \
+       FtpServer.cc \
        FwdState.cc \
        FwdState.h \
        gopher.h \
@@ -2415,11 +2427,10 @@ tests_test_http_range_SOURCES = \
        SquidList.cc \
        MasterXaction.cc \
        MasterXaction.h \
-       MemBlob.cc \
        MemBuf.cc \
        MemObject.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
        mime.h \
        mime.cc \
@@ -2443,11 +2454,14 @@ tests_test_http_range_SOURCES = \
        peer_userhash.cc \
        pconn.cc \
        redirect.h \
-       redirect.cc \
+       tests/stub_redirect.cc \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
@@ -2463,7 +2477,7 @@ tests_test_http_range_SOURCES = \
        store.cc \
        store_client.cc \
        store_digest.h \
-       store_digest.cc \
+       tests/stub_store_digest.cc \
        store_dir.cc \
        store_key_md5.h \
        store_key_md5.cc \
@@ -2478,37 +2492,34 @@ tests_test_http_range_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        String.cc \
        StrList.h \
        StrList.cc \
-       SwapDir.cc \
+       tests/stub_SwapDir.cc \
+       Transients.cc \
        tests/test_http_range.cc \
+       tests/stub_external_acl.cc \
        tests/stub_ipc_Forwarder.cc \
        tests/stub_libeui.cc \
        tests/stub_main_cc.cc \
        tests/stub_MemStore.cc \
        tests/stub_store_stats.cc \
+       tests/stub_EventLoop.cc \
        time.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
+       tests/stub_tunnel.cc \
        $(UNLINKDSOURCE) \
        url.cc \
-       URLScheme.cc \
        urn.h \
        urn.cc \
        wccp2.h \
-       wccp2.cc \
+       tests/stub_wccp2.cc \
        whois.h \
-       whois.cc \
+       tests/stub_whois.cc \
        $(WIN32_SOURCE) \
        wordlist.h \
        wordlist.cc
@@ -2517,11 +2528,9 @@ nodist_tests_test_http_range_SOURCES = \
        $(DISKIO_GEN_SOURCE)
 tests_test_http_range_LDADD = \
        http/libsquid-http.la \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        libsquid.la \
        ip/libip.la \
@@ -2544,6 +2553,7 @@ tests_test_http_range_LDADD = \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
+       $(NETTLELIB) \
        $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SQUID_CPPUNIT_LA) \
@@ -2561,22 +2571,30 @@ tests_testHttpParser_SOURCES = \
        HttpParser.h \
        MemBuf.cc \
        MemBuf.h \
+       tests/stub_MemObject.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        String.cc \
        cache_cf.h \
        YesNoNone.h \
+       $(SBUF_SOURCE) \
+       tests/stub_SBufDetailedStats.cc \
        tests/stub_cache_cf.cc \
        tests/stub_cache_manager.cc \
+       tests/stub_comm.cc \
+       tests/stub_cbdata.cc \
        tests/stub_debug.cc \
        tests/stub_event.cc \
        tests/stub_HelperChildConfig.cc \
+       tests/stub_stmem.cc \
+       tests/stub_store.cc \
+       tests/stub_store_stats.cc \
        tools.h \
        tests/stub_tools.cc \
        tests/testHttpParser.cc \
        tests/testHttpParser.h \
        tests/testMain.cc \
-       time.cc \
+       tests/stub_time.cc \
        wordlist.h \
        wordlist.cc
 nodist_tests_testHttpParser_SOURCES = \
@@ -2597,7 +2615,6 @@ tests_testHttpParser_DEPENDENCIES = \
 ## Tests of the HttpRequest module.
 tests_testHttpRequest_SOURCES = \
        AccessLogEntry.cc \
-       $(ACL_REGISTRATION_SOURCES) \
        HttpParser.cc \
        HttpParser.h \
        RequestFlags.h \
@@ -2605,7 +2622,7 @@ tests_testHttpRequest_SOURCES = \
        HttpRequest.cc \
        HttpRequestMethod.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        String.cc \
        tests/testHttpRequest.h \
        tests/testHttpRequest.cc \
@@ -2613,10 +2630,12 @@ tests_testHttpRequest_SOURCES = \
        tests/testHttpRequestMethod.cc \
        tests/testMain.cc \
        tests/stub_DiskIOModule.cc \
+       tests/stub_libauth.cc \
        tests/stub_main_cc.cc \
        tests/stub_ipc_Forwarder.cc \
        tests/stub_libeui.cc \
        tests/stub_store_stats.cc \
+       tests/stub_EventLoop.cc \
        time.cc \
        BodyPipe.cc \
        cache_manager.cc \
@@ -2628,9 +2647,9 @@ tests_testHttpRequest_SOURCES = \
        cache_cf.cc \
        debug.cc \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        carp.h \
-       carp.cc \
+       tests/stub_carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
        client_db.h \
@@ -2641,6 +2660,7 @@ tests_testHttpRequest_SOURCES = \
        client_side_request.cc \
        ClientInfo.h \
        clientStream.cc \
+       tests/stub_CollapsedForwarding.cc \
        ConfigOption.cc \
        ConfigParser.cc \
        CpuAffinityMap.cc \
@@ -2654,7 +2674,7 @@ tests_testHttpRequest_SOURCES = \
        dlink.cc \
        $(DNSSOURCE) \
        errorpage.cc \
-       ETag.cc \
+       tests/stub_ETag.cc \
        external_acl.cc \
        ExternalACLEntry.cc \
        fatal.h \
@@ -2666,6 +2686,10 @@ tests_testHttpRequest_SOURCES = \
        fqdncache.cc \
        ftp.h \
        ftp.cc \
+       FtpGatewayServer.h \
+       FtpGatewayServer.cc \
+       FtpServer.h \
+       FtpServer.cc \
        FwdState.cc \
        FwdState.h \
        gopher.h \
@@ -2710,7 +2734,6 @@ tests_testHttpRequest_SOURCES = \
        multicast.h \
        multicast.cc \
        mem_node.cc \
-       MemBlob.cc \
        MemBuf.cc \
        MemObject.cc \
        mime.h \
@@ -2733,11 +2756,15 @@ tests_testHttpRequest_SOURCES = \
        peer_userhash.h \
        peer_userhash.cc \
        redirect.h \
-       redirect.cc \
+       tests/stub_libauth_acls.cc \
+       tests/stub_redirect.cc \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
@@ -2753,7 +2780,7 @@ tests_testHttpRequest_SOURCES = \
        store.cc \
        store_client.cc \
        store_digest.h \
-       store_digest.cc \
+       tests/stub_store_digest.cc \
        store_dir.cc \
        store_io.cc \
        store_key_md5.h \
@@ -2768,30 +2795,25 @@ tests_testHttpRequest_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        StrList.h \
        StrList.cc \
        event.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
-       SwapDir.cc \
+       Transients.cc \
+       tests/stub_tunnel.cc \
+       tests/stub_SwapDir.cc \
        MemStore.cc \
        url.cc \
-       URLScheme.cc \
        urn.h \
        urn.cc \
        wccp2.h \
-       wccp2.cc \
+       tests/stub_wccp2.cc \
        whois.h \
-       whois.cc \
+       tests/stub_whois.cc \
        FadingCounter.cc \
        $(WIN32_SOURCE) \
        wordlist.h \
@@ -2799,15 +2821,14 @@ tests_testHttpRequest_SOURCES = \
 nodist_tests_testHttpRequest_SOURCES = \
        $(BUILT_SOURCES)
 tests_testHttpRequest_LDADD = \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        libsquid.la \
        ip/libip.la \
        fs/libfs.la \
+       $(SSL_LIBS) \
        ipc/libipc.la \
        base/libbase.la \
        mgr/libmgr.la \
@@ -2821,11 +2842,11 @@ tests_testHttpRequest_LDADD = \
        $(REPL_OBJS) \
        $(ADAPTATION_LIBS) \
        $(ESI_LIBS) \
-       $(SSL_LIBS) \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
        $(DISK_OS_LIBS) \
+       $(NETTLELIB) \
        $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SQUID_CPPUNIT_LA) \
@@ -2842,9 +2863,10 @@ tests_testHttpRequest_DEPENDENCIES = \
 ## first line - what we are testing.
 tests_testStore_SOURCES= \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        cbdata.cc \
        ClientInfo.h \
+       tests/stub_CollapsedForwarding.cc \
        ConfigOption.cc \
        ConfigParser.cc \
        $(DELAY_POOL_SOURCE) \
@@ -2883,10 +2905,12 @@ tests_testStore_SOURCES= \
        MasterXaction.cc \
        MasterXaction.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
        MemBuf.cc \
        MemObject.cc \
+       Notes.h \
+       Notes.cc \
        Packer.cc \
        Parsing.cc \
        RemovalPolicy.cc \
@@ -2903,16 +2927,14 @@ tests_testStore_SOURCES= \
        store_io.cc \
        store_swapout.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        store_key_md5.h \
        store_key_md5.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        String.cc \
        StrList.h \
        StrList.cc \
@@ -2936,6 +2958,7 @@ tests_testStore_SOURCES= \
        tests/stub_helper.cc \
        tests/stub_HelperChildConfig.cc \
        tests/stub_http.cc \
+       tests/stub_libauth.cc \
        tests/stub_libeui.cc \
        tests/stub_libformat.cc \
        HttpBody.h \
@@ -2947,12 +2970,14 @@ tests_testStore_SOURCES= \
        mime.h \
        tests/stub_mime.cc \
        tests/stub_Port.cc \
+       tests/stub_stat.cc \
        tests/stub_store_client.cc \
        tests/stub_store_stats.cc \
        store_rebuild.h \
        tests/stub_store_rebuild.cc \
        tests/stub_store_swapout.cc \
        tools.h \
+       Transients.cc \
        tests/stub_tools.cc \
        tests/stub_UdsOp.cc \
        tests/testMain.cc \
@@ -2968,9 +2993,8 @@ tests_testStore_SOURCES= \
        tests/testStoreSupport.h \
        tests/TestSwapDir.cc \
        tests/TestSwapDir.h \
-       time.cc \
+       tests/stub_time.cc \
        url.cc \
-       URLScheme.cc \
        wordlist.h \
        wordlist.cc
 
@@ -2982,23 +3006,22 @@ nodist_tests_testStore_SOURCES= \
 
 tests_testStore_LDADD= \
        http/libsquid-http.la \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
        ip/libip.la \
        fs/libfs.la \
        mgr/libmgr.la \
+       $(SSL_LIBS) \
        ipc/libipc.la \
        anyp/libanyp.la \
-       $(SSL_LIBS) \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
+       $(NETTLELIB) \
        $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SSLLIB) \
@@ -3016,9 +3039,12 @@ tests_testStore_DEPENDENCIES = \
 tests_testString_SOURCES = \
        ClientInfo.h \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        MemBuf.cc \
        String.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        tests/testMain.cc \
        tests/testString.cc \
        tests/testString.h \
@@ -3030,7 +3056,7 @@ tests_testString_SOURCES = \
        tests/stub_HelperChildConfig.cc \
        tools.h \
        tests/stub_tools.cc \
-       time.cc \
+       tests/stub_time.cc \
        wordlist.h \
        wordlist.cc
 nodist_tests_testString_SOURCES = \
@@ -3052,11 +3078,9 @@ tests_testString_DEPENDENCIES = \
 SWAP_TEST_DS =\
        repl_modules.o \
        $(DISK_LIBS) \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
@@ -3073,10 +3097,13 @@ tests_testUfs_SOURCES = \
        tests/testUfs.h \
        tests/stub_cache_manager.cc \
        tests/stub_client_db.cc \
+       tests/stub_CollapsedForwarding.cc \
        tests/stub_HelperChildConfig.cc \
        tests/stub_icp.cc \
        tests/stub_ipc.cc \
+       tests/stub_ipcache.cc \
        tests/stub_libeui.cc \
+       tests/stub_libicmp.cc \
        tests/stub_MemStore.cc \
        tests/stub_pconn.cc \
        tests/stub_Port.cc \
@@ -3084,6 +3111,7 @@ tests_testUfs_SOURCES = \
        internal.h \
        tests/stub_internal.cc \
        tests/stub_libformat.cc \
+       tests/stub_stat.cc \
        store_rebuild.h \
        tests/stub_store_rebuild.cc \
        tests/stub_store_stats.cc \
@@ -3107,18 +3135,16 @@ tests_testUfs_SOURCES = \
        RequestFlags.cc \
        SquidList.h \
        SquidList.cc \
+       Transients.cc \
        MasterXaction.cc \
        MasterXaction.h \
        MemObject.cc \
+       Notes.h \
+       Notes.cc \
        StoreSwapLogData.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
+       $(STOREMETA_SOURCE) \
        StoreFileSystem.cc \
        store_io.cc \
        store_swapout.cc \
@@ -3128,7 +3154,7 @@ tests_testUfs_SOURCES = \
        event.cc \
        $(DELAY_POOL_SOURCE) \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        ConfigParser.cc \
        EventLoop.cc \
        HttpMsg.cc \
@@ -3148,10 +3174,14 @@ tests_testUfs_SOURCES = \
        tests/stub_cache_cf.cc \
        tests/stub_helper.cc \
        cbdata.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        String.cc \
        tests/stub_debug.cc \
        tests/stub_client_side_request.cc \
        tests/stub_http.cc \
+       tests/stub_libauth.cc \
        mem_node.cc \
        stmem.cc \
        mime.h \
@@ -3194,7 +3224,6 @@ tests_testUfs_SOURCES = \
        tests/testStoreSupport.cc \
        tests/testStoreSupport.h \
        time.cc \
-       URLScheme.cc \
        wordlist.h \
        wordlist.cc \
        $(DISKIO_SOURCE)
@@ -3209,11 +3238,9 @@ tests_testUfs_LDADD = \
        http/libsquid-http.la \
        CommCalls.o \
        DnsLookupDetails.o \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        libsquid.la \
        ip/libip.la \
@@ -3224,8 +3251,8 @@ tests_testUfs_LDADD = \
        $(DISK_LIBS) \
        $(DISK_OS_LIBS) \
        acl/libapi.la \
-       ipc/libipc.la \
        $(SSL_LIBS) \
+       ipc/libipc.la \
        comm/libcomm.la \
        anyp/libanyp.la \
        base/libbase.la \
@@ -3233,6 +3260,7 @@ tests_testUfs_LDADD = \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
+       $(NETTLELIB) \
        $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SSLLIB) \
@@ -3259,7 +3287,9 @@ testRefCount_LDADD = \
 tests_testRock_SOURCES = \
        cbdata.cc \
        CacheDigest.h \
-       CacheDigest.cc \
+       CollapsedForwarding.h \
+       CollapsedForwarding.cc \
+       tests/stub_CacheDigest.cc \
        ConfigOption.cc \
        ConfigParser.cc \
        disk.h \
@@ -3268,7 +3298,7 @@ tests_testRock_SOURCES = \
        EventLoop.cc \
        event.cc \
        fatal.h \
-       tests/stub_fatal.cc \
+       fatal.cc \
        fd.h \
        fd.cc \
        fde.h \
@@ -3302,6 +3332,8 @@ tests_testRock_SOURCES = \
        MemBuf.cc \
        MemObject.cc \
        mem_node.cc \
+       Notes.h \
+       Notes.cc \
        Packer.cc \
        Parsing.cc \
        RemovalPolicy.cc \
@@ -3313,16 +3345,12 @@ tests_testRock_SOURCES = \
        tests/stub_StatHist.cc \
        stmem.cc \
        repl_modules.h \
+       tests/stub_stat.cc \
        store.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
-       StoreMetaURL.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaVary.cc \
+       $(STOREMETA_SOURCE) \
        StoreSwapLogData.cc \
        store_dir.cc \
        store_io.cc \
@@ -3330,10 +3358,15 @@ tests_testRock_SOURCES = \
        store_key_md5.cc \
        store_swapmeta.cc \
        store_swapout.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        String.cc \
        StrList.h \
        StrList.cc \
        SwapDir.cc \
+       Transients.h \
+       Transients.cc \
        tests/testRock.cc \
        tests/testMain.cc \
        tests/testRock.h \
@@ -3344,8 +3377,8 @@ tests_testRock_SOURCES = \
        cache_cf.h \
        YesNoNone.h \
        tests/stub_cache_cf.cc \
-       tests/stub_cache_manager.cc \
        client_db.h \
+       tests/stub_cache_manager.cc \
        tests/stub_client_db.cc \
        tests/stub_client_side_request.cc \
        tests/stub_debug.cc \
@@ -3353,12 +3386,14 @@ tests_testRock_SOURCES = \
        tests/stub_HelperChildConfig.cc \
        tests/stub_http.cc \
        tests/stub_HttpRequest.cc \
+       tests/stub_libauth.cc \
        tests/stub_icp.cc \
        tests/stub_ipc.cc \
        tests/stub_ipcache.cc \
        tests/stub_libeui.cc \
        tests/stub_libformat.cc \
        tests/stub_libicmp.cc \
+       tests/stub_libmgr.cc \
        tests/stub_MemStore.cc \
        mime.h \
        tests/stub_mime.cc \
@@ -3372,7 +3407,6 @@ tests_testRock_SOURCES = \
        tests/stub_tools.cc \
        time.cc \
        url.cc \
-       URLScheme.cc \
        wordlist.h \
        wordlist.cc \
        $(DELAY_POOL_SOURCE) \
@@ -3391,7 +3425,6 @@ tests_testRock_LDADD = \
        anyp/libanyp.la \
        ip/libip.la \
        fs/libfs.la \
-       $(AUTH_LIBS) \
        $(COMMON_LIBS) \
        $(REPL_OBJS) \
        $(DISK_LIBS) \
@@ -3399,13 +3432,14 @@ tests_testRock_LDADD = \
        acl/libacls.la \
        acl/libapi.la \
        acl/libstate.la \
+       eui/libeui.la \
+       $(SSL_LIBS) \
        ipc/libipc.la \
-       mgr/libmgr.la \
        base/libbase.la \
-       $(SSL_LIBS) \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
+       $(NETTLELIB) \
        $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SSLLIB) \
@@ -3415,175 +3449,10 @@ tests_testRock_LDFLAGS = $(INCLUDES) $(LIBADD_DL)
 tests_testRock_DEPENDENCIES = \
        $(SWAP_TEST_DS)
 
-tests_testCoss_SOURCES = \
-       tests/testCoss.cc \
-       tests/testMain.cc \
-       tests/testCoss.h \
-       tests/stub_cache_manager.cc \
-       client_db.h \
-       tests/stub_client_db.cc \
-       tests/stub_debug.cc \
-       tests/stub_HelperChildConfig.cc \
-       internal.h \
-       tests/stub_internal.cc \
-       tests/stub_ipc.cc \
-       tests/stub_libeui.cc \
-       tests/stub_pconn.cc \
-       store_rebuild.h \
-       tests/stub_store_rebuild.cc \
-       tests/stub_store_stats.cc \
-       fatal.h \
-       tests/stub_fatal.cc \
-       fd.h \
-       fd.cc \
-       fde.h \
-       fde.cc \
-       disk.h \
-       disk.cc \
-       FileMap.h \
-       filemap.cc \
-       HttpBody.h \
-       HttpBody.cc \
-       HttpReply.cc \
-       int.h \
-       int.cc \
-       SquidList.h \
-       SquidList.cc \
-       MemObject.cc \
-       StoreSwapLogData.cc \
-       StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
-       StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
-       StoreFileSystem.cc \
-       store_io.cc \
-       store_swapout.cc \
-       store_swapmeta.cc \
-       $(UNLINKDSOURCE) \
-       $(WIN32_SOURCE) \
-       event.cc \
-       $(DELAY_POOL_SOURCE) \
-       CacheDigest.h \
-       CacheDigest.cc \
-       ConfigParser.cc \
-       EventLoop.cc \
-       HttpMsg.cc \
-       RemovalPolicy.cc \
-       store_dir.cc \
-       repl_modules.h \
-       store.cc \
-       HttpRequestMethod.cc \
-       store_key_md5.h \
-       store_key_md5.cc \
-       Parsing.cc \
-       ConfigOption.cc \
-       SwapDir.cc \
-       tests/stub_acl.cc \
-       cache_cf.h \
-       YesNoNone.h \
-       tests/stub_cache_cf.cc \
-       tests/stub_helper.cc \
-       cbdata.cc \
-       String.cc \
-       tests/stub_client_side_request.cc \
-       tests/stub_http.cc \
-       mem_node.cc \
-       stmem.cc \
-       mime.h \
-       tests/stub_mime.cc \
-       HttpHeaderFieldInfo.h \
-       HttpHeaderTools.h \
-       HttpHeaderTools.cc \
-       HttpHeader.h \
-       HttpHeader.cc \
-       Mem.h \
-       mem.cc \
-       ClientInfo.h \
-       MemBuf.cc \
-       HttpHdrContRange.cc \
-       Packer.cc \
-       HttpHeaderFieldStat.h \
-       HttpHdrCc.h \
-       HttpHdrCc.cc \
-       HttpHdrCc.cci \
-       HttpHdrSc.cc \
-       HttpHdrScTarget.cc \
-       url.cc \
-       StatCounters.h \
-       StatCounters.cc \
-       StatHist.h \
-       tests/stub_StatHist.cc \
-       tests/stub_errorpage.cc \
-       tests/stub_HttpRequest.cc \
-       log/access_log.h \
-       tests/stub_access_log.cc \
-       refresh.h \
-       refresh.cc \
-       tests/stub_MemStore.cc \
-       tests/stub_Port.cc \
-       tests/stub_store_client.cc \
-       tests/stub_store_stats.cc \
-       tools.h \
-       tests/stub_tools.cc \
-       tests/stub_UdsOp.cc \
-       tests/testStoreSupport.cc \
-       tests/testStoreSupport.h \
-       time.cc \
-       URLScheme.cc \
-       wordlist.h \
-       wordlist.cc \
-       $(DISKIO_SOURCE)
-
-nodist_tests_testCoss_SOURCES = \
-       swap_log_op.cc \
-       SquidMath.cc \
-       SquidMath.h \
-       $(TESTSOURCES) \
-       $(DISKIO_GEN_SOURCE)
-tests_testCoss_LDADD = \
-       anyp/libanyp.la \
-       libsquid.la \
-       $(REGEXLIB) \
-       $(AUTH_ACL_LIBS) \
-       ident/libident.la \
-       acl/libacls.la \
-       acl/libstate.la \
-       $(AUTH_LIBS) \
-       acl/libapi.la \
-       libsquid.la \
-       comm/libcomm.la \
-       ip/libip.la \
-       fs/libfs.la \
-       mgr/libmgr.la \
-       $(REPL_OBJS) \
-       $(DISK_LIBS) \
-       $(DISK_OS_LIBS) \
-       $(COMMON_LIBS) \
-       $(SSL_LIBS) \
-       acl/libapi.la \
-       ipc/libipc.la \
-       base/libbase.la \
-       $(top_builddir)/lib/libmisccontainers.la \
-       $(top_builddir)/lib/libmiscencoding.la \
-       $(top_builddir)/lib/libmiscutil.la \
-       $(SQUID_CPPUNIT_LIBS) \
-       $(REGEXLIB) \
-       $(SSLLIB) \
-       $(COMPAT_LIB) \
-       $(XTRA_LIBS)
-tests_testCoss_LDFLAGS = $(LIBADD_DL)
-tests_testCoss_DEPENDENCIES = \
-       $(SWAP_TEST_DS)
-
 ## Tests of the URL module.
 ## TODO: Trim this down once the insanity is over.
 tests_testURL_SOURCES = \
        AccessLogEntry.cc \
-       $(ACL_REGISTRATION_SOURCES) \
        BodyPipe.cc \
        cache_cf.h \
        AuthReg.h \
@@ -3591,11 +3460,11 @@ tests_testURL_SOURCES = \
        YesNoNone.cc \
        RefreshPattern.h \
        cache_cf.cc \
-       cache_manager.cc \
+       tests/stub_cache_manager.cc \
        CacheDigest.h \
-       CacheDigest.cc \
+       tests/stub_CacheDigest.cc \
        carp.h \
-       carp.cc \
+       tests/stub_carp.cc \
        cbdata.cc \
        ChunkedCodingParser.cc \
        client_db.h \
@@ -3606,6 +3475,7 @@ tests_testURL_SOURCES = \
        client_side_request.cc \
        ClientInfo.h \
        clientStream.cc \
+       tests/stub_CollapsedForwarding.cc \
        ConfigOption.cc \
        ConfigParser.cc \
        CpuAffinityMap.cc \
@@ -3636,6 +3506,10 @@ tests_testURL_SOURCES = \
        fqdncache.cc \
        ftp.h \
        ftp.cc \
+       FtpGatewayServer.h \
+       FtpGatewayServer.cc \
+       FtpServer.h \
+       FtpServer.cc \
        FwdState.cc \
        FwdState.h \
        gopher.h \
@@ -3686,9 +3560,8 @@ tests_testURL_SOURCES = \
        multicast.h \
        multicast.cc \
        Mem.h \
-       mem.cc \
+       tests/stub_mem.cc \
        mem_node.cc \
-       MemBlob.cc \
        MemBuf.cc \
        MemObject.cc \
        mime.h \
@@ -3697,8 +3570,8 @@ tests_testURL_SOURCES = \
        mime_header.cc \
        neighbors.h \
        neighbors.cc \
-       Notes.cc \
        Notes.h \
+       Notes.cc \
        Packer.cc \
        Parsing.cc \
        pconn.cc \
@@ -3711,11 +3584,14 @@ tests_testURL_SOURCES = \
        peer_userhash.h \
        peer_userhash.cc \
        redirect.h \
-       redirect.cc \
+       tests/stub_redirect.cc \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        Server.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        $(SNMP_SOURCE) \
        SquidMath.h \
        SquidMath.cc \
@@ -3731,7 +3607,7 @@ tests_testURL_SOURCES = \
        store.cc \
        store_client.cc \
        store_digest.h \
-       store_digest.cc \
+       tests/stub_store_digest.cc \
        store_dir.cc \
        store_io.cc \
        store_key_md5.h \
@@ -3746,41 +3622,39 @@ tests_testURL_SOURCES = \
        store_swapout.cc \
        StoreFileSystem.cc \
        StoreIOState.cc \
-       StoreMeta.cc \
-       StoreMetaMD5.cc \
-       StoreMetaSTD.cc \
-       StoreMetaSTDLFS.cc \
+       tests/stub_StoreMeta.cc \
        StoreMetaUnpacker.cc \
-       StoreMetaURL.cc \
-       StoreMetaVary.cc \
        StoreSwapLogData.cc \
        String.cc \
        StrList.h \
        StrList.cc \
-       SwapDir.cc \
+       Transients.cc \
+       tests/stub_SwapDir.cc \
        MemStore.cc \
        tests/stub_debug.cc \
        tests/stub_DiskIOModule.cc \
+       tests/stub_libauth_acls.cc \
+       tests/stub_libauth.cc \
        tests/stub_main_cc.cc \
        tests/stub_ipc_Forwarder.cc \
        tests/stub_store_stats.cc \
        tests/testURL.cc \
        tests/testURL.h \
-       tests/testURLScheme.cc \
-       tests/testURLScheme.h \
+       tests/testUriScheme.cc \
+       tests/testUriScheme.h \
        tests/testMain.cc \
-       time.cc \
+       tests/stub_time.cc \
+       tests/stub_EventLoop.cc \
        tools.h \
        tools.cc \
-       tunnel.cc \
+       tests/stub_tunnel.cc \
        url.cc \
-       URLScheme.cc \
        urn.h \
        urn.cc \
        wccp2.h \
-       wccp2.cc \
+       tests/stub_wccp2.cc \
        whois.h \
-       whois.cc \
+       tests/stub_whois.cc \
        FadingCounter.cc \
        $(WIN32_SOURCE) \
        wordlist.h \
@@ -3790,17 +3664,16 @@ nodist_tests_testURL_SOURCES = \
 tests_testURL_LDADD = \
        http/libsquid-http.la \
        anyp/libanyp.la \
-       $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        eui/libeui.la \
        acl/libstate.la \
-       $(AUTH_LIBS) \
        acl/libapi.la \
        base/libbase.la \
        libsquid.la \
        ip/libip.la \
        fs/libfs.la \
+       $(SSL_LIBS) \
        ipc/libipc.la \
        mgr/libmgr.la \
        $(SNMP_LIBS) \
@@ -3813,10 +3686,10 @@ tests_testURL_LDADD = \
        $(REPL_OBJS) \
        $(ADAPTATION_LIBS) \
        $(ESI_LIBS) \
-       $(SSL_LIBS) \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
+       $(NETTLELIB) \
        $(COMPAT_LIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SQUID_CPPUNIT_LA) \
@@ -3829,11 +3702,98 @@ tests_testURL_DEPENDENCIES = \
        $(REPL_OBJS) \
        $(SQUID_CPPUNIT_LA)
 
+tests_testSBuf_SOURCES= \
+       tests/testSBuf.h \
+       tests/testSBuf.cc \
+       tests/testMain.cc \
+       tests/SBufFindTest.h \
+       tests/SBufFindTest.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
+       SBufStream.h \
+       tests/stub_time.cc \
+       mem.cc \
+       tests/stub_debug.cc \
+       tests/stub_fatal.cc \
+       tests/stub_HelperChildConfig.cc \
+       tests/stub_cache_cf.cc \
+       tests/stub_cache_manager.cc \
+       tests/stub_store.cc \
+       tests/stub_store_stats.cc \
+       tests/stub_tools.cc \
+       SquidString.h \
+       String.cc \
+       tests/stub_wordlist.cc \
+       tests/stub_MemBuf.cc
+nodist_tests_testSBuf_SOURCES=$(TESTSOURCES)
+tests_testSBuf_LDFLAGS = $(LIBADD_DL)
+tests_testSBuf_LDADD=\
+       base/libbase.la \
+       libsquid.la \
+       ip/libip.la \
+       mgr/libmgr.la \
+       $(top_builddir)/lib/libmiscutil.la \
+       $(REGEXLIB) \
+       $(SQUID_CPPUNIT_LIBS) \
+       $(COMPAT_LIB) \
+       $(XTRA_LIBS)
+tests_testSBuf_DEPENDENCIES= $(SQUID_CPPUNIT_LA)
+
+tests_testSBufList_SOURCES= \
+       tests/testSBufList.h \
+       tests/testSBufList.cc \
+       tests/testMain.cc \
+       $(SBUF_SOURCE) \
+       SBufList.h \
+       SBufList.cc \
+       SBufAlgos.h \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
+       SBufStream.h \
+       tests/stub_time.cc \
+       mem.cc \
+       tests/stub_MemObject.cc \
+       tests/stub_cbdata.cc \
+       tests/stub_comm.cc \
+       tests/stub_debug.cc \
+       tests/stub_event.cc \
+       tests/stub_fatal.cc \
+       tests/stub_fd.cc \
+       tests/stub_HelperChildConfig.cc \
+       tests/stub_cache_cf.cc \
+       tests/stub_cache_manager.cc \
+       tests/stub_store.cc \
+       tests/stub_stmem.cc \
+       tests/stub_store_stats.cc \
+       tests/stub_tools.cc \
+       SquidString.h \
+       StatCounters.cc \
+       String.cc \
+       tests/stub_wordlist.cc \
+       tests/stub_MemBuf.cc
+nodist_tests_testSBufList_SOURCES=$(TESTSOURCES)
+tests_testSBufList_LDFLAGS = $(LIBADD_DL)
+tests_testSBufList_LDADD=\
+       base/libbase.la \
+       libsquid.la \
+       ip/libip.la \
+       mgr/libmgr.la \
+       $(top_builddir)/lib/libmiscutil.la \
+       $(SQUID_CPPUNIT_LIBS) \
+       $(COMPAT_LIB) \
+       $(XTRA_LIBS)
+tests_testSBufList_DEPENDENCIES= $(SQUID_CPPUNIT_LA)
+
 tests_testConfigParser_SOURCES = \
        ClientInfo.h \
        Mem.h \
-       mem.cc \
-       MemBuf.cc \
+       tests/stub_mem.cc \
+       tests/stub_MemBuf.cc \
+       tests/stub_time.cc \
+       $(SBUF_SOURCE) \
+       SBufDetailedStats.h \
+       tests/stub_SBufDetailedStats.cc \
        String.cc \
        ConfigParser.cc \
        fatal.h \
@@ -3849,7 +3809,6 @@ tests_testConfigParser_SOURCES = \
        tests/stub_HelperChildConfig.cc \
        tools.h \
        tests/stub_tools.cc \
-       time.cc \
        wordlist.h \
        wordlist.cc
 nodist_tests_testConfigParser_SOURCES = \
@@ -3869,10 +3828,10 @@ tests_testConfigParser_DEPENDENCIES = \
        $(SQUID_CPPUNIT_LA)
        
 tests_testStatHist_SOURCES = \
-       cbdata.cc \
+       tests/stub_cbdata.cc \
        fatal.h \
        tests/stub_fatal.cc \
-       MemBuf.cc \
+       tests/stub_MemBuf.cc \
        StatHist.cc \
        StatHist.h \
        String.cc \
@@ -3895,8 +3854,7 @@ tests_testStatHist_SOURCES = \
        tests/stub_tools.cc \
        tests/testMain.cc \
        tests/testStatHist.cc \
-       tests/testStatHist.h \
-       time.cc
+       tests/testStatHist.h
 nodist_tests_testStatHist_SOURCES = \
        $(TESTSOURCES)
 tests_testStatHist_LDFLAGS = $(LIBADD_DL)
@@ -3909,22 +3867,6 @@ tests_testStatHist_LDADD = \
        $(COMPAT_LIB)
 tests_testStatHist_DEPENDENCIES = $(SQUID_CPPUNIT_LA)
 
-tests_testVector_SOURCES = \
-       tests/testVector.cc \
-       tests/testMain.cc \
-       tests/testVector.h \
-       time.cc
-nodist_tests_testVector_SOURCES = \
-       $(TESTSOURCES)
-tests_testVector_LDADD= \
-       $(SQUID_CPPUNIT_LIBS) \
-       $(COMPAT_LIB) \
-       $(XTRA_LIBS)
-tests_testVector_LDFLAGS = $(LIBADD_DL)
-tests_testVector_DEPENDENCIES = \
-       $(SQUID_CPPUNIT_LA)
-
-
 TESTS += testHeaders
 
 ## Special Universal .h dependency test script