]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/Makefile.am
Merged from trunk rev.14183
[thirdparty/squid.git] / src / Makefile.am
index af3d86a5d665d7729de1ab3b02c0362aa7c70e2b..633f266b60d9e7fa1282b319158e9dd4112abb1a 100644 (file)
@@ -1,18 +1,16 @@
-#
-#  Makefile for the Squid Object Cache server
-#
-#  Uncomment and customize the following to suit your needs:
-#
+## Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+##
+## Squid software is distributed under GPLv2+ license and includes
+## contributions from numerous individuals and organizations.
+## Please see the COPYING and CONTRIBUTORS files for details.
+##
 
 include $(top_srcdir)/src/Common.am
 
 AUTOMAKE_OPTIONS = subdir-objects
 
 DNSSOURCE = \
-       dns_internal.cc \
-       SquidDns.h \
-       DnsLookupDetails.h \
-       DnsLookupDetails.cc
+       dns_internal.cc
 
 SBUF_SOURCE= \
        base/CharacterSet.h \
@@ -46,8 +44,8 @@ LOADABLE_MODULES_SOURCES = \
        LoadableModules.h \
        LoadableModules.cc
 
-SUBDIRS        = base anyp parser comm eui acl format fs repl
-DIST_SUBDIRS = base anyp parser comm eui acl format fs repl
+SUBDIRS        = mem base anyp helper dns ftp parser comm eui acl format clients servers fs repl DiskIO
+DIST_SUBDIRS = mem base anyp helper dns ftp parser comm eui acl format clients servers fs repl DiskIO
 
 if ENABLE_AUTH
 SUBDIRS += auth
@@ -57,16 +55,15 @@ check_PROGRAMS+= tests/testACLMaxUserIP
 endif
 DIST_SUBDIRS += auth
 
-SUBDIRS        += http ip icmp ident log ipc mgr
-DIST_SUBDIRS += http ip icmp ident log ipc mgr
+SUBDIRS        += http ip icmp ident log ipc mgr security
+DIST_SUBDIRS += http ip icmp ident log ipc mgr security
 
+SSL_LIBS=
 if ENABLE_SSL
 SUBDIRS += ssl
-SSL_LIBS = \
+SSL_LIBS += \
        ssl/libsslsquid.la \
        ssl/libsslutil.la
-else
-SSL_LOCAL_LIBS =
 endif
 DIST_SUBDIRS += ssl
 
@@ -92,14 +89,13 @@ DIST_SUBDIRS += adaptation
 
 if USE_ESI
 SUBDIRS += esi
-ESI_LOCAL_LIBS = \
+ESI_LIBS = \
        esi/libesi.la \
-       $(top_builddir)/lib/libTrie/libTrie.a
-ESI_LIBS = $(ESI_LOCAL_LIBS) \
+       $(top_builddir)/lib/libTrie/libTrie.a \
        $(XMLLIB) \
        $(EXPATLIB)
 else
-ESI_LIBS = 
+ESI_LIBS =
 endif
 DIST_SUBDIRS += esi
 
@@ -179,32 +175,9 @@ else
 IPC_SOURCE = SquidIpc.h ipc.cc
 endif
 
-AIO_WIN32_ALL_SOURCES = \
-       DiskIO/AIO/aio_win32.cc \
-       DiskIO/AIO/aio_win32.h
-if ENABLE_WIN32_AIO
-AIO_WIN32_SOURCES = $(AIO_WIN32_ALL_SOURCES)
-else
-AIO_WIN32_SOURCES =
-endif
-
-if ENABLE_WIN32_AIOPS
-AIOPS_SOURCE = DiskIO/DiskThreads/aiops_win32.cc \
-       DiskIO/DiskThreads/CommIO.cc \
-       DiskIO/DiskThreads/CommIO.h
-else
-AIOPS_SOURCE = DiskIO/DiskThreads/aiops.cc \
-       DiskIO/DiskThreads/CommIO.cc \
-       DiskIO/DiskThreads/CommIO.h
-endif
-
-EXTRA_LIBRARIES = libAIO.a libBlocking.a libDiskDaemon.a libDiskThreads.a \
-       libMmapped.a libIpcIo.a
-noinst_LIBRARIES = $(DISK_LIBS)
 noinst_LTLIBRARIES = libsquid.la
 
 EXTRA_PROGRAMS = \
-       DiskIO/DiskDaemon/diskd \
        unlinkd \
        recv-announce \
        tests/testUfs \
@@ -224,7 +197,6 @@ bin_PROGRAMS =
 
 
 libexec_PROGRAMS = \
-       $(DISK_PROGRAMS) \
        $(UNLINKD)
 
 cf_gen_SOURCES = cf_gen.cc
@@ -239,25 +211,6 @@ AM_CPPFLAGS += -I$(top_builddir)/src
 
 ACL_REGISTRATION_SOURCES = AclRegs.cc AuthReg.cc
 
-DISKIO_SOURCE = \
-       DiskIO/DiskIOModule.cc \
-       DiskIO/ReadRequest.cc \
-       DiskIO/ReadRequest.h \
-       DiskIO/WriteRequest.cc \
-       DiskIO/WriteRequest.h \
-       DiskIO/DiskFile.h \
-       DiskIO/DiskIOStrategy.h \
-       DiskIO/IORequestor.h \
-       DiskIO/DiskIOModule.h \
-       DiskIO/ReadRequest.h
-
-DISKIO_GEN_SOURCE = \
-       DiskIO/DiskIOModules_gen.cc
-
-DiskIO/DiskIOModules_gen.cc: Makefile
-       $(SHELL) $(srcdir)/DiskIO/modules.sh $(DISK_MODULES) > DiskIO/DiskIOModules_gen.cc
-
-
 # common library for all the binaries and tests. This is kindof a catch all
 # and smaller libraries split from this are encouraged. Using lt convenience
 # libraries, dependencies should not be a problem either.
@@ -287,15 +240,13 @@ squid_SOURCES = \
        CacheDigest.cc \
        cache_manager.cc \
        NeighborTypeDomainList.h \
-       CachePeerDomainList.h \
+       CachePeer.cc \
        CachePeer.h \
        CacheManager.h \
        carp.h \
        carp.cc \
        cbdata.cc \
        cbdata.h \
-       ChunkedCodingParser.cc \
-       ChunkedCodingParser.h \
        client_db.h \
        client_db.cc \
        client_side.h \
@@ -312,6 +263,7 @@ squid_SOURCES = \
        ClientRequestContext.h \
        clientStream.cc \
        clientStream.h \
+       clientStreamForward.h \
        CollapsedForwarding.cc \
        CollapsedForwarding.h \
        CompletionDispatcher.cc \
@@ -332,7 +284,6 @@ squid_SOURCES = \
        $(DELAY_POOL_SOURCE) \
        disk.h \
        disk.cc \
-       $(DISKIO_SOURCE) \
        dlink.h \
        dlink.cc \
        $(DNSSOURCE) \
@@ -363,12 +314,6 @@ squid_SOURCES = \
        filemap.cc \
        fqdncache.h \
        fqdncache.cc \
-       ftp.h \
-       ftp.cc \
-       FtpGatewayServer.h \
-       FtpGatewayServer.cc \
-       FtpServer.h \
-       FtpServer.cc \
        FwdState.cc \
        FwdState.h \
        Generic.h \
@@ -377,10 +322,6 @@ squid_SOURCES = \
        gopher.cc \
        helper.cc \
        helper.h \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
-       HelperReply.cc \
-       HelperReply.h \
        hier_code.h \
        HierarchyLogEntry.h \
        $(HTCPSOURCE) \
@@ -411,16 +352,12 @@ squid_SOURCES = \
        HttpControlMsg.h \
        HttpMsg.cc \
        HttpMsg.h \
-       HttpParser.cc \
-       HttpParser.h \
        HttpReply.cc \
        HttpReply.h \
        RequestFlags.h \
        RequestFlags.cc \
        HttpRequest.cc \
        HttpRequest.h \
-       HttpRequestMethod.cc \
-       HttpRequestMethod.h \
        ICP.h \
        icp_opcode.h \
        icp_v2.cc \
@@ -435,16 +372,14 @@ squid_SOURCES = \
        $(LEAKFINDERSOURCE) \
        SquidList.h \
        SquidList.cc \
+       LogTags.cc \
        LogTags.h \
        lookup_t.h \
        main.cc \
        MasterXaction.cc \
        MasterXaction.h \
-       Mem.h \
-       mem.cc \
        mem_node.cc \
        mem_node.h \
-       Mem.h \
        MemBuf.cc \
        MemObject.cc \
        MemObject.h \
@@ -459,8 +394,6 @@ squid_SOURCES = \
        neighbors.cc \
        Notes.h \
        Notes.cc \
-       Packer.cc \
-       Packer.h \
        Parsing.cc \
        Parsing.h \
        $(XPROF_STATS_SOURCE) \
@@ -542,8 +475,6 @@ squid_SOURCES = \
        StoreStats.h \
        StoreSwapLogData.cc \
        StoreSwapLogData.h \
-       Server.cc \
-       Server.h \
        swap_log_op.h \
        SwapDir.cc \
        SwapDir.h \
@@ -574,7 +505,6 @@ squid_SOURCES = \
        $(WINSVC_SOURCE)
 
 EXTRA_squid_SOURCES = \
