summaryrefslogtreecommitdiff
path: root/lib/gnulib.mk
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-12-08 00:05:36 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2013-12-08 00:05:36 -0800
commite9551b12f8c17876a32e1cd075c83af3e7950980 (patch)
treea1130605fdba681c9118c71f5edd4ee2b9ef4c51 /lib/gnulib.mk
parent02033d491fa708e28bb3568ff85dab4d0ceb076b (diff)
downloademacs-e9551b12f8c17876a32e1cd075c83af3e7950980.tar.gz
Use libcrypto's checksum implementations if available, for speed.
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 <http://lists.gnu.org/archive/html/bug-gnulib/2013-12/msg00000.html>. 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.
Diffstat (limited to 'lib/gnulib.mk')
-rw-r--r--lib/gnulib.mk17
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
index 44cdc0cdaac..9617452a796 100644
--- a/lib/gnulib.mk
+++ b/lib/gnulib.mk
@@ -33,6 +33,15 @@ libgnu_a_LIBADD = $(gl_LIBOBJS)
libgnu_a_DEPENDENCIES = $(gl_LIBOBJS)
EXTRA_libgnu_a_SOURCES =
+## begin gnulib module absolute-header
+
+# Use this preprocessor expression to decide whether #include_next works.
+# Do not rely on a 'configure'-time test for this, since the expression
+# might appear in an installed header, which is used by some other compiler.
+HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER)
+
+## end gnulib module absolute-header
+
## begin gnulib module alloca-opt
BUILT_SOURCES += $(ALLOCA_H)
@@ -152,7 +161,7 @@ EXTRA_DIST += count-trailing-zeros.h
libgnu_a_SOURCES += md5.c
-EXTRA_DIST += md5.h
+EXTRA_DIST += gl_openssl.h md5.h
## end gnulib module crypto/md5
@@ -160,7 +169,7 @@ EXTRA_DIST += md5.h
libgnu_a_SOURCES += sha1.c
-EXTRA_DIST += sha1.h
+EXTRA_DIST += gl_openssl.h sha1.h
## end gnulib module crypto/sha1
@@ -168,7 +177,7 @@ EXTRA_DIST += sha1.h
libgnu_a_SOURCES += sha256.c
-EXTRA_DIST += sha256.h
+EXTRA_DIST += gl_openssl.h sha256.h
## end gnulib module crypto/sha256
@@ -176,7 +185,7 @@ EXTRA_DIST += sha256.h
libgnu_a_SOURCES += sha512.c
-EXTRA_DIST += sha512.h
+EXTRA_DIST += gl_openssl.h sha512.h
## end gnulib module crypto/sha512