source: mod_gnutls/m4/apr_memcache.m4 @ b71edd5

debian/masterdebian/stretch-backportsjessie-backportsmsvaupstream
Last change on this file since b71edd5 was abce298, checked in by Nokis Mavrogiannopoulos <nmav@…>, 12 years ago

added new m4 directory

  • Property mode set to 100644
File size: 1.6 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    apr_memcache_prefix="/usr",
13    :)
14AC_ARG_WITH(
15    apr-memcache-libs,
16    [AC_HELP_STRING([--with-apr-memcache-libs=PATH],[Path to apr_memcache libs])],
17    apr_memcache_libs="$withval",
18    apr_memcache_libs="$apr_memcache_prefix/lib"
19    :)
20AC_ARG_WITH(
21    apr-memcache-includes,
22    [AC_HELP_STRING([--with-apr-memcache-includes=PATH],[Path to apr_memcache includes])],
23    apr_memcache_includes="$withval",
24    apr_memcache_includes="$apr_memcache_prefix/include/apr_memcache-0"
25    :)
26
27
28AC_LIBTOOL_SYS_DYNAMIC_LINKER
29
30dnl # Determine memcache lib directory
31save_CFLAGS=$CFLAGS
32save_LDFLAGS=$LDFLAGS
33CFLAGS="-I$apr_memcache_includes $APR_INCLUDES $CFLAGS"
34LDFLAGS="-L$apr_memcache_libs $LDFLAGS"
35AC_CHECK_LIB(
36    apr_memcache,
37    apr_memcache_create,
38    [
39        APR_MEMCACHE_LIBS="-R$apr_memcache_libs -L$apr_memcache_libs -lapr_memcache"
40        APR_MEMCACHE_CFLAGS="-I$apr_memcache_includes"
41    ]
42)
43CFLAGS=$save_CFLAGS
44LDFLAGS=$save_LDFLAGS
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.