mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
Makefile: work with shasum -a as well as sha256sum.
At least on my Ubuntu box, they're compatible. If they're not, we need to disable regeneration altogether. Fixes: #4075 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
d9ba39d2cb
commit
4e67b4fd03
12
configure
vendored
12
configure
vendored
@@ -83,7 +83,7 @@ check_command()
|
||||
shift 1
|
||||
|
||||
echo -n "checking for $name... "
|
||||
if "$@" 2>/dev/null; then
|
||||
if "$@" >/dev/null 2>&1; then
|
||||
echo 'found'
|
||||
return 0
|
||||
fi
|
||||
@@ -366,6 +366,15 @@ else
|
||||
HAVE_PYTHON3_MAKO=0
|
||||
fi
|
||||
|
||||
if echo | check_command sha256sum sha256sum; then
|
||||
SHA256SUM=sha256sum
|
||||
elif echo | check_command "shasum -a 256" shasum -a 256; then
|
||||
SHA256SUM="shasum -a 256"
|
||||
else
|
||||
echo "*** We need sha256sum or shasum -a 256!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Now we can finally set our warning flags
|
||||
if [ -z ${CWARNFLAGS+x} ]; then
|
||||
CWARNFLAGS=$(default_cwarnflags "$COPTFLAGS" \
|
||||
@@ -392,6 +401,7 @@ add_var STATIC "$STATIC"
|
||||
add_var ASAN "$ASAN"
|
||||
add_var TEST_NETWORK "$TEST_NETWORK"
|
||||
add_var HAVE_PYTHON3_MAKO "$HAVE_PYTHON3_MAKO"
|
||||
add_var SHA256SUM "$SHA256SUM"
|
||||
|
||||
# Hack to avoid sha256 name clash with libwally: will be fixed when that
|
||||
# becomes a standalone shared lib.
|
||||
|
||||
Reference in New Issue
Block a user