mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
configure: use system libbase58 if available.
Also one less headache for reproducible builds. But unlike libsodium, this only seems common in Ubuntu. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- JSON API: `listpeers` now includes `funding_allocation_msat`, which returns a map of the amounts initially funded to the channel by each peer, indexed by channel id.
|
||||
- `option_data_loss_protect` is now enabled by default.
|
||||
- JSON API: `help` with a `command` argument gives a JSON array, like other commands.
|
||||
- build: we'll use the system libbase58 and libsodium if found suitable.
|
||||
|
||||
### Deprecated
|
||||
|
||||
|
||||
14
configure
vendored
14
configure
vendored
@@ -171,6 +171,20 @@ int main(void)
|
||||
exit(0);
|
||||
}
|
||||
/*END*/
|
||||
var=HAVE_SYSTEM_LIBBASE58
|
||||
desc=libbase58
|
||||
style=DEFINES_EVERYTHING|EXECUTE|MAY_NOT_COMPILE
|
||||
link=-lbase58
|
||||
code=
|
||||
#include <libbase58.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("%p\n", b58check);
|
||||
exit(0);
|
||||
}
|
||||
/*END*/
|
||||
EOF
|
||||
mv $CONFIG_VAR_FILE.$$ $CONFIG_VAR_FILE
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@ Get dependencies:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
autoconf automake build-essential git libtool libgmp-dev \
|
||||
libsqlite3-dev python python3 net-tools zlib1g-dev libsodium
|
||||
libsqlite3-dev python python3 net-tools zlib1g-dev libsodium \
|
||||
libbase58-dev
|
||||
|
||||
If you don't have Bitcoin installed locally you'll need to install that
|
||||
as well:
|
||||
|
||||
10
external/Makefile
vendored
10
external/Makefile
vendored
@@ -15,13 +15,12 @@ JSMN_HEADERS := external/jsmn/jsmn.h
|
||||
LIBBASE58_HEADERS := external/libbase58/libbase58.h
|
||||
|
||||
EXTERNAL_HEADERS := $(LIBSODIUM_HEADERS) $(LIBWALLY_HEADERS) $(LIBSECP_HEADERS) $(JSMN_HEADERS) $(LIBBASE58_HEADERS)
|
||||
EXTERNAL_LIBS := external/libwallycore.a external/libsecp256k1.a external/libjsmn.a external/libbase58.a external/libbacktrace.a
|
||||
EXTERNAL_LIBS := external/libwallycore.a external/libsecp256k1.a external/libjsmn.a external/libbacktrace.a
|
||||
|
||||
EXTERNAL_INCLUDE_FLAGS := \
|
||||
-I external/libwally-core/include/ \
|
||||
-I external/libwally-core/src/secp256k1/include/ \
|
||||
-I external/jsmn/ \
|
||||
-I external/libbase58/ \
|
||||
-I external/libbacktrace/ \
|
||||
-I external/libbacktrace-build
|
||||
|
||||
@@ -32,6 +31,13 @@ else
|
||||
LDLIBS += -lsodium
|
||||
endif
|
||||
|
||||
ifneq ($(HAVE_SYSTEM_LIBBASE58),1)
|
||||
EXTERNAL_INCLUDE_FLAGS += -I external/libbase58/
|
||||
EXTERNAL_LIBS += external/libbase58.a
|
||||
else
|
||||
LDLIBS += -lbase58
|
||||
endif
|
||||
|
||||
EXTERNAL_LDLIBS := -Lexternal $(patsubst lib%.a,-l%,$(notdir $(EXTERNAL_LIBS)))
|
||||
|
||||
submodcheck: FORCE
|
||||
|
||||
Reference in New Issue
Block a user