source: mod_gnutls/configure.ac @ 26081ce

debian/masterdebian/stretch-backportsjessie-backportsupstream
Last change on this file since 26081ce was 26081ce, checked in by Thomas Klute <thomas2.klute@…>, 4 years ago

Test suite: Make TEST_HOST and TEST_IP configurable through ./configure

The default settings in the test suite assume that "localhost" resolves
to the IPv6 loopback address. Depending on the local system
configuration this may be incorrect, so allow the user to pass their own
TEST_HOST and TEST_IP to ./configure, e.g. to use IPv4:

TEST_HOST="localhost" TEST_IP="127.0.0.1" ./configure

Note that changing TEST_HOST requires rebuilding the certificates, just
run "make mostlyclean" before the next test run.

  • Property mode set to 100644
File size: 3.9 KB
Line 
1dnl
2AC_INIT(mod_gnutls, 0.7-beta)
3OOO_CONFIG_NICE(config.nice)
4MOD_GNUTLS_VERSION=AC_PACKAGE_VERSION
5AC_PREREQ(2.53)
6AC_CONFIG_SRCDIR([src/mod_gnutls.c])
7AC_CONFIG_AUX_DIR(config)
8
9OOO_MAINTAIN_MODE
10AM_MAINTAINER_MODE
11AC_CANONICAL_TARGET
12AM_INIT_AUTOMAKE
13AM_CONFIG_HEADER(include/mod_gnutls_config.h:config.in)
14
15AC_SUBST(MOD_GNUTLS_VERSION)
16
17AC_PROG_CC
18AC_PROG_LD
19AC_PROG_INSTALL
20AC_PROG_LIBTOOL
21
22AC_CONFIG_MACRO_DIR([m4])
23
24AP_VERSION=2.0.40
25CHECK_APACHE(,$AP_VERSION,
26    :,:,
27    AC_MSG_ERROR([*** Apache version $AP_VERSION not found!])
28)
29
30PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 3.1.4])
31
32LIBGNUTLS_VERSION=`pkg-config --modversion gnutls`
33
34AC_ARG_ENABLE(srp,
35       AS_HELP_STRING([--disable-srp],
36               [unconditionally disable the SRP functionality]),
37       use_srp=$enableval, use_srp=yes)
38
39# check if the available GnuTLS library supports SRP
40AC_SEARCH_LIBS([gnutls_srp_server_get_username], [gnutls], [], [use_srp="no"])
41
42SRP_CFLAGS=""
43if test "$use_srp" != "no"; then
44        SRP_CFLAGS="-DENABLE_SRP=1"
45fi
46
47AC_ARG_ENABLE(strict,
48       AS_HELP_STRING([--disable-strict],
49               [Avoid strict compiler warnings and errors]),
50       use_strict=$enableval, use_strict=yes)
51
52STRICT_CFLAGS=""
53if test "$use_strict" != "no"; then
54        STRICT_CFLAGS="-Wall -Werror -Wextra"
55fi
56
57AC_MSG_CHECKING([whether to enable SRP functionality])
58AC_MSG_RESULT($use_srp)
59
60AC_ARG_ENABLE(msva,
61       AS_HELP_STRING([--enable-msva],
62               [enable Monkeysphere client certificate verification]),
63       use_msva=$enableval, use_msva=no)
64AM_CONDITIONAL([USE_MSVA], [test "$use_msva" != "no"])
65
66MSVA_CFLAGS=""
67if test "$use_msva" != "no"; then
68        AC_CHECK_HEADERS([msv/msv.h], [],
69                         [AC_MSG_ERROR([*** No libmsv headers found!])])
70        AC_SEARCH_LIBS([msv_query_agent], [msv], [],
71                         [AC_MSG_ERROR([*** No libmsv found with msv_query_agent!])])
72        MSVA_CFLAGS="-DENABLE_MSVA=1"
73fi
74
75AC_MSG_CHECKING([whether to enable MSVA functionality])
76AC_MSG_RESULT($use_msva)
77
78have_apr_memcache=0
79CHECK_APR_MEMCACHE([have_apr_memcache=1], [have_apr_memcache=0])
80AC_SUBST(have_apr_memcache)
81
82# Building documentation requires pandoc, which in turn needs pdflatex
83# to build PDF output.
84build_doc=no
85AC_PATH_PROG([PANDOC], [pandoc], [no])
86if test "$PANDOC" != "no"; then
87        AC_PATH_PROG([PDFLATEX], [pdflatex], [no])
88        if test "$PDFLATEX" != "no"; then
89                build_doc=yes
90        else
91                build_doc="html only"
92        fi
93fi
94AM_CONDITIONAL([USE_PANDOC], [test "$PANDOC" != "no"])
95AM_CONDITIONAL([USE_PDFLATEX], [test "$PANDOC" != "no" && \
96                               test "$PDFLATEX" != "no"])
97
98# Check for Apache binary
99AC_PATH_PROGS([APACHE2], [apache2 httpd], [no])
100if test "${APACHE2}" = "no"; then
101        AC_MSG_WARN([Neither apache2 nor httpd found in \
102                     PATH. Test suite will fail.])
103fi
104
105MODULE_CFLAGS="${LIBGNUTLS_CFLAGS} ${SRP_CFLAGS} ${MSVA_CFLAGS} ${APR_MEMCACHE_CFLAGS} ${APXS_CFLAGS} ${AP_INCLUDES} ${APR_INCLUDES} ${APU_INCLUDES} ${STRICT_CFLAGS}"
106MODULE_LIBS="${APR_MEMCACHE_LIBS} ${LIBGNUTLS_LIBS}"
107
108AC_SUBST(MODULE_CFLAGS)
109AC_SUBST(MODULE_LIBS)
110
111# assign default values to TEST_HOST and TEST_IP if necessary
112: ${TEST_HOST:="localhost"}
113: ${TEST_IP:="[::1]"}
114AC_ARG_VAR([TEST_HOST], [Host name to use for server instances started by \
115                        "make check", must resolve to TEST_IP. The default \
116                        is "localhost".])
117AC_ARG_VAR([TEST_IP], [IP address to use for server instances started by \
118                      "make check". The default is the IPv6 loopback address \
119                      [::1].])
120
121AC_CONFIG_FILES([Makefile src/Makefile test/Makefile test/tests/Makefile \
122                          doc/Makefile include/mod_gnutls.h])
123AC_OUTPUT
124
125echo "---"
126echo "Configuration summary for mod_gnutls:"
127echo ""
128echo "   * mod_gnutls version:  ${MOD_GNUTLS_VERSION}"
129echo "   * Apache Modules directory:    ${AP_LIBEXECDIR}"
130echo "   * GnuTLS Library version:      ${LIBGNUTLS_VERSION}"
131echo "   * SRP Authentication:  ${use_srp}"
132echo "   * MSVA Client Verification:    ${use_msva}"
133echo "   * Build documentation: ${build_doc}"
134echo ""
135echo "---"
Note: See TracBrowser for help on using the repository browser.