@@ -1354,7 +1354,10 @@ fi
13541354AC_MSG_RESULT ( $LDLIBRARY )
13551355
13561356# LIBRARY_DEPS, LINK_PYTHON_OBJS and LINK_PYTHON_DEPS variable
1357- LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)'
1357+ AS_CASE ( [ $ac_sys_system/$ac_sys_emscripten_target] ,
1358+ [ Emscripten/browser] , [ LIBRARY_DEPS='$(PY3LIBRARY) $(WASM_STDLIB)'] ,
1359+ [ LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)']
1360+ )
13581361LINK_PYTHON_DEPS='$(LIBRARY_DEPS)'
13591362if test "$PY_ENABLE_SHARED" = 1 || test "$enable_framework" ; then
13601363 LIBRARY_DEPS="\$(LDLIBRARY) $LIBRARY_DEPS"
@@ -1839,13 +1842,13 @@ fi
18391842# WASM flags
18401843AS_CASE ( [ $ac_sys_system/$ac_sys_emscripten_target] ,
18411844 [ Emscripten/browser] , [
1842- LDFLAGS_NODIST="$( LDFLAGS_NODIST) -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1 --preload-file \$(WASM_ASSETS_DIR)"
1845+ LDFLAGS_NODIST="$LDFLAGS_NODIST -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1 --preload-file \$(WASM_ASSETS_DIR)"
18431846 WASM_ASSETS_DIR=".\$(prefix)"
18441847 WASM_STDLIB="\$(WASM_ASSETS_DIR)/local/lib/python\$(VERSION)/os.py"
18451848 ] ,
18461849 [ Emscripten/node] , [
1847- 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"
1848- CFLAGS_NODIST="$( CFLAGS_NODIST) -pthread"
1850+ 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"
1851+ CFLAGS_NODIST="$CFLAGS_NODIST -pthread"
18491852 ] ,
18501853 [ WASI] , [
18511854 AC_DEFINE ( [ _WASI_EMULATED_SIGNAL] , [ 1] , [ Define to 1 if you want to emulate signals on WASI] )
@@ -6336,14 +6339,14 @@ AC_SUBST(TEST_MODULES)
63366339dnl Modules that are not available on some platforms
63376340dnl AIX has shadow passwords, but access is not via getspent()
63386341dnl VxWorks does not provide crypt() function
6339- AS_CASE ( [ $ac_sys_system] ,
6340- [ AIX] , [ py_stdlib_not_available="_scproxy spwd"] ,
6341- [ VxWorks*] , [ py_stdlib_not_available="_scproxy _crypt termios grp"] ,
6342- [ Darwin] , [ py_stdlib_not_available="ossaudiodev spwd"] ,
6343- [ CYGWIN*] , [ py_stdlib_not_available="_scproxy nis"] ,
6344- [ QNX*] , [ py_stdlib_not_available="_scproxy nis"] ,
6345- [ FreeBSD*] , [ py_stdlib_not_available="_scproxy spwd"] ,
6346- [ Emscripten] , [
6342+ AS_CASE ( [ $ac_sys_system/$ac_sys_emscripten_target ] ,
6343+ [ AIX/* ] , [ py_stdlib_not_available="_scproxy spwd"] ,
6344+ [ VxWorks*/* ] , [ py_stdlib_not_available="_scproxy _crypt termios grp"] ,
6345+ [ Darwin/* ] , [ py_stdlib_not_available="ossaudiodev spwd"] ,
6346+ [ CYGWIN*/* ] , [ py_stdlib_not_available="_scproxy nis"] ,
6347+ [ QNX*/* ] , [ py_stdlib_not_available="_scproxy nis"] ,
6348+ [ FreeBSD*/* ] , [ py_stdlib_not_available="_scproxy spwd"] ,
6349+ [ Emscripten/browser ] , [
63476350 py_stdlib_not_available="m4_normalize ( [
63486351 _ctypes
63496352 _curses
@@ -6367,6 +6370,23 @@ AS_CASE([$ac_sys_system],
63676370 termios
63686371 ] ) "
63696372 ] ,
6373+ dnl Some modules like _posixsubprocess do not work. We build them anyway
6374+ dnl so imports in tests do not fail.
6375+ [ Emscripten/node] , [
6376+ py_stdlib_not_available="m4_normalize ( [
6377+ _ctypes
6378+ _curses
6379+ _curses_panel
6380+ _dbm
6381+ _gdbm
6382+ _scproxy
6383+ _tkinter
6384+ nis
6385+ ossaudiodev
6386+ spwd
6387+ syslog
6388+ ] ) "
6389+ ] ,
63706390 [ py_stdlib_not_available="_scproxy"]
63716391)
63726392
0 commit comments