fi
AC_CHECK_FUNC([gethostbyname], ,[AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])])
dnl ------ libgcrypt
+AC_SUBST([GCRYPT_LIBS])
libgcryptpath=NONE
AC_ARG_WITH(libgcrypt, [ --with-libgcrypt=DIR use libgcrypt-config in DIR],[libgcryptpath=$withval])
if test "$libgcryptpath" != "no"; then
libgcryptversion2=`echo "$libgcryptversion" | awk 'BEGIN { FS = "."; } { printf "%d", [$]1 * 1000 + [$]2;}'`
AC_MSG_RESULT([$libgcryptversion])
if test $libgcryptversion2 -ge 1002; then
- LIBS="$LIBS `$libgcrypt --libs`"
+ GCRYPT_LIBS="`$libgcrypt --libs`"
CFLAGS="$CFLAGS `$libgcrypt --cflags`"
AC_DEFINE([HAVE_GCRYPT_H],[1],[Define to 1 if libgcrypt is present])
else
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"; then
- AC_CHECK_LIB([memcached],[memcached_get])
+ AC_CHECK_LIB([memcached],[memcached_get], [MEMCACHED_LIBS="-lmemcached"])
if test "$ac_cv_lib_memcached_memcached_get" = "yes"; then
AC_CHECK_HEADERS([libmemcached/memcached.h])
if test "$ac_cv_header_libmemcached_memcached_h" = "yes"; then
- AC_CHECK_FUNCS([memcached])
+ AC_CHECK_LIB([memcached],[memcached], [
+ AC_DEFINE([HAVE_MEMCACHED_FUNC],[1],[Define to 1 if memcached function is defined])])
AC_TRY_COMPILE(
[
#include <libmemcached/memcached.h>
YAZCOMP_I = $(YAZCOMP) -d $(srcdir)/ill.tcl -i yaz -I$(top_srcdir)/include
AM_CPPFLAGS=-I$(top_srcdir)/include $(XML2_CFLAGS) $(SSL_CFLAGS)
-libyaz_la_LIBADD = $(SSL_LIBS) $(TCPD_LIBS)
+libyaz_la_LIBADD = $(SSL_LIBS) $(TCPD_LIBS) $(GCRYPT_LIBS) $(MEMCACHED_LIBS)
libyaz_server_la_LIBADD = libyaz.la
libyaz_icu_la_CPPFLAGS = $(AM_CPPFLAGS) $(ICU_CPPFLAGS) -I$(top_srcdir)/libstemmer_c/include
libyaz_icu_la_LIBADD = libyaz.la $(ICU_LIBS)
ICU_LIBS="@ICU_LIBS@"
ICU_CPPFLAGS="@ICU_CPPFLAGS@"
SSL_LIBS="@SSL_LIBS@"
+GCRYPT_LIBS="@GCRYPT_LIBS@"
+MEMCACHED_LIBS="@MEMCACHED_LIBS@"
LIBS="@LIBS@"
VERSION=@VERSION@
YAZVERSION=$VERSION
else
YAZLIB="-L${build_root}/src/.libs $YAZLIB"
fi
- LIBS="${SSL_LIBS} $LIBS"
+ LIBS="${SSL_LIBS} ${GCRYPT_LIBS} ${MEMCACHED_LIBS} $LIBS"
YAZLIB="$YAZLIB $LIBS"
YAZLALIB="${build_root}/src/libyaz.la"