aboutsummaryrefslogtreecommitdiffstats
path: root/m4/apr_memcache.m4
diff options
context:
space:
mode:
authorGravatar Nikos Mavrogiannopoulos 2008-02-20 19:53:44 +0000
committerGravatar Nokis Mavrogiannopoulos 2008-02-20 19:53:44 +0000
commitabce2980c929dbb6ccb9d45c7cd88df3106c6ee4 (patch)
treeb71cda083d1ed8ceb2db2fb815eadf042295c348 /m4/apr_memcache.m4
parent572096be0da2690e3e32ad8fd19ae5758c870874 (diff)
added new m4 directory
Diffstat (limited to 'm4/apr_memcache.m4')
-rw-r--r--m4/apr_memcache.m456
1 files changed, 56 insertions, 0 deletions
diff --git a/m4/apr_memcache.m4 b/m4/apr_memcache.m4
new file mode 100644
index 0000000..71ab2b6
--- /dev/null
+++ b/m4/apr_memcache.m4
@@ -0,0 +1,56 @@
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])