summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-01-13 08:46:04 (GMT)
committerGitHub <noreply@github.com>2022-01-13 08:46:04 (GMT)
commita6ca8eee2254762422f90cf94fbaac34f85db780 (patch)
tree6017b6edc8445b18afc5ec23c5e75a4bdb983ba5 /configure.ac
parent1de60155d5d01be2924e72fb68dd13d4fd00acd7 (diff)
downloadcpython-a6ca8eee2254762422f90cf94fbaac34f85db780.zip
cpython-a6ca8eee2254762422f90cf94fbaac34f85db780.tar.gz
cpython-a6ca8eee2254762422f90cf94fbaac34f85db780.tar.bz2
bpo-46315: Add ifdef HAVE_ feature checks for WASI compatibility (GH-30507)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 9 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 4396828..e5ebf7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1093,7 +1093,7 @@ AC_ARG_WITH([suffix],
AS_CASE([$ac_sys_system/$ac_sys_emscripten_target],
[Emscripten/browser], [EXEEXT=.html],
[Emscripten/node], [EXEEXT=.js],
- [wasi/*], [EXEEXT=.wasm],
+ [WASI/*], [EXEEXT=.wasm],
[EXEEXT=]
)
])
@@ -1805,6 +1805,11 @@ AS_CASE([$ac_sys_system/$ac_sys_emscripten_target],
LDFLAGS_NODIST="$(LDFLAGS_NODIST) -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1 -s NODERAWFS=1 -s EXIT_RUNTIME=1 -s USE_PTHREADS -s PROXY_TO_PTHREAD"
CFLAGS_NODIST="$(CFLAGS_NODIST) -pthread"
],
+ [WASI], [
+ AC_DEFINE([_WASI_EMULATED_SIGNAL], [1], [Define to 1 if you want to emulate signals on WASI])
+ LIBS="$LIBS -lwasi-emulated-signal"
+ echo "#define _WASI_EMULATED_SIGNAL 1" >> confdefs.h
+ ]
)
AC_SUBST(BASECFLAGS)
@@ -2306,7 +2311,7 @@ AC_CHECK_HEADERS([ \
alloca.h asm/types.h bluetooth.h conio.h crypt.h direct.h dlfcn.h endian.h errno.h fcntl.h grp.h \
ieeefp.h io.h langinfo.h libintl.h libutil.h linux/memfd.h linux/random.h linux/soundcard.h \
linux/tipc.h linux/wait.h netinet/in.h netpacket/packet.h poll.h process.h pthread.h pty.h \
- sched.h shadow.h signal.h spawn.h stropts.h sys/audioio.h sys/bsdtty.h sys/devpoll.h \
+ sched.h setjmp.h shadow.h signal.h spawn.h stropts.h sys/audioio.h sys/bsdtty.h sys/devpoll.h \
sys/endian.h sys/epoll.h sys/event.h sys/eventfd.h sys/file.h sys/ioctl.h sys/kern_control.h \
sys/loadavg.h sys/lock.h sys/memfd.h sys/mkdev.h sys/mman.h sys/modem.h sys/param.h sys/poll.h \
sys/random.h sys/resource.h sys/select.h sys/sendfile.h sys/socket.h sys/soundcard.h sys/stat.h \
@@ -4062,7 +4067,7 @@ fi
# checks for library functions
AC_CHECK_FUNCS([ \
- accept4 alarm bind_textdomain_codeset chown clock close_range confstr \
+ accept4 alarm bind_textdomain_codeset chmod chown clock close_range confstr \
copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \
faccessat fchmod fchmodat fchown fchownat fdopendir fdwalk fexecve \
fork fork1 fpathconf fstatat ftime ftruncate futimens futimes futimesat \
@@ -4084,7 +4089,7 @@ AC_CHECK_FUNCS([ \
sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \
sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
sysconf system tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \
- tmpnam tmpnam_r truncate ttyname uname unlinkat utimensat utimes vfork \
+ tmpnam tmpnam_r truncate ttyname umask uname unlinkat utimensat utimes vfork \
wait wait3 wait4 waitid waitpid wcscoll wcsftime wcsxfrm wmemcmp writev \
])