From 0c4292c637d437d2b92408c6cf3078e39b83054d Mon Sep 17 00:00:00 2001 From: Max Lv Date: Wed, 1 Feb 2017 22:51:39 +0800 Subject: [PATCH] Check version of libsodium --- m4/sodium.m4 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/m4/sodium.m4 b/m4/sodium.m4 index dd03503c..46d21db4 100644 --- a/m4/sodium.m4 +++ b/m4/sodium.m4 @@ -27,4 +27,14 @@ AC_DEFUN([ss_SODIUM], [AC_MSG_ERROR([The Sodium crypto library libraries not found.])] ) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + #include + ], [ + #if SODIUM_LIBRARY_VERSION_MAJOR < 9 + # error + #endif + ])], + [AC_MSG_RESULT([checking for version of libsodium... yes])], + [AC_MSG_ERROR([Wrong libsodium: version >= 1.0.9 required])]) + ])