mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
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.
This commit is contained in:
parent
00b511ed98
commit
c319172610
|
@ -371,20 +371,20 @@ else
|
|||
LDFLAGS_SAVE="$LDFLAGS"
|
||||
if test -n "$LIBSODIUM_SEARCH_LIBS"; then
|
||||
LDFLAGS="-L$LIBSODIUM_SEARCH_LIBS $LDFLAGS"
|
||||
AC_CHECK_LIB(sodium, randombytes_random,
|
||||
AC_CHECK_LIB(sodium, crypto_pwhash_scryptsalsa208sha256,
|
||||
[
|
||||
LIBSODIUM_LDFLAGS="-L$LIBSODIUM_SEARCH_LIBS"
|
||||
LIBSODIUM_LIBS="-lsodium"
|
||||
],
|
||||
[
|
||||
AC_MSG_ERROR([required library libsodium was not found in requested location $LIBSODIUM_SEARCH_LIBS])
|
||||
AC_MSG_ERROR([required library libsodium was not found in requested location $LIBSODIUM_SEARCH_LIBS or library version is too old])
|
||||
]
|
||||
)
|
||||
else
|
||||
AC_CHECK_LIB(sodium, randombytes_random,
|
||||
AC_CHECK_LIB(sodium, crypto_pwhash_scryptsalsa208sha256,
|
||||
[],
|
||||
[
|
||||
AC_MSG_ERROR([required library libsodium was not found on your system, please check http://download.libsodium.org/libsodium/releases/])
|
||||
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])
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user