1
dnl Copyright 2001-2005 The Apache Software Foundation or its licensors, as
3
dnl Licensed under the Apache License, Version 2.0 (the "License");
4
dnl you may not use this file except in compliance with the License.
5
dnl You may obtain a copy of the License at
7
dnl http://www.apache.org/licenses/LICENSE-2.0
9
dnl Unless required by applicable law or agreed to in writing, software
10
dnl distributed under the License is distributed on an "AS IS" BASIS,
11
dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
dnl See the License for the specific language governing permissions and
13
dnl limitations under the License.
15
AC_DEFUN([CHECK_DISTCACHE], [
16
AC_MSG_CHECKING(whether Distcache is required)
20
AC_ARG_ENABLE(distcache,
21
APACHE_HELP_STRING(--enable-distcache,Select distcache support in mod_ssl),
22
ap_ssltk_dc="$enableval"
25
if test "x$ap_ssltk_dc" = "x"; then
27
dnl our "error"s become "tests revealed that..."
30
if test "$ap_ssltk_dc" != "yes" -a "$ap_ssltk_dc" != "no"; then
31
tmp_nomessage="--enable-distcache had illegal syntax - disabling"
34
if test "$tmp_forced" = "no"; then
35
AC_MSG_RESULT($ap_ssltk_dc (default))
37
AC_MSG_RESULT($ap_ssltk_dc (specified))
39
if test "$tmp_forced" = "yes" -a "x$ap_ssltk_dc" = "xno" -a "x$tmp_nomessage" != "x"; then
40
AC_MSG_ERROR(distcache support failed: $tmp_nomessage)
42
if test "$ap_ssltk_dc" = "yes"; then
44
[distcache/dc_client.h],
46
[tmp_nomessage="can't include distcache headers"
48
if test "$tmp_forced" = "yes" -a "x$ap_ssltk_dc" = "xno"; then
49
AC_MSG_ERROR(distcache support failed: $tmp_nomessage)
52
if test "$ap_ssltk_dc" = "yes"; then
53
AC_MSG_CHECKING(for Distcache version)
55
[#include <distcache/dc_client.h>],
56
[#if DISTCACHE_CLIENT_API != 0x0001
57
#error "distcache API version is unrecognised"
60
[tmp_nomessage="distcache has an unsupported API version"
62
AC_MSG_RESULT($ap_ssltk_dc)
63
if test "$tmp_forced" = "yes" -a "x$ap_ssltk_dc" = "xno"; then
64
AC_MSG_ERROR(distcache support failed: $tmp_nomessage)
67
if test "$ap_ssltk_dc" = "yes"; then
68
AC_MSG_CHECKING(for Distcache libraries)
70
LIBS="$LIBS -ldistcache -lnal"
72
[#include <distcache/dc_client.h>],
73
[DC_CTX *foo = DC_CTX_new((const char *)0,0);],
75
[tmp_no_message="failed to link with distcache libraries"
78
AC_MSG_RESULT($ap_ssltk_dc)
79
if test "$tmp_forced" = "yes" -a "x$ap_ssltk_dc" = "xno"; then
80
AC_MSG_ERROR(distcache support failed: $tmp_nomessage)
82
APR_ADDTO(MOD_SSL_LDADD, [-ldistcache -lnal])
83
AC_DEFINE(HAVE_DISTCACHE, 1, [Define if distcache support is enabled])
88
dnl # start of module specific part
89
APACHE_MODPATH_INIT(ssl)
91
dnl # list of module object files
94
ssl_engine_config.lo dnl
96
ssl_engine_init.lo dnl
98
ssl_engine_kernel.lo dnl
100
ssl_engine_mutex.lo dnl
101
ssl_engine_pphrase.lo dnl
102
ssl_engine_rand.lo dnl
103
ssl_engine_vars.lo dnl
106
ssl_expr_parse.lo dnl
109
ssl_scache_dbm.lo dnl
110
ssl_scache_shmcb.lo dnl
115
dnl # hook module into the Autoconf mechanism (--enable-ssl option)
116
APACHE_MODULE(ssl, [SSL/TLS support (mod_ssl)], $ssl_objs, , no, [
117
APACHE_CHECK_SSL_TOOLKIT
118
APR_SETVAR(MOD_SSL_LDADD, [\$(SSL_LIBS)])
120
if test "x$enable_ssl" = "xshared"; then
121
# The only symbol which needs to be exported is the module
122
# structure, so ask libtool to hide everything else:
123
APR_ADDTO(MOD_SSL_LDADD, [-export-symbols-regex ssl_module])
127
# Ensure that other modules can pick up mod_ssl.h
128
APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
130
dnl # end of module specific part
131
APACHE_MODPATH_FINISH