check for libsodium
authorFlorian Dold <florian.dold@gmail.com>
Wed, 6 May 2020 10:39:43 +0000 (16:09 +0530)
committerFlorian Dold <florian.dold@gmail.com>
Wed, 6 May 2020 13:16:49 +0000 (18:46 +0530)
configure.ac

index 089f0493c3188027524d37b87b9266fc7fb32e92..94c0a7689a01584372f618a661e9716c7249b41b 100644 (file)
@@ -1046,6 +1046,15 @@ AS_IF([test x$argon = x1],
  AC_MSG_ERROR([GNUnet requires argon2.])
 ])
 
+libsodium=0
+# test for libsodium
+AC_CHECK_HEADER([sodium.h],
+                [AC_CHECK_LIB([sodium], [sodium_init],
+                              [libsodium=1])])
+
+AS_IF([test x$libsodium = x0],
+      [AC_MSG_ERROR([GNUnet requires libsodium.])])
+
 # test for libextractor
 extractor=0
 AC_MSG_CHECKING(for libextractor)