-       $(AIO_WIN32_ALL_SOURCES) \
        $(all_AUTHMODULES) \
        ConfigOption.h \
        $(DELAY_POOL_ALL_SOURCE) \
@@ -592,7 +522,6 @@ EXTRA_squid_SOURCES = \
 
 noinst_HEADERS = \
        client_side_request.cci \
-       MemBuf.cci \
        MemBuf.h \
        StoreEntryStream.h \
        String.cci \
@@ -607,7 +536,6 @@ BUILT_SOURCES = \
        globals.cc \
        hier_code.cc \
        icp_opcode.cc \
-       LogTags.cc \
        lookup_t.cc \
        repl_modules.cc \
        swap_log_op.cc
@@ -615,7 +543,6 @@ BUILT_SOURCES = \
 CLEANFILES += $(BUILT_SOURCES)
 
 nodist_squid_SOURCES = \
-       $(DISKIO_GEN_SOURCE) \
        $(BUILT_SOURCES)
 
 squid_LDADD = \
@@ -624,33 +551,38 @@ squid_LDADD = \
        acl/libacls.la \
        acl/libstate.la \
        $(AUTH_LIBS) \
-       $(DISK_LIBS) \
        acl/libapi.la \
+       clients/libclients.la \
+       servers/libservers.la \
+       ftp/libftp.la \
+       helper/libhelper.la \
+       http/libsquid-http.la \
+       parser/libsquid-parser.la \
+       dns/libdns.la \
        base/libbase.la \
        libsquid.la \
        ip/libip.la \
        fs/libfs.la \
+       DiskIO/libdiskio.la \
        $(SSL_LIBS) \
        ipc/libipc.la \
        mgr/libmgr.la \
        anyp/libanyp.la \
+       security/libsecurity.la \
        comm/libcomm.la \
        eui/libeui.la \
-       http/libsquid-http.la \
        icmp/libicmp.la icmp/libicmp-core.la \
        log/liblog.la \
        format/libformat.la \
        $(XTRA_OBJS) \
        $(DISK_LINKOBJS) \
        $(REPL_OBJS) \
-       $(DISK_OS_LIBS) \
        $(NETTLELIB) \
        $(CRYPTLIB) \
-       $(REGEXLIB) \
        $(ADAPTATION_LIBS) \
        $(ESI_LIBS) \
        $(SNMP_LIBS) \
-       parser/libsquid-parser.la \
+       mem/libmem.la \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
@@ -660,27 +592,6 @@ squid_LDADD = \
        $(KRB5LIBS) \
        $(COMPAT_LIB) \
        $(XTRA_LIBS)
