Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 80 additions & 35 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ for OPTION in "$@"; do
(--with-icu) WITH_ICU="yes";;
(--with-png) WITH_PNG="yes";;
(--with-qrencode) WITH_QRENCODE="yes";;

# Standard script options.
(--help) DISPLAY_HELP="yes";;
esac
done

Expand Down Expand Up @@ -268,36 +271,73 @@ if [[ $BUILD_BOOST ]]; then
with_boost="--with-boost=$PREFIX"
fi

# Echo generated values.
#------------------------------------------------------------------------------
display_message "Libbitcoin installer configuration."
display_message "--------------------------------------------------------------------"
display_message "OS : $OS"
display_message "PARALLEL : $PARALLEL"
display_message "CC : $CC"
display_message "CXX : $CXX"
display_message "CPPFLAGS : $CPPFLAGS"
display_message "CFLAGS : $CFLAGS"
display_message "CXXFLAGS : $CXXFLAGS"
display_message "LDFLAGS : $LDFLAGS"
display_message "LDLIBS : $LDLIBS"
display_message "WITH_ICU : $WITH_ICU"
display_message "WITH_PNG : $WITH_PNG"
display_message "WITH_QRENCODE : $WITH_QRENCODE"
display_message "BUILD_ICU : $BUILD_ICU"
display_message "BUILD_ZLIB : $BUILD_ZLIB"
display_message "BUILD_PNG : $BUILD_PNG"
display_message "BUILD_QRENCODE : $BUILD_QRENCODE"
display_message "BUILD_ZMQ : $BUILD_ZMQ"
display_message "BUILD_BOOST : $BUILD_BOOST"
display_message "PREFIX : $PREFIX"
display_message "BUILD_DIR : $BUILD_DIR"
display_message "DISABLE_SHARED : $DISABLE_SHARED"
display_message "DISABLE_STATIC : $DISABLE_STATIC"
display_message "with_boost : ${with_boost}"
display_message "with_pkgconfigdir : ${with_pkgconfigdir}"
display_message "--------------------------------------------------------------------"

display_configuration()
{
display_message "Libbitcoin installer configuration."
display_message "--------------------------------------------------------------------"
display_message "OS : $OS"
display_message "PARALLEL : $PARALLEL"
display_message "CC : $CC"
display_message "CXX : $CXX"
display_message "CPPFLAGS : $CPPFLAGS"
display_message "CFLAGS : $CFLAGS"
display_message "CXXFLAGS : $CXXFLAGS"
display_message "LDFLAGS : $LDFLAGS"
display_message "LDLIBS : $LDLIBS"
display_message "WITH_ICU : $WITH_ICU"
display_message "WITH_PNG : $WITH_PNG"
display_message "WITH_QRENCODE : $WITH_QRENCODE"
display_message "BUILD_ICU : $BUILD_ICU"
display_message "BUILD_ZLIB : $BUILD_ZLIB"
display_message "BUILD_PNG : $BUILD_PNG"
display_message "BUILD_QRENCODE : $BUILD_QRENCODE"
display_message "BUILD_ZMQ : $BUILD_ZMQ"
display_message "BUILD_BOOST : $BUILD_BOOST"
display_message "PREFIX : $PREFIX"
display_message "BUILD_DIR : $BUILD_DIR"
display_message "DISABLE_SHARED : $DISABLE_SHARED"
display_message "DISABLE_STATIC : $DISABLE_STATIC"
display_message "with_boost : ${with_boost}"
display_message "with_pkgconfigdir : ${with_pkgconfigdir}"
display_message "--------------------------------------------------------------------"
}
display_install_help()
{
display_message "Usage: ./install.sh [OPTION]..."
display_message "Manage the installation of libbitcoin-network."
display_message "Script options:"
display_message " --with-icu Compile with International Components for Unicode."
display_message " Since the addition of BIP-39 and later BIP-38 "
display_message " support, libbitcoin conditionally incorporates ICU "
display_message " to provide BIP-38 and BIP-39 passphrase "
display_message " normalization features. Currently "
display_message " libbitcoin-explorer is the only other library that "
display_message " accesses this feature, so if you do not intend to "
display_message " use passphrase normalization this dependency can "
display_message " be avoided."
display_message " --with-qrencode Compile with QR Code Support"
display_message " Since the addition of qrcode support, libbitcoin "
display_message " conditionally incorporates qrencode. Currently "
display_message " libbitcoin-explorer is the only other library that "
display_message " accesses this feature, so if you do not intend to "
display_message " use qrcode this dependency can be avoided."
display_message " --with-png Compile with QR Code PNG Output Support"
display_message " Since the addition of png support, libbitcoin "
display_message " conditionally incorporates libpng (which in turn "
display_message " requires zlib). Currently libbitcoin-explorer is "
display_message " the only other library that accesses this feature, "
display_message " so if you do not intend to use png this dependency "
display_message " can be avoided."
display_message " --build-boost Builds Boost libraries."
display_message " --build-dir=<path> Location of downloaded and intermediate files."
display_message " --prefix=<absolute-path> Library install location (defaults to /usr/local)."
display_message " --disable-shared Disables shared library builds."
display_message " --disable-static Disables static library builds."
display_message " --help Display usage, overriding script execution."
display_message ""
display_message "All unrecognized options provided shall be passed as configuration options for "
display_message "all dependencies."
}

# Define build options.
#==============================================================================
Expand Down Expand Up @@ -688,8 +728,13 @@ build_all()

# Build the primary library and all dependencies.
#==============================================================================
create_directory "$BUILD_DIR"
push_directory "$BUILD_DIR"
initialize_git
pop_directory
time build_all "${CONFIGURE_OPTIONS[@]}"
if [[ $DISPLAY_HELP ]]; then
display_install_help
else
display_configuration
create_directory "$BUILD_DIR"
push_directory "$BUILD_DIR"
initialize_git
pop_directory
time build_all "${CONFIGURE_OPTIONS[@]}"
fi