@@ -7502,6 +7502,15 @@ for builtin_hash in $with_builtin_hashlib_hashes; do
75027502done
75037503IFS=$as_save_IFS
75047504
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+
75057514# Check whether to disable test modules. Once set, setup.py will not build
75067515# test extension modules and "make install" will not install test suites.
75077516AC_MSG_CHECKING ( [ for --disable-test-modules] )
@@ -7843,6 +7852,10 @@ PY_STDLIB_MOD([_sha2], [test "$with_builtin_sha2" = yes])
78437852PY_STDLIB_MOD([ _sha3] , [ test "$with_builtin_sha3" = yes] )
78447853PY_STDLIB_MOD([ _blake2] , [ test "$with_builtin_blake2" = yes] )
78457854
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+
78467859LIBHACL_CFLAGS='-I$(srcdir)/Modules/_hacl -I$(srcdir)/Modules/_hacl/include -D_BSD_SOURCE -D_DEFAULT_SOURCE $(PY_STDMODULE_CFLAGS) $(CCSHARED)'
78477860case "$ac_sys_system" in
78487861 Linux*)
0 commit comments