Mercurial > gnulib
changeset 37257:1334c5020392
md5, sha1, sha256, sha512: fix link error with partial libcrypto
* m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Only clear LIB_CRYPTO at
init time, so that if early checks find crypto routines,
while the last does not, then @LIB_CRYPTO@ is replaced correctly,
avoiding link failures.
author | Pádraig Brady <P@draigBrady.com> |
---|---|
date | Sun, 08 Dec 2013 23:19:29 +0000 |
parents | eb229536bb62 |
children | 5dbd0f1fcb90 |
files | ChangeLog m4/gc.m4 m4/gl-openssl.m4 |
diffstat | 3 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sat Dec 07 23:43:23 2013 -0800 +++ b/ChangeLog Sun Dec 08 23:19:29 2013 +0000 @@ -1,3 +1,11 @@ +2013-12-07 Pádraig Brady <P@draigBrady.com> + + md5, sha1, sha256, sha512: fix link error with partial libcrypto + * m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Only clear LIB_CRYPTO at + init time, so that if early checks find crypto routines, + while the last does not, then @LIB_CRYPTO@ is replaced correctly, + avoiding link failures. + 2013-12-07 Paul Eggert <eggert@cs.ucla.edu> md5, sha1, sha256, sha512: add gl_SET_CRYPTO_CHECK_DEFAULT
--- a/m4/gc.m4 Sat Dec 07 23:43:23 2013 -0800 +++ b/m4/gc.m4 Sun Dec 08 23:19:29 2013 +0000 @@ -6,7 +6,6 @@ AC_DEFUN([gl_GC], [ - LIB_CRYPTO= AC_SUBST([LIB_CRYPTO]) AC_ARG_WITH([libgcrypt], AS_HELP_STRING([--with-libgcrypt], [use libgcrypt for low-level crypto]),
--- a/m4/gl-openssl.m4 Sat Dec 07 23:43:23 2013 -0800 +++ b/m4/gl-openssl.m4 Sun Dec 08 23:19:29 2013 +0000 @@ -12,8 +12,12 @@ AC_DEFUN([gl_CRYPTO_CHECK], [ + dnl gnulib users set this before gl_INIT with gl_SET_CRYPTO_CHECK_DEFAULT() m4_divert_once([DEFAULTS], [with_openssl_default='gl_CRYPTO_CHECK_DEFAULT']) + dnl Only clear once, so crypto routines can be checked for individually + m4_divert_once([DEFAULTS], [LIB_CRYPTO=]) + AC_ARG_WITH([openssl], [AS_HELP_STRING([--with-openssl], [use libcrypto hash routines. Valid ARGs are: @@ -29,7 +33,6 @@ ALG_header=sha.h fi - LIB_CRYPTO= AC_SUBST([LIB_CRYPTO]) if test "x$with_openssl" != xno; then AC_CHECK_LIB([crypto], [$1],