67
67
68
68
CFLAGS="-W $CFLAGS"
69
69
70
- warn_CFLAGS="-std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings"
70
+ warn_CFLAGS="-std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wundef - Wno-unused-function -Wno-long-long -Wno-overlength-strings"
71
71
saved_CFLAGS="$CFLAGS"
72
72
CFLAGS="$warn_CFLAGS $CFLAGS"
73
73
AC_MSG_CHECKING ( [ if ${CC} supports ${warn_CFLAGS}] )
@@ -136,6 +136,16 @@ AC_ARG_ENABLE(module_recovery,
136
136
[ enable_module_recovery=$enableval] ,
137
137
[ enable_module_recovery=no] )
138
138
139
+ AC_ARG_ENABLE ( module_extrakeys ,
140
+ AS_HELP_STRING ( [ --enable-module-extrakeys] ,[ enable extrakeys module (experimental)] ) ,
141
+ [ enable_module_extrakeys=$enableval] ,
142
+ [ enable_module_extrakeys=no] )
143
+
144
+ AC_ARG_ENABLE ( module_schnorrsig ,
145
+ AS_HELP_STRING ( [ --enable-module-schnorrsig] ,[ enable schnorrsig module (experimental)] ) ,
146
+ [ enable_module_schnorrsig=$enableval] ,
147
+ [ enable_module_schnorrsig=no] )
148
+
139
149
AC_ARG_ENABLE ( external_default_callbacks ,
140
150
AS_HELP_STRING ( [ --enable-external-default-callbacks] ,[ enable external default callback functions [ default=no] ] ) ,
141
151
[ use_external_default_callbacks=$enableval] ,
@@ -168,7 +178,21 @@ AC_ARG_WITH([ecmult-gen-precision], [AS_HELP_STRING([--with-ecmult-gen-precision
168
178
) ] ,
169
179
[ req_ecmult_gen_precision=$withval] , [ req_ecmult_gen_precision=auto] )
170
180
171
- AC_CHECK_HEADER ( [ valgrind/memcheck.h] , [ enable_valgrind=yes] , [ enable_valgrind=no] , [ ] )
181
+ AC_ARG_WITH ( [ valgrind] , [ AS_HELP_STRING ( [ --with-valgrind=yes|no|auto] ,
182
+ [ Build with extra checks for running inside Valgrind [ default=auto] ]
183
+ ) ] ,
184
+ [ req_valgrind=$withval] , [ req_valgrind=auto] )
185
+
186
+ if test x"$req_valgrind" = x"no"; then
187
+ enable_valgrind=no
188
+ else
189
+ AC_CHECK_HEADER ( [ valgrind/memcheck.h] , [ enable_valgrind=yes] , [
190
+ if test x"$req_valgrind" = x"yes"; then
191
+ AC_MSG_ERROR ( [ Valgrind support explicitly requested but valgrind/memcheck.h header not available] )
192
+ fi
193
+ enable_valgrind=no
194
+ ] , [ ] )
195
+ fi
172
196
AM_CONDITIONAL([ VALGRIND_ENABLED] ,[ test "$enable_valgrind" = "yes"] )
173
197
174
198
if test x"$enable_coverage" = x"yes"; then
@@ -421,6 +445,17 @@ if test x"$enable_module_recovery" = x"yes"; then
421
445
AC_DEFINE ( ENABLE_MODULE_RECOVERY , 1 , [ Define this symbol to enable the ECDSA pubkey recovery module] )
422
446
fi
423
447
448
+ if test x"$enable_module_schnorrsig" = x"yes"; then
449
+ AC_DEFINE ( ENABLE_MODULE_SCHNORRSIG , 1 , [ Define this symbol to enable the schnorrsig module] )
450
+ enable_module_extrakeys=yes
451
+ fi
452
+
453
+ # Test if extrakeys is set after the schnorrsig module to allow the schnorrsig
454
+ # module to set enable_module_extrakeys=yes
455
+ if test x"$enable_module_extrakeys" = x"yes"; then
456
+ AC_DEFINE ( ENABLE_MODULE_EXTRAKEYS , 1 , [ Define this symbol to enable the extrakeys module] )
457
+ fi
458
+
424
459
if test x"$use_external_asm" = x"yes"; then
425
460
AC_DEFINE ( USE_EXTERNAL_ASM , 1 , [ Define this symbol if an external (non-inline) assembly implementation is used] )
426
461
fi
@@ -434,11 +469,19 @@ if test x"$enable_experimental" = x"yes"; then
434
469
AC_MSG_NOTICE ( [ WARNING: experimental build] )
435
470
AC_MSG_NOTICE ( [ Experimental features do not have stable APIs or properties, and may not be safe for production use.] )
436
471
AC_MSG_NOTICE ( [ Building ECDH module: $enable_module_ecdh] )
472
+ AC_MSG_NOTICE ( [ Building extrakeys module: $enable_module_extrakeys] )
473
+ AC_MSG_NOTICE ( [ Building schnorrsig module: $enable_module_schnorrsig] )
437
474
AC_MSG_NOTICE ( [ ******] )
438
475
else
439
476
if test x"$enable_module_ecdh" = x"yes"; then
440
477
AC_MSG_ERROR ( [ ECDH module is experimental. Use --enable-experimental to allow.] )
441
478
fi
479
+ if test x"$enable_module_extrakeys" = x"yes"; then
480
+ AC_MSG_ERROR ( [ extrakeys module is experimental. Use --enable-experimental to allow.] )
481
+ fi
482
+ if test x"$enable_module_schnorrsig" = x"yes"; then
483
+ AC_MSG_ERROR ( [ schnorrsig module is experimental. Use --enable-experimental to allow.] )
484
+ fi
442
485
if test x"$set_asm" = x"arm"; then
443
486
AC_MSG_ERROR ( [ ARM assembly optimization is experimental. Use --enable-experimental to allow.] )
444
487
fi
@@ -457,6 +500,8 @@ AM_CONDITIONAL([USE_BENCHMARK], [test x"$use_benchmark" = x"yes"])
457
500
AM_CONDITIONAL([ USE_ECMULT_STATIC_PRECOMPUTATION] , [ test x"$set_precomp" = x"yes"] )
458
501
AM_CONDITIONAL([ ENABLE_MODULE_ECDH] , [ test x"$enable_module_ecdh" = x"yes"] )
459
502
AM_CONDITIONAL([ ENABLE_MODULE_RECOVERY] , [ test x"$enable_module_recovery" = x"yes"] )
503
+ AM_CONDITIONAL([ ENABLE_MODULE_EXTRAKEYS] , [ test x"$enable_module_extrakeys" = x"yes"] )
504
+ AM_CONDITIONAL([ ENABLE_MODULE_SCHNORRSIG] , [ test x"$enable_module_schnorrsig" = x"yes"] )
460
505
AM_CONDITIONAL([ USE_EXTERNAL_ASM] , [ test x"$use_external_asm" = x"yes"] )
461
506
AM_CONDITIONAL([ USE_ASM_ARM] , [ test x"$set_asm" = x"arm"] )
462
507
@@ -476,6 +521,8 @@ echo " with benchmarks = $use_benchmark"
476
521
echo " with coverage = $enable_coverage"
477
522
echo " module ecdh = $enable_module_ecdh"
478
523
echo " module recovery = $enable_module_recovery"
524
+ echo " module extrakeys = $enable_module_extrakeys"
525
+ echo " module schnorrsig = $enable_module_schnorrsig"
479
526
echo
480
527
echo " asm = $set_asm"
481
528
echo " bignum = $set_bignum"
0 commit comments