diff options
author | Christian Heimes <christian@python.org> | 2021-11-19 19:20:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-19 19:20:32 (GMT) |
commit | c8c21bdd199f9feb75fc6cdb398a686dc133b99f (patch) | |
tree | 2209af9f9e632048e496f88e725e3443b91c61a3 /configure | |
parent | e34809e1c2a09478f4e0651d551c9c12d3c556ab (diff) | |
download | cpython-c8c21bdd199f9feb75fc6cdb398a686dc133b99f.zip cpython-c8c21bdd199f9feb75fc6cdb398a686dc133b99f.tar.gz cpython-c8c21bdd199f9feb75fc6cdb398a686dc133b99f.tar.bz2 |
bpo-45847: Port builtin hashlib extensions to PY_STDLIB_MOD (GH-29642)
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 421 |
1 files changed, 400 insertions, 21 deletions
@@ -628,6 +628,18 @@ MODULE__SQLITE3_FALSE MODULE__SQLITE3_TRUE MODULE__DECIMAL_FALSE MODULE__DECIMAL_TRUE +MODULE__BLAKE2_FALSE +MODULE__BLAKE2_TRUE +MODULE__SHA3_FALSE +MODULE__SHA3_TRUE +MODULE__SHA512_FALSE +MODULE__SHA512_TRUE +MODULE__SHA256_FALSE +MODULE__SHA256_TRUE +MODULE__SHA1_FALSE +MODULE__SHA1_TRUE +MODULE__MD5_FALSE +MODULE__MD5_TRUE MODULE__ELEMENTTREE_FALSE MODULE__ELEMENTTREE_TRUE MODULE_PYEXPAT_FALSE @@ -19333,33 +19345,51 @@ $as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; } # Check whether --with-builtin-hashlib-hashes was given. if test "${with_builtin_hashlib_hashes+set}" = set; then : withval=$with_builtin_hashlib_hashes; -case "$withval" in - yes) - withval=$default_hashlib_hashes - ;; - no) - withval="" - ;; + case $with_builtin_hashlib_hashes in #( + yes) : + with_builtin_hashlib_hashes=$default_hashlib_hashes ;; #( + no) : + with_builtin_hashlib_hashes="" + ;; #( + *) : + ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 -$as_echo "$withval" >&6; } -cat >>confdefs.h <<_ACEOF -#define PY_BUILTIN_HASHLIB_HASHES "$withval" -_ACEOF - else - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5 -$as_echo "$default_hashlib_hashes" >&6; }; -cat >>confdefs.h <<_ACEOF -#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes" -_ACEOF - - + with_builtin_hashlib_hashes=$default_hashlib_hashes fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_builtin_hashlib_hashes" >&5 +$as_echo "$with_builtin_hashlib_hashes" >&6; } +cat >>confdefs.h <<_ACEOF +#define PY_BUILTIN_HASHLIB_HASHES "$with_builtin_hashlib_hashes" +_ACEOF + + +as_save_IFS=$IFS +IFS=, +for builtin_hash in $with_builtin_hashlib_hashes; do + case $builtin_hash in #( + md5) : + with_builtin_md5=yes ;; #( + sha1) : + with_builtin_sha1=yes ;; #( + sha256) : + with_builtin_sha256=yes ;; #( + sha512) : + with_builtin_sha512=yes ;; #( + sha3) : + with_builtin_sha3=yes ;; #( + blake2) : + with_builtin_blake2=yes + ;; #( + *) : + ;; +esac +done +IFS=$as_save_IFS + # --with-experimental-isolated-subinterpreters { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5 @@ -19660,6 +19690,307 @@ $as_echo "$py_cv_module__elementtree" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _md5" >&5 +$as_echo_n "checking for stdlib extension module _md5... " >&6; } + case $py_stdlib_not_available in #( + *_md5*) : + py_cv_module__md5=n/a ;; #( + *) : + + if test "$with_builtin_md5" = yes; then : + if true; then : + py_cv_module__md5=yes +else + py_cv_module__md5=missing +fi +else + py_cv_module__md5=disabled + +fi + + ;; +esac + as_fn_append MODULE_BLOCK "MODULE__MD5=$py_cv_module__md5$as_nl" + if test "x$py_cv_module__md5" = xyes; then : + + as_fn_append MODULE_BLOCK "MODULE__MD5_CFLAGS=$as_nl" + as_fn_append MODULE_BLOCK "MODULE__MD5_LDFLAGS=$as_nl" + if true; then + MODULE__MD5_TRUE= + MODULE__MD5_FALSE='#' +else + MODULE__MD5_TRUE='#' + MODULE__MD5_FALSE= +fi + + +else + + if false; then + MODULE__MD5_TRUE= + MODULE__MD5_FALSE='#' +else + MODULE__MD5_TRUE='#' + MODULE__MD5_FALSE= +fi + + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $py_cv_module__md5" >&5 +$as_echo "$py_cv_module__md5" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _sha1" >&5 +$as_echo_n "checking for stdlib extension module _sha1... " >&6; } + case $py_stdlib_not_available in #( + *_sha1*) : + py_cv_module__sha1=n/a ;; #( + *) : + + if test "$with_builtin_sha1" = yes; then : + if true; then : + py_cv_module__sha1=yes +else + py_cv_module__sha1=missing +fi +else + py_cv_module__sha1=disabled + +fi + + ;; +esac + as_fn_append MODULE_BLOCK "MODULE__SHA1=$py_cv_module__sha1$as_nl" + if test "x$py_cv_module__sha1" = xyes; then : + + as_fn_append MODULE_BLOCK "MODULE__SHA1_CFLAGS=$as_nl" + as_fn_append MODULE_BLOCK "MODULE__SHA1_LDFLAGS=$as_nl" + if true; then + MODULE__SHA1_TRUE= + MODULE__SHA1_FALSE='#' +else + MODULE__SHA1_TRUE='#' + MODULE__SHA1_FALSE= +fi + + +else + + if false; then + MODULE__SHA1_TRUE= + MODULE__SHA1_FALSE='#' +else + MODULE__SHA1_TRUE='#' + MODULE__SHA1_FALSE= +fi + + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $py_cv_module__sha1" >&5 +$as_echo "$py_cv_module__sha1" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _sha256" >&5 +$as_echo_n "checking for stdlib extension module _sha256... " >&6; } + case $py_stdlib_not_available in #( + *_sha256*) : + py_cv_module__sha256=n/a ;; #( + *) : + + if test "$with_builtin_sha256" = yes; then : + if true; then : + py_cv_module__sha256=yes +else + py_cv_module__sha256=missing +fi +else + py_cv_module__sha256=disabled + +fi + + ;; +esac + as_fn_append MODULE_BLOCK "MODULE__SHA256=$py_cv_module__sha256$as_nl" + if test "x$py_cv_module__sha256" = xyes; then : + + as_fn_append MODULE_BLOCK "MODULE__SHA256_CFLAGS=$as_nl" + as_fn_append MODULE_BLOCK "MODULE__SHA256_LDFLAGS=$as_nl" + if true; then + MODULE__SHA256_TRUE= + MODULE__SHA256_FALSE='#' +else + MODULE__SHA256_TRUE='#' + MODULE__SHA256_FALSE= +fi + + +else + + if false; then + MODULE__SHA256_TRUE= + MODULE__SHA256_FALSE='#' +else + MODULE__SHA256_TRUE='#' + MODULE__SHA256_FALSE= +fi + + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $py_cv_module__sha256" >&5 +$as_echo "$py_cv_module__sha256" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _sha512" >&5 +$as_echo_n "checking for stdlib extension module _sha512... " >&6; } + case $py_stdlib_not_available in #( + *_sha512*) : + py_cv_module__sha512=n/a ;; #( + *) : + + if test "$with_builtin_sha512" = yes; then : + if true; then : + py_cv_module__sha512=yes +else + py_cv_module__sha512=missing +fi +else + py_cv_module__sha512=disabled + +fi + + ;; +esac + as_fn_append MODULE_BLOCK "MODULE__SHA512=$py_cv_module__sha512$as_nl" + if test "x$py_cv_module__sha512" = xyes; then : + + as_fn_append MODULE_BLOCK "MODULE__SHA512_CFLAGS=$as_nl" + as_fn_append MODULE_BLOCK "MODULE__SHA512_LDFLAGS=$as_nl" + if true; then + MODULE__SHA512_TRUE= + MODULE__SHA512_FALSE='#' +else + MODULE__SHA512_TRUE='#' + MODULE__SHA512_FALSE= +fi + + +else + + if false; then + MODULE__SHA512_TRUE= + MODULE__SHA512_FALSE='#' +else + MODULE__SHA512_TRUE='#' + MODULE__SHA512_FALSE= +fi + + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $py_cv_module__sha512" >&5 +$as_echo "$py_cv_module__sha512" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _sha3" >&5 +$as_echo_n "checking for stdlib extension module _sha3... " >&6; } + case $py_stdlib_not_available in #( + *_sha3*) : + py_cv_module__sha3=n/a ;; #( + *) : + + if test "$with_builtin_sha3" = yes; then : + if true; then : + py_cv_module__sha3=yes +else + py_cv_module__sha3=missing +fi +else + py_cv_module__sha3=disabled + +fi + + ;; +esac + as_fn_append MODULE_BLOCK "MODULE__SHA3=$py_cv_module__sha3$as_nl" + if test "x$py_cv_module__sha3" = xyes; then : + + as_fn_append MODULE_BLOCK "MODULE__SHA3_CFLAGS=$as_nl" + as_fn_append MODULE_BLOCK "MODULE__SHA3_LDFLAGS=$as_nl" + if true; then + MODULE__SHA3_TRUE= + MODULE__SHA3_FALSE='#' +else + MODULE__SHA3_TRUE='#' + MODULE__SHA3_FALSE= +fi + + +else + + if false; then + MODULE__SHA3_TRUE= + MODULE__SHA3_FALSE='#' +else + MODULE__SHA3_TRUE='#' + MODULE__SHA3_FALSE= +fi + + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $py_cv_module__sha3" >&5 +$as_echo "$py_cv_module__sha3" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _blake2" >&5 +$as_echo_n "checking for stdlib extension module _blake2... " >&6; } + case $py_stdlib_not_available in #( + *_blake2*) : + py_cv_module__blake2=n/a ;; #( + *) : + + if test "$with_builtin_blake2" = yes; then : + if true; then : + py_cv_module__blake2=yes +else + py_cv_module__blake2=missing +fi +else + py_cv_module__blake2=disabled + +fi + + ;; +esac + as_fn_append MODULE_BLOCK "MODULE__BLAKE2=$py_cv_module__blake2$as_nl" + if test "x$py_cv_module__blake2" = xyes; then : + + as_fn_append MODULE_BLOCK "MODULE__BLAKE2_CFLAGS=$as_nl" + as_fn_append MODULE_BLOCK "MODULE__BLAKE2_LDFLAGS=$as_nl" + if true; then + MODULE__BLAKE2_TRUE= + MODULE__BLAKE2_FALSE='#' +else + MODULE__BLAKE2_TRUE='#' + MODULE__BLAKE2_FALSE= +fi + + +else + + if false; then + MODULE__BLAKE2_TRUE= + MODULE__BLAKE2_FALSE='#' +else + MODULE__BLAKE2_TRUE='#' + MODULE__BLAKE2_FALSE= +fi + + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $py_cv_module__blake2" >&5 +$as_echo "$py_cv_module__blake2" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdlib extension module _decimal" >&5 $as_echo_n "checking for stdlib extension module _decimal... " >&6; } case $py_stdlib_not_available in #( @@ -19916,6 +20247,54 @@ if test -z "${MODULE__ELEMENTTREE_TRUE}" && test -z "${MODULE__ELEMENTTREE_FALSE as_fn_error $? "conditional \"MODULE__ELEMENTTREE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${MODULE__MD5_TRUE}" && test -z "${MODULE__MD5_FALSE}"; then + as_fn_error $? "conditional \"MODULE__MD5\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MODULE__MD5_TRUE}" && test -z "${MODULE__MD5_FALSE}"; then + as_fn_error $? "conditional \"MODULE__MD5\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MODULE__SHA1_TRUE}" && test -z "${MODULE__SHA1_FALSE}"; then + as_fn_error $? "conditional \"MODULE__SHA1\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MODULE__SHA1_TRUE}" && test -z "${MODULE__SHA1_FALSE}"; then + as_fn_error $? "conditional \"MODULE__SHA1\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MODULE__SHA256_TRUE}" && test -z "${MODULE__SHA256_FALSE}"; then + as_fn_error $? "conditional \"MODULE__SHA256\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MODULE__SHA256_TRUE}" && test -z "${MODULE__SHA256_FALSE}"; then + as_fn_error $? "conditional \"MODULE__SHA256\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MODULE__SHA512_TRUE}" && test -z "${MODULE__SHA512_FALSE}"; then + as_fn_error $? "conditional \"MODULE__SHA512\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MODULE__SHA512_TRUE}" && test -z "${MODULE__SHA512_FALSE}"; then + as_fn_error $? "conditional \"MODULE__SHA512\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MODULE__SHA3_TRUE}" && test -z "${MODULE__SHA3_FALSE}"; then + as_fn_error $? "conditional \"MODULE__SHA3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MODULE__SHA3_TRUE}" && test -z "${MODULE__SHA3_FALSE}"; then + as_fn_error $? "conditional \"MODULE__SHA3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MODULE__BLAKE2_TRUE}" && test -z "${MODULE__BLAKE2_FALSE}"; then + as_fn_error $? "conditional \"MODULE__BLAKE2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${MODULE__BLAKE2_TRUE}" && test -z "${MODULE__BLAKE2_FALSE}"; then + as_fn_error $? "conditional \"MODULE__BLAKE2\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${MODULE__DECIMAL_TRUE}" && test -z "${MODULE__DECIMAL_FALSE}"; then as_fn_error $? "conditional \"MODULE__DECIMAL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 |