diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-06-24 12:42:28 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-06-24 12:42:29 +0200 |
commit | 389cd6c466486e670e6f9cd74d2cfdf46f392340 (patch) | |
tree | c4b10fac237c407badc8300b2d6116fe6a1ce7cb /external/unbound/dnscrypt/dnscrypt.m4 | |
parent | Merge pull request #2073 (diff) | |
parent | Upgrade unbound library (diff) | |
download | monero-389cd6c466486e670e6f9cd74d2cfdf46f392340.tar.xz |
Merge pull request #2089
a85b5759 Upgrade unbound library (Erik de Castro Lopo)
Diffstat (limited to 'external/unbound/dnscrypt/dnscrypt.m4')
-rw-r--r-- | external/unbound/dnscrypt/dnscrypt.m4 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/external/unbound/dnscrypt/dnscrypt.m4 b/external/unbound/dnscrypt/dnscrypt.m4 new file mode 100644 index 000000000..077d28221 --- /dev/null +++ b/external/unbound/dnscrypt/dnscrypt.m4 @@ -0,0 +1,25 @@ +# dnscrypt.m4 + +# dnsc_DNSCRYPT([action-if-true], [action-if-false]) +# -------------------------------------------------------------------------- +# Check for required dnscrypt libraries and add dnscrypt configure args. +AC_DEFUN([dnsc_DNSCRYPT], +[ + AC_ARG_ENABLE([dnscrypt], + AS_HELP_STRING([--enable-dnscrypt], + [Enable dnscrypt support (requires libsodium)]), + [opt_dnscrypt=$enableval], [opt_dnscrypt=no]) + + if test "x$opt_dnscrypt" != "xno"; then + AC_ARG_WITH([libsodium], AC_HELP_STRING([--with-libsodium=path], + [Path where libsodium is installed, for dnscrypt]), [ + CFLAGS="$CFLAGS -I$withval/include" + LDFLAGS="$LDFLAGS -L$withval/lib" + ]) + AC_SEARCH_LIBS([sodium_init], [sodium], [], + AC_MSG_ERROR([The sodium library was not found. Please install sodium!])) + $1 + else + $2 + fi +]) |