Skip to content

Commit

Permalink
build: allow shared libbitcoinkernel but not by default
Browse files Browse the repository at this point in the history
This keeps libtool from building all objects twice by default.

To get shared libs, configure with --enable-shared. In that case two copies may
be built.

Note: this affects the libbitcoinconsensus build as well, users who require
shared libs should add --enable-shared.
  • Loading branch information
theuni committed Apr 25, 2022
1 parent ae94c62 commit 9ffbd70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ AC_PROG_OBJCXX
dnl OpenBSD ships with 2.4.2
LT_PREREQ([2.4.2])
dnl Libtool init checks.
LT_INIT([pic-only win32-dll])
LT_INIT([pic-only win32-dll disable-shared])

dnl Check/return PATH for base programs.
AC_PATH_TOOL([AR], [ar])
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ lib_LTLIBRARIES += $(LIBBITCOINKERNEL)
# TODO: For now, only build a static version of this library with -all-static.
# There are unresolved problems when building dll's on mingw-w64 and
# attempting to statically embed libstdc++, libpthread, etc.
libbitcoinkernel_la_LDFLAGS = $(AM_LDFLAGS) -all-static $(RELDFLAGS) $(PTHREAD_FLAGS)
libbitcoinkernel_la_LDFLAGS = $(AM_LDFLAGS) $(RELDFLAGS) $(PTHREAD_FLAGS) -no-undefined

libbitcoinkernel_la_LIBADD = $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) $(LIBSECP256K1)
libbitcoinkernel_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) -I$(srcdir)/$(UNIVALUE_INCLUDE_DIR_INT)
Expand Down

0 comments on commit 9ffbd70

Please sign in to comment.