+dnl
+dnl ------ nettle
+nettle=default
+AC_SUBST([NETTLE_LIBS])
+AC_ARG_WITH([nettle], [ --with-nettle Nettle library], [nettle=$withval])
+if test "$nettle" != "no"; then
+ AC_MSG_CHECKING([for nettle])
+ if $pkgconfigpath --cflags nettle >/dev/null 2>&1 ; then
+ if $pkgconfigpath --atleast-version 2.0 nettle; then
+ AC_MSG_RESULT([yes])
+ CFLAGS="$CFLAGS `$pkgconfigpath --cflags nettle`"
+ NETTLE_LIBS="`$pkgconfigpath --libs nettle`"
+ libgcryptversion=2enable
+ AC_DEFINE([HAVE_NETTLE],[1],[Define to 1 if nettle is enabled])
+ else
+ AC_MSG_RESULT([no. Version 2.0 required])
+ if test "$nettle" != "default"; then
+ AC_MSG_ERROR([nettle libraries missing])
+ fi
+ fi
+ else
+ AC_MSG_RESULT([no])
+ if test "$nettle" != "default"; then
+ AC_MSG_ERROR([nettle libraries missing])
+ fi
+ fi
+fi
+dnl
+dnl