-squid_DEPENDENCIES = \
-       $(DISK_LIBS) \
-       $(DISK_LINKOBJS) \
-       $(REPL_OBJS) \
-       $(ADAPTATION_LIBS) \
-       $(ESI_LOCAL_LIBS) \
-       $(SSL_LIBS) \
-       $(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 \
-       format/libformat.la \
-       ipc/libipc.la \
-       mgr/libmgr.la
 
 if ENABLE_LOADABLE_MODULES
 squid_SOURCES += $(LOADABLE_MODULES_SOURCES)
@@ -720,7 +631,6 @@ recv_announce_SOURCES = recv-announce.cc
 ## SwapDir wants ConfigOption
 ## tools.cc wants ip/libip.la
 ## client_side.cc wants ip/libip.la
-## mem.cc wants ClientInfo.h
 ## libbase.la wants cbdata.*
 ## libbase.la wants MemBuf.*
 ufsdump_SOURCES = \
@@ -730,10 +640,8 @@ ufsdump_SOURCES = \
        debug.cc \
        int.h \
        int.cc \
-       Mem.h \
-       mem.cc \
+       mem/forward.h \
        MemBuf.cc \
-       MemBuf.cci \
        MemBuf.h \
        Parsing.h \
        store_key_md5.h \
@@ -746,9 +654,8 @@ ufsdump_SOURCES = \
        ufsdump.cc \
        dlink.h \
        dlink.cc \
-       HelperChildConfig.h \
+       helper/ChildConfig.h \
        tests/stub_HelperChildConfig.cc \
-       HttpRequestMethod.cc \
        RemovalPolicy.cc \
        $(WIN32_SOURCE) \
        fd.h \
@@ -769,7 +676,6 @@ ufsdump_LDADD = \
        $(REPL_OBJS) \
        $(NETTLELIB) \
        $(CRYPTLIB) \
-       $(REGEXLIB) \
        $(SSLLIB) \
        $(COMPAT_LIB) \
        $(EPOLL_LIBS) \
@@ -787,7 +693,7 @@ ufsdump_DEPENDENCIES = \
        fs/libfs.la \
        ipc/libipc.la \
        mgr/libmgr.la \
-       $(DISK_LIBS) \
+       DiskIO/libdiskio.la \
        $(DISK_LINKOBJS) \
        $(REPL_OBJS)
 
@@ -827,7 +733,6 @@ EXTRA_DIST = \
        cf_gen_defines \
        cf.data.pre \
        cf.data.depend \
-       DiskIO/modules.sh \
        mk-globals-c.pl \
        mk-globals-c.awk \
        mk-string-arrays.pl \
@@ -837,78 +742,6 @@ EXTRA_DIST = \
        mib.txt \
        mime.conf.default
 
-libAIO_a_SOURCES = \
-               $(AIO_WIN32_SOURCES) \
-               DiskIO/AIO/async_io.h \
-               DiskIO/AIO/AIODiskFile.cc \
-               DiskIO/AIO/AIODiskFile.h \
-               DiskIO/AIO/AIODiskIOStrategy.cc \
-               DiskIO/AIO/AIODiskIOStrategy.h \
-               DiskIO/AIO/AIODiskIOModule.cc \
-               DiskIO/AIO/AIODiskIOModule.h
-
-libBlocking_a_SOURCES = \
-               DiskIO/Blocking/BlockingFile.cc \
-               DiskIO/Blocking/BlockingFile.h \
-               DiskIO/Blocking/BlockingIOStrategy.cc \
-               DiskIO/Blocking/BlockingIOStrategy.h \
-               DiskIO/Blocking/BlockingDiskIOModule.cc \
-               DiskIO/Blocking/BlockingDiskIOModule.h 
-
-libMmapped_a_SOURCES = \
-               DiskIO/Mmapped/MmappedFile.cc \
-               DiskIO/Mmapped/MmappedFile.h \
-               DiskIO/Mmapped/MmappedIOStrategy.cc \
-               DiskIO/Mmapped/MmappedIOStrategy.h \
-               DiskIO/Mmapped/MmappedDiskIOModule.cc \
-               DiskIO/Mmapped/MmappedDiskIOModule.h 
-
-libIpcIo_a_SOURCES = \
-               DiskIO/IpcIo/IpcIoFile.cc \
-               DiskIO/IpcIo/IpcIoFile.h \
-               DiskIO/IpcIo/IpcIoIOStrategy.cc \
-               DiskIO/IpcIo/IpcIoIOStrategy.h \
-               DiskIO/IpcIo/IpcIoDiskIOModule.cc \
-               DiskIO/IpcIo/IpcIoDiskIOModule.h 
-
-libDiskDaemon_a_SOURCES = \
-               DiskIO/DiskDaemon/DiskdFile.cc \
-               DiskIO/DiskDaemon/DiskdFile.h \
-               DiskIO/DiskDaemon/DiskdIOStrategy.cc \
-               DiskIO/DiskDaemon/DiskdIOStrategy.h \
-               DiskIO/DiskDaemon/diomsg.h \
-               DiskIO/DiskDaemon/DiskDaemonDiskIOModule.cc \
-               DiskIO/DiskDaemon/DiskDaemonDiskIOModule.h \
-               DiskIO/DiskDaemon/DiskdAction.cc \
-               DiskIO/DiskDaemon/DiskdAction.h
-
-libDiskThreads_a_SOURCES = \
-               $(AIOPS_SOURCE) \
-               DiskIO/DiskThreads/async_io.cc \
-               DiskIO/DiskThreads/DiskThreads.h \
-               DiskIO/DiskThreads/DiskThreadsDiskFile.cc \
-               DiskIO/DiskThreads/DiskThreadsDiskFile.h \
-               DiskIO/DiskThreads/DiskThreadsDiskIOModule.cc \
-               DiskIO/DiskThreads/DiskThreadsDiskIOModule.h \
-               DiskIO/DiskThreads/DiskThreadsIOStrategy.cc \
-               DiskIO/DiskThreads/DiskThreadsIOStrategy.h
-
-EXTRA_libDiskThreads_a_SOURCES = \
-       DiskIO/DiskThreads/aiops.cc \
-       DiskIO/DiskThreads/aiops_win32.cc \
-       DiskIO/DiskThreads/CommIO.cc \
-       DiskIO/DiskThreads/CommIO.h
-
-DiskIO_DiskDaemon_diskd_SOURCES = DiskIO/DiskDaemon/diskd.cc
-nodist_DiskIO_DiskDaemon_diskd_SOURCES = time.cc
-DiskIO_DiskDaemon_diskd_LDADD = \
-       $(top_builddir)/lib/libmisccontainers.la \
-       $(top_builddir)/lib/libmiscencoding.la \
-       $(top_builddir)/lib/libmiscutil.la \
-       $(COMPAT_LIB) \
-       $(XTRA_LIBS)
-
-
 DEFAULT_HTTP_PORT      = 3128
 DEFAULT_ICP_PORT       = 3130
 DEFAULT_PREFIX         = $(prefix)
@@ -947,9 +780,6 @@ err_type.cc: err_type.h mk-string-arrays.awk
 err_detail_type.cc: err_detail_type.h mk-string-arrays.awk
        $(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/err_detail_type.h | sed 's/ERR_DETAIL_//' > $@ || ($(RM) -f $@ && exit 1)
 
-LogTags.cc: LogTags.h mk-string-arrays.awk
-       $(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/LogTags.h | sed 's/LOG_//' > $@ || ($(RM) -f $@ && exit 1)
-
 lookup_t.cc: lookup_t.h mk-string-arrays.awk
        $(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/lookup_t.h > $@ || ($(RM) -f $@ && exit 1)
 
@@ -1054,7 +884,6 @@ uninstall-local: squid.conf.default
        @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh "$(RM)" $(DESTDIR)$(DEFAULT_CONFIG_FILE) squid.conf.default
 
 CLEANFILES += cf.data squid.conf.default squid.conf.documented \
-       DiskIO/DiskIOModules_gen.cc \
        test_tools.cc *.a
 
 test_tools.cc: $(top_srcdir)/test-suite/test_tools.cc
@@ -1073,10 +902,11 @@ check_PROGRAMS+=\
        tests/testBoilerplate \
        tests/testCacheManager \
        tests/testDiskIO \
+       tests/testDns \
        tests/testEvent \
        tests/testEventLoop \
        tests/test_http_range \
-       tests/testHttpParser \
+       tests/testHttp1Parser \
        tests/testHttpReply \
        tests/testHttpRequest \
        tests/testStore \
@@ -1085,7 +915,8 @@ check_PROGRAMS+=\
        tests/testSBuf \
        tests/testSBufList \
        tests/testConfigParser \
-       tests/testStatHist
+       tests/testStatHist \
+       tests/testLookupTable
 
 if HAVE_FS_ROCK
 check_PROGRAMS += tests/testRock
@@ -1107,7 +938,6 @@ TESTS += $(check_PROGRAMS)
 #tests_testX_SOURCES=\
 #      tests/testX.h \
 #      tests/testX.cc \
-#      tests/testMain.cc \
 #      X.h \
 #      X.cc
 #nodist_tests_testX_SOURCES=\
@@ -1154,18 +984,12 @@ tests_testHttpReply_SOURCES=\
        HttpReply.h \
        MasterXaction.cc \
        MasterXaction.h \
-       Mem.h \
-       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) \
@@ -1190,6 +1014,7 @@ tests_testHttpReply_SOURCES=\
        tests/stub_libauth.cc \
        tests/stub_libcomm.cc \
        tests/stub_libmgr.cc \
+       tests/stub_libsecurity.cc \
        tests/stub_libsslsquid.cc \
        StatCounters.h \
        StatCounters.cc \
@@ -1203,7 +1028,6 @@ tests_testHttpReply_SOURCES=\
        tests/stub_HttpRequest.cc \
        tests/testHttpReply.cc \
        tests/testHttpReply.h \
-       tests/testMain.cc \
        tests/stub_time.cc \
        url.cc \
        wordlist.h \
@@ -1214,6 +1038,7 @@ tests_testHttpReply_LDFLAGS = $(LIBADD_DL)
 tests_testHttpReply_LDADD=\
        CommCalls.o \
        http/libsquid-http.la \
+       parser/libsquid-parser.la \
        acl/libacls.la \
        acl/libapi.la \
        acl/libstate.la \
@@ -1221,6 +1046,7 @@ tests_testHttpReply_LDADD=\
        ip/libip.la \
        base/libbase.la \
        ipc/libipc.la \
+       mem/libmem.la \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
@@ -1238,16 +1064,12 @@ tests_testACLMaxUserIP_SOURCES= \
        tests/stub_CollapsedForwarding.cc \
        ConfigOption.cc \
        ConfigParser.cc \
-       DiskIO/ReadRequest.cc \
-       DiskIO/WriteRequest.cc \
        tests/stub_ETag.cc \
        event.cc \
        fatal.h \
        tests/stub_fatal.cc \
        FileMap.h \
        filemap.cc \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
        HttpBody.cc \
        HttpHeader.h \
        HttpHeader.cc \
@@ -1263,7 +1085,6 @@ tests_testACLMaxUserIP_SOURCES= \
        HttpHdrSc.cc \
        HttpHdrScTarget.cc \
        HttpMsg.cc \
-       HttpRequestMethod.cc \
        int.h \
        int.cc \
        MasterXaction.cc \
@@ -1273,8 +1094,8 @@ tests_testACLMaxUserIP_SOURCES= \
        SquidList.h \
        SquidList.cc \
        mem_node.cc \
-       Packer.cc \
        Parsing.cc \
+       tests/stub_libsecurity.cc \
        SquidMath.cc \
        StatCounters.cc \
        StatCounters.h \
@@ -1307,7 +1128,6 @@ tests_testACLMaxUserIP_SOURCES= \
        tests/stub_client_side.cc \
        tests/stub_debug.cc \
        tests/stub_DelayId.cc \
-       tests/stub_DiskIOModule.cc \
        tests/stub_errorpage.cc \
        fd.h \
        tests/stub_fd.cc \
@@ -1316,6 +1136,7 @@ tests_testACLMaxUserIP_SOURCES= \
        tests/stub_ipc_TypedMsgHdr.cc \
        tests/stub_libauth.cc \
        tests/stub_libcomm.cc \
+       tests/stub_libdiskio.cc \
        tests/stub_libformat.cc \
        tests/stub_libsslsquid.cc \
        tests/stub_MemObject.cc \
@@ -1337,19 +1158,20 @@ tests_testACLMaxUserIP_SOURCES= \
        tests/stub_UdsOp.cc \
        tests/testACLMaxUserIP.cc \
        tests/testACLMaxUserIP.h \
-       tests/testMain.cc \
        tests/stub_time.cc \
        url.cc \
        URL.h \
-       Mem.h \
-       tests/stub_mem.cc \
+       tests/stub_libmem.cc \
        MemBuf.cc \
        wordlist.h \
        wordlist.cc
 nodist_tests_testACLMaxUserIP_SOURCES= \
        $(TESTSOURCES)
 tests_testACLMaxUserIP_LDADD= \
+       libsquid.la \
+       helper/libhelper.la \
        http/libsquid-http.la \
+       parser/libsquid-parser.la \
        $(AUTH_ACL_LIBS) \
        ident/libident.la \
        acl/libacls.la \
@@ -1358,16 +1180,13 @@ tests_testACLMaxUserIP_LDADD= \
        acl/libapi.la \
        anyp/libanyp.la \
        base/libbase.la \
-       libsquid.la \
        ip/libip.la \
        ipc/libipc.la \
        mgr/libmgr.la \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
-       $(DISK_OS_LIBS) \
        $(NETTLELIB) \
-       $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SSLLIB) \
        $(COMPAT_LIB) \
@@ -1380,7 +1199,6 @@ tests_testACLMaxUserIP_LDFLAGS = $(LIBADD_DL)
 ## involved in writing tests.
 tests_testBoilerplate_SOURCES = \
        tests/testBoilerplate.cc \
-       tests/testMain.cc \
        tests/testBoilerplate.h \
        tests/stub_debug.cc \
        tests/stub_time.cc
@@ -1402,18 +1220,12 @@ tests_testBoilerplate_DEPENDENCIES = \
 tests_testCacheManager_SOURCES = \
        AccessLogEntry.cc \
        debug.cc \
-       HttpParser.cc \
-       HttpParser.h \
        RequestFlags.h \
        RequestFlags.cc \
        HttpRequest.cc \
-       HttpRequestMethod.cc \
-       Mem.h \
-       tests/stub_mem.cc \
        String.cc \
        tests/testCacheManager.cc \
        tests/testCacheManager.h \
-       tests/testMain.cc \
        tests/stub_main_cc.cc \
        tests/stub_ipc_Forwarder.cc \
        tests/stub_store_stats.cc \
@@ -1427,12 +1239,13 @@ tests_testCacheManager_SOURCES = \
        YesNoNone.cc \
        RefreshPattern.h \
        cache_cf.cc \
+       CachePeer.cc \
+       CachePeer.h \
        CacheDigest.h \
        tests/stub_CacheDigest.cc \
        carp.h \
        tests/stub_carp.cc \
        cbdata.cc \
-       ChunkedCodingParser.cc \
        client_db.h \
        client_db.cc \
        client_side.h \
@@ -1449,7 +1262,6 @@ tests_testCacheManager_SOURCES = \
        CpuAffinitySet.cc \
        CpuAffinitySet.h \
        $(DELAY_POOL_SOURCE) \
-       $(DISKIO_SOURCE) \
        disk.h \
        disk.cc \
        dlink.h \
@@ -1469,22 +1281,12 @@ tests_testCacheManager_SOURCES = \
        filemap.cc \
        fqdncache.h \
        fqdncache.cc \
-       ftp.h \
-       ftp.cc \
-       FtpGatewayServer.h \
-       FtpGatewayServer.cc \
-       FtpServer.h \
-       FtpServer.cc \
        FwdState.cc \
        FwdState.h \
        gopher.h \
        gopher.cc \
        hier_code.h \
        helper.cc \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
-       HelperReply.cc \
-       HelperReply.h \
        $(HTCPSOURCE) \
        HttpStateFlags.h \
        http.cc \
@@ -1513,6 +1315,8 @@ tests_testCacheManager_SOURCES = \
        int.cc \
        internal.h \
        internal.cc \
+       LogTags.cc \
+       tests/stub_libsecurity.cc \
        SquidList.h \
        SquidList.cc \
        MasterXaction.cc \
@@ -1530,7 +1334,6 @@ tests_testCacheManager_SOURCES = \
        neighbors.cc \
        Notes.cc \
        Notes.h \
-       Packer.cc \
        Parsing.cc \
        pconn.cc \
        peer_digest.cc \
@@ -1548,7 +1351,6 @@ tests_testCacheManager_SOURCES = \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
-       Server.cc \
        $(SBUF_SOURCE) \
        SBufDetailedStats.h \
        tests/stub_SBufDetailedStats.cc \
@@ -1565,6 +1367,7 @@ tests_testCacheManager_SOURCES = \
        StrList.cc \
        tests/stub_libauth_acls.cc \
        tests/stub_libauth.cc \
+       tests/stub_libdiskio.cc \
        tests/stub_StatHist.cc \
        stmem.cc \
        repl_modules.h \
@@ -1608,17 +1411,22 @@ tests_testCacheManager_SOURCES = \
        wordlist.h \
        wordlist.cc
 nodist_tests_testCacheManager_SOURCES = \
-       $(BUILT_SOURCES) \
-       $(DISKIO_GEN_SOURCE)
+       $(BUILT_SOURCES)
 # comm.cc only requires comm/libcomm.la until fdc_table is dead.
 tests_testCacheManager_LDADD = \
+       libsquid.la \
+       clients/libclients.la \
+       servers/libservers.la \
+       ftp/libftp.la \
+       helper/libhelper.la \
        http/libsquid-http.la \
+       parser/libsquid-parser.la \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
        acl/libapi.la \
+       dns/libdns.la \
        base/libbase.la \
-       libsquid.la \
        ip/libip.la \
        fs/libfs.la \
        comm/libcomm.la \
@@ -1627,8 +1435,6 @@ tests_testCacheManager_LDADD = \
        log/liblog.la \
        format/libformat.la \
        $(REPL_OBJS) \
-       $(DISK_LIBS) \
-       $(DISK_OS_LIBS) \
        $(ADAPTATION_LIBS) \
        $(ESI_LIBS) \
        $(SSL_LIBS) \
@@ -1636,11 +1442,11 @@ tests_testCacheManager_LDADD = \
        ipc/libipc.la \
        mgr/libmgr.la \
        $(SNMP_LIBS) \
+       mem/libmem.la \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
        $(NETTLELIB) \
-       $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SQUID_CPPUNIT_LA) \
        $(SSLLIB) \
@@ -1662,7 +1468,6 @@ tests_testDiskIO_SOURCES = \
        ConfigOption.cc \
        ConfigParser.cc \
        $(DELAY_POOL_SOURCE) \
-       $(DISKIO_SOURCE) \
        disk.h \
        disk.cc \
        tests/stub_ETag.cc \
@@ -1693,7 +1498,6 @@ tests_testDiskIO_SOURCES = \
        HttpHeader.cc \
        HttpMsg.cc \
        HttpReply.cc \
-       HttpRequestMethod.cc \
        int.h \
        int.cc \
        SquidList.h \
@@ -1703,17 +1507,15 @@ tests_testDiskIO_SOURCES = \
        MemBuf.cc \
        MemObject.cc \
        mem_node.cc \
-       Mem.h \
-       tests/stub_mem.cc \
        Notes.h \
        Notes.cc \
-       Packer.cc \
        Parsing.cc \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
        RequestFlags.h \
        RequestFlags.cc \
+       tests/stub_libsecurity.cc \
        StatCounters.h \
        StatCounters.cc \
        StatHist.h \
@@ -1780,7 +1582,6 @@ tests_testDiskIO_SOURCES = \
        tests/stub_UdsOp.cc \
        tests/testDiskIO.cc \
        tests/testDiskIO.h \
-       tests/testMain.cc \
        tests/testStoreSupport.cc \
        tests/testStoreSupport.h \
        tests/stub_time.cc \
@@ -1793,37 +1594,36 @@ tests_testDiskIO_SOURCES = \
        tests/stub_tools.cc
 nodist_tests_testDiskIO_SOURCES= \
        $(TESTSOURCES) \
-       $(DISKIO_GEN_SOURCE) \
        SquidMath.cc \
        SquidMath.h \
        swap_log_op.cc
 tests_testDiskIO_LDADD = \
+       libsquid.la \
        http/libsquid-http.la \
+       parser/libsquid-parser.la \
        SquidConfig.o \
        CommCalls.o \
-       DnsLookupDetails.o \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
-       libsquid.la \
        comm/libcomm.la \
        ip/libip.la \
        fs/libfs.la \
        ipc/libipc.la \
        $(REPL_OBJS) \
-       $(DISK_LIBS) \
-       $(DISK_OS_LIBS) \
+       DiskIO/libdiskio.la \
        acl/libapi.la \
        anyp/libanyp.la \
        mgr/libmgr.la \
        $(SSL_LIBS) \
        ipc/libipc.la \
+       dns/libdns.la \
        base/libbase.la \
+       mem/libmem.la \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
        $(NETTLELIB) \
-       $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SSLLIB) \
        $(COMPAT_LIB) \
