summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2021-12-18 14:54:02 (GMT)
committerGitHub <noreply@github.com>2021-12-18 14:54:02 (GMT)
commit0339434835aa74dc78a38ae12ea7d2973c144eb1 (patch)
tree63e143ba11625131ba0d9e90dc09d96953337454 /configure.ac
parentae36cd1e792db9d6db4c6847ec2a7d50a71f2b68 (diff)
downloadcpython-0339434835aa74dc78a38ae12ea7d2973c144eb1.zip
cpython-0339434835aa74dc78a38ae12ea7d2973c144eb1.tar.gz
cpython-0339434835aa74dc78a38ae12ea7d2973c144eb1.tar.bz2
bpo-40280: Add Tools/wasm with helpers for cross building (GH-29984)
Co-authored-by: Ethan Smith <ethan@ethanhs.me> Co-authored-by: Brett Cannon <brett@python.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 26 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 86404bc..050b907 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3865,7 +3865,11 @@ AC_ARG_WITH(pymalloc,
if test -z "$with_pymalloc"
then
- with_pymalloc="yes"
+ dnl default to yes except for wasm32-emscripten
+ AS_CASE([$ac_sys_system],
+ [Emscripten], [with_pymalloc="no"],
+ [with_pymalloc="yes"]
+ )
fi
if test "$with_pymalloc" != "no"
then
@@ -6253,11 +6257,15 @@ AC_ARG_ENABLE(test-modules,
AS_HELP_STRING([--disable-test-modules], [don't build nor install test modules]))
if test "$enable_test_modules" = no; then
TEST_MODULES=no
- AC_MSG_RESULT(yes)
else
- TEST_MODULES=yes
- AC_MSG_RESULT(no)
+ AS_CASE([$ac_sys_system],
+ [Emscripten], [TEST_MODULES=no],
+ [TEST_MODULES=yes]
+ )
fi
+AS_VAR_IF([TEST_MODULES], [yes],
+ [AC_MSG_RESULT(no)], [AC_MSG_RESULT(yes)]
+)
AC_SUBST(TEST_MODULES)
dnl Modules that are not available on some platforms
@@ -6272,6 +6280,7 @@ AS_CASE([$ac_sys_system],
[FreeBSD*], [py_stdlib_not_available="_scproxy spwd"],
[Emscripten], [
py_stdlib_not_available="m4_normalize([
+ _ctypes
_curses
_curses_panel
_dbm
@@ -6280,12 +6289,14 @@ AS_CASE([$ac_sys_system],
_posixshmem
_posixsubprocess
_scproxy
+ _tkinter
_xxsubinterpreters
fcntl
grp
nis
ossaudiodev
resource
+ readline
spwd
syslog
termios
@@ -6301,6 +6312,16 @@ AS_CASE([$host_cpu],
)
AC_SUBST([MODULE_BUILDTYPE])
+dnl Use Modules/Setup.stdlib as additional provider?
+AC_MSG_CHECKING([for additional Modules/Setup files])
+AS_CASE([$ac_sys_system],
+ [Emscripten], [MODULES_SETUP_STDLIB=Modules/Setup.stdlib],
+ [MODULES_SETUP_STDLIB=]
+)
+AC_MSG_RESULT([$MODULES_SETUP_STDLIB])
+AC_SUBST([MODULES_SETUP_STDLIB])
+
+
dnl _MODULE_BLOCK_ADD([VAR], [VALUE])
dnl internal: adds $1=quote($2) to MODULE_BLOCK
AC_DEFUN([_MODULE_BLOCK_ADD], [AS_VAR_APPEND([MODULE_BLOCK], ["$1=_AS_QUOTE([$2])$as_nl"])])
@@ -6515,7 +6536,7 @@ fi
AC_MSG_NOTICE([creating Makefile])
$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
-s Modules \
- Modules/Setup.local $srcdir/Modules/Setup.bootstrap $srcdir/Modules/Setup
+ Modules/Setup.local $MODULES_SETUP_STDLIB $srcdir/Modules/Setup.bootstrap $srcdir/Modules/Setup
mv config.c Modules
if test -z "$PKG_CONFIG"; then