source: mod_gnutls/m4/apr_memcache.m4 @ 70c2d86

debian/masterdebian/stretch-backportsjessie-backportsupstream upstream/0.3.4
Last change on this file since 70c2d86 was 70c2d86, checked in by Daniel Kahn Gillmor <dkg@…>, 7 years ago

Imported Upstream version 0.3.4

  • Property mode set to 100644
File size: 1.5 KB
Line 
1dnl Check for memcache client libraries
2dnl CHECK_APR_MEMCACHE(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
3dnl Sets:
4dnl  APR_MEMCACHE_LIBS
5AC_DEFUN([CHECK_APR_MEMCACHE],
6[dnl
7
8AC_ARG_WITH(
9    apr-memcache,
10    [AC_HELP_STRING([--with-apr-memcache=PATH],[Path to apr_memcache prefix])],
11    mc_path="$withval",
12    :)
13
14AC_LIBTOOL_SYS_DYNAMIC_LINKER
15
16dnl # Determine memcache lib directory
17if test -z $mc_path; then
18    test_paths="/usr/local /usr /usr/local/apache2"
19else
20    test_paths="${mc_path}"
21fi
22
23if test -n ${AP_PREFIX}; then
24    test_paths="${AP_PREFIX} ${test_paths}"
25fi
26
27for x in $test_paths ; do
28    amc_shlib="${x}/libapr_memcache${shrext_cmds}"
29    AC_MSG_CHECKING([for apr_memcache library in ${x}/lib])
30    if test -f ${amc_shlib}; then
31        AC_MSG_RESULT([yes])
32        save_CFLAGS=$CFLAGS
33        save_LDFLAGS=$LDFLAGS
34        CFLAGS="$CFLAGS"
35        LDFLAGS="-L$x/lib $LDFLAGS"
36        AC_CHECK_LIB(apr_memcache, apr_memcache_create,
37            [
38            APR_MEMCACHE_LIBS="-R$x/lib -L$x/lib -lapr_memcache"
39            APR_MEMCACHE_CFLAGS="-I$x/include/apr_memcache-0"
40            ])
41        CFLAGS=$save_CFLAGS
42        LDFLAGS=$save_LDFLAGS
43        break
44    else
45        AC_MSG_RESULT([no])
46    fi
47done
48
49AC_SUBST(APR_MEMCACHE_LIBS)
50AC_SUBST(APR_MEMCACHE_CFLAGS)
51
52if test -z "${APR_MEMCACHE_LIBS}"; then
53  AC_MSG_NOTICE([*** memcache library not found.])
54  ifelse([$2], , AC_MSG_ERROR([memcache library is required]), $2)
55else
56  AC_MSG_NOTICE([using '${APR_MEMCACHE_LIBS}' for memcache])
57  ifelse([$1], , , $1)
58fi
59])
Note: See TracBrowser for help on using the repository browser.