source: mod_gnutls/configure.ac @ f9f184f

asynciodebian/masterdebian/stretch-backportsjessie-backportsproxy-ticketupstream
Last change on this file since f9f184f was dff03fa, checked in by Thomas Klute <thomas2.klute@…>, 5 years ago

Configure C99 mode

Variable declarations in for loops improve code readability.

  • Property mode set to 100644
File size: 3.9 KB
RevLine 
[7bebb42]1dnl
[a1c4c2d]2AC_INIT(mod_gnutls, 0.7)
[9706fc2]3OOO_CONFIG_NICE(config.nice)
[42307a9]4MOD_GNUTLS_VERSION=AC_PACKAGE_VERSION
[6e0bfd6]5AC_PREREQ(2.53)
[9706fc2]6AC_CONFIG_SRCDIR([src/mod_gnutls.c])
[6e0bfd6]7AC_CONFIG_AUX_DIR(config)
[7bebb42]8
[5a6446d]9OOO_MAINTAIN_MODE
[9706fc2]10AM_MAINTAINER_MODE
11AC_CANONICAL_TARGET
[8a30d35]12AM_INIT_AUTOMAKE
[6e0bfd6]13AM_CONFIG_HEADER(include/mod_gnutls_config.h:config.in)
[9706fc2]14
[42307a9]15AC_SUBST(MOD_GNUTLS_VERSION)
[9706fc2]16
17AC_PROG_CC
[dff03fa]18AC_PROG_CC_C99
[9706fc2]19AC_PROG_LD
20AC_PROG_INSTALL
[7bebb42]21AC_PROG_LIBTOOL
[9706fc2]22
[4aec9a1]23AC_CONFIG_MACRO_DIR([m4])
24
[4038c7a]25AP_VERSION=2.2.0
[9706fc2]26CHECK_APACHE(,$AP_VERSION,
27    :,:,
28    AC_MSG_ERROR([*** Apache version $AP_VERSION not found!])
29)
30
[0de1839]31PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 3.1.4])
[cac3a7f]32
33LIBGNUTLS_VERSION=`pkg-config --modversion gnutls`
[16068f4]34
[787dab7]35AC_ARG_ENABLE(srp,
36       AS_HELP_STRING([--disable-srp],
37               [unconditionally disable the SRP functionality]),
38       use_srp=$enableval, use_srp=yes)
[b072204]39
[f71e6ce]40# check if the available GnuTLS library supports SRP
41AC_SEARCH_LIBS([gnutls_srp_server_get_username], [gnutls], [], [use_srp="no"])
42
[b072204]43SRP_CFLAGS=""
[787dab7]44if test "$use_srp" != "no"; then
[b27cce7]45        SRP_CFLAGS="-DENABLE_SRP=1"
[787dab7]46fi
[c70c6d7]47
[fd82e59]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
[787dab7]58AC_MSG_CHECKING([whether to enable SRP functionality])
59AC_MSG_RESULT($use_srp)
60
[fa45dcb]61AC_ARG_ENABLE(msva,
62       AS_HELP_STRING([--enable-msva],
63               [enable Monkeysphere client certificate verification]),
64       use_msva=$enableval, use_msva=no)
[b27cce7]65AM_CONDITIONAL([USE_MSVA], [test "$use_msva" != "no"])
[fa45dcb]66
67MSVA_CFLAGS=""
68if test "$use_msva" != "no"; then
[b27cce7]69        AC_CHECK_HEADERS([msv/msv.h], [],
[fa45dcb]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!])])
[b27cce7]73        MSVA_CFLAGS="-DENABLE_MSVA=1"
[fa45dcb]74fi
75
76AC_MSG_CHECKING([whether to enable MSVA functionality])
77AC_MSG_RESULT($use_msva)
78
[6e0bfd6]79have_apr_memcache=0
80CHECK_APR_MEMCACHE([have_apr_memcache=1], [have_apr_memcache=0])
81AC_SUBST(have_apr_memcache)
[ed47098]82
[6e1d45d]83# Building documentation requires pandoc, which in turn needs pdflatex
84# to build PDF output.
[28f3f4f]85build_doc=no
[6e1d45d]86AC_PATH_PROG([PANDOC], [pandoc], [no])
87if test "$PANDOC" != "no"; then
88        AC_PATH_PROG([PDFLATEX], [pdflatex], [no])
[28f3f4f]89        if test "$PDFLATEX" != "no"; then
90                build_doc=yes
91        else
92                build_doc="html only"
93        fi
[6e1d45d]94fi
95AM_CONDITIONAL([USE_PANDOC], [test "$PANDOC" != "no"])
96AM_CONDITIONAL([USE_PDFLATEX], [test "$PANDOC" != "no" && \
97                               test "$PDFLATEX" != "no"])
98
[af7da2d]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 \
[52c3f68]103                     PATH. Test suite will fail.])
104fi
105
[fd82e59]106MODULE_CFLAGS="${LIBGNUTLS_CFLAGS} ${SRP_CFLAGS} ${MSVA_CFLAGS} ${APR_MEMCACHE_CFLAGS} ${APXS_CFLAGS} ${AP_INCLUDES} ${APR_INCLUDES} ${APU_INCLUDES} ${STRICT_CFLAGS}"
[5021874]107MODULE_LIBS="${APR_MEMCACHE_LIBS} ${LIBGNUTLS_LIBS}"
[9706fc2]108
109AC_SUBST(MODULE_CFLAGS)
[16068f4]110AC_SUBST(MODULE_LIBS)
[9706fc2]111
[26081ce]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
[6e1d45d]122AC_CONFIG_FILES([Makefile src/Makefile test/Makefile test/tests/Makefile \
123                          doc/Makefile include/mod_gnutls.h])
[9706fc2]124AC_OUTPUT
125
126echo "---"
[42307a9]127echo "Configuration summary for mod_gnutls:"
[9706fc2]128echo ""
[ea14e97]129echo "   * mod_gnutls version:  ${MOD_GNUTLS_VERSION}"
[16068f4]130echo "   * Apache Modules directory:    ${AP_LIBEXECDIR}"
[42307a9]131echo "   * GnuTLS Library version:      ${LIBGNUTLS_VERSION}"
[28f3f4f]132echo "   * SRP Authentication:  ${use_srp}"
133echo "   * MSVA Client Verification:    ${use_msva}"
134echo "   * Build documentation: ${build_doc}"
[9706fc2]135echo ""
136echo "---"
Note: See TracBrowser for help on using the repository browser.