@@ -140,6 +140,11 @@ AC_ARG_ENABLE(examples,
140140 AS_HELP_STRING ( [ --enable-examples] ,[ compile the examples [ default=no] ] ) , [ ] ,
141141 [ SECP_SET_DEFAULT([ enable_examples] , [ no] , [ yes] )] )
142142
143+ AC_ARG_ENABLE ( module_bulletproofs ,
144+ AS_HELP_STRING ( [ --enable-module-bulletproofs] ,[ enable Bulletproofs module (experimental)] ) ,
145+ [ ] ,
146+ [ SECP_SET_DEFAULT([ enable_module_bulletproofs] , [ no] , [ yes] )] )
147+
143148AC_ARG_ENABLE ( module_ecdh ,
144149 AS_HELP_STRING ( [ --enable-module-ecdh] ,[ enable ECDH module [ default=no] ] ) , [ ] ,
145150 [ SECP_SET_DEFAULT([ enable_module_ecdh] , [ no] , [ yes] )] )
@@ -385,6 +390,10 @@ SECP_CFLAGS="$SECP_CFLAGS $WERROR_CFLAGS"
385390# ## Handle module options
386391# ##
387392
393+ if test x"$enable_module_bulletproofs" = x"yes"; then
394+ AC_DEFINE ( ENABLE_MODULE_BULLETPROOFS , 1 , [ Define this symbol to enable the Bulletproofs module] )
395+ fi
396+
388397if test x"$enable_module_ecdh" = x"yes"; then
389398 AC_DEFINE ( ENABLE_MODULE_ECDH , 1 , [ Define this symbol to enable the ECDH module] )
390399fi
@@ -450,6 +459,7 @@ if test x"$enable_experimental" = x"yes"; then
450459 AC_MSG_NOTICE ( [ ******] )
451460 AC_MSG_NOTICE ( [ WARNING: experimental build] )
452461 AC_MSG_NOTICE ( [ Experimental features do not have stable APIs or properties, and may not be safe for production use.] )
462+ AC_MSG_NOTICE ( [ Building Bulletproofs module: $enable_module_bulletproofs] )
453463 AC_MSG_NOTICE ( [ Building NUMS generator module: $enable_module_generator] )
454464 AC_MSG_NOTICE ( [ Building range proof module: $enable_module_rangeproof] )
455465 AC_MSG_NOTICE ( [ Building key whitelisting module: $enable_module_whitelist] )
@@ -467,6 +477,9 @@ if test x"$enable_experimental" = x"yes"; then
467477 fi
468478
469479 if test x"$enable_module_generator" != x"yes"; then
480+ if test x"$enable_module_bulletproofs" = x"yes"; then
481+ AC_MSG_ERROR ( [ Bulletproofs module requires the generator module. Use --enable-module-generator to allow.] )
482+ fi
470483 if test x"$enable_module_rangeproof" = x"yes"; then
471484 AC_MSG_ERROR ( [ Rangeproof module requires the generator module. Use --enable-module-generator to allow.] )
472485 fi
@@ -481,6 +494,9 @@ if test x"$enable_experimental" = x"yes"; then
481494 fi
482495 fi
483496else
497+ if test x"$enable_module_bulletproofs" = x"yes"; then
498+ AC_MSG_ERROR ( [ Bulletproofs module is experimental. Use --enable-experimental to allow.] )
499+ fi
484500 if test x"$enable_module_musig" = x"yes"; then
485501 AC_MSG_ERROR ( [ MuSig module is experimental. Use --enable-experimental to allow.] )
486502 fi
@@ -523,6 +539,7 @@ AM_CONDITIONAL([USE_TESTS], [test x"$enable_tests" != x"no"])
523539AM_CONDITIONAL([ USE_EXHAUSTIVE_TESTS] , [ test x"$enable_exhaustive_tests" != x"no"] )
524540AM_CONDITIONAL([ USE_EXAMPLES] , [ test x"$enable_examples" != x"no"] )
525541AM_CONDITIONAL([ USE_BENCHMARK] , [ test x"$enable_benchmark" = x"yes"] )
542+ AM_CONDITIONAL([ ENABLE_MODULE_BULLETPROOFS] , [ test x"$enable_module_bulletproofs" = x"yes"] )
526543AM_CONDITIONAL([ ENABLE_MODULE_ECDH] , [ test x"$enable_module_ecdh" = x"yes"] )
527544AM_CONDITIONAL([ ENABLE_MODULE_MUSIG] , [ test x"$enable_module_musig" = x"yes"] )
528545AM_CONDITIONAL([ ENABLE_MODULE_RECOVERY] , [ test x"$enable_module_recovery" = x"yes"] )
@@ -558,6 +575,7 @@ echo " module schnorrsig = $enable_module_schnorrsig"
558575echo " module musig = $enable_module_musig"
559576echo " module ecdsa-s2c = $enable_module_ecdsa_s2c"
560577echo " module ecdsa-adaptor = $enable_module_ecdsa_adaptor"
578+ echo " module bulletproofs = $enable_module_bulletproofs"
561579echo
562580echo " asm = $set_asm"
563581echo " ecmult window size = $set_ecmult_window"
0 commit comments