Hi Werner, hi Andreas, Werner Koch wrote: > On Sat, 24 Jan 2009 17:49, [email protected] said: > >> GCRYPT_VERSION is expanded at libgwenhywfar build time to the version > > FWIW, I suggest [...]
Thank you very much for your suggestions. I've send the attached patch to the upstream developer. I hope he will integrate it into the official source of libgwenhywfar soon. Regards Micha
Index: src/crypt3/cryptkey.c
===================================================================
--- src/crypt3/cryptkey.c (Revision 1524)
+++ src/crypt3/cryptkey.c (Arbeitskopie)
@@ -33,11 +33,11 @@
int GWEN_Crypt3_ModuleInit() {
gcry_control(GCRYCTL_DISABLE_SECMEM, 0);
- if (!gcry_check_version (GCRYPT_VERSION)) {
+ if (!gcry_check_version (NEED_LIBGCRYPT_VERSION)) {
const char *gcrypt_version = gcry_check_version(0);
DBG_ERROR(GWEN_LOGDOMAIN, "Libgcrypt version mismatch: "
- "Gwen built with GCrypt %s, but running with GCrypt %s",
- GCRYPT_VERSION, gcrypt_version);
+ "Gwen needs GCrypt >= %s, but is running with GCrypt %s",
+ NEED_LIBGCRYPT_VERSION, gcrypt_version);
return GWEN_ERROR_GENERIC;
}
/*gcry_control(GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);*/
Index: configure.ac
===================================================================
--- configure.ac (Revision 1524)
+++ configure.ac (Arbeitskopie)
@@ -561,6 +561,10 @@
#
# check for libgcrypt
#
+NEED_LIBGCRYPT_API=1
+NEED_LIBGCRYPT_VERSION=1.4.0
+AC_DEFINE_UNQUOTED(NEED_LIBGCRYPT_VERSION, "$NEED_LIBGCRYPT_VERSION",
+ [Required version of Libgcrypt])
case "$OS_TYPE" in
windows)
LIBGCRYPT_CFLAGS=""
@@ -569,10 +573,12 @@
AC_SUBST(LIBGCRYPT_LIBS)
;;
*)
- AM_PATH_LIBGCRYPT([], [have_gcrypt="yes"], [have_gcrypt="no"])
+ AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION",
+ [have_gcrypt="yes"], [have_gcrypt="no"])
if test "$have_gcrypt" != "yes"; then
AC_MSG_ERROR([
- **** Libgcrypt is required for Gwenhywfar. Please install it (including devel packages)])
+ **** Libgcrypt is required for Gwenhywfar. Please install it (including devel packages)
+ **** (at least version $NEED_LIBGCRYPT_VERSION using API $NEED_LIBGCRYPT_API is required.)])
fi
;;
esac
signature.asc
Description: OpenPGP digital signature

