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, 6)
8 define(_PKG_VERSION_PATCH, 0)
9 define(_PKG_VERSION_IS_RELEASE, true)
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, 5)
17 define(_LIB_VERSION_REVISION, 0)
18 define(_LIB_VERSION_AGE, 0)
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_musig,
188 AS_HELP_STRING([--enable-module-musig],[enable MuSig2 module [default=yes]]), [],
189 [SECP_SET_DEFAULT([enable_module_musig], [yes], [yes])])
190 191 AC_ARG_ENABLE(module_ellswift,
192 AS_HELP_STRING([--enable-module-ellswift],[enable ElligatorSwift module [default=yes]]), [],
193 [SECP_SET_DEFAULT([enable_module_ellswift], [yes], [yes])])
194 195 AC_ARG_ENABLE(external_default_callbacks,
196 AS_HELP_STRING([--enable-external-default-callbacks],[enable external default callback functions [default=no]]), [],
197 [SECP_SET_DEFAULT([enable_external_default_callbacks], [no], [no])])
198 199 # Test-only override of the (autodetected by the C code) "widemul" setting.
200 # Legal values are:
201 # * int64 (for [u]int64_t),
202 # * int128 (for [unsigned] __int128),
203 # * int128_struct (for int128 implemented as a structure),
204 # * and auto (the default).
205 AC_ARG_WITH([test-override-wide-multiply], [] ,[set_widemul=$withval], [set_widemul=auto])
206 207 AC_ARG_WITH([asm], [AS_HELP_STRING([--with-asm=x86_64|arm32|no|auto],
208 [assembly to use (experimental: arm32) [default=auto]])],[req_asm=$withval], [req_asm=auto])
209 210 AC_ARG_WITH([ecmult-window], [AS_HELP_STRING([--with-ecmult-window=SIZE],
211 [window size for ecmult precomputation for verification, specified as integer in range [2..24].]
212 [Larger values result in possibly better performance at the cost of an exponentially larger precomputed table.]
213 [The table will store 2^(SIZE-1) * 64 bytes of data but can be larger in memory due to platform-specific padding and alignment.]
214 [A window size larger than 15 will require you delete the prebuilt precomputed_ecmult.c file so that it can be rebuilt.]
215 [For very large window sizes, use "make -j 1" to reduce memory use during compilation.]
216 [The default value is a reasonable setting for desktop machines (currently 15). [default=15]]
217 )],
218 [set_ecmult_window=$withval], [set_ecmult_window=15])
219 220 AC_ARG_WITH([ecmult-gen-kb], [AS_HELP_STRING([--with-ecmult-gen-kb=2|22|86],
221 [The size of the precomputed table for signing in multiples of 1024 bytes (on typical platforms).]
222 [Larger values result in possibly better signing/keygeneration performance at the cost of a larger table.]
223 [The default value is a reasonable setting for desktop machines (currently 86). [default=86]]
224 )],
225 [set_ecmult_gen_kb=$withval], [set_ecmult_gen_kb=86])
226 227 AC_ARG_WITH([valgrind], [AS_HELP_STRING([--with-valgrind=yes|no|auto],
228 [Build with extra checks for running inside Valgrind [default=auto]]
229 )],
230 [req_valgrind=$withval], [req_valgrind=auto])
231 232 ###
233 ### Handle config options (except for modules)
234 ###
235 236 if test x"$req_valgrind" = x"no"; then
237 enable_valgrind=no
238 else
239 SECP_VALGRIND_CHECK
240 if test x"$has_valgrind" != x"yes"; then
241 if test x"$req_valgrind" = x"yes"; then
242 AC_MSG_ERROR([Valgrind support explicitly requested but valgrind/memcheck.h header not available])
243 fi
244 enable_valgrind=no
245 else
246 enable_valgrind=yes
247 fi
248 fi
249 250 if test x"$enable_ctime_tests" = x"auto"; then
251 enable_ctime_tests=$enable_valgrind
252 fi
253 254 print_msan_notice=no
255 if test x"$enable_ctime_tests" = x"yes"; then
256 SECP_MSAN_CHECK
257 # MSan on Clang >=16 reports unitialized memory in function parameters and return values, even if
258 # the uninitalized variable is never actually "used". This is called "eager" checking, and it's
259 # sounds like good idea for normal use of MSan. However, it yields many false positives in the
260 # ctime_tests because many return values depend on secret (i.e., "uninitialized") values, and
261 # we're only interested in detecting branches (which count as "uses") on secret data.
262 if test x"$msan_enabled" = x"yes"; then
263 SECP_TRY_APPEND_CFLAGS([-fno-sanitize-memory-param-retval], SECP_CFLAGS)
264 print_msan_notice=yes
265 fi
266 fi
267 268 if test x"$enable_coverage" = x"yes"; then
269 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DCOVERAGE=1"
270 SECP_CFLAGS="-O0 --coverage $SECP_CFLAGS"
271 # If coverage is enabled, and the user has not overridden CFLAGS,
272 # override Autoconf's value "-g -O2" with "-g". Otherwise we'd end up
273 # with "-O0 --coverage -g -O2".
274 if test "$CFLAGS_overridden" = "no"; then
275 CFLAGS="-g"
276 fi
277 LDFLAGS="--coverage $LDFLAGS"
278 else
279 # Most likely the CFLAGS already contain -O2 because that is autoconf's default.
280 # We still add it here because passing it twice is not an issue, and handling
281 # this case would just add unnecessary complexity (see #896).
282 SECP_CFLAGS="-O2 $SECP_CFLAGS"
283 fi
284 285 if test x"$req_asm" = x"auto"; then
286 SECP_X86_64_ASM_CHECK
287 if test x"$has_x86_64_asm" = x"yes"; then
288 set_asm=x86_64
289 fi
290 if test x"$set_asm" = x; then
291 set_asm=no
292 fi
293 else
294 set_asm=$req_asm
295 case $set_asm in
296 x86_64)
297 SECP_X86_64_ASM_CHECK
298 if test x"$has_x86_64_asm" != x"yes"; then
299 AC_MSG_ERROR([x86_64 assembly requested but not available])
300 fi
301 ;;
302 arm32)
303 SECP_ARM32_ASM_CHECK
304 if test x"$has_arm32_asm" != x"yes"; then
305 AC_MSG_ERROR([ARM32 assembly requested but not available])
306 fi
307 ;;
308 no)
309 ;;
310 *)
311 AC_MSG_ERROR([invalid assembly selection])
312 ;;
313 esac
314 fi
315 316 # Select assembly
317 enable_external_asm=no
318 319 case $set_asm in
320 x86_64)
321 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_ASM_X86_64=1"
322 ;;
323 arm32)
324 enable_external_asm=yes
325 ;;
326 no)
327 ;;
328 *)
329 AC_MSG_ERROR([invalid assembly selection])
330 ;;
331 esac
332 333 if test x"$enable_external_asm" = x"yes"; then
334 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_EXTERNAL_ASM=1"
335 fi
336 337 338 # Select wide multiplication implementation
339 case $set_widemul in
340 int128_struct)
341 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_FORCE_WIDEMUL_INT128_STRUCT=1"
342 ;;
343 int128)
344 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_FORCE_WIDEMUL_INT128=1"
345 ;;
346 int64)
347 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_FORCE_WIDEMUL_INT64=1"
348 ;;
349 auto)
350 ;;
351 *)
352 AC_MSG_ERROR([invalid wide multiplication implementation])
353 ;;
354 esac
355 356 error_window_size=['window size for ecmult precomputation not an integer in range [2..24]']
357 case $set_ecmult_window in
358 ''|*[[!0-9]]*)
359 # no valid integer
360 AC_MSG_ERROR($error_window_size)
361 ;;
362 *)
363 if test "$set_ecmult_window" -lt 2 -o "$set_ecmult_window" -gt 24 ; then
364 # not in range
365 AC_MSG_ERROR($error_window_size)
366 fi
367 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DECMULT_WINDOW_SIZE=$set_ecmult_window"
368 ;;
369 esac
370 371 case $set_ecmult_gen_kb in
372 2)
373 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DCOMB_BLOCKS=2 -DCOMB_TEETH=5"
374 ;;
375 22)
376 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DCOMB_BLOCKS=11 -DCOMB_TEETH=6"
377 ;;
378 86)
379 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DCOMB_BLOCKS=43 -DCOMB_TEETH=6"
380 ;;
381 *)
382 AC_MSG_ERROR(['ecmult gen table size not 2, 22 or 86'])
383 ;;
384 esac
385 386 if test x"$enable_valgrind" = x"yes"; then
387 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES $VALGRIND_CPPFLAGS -DVALGRIND"
388 fi
389 390 # Add -Werror and similar flags passed from the outside (for testing, e.g., in CI).
391 # We don't want to set the user variable CFLAGS in CI because this would disable
392 # autoconf's logic for setting default CFLAGS, which we would like to test in CI.
393 SECP_CFLAGS="$SECP_CFLAGS $WERROR_CFLAGS"
394 395 ###
396 ### Handle module options
397 ###
398 399 # Processing must be done in a reverse topological sorting of the dependency graph
400 # (dependent module first).
401 if test x"$enable_module_ellswift" = x"yes"; then
402 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_ELLSWIFT=1"
403 fi
404 405 if test x"$enable_module_musig" = x"yes"; then
406 if test x"$enable_module_schnorrsig" = x"no"; then
407 AC_MSG_ERROR([Module dependency error: You have disabled the schnorrsig module explicitly, but it is required by the musig module.])
408 fi
409 enable_module_schnorrsig=yes
410 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_MUSIG=1"
411 fi
412 413 if test x"$enable_module_schnorrsig" = x"yes"; then
414 if test x"$enable_module_extrakeys" = x"no"; then
415 AC_MSG_ERROR([Module dependency error: You have disabled the extrakeys module explicitly, but it is required by the schnorrsig module.])
416 fi
417 enable_module_extrakeys=yes
418 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_SCHNORRSIG=1"
419 fi
420 421 if test x"$enable_module_extrakeys" = x"yes"; then
422 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_EXTRAKEYS=1"
423 fi
424 425 if test x"$enable_module_recovery" = x"yes"; then
426 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_RECOVERY=1"
427 fi
428 429 if test x"$enable_module_ecdh" = x"yes"; then
430 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DENABLE_MODULE_ECDH=1"
431 fi
432 433 if test x"$enable_external_default_callbacks" = x"yes"; then
434 SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DUSE_EXTERNAL_DEFAULT_CALLBACKS=1"
435 fi
436 437 ###
438 ### Check for --enable-experimental if necessary
439 ###
440 441 if test x"$enable_experimental" = x"no"; then
442 if test x"$set_asm" = x"arm32"; then
443 AC_MSG_ERROR([ARM32 assembly is experimental. Use --enable-experimental to allow.])
444 fi
445 fi
446 447 ###
448 ### Generate output
449 ###
450 451 AC_CONFIG_FILES([Makefile libsecp256k1.pc])
452 AC_SUBST(SECP_CFLAGS)
453 AC_SUBST(SECP_CONFIG_DEFINES)
454 AM_CONDITIONAL([ENABLE_COVERAGE], [test x"$enable_coverage" = x"yes"])
455 AM_CONDITIONAL([USE_TESTS], [test x"$enable_tests" != x"no"])
456 AM_CONDITIONAL([USE_CTIME_TESTS], [test x"$enable_ctime_tests" = x"yes"])
457 AM_CONDITIONAL([USE_EXHAUSTIVE_TESTS], [test x"$enable_exhaustive_tests" != x"no"])
458 AM_CONDITIONAL([USE_EXAMPLES], [test x"$enable_examples" != x"no"])
459 AM_CONDITIONAL([USE_BENCHMARK], [test x"$enable_benchmark" = x"yes"])
460 AM_CONDITIONAL([ENABLE_MODULE_ECDH], [test x"$enable_module_ecdh" = x"yes"])
461 AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"yes"])
462 AM_CONDITIONAL([ENABLE_MODULE_EXTRAKEYS], [test x"$enable_module_extrakeys" = x"yes"])
463 AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG], [test x"$enable_module_schnorrsig" = x"yes"])
464 AM_CONDITIONAL([ENABLE_MODULE_MUSIG], [test x"$enable_module_musig" = x"yes"])
465 AM_CONDITIONAL([ENABLE_MODULE_ELLSWIFT], [test x"$enable_module_ellswift" = x"yes"])
466 AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$enable_external_asm" = x"yes"])
467 AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm32"])
468 AM_CONDITIONAL([BUILD_WINDOWS], [test "$build_windows" = "yes"])
469 AC_SUBST(LIB_VERSION_CURRENT, _LIB_VERSION_CURRENT)
470 AC_SUBST(LIB_VERSION_REVISION, _LIB_VERSION_REVISION)
471 AC_SUBST(LIB_VERSION_AGE, _LIB_VERSION_AGE)
472 473 AC_OUTPUT
474 475 echo
476 echo "Build Options:"
477 echo " with external callbacks = $enable_external_default_callbacks"
478 echo " with benchmarks = $enable_benchmark"
479 echo " with tests = $enable_tests"
480 echo " with ctime tests = $enable_ctime_tests"
481 echo " with coverage = $enable_coverage"
482 echo " with examples = $enable_examples"
483 echo " module ecdh = $enable_module_ecdh"
484 echo " module recovery = $enable_module_recovery"
485 echo " module extrakeys = $enable_module_extrakeys"
486 echo " module schnorrsig = $enable_module_schnorrsig"
487 echo " module musig = $enable_module_musig"
488 echo " module ellswift = $enable_module_ellswift"
489 echo
490 echo " asm = $set_asm"
491 echo " ecmult window size = $set_ecmult_window"
492 echo " ecmult gen table size = $set_ecmult_gen_kb KiB"
493 # Hide test-only options unless they're used.
494 if test x"$set_widemul" != xauto; then
495 echo " wide multiplication = $set_widemul"
496 fi
497 echo
498 echo " valgrind = $enable_valgrind"
499 echo " CC = $CC"
500 echo " CPPFLAGS = $CPPFLAGS"
501 echo " SECP_CFLAGS = $SECP_CFLAGS"
502 echo " CFLAGS = $CFLAGS"
503 echo " LDFLAGS = $LDFLAGS"
504 505 if test x"$print_msan_notice" = x"yes"; then
506 echo
507 echo "Note:"
508 echo " MemorySanitizer detected, tried to add -fno-sanitize-memory-param-retval to SECP_CFLAGS"
509 echo " to avoid false positives in ctime_tests. Pass --disable-ctime-tests to avoid this."
510 fi
511 512 if test x"$enable_experimental" = x"yes"; then
513 echo
514 echo "WARNING: Experimental build"
515 echo " Experimental features do not have stable APIs or properties, and may not be safe for"
516 echo " production use."
517 fi
518