From e313a5415241cd2b0a81ae4ac55a53b36ab153ff Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 2 Dec 2018 17:17:35 +0100 Subject: build: use system libsodium by default If libsodium is installed (i.e. pkg-config --variable=includedir libsodium returns a non-empty path), assume libsodium is installed and use it instead of libnacl. To use libnacl, set NACL_INC_DIR, NACL_LIBDIR and NACL_LIB accordingly. Signed-off-by: Tobias Klauser --- configure | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/configure b/configure index d5fe7e6..510826a 100755 --- a/configure +++ b/configure @@ -190,7 +190,7 @@ check_bison() check_nacl() { - echo -n "[*] Checking nacl ... " + echo -n "[*] Checking nacl/sodium ... " cat > $TMPDIR/nacltest.c << EOF #include "crypto_hash_sha512.h" @@ -204,7 +204,13 @@ int main(void) { } EOF if [ -z $NACL_INC_DIR ] ; then - NACL_INC_DIR="$SYSROOT/usr/include/nacl" + NACL_INC_DIR=$(pkg-config --variable=includedir libsodium) + if [ -z $NACL_INC_DIR ] ; then + NACL_INC_DIR="$SYSROOT/usr/include/nacl" + else + NACL_INC_DIR="$NACL_INC_DIR/sodium" + NACL_LIB="sodium" + fi fi if [ -z $NACL_LIB_DIR ] ; then -- cgit v1.2.3-54-g00ecf et-loop-back' selected='selected'>packet-loop-back net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
AgeCommit message (Expand)AuthorFilesLines