source: mod_gnutls/m4/libmemcache.m4 @ abce298

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

added new m4 directory

  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[abce298]1dnl Check for memcache client libraries
2dnl CHECK_MEMCACHE(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
3AC_DEFUN([CHECK_MEMCACHE],
4[dnl
5
6AC_ARG_WITH(
7    memcache,
8    [AC_HELP_STRING([--with-memcache=PATH],[Path memcache libraries])],
9    mc_path="$withval",
10    :)
11
12dnl # Determine memcache lib directory
13if test -z $mc_path; then
14    test_paths="/usr/lib /usr/local/lib"
15else
16    test_paths="${mc_path}/lib"
17fi
18
19for x in $test_paths ; do
20    AC_MSG_CHECKING([for memcache library in ${x}])
21    if test -f ${x}/libmemcache.so.1.0; then
22        AC_MSG_RESULT([yes])
23        save_CFLAGS=$CFLAGS
24        save_LDFLAGS=$LDFLAGS
25        CFLAGS="$CFLAGS"
26        LDFLAGS="-L$x $LDFLAGS"
27        AC_CHECK_LIB(memcache, mc_server_add,
28            LIBMEMCACHE_LIBS="-L$x -lmemcache")
29        CFLAGS=$save_CFLAGS
30        LDFLAGS=$save_LDFLAGS
31        break
32    else
33        AC_MSG_RESULT([no])
34    fi
35done
36
37AC_SUBST(LIBMEMCACHE_LIBS)
38
39if test -z "${LIBMEMCACHE_LIBS}"; then
40  AC_MSG_NOTICE([*** memcache library not found.])
41  ifelse([$2], , AC_MSG_ERROR([memcache library is required]), $2)
42else
43  AC_MSG_NOTICE([using '${LIBMEMCACHE_LIBS}' for memcache])
44  ifelse([$1], , , $1)
45fi
46])
Note: See TracBrowser for help on using the repository browser.