Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/configure.ac
Show First 20 Lines • Show All 169 Lines • ▼ Show 20 Lines | |||||
[window size for ecmult precomputation for verification, specified as integer in range [2..24].] | [window size for ecmult precomputation for verification, specified as integer in range [2..24].] | ||||
[Larger values result in possibly better performance at the cost of an exponentially larger precomputed table.] | [Larger values result in possibly better performance at the cost of an exponentially larger precomputed table.] | ||||
[The table will store 2^(SIZE-2) * 64 bytes of data but can be larger in memory due to platform-specific padding and alignment.] | [The table will store 2^(SIZE-2) * 64 bytes of data but can be larger in memory due to platform-specific padding and alignment.] | ||||
[If the endomorphism optimization is enabled, two tables of this size are used instead of only one.] | [If the endomorphism optimization is enabled, two tables of this size are used instead of only one.] | ||||
["auto" is a reasonable setting for desktop machines (currently 15). [default=auto]] | ["auto" is a reasonable setting for desktop machines (currently 15). [default=auto]] | ||||
)], | )], | ||||
[req_ecmult_window=$withval], [req_ecmult_window=auto]) | [req_ecmult_window=$withval], [req_ecmult_window=auto]) | ||||
AC_ARG_WITH([ecmult-gen-precision], [AS_HELP_STRING([--with-ecmult-gen-precision=2|4|8|auto], | |||||
[Precision bits to tune the precomputed table size for signing.] | |||||
[The size of the table is 32kB for 2 bits, 64kB for 4 bits, 512kB for 8 bits of precision.] | |||||
[A larger table size usually results in possible faster signing.] | |||||
["auto" is a reasonable setting for desktop machines (currently 4). [default=auto]] | |||||
)], | |||||
[req_ecmult_gen_precision=$withval], [req_ecmult_gen_precision=auto]) | |||||
AC_CHECK_TYPES([__int128]) | AC_CHECK_TYPES([__int128]) | ||||
if test x"$enable_coverage" = x"yes"; then | if test x"$enable_coverage" = x"yes"; then | ||||
AC_DEFINE(COVERAGE, 1, [Define this symbol to compile out all VERIFY code]) | AC_DEFINE(COVERAGE, 1, [Define this symbol to compile out all VERIFY code]) | ||||
CFLAGS="$CFLAGS -O0 --coverage" | CFLAGS="$CFLAGS -O0 --coverage" | ||||
LDFLAGS="$LDFLAGS --coverage" | LDFLAGS="$LDFLAGS --coverage" | ||||
else | else | ||||
CFLAGS="$CFLAGS -O3" | CFLAGS="$CFLAGS -O3" | ||||
▲ Show 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | *) | ||||
if test "$set_ecmult_window" -lt 2 -o "$set_ecmult_window" -gt 24 ; then | if test "$set_ecmult_window" -lt 2 -o "$set_ecmult_window" -gt 24 ; then | ||||
# not in range | # not in range | ||||
AC_MSG_ERROR($error_window_size) | AC_MSG_ERROR($error_window_size) | ||||
fi | fi | ||||
AC_DEFINE_UNQUOTED(ECMULT_WINDOW_SIZE, $set_ecmult_window, [Set window size for ecmult precomputation]) | AC_DEFINE_UNQUOTED(ECMULT_WINDOW_SIZE, $set_ecmult_window, [Set window size for ecmult precomputation]) | ||||
;; | ;; | ||||
esac | esac | ||||
#set ecmult gen precision | |||||
if test x"$req_ecmult_gen_precision" = x"auto"; then | |||||
set_ecmult_gen_precision=4 | |||||
else | |||||
set_ecmult_gen_precision=$req_ecmult_gen_precision | |||||
fi | |||||
case $set_ecmult_gen_precision in | |||||
2|4|8) | |||||
AC_DEFINE_UNQUOTED(ECMULT_GEN_PREC_BITS, $set_ecmult_gen_precision, [Set ecmult gen precision bits]) | |||||
;; | |||||
*) | |||||
AC_MSG_ERROR(['ecmult gen precision not 2, 4, 8 or "auto"']) | |||||
;; | |||||
esac | |||||
if test x"$use_tests" = x"yes"; then | if test x"$use_tests" = x"yes"; then | ||||
SECP_OPENSSL_CHECK | SECP_OPENSSL_CHECK | ||||
if test x"$has_openssl_ec" = x"yes"; then | if test x"$has_openssl_ec" = x"yes"; then | ||||
if test x"$enable_openssl_tests" != x"no"; then | if test x"$enable_openssl_tests" != x"no"; then | ||||
AC_DEFINE(ENABLE_OPENSSL_TESTS, 1, [Define this symbol if OpenSSL EC functions are available]) | AC_DEFINE(ENABLE_OPENSSL_TESTS, 1, [Define this symbol if OpenSSL EC functions are available]) | ||||
SECP_TEST_INCLUDES="$SSL_CFLAGS $CRYPTO_CFLAGS" | SECP_TEST_INCLUDES="$SSL_CFLAGS $CRYPTO_CFLAGS" | ||||
SECP_TEST_LIBS="$CRYPTO_LIBS" | SECP_TEST_LIBS="$CRYPTO_LIBS" | ||||
▲ Show 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | |||||
echo " module multiset = $enable_module_multiset" | echo " module multiset = $enable_module_multiset" | ||||
echo " module schnorr = $enable_module_schnorr" | echo " module schnorr = $enable_module_schnorr" | ||||
echo | echo | ||||
echo " asm = $set_asm" | echo " asm = $set_asm" | ||||
echo " bignum = $set_bignum" | echo " bignum = $set_bignum" | ||||
echo " field = $set_field" | echo " field = $set_field" | ||||
echo " scalar = $set_scalar" | echo " scalar = $set_scalar" | ||||
echo " ecmult window size = $set_ecmult_window" | echo " ecmult window size = $set_ecmult_window" | ||||
echo " ecmult gen prec. bits = $set_ecmult_gen_precision" | |||||
echo | echo | ||||
echo " CC = $CC" | echo " CC = $CC" | ||||
echo " CFLAGS = $CFLAGS" | echo " CFLAGS = $CFLAGS" | ||||
echo " CPPFLAGS = $CPPFLAGS" | echo " CPPFLAGS = $CPPFLAGS" | ||||
echo " LDFLAGS = $LDFLAGS" | echo " LDFLAGS = $LDFLAGS" | ||||
echo | echo |