summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2023-09-28 19:19:18 +0300
committerdefanor <defanor@uberspace.net>2023-09-28 19:19:18 +0300
commita7f47e7142127f54821c018b8037841cc727c00e (patch)
treea905ddbfacd9249d94413a9b6e81ec699183b41e /configure.ac
parent153439d434bc914bcfaac403da84e3e9f0bf1367 (diff)
Support Nettle and OpenSSL for hashing, in addition to Libgcrypt
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 18 insertions, 3 deletions
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