diff options
author | Stef Walter <stef@thewalter.net> | 2013-07-10 14:28:15 +0200 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2013-07-10 15:07:55 +0200 |
commit | edd04b610c1c83f26ed036569ad95b89a41fc558 (patch) | |
tree | 7ec7040b9ef612b36a399592c018c0a131ddfa75 /configure.ac | |
parent | eca5a6e491f5f85ba1f06afcea3177c3442ae557 (diff) |
Add support for using freebl3 for SHA1 and MD5 hashing
Since we don't want to link freebl3 to libp11-kit.so where it isn't
needed, move the SHA-1 and MD5 digest functionality to the trust/
directory.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 886d1eb..5eb6c2c 100644 --- a/configure.ac +++ b/configure.ac @@ -186,6 +186,38 @@ fi AM_CONDITIONAL(WITH_FFI, test "$with_libffi" = "yes") # -------------------------------------------------------------------- +# Hash implementation + +AC_ARG_WITH([hash-impl], + AS_HELP_STRING([--with-hash-impl=@<:@freebl/internal@:>@], + [Choose the hash implementation to use]) +) + +AS_IF([test "$with_hash_impl" = ""], [with_hash_impl=internal]) + +AS_CASE([$with_hash_impl], + [freebl], [ + AC_CHECK_LIB(freebl3, NSSLOW_Init, + [ + HASH_LIBS=-lfreebl3 + AC_DEFINE_UNQUOTED(WITH_FREEBL, 1, [Use freebl for hash implementation]) + ], + AC_MSG_ERROR([could not find the freebl3 library]) + ) + ], + + [internal], [ + HASH_LIBS= + ], + + [ + AC_MSG_ERROR([unsupported hash impl: $with_hash_impl]) + ] +) + +AC_SUBST(HASH_LIBS) + +# -------------------------------------------------------------------- # Trust Module AC_ARG_ENABLE([trust-module], @@ -483,6 +515,7 @@ AC_MSG_NOTICE([build options: With libtasn1 dependency: $with_libtasn1 With libffi: $with_libffi + With hash implementation: $with_hash_impl Build trust module: $enable_trust_module Trust module paths: $trust_status |