Fix for fetchedResultsController getter, haslib() and ability to turn off libsodium.
This commit is contained in:
@@ -40,6 +40,7 @@ fi
|
||||
|
||||
# Optional features.
|
||||
mpw_color=${mpw_color:-1} # Colorized Identicon, requires libncurses-dev.
|
||||
mpw_sodium=${mpw_sodium:-1} # Use libsodium if available instead of cperciva's libscrypt.
|
||||
|
||||
# Default build flags.
|
||||
export CFLAGS="-O3 $CFLAGS"
|
||||
@@ -213,7 +214,7 @@ depend() {
|
||||
popd
|
||||
}
|
||||
depend_scrypt() {
|
||||
if haslib sodium; then
|
||||
if (( mpw_sodium )) && haslib sodium; then
|
||||
if [[ $CFLAGS != *HAS_SODIUM=1* ]]; then
|
||||
CFLAGS+=" -DHAS_SODIUM=1"
|
||||
LDFLAGS+=" -lsodium"
|
||||
@@ -339,7 +340,7 @@ mpw-tests() {
|
||||
### TARGETS
|
||||
|
||||
haslib() {
|
||||
return cc -l"$1" -x c -o /dev/null - <<< 'int main() { return 0; }'
|
||||
cc -l"$1" -x c -o /dev/null - <<< 'int main() { return 0; }'
|
||||
}
|
||||
cc() {
|
||||
if hash llvm-gcc 2>/dev/null; then
|
||||
|
Reference in New Issue
Block a user