@@ -7502,6 +7502,15 @@ for builtin_hash in $with_builtin_hashlib_hashes; do
7502
7502
done
7503
7503
IFS=$as_save_IFS
7504
7504
7505
+ # builtin HACL* HMAC module
7506
+ AC_MSG_CHECKING ( [ for --with-builtin-hashlib-hmac=yes,no] )
7507
+ AC_ARG_WITH ( [ builtin-hashlib-hmac] ,
7508
+ [ AS_HELP_STRING ( [ --with-builtin-hashlib-hmac] ,
7509
+ [ use builtin HACL* HMAC when possible @<:@ default is yes@:>@ ] ) ] ,
7510
+ [ with_builtin_hashlib_hmac=$with_val] ,
7511
+ [ with_builtin_hashlib_hmac=yes] )
7512
+ AC_MSG_RESULT ( [ $with_builtin_hashlib_hmac] )
7513
+
7505
7514
# Check whether to disable test modules. Once set, setup.py will not build
7506
7515
# test extension modules and "make install" will not install test suites.
7507
7516
AC_MSG_CHECKING ( [ for --disable-test-modules] )
@@ -7843,6 +7852,10 @@ PY_STDLIB_MOD([_sha2], [test "$with_builtin_sha2" = yes])
7843
7852
PY_STDLIB_MOD([ _sha3] , [ test "$with_builtin_sha3" = yes] )
7844
7853
PY_STDLIB_MOD([ _blake2] , [ test "$with_builtin_blake2" = yes] )
7845
7854
7855
+ dnl We always build the '_hmac' extension module but falls back
7856
+ dnl to the Python implementation if needs arise.
7857
+ PY_STDLIB_MOD([ _hmac] , [ test "$with_builtin_hashlib_hmac" = yes] )
7858
+
7846
7859
LIBHACL_CFLAGS='-I$(srcdir)/Modules/_hacl -I$(srcdir)/Modules/_hacl/include -D_BSD_SOURCE -D_DEFAULT_SOURCE $(PY_STDMODULE_CFLAGS) $(CCSHARED)'
7847
7860
case "$ac_sys_system" in
7848
7861
Linux*)
0 commit comments