- Detect chacha for dnscrypt at configure time.

git-svn-id: file:///svn/unbound/trunk@4215 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2017-06-08 08:17:38 +00:00
parent b3b854072b
commit 33de42e729
5 changed files with 87 additions and 4 deletions
-4
View File
@@ -35,10 +35,6 @@
#define DNSCRYPT_REPLY_HEADER_SIZE \
(DNSCRYPT_MAGIC_HEADER_LEN + crypto_box_HALF_NONCEBYTES * 2 + crypto_box_MACBYTES)
#ifdef crypto_box_curve25519xchacha20poly1305_MACBYTES
# define HAVE_XCHACHA20 1
#endif
struct sldns_buffer;
struct config_file;
struct comm_reply;
+11
View File
@@ -18,8 +18,19 @@ AC_DEFUN([dnsc_DNSCRYPT],
])
AC_SEARCH_LIBS([sodium_init], [sodium], [],
AC_MSG_ERROR([The sodium library was not found. Please install sodium!]))
AC_SEARCH_LIBS([crypto_box_curve25519xchacha20poly1305_beforenm], [sodium],
[
AC_SUBST([ENABLE_DNSCRYPT_XCHACHA20], [1])
AC_DEFINE(
[USE_DNSCRYPT_XCHACHA20], [1],
[Define to 1 to enable dnscrypt with xchacha20 support])
],
[
AC_SUBST([ENABLE_DNSCRYPT_XCHACHA20], [0])
])
$1
else
AC_SUBST([ENABLE_DNSCRYPT_XCHACHA20], [0])
$2
fi
])