~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to modules/ssl/config.m4

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl  Copyright 2001-2005 The Apache Software Foundation or its licensors, as
 
2
dnl  applicable.
 
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
 
6
dnl 
 
7
dnl       http://www.apache.org/licenses/LICENSE-2.0
 
8
dnl 
 
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.
 
14
 
 
15
AC_DEFUN([CHECK_DISTCACHE], [
 
16
  AC_MSG_CHECKING(whether Distcache is required)
 
17
  ap_ssltk_dc="no"
 
18
  tmp_nomessage=""
 
19
  tmp_forced="no"
 
20
  AC_ARG_ENABLE(distcache,
 
21
    APACHE_HELP_STRING(--enable-distcache,Select distcache support in mod_ssl),
 
22
    ap_ssltk_dc="$enableval"
 
23
    tmp_nomessage=""
 
24
    tmp_forced="yes"
 
25
    if test "x$ap_ssltk_dc" = "x"; then
 
26
      ap_ssltk_dc="yes"
 
27
      dnl our "error"s become "tests revealed that..."
 
28
      tmp_forced="no"
 
29
    fi
 
30
    if test "$ap_ssltk_dc" != "yes" -a "$ap_ssltk_dc" != "no"; then
 
31
      tmp_nomessage="--enable-distcache had illegal syntax - disabling"
 
32
      ap_ssltk_dc="no"
 
33
    fi)
 
34
  if test "$tmp_forced" = "no"; then
 
35
    AC_MSG_RESULT($ap_ssltk_dc (default))
 
36
  else
 
37
    AC_MSG_RESULT($ap_ssltk_dc (specified))
 
38
  fi
 
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)
 
41
  fi
 
42
  if test "$ap_ssltk_dc" = "yes"; then
 
43
    AC_CHECK_HEADER(
 
44
      [distcache/dc_client.h],
 
45
      [],
 
46
      [tmp_nomessage="can't include distcache headers"
 
47
      ap_ssltk_dc="no"])
 
48
    if test "$tmp_forced" = "yes" -a "x$ap_ssltk_dc" = "xno"; then
 
49
      AC_MSG_ERROR(distcache support failed: $tmp_nomessage)
 
50
    fi
 
51
  fi
 
52
  if test "$ap_ssltk_dc" = "yes"; then
 
53
    AC_MSG_CHECKING(for Distcache version)
 
54
    AC_TRY_COMPILE(
 
55
[#include <distcache/dc_client.h>],
 
56
[#if DISTCACHE_CLIENT_API != 0x0001
 
57
#error "distcache API version is unrecognised"
 
58
#endif],
 
59
[],
 
60
[tmp_nomessage="distcache has an unsupported API version"
 
61
ap_ssltk_dc="no"])
 
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)
 
65
    fi
 
66
  fi
 
67
  if test "$ap_ssltk_dc" = "yes"; then
 
68
    AC_MSG_CHECKING(for Distcache libraries)
 
69
    save_libs=$LIBS
 
70
    LIBS="$LIBS -ldistcache -lnal"
 
71
    AC_TRY_LINK(
 
72
      [#include <distcache/dc_client.h>],
 
73
      [DC_CTX *foo = DC_CTX_new((const char *)0,0);],
 
74
      [],
 
75
      [tmp_no_message="failed to link with distcache libraries"
 
76
      ap_ssltk_dc="no"])
 
77
    LIBS=$save_libs
 
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)
 
81
    else
 
82
      APR_ADDTO(MOD_SSL_LDADD, [-ldistcache -lnal])
 
83
      AC_DEFINE(HAVE_DISTCACHE, 1, [Define if distcache support is enabled])
 
84
    fi
 
85
  fi
 
86
])
 
87
 
 
88
dnl #  start of module specific part
 
89
APACHE_MODPATH_INIT(ssl)
 
90
 
 
91
dnl #  list of module object files
 
92
ssl_objs="dnl
 
93
mod_ssl.lo dnl
 
94
ssl_engine_config.lo dnl
 
95
ssl_engine_dh.lo dnl
 
96
ssl_engine_init.lo dnl
 
97
ssl_engine_io.lo dnl
 
98
ssl_engine_kernel.lo dnl
 
99
ssl_engine_log.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
 
104
ssl_expr.lo dnl
 
105
ssl_expr_eval.lo dnl
 
106
ssl_expr_parse.lo dnl
 
107
ssl_expr_scan.lo dnl
 
108
ssl_scache.lo dnl
 
109
ssl_scache_dbm.lo dnl
 
110
ssl_scache_shmcb.lo dnl
 
111
ssl_scache_dc.lo dnl
 
112
ssl_util.lo dnl
 
113
ssl_util_ssl.lo dnl
 
114
"
 
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)])
 
119
    CHECK_DISTCACHE
 
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])
 
124
    fi
 
125
])
 
126
 
 
127
# Ensure that other modules can pick up mod_ssl.h
 
128
APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
 
129
 
 
130
dnl #  end of module specific part
 
131
APACHE_MODPATH_FINISH
 
132