diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2014-11-06 22:43:19 -0500 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2014-11-19 22:31:10 -0500 |
commit | cdd36c6c5cc309d98f941a4c78d9642c92c1e46f (patch) | |
tree | c9353c4c25f1ea004c70af2d2d5fe70c34fb3b81 | |
parent | 2cf5f16c25ac81eac3a09c4f15dad9d2154c03d4 (diff) |
build: add --with-libs so that libs are optional
-rw-r--r-- | configure.ac | 17 | ||||
-rw-r--r-- | src/Makefile.am | 6 | ||||
-rw-r--r-- | src/Makefile.test.include | 2 |
3 files changed, 22 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index e2efdf203b..7a00d57ae9 100644 --- a/configure.ac +++ b/configure.ac @@ -610,6 +610,12 @@ AC_ARG_WITH([utils], [build_bitcoin_utils=$withval], [build_bitcoin_utils=yes]) +AC_ARG_WITH([libs], + [AS_HELP_STRING([--with-libs], + [build libraries (default=yes)])], + [build_bitcoin_libs=$withval], + [build_bitcoin_libs=yes]) + AC_ARG_WITH([daemon], [AS_HELP_STRING([--with-daemon], [build bitcoind daemon (default=yes)])], @@ -660,6 +666,13 @@ AC_MSG_CHECKING([whether to build utils (bitcoin-cli bitcoin-tx)]) AM_CONDITIONAL([BUILD_BITCOIN_UTILS], [test x$build_bitcoin_utils = xyes]) AC_MSG_RESULT($build_bitcoin_utils) +AC_MSG_CHECKING([whether to build libraries]) +AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test x$build_bitcoin_libs = xyes]) +if test x$build_bitcoin_libs = xyes; then + AC_DEFINE(HAVE_CONSENSUS_LIB, 1, [Define this symbol if the consensus lib has been built]) +fi +AC_MSG_RESULT($build_bitcoin_libs) + dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4]) @@ -776,8 +789,8 @@ else AC_MSG_RESULT([no]) fi -if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then - AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-daemon --with-gui or --enable-tests]) +if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then + AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui or --enable-tests]) fi AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin]) diff --git a/src/Makefile.am b/src/Makefile.am index 63f2375c86..0d45203c90 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -49,7 +49,12 @@ BITCOIN_INCLUDES += $(BDB_CPPFLAGS) noinst_LIBRARIES += libbitcoin_wallet.a endif +if BUILD_BITCOIN_LIBS lib_LTLIBRARIES = libbitcoinconsensus.la +LIBBITCOIN_CONSENSUS=libbitcoinconsensus.la +else +LIBBITCOIN_CONSENSUS= +endif bin_PROGRAMS = TESTS = @@ -361,6 +366,7 @@ libbitcoinconsensus_la_CPPFLAGS = $(CRYPTO_CFLAGS) -I$(builddir)/obj -DBUILD_BIT if USE_LIBSECP256K1 libbitcoinconsensus_la_LIBADD += secp256k1/libsecp256k1.la endif +endif CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno diff --git a/src/Makefile.test.include b/src/Makefile.test.include index f8711f0387..5fd2afe50d 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -85,7 +85,7 @@ if ENABLE_WALLET test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET) endif -test_test_bitcoin_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) +test_test_bitcoin_LDADD += $(LIBBITCOIN_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static-libtool-libs nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES) |