1 dnl Copyright 2001-2006 The Apache Software Foundation or its licensors, as
4 dnl Licensed under the Apache License, Version 2.0 (the "License");
5 dnl you may not use this file except in compliance with the License.
6 dnl You may obtain a copy of the License at
8 dnl http://www.apache.org/licenses/LICENSE-2.0
10 dnl Unless required by applicable law or agreed to in writing, software
11 dnl distributed under the License is distributed on an "AS IS" BASIS,
12 dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 dnl See the License for the specific language governing permissions and
14 dnl limitations under the License.
16 AC_DEFUN([CHECK_DISTCACHE], [
17 AC_MSG_CHECKING(whether Distcache is required)
21 AC_ARG_ENABLE(distcache,
22 APACHE_HELP_STRING(--enable-distcache,Select distcache support in mod_ssl),
23 ap_ssltk_dc="$enableval"
26 if test "x$ap_ssltk_dc" = "x"; then
28 dnl our "error"s become "tests revealed that..."
31 if test "$ap_ssltk_dc" != "yes" -a "$ap_ssltk_dc" != "no"; then
32 tmp_nomessage="--enable-distcache had illegal syntax - disabling"
35 if test "$tmp_forced" = "no"; then
36 AC_MSG_RESULT($ap_ssltk_dc (default))
38 AC_MSG_RESULT($ap_ssltk_dc (specified))
40 if test "$tmp_forced" = "yes" -a "x$ap_ssltk_dc" = "xno" -a "x$tmp_nomessage" != "x"; then
41 AC_MSG_ERROR(distcache support failed: $tmp_nomessage)
43 if test "$ap_ssltk_dc" = "yes"; then
45 [distcache/dc_client.h],
47 [tmp_nomessage="can't include distcache headers"
49 if test "$tmp_forced" = "yes" -a "x$ap_ssltk_dc" = "xno"; then
50 AC_MSG_ERROR(distcache support failed: $tmp_nomessage)
53 if test "$ap_ssltk_dc" = "yes"; then
54 AC_MSG_CHECKING(for Distcache version)
56 [#include <distcache/dc_client.h>],
57 [#if DISTCACHE_CLIENT_API != 0x0001
58 #error "distcache API version is unrecognised"
61 [tmp_nomessage="distcache has an unsupported API version"
63 AC_MSG_RESULT($ap_ssltk_dc)
64 if test "$tmp_forced" = "yes" -a "x$ap_ssltk_dc" = "xno"; then
65 AC_MSG_ERROR(distcache support failed: $tmp_nomessage)
68 if test "$ap_ssltk_dc" = "yes"; then
69 AC_MSG_CHECKING(for Distcache libraries)
71 LIBS="$LIBS -ldistcache -lnal"
73 [#include <distcache/dc_client.h>],
74 [DC_CTX *foo = DC_CTX_new((const char *)0,0);],
76 [tmp_no_message="failed to link with distcache libraries"
79 AC_MSG_RESULT($ap_ssltk_dc)
80 if test "$tmp_forced" = "yes" -a "x$ap_ssltk_dc" = "xno"; then
81 AC_MSG_ERROR(distcache support failed: $tmp_nomessage)
83 APR_ADDTO(MOD_SSL_LDADD, [-ldistcache -lnal])
84 AC_DEFINE(HAVE_DISTCACHE, 1, [Define if distcache support is enabled])
89 dnl # start of module specific part
90 APACHE_MODPATH_INIT(ssl)
92 dnl # list of module object files
95 ssl_engine_config.lo dnl
97 ssl_engine_init.lo dnl
99 ssl_engine_kernel.lo dnl
100 ssl_engine_log.lo dnl
101 ssl_engine_mutex.lo dnl
102 ssl_engine_pphrase.lo dnl
103 ssl_engine_rand.lo dnl
104 ssl_engine_vars.lo dnl
107 ssl_expr_parse.lo dnl
110 ssl_scache_dbm.lo dnl
111 ssl_scache_shmcb.lo dnl
116 dnl # hook module into the Autoconf mechanism (--enable-ssl option)
117 APACHE_MODULE(ssl, [SSL/TLS support (mod_ssl)], $ssl_objs, , no, [
118 APACHE_CHECK_SSL_TOOLKIT
119 APR_SETVAR(MOD_SSL_LDADD, [\$(SSL_LIBS)])
121 if test "x$enable_ssl" = "xshared"; then
122 # The only symbol which needs to be exported is the module
123 # structure, so ask libtool to hide everything else:
124 APR_ADDTO(MOD_SSL_LDADD, [-export-symbols-regex ssl_module])
128 # Ensure that other modules can pick up mod_ssl.h
129 APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
131 dnl # end of module specific part
132 APACHE_MODPATH_FINISH