From 6d7b2ad54a57dc687ada16199ca290f79cbe5e42 Mon Sep 17 00:00:00 2001 From: Markus Teich Date: Wed, 13 Jul 2016 14:50:13 +0200 Subject: [PATCH] add compile time check for libgcrypt --- configure.ac | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/configure.ac b/configure.ac index 4064bef..cd03067 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,29 @@ AC_CHECK_HEADER(gcrypt.h, [], [AC_MSG_ERROR([unable to find the gcrypt.h header SAVE_LIBS=$LIBS +# libgcrypt +gcrypt=0 +NEED_LIBGCRYPT_API=1 +NEED_LIBGCRYPT_VERSION=1.7.0 + + +AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION", gcrypt=1) +AC_CHECK_DECLS([gcry_mpi_set_opaque_copy], [], [], [[#include ]]) + +if test $gcrypt = 0 +then + AC_MSG_ERROR([[ +*** +*** You need libgcrypt to build this program. +** This library is for example available at +*** ftp://ftp.gnupg.org/gcrypt/libgcrypt/ +*** (at least version $NEED_LIBGCRYPT_VERSION (API $NEED_LIBGCRYPT_API) +*** is required.) +***]]) +fi +AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [required libgcrypt version]) + +# libgnunetutil libgnunetutil=0 AC_MSG_CHECKING([for libgnunetutil]) AC_ARG_WITH(gnunet,