source: mod_gnutls/m4/apr_memcache.m4 @ de80d66

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

Imported Upstream version 0.1.0

  • Property mode set to 100644
File size: 1.4 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
14dnl # Determine memcache lib directory
15if test -z $mc_path; then
16    test_paths="/usr/local /usr /usr/local/apache2"
17else
18    test_paths="${mc_path}"
19fi
20
21if test -n ${AP_PREFIX}; then
22    test_paths="${AP_PREFIX} ${test_paths}"
23fi
24
25for x in $test_paths ; do
26    AC_MSG_CHECKING([for apr_memcache library in ${x}/lib])
27    if test -f ${x}/lib/libapr_memcache.so; then
28        AC_MSG_RESULT([yes])
29        save_CFLAGS=$CFLAGS
30        save_LDFLAGS=$LDFLAGS
31        CFLAGS="$CFLAGS"
32        LDFLAGS="-L$x/lib $LDFLAGS"
33        AC_CHECK_LIB(apr_memcache, apr_memcache_create,
34            [
35            APR_MEMCACHE_LIBS="-L$x/lib -lapr_memcache"
36            APR_MEMCACHE_CFLAGS="-I$x/include/apr_memcache-0"
37            ])
38        CFLAGS=$save_CFLAGS
39        LDFLAGS=$save_LDFLAGS
40        break
41    else
42        AC_MSG_RESULT([no])
43    fi
44done
45
46AC_SUBST(APR_MEMCACHE_LIBS)
47AC_SUBST(APR_MEMCACHE_CFLAGS)
48
49if test -z "${APR_MEMCACHE_LIBS}"; then
50  AC_MSG_NOTICE([*** memcache library not found.])
51  ifelse([$2], , AC_MSG_ERROR([memcache library is required]), $2)
52else
53  AC_MSG_NOTICE([using '${APR_MEMCACHE_LIBS}' for memcache])
54  ifelse([$1], , , $1)
55fi
56])
Note: See TracBrowser for help on using the repository browser.