Browse Source

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>
connected_hook
Rusty Russell 6 years ago
parent
commit
d413fc7e9b
  1. 1
      CHANGELOG.md
  2. 14
      configure
  3. 3
      doc/INSTALL.md
  4. 10
      external/Makefile

1
CHANGELOG.md

@ -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

@ -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

3
doc/INSTALL.md

@ -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

@ -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

Loading…
Cancel
Save