+ AC_MSG_RESULT([no])
+ if test "$hiredis" != "default"; then
+ AC_MSG_ERROR([hiredis libraries missing])
+ fi
+ fi
+ fi
+fi
+dnl ------ memcached
+memcached=default
+AC_SUBST([MEMCACHED_LIBS])
+AC_ARG_WITH([memcached], [ --with-memcached Memcached library], [memcached=$withval])
+if test "$memcached" != "no" -a -n "$libgcryptversion" -a "$pkgconfigpath" != "NONE"; then
+ AC_MSG_CHECKING([for libmemcached])
+ if $pkgconfigpath --cflags libmemcached >/dev/null 2>&1 ; then
+ if $pkgconfigpath --atleast-version 0.40 libmemcached; then
+ AC_MSG_RESULT([yes])
+ CFLAGS="$CFLAGS `$pkgconfigpath --cflags libmemcached`"
+ MEMCACHED_LIBS="`$pkgconfigpath --libs libmemcached`"
+ AC_DEFINE([HAVE_LIBMEMCACHED],[1],[Define to 1 if memcached is enabled])
+ else
+ AC_MSG_RESULT([no. Version 0.40 required])
+ if test "$memcached" != "default"; then
+ AC_MSG_ERROR([libmemcached libraries missing])
+ fi
+ fi
+ else
+ AC_MSG_RESULT([no])
+ if test "$memcached" != "default"; then
+ AC_MSG_ERROR([libmemcached libraries missing])
+ fi
+ fi
+fi
+dnl ------ GNU TLS
+AC_SUBST([SSL_CFLAGS])
+AC_SUBST([SSL_LIBS])
+gnutls=default
+AC_ARG_WITH([gnutls], [ --with-gnutls[=PREFIX] GNU TLS library in PREFIX], [gnutls=$withval])
+if test "$gnutls" != "no"; then
+ gnutlsver=no
+ if test "$gnutls" != "yes" -a "$gnutls" != "default"; then
+ if test -x $gnutls/bin/pkg-config; then
+ if $gnutls/bin/pkg-config --exists gnutls; then
+ SSL_CFLAGS=`$gnutls/bin/pkg-config --cflags gnutls`
+ SSL_LIBS="`$gnutls/bin/pkg-config --libs gnutls`"
+ gnutlsver=`$gnutls/bin/pkg-config --modversion gnutls`
+ fi