diff options
author | Christian Heimes <christian@python.org> | 2022-08-01 14:37:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-01 14:37:45 (GMT) |
commit | e62a0dfab2bbc29324ca1879e287fff7fa8f21e0 (patch) | |
tree | 024357a512b6fa49ce42c8c331de3d2e56851bc2 /configure.ac | |
parent | 9af9ea28e756a8a1961b065856c697fc1262ca82 (diff) | |
download | cpython-e62a0dfab2bbc29324ca1879e287fff7fa8f21e0.zip cpython-e62a0dfab2bbc29324ca1879e287fff7fa8f21e0.tar.gz cpython-e62a0dfab2bbc29324ca1879e287fff7fa8f21e0.tar.bz2 |
[3.11] gh-95174: Add pthread stubs for WASI (GH-95234) (#95503)
Co-authored-by: Brett Cannon <brett@python.org>.
(cherry picked from commit 0fe645d6fd22a6f57e777a29e65cf9a4ff9785ae)
Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 4436379..77fb609 100644 --- a/configure.ac +++ b/configure.ac @@ -4092,9 +4092,11 @@ pthread_create (NULL, NULL, start_routine, NULL)]])],[ posix_threads=yes LIBS="$LIBS -lcma" ],[ - AC_MSG_ERROR([could not find pthreads on your system]) - ]) - ])])])])]) + AS_CASE([$ac_sys_system], + [WASI], [posix_threads=stub], + [AC_MSG_ERROR([could not find pthreads on your system])] + ) + ])])])])])]) AC_CHECK_LIB(mpc, usconfig, [ LIBS="$LIBS -lmpc" @@ -4157,6 +4159,10 @@ if test "$posix_threads" = "yes"; then AC_CHECK_FUNCS(pthread_getcpuclockid) fi +AS_VAR_IF([posix_threads], [stub], [ + AC_DEFINE([HAVE_PTHREAD_STUBS], [1], [Define if platform requires stubbed pthreads support]) +]) + # Check for enable-ipv6 AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified]) AC_MSG_CHECKING([if --enable-ipv6 is specified]) |