]> granicus.if.org Git - apache/blob - modules/cache/config.m4
Add to modules' help text (displayed by ./configure -h) more
[apache] / modules / cache / config.m4
1 dnl modules enabled in this directory by default
2
3 dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]])
4
5 APACHE_MODPATH_INIT(cache)
6
7 APACHE_MODULE(file_cache, File cache, , , most)
8
9 dnl #  list of object files for mod_cache
10 cache_objs="dnl
11 mod_cache.lo dnl
12 cache_storage.lo dnl
13 cache_util.lo dnl
14 "
15 disk_cache_objs="mod_disk_cache.lo"
16
17 case "$host" in
18   *os2*)
19     # OS/2 DLLs must resolve all symbols at build time
20     # and we need some from main cache module
21     disk_cache_objs="$disk_cache_objs mod_cache.la"
22     ;;
23 esac
24
25 APACHE_MODULE(cache, dynamic file caching.  At least one storage management module (e.g. mod_disk_cache) is also necessary., $cache_objs, , most)
26 APACHE_MODULE(disk_cache, disk caching module, $disk_cache_objs, , most)
27
28 AC_DEFUN([CHECK_DISTCACHE], [
29   AC_CHECK_HEADER(
30     [distcache/dc_client.h],
31     [have_distcache=yes],
32     [have_distcache=no])
33   if test "$have_distcache" = "yes"; then
34     AC_MSG_CHECKING(for Distcache version)
35     AC_TRY_COMPILE(
36 [#include <distcache/dc_client.h>],
37 [#if DISTCACHE_CLIENT_API != 0x0001
38 #error "distcache API version is unrecognised"
39 #endif],
40 [],
41 [have_distcache=no])
42     AC_MSG_RESULT($have_distcache)
43   fi
44   if test "$have_distcache" = "yes"; then
45     AC_MSG_CHECKING(for Distcache libraries)
46     save_libs=$LIBS
47     LIBS="$LIBS -ldistcache -lnal"
48     AC_TRY_LINK(
49       [#include <distcache/dc_client.h>],
50       [DC_CTX *foo = DC_CTX_new((const char *)0,0);],
51       [],
52       [have_distcache=no])
53     LIBS=$save_libs
54     AC_MSG_RESULT($have_distcache)
55   fi
56   if test "$have_distcache" = "yes"; then
57     APR_ADDTO(MOD_SOCACHE_LDADD, [-ldistcache -lnal])
58     AC_DEFINE(HAVE_DISTCACHE, 1, [Define if distcache support is enabled])
59   else
60     enable_socache_dc=no
61   fi
62 ])
63
64 APACHE_MODULE(socache_shmcb,  shmcb small object cache provider, , , most)
65 APACHE_MODULE(socache_dbm, dbm small object cache provider, , , most)
66 APACHE_MODULE(socache_memcache, memcache small object cache provider, , , most)
67 APACHE_MODULE(socache_dc, distcache small object cache provider, , , no, [
68    CHECK_DISTCACHE
69 ])
70
71 APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
72
73 APACHE_MODPATH_FINISH