aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-04-10 12:54:37 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-04-10 12:55:12 -0400
commit1b307613604883daea4913a65da30ae073c9dc4d (patch)
treea24ce79427a9d07e26126f94eb78e3117ad3eeff /configure.ac
parent4eb1eeb02c57774b2de3e2d5fe3dab4f3da97ee0 (diff)
parentb919efadff3d0393f4a8c3c1dc735f7ac5c665bb (diff)
downloadbitcoin-1b307613604883daea4913a65da30ae073c9dc4d.tar.xz
Merge #16367: Multiprocess build support
b919efadff3d0393f4a8c3c1dc735f7ac5c665bb depends: Use default macos clang compiler (Russell Yanofsky) d54f64c6c700be0604190f52c84fc5f1cdd9f02f Add multiprocess travis configuration (Russell Yanofsky) 787f40668dc15980c3d6de028d7950c08175d84a Set LD_LIBRARY_PATH consistently in travis tests (Russell Yanofsky) d6306466626635e6fee44385e6a688c8dc118eb5 libmultiprocess depends build (Russell Yanofsky) e6e44eedd56ecaf59f3fabf8e07ab7dee0ddb1b6 Multiprocess build changes (Russell Yanofsky) Pull request description: This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). This splits autotools, depends build, and travis changes out of #10102, so code changes and build system changes can be reviewed separately. ACKs for top commit: hebasto: re-ACK b919efadff3d0393f4a8c3c1dc735f7ac5c665bb, rebased only since my [previous](https://github.com/bitcoin/bitcoin/pull/16367#issuecomment-605514556) review. Tree-SHA512: ebc5e403cc99a0d9629ed7fe1595e01d57e6d1255cbf03968a3196ff6f528f734c78060fdc065724ee1f923bcc5aa2b29470fcb36a7f15957eb57c76d58178a4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac63
1 files changed, 63 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4c9902efc6..6526c38da0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -230,6 +230,24 @@ if test x$enable_bip70 != xno; then
AC_MSG_ERROR([BIP70 is no longer supported!])
fi
+AC_ARG_WITH([libmultiprocess],
+ [AS_HELP_STRING([--with-libmultiprocess=yes|no|auto],
+ [Build with libmultiprocess library. (default: auto, i.e. detect with pkg-config)])],
+ [with_libmultiprocess=$withval],
+ [with_libmultiprocess=auto])
+
+AC_ARG_WITH([mpgen],
+ [AS_HELP_STRING([--with-mpgen=yes|no|auto|PREFIX],
+ [Build with libmultiprocess codegen tool. Useful to specify different libmultiprocess host system library and build system codegen tool prefixes when cross-compiling (default is host system libmultiprocess prefix)])],
+ [with_mpgen=$withval],
+ [with_mpgen=auto])
+
+AC_ARG_ENABLE([multiprocess],
+ [AS_HELP_STRING([--enable-multiprocess],
+ [build multiprocess bitcoin-node, bitcoin-wallet, and bitcoin-gui executables in addition to monolithic bitcoind and bitcoin-qt executables. Requires libmultiprocess library. Experimental (default is no)])],
+ [enable_multiprocess=$enableval],
+ [enable_multiprocess=no])
+
AC_ARG_ENABLE(man,
[AS_HELP_STRING([--disable-man],
[do not install man pages (default is to install)])],,
@@ -1369,6 +1387,50 @@ AM_CONDITIONAL([EMBEDDED_UNIVALUE],[test x$need_bundled_univalue = xyes])
AC_SUBST(UNIVALUE_CFLAGS)
AC_SUBST(UNIVALUE_LIBS)
+dnl libmultiprocess library check
+
+libmultiprocess_found=no
+if test "x$with_libmultiprocess" = xyes || test "x$with_libmultiprocess" = xauto; then
+ if test "x$use_pkgconfig" = xyes; then
+ m4_ifdef([PKG_CHECK_MODULES], [PKG_CHECK_MODULES([LIBMULTIPROCESS], [libmultiprocess], [
+ libmultiprocess_found=yes;
+ libmultiprocess_prefix=`$PKG_CONFIG --variable=prefix libmultiprocess`;
+ ], [true])])
+ fi
+elif test "x$with_libmultiprocess" != xno; then
+ AC_MSG_ERROR([--with-libmultiprocess=$with_libmultiprocess value is not yes, auto, or no])
+fi
+AC_SUBST(LIBMULTIPROCESS_CFLAGS)
+AC_SUBST(LIBMULTIPROCESS_LIBS)
+
+dnl Enable multiprocess check
+
+if test "x$enable_multiprocess" = xyes; then
+ if test "x$libmultiprocess_found" != xyes; then
+ AC_MSG_ERROR([--enable-multiprocess=yes option specified but libmultiprocess library was not found. May need to install libmultiprocess library, or specify install path with PKG_CONFIG_PATH environment variable. Running 'pkg-config --debug libmultiprocess' may be helpful for debugging.])
+ fi
+ build_multiprocess=yes
+elif test "x$enable_multiprocess" = xauto; then
+ build_multiprocess=$libmultiprocess_found
+else
+ build_multiprocess=no
+fi
+
+AM_CONDITIONAL([BUILD_MULTIPROCESS],[test "x$build_multiprocess" = xyes])
+AM_CONDITIONAL([BUILD_BITCOIN_NODE], [test "x$build_multiprocess" = xyes])
+AM_CONDITIONAL([BUILD_BITCOIN_GUI], [test "x$build_multiprocess" = xyes])
+
+dnl codegen tools check
+
+if test x$build_multiprocess != xno; then
+ if test "x$with_mpgen" = xyes || test "x$with_mpgen" = xauto; then
+ MPGEN_PREFIX="$libmultiprocess_prefix"
+ elif test "x$with_mpgen" != xno; then
+ MPGEN_PREFIX="$with_mpgen";
+ fi
+ AC_SUBST(MPGEN_PREFIX)
+fi
+
AC_MSG_CHECKING([whether to build bitcoind])
AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
AC_MSG_RESULT($build_bitcoind)
@@ -1650,6 +1712,7 @@ esac
echo
echo "Options used to compile and link:"
+echo " multiprocess = $build_multiprocess"
echo " with wallet = $enable_wallet"
echo " with gui / qt = $bitcoin_enable_qt"
if test x$bitcoin_enable_qt != xno; then