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
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederdnl http://www.apache.org/licenses/LICENSE-2.0
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederdnl
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.
e8ffec0fa3d3061061bdc16e44247b9cf96b050fChristian Maeder
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"
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder fi
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 fi)
c39be436ee9b0c08f9cb0c08988fcf5a5b147db9Christian Maeder if test "$tmp_forced" = "no"; then
c39be436ee9b0c08f9cb0c08988fcf5a5b147db9Christian Maeder AC_MSG_RESULT($ap_ssltk_dc (default))
fdbad18e66c0e293f94694458d47df305f050c71Christian Maeder else
c39be436ee9b0c08f9cb0c08988fcf5a5b147db9Christian Maeder AC_MSG_RESULT($ap_ssltk_dc (specified))
024621f43239cfe9629e35d35a8669fad7acbba2Christian Maeder fi
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)
ac07a6558423dae7adc488ed9092cd8e9450a29dChristian Maeder fi
51281dddda866c0cda9fca22bf6bc4eea7128112Christian Maeder if test "$ap_ssltk_dc" = "yes"; then
51281dddda866c0cda9fca22bf6bc4eea7128112Christian Maeder AC_CHECK_HEADER(
300ce2662e9abb115f7aa4e0a99c172a05ba454dChristian Maeder [distcache/dc_client.h],
ac07a6558423dae7adc488ed9092cd8e9450a29dChristian Maeder [],
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 fi
319ecaf18256a807f93183b913a2383dfb0e63f2Christian Maeder fi
319ecaf18256a807f93183b913a2383dfb0e63f2Christian Maeder if test "$ap_ssltk_dc" = "yes"; then
319ecaf18256a807f93183b913a2383dfb0e63f2Christian Maeder AC_MSG_CHECKING(for Distcache version)
319ecaf18256a807f93183b913a2383dfb0e63f2Christian Maeder AC_TRY_COMPILE(
319ecaf18256a807f93183b913a2383dfb0e63f2Christian Maeder[#include <distcache/dc_client.h>],
319ecaf18256a807f93183b913a2383dfb0e63f2Christian Maeder[#if DISTCACHE_CLIENT_API != 0x0001
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maeder#error "distcache API version is unrecognised"
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder#endif],
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maeder[],
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 fi
c39be436ee9b0c08f9cb0c08988fcf5a5b147db9Christian Maeder fi
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 AC_TRY_LINK(
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder [#include <distcache/dc_client.h>],
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder [DC_CTX *foo = DC_CTX_new((const char *)0,0);],
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder [],
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 else
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder APR_ADDTO(LIBS,[-ldistcache -lnal])
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder AC_DEFINE(HAVE_DISTCACHE, 1, [Define if distcache support is enabled])
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder fi
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder fi
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder])
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maederdnl # start of module specific part
628310b42327ad76ce471caf0dde6563d6fa6307Christian MaederAPACHE_MODPATH_INIT(ssl)
628310b42327ad76ce471caf0dde6563d6fa6307Christian Maeder
f0742398d4587242b1a115de113cd17f63dcb6d0Christian Maederdnl # list of module object files
f0742398d4587242b1a115de113cd17f63dcb6d0Christian Maederssl_objs="dnl
f0742398d4587242b1a115de113cd17f63dcb6d0Christian Maedermod_ssl.lo dnl
f0742398d4587242b1a115de113cd17f63dcb6d0Christian Maederssl_engine_config.lo dnl
f0742398d4587242b1a115de113cd17f63dcb6d0Christian Maederssl_engine_dh.lo dnl
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maederssl_engine_init.lo dnl
f71a8dcf94fd9eb3c9800e16dcdc5e5ff74e5c22Christian Maederssl_engine_io.lo dnl
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maederssl_engine_kernel.lo dnl
f71a8dcf94fd9eb3c9800e16dcdc5e5ff74e5c22Christian Maederssl_engine_log.lo dnl
c39be436ee9b0c08f9cb0c08988fcf5a5b147db9Christian Maederssl_engine_mutex.lo dnl
cf3232cec840a6945667bdb06f5b47b22243bc8fChristian Maederssl_engine_pphrase.lo dnl
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederssl_engine_rand.lo dnl
f0742398d4587242b1a115de113cd17f63dcb6d0Christian Maederssl_engine_vars.lo dnl
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederssl_expr.lo dnl
ac07a6558423dae7adc488ed9092cd8e9450a29dChristian Maederssl_expr_eval.lo dnl
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederssl_expr_parse.lo dnl
024621f43239cfe9629e35d35a8669fad7acbba2Christian Maederssl_expr_scan.lo dnl
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederssl_scache.lo dnl
fb69cd512eab767747f109e40322df7cae2f7bdfChristian Maederssl_scache_dbm.lo dnl
ssl_scache_shmcb.lo dnl
ssl_scache_dc.lo dnl
ssl_util.lo dnl
ssl_util_ssl.lo dnl
"
dnl # hook module into the Autoconf mechanism (--enable-ssl option)
APACHE_MODULE(ssl, [SSL/TLS support (mod_ssl)], $ssl_objs, , no, [
APACHE_CHECK_SSL_TOOLKIT
CHECK_DISTCACHE
])
# Ensure that other modules can pick up mod_ssl.h
APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
dnl # end of module specific part
APACHE_MODPATH_FINISH