From a7f47e7142127f54821c018b8037841cc727c00e Mon Sep 17 00:00:00 2001 From: defanor Date: Thu, 28 Sep 2023 19:19:18 +0300 Subject: Support Nettle and OpenSSL for hashing, in addition to Libgcrypt --- configure.ac | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8515da1..bb25c33 100644 --- a/configure.ac +++ b/configure.ac @@ -38,10 +38,25 @@ AM_CONDITIONAL([USE_RUST], [test "x$with_rust" == "xyes"]) LT_INIT -# Libgcrypt +# Cryptographic libraries, for hashing + +AC_ARG_WITH([gcrypt], + AS_HELP_STRING([--without-gcrypt], [do not use gcrypt])) +AC_ARG_WITH([nettle], + AS_HELP_STRING([--without-nettle], [do not use nettle])) + +AS_IF([test "x$with_gcrypt" != "xno"], + [AM_PATH_LIBGCRYPT([], + [AC_DEFINE([HAVE_GCRYPT], [1], [Libgcrypt is available])])]) + +AS_IF([test "x$with_gcrypt" == "xno" -a "x$with_nettle" != "xno"], + [PKG_CHECK_MODULES([NETTLE], [nettle], + [AC_DEFINE([HAVE_NETTLE], [1], [Libnettle is available])])]) + +AS_IF([test "x$with_gcrypt" == "xno" -a "x$with_nettle" == "xno"], + [PKG_CHECK_MODULES([OPENSSL], [openssl], + [AC_DEFINE([HAVE_OPENSSL], [1], [OpenSSL is available])])]) -AM_PATH_LIBGCRYPT([], - [AC_DEFINE([HAVE_GCRYPT], [1], [Libgcrypt is available])]) # libnice (+ glib) and libsrtp for media calls, optional -- cgit v1.2.3