@@ -1831,11 +1631,27 @@ tests_testDiskIO_LDADD = \
 
 tests_testDiskIO_LDFLAGS = $(LIBADD_DL)
 tests_testDiskIO_DEPENDENCIES = \
-       $(DISK_LIBS) \
+       DiskIO/libdiskio.la \
        $(SWAP_TEST_DS) \
        $(SQUID_CPPUNIT_LA)
 
-## Tests of the Even module.
+tests_testDns_SOURCES= \
+       tests/testRFC1035.cc \
+       tests/testRFC1035.h
+nodist_tests_testDns_SOURCES= \
+       tests/stub_debug.cc \
+       tests/stub_SBuf.cc \
+       tests/stub_tools.cc
+tests_testDns_LDADD= \
+       dns/libdns.la \
+       base/libbase.la \
+       $(top_builddir)/lib/libmiscutil.la \
+       $(COMPAT_LIB) \
+       $(XTRA_LIBS) \
+       $(SQUID_CPPUNIT_LA) \
+       $(SQUID_CPPUNIT_LIBS)
+tests_testDns_LDFLAGS= $(LIBADD_DL)
+
 tests_testEvent_SOURCES = \
        AccessLogEntry.cc \
        BodyPipe.cc \
@@ -1847,11 +1663,12 @@ tests_testEvent_SOURCES = \
        YesNoNone.cc \
        RefreshPattern.h \
        cache_cf.cc \
+       CachePeer.cc \
+       CachePeer.h \
        cache_manager.cc \
        carp.h \
        tests/stub_carp.cc \
        cbdata.cc \
-       ChunkedCodingParser.cc \
        client_db.h \
        client_db.cc \
        client_side.h \
@@ -1869,7 +1686,6 @@ tests_testEvent_SOURCES = \
        CpuAffinitySet.h \
        debug.cc \
        $(DELAY_POOL_SOURCE) \
-       $(DISKIO_SOURCE) \
        disk.h \
        disk.cc \
        dlink.h \
@@ -1892,21 +1708,11 @@ tests_testEvent_SOURCES = \
        filemap.cc \
        fqdncache.h \
        fqdncache.cc \
-       ftp.h \
-       ftp.cc \
-       FtpGatewayServer.h \
-       FtpGatewayServer.cc \
-       FtpServer.h \
-       FtpServer.cc \
        FwdState.cc \
        FwdState.h \
        gopher.h \
        gopher.cc \
        helper.cc \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
-       HelperReply.cc \
-       HelperReply.h \
        hier_code.h \
        $(HTCPSOURCE) \
        http.cc \
@@ -1926,15 +1732,12 @@ tests_testEvent_SOURCES = \
        HttpHdrSc.cc \
        HttpHdrScTarget.cc \
        HttpMsg.cc \
-       HttpParser.cc \
-       HttpParser.h \
        HttpReply.cc \
        PeerPoolMgr.h \
        PeerPoolMgr.cc \
        RequestFlags.h \
        RequestFlags.cc \
        HttpRequest.cc \
-       HttpRequestMethod.cc \
        icp_v2.cc \
        icp_v3.cc \
        $(IPC_SOURCE) \
@@ -1943,12 +1746,13 @@ tests_testEvent_SOURCES = \
        int.cc \
        internal.h \
        internal.cc \
+       LogTags.cc \
+       tests/stub_libsecurity.cc \
        SquidList.h \
        SquidList.cc \
        MasterXaction.cc \
        MasterXaction.h \
-       Mem.h \
-       tests/stub_mem.cc \
+       tests/stub_libmem.cc \
        mem_node.cc \
        MemBuf.cc \
        MemObject.cc \
