47
47
AC_DEFINE([HAVE_MEMCACHED_SERVER_FN],[1],[If we have the new memcached_server_fn typedef])
50
AS_IF([test "x$1" != "x"],[
51
AC_CACHE_CHECK([if libmemcached is recent enough],
52
[pandora_cv_recent_libmemcached],[
53
pandora_need_libmemcached_version=`echo "$1" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d000", $[]1, $[]2 ;'`
54
AS_IF([test "x${pandora_need_libmemcached_version}" = "x0000000"],[
55
pandora_cv_recent_libmemcached=yes
57
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
58
#include <libmemcached/configure.h>
60
#if !defined(LIBMEMCACHED_VERSION_HEX) || LIBMEMCACHED_VERSION_HEX < 0x]]${pandora_need_libmemcached_version}[[
61
# error libmemcached too old!
65
pandora_cv_recent_libmemcached=yes
67
pandora_cv_recent_libmemcached=no
71
AS_IF([test "x${pandora_cv_recent_libmemcached}" = "xno"],[
73
ac_cv_libmemcachedprotocol=no
50
78
AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"])
54
82
AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[
55
AC_REQUIRE([_PANDORA_SEARCH_LIBMEMCACHED])
83
_PANDORA_SEARCH_LIBMEMCACHED($1)
58
86
AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHED],[
59
AC_REQUIRE([PANDORA_HAVE_LIBMEMCACHED])
87
PANDORA_HAVE_LIBMEMCACHED($1)
60
88
AS_IF([test x$ac_cv_libmemcached = xno],
61
89
AC_MSG_ERROR([libmemcached is required for ${PACKAGE}]))
64
92
AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHEDPROTOCOL],[
65
AC_REQUIRE([PANDORA_HAVE_LIBMEMCACHED])
93
PANDORA_HAVE_LIBMEMCACHED($1)
66
94
AS_IF([test x$ac_cv_libmemcachedprotocol = xno],
67
95
AC_MSG_ERROR([libmemcachedprotocol is required for ${PACKAGE}]))