configure.ac 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. AC_PREREQ([2.60])
  2. AC_INIT([libsecp256k1],[0.1])
  3. AC_CONFIG_AUX_DIR([build-aux])
  4. AC_CONFIG_MACRO_DIR([build-aux/m4])
  5. AC_CANONICAL_HOST
  6. AH_TOP([#ifndef LIBSECP256K1_CONFIG_H])
  7. AH_TOP([#define LIBSECP256K1_CONFIG_H])
  8. AH_BOTTOM([#endif /*LIBSECP256K1_CONFIG_H*/])
  9. AM_INIT_AUTOMAKE([foreign subdir-objects])
  10. # Set -g if CFLAGS are not already set, which matches the default autoconf
  11. # behavior (see PROG_CC in the Autoconf manual) with the exception that we don't
  12. # set -O2 here because we set it in any case (see further down).
  13. : ${CFLAGS="-g"}
  14. LT_INIT
  15. dnl make the compilation flags quiet unless V=1 is used
  16. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  17. PKG_PROG_PKG_CONFIG
  18. AC_PATH_TOOL(AR, ar)
  19. AC_PATH_TOOL(RANLIB, ranlib)
  20. AC_PATH_TOOL(STRIP, strip)
  21. AX_PROG_CC_FOR_BUILD
  22. AM_PROG_CC_C_O
  23. AC_PROG_CC_C89
  24. if test x"$ac_cv_prog_cc_c89" = x"no"; then
  25. AC_MSG_ERROR([c89 compiler support required])
  26. fi
  27. AM_PROG_AS
  28. case $host_os in
  29. *darwin*)
  30. if test x$cross_compiling != xyes; then
  31. AC_PATH_PROG([BREW],brew,)
  32. if test x$BREW != x; then
  33. dnl These Homebrew packages may be keg-only, meaning that they won't be found
  34. dnl in expected paths because they may conflict with system files. Ask
  35. dnl Homebrew where each one is located, then adjust paths accordingly.
  36. openssl_prefix=`$BREW --prefix openssl 2>/dev/null`
  37. gmp_prefix=`$BREW --prefix gmp 2>/dev/null`
  38. if test x$openssl_prefix != x; then
  39. PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
  40. export PKG_CONFIG_PATH
  41. CRYPTO_CPPFLAGS="-I$openssl_prefix/include"
  42. fi
  43. if test x$gmp_prefix != x; then
  44. GMP_CPPFLAGS="-I$gmp_prefix/include"
  45. GMP_LIBS="-L$gmp_prefix/lib"
  46. fi
  47. else
  48. AC_PATH_PROG([PORT],port,)
  49. dnl if homebrew isn't installed and macports is, add the macports default paths
  50. dnl as a last resort.
  51. if test x$PORT != x; then
  52. CPPFLAGS="$CPPFLAGS -isystem /opt/local/include"
  53. LDFLAGS="$LDFLAGS -L/opt/local/lib"
  54. fi
  55. fi
  56. fi
  57. ;;
  58. esac
  59. CFLAGS="-W $CFLAGS"
  60. warn_CFLAGS="-std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef -Wno-unused-function -Wno-long-long -Wno-overlength-strings"
  61. saved_CFLAGS="$CFLAGS"
  62. CFLAGS="$warn_CFLAGS $CFLAGS"
  63. AC_MSG_CHECKING([if ${CC} supports ${warn_CFLAGS}])
  64. AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])],
  65. [ AC_MSG_RESULT([yes]) ],
  66. [ AC_MSG_RESULT([no])
  67. CFLAGS="$saved_CFLAGS"
  68. ])
  69. saved_CFLAGS="$CFLAGS"
  70. CFLAGS="-fvisibility=hidden $CFLAGS"
  71. AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
  72. AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])],
  73. [ AC_MSG_RESULT([yes]) ],
  74. [ AC_MSG_RESULT([no])
  75. CFLAGS="$saved_CFLAGS"
  76. ])
  77. AC_ARG_ENABLE(benchmark,
  78. AS_HELP_STRING([--enable-benchmark],[compile benchmark [default=yes]]),
  79. [use_benchmark=$enableval],
  80. [use_benchmark=yes])
  81. AC_ARG_ENABLE(coverage,
  82. AS_HELP_STRING([--enable-coverage],[enable compiler flags to support kcov coverage analysis [default=no]]),
  83. [enable_coverage=$enableval],
  84. [enable_coverage=no])
  85. AC_ARG_ENABLE(tests,
  86. AS_HELP_STRING([--enable-tests],[compile tests [default=yes]]),
  87. [use_tests=$enableval],
  88. [use_tests=yes])
  89. AC_ARG_ENABLE(openssl_tests,
  90. AS_HELP_STRING([--enable-openssl-tests],[enable OpenSSL tests [default=auto]]),
  91. [enable_openssl_tests=$enableval],
  92. [enable_openssl_tests=auto])
  93. AC_ARG_ENABLE(experimental,
  94. AS_HELP_STRING([--enable-experimental],[allow experimental configure options [default=no]]),
  95. [use_experimental=$enableval],
  96. [use_experimental=no])
  97. AC_ARG_ENABLE(exhaustive_tests,
  98. AS_HELP_STRING([--enable-exhaustive-tests],[compile exhaustive tests [default=yes]]),
  99. [use_exhaustive_tests=$enableval],
  100. [use_exhaustive_tests=yes])
  101. AC_ARG_ENABLE(ecmult_static_precomputation,
  102. AS_HELP_STRING([--enable-ecmult-static-precomputation],[enable precomputed ecmult table for signing [default=auto]]),
  103. [use_ecmult_static_precomputation=$enableval],
  104. [use_ecmult_static_precomputation=auto])
  105. AC_ARG_ENABLE(module_ecdh,
  106. AS_HELP_STRING([--enable-module-ecdh],[enable ECDH shared secret computation]),
  107. [enable_module_ecdh=$enableval],
  108. [enable_module_ecdh=no])
  109. AC_ARG_ENABLE(module_recovery,
  110. AS_HELP_STRING([--enable-module-recovery],[enable ECDSA pubkey recovery module [default=no]]),
  111. [enable_module_recovery=$enableval],
  112. [enable_module_recovery=no])
  113. AC_ARG_ENABLE(module_extrakeys,
  114. AS_HELP_STRING([--enable-module-extrakeys],[enable extrakeys module (experimental)]),
  115. [enable_module_extrakeys=$enableval],
  116. [enable_module_extrakeys=no])
  117. AC_ARG_ENABLE(module_schnorrsig,
  118. AS_HELP_STRING([--enable-module-schnorrsig],[enable schnorrsig module (experimental)]),
  119. [enable_module_schnorrsig=$enableval],
  120. [enable_module_schnorrsig=no])
  121. AC_ARG_ENABLE(external_default_callbacks,
  122. AS_HELP_STRING([--enable-external-default-callbacks],[enable external default callback functions [default=no]]),
  123. [use_external_default_callbacks=$enableval],
  124. [use_external_default_callbacks=no])
  125. dnl Test-only override of the (autodetected by the C code) "widemul" setting.
  126. dnl Legal values are int64 (for [u]int64_t), int128 (for [unsigned] __int128), and auto (the default).
  127. AC_ARG_WITH([test-override-wide-multiply], [] ,[set_widemul=$withval], [set_widemul=auto])
  128. AC_ARG_WITH([bignum], [AS_HELP_STRING([--with-bignum=gmp|no|auto],
  129. [bignum implementation to use [default=auto]])],[req_bignum=$withval], [req_bignum=auto])
  130. AC_ARG_WITH([asm], [AS_HELP_STRING([--with-asm=x86_64|arm|no|auto],
  131. [assembly optimizations to use (experimental: arm) [default=auto]])],[req_asm=$withval], [req_asm=auto])
  132. AC_ARG_WITH([ecmult-window], [AS_HELP_STRING([--with-ecmult-window=SIZE|auto],
  133. [window size for ecmult precomputation for verification, specified as integer in range [2..24].]
  134. [Larger values result in possibly better performance at the cost of an exponentially larger precomputed table.]
  135. [The table will store 2^(SIZE-1) * 64 bytes of data but can be larger in memory due to platform-specific padding and alignment.]
  136. ["auto" is a reasonable setting for desktop machines (currently 15). [default=auto]]
  137. )],
  138. [req_ecmult_window=$withval], [req_ecmult_window=auto])
  139. AC_ARG_WITH([ecmult-gen-precision], [AS_HELP_STRING([--with-ecmult-gen-precision=2|4|8|auto],
  140. [Precision bits to tune the precomputed table size for signing.]
  141. [The size of the table is 32kB for 2 bits, 64kB for 4 bits, 512kB for 8 bits of precision.]
  142. [A larger table size usually results in possible faster signing.]
  143. ["auto" is a reasonable setting for desktop machines (currently 4). [default=auto]]
  144. )],
  145. [req_ecmult_gen_precision=$withval], [req_ecmult_gen_precision=auto])
  146. AC_ARG_WITH([valgrind], [AS_HELP_STRING([--with-valgrind=yes|no|auto],
  147. [Build with extra checks for running inside Valgrind [default=auto]]
  148. )],
  149. [req_valgrind=$withval], [req_valgrind=auto])
  150. if test x"$req_valgrind" = x"no"; then
  151. enable_valgrind=no
  152. else
  153. AC_CHECK_HEADER([valgrind/memcheck.h], [enable_valgrind=yes], [
  154. if test x"$req_valgrind" = x"yes"; then
  155. AC_MSG_ERROR([Valgrind support explicitly requested but valgrind/memcheck.h header not available])
  156. fi
  157. enable_valgrind=no
  158. ], [])
  159. fi
  160. AM_CONDITIONAL([VALGRIND_ENABLED],[test "$enable_valgrind" = "yes"])
  161. if test x"$enable_coverage" = x"yes"; then
  162. AC_DEFINE(COVERAGE, 1, [Define this symbol to compile out all VERIFY code])
  163. CFLAGS="-O0 --coverage $CFLAGS"
  164. LDFLAGS="--coverage $LDFLAGS"
  165. else
  166. CFLAGS="-O2 $CFLAGS"
  167. fi
  168. if test x"$use_ecmult_static_precomputation" != x"no"; then
  169. # Temporarily switch to an environment for the native compiler
  170. save_cross_compiling=$cross_compiling
  171. cross_compiling=no
  172. SAVE_CC="$CC"
  173. CC="$CC_FOR_BUILD"
  174. SAVE_CFLAGS="$CFLAGS"
  175. CFLAGS="$CFLAGS_FOR_BUILD"
  176. SAVE_CPPFLAGS="$CPPFLAGS"
  177. CPPFLAGS="$CPPFLAGS_FOR_BUILD"
  178. SAVE_LDFLAGS="$LDFLAGS"
  179. LDFLAGS="$LDFLAGS_FOR_BUILD"
  180. warn_CFLAGS_FOR_BUILD="-Wall -Wextra -Wno-unused-function"
  181. saved_CFLAGS="$CFLAGS"
  182. CFLAGS="$warn_CFLAGS_FOR_BUILD $CFLAGS"
  183. AC_MSG_CHECKING([if native ${CC_FOR_BUILD} supports ${warn_CFLAGS_FOR_BUILD}])
  184. AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])],
  185. [ AC_MSG_RESULT([yes]) ],
  186. [ AC_MSG_RESULT([no])
  187. CFLAGS="$saved_CFLAGS"
  188. ])
  189. AC_MSG_CHECKING([for working native compiler: ${CC_FOR_BUILD}])
  190. AC_RUN_IFELSE(
  191. [AC_LANG_PROGRAM([], [])],
  192. [working_native_cc=yes],
  193. [working_native_cc=no],[:])
  194. CFLAGS_FOR_BUILD="$CFLAGS"
  195. # Restore the environment
  196. cross_compiling=$save_cross_compiling
  197. CC="$SAVE_CC"
  198. CFLAGS="$SAVE_CFLAGS"
  199. CPPFLAGS="$SAVE_CPPFLAGS"
  200. LDFLAGS="$SAVE_LDFLAGS"
  201. if test x"$working_native_cc" = x"no"; then
  202. AC_MSG_RESULT([no])
  203. set_precomp=no
  204. m4_define([please_set_for_build], [Please set CC_FOR_BUILD, CFLAGS_FOR_BUILD, CPPFLAGS_FOR_BUILD, and/or LDFLAGS_FOR_BUILD.])
  205. if test x"$use_ecmult_static_precomputation" = x"yes"; then
  206. AC_MSG_ERROR([native compiler ${CC_FOR_BUILD} does not produce working binaries. please_set_for_build])
  207. else
  208. AC_MSG_WARN([Disabling statically generated ecmult table because the native compiler ${CC_FOR_BUILD} does not produce working binaries. please_set_for_build])
  209. fi
  210. else
  211. AC_MSG_RESULT([yes])
  212. set_precomp=yes
  213. fi
  214. else
  215. set_precomp=no
  216. fi
  217. if test x"$req_asm" = x"auto"; then
  218. SECP_64BIT_ASM_CHECK
  219. if test x"$has_64bit_asm" = x"yes"; then
  220. set_asm=x86_64
  221. fi
  222. if test x"$set_asm" = x; then
  223. set_asm=no
  224. fi
  225. else
  226. set_asm=$req_asm
  227. case $set_asm in
  228. x86_64)
  229. SECP_64BIT_ASM_CHECK
  230. if test x"$has_64bit_asm" != x"yes"; then
  231. AC_MSG_ERROR([x86_64 assembly optimization requested but not available])
  232. fi
  233. ;;
  234. arm)
  235. ;;
  236. no)
  237. ;;
  238. *)
  239. AC_MSG_ERROR([invalid assembly optimization selection])
  240. ;;
  241. esac
  242. fi
  243. if test x"$req_bignum" = x"auto"; then
  244. SECP_GMP_CHECK
  245. if test x"$has_gmp" = x"yes"; then
  246. set_bignum=gmp
  247. fi
  248. if test x"$set_bignum" = x; then
  249. set_bignum=no
  250. fi
  251. else
  252. set_bignum=$req_bignum
  253. case $set_bignum in
  254. gmp)
  255. SECP_GMP_CHECK
  256. if test x"$has_gmp" != x"yes"; then
  257. AC_MSG_ERROR([gmp bignum explicitly requested but libgmp not available])
  258. fi
  259. ;;
  260. no)
  261. ;;
  262. *)
  263. AC_MSG_ERROR([invalid bignum implementation selection])
  264. ;;
  265. esac
  266. fi
  267. # select assembly optimization
  268. use_external_asm=no
  269. case $set_asm in
  270. x86_64)
  271. AC_DEFINE(USE_ASM_X86_64, 1, [Define this symbol to enable x86_64 assembly optimizations])
  272. ;;
  273. arm)
  274. use_external_asm=yes
  275. ;;
  276. no)
  277. ;;
  278. *)
  279. AC_MSG_ERROR([invalid assembly optimizations])
  280. ;;
  281. esac
  282. # select wide multiplication implementation
  283. case $set_widemul in
  284. int128)
  285. AC_DEFINE(USE_FORCE_WIDEMUL_INT128, 1, [Define this symbol to force the use of the (unsigned) __int128 based wide multiplication implementation])
  286. ;;
  287. int64)
  288. AC_DEFINE(USE_FORCE_WIDEMUL_INT64, 1, [Define this symbol to force the use of the (u)int64_t based wide multiplication implementation])
  289. ;;
  290. auto)
  291. ;;
  292. *)
  293. AC_MSG_ERROR([invalid wide multiplication implementation])
  294. ;;
  295. esac
  296. # select bignum implementation
  297. case $set_bignum in
  298. gmp)
  299. AC_DEFINE(HAVE_LIBGMP, 1, [Define this symbol if libgmp is installed])
  300. AC_DEFINE(USE_NUM_GMP, 1, [Define this symbol to use the gmp implementation for num])
  301. AC_DEFINE(USE_FIELD_INV_NUM, 1, [Define this symbol to use the num-based field inverse implementation])
  302. AC_DEFINE(USE_SCALAR_INV_NUM, 1, [Define this symbol to use the num-based scalar inverse implementation])
  303. ;;
  304. no)
  305. AC_DEFINE(USE_NUM_NONE, 1, [Define this symbol to use no num implementation])
  306. AC_DEFINE(USE_FIELD_INV_BUILTIN, 1, [Define this symbol to use the native field inverse implementation])
  307. AC_DEFINE(USE_SCALAR_INV_BUILTIN, 1, [Define this symbol to use the native scalar inverse implementation])
  308. ;;
  309. *)
  310. AC_MSG_ERROR([invalid bignum implementation])
  311. ;;
  312. esac
  313. #set ecmult window size
  314. if test x"$req_ecmult_window" = x"auto"; then
  315. set_ecmult_window=15
  316. else
  317. set_ecmult_window=$req_ecmult_window
  318. fi
  319. error_window_size=['window size for ecmult precomputation not an integer in range [2..24] or "auto"']
  320. case $set_ecmult_window in
  321. ''|*[[!0-9]]*)
  322. # no valid integer
  323. AC_MSG_ERROR($error_window_size)
  324. ;;
  325. *)
  326. if test "$set_ecmult_window" -lt 2 -o "$set_ecmult_window" -gt 24 ; then
  327. # not in range
  328. AC_MSG_ERROR($error_window_size)
  329. fi
  330. AC_DEFINE_UNQUOTED(ECMULT_WINDOW_SIZE, $set_ecmult_window, [Set window size for ecmult precomputation])
  331. ;;
  332. esac
  333. #set ecmult gen precision
  334. if test x"$req_ecmult_gen_precision" = x"auto"; then
  335. set_ecmult_gen_precision=4
  336. else
  337. set_ecmult_gen_precision=$req_ecmult_gen_precision
  338. fi
  339. case $set_ecmult_gen_precision in
  340. 2|4|8)
  341. AC_DEFINE_UNQUOTED(ECMULT_GEN_PREC_BITS, $set_ecmult_gen_precision, [Set ecmult gen precision bits])
  342. ;;
  343. *)
  344. AC_MSG_ERROR(['ecmult gen precision not 2, 4, 8 or "auto"'])
  345. ;;
  346. esac
  347. if test x"$use_tests" = x"yes"; then
  348. SECP_OPENSSL_CHECK
  349. if test x"$enable_openssl_tests" != x"no" && test x"$has_openssl_ec" = x"yes"; then
  350. enable_openssl_tests=yes
  351. AC_DEFINE(ENABLE_OPENSSL_TESTS, 1, [Define this symbol if OpenSSL EC functions are available])
  352. SECP_TEST_INCLUDES="$SSL_CFLAGS $CRYPTO_CFLAGS $CRYPTO_CPPFLAGS"
  353. SECP_TEST_LIBS="$CRYPTO_LIBS"
  354. case $host in
  355. *mingw*)
  356. SECP_TEST_LIBS="$SECP_TEST_LIBS -lgdi32"
  357. ;;
  358. esac
  359. else
  360. if test x"$enable_openssl_tests" = x"yes"; then
  361. AC_MSG_ERROR([OpenSSL tests requested but OpenSSL with EC support is not available])
  362. fi
  363. enable_openssl_tests=no
  364. fi
  365. else
  366. if test x"$enable_openssl_tests" = x"yes"; then
  367. AC_MSG_ERROR([OpenSSL tests requested but tests are not enabled])
  368. fi
  369. enable_openssl_tests=no
  370. fi
  371. if test x"$set_bignum" = x"gmp"; then
  372. SECP_LIBS="$SECP_LIBS $GMP_LIBS"
  373. SECP_INCLUDES="$SECP_INCLUDES $GMP_CPPFLAGS"
  374. fi
  375. if test x"$set_precomp" = x"yes"; then
  376. AC_DEFINE(USE_ECMULT_STATIC_PRECOMPUTATION, 1, [Define this symbol to use a statically generated ecmult table])
  377. fi
  378. if test x"$enable_module_ecdh" = x"yes"; then
  379. AC_DEFINE(ENABLE_MODULE_ECDH, 1, [Define this symbol to enable the ECDH module])
  380. fi
  381. if test x"$enable_module_recovery" = x"yes"; then
  382. AC_DEFINE(ENABLE_MODULE_RECOVERY, 1, [Define this symbol to enable the ECDSA pubkey recovery module])
  383. fi
  384. if test x"$enable_module_schnorrsig" = x"yes"; then
  385. AC_DEFINE(ENABLE_MODULE_SCHNORRSIG, 1, [Define this symbol to enable the schnorrsig module])
  386. enable_module_extrakeys=yes
  387. fi
  388. # Test if extrakeys is set after the schnorrsig module to allow the schnorrsig
  389. # module to set enable_module_extrakeys=yes
  390. if test x"$enable_module_extrakeys" = x"yes"; then
  391. AC_DEFINE(ENABLE_MODULE_EXTRAKEYS, 1, [Define this symbol to enable the extrakeys module])
  392. fi
  393. if test x"$use_external_asm" = x"yes"; then
  394. AC_DEFINE(USE_EXTERNAL_ASM, 1, [Define this symbol if an external (non-inline) assembly implementation is used])
  395. fi
  396. if test x"$use_external_default_callbacks" = x"yes"; then
  397. AC_DEFINE(USE_EXTERNAL_DEFAULT_CALLBACKS, 1, [Define this symbol if an external implementation of the default callbacks is used])
  398. fi
  399. if test x"$enable_experimental" = x"yes"; then
  400. AC_MSG_NOTICE([******])
  401. AC_MSG_NOTICE([WARNING: experimental build])
  402. AC_MSG_NOTICE([Experimental features do not have stable APIs or properties, and may not be safe for production use.])
  403. AC_MSG_NOTICE([Building extrakeys module: $enable_module_extrakeys])
  404. AC_MSG_NOTICE([Building schnorrsig module: $enable_module_schnorrsig])
  405. AC_MSG_NOTICE([******])
  406. else
  407. if test x"$enable_module_extrakeys" = x"yes"; then
  408. AC_MSG_ERROR([extrakeys module is experimental. Use --enable-experimental to allow.])
  409. fi
  410. if test x"$enable_module_schnorrsig" = x"yes"; then
  411. AC_MSG_ERROR([schnorrsig module is experimental. Use --enable-experimental to allow.])
  412. fi
  413. if test x"$set_asm" = x"arm"; then
  414. AC_MSG_ERROR([ARM assembly optimization is experimental. Use --enable-experimental to allow.])
  415. fi
  416. fi
  417. AC_CONFIG_HEADERS([src/libsecp256k1-config.h])
  418. AC_CONFIG_FILES([Makefile libsecp256k1.pc])
  419. AC_SUBST(SECP_INCLUDES)
  420. AC_SUBST(SECP_LIBS)
  421. AC_SUBST(SECP_TEST_LIBS)
  422. AC_SUBST(SECP_TEST_INCLUDES)
  423. AM_CONDITIONAL([ENABLE_COVERAGE], [test x"$enable_coverage" = x"yes"])
  424. AM_CONDITIONAL([USE_TESTS], [test x"$use_tests" != x"no"])
  425. AM_CONDITIONAL([USE_EXHAUSTIVE_TESTS], [test x"$use_exhaustive_tests" != x"no"])
  426. AM_CONDITIONAL([USE_BENCHMARK], [test x"$use_benchmark" = x"yes"])
  427. AM_CONDITIONAL([USE_ECMULT_STATIC_PRECOMPUTATION], [test x"$set_precomp" = x"yes"])
  428. AM_CONDITIONAL([ENABLE_MODULE_ECDH], [test x"$enable_module_ecdh" = x"yes"])
  429. AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"yes"])
  430. AM_CONDITIONAL([ENABLE_MODULE_EXTRAKEYS], [test x"$enable_module_extrakeys" = x"yes"])
  431. AM_CONDITIONAL([ENABLE_MODULE_SCHNORRSIG], [test x"$enable_module_schnorrsig" = x"yes"])
  432. AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$use_external_asm" = x"yes"])
  433. AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm"])
  434. dnl make sure nothing new is exported so that we don't break the cache
  435. PKGCONFIG_PATH_TEMP="$PKG_CONFIG_PATH"
  436. unset PKG_CONFIG_PATH
  437. PKG_CONFIG_PATH="$PKGCONFIG_PATH_TEMP"
  438. AC_OUTPUT
  439. echo
  440. echo "Build Options:"
  441. echo " with ecmult precomp = $set_precomp"
  442. echo " with external callbacks = $use_external_default_callbacks"
  443. echo " with benchmarks = $use_benchmark"
  444. echo " with tests = $use_tests"
  445. echo " with openssl tests = $enable_openssl_tests"
  446. echo " with coverage = $enable_coverage"
  447. echo " module ecdh = $enable_module_ecdh"
  448. echo " module recovery = $enable_module_recovery"
  449. echo " module extrakeys = $enable_module_extrakeys"
  450. echo " module schnorrsig = $enable_module_schnorrsig"
  451. echo
  452. echo " asm = $set_asm"
  453. echo " bignum = $set_bignum"
  454. echo " ecmult window size = $set_ecmult_window"
  455. echo " ecmult gen prec. bits = $set_ecmult_gen_precision"
  456. dnl Hide test-only options unless they're used.
  457. if test x"$set_widemul" != xauto; then
  458. echo " wide multiplication = $set_widemul"
  459. fi
  460. echo
  461. echo " valgrind = $enable_valgrind"
  462. echo " CC = $CC"
  463. echo " CFLAGS = $CFLAGS"
  464. echo " CPPFLAGS = $CPPFLAGS"
  465. echo " LDFLAGS = $LDFLAGS"
  466. echo