@@ -1962,7 +1766,6 @@ tests_testEvent_SOURCES = \
        neighbors.cc \
        Notes.cc \
        Notes.h \
-       Packer.cc \
        Parsing.cc \
        pconn.cc \
        peer_digest.cc \
@@ -1978,7 +1781,6 @@ tests_testEvent_SOURCES = \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
-       Server.cc \
        StrList.h \
        StrList.cc \
        $(SBUF_SOURCE) \
@@ -2022,11 +1824,11 @@ tests_testEvent_SOURCES = \
        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_libdiskio.cc \
        tests/stub_libeui.cc \
        tests/stub_store_stats.cc \
        time.cc \
@@ -2047,16 +1849,21 @@ tests_testEvent_SOURCES = \
        wordlist.h \
        wordlist.cc
 nodist_tests_testEvent_SOURCES = \
-       $(BUILT_SOURCES) \
-       $(DISKIO_GEN_SOURCE)
+       $(BUILT_SOURCES)
 tests_testEvent_LDADD = \
+       libsquid.la \
+       clients/libclients.la \
+       servers/libservers.la \
+       ftp/libftp.la \
+       helper/libhelper.la \
        http/libsquid-http.la \
+       parser/libsquid-parser.la \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
        acl/libapi.la \
+       dns/libdns.la \
        base/libbase.la \
-       libsquid.la \
        ip/libip.la \
        fs/libfs.la \
        anyp/libanyp.la \
@@ -2071,13 +1878,10 @@ tests_testEvent_LDADD = \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
-       $(DISK_LIBS) \
-       $(DISK_OS_LIBS) \
        ipc/libipc.la \
        mgr/libmgr.la \
        $(SNMP_LIBS) \
        $(NETTLELIB) \
-       $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SQUID_CPPUNIT_LA) \
        $(SSLLIB) \
@@ -2102,10 +1906,11 @@ tests_testEventLoop_SOURCES = \
        YesNoNone.cc \
        RefreshPattern.h \
        cache_cf.cc \
+       CachePeer.cc \
+       CachePeer.h \
        carp.h \
        tests/stub_carp.cc \
        cbdata.cc \
-       ChunkedCodingParser.cc \
        client_db.h \
        client_db.cc \
        client_side.h \
@@ -2123,7 +1928,6 @@ tests_testEventLoop_SOURCES = \
        CpuAffinitySet.h \
        debug.cc \
        $(DELAY_POOL_SOURCE) \
-       $(DISKIO_SOURCE) \
        disk.h \
        disk.cc \
        dlink.h \
@@ -2146,21 +1950,11 @@ tests_testEventLoop_SOURCES = \
        filemap.cc \
        fqdncache.h \
        fqdncache.cc \
-       ftp.h \
-       ftp.cc \
-       FtpGatewayServer.h \
-       FtpGatewayServer.cc \
-       FtpServer.h \
-       FtpServer.cc \
        FwdState.cc \
        FwdState.h \
        gopher.h \
        gopher.cc \
        helper.cc \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
-       HelperReply.cc \
-       HelperReply.h \
        hier_code.h \
        $(HTCPSOURCE) \
        http.cc \
@@ -2180,15 +1974,12 @@ tests_testEventLoop_SOURCES = \
        HttpHdrSc.cc \
        HttpHdrScTarget.cc \
        HttpMsg.cc \
-       HttpParser.cc \
-       HttpParser.h \
        HttpReply.cc \
        PeerPoolMgr.h \
        PeerPoolMgr.cc \
        RequestFlags.h \
        RequestFlags.cc \
        HttpRequest.cc \
-       HttpRequestMethod.cc \
        icp_v2.cc \
        icp_v3.cc \
        $(IPC_SOURCE) \
@@ -2197,14 +1988,14 @@ tests_testEventLoop_SOURCES = \
        int.cc \
        internal.h \
        internal.cc \
+       LogTags.cc \
        SquidList.h \
        SquidList.cc \
        MasterXaction.cc \
        MasterXaction.h \
        MemBuf.cc \
        MemObject.cc \
-       Mem.h \
-       tests/stub_mem.cc \
+       tests/stub_libmem.cc \
        mem_node.cc \
        mime.h \
        mime.cc \
@@ -2216,7 +2007,6 @@ tests_testEventLoop_SOURCES = \
        neighbors.cc \
        Notes.cc \
        Notes.h \
-       Packer.cc \
        Parsing.cc \
        pconn.cc \
        peer_digest.cc \
@@ -2232,7 +2022,6 @@ tests_testEventLoop_SOURCES = \
        tests/stub_redirect.cc \
        refresh.h \
        refresh.cc \
-       Server.cc \
        $(SBUF_SOURCE) \
        SBufDetailedStats.h \
        tests/stub_SBufDetailedStats.cc \
@@ -2246,7 +2035,6 @@ tests_testEventLoop_SOURCES = \
        StatCounters.cc \
        StatHist.h \
        StatHist.cc \
-       Mem.h \
        stmem.cc \
        repl_modules.h \
        store.cc \
@@ -2276,12 +2064,13 @@ tests_testEventLoop_SOURCES = \
        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_libdiskio.cc \
        tests/stub_libeui.cc \
+       tests/stub_libsecurity.cc \
        tests/stub_store_stats.cc \
        time.cc \
        tools.h \
@@ -2301,16 +2090,21 @@ tests_testEventLoop_SOURCES = \
        wordlist.h \
        wordlist.cc
 nodist_tests_testEventLoop_SOURCES = \
-       $(BUILT_SOURCES) \
-       $(DISKIO_GEN_SOURCE)
+       $(BUILT_SOURCES)
 tests_testEventLoop_LDADD = \
+       libsquid.la \
+       clients/libclients.la \
+       servers/libservers.la \
+       ftp/libftp.la \
+       helper/libhelper.la \
        http/libsquid-http.la \
+       parser/libsquid-parser.la \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
        acl/libapi.la \
+       dns/libdns.la \
        base/libbase.la \
-       libsquid.la \
        ip/libip.la \
        fs/libfs.la \
        anyp/libanyp.la \
@@ -2325,13 +2119,10 @@ tests_testEventLoop_LDADD = \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
-       $(DISK_LIBS) \
-       $(DISK_OS_LIBS) \
        ipc/libipc.la \
        mgr/libmgr.la \
        $(SNMP_LIBS) \
        $(NETTLELIB) \
-       $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SQUID_CPPUNIT_LA) \
        $(SSLLIB) \
@@ -2352,13 +2143,14 @@ tests_test_http_range_SOURCES = \
        YesNoNone.cc \
        RefreshPattern.h \
        cache_cf.cc \
+       CachePeer.cc \
+       CachePeer.h \
        cache_manager.cc \
        CacheDigest.h \
        tests/stub_CacheDigest.cc \
        carp.h \
        tests/stub_carp.cc \
        cbdata.cc \
-       ChunkedCodingParser.cc \
        client_db.h \
        client_db.cc \
        client_side.h \
@@ -2376,7 +2168,6 @@ tests_test_http_range_SOURCES = \
        CpuAffinitySet.h \
        debug.cc \
        $(DELAY_POOL_SOURCE) \
-       $(DISKIO_SOURCE) \
        disk.h \
        disk.cc \
        dlink.h \
@@ -2396,21 +2187,11 @@ tests_test_http_range_SOURCES = \
        filemap.cc \
        fqdncache.h \
        fqdncache.cc \
-       ftp.h \
-       ftp.cc \
-       FtpGatewayServer.h \
-       FtpGatewayServer.cc \
-       FtpServer.h \
-       FtpServer.cc \
        FwdState.cc \
        FwdState.h \
        gopher.h \
        gopher.cc \
        helper.cc \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
-       HelperReply.cc \
-       HelperReply.h \
        hier_code.h \
        $(HTCPSOURCE) \
        http.cc \
@@ -2430,15 +2211,12 @@ tests_test_http_range_SOURCES = \
        HttpHeaderTools.h \
        HttpHeaderTools.cc \
        HttpMsg.cc \
-       HttpParser.cc \
-       HttpParser.h \
        HttpReply.cc \
        PeerPoolMgr.h \
        PeerPoolMgr.cc \
        RequestFlags.h \
        RequestFlags.cc \
        HttpRequest.cc \
-       HttpRequestMethod.cc \
        icp_v2.cc \
        icp_v3.cc \
        int.h \
@@ -2447,14 +2225,14 @@ tests_test_http_range_SOURCES = \
        internal.cc \
        $(IPC_SOURCE) \
        ipcache.cc \
+       LogTags.cc \
        SquidList.h \
        SquidList.cc \
        MasterXaction.cc \
        MasterXaction.h \
        MemBuf.cc \
        MemObject.cc \
-       Mem.h \
-       tests/stub_mem.cc \
+       tests/stub_libmem.cc \
        mem_node.cc \
        mime.h \
        mime.cc \
@@ -2466,7 +2244,6 @@ tests_test_http_range_SOURCES = \
        neighbors.cc \
        Notes.cc \
        Notes.h \
-       Packer.cc \
        Parsing.cc \
        peer_digest.cc \
        peer_proxy_negotiate_auth.h \
