Skip to content

Commit

Permalink
Add --module-schnorrsig option to secp256k1 build.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Mar 9, 2021
1 parent a615b25 commit c3c0853
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions install.sh
Expand Up @@ -393,8 +393,9 @@ BOOST_OPTIONS=(
#------------------------------------------------------------------------------
SECP256K1_OPTIONS=(
"--disable-tests" \
"--enable-experimental" \
"--enable-module-recovery" \
"--enable-endomorphism")
"--enable-module-schnorrsig")

# Define bitcoin-system options.
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -577,7 +578,7 @@ build_from_tarball()
pop_directory
}

# Because boost ICU detection assumes in incorrect ICU path.
# Because boost ICU static lib detection assumes in incorrect ICU path.
circumvent_boost_icu_detection()
{
# Boost expects a directory structure for ICU which is incorrect.
Expand Down Expand Up @@ -617,27 +618,28 @@ initialize_boost_configuration()
}

# Because boost doesn't use pkg-config.
# The hacks below are still required as of boost 1.72.0.
initialize_boost_icu_configuration()
{
BOOST_ICU_ICONV="on"
BOOST_ICU_POSIX="on"

if [[ $WITH_ICU ]]; then
circumvent_boost_icu_detection

# Restrict other locale options when compiling boost with icu.
BOOST_ICU_ICONV="off"
BOOST_ICU_POSIX="off"

# Work around boost ICU static lib discovery bug.
circumvent_boost_icu_detection

# Extract ICU prefix directory from package config variable.
ICU_PREFIX=$(pkg-config icu-i18n --variable=prefix)

# Extract ICU libs from package config variables and augment with -ldl.
ICU_LIBS="$(pkg-config icu-i18n --libs) -ldl"

# This is a hack for boost m4 scripts that fail with ICU dependency.
# See custom edits in ax-boost-locale.m4 and ax_boost_regex.m4.
export BOOST_ICU_LIBS=("${ICU_LIBS[@]}")

# Extract ICU prefix directory from package config variable.
ICU_PREFIX=$(pkg-config icu-i18n --variable=prefix)
fi
}

Expand Down Expand Up @@ -705,14 +707,14 @@ build_from_tarball_boost()
# The zlib options prevent boost linkage to system libs in the case where
# we have built zlib in a prefix dir. Disabling zlib in boost is broken in
# all versions (through 1.61). There has been a patch pull request since
# 2015 but not merged as of 3/5/2021. svn.boost.org/trac/boost/ticket/9156
# 2015 but not merged as of 3/5/2021. svn.boost.org/trac/boost/ticket/9156
# The bzip2 auto-detection is not implemented, but disabling it works.

# boost_regex:
# As of boost 1.72.0 the ICU_LINK symbol is no longer supported and
# produces a hard stop if WITH_ICU is also defined. Removal is sufficient.
# github.com/libbitcoin/libbitcoin-system/issues/1192
# "-sICU_LINK=${ICU_LIBS[*]}" \
# "-sICU_LINK=${ICU_LIBS[*]}"

./b2 install \
"variant=release" \
Expand Down

0 comments on commit c3c0853

Please sign in to comment.