source: mod_gnutls/configure.ac @ dff03fa

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

Configure C99 mode

Variable declarations in for loops improve code readability.

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