@@ -2482,7 +2259,6 @@ tests_test_http_range_SOURCES = \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
-       Server.cc \
        $(SBUF_SOURCE) \
        SBufDetailedStats.h \
        tests/stub_SBufDetailedStats.cc \
@@ -2527,7 +2303,9 @@ tests_test_http_range_SOURCES = \
        tests/test_http_range.cc \
        tests/stub_external_acl.cc \
        tests/stub_ipc_Forwarder.cc \
+       tests/stub_libdiskio.cc \
        tests/stub_libeui.cc \
+       tests/stub_libsecurity.cc \
        tests/stub_main_cc.cc \
        tests/stub_MemStore.cc \
        tests/stub_store_stats.cc \
@@ -2548,15 +2326,20 @@ tests_test_http_range_SOURCES = \
        wordlist.h \
        wordlist.cc
 nodist_tests_test_http_range_SOURCES = \
-       $(BUILT_SOURCES) \
-       $(DISKIO_GEN_SOURCE)
+       $(BUILT_SOURCES)
 tests_test_http_range_LDADD = \
+       libsquid.la \
+       clients/libclients.la \
+       servers/libservers.la \
+       ftp/libftp.la \
+       helper/libhelper.la \
        http/libsquid-http.la \
+       parser/libsquid-parser.la \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
        acl/libapi.la \
-       libsquid.la \
+       parser/libsquid-parser.la \
        ip/libip.la \
        fs/libfs.la \
        anyp/libanyp.la \
@@ -2565,12 +2348,11 @@ tests_test_http_range_LDADD = \
        log/liblog.la \
        format/libformat.la \
        $(REPL_OBJS) \
-       $(DISK_LIBS) \
-       $(DISK_OS_LIBS) \
        $(ADAPTATION_LIBS) \
        $(ESI_LIBS) \
        $(SSL_LIBS) \
        ipc/libipc.la \
+       dns/libdns.la \
        base/libbase.la \
        mgr/libmgr.la \
        $(SNMP_LIBS) \
@@ -2578,7 +2360,6 @@ tests_test_http_range_LDADD = \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
        $(NETTLELIB) \
-       $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SQUID_CPPUNIT_LA) \
        $(SSLLIB) \
@@ -2589,15 +2370,14 @@ tests_test_http_range_LDFLAGS = $(LIBADD_DL)
 tests_test_http_range_DEPENDENCIES = \
        $(SQUID_CPPUNIT_LA)
 
-tests_testHttpParser_SOURCES = \
+tests_testHttp1Parser_SOURCES = \
        Debug.h \
-       HttpParser.cc \
-       HttpParser.h \
        MemBuf.cc \
        MemBuf.h \
        tests/stub_MemObject.cc \
-       Mem.h \
-       tests/stub_mem.cc \
+       tests/stub_libmem.cc \
+       mime_header.cc \
+       mime_header.h \
        String.cc \
        cache_cf.h \
        YesNoNone.h \
@@ -2610,21 +2390,23 @@ tests_testHttpParser_SOURCES = \
        tests/stub_debug.cc \
        tests/stub_event.cc \
        tests/stub_HelperChildConfig.cc \
+       tests/stub_libsecurity.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 \
+       tests/testHttp1Parser.cc \
+       tests/testHttp1Parser.h \
        tests/stub_time.cc \
        wordlist.h \
        wordlist.cc
-nodist_tests_testHttpParser_SOURCES = \
+nodist_tests_testHttp1Parser_SOURCES = \
        $(TESTSOURCES)
-tests_testHttpParser_LDADD= \
+tests_testHttp1Parser_LDADD= \
        http/libsquid-http.la \
+       parser/libsquid-parser.la \
+       anyp/libanyp.la \
        SquidConfig.o \
        base/libbase.la \
        ip/libip.la \
@@ -2632,31 +2414,26 @@ tests_testHttpParser_LDADD= \
        $(SQUID_CPPUNIT_LIBS) \
        $(COMPAT_LIB) \
        $(XTRA_LIBS)
-tests_testHttpParser_LDFLAGS = $(LIBADD_DL)
-tests_testHttpParser_DEPENDENCIES = \
+tests_testHttp1Parser_LDFLAGS = $(LIBADD_DL)
+tests_testHttp1Parser_DEPENDENCIES = \
        $(SQUID_CPPUNIT_LA)
 
 ## Tests of the HttpRequest module.
 tests_testHttpRequest_SOURCES = \
        AccessLogEntry.cc \
-       HttpParser.cc \
-       HttpParser.h \
        RequestFlags.h \
        RequestFlags.cc \
        HttpRequest.cc \
-       HttpRequestMethod.cc \
-       Mem.h \
-       tests/stub_mem.cc \
+       tests/stub_libmem.cc \
        String.cc \
        tests/testHttpRequest.h \
        tests/testHttpRequest.cc \
        tests/testHttpRequestMethod.h \
        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_libdiskio.cc \
        tests/stub_libeui.cc \
        tests/stub_store_stats.cc \
        tests/stub_EventLoop.cc \
@@ -2672,10 +2449,11 @@ tests_testHttpRequest_SOURCES = \
        debug.cc \
        CacheDigest.h \
        tests/stub_CacheDigest.cc \
+       CachePeer.cc \
+       CachePeer.h \
        carp.h \
        tests/stub_carp.cc \
        cbdata.cc \
-       ChunkedCodingParser.cc \
        client_db.h \
        client_db.cc \
        client_side.h \
@@ -2708,21 +2486,11 @@ tests_testHttpRequest_SOURCES = \
        fde.cc \
        fqdncache.h \
        fqdncache.cc \
-       ftp.h \
-       ftp.cc \
-       FtpGatewayServer.h \
-       FtpGatewayServer.cc \
-       FtpServer.h \
-       FtpServer.cc \
        FwdState.cc \
        FwdState.h \
        gopher.h \
        gopher.cc \
        helper.cc \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
-       HelperReply.cc \
-       HelperReply.h \
        hier_code.h \
        $(HTCPSOURCE) \
        http.cc \
@@ -2751,6 +2519,8 @@ tests_testHttpRequest_SOURCES = \
        int.cc \
        internal.h \
        internal.cc \
+       LogTags.cc \
+       tests/stub_libsecurity.cc \
        SquidList.h \
        SquidList.cc \
        MasterXaction.cc \
@@ -2768,7 +2538,6 @@ tests_testHttpRequest_SOURCES = \
        neighbors.cc \
        Notes.cc \
        Notes.h \
-       Packer.cc \
        Parsing.cc \
        pconn.cc \
        peer_digest.cc \
@@ -2787,7 +2556,6 @@ tests_testHttpRequest_SOURCES = \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
-       Server.cc \
        $(SBUF_SOURCE) \
        SBufDetailedStats.h \
        tests/stub_SBufDetailedStats.cc \
@@ -2847,15 +2615,23 @@ tests_testHttpRequest_SOURCES = \
 nodist_tests_testHttpRequest_SOURCES = \
        $(BUILT_SOURCES)
 tests_testHttpRequest_LDADD = \
+       libsquid.la \
+       clients/libclients.la \
+       servers/libservers.la \
+       helper/libhelper.la \
+       ftp/libftp.la \
+       http/libsquid-http.la \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
        acl/libapi.la \
-       libsquid.la \
+       parser/libsquid-parser.la \
        ip/libip.la \
        fs/libfs.la \
        $(SSL_LIBS) \
        ipc/libipc.la \
+       parser/libsquid-parser.la \
+       dns/libdns.la \
        base/libbase.la \
        mgr/libmgr.la \
        anyp/libanyp.la \
@@ -2864,16 +2640,13 @@ tests_testHttpRequest_LDADD = \
        comm/libcomm.la \
        log/liblog.la \
        format/libformat.la \
-       http/libsquid-http.la \
        $(REPL_OBJS) \
        $(ADAPTATION_LIBS) \
        $(ESI_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) \
        $(SSLLIB) \
@@ -2898,8 +2671,6 @@ tests_testStore_SOURCES= \
        $(DELAY_POOL_SOURCE) \
        disk.h \
        disk.cc \
-       DiskIO/ReadRequest.cc \
-       DiskIO/WriteRequest.cc \
        ETag.cc \
        event.cc \
        EventLoop.cc \
@@ -2921,7 +2692,6 @@ tests_testStore_SOURCES= \
        HttpHeader.h \
        HttpHeader.cc \
        HttpMsg.cc \
-       HttpRequestMethod.cc \
        RequestFlags.cc \
        RequestFlags.h \
        int.h \
@@ -2930,14 +2700,11 @@ tests_testStore_SOURCES= \
        SquidList.cc \
        MasterXaction.cc \
        MasterXaction.h \
-       Mem.h \
-       tests/stub_mem.cc \
        mem_node.cc \
        MemBuf.cc \
        MemObject.cc \
        Notes.h \
        Notes.cc \
-       Packer.cc \
        Parsing.cc \
        RemovalPolicy.cc \
        refresh.h \
@@ -2976,7 +2743,6 @@ tests_testStore_SOURCES= \
        tests/stub_client_side_request.cc \
        tests/stub_comm.cc \
        tests/stub_debug.cc \
-       tests/stub_DiskIOModule.cc \
        tests/stub_errorpage.cc \
        fd.h \
        fde.h \
