source: mod_gnutls/m4/apr_memcache.m4 @ e8acf05

debian/masterdebian/stretch-backportsjessie-backportsupstream
Last change on this file since e8acf05 was 0e277f2, checked in by Nokis Mavrogiannopoulos <nmav@…>, 12 years ago

added new apr_memcache.m4 from Guillaume Rousse

  • Property mode set to 100644
File size: 2.0 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-prefix,
10    [AC_HELP_STRING([--with-apr-memcache-prefix=PATH],[Install prefix for apr_memcache])],
11    apr_memcache_prefix="$withval",
12    :)
13AC_ARG_WITH(
14    apr-memcache-libs,
15    [AC_HELP_STRING([--with-apr-memcache-libs=PATH],[Path to apr_memcache libs])],
16    apr_memcache_libs="$withval",
17    :)
18AC_ARG_WITH(
19    apr-memcache-includes,
20    [AC_HELP_STRING([--with-apr-memcache-includes=PATH],[Path to apr_memcache includes])],
21    apr_memcache_includes="$withval",
22    :)
23
24
25AC_LIBTOOL_SYS_DYNAMIC_LINKER
26
27dnl # Determine memcache lib directory
28save_CFLAGS=$CFLAGS
29save_LDFLAGS=$LDFLAGS
30
31if test -n "$apr_memcache_libs"; then
32    apr_memcache_libdir=$apr_memcache_libs
33elif test -n "$apr_memcache_prefix"; then
34    apr_memcache_libdir=$apr_memcache_prefix/lib
35fi
36if test -n "$apr_memcache_libdir"; then
37    LDFLAGS="-L$apr_memcache_libdir $LDFLAGS"
38fi
39
40if test -n "$apr_memcache_includes"; then
41    apr_memcache_includedir=$apr_memcache_includes
42elif test -n "$apr_memcache_prefix"; then
43    apr_memcache_includedir=$apr_memcache_prefix/include/apr_memcache-0
44else
45    apr_memcache_includedir=$includedir/apr_memcache-0
46fi
47CFLAGS="-I$apr_memcache_includedir $CFLAGS"
48
49AC_CHECK_LIB(
50    apr_memcache,
51    apr_memcache_create,
52    [
53        APR_MEMCACHE_LIBS="-lapr_memcache"
54        if test -n "$apr_memcache_libdir"; then
55            APR_MEMCACHE_LIBS="-R$apr_memcache_libdir -L$apr_memcache_libdir $APR_MEMCACHE_LIBS"
56        fi
57        APR_MEMCACHE_CFLAGS="-I$apr_memcache_includedir"
58    ]
59)
60CFLAGS=$save_CFLAGS
61LDFLAGS=$save_LDFLAGS
62
63AC_SUBST(APR_MEMCACHE_LIBS)
64AC_SUBST(APR_MEMCACHE_CFLAGS)
65
66if test -z "${APR_MEMCACHE_LIBS}"; then
67  AC_MSG_NOTICE([*** memcache library not found.])
68  ifelse([$2], , AC_MSG_ERROR([memcache library is required]), $2)
69else
70  AC_MSG_NOTICE([using '${APR_MEMCACHE_LIBS}' for memcache])
71  ifelse([$1], , , $1)
72fi
73])
Note: See TracBrowser for help on using the repository browser.