csecp256k1

Haskell FFI bindings to bitcoin-core/secp256k1 (docs.ppad.tech/csecp256k1).
git clone git://git.ppad.tech/csecp256k1.git
Log | Files | Refs | README | LICENSE

configure.ac (19548B)


      1 AC_PREREQ([2.60])
      2 
      3 # The package (a.k.a. release) version is based on semantic versioning 2.0.0 of
      4 # the API. All changes in experimental modules are treated as
      5 # backwards-compatible and therefore at most increase the minor version.
      6 define(_PKG_VERSION_MAJOR, 0)
      7 define(_PKG_VERSION_MINOR, 4)
      8 define(_PKG_VERSION_PATCH, 2)
      9 define(_PKG_VERSION_IS_RELEASE, false)
     10 
     11 # The library version is based on libtool versioning of the ABI. The set of
     12 # rules for updating the version can be found here:
     13 # https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
     14 # All changes in experimental modules are treated as if they don't affect the
     15 # interface and therefore only increase the revision.
     16 define(_LIB_VERSION_CURRENT, 3)
     17 define(_LIB_VERSION_REVISION, 2)
     18 define(_LIB_VERSION_AGE, 1)
     19 
     20 AC_INIT([libsecp256k1],m4_join([.], _PKG_VERSION_MAJOR, _PKG_VERSION_MINOR, _PKG_VERSION_PATCH)m4_if(_PKG_VERSION_IS_RELEASE, [true], [], [-dev]),[https://github.com/bitcoin-core/secp256k1/issues],[libsecp256k1],[https://github.com/bitcoin-core/secp256k1])
     21 
     22 AC_CONFIG_AUX_DIR([build-aux])
     23 AC_CONFIG_MACRO_DIR([build-aux/m4])
     24 AC_CANONICAL_HOST
     25 
     26 # Require Automake 1.11.2 for AM_PROG_AR
     27 AM_INIT_AUTOMAKE([1.11.2 foreign subdir-objects])
     28 
     29 # Make the compilation flags quiet unless V=1 is used.
     30 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
     31 
     32 if test "${CFLAGS+set}" = "set"; then
     33   CFLAGS_overridden=yes
     34 else
     35   CFLAGS_overridden=no
     36 fi
     37 AC_PROG_CC
     38 AM_PROG_AS
     39 AM_PROG_AR
     40 
     41 # Clear some cache variables as a workaround for a bug that appears due to a bad
     42 # interaction between AM_PROG_AR and LT_INIT when combining MSVC's archiver lib.exe.
     43 # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54421
     44 AS_UNSET(ac_cv_prog_AR)
     45 AS_UNSET(ac_cv_prog_ac_ct_AR)
     46 LT_INIT([win32-dll])
     47 
     48 build_windows=no
     49 
     50 case $host_os in
     51   *darwin*)
     52      if  test x$cross_compiling != xyes; then
     53        AC_CHECK_PROG([BREW], brew, brew)
     54        if test x$BREW = xbrew; then
     55          # These Homebrew packages may be keg-only, meaning that they won't be found
     56          # in expected paths because they may conflict with system files. Ask
     57          # Homebrew where each one is located, then adjust paths accordingly.
     58          if $BREW list --versions valgrind >/dev/null; then
     59            valgrind_prefix=$($BREW --prefix valgrind 2>/dev/null)
     60            VALGRIND_CPPFLAGS="-I$valgrind_prefix/include"
     61          fi
     62        else
     63          AC_CHECK_PROG([PORT], port, port)
     64          # If homebrew isn't installed and macports is, add the macports default paths
     65          # as a last resort.
     66          if test x$PORT = xport; then
     67            CPPFLAGS="$CPPFLAGS -isystem /opt/local/include"
     68            LDFLAGS="$LDFLAGS -L/opt/local/lib"
     69          fi
     70        fi
     71      fi
     72    ;;
     73    cygwin*|mingw*)
     74      build_windows=yes
     75    ;;
     76 esac
     77 
     78 # Try if some desirable compiler flags are supported and append them to SECP_CFLAGS.
     79 #
     80 # These are our own flags, so we append them to our own SECP_CFLAGS variable (instead of CFLAGS) as
     81 # recommended in the automake manual (Section "Flag Variables Ordering"). CFLAGS belongs to the user
     82 # and we are not supposed to touch it. In the Makefile, we will need to ensure that SECP_CFLAGS
     83 # is prepended to CFLAGS when invoking the compiler so that the user always has the last word (flag).
     84 #
     85 # Another advantage of not touching CFLAGS is that the contents of CFLAGS will be picked up by
     86 # libtool for compiling helper executables. For example, when compiling for Windows, libtool will
     87 # generate entire wrapper executables (instead of simple wrapper scripts as on Unix) to ensure
     88 # proper operation of uninstalled programs linked by libtool against the uninstalled shared library.
     89 # These executables are compiled from C source file for which our flags may not be appropriate,
     90 # e.g., -std=c89 flag has lead to undesirable warnings in the past.
     91 #
     92 # TODO We should analogously not touch CPPFLAGS and LDFLAGS but currently there are no issues.
     93 AC_DEFUN([SECP_TRY_APPEND_DEFAULT_CFLAGS], [
     94     # GCC and compatible (incl. clang)
     95     if test "x$GCC" = "xyes"; then
     96       # Try to append -Werror to CFLAGS temporarily. Otherwise checks for some unsupported
     97       # flags will succeed.
     98       # Note that failure to append -Werror does not necessarily mean that -Werror is not
     99       # supported. The compiler may already be warning about something unrelated, for example
    100       # about some path issue. If that is the case, -Werror cannot be used because all
    101       # of those warnings would be turned into errors.
    102       SECP_TRY_APPEND_DEFAULT_CFLAGS_saved_CFLAGS="$CFLAGS"
    103       SECP_TRY_APPEND_CFLAGS([-Werror], CFLAGS)
    104 
    105       SECP_TRY_APPEND_CFLAGS([-std=c89 -pedantic -Wno-long-long -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef], $1) # GCC >= 3.0, -Wlong-long is implied by -pedantic.
    106       SECP_TRY_APPEND_CFLAGS([-Wno-overlength-strings], $1) # GCC >= 4.2, -Woverlength-strings is implied by -pedantic.
    107       SECP_TRY_APPEND_CFLAGS([-Wall], $1) # GCC >= 2.95 and probably many other compilers
    108       SECP_TRY_APPEND_CFLAGS([-Wno-unused-function], $1) # GCC >= 3.0, -Wunused-function is implied by -Wall.
    109       SECP_TRY_APPEND_CFLAGS([-Wextra], $1) # GCC >= 3.4, this is the newer name of -W, which we don't use because older GCCs will warn about unused functions.
    110       SECP_TRY_APPEND_CFLAGS([-Wcast-align], $1) # GCC >= 2.95
    111       SECP_TRY_APPEND_CFLAGS([-Wcast-align=strict], $1) # GCC >= 8.0
    112       SECP_TRY_APPEND_CFLAGS([-Wconditional-uninitialized], $1) # Clang >= 3.0 only
    113       SECP_TRY_APPEND_CFLAGS([-Wreserved-identifier], $1) # Clang >= 13.0 only
    114       SECP_TRY_APPEND_CFLAGS([-fvisibility=hidden], $1) # GCC >= 4.0
    115 
    116       CFLAGS="$SECP_TRY_APPEND_DEFAULT_CFLAGS_saved_CFLAGS"
    117     fi
    118 
    119     # MSVC
    120     # Assume MSVC if we're building for Windows but not with GCC or compatible;
    121     # libtool makes the same assumption internally.
    122     # Note that "/opt" and "-opt" are equivalent for MSVC; we use "-opt" because "/opt" looks like a path.
    123     if test x"$GCC" != x"yes" && test x"$build_windows" = x"yes"; then
    124       SECP_TRY_APPEND_CFLAGS([-W3], $1) # Production quality warning level.
    125       SECP_TRY_APPEND_CFLAGS([-wd4146], $1) # Disable warning C4146 "unary minus operator applied to unsigned type, result still unsigned".
    126       SECP_TRY_APPEND_CFLAGS([-wd4244], $1) # Disable warning C4244 "'conversion' conversion from 'type1' to 'type2', possible loss of data".
    127       SECP_TRY_APPEND_CFLAGS([-wd4267], $1) # Disable warning C4267 "'var' : conversion from 'size_t' to 'type', possible loss of data".
    128       # Eliminate deprecation warnings for the older, less secure functions.
    129       CPPFLAGS="-D_CRT_SECURE_NO_WARNINGS $CPPFLAGS"
    130     fi
    131 ])
    132 SECP_TRY_APPEND_DEFAULT_CFLAGS(SECP_CFLAGS)
    133 
    134 ###
    135 ### Define config arguments
    136 ###
    137 
    138 # In dev mode, we enable all binaries and modules by default but individual options can still be overridden explicitly.
    139 # Check for dev mode first because SECP_SET_DEFAULT needs enable_dev_mode set.
    140 AC_ARG_ENABLE(dev_mode, [], [],
    141     [enable_dev_mode=no])
    142 
    143 AC_ARG_ENABLE(benchmark,
    144     AS_HELP_STRING([--enable-benchmark],[compile benchmark [default=yes]]), [],
    145     [SECP_SET_DEFAULT([enable_benchmark], [yes], [yes])])
    146 
    147 AC_ARG_ENABLE(coverage,
    148     AS_HELP_STRING([--enable-coverage],[enable compiler flags to support kcov coverage analysis [default=no]]), [],
    149     [SECP_SET_DEFAULT([enable_coverage], [no], [no])])
    150 
    151 AC_ARG_ENABLE(tests,
    152     AS_HELP_STRING([--enable-tests],[compile tests [default=yes]]), [],
    153     [SECP_SET_DEFAULT([enable_tests], [yes], [yes])])
    154 
    155 AC_ARG_ENABLE(ctime_tests,
    156     AS_HELP_STRING([--enable-ctime-tests],[compile constant-time tests [default=yes if valgrind enabled]]), [],
    157     [SECP_SET_DEFAULT([enable_ctime_tests], [auto], [auto])])
    158 
    159 AC_ARG_ENABLE(experimental,
    160     AS_HELP_STRING([--enable-experimental],[allow experimental configure options [default=no]]), [],
    161     [SECP_SET_DEFAULT([enable_experimental], [no], [yes])])
    162 
    163 AC_ARG_ENABLE(exhaustive_tests,
    164     AS_HELP_STRING([--enable-exhaustive-tests],[compile exhaustive tests [default=yes]]), [],
    165     [SECP_SET_DEFAULT([enable_exhaustive_tests], [yes], [yes])])
    166 
    167 AC_ARG_ENABLE(examples,
    168     AS_HELP_STRING([--enable-examples],[compile the examples [default=no]]), [],
    169     [SECP_SET_DEFAULT([enable_examples], [no], [yes])])
    170 
    171 AC_ARG_ENABLE(module_ecdh,
    172     AS_HELP_STRING([--enable-module-ecdh],[enable ECDH module [default=yes]]), [],
    173     [SECP_SET_DEFAULT([enable_module_ecdh], [yes], [yes])])
    174 
    175 AC_ARG_ENABLE(module_recovery,
    176     AS_HELP_STRING([--enable-module-recovery],[enable ECDSA pubkey recovery module [default=no]]), [],
    177     [SECP_SET_DEFAULT([enable_module_recovery], [no], [yes])])
    178 
    179 AC_ARG_ENABLE(module_extrakeys,
    180     AS_HELP_STRING([--enable-module-extrakeys],[enable extrakeys module [default=yes]]), [],
    181     [SECP_SET_DEFAULT([enable_module_extrakeys], [yes], [yes])])
    182 
    183 AC_ARG_ENABLE(module_schnorrsig,
    184     AS_HELP_STRING([--enable-module-schnorrsig],[enable schnorrsig module [default=yes]]), [],
    185     [SECP_SET_DEFAULT([enable_module_schnorrsig], [yes], [yes])])
    186 
    187 AC_ARG_ENABLE(module_ellswift,
    188     AS_HELP_STRING([--enable-module-ellswift],[enable ElligatorSwift module [default=yes]]), [],
    189     [SECP_SET_DEFAULT([enable_module_ellswift], [yes], [yes])])
    190 
    191 AC_ARG_ENABLE(external_default_callbacks,
    192     AS_HELP_STRING([--enable-external-default-callbacks],[enable external default callback functions [default=no]]), [],
    193     [SECP_SET_DEFAULT([enable_external_default_callbacks], [no], [no])])
    194 
    195 # Test-only override of the (autodetected by the C code) "widemul" setting.
    196 # Legal values are:
    197 #  * int64 (for [u]int64_t),
    198 #  * int128 (for [unsigned] __int128),
    199 #  * int128_struct (for int128 implemented as a structure),
    200 #  *  and auto (the default).
    201 AC_ARG_WITH([test-override-wide-multiply], [] ,[set_widemul=$withval], [set_widemul=auto])
    202 
    203 AC_ARG_WITH([asm], [AS_HELP_STRING([--with-asm=x86_64|arm32|no|auto],
    204 [assembly to use (experimental: arm32) [default=auto]])],[req_asm=$withval], [req_asm=auto])
    205 
    206 AC_ARG_WITH([ecmult-window], [AS_HELP_STRING([--with-ecmult-window=SIZE|auto],
    207 [window size for ecmult precomputation for verification, specified as integer in range [2..24].]
    208 [Larger values result in possibly better performance at the cost of an exponentially larger precomputed table.]
    209 [The table will store 2^(SIZE-1) * 64 bytes of data but can be larger in memory due to platform-specific padding and alignment.]
    210 [A window size larger than 15 will require you delete the prebuilt precomputed_ecmult.c file so that it can be rebuilt.]
    211 [For very large window sizes, use "make -j 1" to reduce memory use during compilation.]
    212 ["auto" is a reasonable setting for desktop machines (currently 15). [default=auto]]
    213 )],
    214 [req_ecmult_window=$withval], [req_ecmult_window=auto])
    215 
    216 AC_ARG_WITH([ecmult-gen-precision], [AS_HELP_STRING([--with-ecmult-gen-precision=2|4|8|auto],
    217 [Precision bits to tune the precomputed table size for signing.]
    218 [The size of the table is 32kB for 2 bits, 64kB for 4 bits, 512kB for 8 bits of precision.]
    219 [A larger table size usually results in possible faster signing.]
    220 ["auto" is a reasonable setting for desktop machines (currently 4). [default=auto]]
    221 )],
    222 [req_ecmult_gen_precision=$withval], [req_ecmult_gen_precision=auto])
    223 
    224 AC_ARG_WITH([valgrind], [AS_HELP_STRING([--with-valgrind=yes|no|auto],
    225 [Build with extra checks for running inside Valgrind [default=auto]]
    226 )],
    227 [req_valgrind=$withval], [req_valgrind=auto])
    228 
    229 ###
    230 ### Handle config options (except for modules)
    231 ###
    232 
    233 if test x"$req_valgrind" = x"no"; then
    234   enable_valgrind=no
    235 else
    236   SECP_VALGRIND_CHECK
    237   if test x"$has_valgrind" != x"yes"; then
    238     if test x"$req_valgrind" = x"yes"; then
    239       AC_MSG_ERROR([Valgrind support explicitly requested but valgrind/memcheck.h header not available])
    240     fi
    241     enable_valgrind=no
    242   else
    243     enable_valgrind=yes
    244   fi
    245 fi
    246 
    247 if test x"$enable_ctime_tests" = x"auto"; then
    248     enable_ctime_tests=$enable_valgrind
    249 fi
    250 
    251 if test x"$enable_coverage" = x"yes"; then
    252     SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DCOVERAGE=1"
    253     SECP_CFLAGS="-O0 --coverage $SECP_CFLAGS"
    254     # If coverage is enabled, and the user has not overridden CFLAGS,
    255     # override Autoconf's value "-g -O2" with "-g". Otherwise we'd end up
    256     # with "-O0 --coverage -g -O2".
    257     if test "$CFLAGS_overridden" = "no"; then
    258       CFLAGS="-g"
    259     fi
    260     LDFLAGS="--coverage $LDFLAGS"
    261 else
    262     # Most likely the CFLAGS already contain -O2 because that is autoconf's default.
    263     # We still add it here because passing it twice is not an issue, and handling
    264     # this case would just add unnecessary complexity (see #896).
    265     SECP_CFLAGS="-O2 $SECP_CFLAGS"
    266 fi
    267 
    268 if test x"$req_asm" = x"auto"; then
    269   SECP_X86_64_ASM_CHECK
    270   if test x"$has_x86_64_asm" = x"yes"; then
    271     set_asm=x86_64
    272   fi
    273   if test x"$set_asm" = x; then
    274     set_asm=no
    275   fi
    276 else
    277   set_asm=$req_asm
    278   case $set_asm in
    279   x86_64)
    280     SECP_X86_64_ASM_CHECK
    281     if test x"$has_x86_64_asm" != x"yes"; then
    282       AC_MSG_ERROR([x86_64 assembly requested but not available])
    283     fi
    284     ;;
    285   arm32)
    286     SECP_ARM32_ASM_CHECK
    287     if test x"$has_arm32_asm" != x"yes"; then
    288       AC_MSG_ERROR([ARM32 assembly requested but not available])
    289     fi
    290     ;;
    291   no)
    292     ;;
    293   *)
    294     AC_MSG_ERROR([invalid assembly selection])
    295     ;;
    296   esac
    297 fi
    298 
    299 # Select assembly
    300 enable_external_asm=no
    301 
    302 case $set_asm in
    303 x86_64)
    304   SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_ASM_X86_64=1"
    305   ;;
    306 arm32)
    307   enable_external_asm=yes
    308   ;;
    309 no)
    310   ;;
    311 *)
    312   AC_MSG_ERROR([invalid assembly selection])
    313   ;;
    314 esac
    315 
    316 if test x"$enable_external_asm" = x"yes"; then
    317   SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_EXTERNAL_ASM=1"
    318 fi
    319 
    320 
    321 # Select wide multiplication implementation
    322 case $set_widemul in
    323 int128_struct)
    324   SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_FORCE_WIDEMUL_INT128_STRUCT=1"
    325   ;;
    326 int128)
    327   SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_FORCE_WIDEMUL_INT128=1"
    328   ;;
    329 int64)
    330   SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_FORCE_WIDEMUL_INT64=1"
    331   ;;
    332 auto)
    333   ;;
    334 *)
    335   AC_MSG_ERROR([invalid wide multiplication implementation])
    336   ;;
    337 esac
    338 
    339 # Set ecmult window size
    340 if test x"$req_ecmult_window" = x"auto"; then
    341   set_ecmult_window=15
    342 else
    343   set_ecmult_window=$req_ecmult_window
    344 fi
    345 
    346 error_window_size=['window size for ecmult precomputation not an integer in range [2..24] or "auto"']
    347 case $set_ecmult_window in
    348 ''|*[[!0-9]]*)
    349   # no valid integer
    350   AC_MSG_ERROR($error_window_size)
    351   ;;
    352 *)
    353   if test "$set_ecmult_window" -lt 2 -o "$set_ecmult_window" -gt 24 ; then
    354     # not in range
    355     AC_MSG_ERROR($error_window_size)
    356   fi
    357   SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DECMULT_WINDOW_SIZE=$set_ecmult_window"
    358   ;;
    359 esac
    360 
    361 # Set ecmult gen precision
    362 if test x"$req_ecmult_gen_precision" = x"auto"; then
    363   set_ecmult_gen_precision=4
    364 else
    365   set_ecmult_gen_precision=$req_ecmult_gen_precision
    366 fi
    367 
    368 case $set_ecmult_gen_precision in
    369 2|4|8)
    370   SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DECMULT_GEN_PREC_BITS=$set_ecmult_gen_precision"
    371   ;;
    372 *)
    373   AC_MSG_ERROR(['ecmult gen precision not 2, 4, 8 or "auto"'])
    374   ;;
    375 esac
    376 
    377 if test x"$enable_valgrind" = x"yes"; then
    378   SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES $VALGRIND_CPPFLAGS -DVALGRIND"
    379 fi
    380 
    381 # Add -Werror and similar flags passed from the outside (for testing, e.g., in CI).
    382 # We don't want to set the user variable CFLAGS in CI because this would disable
    383 # autoconf's logic for setting default CFLAGS, which we would like to test in CI.
    384 SECP_CFLAGS="$SECP_CFLAGS $WERROR_CFLAGS"
    385 
    386 ###
    387 ### Handle module options
    388 ###
    389 
    390 # Processing must be done in a reverse topological sorting of the dependency graph
    391 # (dependent module first).
    392 if test x"$enable_module_ellswift" = x"yes"; then
    393   SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_ELLSWIFT=1"
    394 fi
    395 
    396 if test x"$enable_module_schnorrsig" = x"yes"; then
    397   if test x"$enable_module_extrakeys" = x"no"; then
    398     AC_MSG_ERROR([Module dependency error: You have disabled the extrakeys module explicitly, but it is required by the schnorrsig module.])
    399   fi
    400   enable_module_extrakeys=yes
    401   SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_SCHNORRSIG=1"
    402 fi
    403 
    404 if test x"$enable_module_extrakeys" = x"yes"; then
    405   SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_EXTRAKEYS=1"
    406 fi
    407 
    408 if test x"$enable_module_recovery" = x"yes"; then
    409   SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_RECOVERY=1"
    410 fi
    411 
    412 if test x"$enable_module_ecdh" = x"yes"; then
    413   SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_ECDH=1"
    414 fi
    415 
    416 if test x"$enable_external_default_callbacks" = x"yes"; then
    417   SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_EXTERNAL_DEFAULT_CALLBACKS=1"
    418 fi
    419 
    420 ###
    421 ### Check for --enable-experimental if necessary
    422 ###
    423 
    424 if test x"$enable_experimental" = x"yes"; then
    425   AC_MSG_NOTICE([******])
    426   AC_MSG_NOTICE([WARNING: experimental build])
    427   AC_MSG_NOTICE([Experimental features do not have stable APIs or properties, and may not be safe for production use.])
    428   AC_MSG_NOTICE([******])
    429 else
    430   if test x"$set_asm" = x"arm32"; then
    431     AC_MSG_ERROR([ARM32 assembly is experimental. Use --enable-experimental to allow.])
    432   fi
    433 fi
    434 
    435 ###
    436 ### Generate output
    437 ###
    438 
    439 AC_CONFIG_FILES([Makefile libsecp256k1.pc])
    440 AC_SUBST(SECP_CFLAGS)
    441 AC_SUBST(SECP_CONFIG_DEFINES)
    442 AM_CONDITIONAL([ENABLE_COVERAGE], [test x"$enable_coverage" = x"yes"])
    443 AM_CONDITIONAL([USE_TESTS], [test x"$enable_tests" != x"no"])
    444 AM_CONDITIONAL([USE_CTIME_TESTS], [test x"$enable_ctime_tests" = x"yes"])
    445 AM_CONDITIONAL([USE_EXHAUSTIVE_TESTS], [test x"$enable_exhaustive_tests" != x"no"])
    446 AM_CONDITIONAL([USE_EXAMPLES], [test x"$enable_examples" != x"no"])
    447 AM_CONDITIONAL([USE_BENCHMARK], [test x"$enable_benchmark" = x"yes"])
    448 AM_CONDITIONAL([ENABLE_MODULE_ECDH], [test x"$enable_module_ecdh" = x"yes"])
    449 AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"yes"])
    450 AM_CONDITIONAL([ENABLE_MODULE_EXTRAKEYS], [test x"$enable_module_extrakeys" = x"yes"])
    451 AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG], [test x"$enable_module_schnorrsig" = x"yes"])
    452 AM_CONDITIONAL([ENABLE_MODULE_ELLSWIFT], [test x"$enable_module_ellswift" = x"yes"])
    453 AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$enable_external_asm" = x"yes"])
    454 AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm32"])
    455 AM_CONDITIONAL([BUILD_WINDOWS], [test "$build_windows" = "yes"])
    456 AC_SUBST(LIB_VERSION_CURRENT, _LIB_VERSION_CURRENT)
    457 AC_SUBST(LIB_VERSION_REVISION, _LIB_VERSION_REVISION)
    458 AC_SUBST(LIB_VERSION_AGE, _LIB_VERSION_AGE)
    459 
    460 AC_OUTPUT
    461 
    462 echo
    463 echo "Build Options:"
    464 echo "  with external callbacks = $enable_external_default_callbacks"
    465 echo "  with benchmarks         = $enable_benchmark"
    466 echo "  with tests              = $enable_tests"
    467 echo "  with ctime tests        = $enable_ctime_tests"
    468 echo "  with coverage           = $enable_coverage"
    469 echo "  with examples           = $enable_examples"
    470 echo "  module ecdh             = $enable_module_ecdh"
    471 echo "  module recovery         = $enable_module_recovery"
    472 echo "  module extrakeys        = $enable_module_extrakeys"
    473 echo "  module schnorrsig       = $enable_module_schnorrsig"
    474 echo "  module ellswift         = $enable_module_ellswift"
    475 echo
    476 echo "  asm                     = $set_asm"
    477 echo "  ecmult window size      = $set_ecmult_window"
    478 echo "  ecmult gen prec. bits   = $set_ecmult_gen_precision"
    479 # Hide test-only options unless they're used.
    480 if test x"$set_widemul" != xauto; then
    481 echo "  wide multiplication     = $set_widemul"
    482 fi
    483 echo
    484 echo "  valgrind                = $enable_valgrind"
    485 echo "  CC                      = $CC"
    486 echo "  CPPFLAGS                = $CPPFLAGS"
    487 echo "  SECP_CFLAGS             = $SECP_CFLAGS"
    488 echo "  CFLAGS                  = $CFLAGS"
    489 echo "  LDFLAGS                 = $LDFLAGS"