@@ -142,6 +142,10 @@ AC_ARG_ENABLE(tests,
142
142
AS_HELP_STRING ( [ --enable-tests] ,[ compile tests [ default=yes] ] ) , [ ] ,
143
143
[ SECP_SET_DEFAULT([ enable_tests] , [ yes] , [ yes] )] )
144
144
145
+ AC_ARG_ENABLE ( ctime_tests ,
146
+ AS_HELP_STRING ( [ --enable-ctime-tests] ,[ compile constant-time tests [ default=yes if valgrind enabled] ] ) , [ ] ,
147
+ [ SECP_SET_DEFAULT([ enable_ctime_tests] , [ auto] , [ auto] )] )
148
+
145
149
AC_ARG_ENABLE ( experimental ,
146
150
AS_HELP_STRING ( [ --enable-experimental] ,[ allow experimental configure options [ default=no] ] ) , [ ] ,
147
151
[ SECP_SET_DEFAULT([ enable_experimental] , [ no] , [ yes] )] )
@@ -227,6 +231,10 @@ else
227
231
fi
228
232
AM_CONDITIONAL([ VALGRIND_ENABLED] ,[ test "$enable_valgrind" = "yes"] )
229
233
234
+ if test x"$enable_ctime_tests" = x"auto"; then
235
+ enable_ctime_tests=$enable_valgrind
236
+ fi
237
+
230
238
if test x"$enable_coverage" = x"yes"; then
231
239
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DCOVERAGE=1"
232
240
SECP_CFLAGS="-O0 --coverage $SECP_CFLAGS"
@@ -407,6 +415,7 @@ AC_SUBST(SECP_CFLAGS)
407
415
AC_SUBST ( SECP_CONFIG_DEFINES )
408
416
AM_CONDITIONAL([ ENABLE_COVERAGE] , [ test x"$enable_coverage" = x"yes"] )
409
417
AM_CONDITIONAL([ USE_TESTS] , [ test x"$enable_tests" != x"no"] )
418
+ AM_CONDITIONAL([ USE_CTIME_TESTS] , [ test x"$enable_ctime_tests" = x"yes"] )
410
419
AM_CONDITIONAL([ USE_EXHAUSTIVE_TESTS] , [ test x"$enable_exhaustive_tests" != x"no"] )
411
420
AM_CONDITIONAL([ USE_EXAMPLES] , [ test x"$enable_examples" != x"no"] )
412
421
AM_CONDITIONAL([ USE_BENCHMARK] , [ test x"$enable_benchmark" = x"yes"] )
@@ -428,6 +437,7 @@ echo "Build Options:"
428
437
echo " with external callbacks = $enable_external_default_callbacks"
429
438
echo " with benchmarks = $enable_benchmark"
430
439
echo " with tests = $enable_tests"
440
+ echo " with ctime tests = $enable_ctime_tests"
431
441
echo " with coverage = $enable_coverage"
432
442
echo " with examples = $enable_examples"
433
443
echo " module ecdh = $enable_module_ecdh"
0 commit comments