X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=configure.ac;h=887ba5642c54de48c782c1f5e469c74d944dc789;hp=f10df06c41a8d1d2ea82f99c1e002c9b35dd359a;hb=d7cba4993e5c7c06c655d9a1d903f889fdee8329;hpb=94da887fdc444b624e4736e860e9a1777c92e847 diff --git a/configure.ac b/configure.ac index f10df06..887ba56 100644 --- a/configure.ac +++ b/configure.ac @@ -92,6 +92,37 @@ if test "$libgcryptpath" != "no"; then AC_MSG_RESULT([no]) fi 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" -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 + AC_MSG_RESULT([yes]) + CFLAGS="$CFLAGS `$pkgconfigpath --cflags hiredis`" + HIREDIS_LIBS="`$pkgconfigpath --libs hiredis`" + AC_DEFINE([HAVE_HIREDIS],[1],[Define to 1 if hiredis is enabled]) + else + AC_MSG_RESULT([no. Version 0.10 required]) + if test "$hiredis" != "default"; then + AC_MSG_ERROR([hiredis libraries missing]) + fi + fi + else + 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 dnl ------ memcached memcached=default AC_SUBST([MEMCACHED_LIBS]) @@ -103,6 +134,7 @@ if test "$memcached" != "no" -a -n "$libgcryptversion" -a "$pkgconfigpath" != "N 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]) else