config.m4 revision 70535d6421eb979ac79d8f49d31cd94d75dd8b2f
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederdnl Copyright 2001-2004 The Apache Software Foundation
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederdnl Licensed under the Apache License, Version 2.0 (the "License");
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederdnl you may not use this file except in compliance with the License.
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederdnl You may obtain a copy of the License at
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederdnl http://www.apache.org/licenses/LICENSE-2.0
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederdnl Unless required by applicable law or agreed to in writing, software
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederdnl distributed under the License is distributed on an "AS IS" BASIS,
e8ffec0fa3d3061061bdc16e44247b9cf96b050fChristian Maederdnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederdnl See the License for the specific language governing permissions and
e8ffec0fa3d3061061bdc16e44247b9cf96b050fChristian Maederdnl limitations under the License.
628310b42327ad76ce471caf0dde6563d6fa6307Christian MaederAC_DEFUN([CHECK_DISTCACHE], [
e8ffec0fa3d3061061bdc16e44247b9cf96b050fChristian Maeder AC_MSG_CHECKING(whether Distcache is required)
e8ffec0fa3d3061061bdc16e44247b9cf96b050fChristian Maeder ap_ssltk_dc="no"
30203b61afb4393c8e459470b3a16d1fe26acc7fChristian Maeder tmp_nomessage=""
e8ffec0fa3d3061061bdc16e44247b9cf96b050fChristian Maeder tmp_forced="no"
30203b61afb4393c8e459470b3a16d1fe26acc7fChristian Maeder AC_ARG_ENABLE(distcache,
f71a8dcf94fd9eb3c9800e16dcdc5e5ff74e5c22Christian Maeder APACHE_HELP_STRING(--enable-distcache,Select distcache support in mod_ssl),
e8ffec0fa3d3061061bdc16e44247b9cf96b050fChristian Maeder ap_ssltk_dc="$enableval"
e8ffec0fa3d3061061bdc16e44247b9cf96b050fChristian Maeder tmp_nomessage=""
024621f43239cfe9629e35d35a8669fad7acbba2Christian Maeder tmp_forced="yes"
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder if test "x$ap_ssltk_dc" = "x"; then
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder ap_ssltk_dc="yes"
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder dnl our "error"s become "tests revealed that..."
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder tmp_forced="no"
c00adad2e9459b422dee09e3a2bddba66b433bb7Christian Maeder if test "$ap_ssltk_dc" != "yes" -a "$ap_ssltk_dc" != "no"; then
c39be436ee9b0c08f9cb0c08988fcf5a5b147db9Christian Maeder tmp_nomessage="--enable-distcache had illegal syntax - disabling"
c39be436ee9b0c08f9cb0c08988fcf5a5b147db9Christian Maeder ap_ssltk_dc="no"
c39be436ee9b0c08f9cb0c08988fcf5a5b147db9Christian Maeder if test "$tmp_forced" = "no"; then
c39be436ee9b0c08f9cb0c08988fcf5a5b147db9Christian Maeder AC_MSG_RESULT($ap_ssltk_dc (default))
c39be436ee9b0c08f9cb0c08988fcf5a5b147db9Christian Maeder AC_MSG_RESULT($ap_ssltk_dc (specified))
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder if test "$tmp_forced" = "yes" -a "x$ap_ssltk_dc" = "xno" -a "x$tmp_nomessage" != "x"; then
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder AC_MSG_ERROR(distcache support failed: $tmp_nomessage)
51281dddda866c0cda9fca22bf6bc4eea7128112Christian Maeder if test "$ap_ssltk_dc" = "yes"; then
51281dddda866c0cda9fca22bf6bc4eea7128112Christian Maeder AC_CHECK_HEADER(
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder [tmp_nomessage="can't include distcache headers"
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder ap_ssltk_dc="no"])
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder if test "$tmp_forced" = "yes" -a "x$ap_ssltk_dc" = "xno"; then
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder AC_MSG_ERROR(distcache support failed: $tmp_nomessage)
319ecaf18256a807f93183b913a2383dfb0e63f2Christian Maeder if test "$ap_ssltk_dc" = "yes"; then
319ecaf18256a807f93183b913a2383dfb0e63f2Christian Maeder AC_MSG_CHECKING(for Distcache version)
319ecaf18256a807f93183b913a2383dfb0e63f2Christian Maeder AC_TRY_COMPILE(
319ecaf18256a807f93183b913a2383dfb0e63f2Christian Maeder[#if DISTCACHE_CLIENT_API != 0x0001
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maeder#error "distcache API version is unrecognised"
c39be436ee9b0c08f9cb0c08988fcf5a5b147db9Christian Maeder[tmp_nomessage="distcache has an unsupported API version"
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maederap_ssltk_dc="no"])
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder AC_MSG_RESULT($ap_ssltk_dc)
ac07a6558423dae7adc488ed9092cd8e9450a29dChristian Maeder if test "$tmp_forced" = "yes" -a "x$ap_ssltk_dc" = "xno"; then
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maeder AC_MSG_ERROR(distcache support failed: $tmp_nomessage)
35c0aa86aea351053f66b9d373148d0bdd4a1fe3Christian Maeder if test "$ap_ssltk_dc" = "yes"; then
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder AC_MSG_CHECKING(for Distcache libraries)
c39be436ee9b0c08f9cb0c08988fcf5a5b147db9Christian Maeder save_libs=$LIBS
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder LIBS="$LIBS -ldistcache -lnal"
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder [DC_CTX *foo = DC_CTX_new((const char *)0,0);],
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder [tmp_no_message="failed to link with distcache libraries"
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder ap_ssltk_dc="no"])
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder LIBS=$save_libs
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder AC_MSG_RESULT($ap_ssltk_dc)
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder if test "$tmp_forced" = "yes" -a "x$ap_ssltk_dc" = "xno"; then
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder AC_MSG_ERROR(distcache support failed: $tmp_nomessage)
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder APR_ADDTO(LIBS,[-ldistcache -lnal])
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder AC_DEFINE(HAVE_DISTCACHE, 1, [Define if distcache support is enabled])
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maederdnl # start of module specific part
628310b42327ad76ce471caf0dde6563d6fa6307Christian MaederAPACHE_MODPATH_INIT(ssl)
f0742398d4587242b1a115de113cd17f63dcb6d0Christian Maederdnl # list of module object files
ssl_scache_dc.lo dnl
ssl_util.lo dnl
ssl_util_ssl.lo dnl
APACHE_MODULE(ssl, [SSL/TLS support (mod_ssl)], $ssl_objs, , no, [
# Ensure that other modules can pick up mod_ssl.h