diff options
author | Julien Cristau <jcristau@debian.org> | 2009-10-14 23:51:22 +0200 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2009-10-15 01:18:03 +0200 |
commit | a60e676f1fd243c78859440b87652f523d3f2ec1 (patch) | |
tree | ddcb30f7c447e3ae420057ab1eef9351ff24da3a /configure.ac | |
parent | d2a6a395435919aff8943285f9cbfe6569a9728f (diff) |
Add libgcrypt as an option for SHA1
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: RĂ©mi Cardona <remi@gentoo.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 082f67de2..9888528b2 100644 --- a/configure.ac +++ b/configure.ac @@ -1282,7 +1282,7 @@ CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include' # SHA1 hashing AC_ARG_WITH([sha1], - [AS_HELP_STRING([--with-sha1=libmd|libcrypto], + [AS_HELP_STRING([--with-sha1=libmd|libgcrypt|libcrypto], [choose SHA1 implementation])]) AC_CHECK_LIB([md], [SHA1Init], [HAVE_LIBMD=yes]) if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then @@ -1296,6 +1296,15 @@ if test "x$with_sha1" = xlibmd; then [Use libmd SHA1 functions]) SHA1_LIBS=-lmd fi +AC_CHECK_LIB([gcrypt], [gcry_md_open], [HAVE_LIBGCRYPT=yes]) +if test "x$with_sha1" = x && test "x$HAVE_LIBGCRYPT" = xyes; then + with_sha1=libgcrypt +fi +if test "x$with_sha1" = xlibgcrypt; then + AC_DEFINE([HAVE_SHA1_IN_LIBGCRYPT], [1], + [Use libgcrypt SHA1 functions]) + SHA1_LIBS=-lgcrypt +fi # We don't need all of the OpenSSL libraries, just libcrypto AC_CHECK_LIB([crypto], [SHA1_Init], [HAVE_LIBCRYPTO=yes]) PKG_CHECK_MODULES([OPENSSL], [openssl], [HAVE_OPENSSL_PKC=yes], |