Skip to content
Permalink
Browse files

[dnscrypt] move HAVE_XCHACHA20 define to dnscrypt.m4

  • Loading branch information...
chantra committed Jun 7, 2017
1 parent 9a50706 commit 418877019391fcf354674daf51b816cd27a36214
Showing with 17 additions and 4 deletions.
  1. +0 −4 dnscrypt/dnscrypt.h
  2. +11 −0 dnscrypt/dnscrypt.m4
  3. +6 −0 dnscrypt/dnscrypt_config.h.in
@@ -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;
@@ -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
])
@@ -14,4 +14,10 @@
# endif
#endif

#if @ENABLE_DNSCRYPT_XCHACHA20@ /* ENABLE_DNSCRYPT_XCHACHA20 */
# ifndef HAVE_XCHACHA20
# define HAVE_XCHACHA20 1
# endif
#endif

#endif /* UNBOUND_DNSCRYPT_CONFIG_H */

0 comments on commit 4188770

Please sign in to comment.
You can’t perform that action at this time.