diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2017-06-11 03:16:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-11 03:16:15 (GMT) |
commit | 6ea4186de32d65b1f1dc1533b6312b798d300466 (patch) | |
tree | bac8387f2da20d5b6d5f74bb09fb5708d1fbd61e /configure | |
parent | 0afbabe245e2eb6f7cef3b70531d69f2a7ad8295 (diff) | |
download | cpython-6ea4186de32d65b1f1dc1533b6312b798d300466.zip cpython-6ea4186de32d65b1f1dc1533b6312b798d300466.tar.gz cpython-6ea4186de32d65b1f1dc1533b6312b798d300466.tar.bz2 |
bpo-28180: Implementation for PEP 538 (#659)
- new PYTHONCOERCECLOCALE config setting
- coerces legacy C locale to C.UTF-8, C.utf8 or UTF-8 by default
- always uses C.UTF-8 on Android
- uses `surrogateescape` on stdin and stdout in the coercion
target locales
- configure option to disable locale coercion at build time
- configure option to disable C locale warning at build time
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 54 |
1 files changed, 54 insertions, 0 deletions
@@ -834,6 +834,8 @@ with_thread enable_ipv6 with_doc_strings with_pymalloc +with_c_locale_coercion +with_c_locale_warning with_valgrind with_dtrace with_fpectl @@ -1528,6 +1530,12 @@ Optional Packages: deprecated; use --with(out)-threads --with(out)-doc-strings disable/enable documentation strings --with(out)-pymalloc disable/enable specialized mallocs + --with(out)-c-locale-coercion + disable/enable C locale coercion to a UTF-8 based + locale + --with(out)-c-locale-warning + disable/enable locale compatibility warning in the C + locale --with-valgrind Enable Valgrind support --with(out)-dtrace disable/enable DTrace support --with-fpectl enable SIGFPE catching @@ -11047,6 +11055,52 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5 $as_echo "$with_pymalloc" >&6; } +# Check for --with-c-locale-coercion +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5 +$as_echo_n "checking for --with-c-locale-coercion... " >&6; } + +# Check whether --with-c-locale-coercion was given. +if test "${with_c_locale_coercion+set}" = set; then : + withval=$with_c_locale_coercion; +fi + + +if test -z "$with_c_locale_coercion" +then + with_c_locale_coercion="yes" +fi +if test "$with_c_locale_coercion" != "no" +then + +$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5 +$as_echo "$with_c_locale_coercion" >&6; } + +# Check for --with-c-locale-warning +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-warning" >&5 +$as_echo_n "checking for --with-c-locale-warning... " >&6; } + +# Check whether --with-c-locale-warning was given. +if test "${with_c_locale_warning+set}" = set; then : + withval=$with_c_locale_warning; +fi + + +if test -z "$with_c_locale_warning" +then + with_c_locale_warning="yes" +fi +if test "$with_c_locale_warning" != "no" +then + +$as_echo "#define PY_WARN_ON_C_LOCALE 1" >>confdefs.h + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_warning" >&5 +$as_echo "$with_c_locale_warning" >&6; } + # Check for Valgrind support { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5 $as_echo_n "checking for --with-valgrind... " >&6; } |