@@ -2986,7 +2752,9 @@ tests_testStore_SOURCES= \
        tests/stub_http.cc \
        tests/stub_libauth.cc \
        tests/stub_libeui.cc \
+       tests/stub_libdiskio.cc \
        tests/stub_libformat.cc \
+       tests/stub_libsecurity.cc \
        tests/stub_libsslsquid.cc \
        HttpBody.h \
        HttpBody.cc \
@@ -3007,7 +2775,6 @@ tests_testStore_SOURCES= \
        Transients.cc \
        tests/stub_tools.cc \
        tests/stub_UdsOp.cc \
-       tests/testMain.cc \
        tests/testStore.cc \
        tests/testStore.h \
        tests/testStoreEntryStream.cc \
@@ -3032,27 +2799,29 @@ nodist_tests_testStore_SOURCES= \
        swap_log_op.cc
 
 tests_testStore_LDADD= \
+       libsquid.la \
        http/libsquid-http.la \
+       parser/libsquid-parser.la \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
        acl/libapi.la \
+       dns/libdns.la \
        base/libbase.la \
-       libsquid.la \
        ip/libip.la \
        fs/libfs.la \
        mgr/libmgr.la \
        ipc/libipc.la \
        anyp/libanyp.la \
+       mem/libmem.la \
+       DiskIO/libdiskio.la \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
        $(NETTLELIB) \
-       $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SSLLIB) \
        CommCalls.o \
-       DnsLookupDetails.o \
        $(COMPAT_LIB) \
        $(XTRA_LIBS)
 tests_testStore_LDFLAGS = $(LIBADD_DL)
@@ -3064,20 +2833,19 @@ tests_testStore_DEPENDENCIES = \
 ## libsquid pulls in SquidConfig and children. stub them.
 tests_testString_SOURCES = \
        ClientInfo.h \
-       Mem.h \
-       tests/stub_mem.cc \
+       tests/stub_libmem.cc \
        MemBuf.cc \
        String.cc \
        $(SBUF_SOURCE) \
        SBufDetailedStats.h \
        tests/stub_SBufDetailedStats.cc \
-       tests/testMain.cc \
        tests/testString.cc \
        tests/testString.h \
        cache_cf.h \
        YesNoNone.h \
        tests/stub_cache_cf.cc \
        tests/stub_cache_manager.cc \
+       tests/stub_cbdata.cc \
        tests/stub_debug.cc \
        tests/stub_HelperChildConfig.cc \
        tools.h \
@@ -3092,7 +2860,6 @@ tests_testString_LDADD = \
        libsquid.la \
        ip/libip.la \
        $(top_builddir)/lib/libmiscutil.la \
-       $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SSLLIB) \
        $(COMPAT_LIB) \
@@ -3103,7 +2870,6 @@ tests_testString_DEPENDENCIES = \
 
 SWAP_TEST_DS =\
        repl_modules.o \
-       $(DISK_LIBS) \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
@@ -3112,6 +2878,7 @@ SWAP_TEST_DS =\
        libsquid.la \
        ip/libip.la \
        fs/libfs.la \
+       DiskIO/libdiskio.la \
        ipc/libipc.la \
        mgr/libmgr.la \
        $(REPL_OBJS) \
@@ -3119,7 +2886,6 @@ SWAP_TEST_DS =\
 
 tests_testUfs_SOURCES = \
        tests/testUfs.cc \
-       tests/testMain.cc \
        tests/testUfs.h \
        tests/stub_cache_manager.cc \
        tests/stub_client_db.cc \
@@ -3138,6 +2904,7 @@ tests_testUfs_SOURCES = \
        internal.h \
        tests/stub_internal.cc \
        tests/stub_libformat.cc \
+       tests/stub_libsecurity.cc \
        tests/stub_stat.cc \
        store_rebuild.h \
        tests/stub_store_rebuild.cc \
@@ -3189,7 +2956,6 @@ tests_testUfs_SOURCES = \
        store_dir.cc \
        repl_modules.h \
        store.cc \
-       HttpRequestMethod.cc \
        store_key_md5.h \
        store_key_md5.cc \
        Parsing.cc \
@@ -3218,12 +2984,9 @@ tests_testUfs_SOURCES = \
        HttpHeaderTools.cc \
        HttpHeader.h \
        HttpHeader.cc \
-       Mem.h \
-       mem.cc \
        ClientInfo.h \
        MemBuf.cc \
        HttpHdrContRange.cc \
-       Packer.cc \
        HttpHeaderFieldStat.h \
        HttpHdrCc.h \
        HttpHdrCc.cc \
@@ -3252,19 +3015,17 @@ tests_testUfs_SOURCES = \
        tests/testStoreSupport.h \
        time.cc \
        wordlist.h \
-       wordlist.cc \
-       $(DISKIO_SOURCE)
+       wordlist.cc
 
 nodist_tests_testUfs_SOURCES = \
        $(TESTSOURCES) \
-       $(DISKIO_GEN_SOURCE) \
        SquidMath.cc \
        SquidMath.h \
        swap_log_op.cc
 tests_testUfs_LDADD = \
        http/libsquid-http.la \
+       parser/libsquid-parser.la \
        CommCalls.o \
-       DnsLookupDetails.o \
        ident/libident.la \
        acl/libacls.la \
        acl/libstate.la \
@@ -3275,20 +3036,20 @@ tests_testUfs_LDADD = \
        mgr/libmgr.la \
        $(REPL_OBJS) \
        acl/libacls.la \
-       $(DISK_LIBS) \
-       $(DISK_OS_LIBS) \
+       DiskIO/libdiskio.la \
        acl/libapi.la \
        $(SSL_LIBS) \
        ipc/libipc.la \
        comm/libcomm.la \
        anyp/libanyp.la \
+       dns/libdns.la \
        base/libbase.la \
        ip/libip.la \
+       mem/libmem.la \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
        $(NETTLELIB) \
-       $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SSLLIB) \
        $(COMPAT_LIB) \
@@ -3347,21 +3108,17 @@ tests_testRock_SOURCES = \
        HttpHeaderTools.cc \
        HttpMsg.cc \
        HttpReply.cc \
-       HttpRequestMethod.cc \
        int.h \
        int.cc \
        SquidList.h \
        SquidList.cc \
        MasterXaction.cc \
        MasterXaction.h \
-       Mem.h \
-       mem.cc \
        MemBuf.cc \
        MemObject.cc \
        mem_node.cc \
        Notes.h \
        Notes.cc \
-       Packer.cc \
        Parsing.cc \
        RemovalPolicy.cc \
        RequestFlags.cc \
@@ -3395,7 +3152,6 @@ tests_testRock_SOURCES = \
        Transients.h \
        Transients.cc \
        tests/testRock.cc \
-       tests/testMain.cc \
        tests/testRock.h \
        tests/testStoreSupport.cc \
        tests/testStoreSupport.h \
@@ -3421,6 +3177,7 @@ tests_testRock_SOURCES = \
        tests/stub_libformat.cc \
        tests/stub_libicmp.cc \
        tests/stub_libmgr.cc \
+       tests/stub_libsecurity.cc \
        tests/stub_MemStore.cc \
        mime.h \
        tests/stub_mime.cc \
@@ -3438,24 +3195,22 @@ tests_testRock_SOURCES = \
        wordlist.h \
        wordlist.cc \
        $(DELAY_POOL_SOURCE) \
-       $(DISKIO_SOURCE) \
        $(UNLINKDSOURCE)
 nodist_tests_testRock_SOURCES = \
-       $(DISKIO_GEN_SOURCE) \
        swap_log_op.cc \
        SquidMath.cc \
        SquidMath.h \
        $(TESTSOURCES)
 tests_testRock_LDADD = \
        http/libsquid-http.la \
+       parser/libsquid-parser.la \
        libsquid.la \
        comm/libcomm.la \
        ip/libip.la \
        fs/libfs.la \
        $(COMMON_LIBS) \
        $(REPL_OBJS) \
-       $(DISK_LIBS) \
-       $(DISK_OS_LIBS) \
+       DiskIO/libdiskio.la \
        acl/libacls.la \
        acl/libapi.la \
        acl/libstate.la \
@@ -3464,11 +3219,11 @@ tests_testRock_LDADD = \
        $(SSL_LIBS) \
        ipc/libipc.la \
        base/libbase.la \
+       mem/libmem.la \
        $(top_builddir)/lib/libmisccontainers.la \
        $(top_builddir)/lib/libmiscencoding.la \
        $(top_builddir)/lib/libmiscutil.la \
        $(NETTLELIB) \
-       $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SSLLIB) \
        $(COMPAT_LIB) \
@@ -3491,10 +3246,11 @@ tests_testURL_SOURCES = \
        tests/stub_cache_manager.cc \
        CacheDigest.h \
        tests/stub_CacheDigest.cc \
+       CachePeer.cc \
+       CachePeer.h \
        carp.h \
        tests/stub_carp.cc \
        cbdata.cc \
-       ChunkedCodingParser.cc \
        client_db.h \
        client_db.cc \
        client_side.h \
@@ -3513,8 +3269,6 @@ tests_testURL_SOURCES = \
        $(DELAY_POOL_SOURCE) \
        disk.h \
        disk.cc \
-       DiskIO/ReadRequest.cc \
-       DiskIO/WriteRequest.cc \
        dlink.h \
        dlink.cc \
        $(DNSSOURCE) \
