Changes in configure.ac [07cc51f:c6cfe6e] in mod_gnutls


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r07cc51f rc6cfe6e  
    11dnl
    2 AC_INIT(mod_gnutls, 0.7.2)
     2AC_INIT(mod_gnutls, 0.7.4)
    33OOO_CONFIG_NICE(config.nice)
    44MOD_GNUTLS_VERSION=AC_PACKAGE_VERSION
     
    5959AC_MSG_CHECKING([whether to enable SRP functionality])
    6060AC_MSG_RESULT($use_srp)
     61
     62dnl Optionally disable flock
     63AC_ARG_ENABLE(flock,
     64        AS_HELP_STRING([--disable-flock], [Disable use of flock during tests \
     65        (some exotic architectures don't support it)]),
     66        [use_flock=$enableval], [use_flock=yes])
     67# Check if flock is available and supports --timeout
     68AC_PATH_PROG([FLOCK], [flock], [no])
     69AS_IF([test "${FLOCK}" != "no"],
     70      [
     71        AC_MSG_CHECKING([whether ${FLOCK} supports --timeout])
     72        lockfile="$(mktemp)"
     73        AS_IF([${FLOCK} --timeout 1 ${lockfile} true >&AS_MESSAGE_LOG_FD 2>&1],
     74              [flock_works="yes"], [flock_works="no"])
     75        rm "${lockfile}"
     76        AC_MSG_RESULT([$flock_works])
     77      ],
     78      [flock_works="no"])
     79# disable flock if requested by user or it doesn't support timeout
     80AM_CONDITIONAL([DISABLE_FLOCK],
     81               [test "$enable_flock" = "no" || test "$flock_works" = "no"])
     82
     83dnl Enable test namespaces? Default is "yes".
     84AC_ARG_ENABLE(test-namespaces,
     85        AS_HELP_STRING([--disable-test-namespaces], [Disable use of network \
     86        namespaces to run tests in parallel (some architectures might not \
     87        support it)]),
     88        [use_netns=$enableval], [use_netns=yes])
     89
     90# Check if "unshare" is available and has permission to create network
     91# and user namespaces
     92AC_PATH_PROG([UNSHARE], [unshare], [no])
     93AS_IF([test "${UNSHARE}" != "no"],
     94      [
     95        AC_MSG_CHECKING([for permission to create network and user namespaces])
     96        AS_IF([${UNSHARE} --net -r /bin/sh -c \
     97                "ip link set up lo && ip addr show" >&AS_MESSAGE_LOG_FD 2>&1],
     98              [unshare_works="yes"], [unshare_works="no"])
     99        AC_MSG_RESULT([$unshare_works])
     100      ],
     101      [unshare_works="no"])
     102# decide whether to enable network namespaces
     103AS_IF([test "$enable_test_namespaces" != "no" \
     104            && test "$unshare_works" = "yes"],
     105      [use_netns="yes"], [use_netns="no"])
     106AM_CONDITIONAL([ENABLE_NETNS], [test "$use_netns" != "no"])
     107# Adjust Apache configuration for tests accordingly: Use pthread mutex
     108# and test specific PID files if using namespaces, defaults otherwise.
     109AS_IF([test "$use_netns" = "yes"],
     110      [MUTEX_TYPE="pthread"; PID_AFFIX="-\${TEST_NAME}"],
     111      [MUTEX_TYPE="default"; PID_AFFIX=""])
     112AC_SUBST(MUTEX_TYPE)
     113AC_SUBST(PID_AFFIX)
     114AM_SUBST_NOTMAKE(MUTEX_TYPE)
     115AM_SUBST_NOTMAKE(PID_AFFIX)
    61116
    62117AC_ARG_ENABLE(msva,
     
    93148                build_doc="html only"
    94149        fi
     150else
     151        AC_PATH_PROG([MARKDOWN], [markdown], [no])
     152        if test "$MARKDOWN" != "no"; then
     153                build_doc="html stub"
     154        fi
    95155fi
    96156AM_CONDITIONAL([USE_PANDOC], [test "$PANDOC" != "no"])
    97157AM_CONDITIONAL([USE_PDFLATEX], [test "$PANDOC" != "no" && \
    98158                               test "$PDFLATEX" != "no"])
     159AM_CONDITIONAL([USE_MARKDOWN], [test -n "$MARKDOWN" && \
     160                               test "$MARKDOWN" != "no"])
    99161
    100162# Check for Apache binary
     
    105167fi
    106168
     169AC_PATH_PROGS([HTTP_CLI], [curl wget], [no])
     170
    107171MODULE_CFLAGS="${LIBGNUTLS_CFLAGS} ${SRP_CFLAGS} ${MSVA_CFLAGS} ${APR_MEMCACHE_CFLAGS} ${APXS_CFLAGS} ${AP_INCLUDES} ${APR_INCLUDES} ${APU_INCLUDES} ${STRICT_CFLAGS}"
    108172MODULE_LIBS="${APR_MEMCACHE_LIBS} ${LIBGNUTLS_LIBS}"
    109173
     174AC_PATH_PROGS([SOFTHSM], [softhsm2-util softhsm], [no])
     175if test "${SOFTHSM}" != "no"; then
     176        softhsm_version=$(${SOFTHSM} --version)
     177        AS_VERSION_COMPARE([$(${SOFTHSM} --version)], [2.0.0],
     178                           [AC_SUBST(SOFTHSM_MAJOR_VERSION, [1])],
     179                           [AC_SUBST(SOFTHSM_MAJOR_VERSION, [2])],
     180                           [AC_SUBST(SOFTHSM_MAJOR_VERSION, [2])])
     181fi
     182AM_CONDITIONAL([HAVE_SOFTHSM], [test "${SOFTHSM}" != "no"])
     183AM_CONDITIONAL([HAVE_SOFTHSM1], [test "${SOFTHSM_MAJOR_VERSION}" = "1"])
     184AM_CONDITIONAL([HAVE_SOFTHSM2], [test "${SOFTHSM_MAJOR_VERSION}" = "2"])
     185
    110186AC_SUBST(MODULE_CFLAGS)
    111187AC_SUBST(MODULE_LIBS)
     
    113189# assign default values to TEST_HOST and TEST_IP if necessary
    114190: ${TEST_HOST:="localhost"}
    115 : ${TEST_IP:="[::1]"}
     191: ${TEST_IP:="[[::1]] 127.0.0.1"}
    116192AC_ARG_VAR([TEST_HOST], [Host name to use for server instances started by \
    117                         "make check", must resolve to TEST_IP. The default \
    118                         is "localhost".])
    119 AC_ARG_VAR([TEST_IP], [IP address to use for server instances started by \
    120                       "make check". The default is the IPv6 loopback address \
    121                       [::1].])
     193                        "make check", must resolve to addresses in TEST_IP. \
     194                        The default is "localhost".])
     195AC_ARG_VAR([TEST_IP], [List of IP addresses to use for server instances \
     196                      started by "make check". The default is \
     197                      "[::1] 127.0.0.1". Note that IPv6 addresses must be \
     198                      enclosed in square brackets.])
     199AM_SUBST_NOTMAKE(TEST_IP)
     200
     201dnl Allow user to set SoftHSM PKCS #11 module
     202AC_ARG_VAR([SOFTHSM_LIB], [Absolute path of the SoftHSM PKCS @%:@11 module to \
     203                          use. By default the test suite will search common \
     204                          library paths.])
     205
     206dnl Build list of "Listen" statements for Apache
     207LISTEN_LIST="# Listen addresses for the test servers"
     208for i in ${TEST_IP}; do
     209        LISTEN_LIST="${LISTEN_LIST}
     210Listen ${i}:\${TEST_PORT}"
     211done
     212dnl HTTP ports, only active if TEST_HTTP_PORT is defined
     213LISTEN_LIST="${LISTEN_LIST}
     214<IfDefine TEST_HTTP_PORT>"
     215for i in ${TEST_IP}; do
     216        LISTEN_LIST="${LISTEN_LIST}
     217        Listen ${i}:\${TEST_HTTP_PORT}"
     218done
     219LISTEN_LIST="${LISTEN_LIST}
     220</IfDefine>"
     221AC_SUBST(LISTEN_LIST)
     222AM_SUBST_NOTMAKE(LISTEN_LIST)
    122223
    123224AC_CONFIG_FILES([Makefile src/Makefile test/Makefile test/tests/Makefile \
    124                           doc/Makefile include/mod_gnutls.h])
     225                        doc/Makefile include/mod_gnutls.h \
     226                        test/proxy_backend.conf \
     227                        test/apache-conf/listen.conf \
     228                        test/apache-conf/netns.conf])
    125229AC_OUTPUT
    126230
Note: See TracChangeset for help on using the changeset viewer.