source: mod_gnutls/configure.ac @ 7813802

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

Detect apache(2?)ctl and use it instead of starting Apache directly

This should help with portability across distributions that install the
Apache binary under different paths.

  • Property mode set to 100644
File size: 3.4 KB
Line 
1dnl
2AC_INIT(mod_gnutls, 0.6)
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
39SRP_CFLAGS=""
40if test "$use_srp" != "no"; then
41        SRP_CFLAGS="-DENABLE_SRP=1"
42fi
43
44AC_ARG_ENABLE(strict,
45       AS_HELP_STRING([--disable-strict],
46               [Avoid strict compiler warnings and errors]),
47       use_strict=$enableval, use_strict=yes)
48
49STRICT_CFLAGS=""
50if test "$use_strict" != "no"; then
51        STRICT_CFLAGS="-Wall -Werror -Wextra"
52fi
53
54AC_MSG_CHECKING([whether to enable SRP functionality])
55AC_MSG_RESULT($use_srp)
56
57AC_ARG_ENABLE(msva,
58       AS_HELP_STRING([--enable-msva],
59               [enable Monkeysphere client certificate verification]),
60       use_msva=$enableval, use_msva=no)
61AM_CONDITIONAL([USE_MSVA], [test "$use_msva" = "$enableval"])
62
63MSVA_CFLAGS=""
64if test "$use_msva" != "no"; then
65        AC_CHECK_HEADERS([msv/msv.h], [],
66                         [AC_MSG_ERROR([*** No libmsv headers found!])])
67        AC_SEARCH_LIBS([msv_query_agent], [msv], [],
68                         [AC_MSG_ERROR([*** No libmsv found with msv_query_agent!])])
69        MSVA_CFLAGS="-DENABLE_MSVA=1"
70fi
71
72AC_MSG_CHECKING([whether to enable MSVA functionality])
73AC_MSG_RESULT($use_msva)
74
75have_apr_memcache=0
76CHECK_APR_MEMCACHE([have_apr_memcache=1], [have_apr_memcache=0])
77AC_SUBST(have_apr_memcache)
78
79# Building documentation requires pandoc, which in turn needs pdflatex
80# to build PDF output.
81build_doc=no
82AC_PATH_PROG([PANDOC], [pandoc], [no])
83if test "$PANDOC" != "no"; then
84        AC_PATH_PROG([PDFLATEX], [pdflatex], [no])
85        if test "$PDFLATEX" != "no"; then
86                build_doc=yes
87        else
88                build_doc="html only"
89        fi
90fi
91AM_CONDITIONAL([USE_PANDOC], [test "$PANDOC" != "no"])
92AM_CONDITIONAL([USE_PDFLATEX], [test "$PANDOC" != "no" && \
93                               test "$PDFLATEX" != "no"])
94
95# Check for apache2ctl or apachectl
96AC_PATH_PROGS([APACHECTL], [apache2ctl apachectl], [no])
97if test "${APACHECTL}" = "no"; then
98        AC_MSG_WARN([Neither apache2ctl nor apachectl found in \
99                     PATH. Test suite will fail.])
100fi
101
102MODULE_CFLAGS="${LIBGNUTLS_CFLAGS} ${SRP_CFLAGS} ${MSVA_CFLAGS} ${APR_MEMCACHE_CFLAGS} ${APXS_CFLAGS} ${AP_INCLUDES} ${APR_INCLUDES} ${APU_INCLUDES} ${STRICT_CFLAGS}"
103MODULE_LIBS="${APR_MEMCACHE_LIBS} ${LIBGNUTLS_LIBS}"
104
105AC_SUBST(MODULE_CFLAGS)
106AC_SUBST(MODULE_LIBS)
107
108AC_CONFIG_FILES([Makefile src/Makefile test/Makefile test/tests/Makefile \
109                          doc/Makefile include/mod_gnutls.h])
110AC_OUTPUT
111
112echo "---"
113echo "Configuration summary for mod_gnutls:"
114echo ""
115echo "   * mod_gnutls version:  ${MOD_GNUTLS_VERSION}"
116echo "   * Apache Modules directory:    ${AP_LIBEXECDIR}"
117echo "   * GnuTLS Library version:      ${LIBGNUTLS_VERSION}"
118echo "   * SRP Authentication:  ${use_srp}"
119echo "   * MSVA Client Verification:    ${use_msva}"
120echo "   * Build documentation: ${build_doc}"
121echo ""
122echo "---"
Note: See TracBrowser for help on using the repository browser.