Optimize speed of icu_iter_get_org_info
[yaz-moved-to-github.git] / configure.ac
index 049b3ca..5374f34 100644 (file)
@@ -95,8 +95,9 @@ fi
 dnl ------ redis
 hiredis=default
 AC_SUBST([HIREDIS_LIBS])
-AC_ARG_WITH([redis], [  --with-redis        hiredis library], [hiredis=$withval])
-if test "$hiredis" != "no" -a "$pkgconfigpath" != "NONE"; then
+AC_ARG_WITH([redis], [  --with-redis            hiredis library], [hiredis=$withval])
+if test "$hiredis" != "no" -a "$pkgconfigpath" != "NONE" -a "$libgcryptversion"; then
+    AC_CHECK_LIB([hiredis],[redisCommandArgv],[HIREDIS_LIBS=-lhiredis])
     AC_MSG_CHECKING([for redis])
     if $pkgconfigpath --cflags hiredis >/dev/null 2>&1 ; then
        if $pkgconfigpath --atleast-version 0.10 hiredis; then
@@ -111,9 +112,14 @@ if test "$hiredis" != "no" -a "$pkgconfigpath" != "NONE"; then
             fi
        fi
     else
-       AC_MSG_RESULT([no])
-        if test "$hiredis" != "default"; then
-           AC_MSG_ERROR([hiredis libraries missing])
+       if test "$ac_cv_lib_hiredis_redisCommandArgv" = "yes"; then
+           AC_DEFINE([HAVE_HIREDIS],[1])
+           AC_MSG_RESULT([yes])
+       else
+           AC_MSG_RESULT([no])
+            if test "$hiredis" != "default"; then
+               AC_MSG_ERROR([hiredis libraries missing])
+           fi
        fi
     fi
 fi
@@ -124,23 +130,21 @@ AC_ARG_WITH([memcached], [  --with-memcached        Memcached library], [memcach
 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 1.0 libmemcached; 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_MEMCACHED_H],[1],[Define to 1 if memcached header])
-           AC_DEFINE([HAVE_MEMCACHED_FUNC],[1],[Define to 1 if memcached function  is defined])
-           AC_DEFINE([HAVE_MEMCACHED_RETURN_T],[1],[Define to 1 if memcached_return_t is defined])
+           AC_DEFINE([HAVE_LIBMEMCACHED],[1],[Define to 1 if memcached is enabled])
         else
-           AC_MSG_RESULT([no. Version 1.0 required])
+           AC_MSG_RESULT([no. Version 0.40 required])
             if test "$memcached" != "default"; then
-               AC_MSG_ERROR([libmemcached  libraries missing])
+               AC_MSG_ERROR([libmemcached libraries missing])
             fi
         fi
     else
        AC_MSG_RESULT([no])
         if test "$memcached" != "default"; then
-           AC_MSG_ERROR([libmemcached  libraries missing])
+           AC_MSG_ERROR([libmemcached libraries missing])
        fi
     fi
 fi