source: mod_gnutls/configure.ac @ ddf6027

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

Test suite: Move Listen configuration to test/apache-conf/

This simplifies the base configuration a bit.

  • Property mode set to 100644
File size: 5.8 KB
RevLine 
[7bebb42]1dnl
[07cc51f]2AC_INIT(mod_gnutls, 0.7.2)
[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
[9a4d250]12# mod_gnutls test suite requires GNU make
13AM_INIT_AUTOMAKE([-Wno-portability])
[6e0bfd6]14AM_CONFIG_HEADER(include/mod_gnutls_config.h:config.in)
[9706fc2]15
[42307a9]16AC_SUBST(MOD_GNUTLS_VERSION)
[9706fc2]17
18AC_PROG_CC
[dff03fa]19AC_PROG_CC_C99
[9706fc2]20AC_PROG_LD
21AC_PROG_INSTALL
[7bebb42]22AC_PROG_LIBTOOL
[9706fc2]23
[4aec9a1]24AC_CONFIG_MACRO_DIR([m4])
25
[4038c7a]26AP_VERSION=2.2.0
[9706fc2]27CHECK_APACHE(,$AP_VERSION,
28    :,:,
29    AC_MSG_ERROR([*** Apache version $AP_VERSION not found!])
30)
31
[0de1839]32PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 3.1.4])
[cac3a7f]33
34LIBGNUTLS_VERSION=`pkg-config --modversion gnutls`
[16068f4]35
[787dab7]36AC_ARG_ENABLE(srp,
37       AS_HELP_STRING([--disable-srp],
38               [unconditionally disable the SRP functionality]),
39       use_srp=$enableval, use_srp=yes)
[b072204]40
[f71e6ce]41# check if the available GnuTLS library supports SRP
42AC_SEARCH_LIBS([gnutls_srp_server_get_username], [gnutls], [], [use_srp="no"])
43
[b072204]44SRP_CFLAGS=""
[787dab7]45if test "$use_srp" != "no"; then
[b27cce7]46        SRP_CFLAGS="-DENABLE_SRP=1"
[787dab7]47fi
[c70c6d7]48
[fd82e59]49AC_ARG_ENABLE(strict,
50       AS_HELP_STRING([--disable-strict],
51               [Avoid strict compiler warnings and errors]),
52       use_strict=$enableval, use_strict=yes)
53
54STRICT_CFLAGS=""
55if test "$use_strict" != "no"; then
56        STRICT_CFLAGS="-Wall -Werror -Wextra"
57fi
58
[787dab7]59AC_MSG_CHECKING([whether to enable SRP functionality])
60AC_MSG_RESULT($use_srp)
61
[412ee84]62dnl Optionally disable flock
63AC_ARG_ENABLE(flock,
[dff57b4]64        AS_HELP_STRING([--disable-flock], [Disable use of flock during tests \
65        (some exotic architectures don't support it)]),
[412ee84]66        [use_flock=$enableval], [use_flock=yes])
67dnl If flock is not disabled, make sure it's available
68if test "$enable_flock" != "no"; then
69        AC_PATH_PROG([FLOCK], [flock], [no])
70        use_flock=${FLOCK}
71fi
72AM_CONDITIONAL([DISABLE_FLOCK], [test "$enable_flock" = "no"])
73
[cf4e708]74dnl Enable test namespaces? Default is "yes".
75AC_ARG_ENABLE(test-namespaces,
76        AS_HELP_STRING([--disable-test-namespaces], [Disable use of network \
77        namespaces to run tests in parallel (some architectures might not \
78        support it)]),
79        [use_netns=$enableval], [use_netns=yes])
80dnl If namespaces are enabled, make sure "unshare" is available
81if test "$enable_test_namespaces" != "no"; then
82        AC_PATH_PROG([UNSHARE], [unshare], [no])
83        use_netns=${UNSHARE}
84        # default mutex breaks in namespace, use "pthread" instead
85        MUTEX_TYPE="pthread"
86        PID_AFFIX="-\${TEST_NAME}"
87else
88        MUTEX_TYPE="default"
89        PID_AFFIX=""
90fi
91AM_CONDITIONAL([ENABLE_NETNS], [test "$use_netns" != "no"])
92AC_SUBST(MUTEX_TYPE)
93AC_SUBST(PID_AFFIX)
94AM_SUBST_NOTMAKE(MUTEX_TYPE)
95AM_SUBST_NOTMAKE(PID_AFFIX)
96
[fa45dcb]97AC_ARG_ENABLE(msva,
98       AS_HELP_STRING([--enable-msva],
99               [enable Monkeysphere client certificate verification]),
100       use_msva=$enableval, use_msva=no)
[b27cce7]101AM_CONDITIONAL([USE_MSVA], [test "$use_msva" != "no"])
[fa45dcb]102
103MSVA_CFLAGS=""
104if test "$use_msva" != "no"; then
[b27cce7]105        AC_CHECK_HEADERS([msv/msv.h], [],
[fa45dcb]106                         [AC_MSG_ERROR([*** No libmsv headers found!])])
107        AC_SEARCH_LIBS([msv_query_agent], [msv], [],
108                         [AC_MSG_ERROR([*** No libmsv found with msv_query_agent!])])
[b27cce7]109        MSVA_CFLAGS="-DENABLE_MSVA=1"
[fa45dcb]110fi
111
112AC_MSG_CHECKING([whether to enable MSVA functionality])
113AC_MSG_RESULT($use_msva)
114
[6e0bfd6]115have_apr_memcache=0
116CHECK_APR_MEMCACHE([have_apr_memcache=1], [have_apr_memcache=0])
117AC_SUBST(have_apr_memcache)
[ed47098]118
[6e1d45d]119# Building documentation requires pandoc, which in turn needs pdflatex
120# to build PDF output.
[28f3f4f]121build_doc=no
[6e1d45d]122AC_PATH_PROG([PANDOC], [pandoc], [no])
123if test "$PANDOC" != "no"; then
124        AC_PATH_PROG([PDFLATEX], [pdflatex], [no])
[28f3f4f]125        if test "$PDFLATEX" != "no"; then
126                build_doc=yes
127        else
128                build_doc="html only"
129        fi
[7225749]130else
131        AC_PATH_PROG([MARKDOWN], [markdown], [no])
132        if test "$MARKDOWN" != "no"; then
133                build_doc="html stub"
134        fi
[6e1d45d]135fi
136AM_CONDITIONAL([USE_PANDOC], [test "$PANDOC" != "no"])
137AM_CONDITIONAL([USE_PDFLATEX], [test "$PANDOC" != "no" && \
138                               test "$PDFLATEX" != "no"])
[7225749]139AM_CONDITIONAL([USE_MARKDOWN], [test -n "$MARKDOWN" && \
140                               test "$MARKDOWN" != "no"])
[6e1d45d]141
[af7da2d]142# Check for Apache binary
[83b3901]143AC_PATH_PROGS([APACHE2], [apache2 httpd], [no], [$PATH:/usr/sbin])
[af7da2d]144if test "${APACHE2}" = "no"; then
145        AC_MSG_WARN([Neither apache2 nor httpd found in \
[52c3f68]146                     PATH. Test suite will fail.])
147fi
148
[fd82e59]149MODULE_CFLAGS="${LIBGNUTLS_CFLAGS} ${SRP_CFLAGS} ${MSVA_CFLAGS} ${APR_MEMCACHE_CFLAGS} ${APXS_CFLAGS} ${AP_INCLUDES} ${APR_INCLUDES} ${APU_INCLUDES} ${STRICT_CFLAGS}"
[5021874]150MODULE_LIBS="${APR_MEMCACHE_LIBS} ${LIBGNUTLS_LIBS}"
[9706fc2]151
152AC_SUBST(MODULE_CFLAGS)
[16068f4]153AC_SUBST(MODULE_LIBS)
[9706fc2]154
[26081ce]155# assign default values to TEST_HOST and TEST_IP if necessary
156: ${TEST_HOST:="localhost"}
[a08b25e]157: ${TEST_IP:="[[::1]] 127.0.0.1"}
[26081ce]158AC_ARG_VAR([TEST_HOST], [Host name to use for server instances started by \
[a08b25e]159                        "make check", must resolve to addresses in TEST_IP. \
160                        The default is "localhost".])
161AC_ARG_VAR([TEST_IP], [List of IP addresses to use for server instances \
162                      started by "make check". The default is \
163                      "[::1] 127.0.0.1". Note that IPv6 addresses must be \
164                      enclosed in square brackets.])
165AM_SUBST_NOTMAKE(TEST_IP)
166
167dnl Build list of "Listen" statements for Apache
168LISTEN_LIST="# Listen addresses for the test servers"
169for i in ${TEST_IP}; do
170        LISTEN_LIST="${LISTEN_LIST}
171Listen ${i}:\${TEST_PORT}"
172done
173AC_SUBST(LISTEN_LIST)
174AM_SUBST_NOTMAKE(LISTEN_LIST)
[26081ce]175
[6e1d45d]176AC_CONFIG_FILES([Makefile src/Makefile test/Makefile test/tests/Makefile \
[ddf6027]177                        doc/Makefile include/mod_gnutls.h \
178                        test/apache-conf/listen.conf \
179                        test/apache-conf/netns.conf])
[9706fc2]180AC_OUTPUT
181
182echo "---"
[42307a9]183echo "Configuration summary for mod_gnutls:"
[9706fc2]184echo ""
[ea14e97]185echo "   * mod_gnutls version:  ${MOD_GNUTLS_VERSION}"
[16068f4]186echo "   * Apache Modules directory:    ${AP_LIBEXECDIR}"
[42307a9]187echo "   * GnuTLS Library version:      ${LIBGNUTLS_VERSION}"
[28f3f4f]188echo "   * SRP Authentication:  ${use_srp}"
189echo "   * MSVA Client Verification:    ${use_msva}"
190echo "   * Build documentation: ${build_doc}"
[9706fc2]191echo ""
192echo "---"
Note: See TracBrowser for help on using the repository browser.