+PKG_CHECK_MODULES([nettle], [nettle >= 2.4], [], [
+ ## That didn't work; unfortunately older Nettle packages don't have a
+ ## pkg-config dropping. Let's see whether it will work anyway.
+ nettlep=t
+ AC_CHECK_HEADER([nettle/sha.h], [], [nettlep=nil])
+ AC_CHECK_LIB([nettle], [nettle_sha256_init], [], [nettlep=nil])
+ case $nettlep in
+ nil) AC_MSG_ERROR([Failed to find Nettle library.]) ;;
+ esac
+ nettle_CFLAGS= nettle_LIBS=-lnettle])