summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJin^eLD <jin@mediatomb.cc>2014-11-26 01:00:15 +0100
committerJin^eLD <jin@mediatomb.cc>2014-11-26 01:00:15 +0100
commitc3191726100fa691ccdf205cfeb0c54e8315a08f (patch)
treef9ab8ddaea06f1ec74706ff0d43c9aa58e615089 /configure.ac
parent00b511ed98b5abfb860f43682e893f23014f33b6 (diff)
Added check to ensure that the available libsodium library is compatible
Tox now uses some crypto_pwhash functions that are only available in the newer libsodium releases; check this in configure to prevent compile time errors.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 4 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index b694652d..93aecef6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -371,20 +371,20 @@ else
371 LDFLAGS_SAVE="$LDFLAGS" 371 LDFLAGS_SAVE="$LDFLAGS"
372 if test -n "$LIBSODIUM_SEARCH_LIBS"; then 372 if test -n "$LIBSODIUM_SEARCH_LIBS"; then
373 LDFLAGS="-L$LIBSODIUM_SEARCH_LIBS $LDFLAGS" 373 LDFLAGS="-L$LIBSODIUM_SEARCH_LIBS $LDFLAGS"
374 AC_CHECK_LIB(sodium, randombytes_random, 374 AC_CHECK_LIB(sodium, crypto_pwhash_scryptsalsa208sha256,
375 [ 375 [
376 LIBSODIUM_LDFLAGS="-L$LIBSODIUM_SEARCH_LIBS" 376 LIBSODIUM_LDFLAGS="-L$LIBSODIUM_SEARCH_LIBS"
377 LIBSODIUM_LIBS="-lsodium" 377 LIBSODIUM_LIBS="-lsodium"
378 ], 378 ],
379 [ 379 [
380 AC_MSG_ERROR([required library libsodium was not found in requested location $LIBSODIUM_SEARCH_LIBS]) 380 AC_MSG_ERROR([required library libsodium was not found in requested location $LIBSODIUM_SEARCH_LIBS or library version is too old])
381 ] 381 ]
382 ) 382 )
383 else 383 else
384 AC_CHECK_LIB(sodium, randombytes_random, 384 AC_CHECK_LIB(sodium, crypto_pwhash_scryptsalsa208sha256,
385 [], 385 [],
386 [ 386 [
387 AC_MSG_ERROR([required library libsodium was not found on your system, please check http://download.libsodium.org/libsodium/releases/]) 387 AC_MSG_ERROR([required library libsodium was not found on your system, please check http://download.libsodium.org/libsodium/releases/ or library version is too old])
388 ] 388 ]
389 ) 389 )
390 fi 390 fi