44
48
[pandora_cv_libmemcached_server_fn=yes],
45
49
[pandora_cv_libmemcached_server_fn=no])])
46
51
AS_IF([test "x$pandora_cv_libmemcached_server_fn" = "xyes"],[
47
52
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([[
56
AC_DEFUN([_PANDORA_RECENT_LIBMEMCACHED],[
58
AC_CACHE_CHECK([if libmemcached is recent enough],
59
[pandora_cv_recent_libmemcached],[
60
AS_IF([test "x${ac_cv_libmemcached}" = "xno"],[
61
pandora_cv_recent_libmemcached=no
63
AS_IF([test "x$1" != "x"],[
64
pandora_need_libmemcached_version=`echo "$1" | perl -nle '/(\d+)\.(\d+)/; printf "%d%0.3d000", $[]1, $[]2 ;'`
65
AS_IF([test "x${pandora_need_libmemcached_version}" = "x0000000"],[
66
pandora_cv_recent_libmemcached=yes
68
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
58
69
#include <libmemcached/configure.h>
60
71
#if !defined(LIBMEMCACHED_VERSION_HEX) || LIBMEMCACHED_VERSION_HEX < 0x]]${pandora_need_libmemcached_version}[[
61
72
# error libmemcached too old!
65
pandora_cv_recent_libmemcached=yes
67
pandora_cv_recent_libmemcached=no
76
pandora_cv_recent_libmemcached=yes
78
pandora_cv_recent_libmemcached=no
82
pandora_cv_recent_libmemcached=yes
71
AS_IF([test "x${pandora_cv_recent_libmemcached}" = "xno"],[
73
ac_cv_libmemcachedprotocol=no
78
AM_CONDITIONAL(HAVE_LIBMEMCACHED, [test "x${ac_cv_libmemcached}" = "xyes"])
87
AM_CONDITIONAL(HAVE_LIBMEMCACHED,[test "x${ac_cv_libmemcached}" = "xyes" -a "x${pandora_cv_recent_libmemcached}" = "xyes"])
82
91
AC_DEFUN([PANDORA_HAVE_LIBMEMCACHED],[
83
_PANDORA_SEARCH_LIBMEMCACHED($1)
92
AC_REQUIRE([_PANDORA_SEARCH_LIBMEMCACHED])
93
_PANDORA_RECENT_LIBMEMCACHED($1)
86
96
AC_DEFUN([PANDORA_REQUIRE_LIBMEMCACHED],[
87
97
PANDORA_HAVE_LIBMEMCACHED($1)
88
AS_IF([test x$ac_cv_libmemcached = xno],
98
AS_IF([test "x{$pandora_cv_recent_libmemcached}" = "xno"],
89
99
AC_MSG_ERROR([libmemcached is required for ${PACKAGE}]))