From e9551b12f8c17876a32e1cd075c83af3e7950980 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 8 Dec 2013 00:05:36 -0800 Subject: Use libcrypto's checksum implementations if available, for speed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On commonly used platform libcrypto uses architecture-specific assembly code, which is significantly faster than the C code we were using. See Pádraig Brady's note in . Merge from gnulib, incorporating: 2013-12-07 md5, sha1, sha256, sha512: add gl_SET_CRYPTO_CHECK_DEFAULT 2013-12-07 md5, sha1, sha256, sha512: add 'auto', and set-default method 2013-12-04 include_next: minimize code duplication 2013-12-03 md5, sha1, sha256, sha512: support mandating use of openssl 2013-12-02 md5, sha1, sha256, sha512: use openssl routines if available * configure.ac (--without-all): Set with_openssl_default too. Use gl_SET_CRYPTO_CHECK_DEFAULT to default to 'auto'. (HAVE_LIB_CRYPTO): New var. Say whether Emacs is configured to use a crypto library. * lib/gl_openssl.h, m4/absolute-header.m4, m4/gl-openssl.m4: New files, copied from gnulib. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * lib/md5.c, lib/md5.h, lib/sha1.c, lib/sha1.h: * lib/sha256.c, lib/sha256.h, lib/sha512.c, lib/sha512.h: * m4/include_next.m4, m4/md5.m4, m4/sha1.m4, m4/sha256.m4, m4/sha512.m4: Update from gnulib. * src/Makefile.in (LIB_CRYPTO): New macro. (LIBES): Use it. --- m4/md5.m4 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'm4/md5.m4') diff --git a/m4/md5.m4 b/m4/md5.m4 index 0ad6f504b53..541a26b5298 100644 --- a/m4/md5.m4 +++ b/m4/md5.m4 @@ -1,4 +1,4 @@ -# md5.m4 serial 13 +# md5.m4 serial 14 dnl Copyright (C) 2002-2006, 2008-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -8,5 +8,7 @@ AC_DEFUN([gl_MD5], [ dnl Prerequisites of lib/md5.c. AC_REQUIRE([gl_BIGENDIAN]) - : + + dnl Determine HAVE_OPENSSL_MD5 and LIB_CRYPTO + gl_CRYPTO_CHECK([MD5]) ]) -- cgit v1.2.1