@@ -3532,21 +3286,11 @@ tests_testURL_SOURCES = \
        filemap.cc \
        fqdncache.h \
        fqdncache.cc \
-       ftp.h \
-       ftp.cc \
-       FtpGatewayServer.h \
-       FtpGatewayServer.cc \
-       FtpServer.h \
-       FtpServer.cc \
        FwdState.cc \
        FwdState.h \
        gopher.h \
        gopher.cc \
        helper.cc \
-       HelperChildConfig.h \
-       HelperChildConfig.cc \
-       HelperReply.cc \
-       HelperReply.h \
        hier_code.h \
        $(HTCPSOURCE) \
        http.cc \
@@ -3566,15 +3310,12 @@ tests_testURL_SOURCES = \
        HttpHeaderTools.h \
        HttpHeaderTools.cc \
        HttpMsg.cc \
-       HttpParser.cc \
-       HttpParser.h \
        HttpReply.cc \
        PeerPoolMgr.h \
        PeerPoolMgr.cc \
        RequestFlags.h \
        RequestFlags.cc \
        HttpRequest.cc \
-       HttpRequestMethod.cc \
        icp_v2.cc \
        icp_v3.cc \
        $(IPC_SOURCE) \
@@ -3583,14 +3324,14 @@ tests_testURL_SOURCES = \
        int.cc \
        internal.h \
        internal.cc \
+       LogTags.cc \
        SquidList.h \
        SquidList.cc \
        MasterXaction.cc \
        MasterXaction.h \
        multicast.h \
        multicast.cc \
-       Mem.h \
-       tests/stub_mem.cc \
+       tests/stub_libmem.cc \
        mem_node.cc \
        MemBuf.cc \
        MemObject.cc \
@@ -3602,7 +3343,6 @@ tests_testURL_SOURCES = \
        neighbors.cc \
        Notes.h \
        Notes.cc \
-       Packer.cc \
        Parsing.cc \
        pconn.cc \
        peer_digest.cc \
@@ -3618,7 +3358,6 @@ tests_testURL_SOURCES = \
        refresh.h \
        refresh.cc \
        RemovalPolicy.cc \
-       Server.cc \
        $(SBUF_SOURCE) \
        SBufDetailedStats.h \
        tests/stub_SBufDetailedStats.cc \
@@ -3662,9 +3401,10 @@ tests_testURL_SOURCES = \
        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_libdiskio.cc \
+       tests/stub_libsecurity.cc \
        tests/stub_main_cc.cc \
        tests/stub_ipc_Forwarder.cc \
        tests/stub_store_stats.cc \
@@ -3672,7 +3412,6 @@ tests_testURL_SOURCES = \
        tests/testURL.h \
        tests/testUriScheme.cc \
        tests/testUriScheme.h \
-       tests/testMain.cc \
        tests/stub_time.cc \
        tests/stub_EventLoop.cc \
        tools.h \
@@ -3692,15 +3431,21 @@ tests_testURL_SOURCES = \
 nodist_tests_testURL_SOURCES = \
        $(BUILT_SOURCES)
 tests_testURL_LDADD = \
+       libsquid.la \
+       clients/libclients.la \
+       servers/libservers.la \
+       helper/libhelper.la \
        http/libsquid-http.la \
+       ftp/libftp.la \
+       parser/libsquid-parser.la \
        anyp/libanyp.la \
        ident/libident.la \
        acl/libacls.la \
        eui/libeui.la \
        acl/libstate.la \
        acl/libapi.la \
+       dns/libdns.la \
        base/libbase.la \
-       libsquid.la \
        ip/libip.la \
        fs/libfs.la \
        $(SSL_LIBS) \
@@ -3710,9 +3455,7 @@ tests_testURL_LDADD = \
        icmp/libicmp.la icmp/libicmp-core.la \
        comm/libcomm.la \
        log/liblog.la \
-       $(DISK_OS_LIBS) \
        format/libformat.la \
-       $(REGEXLIB) \
        $(REPL_OBJS) \
        $(ADAPTATION_LIBS) \
        $(ESI_LIBS) \
@@ -3735,7 +3478,6 @@ tests_testURL_DEPENDENCIES = \
 tests_testSBuf_SOURCES= \
        tests/testSBuf.h \
        tests/testSBuf.cc \
-       tests/testMain.cc \
        tests/SBufFindTest.h \
        tests/SBufFindTest.cc \
        $(SBUF_SOURCE) \
@@ -3743,12 +3485,13 @@ tests_testSBuf_SOURCES= \
        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_libmem.cc \
        tests/stub_cache_cf.cc \
        tests/stub_cache_manager.cc \
+       tests/stub_cbdata.cc \
        tests/stub_store.cc \
        tests/stub_store_stats.cc \
        tests/stub_tools.cc \
@@ -3764,7 +3507,6 @@ tests_testSBuf_LDADD=\
        ip/libip.la \
        mgr/libmgr.la \
        $(top_builddir)/lib/libmiscutil.la \
-       $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(COMPAT_LIB) \
        $(XTRA_LIBS)
@@ -3773,7 +3515,6 @@ tests_testSBuf_DEPENDENCIES= $(SQUID_CPPUNIT_LA)
 tests_testSBufList_SOURCES= \
        tests/testSBufList.h \
        tests/testSBufList.cc \
-       tests/testMain.cc \
        $(SBUF_SOURCE) \
        SBufList.h \
        SBufList.cc \
@@ -3782,7 +3523,6 @@ tests_testSBufList_SOURCES= \
        tests/stub_SBufDetailedStats.cc \
        SBufStream.h \
        tests/stub_time.cc \
-       mem.cc \
        tests/stub_MemObject.cc \
        tests/stub_cbdata.cc \
        tests/stub_comm.cc \
@@ -3791,6 +3531,7 @@ tests_testSBufList_SOURCES= \
        tests/stub_fatal.cc \
        tests/stub_fd.cc \
        tests/stub_HelperChildConfig.cc \
+       tests/stub_libmem.cc \
        tests/stub_cache_cf.cc \
        tests/stub_cache_manager.cc \
        tests/stub_store.cc \
@@ -3817,8 +3558,7 @@ tests_testSBufList_DEPENDENCIES= $(SQUID_CPPUNIT_LA)
 
 tests_testConfigParser_SOURCES = \
        ClientInfo.h \
-       Mem.h \
-       tests/stub_mem.cc \
+       tests/stub_libmem.cc \
        tests/stub_MemBuf.cc \
        tests/stub_time.cc \
        $(SBUF_SOURCE) \
@@ -3828,13 +3568,13 @@ tests_testConfigParser_SOURCES = \
        ConfigParser.cc \
        fatal.h \
        tests/stub_fatal.cc \
-       tests/testMain.cc \
        tests/testConfigParser.cc \
        tests/testConfigParser.h \
        cache_cf.h \
        YesNoNone.h \
        tests/stub_cache_cf.cc \
        tests/stub_cache_manager.cc \
+       tests/stub_cbdata.cc \
        tests/stub_debug.cc \
        tests/stub_HelperChildConfig.cc \
        tools.h \
@@ -3848,7 +3588,6 @@ tests_testConfigParser_LDADD = \
        libsquid.la \
        ip/libip.la \
        $(top_builddir)/lib/libmiscutil.la \
-       $(REGEXLIB) \
        $(SQUID_CPPUNIT_LIBS) \
        $(SSLLIB) \
        $(COMPAT_LIB) \
@@ -3873,8 +3612,7 @@ tests_testStatHist_SOURCES = \
        tests/stub_debug.cc \
        tests/stub_DelayId.cc \
        tests/stub_HelperChildConfig.cc \
-       Mem.h \
-       tests/stub_mem.cc \
+       tests/stub_libmem.cc \
        tests/stub_MemObject.cc \
        mime.h \
        tests/stub_mime.cc \
@@ -3886,7 +3624,6 @@ tests_testStatHist_SOURCES = \
        time.cc \
        tools.h \
        tests/stub_tools.cc \
-       tests/testMain.cc \
        tests/testStatHist.cc \
        tests/testStatHist.h
 nodist_tests_testStatHist_SOURCES = \
@@ -3901,6 +3638,24 @@ tests_testStatHist_LDADD = \
        $(COMPAT_LIB)
 tests_testStatHist_DEPENDENCIES = $(SQUID_CPPUNIT_LA)
 
+tests_testLookupTable_SOURCES = \
+       tests/testLookupTable.h \
+       tests/testLookupTable.cc \
+       tests/stub_debug.cc \
+       tests/stub_libmem.cc \
+       tests/stub_SBufDetailedStats.cc \
+       base/LookupTable.h \
+       String.cc \
+       $(SBUF_SOURCE)
+nodist_tests_testLookupTable_SOURCES = $(TESTSOURCES)
+tests_testLookupTable_LDFLAGS = $(LIBADD_DL)
+tests_testLookupTable_LDADD = \
+       base/libbase.la \
+       $(SQUID_CPPUNIT_LIBS) \
+       $(COMPAT_LIB) \
+       $(XTRA_LIBS)
+tests_testLookupTable_DEPENDENCIES = $(SQUID_CPPUNIT_LA)
+
 TESTS += testHeaders
 
 ## Special Universal .h dependency test script