Skip to content

Commit e912e47

Browse files
committed
configure.ac: fix building some test modules
they are guarded by dlopen being present, but if module loading is enabled is more correct.
1 parent 3a239a4 commit e912e47

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

configure.ac

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4840,8 +4840,11 @@ fi
48404840
AC_MSG_RESULT($DYNLOADFILE)
48414841
if test "$DYNLOADFILE" != "dynload_stub.o"
48424842
then
4843+
have_dynamic_loading=yes
48434844
AC_DEFINE(HAVE_DYNAMIC_LOADING, 1,
48444845
[Defined when any dynamic module loading is enabled.])
4846+
else
4847+
have_dynamic_loading=no
48454848
fi
48464849

48474850
# MACHDEP_OBJS can be set to platform-specific object files needed by Python
@@ -7578,16 +7581,16 @@ PY_STDLIB_MOD([_testcapi], [test "$TEST_MODULES" = yes])
75787581
PY_STDLIB_MOD([_testclinic], [test "$TEST_MODULES" = yes])
75797582
PY_STDLIB_MOD([_testinternalcapi], [test "$TEST_MODULES" = yes], [], [-DPY3_DLLNAME="\"$DLLLIBRARY\""], [])
75807583
PY_STDLIB_MOD([_testbuffer], [test "$TEST_MODULES" = yes])
7581-
PY_STDLIB_MOD([_testimportmultiple], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes])
7582-
PY_STDLIB_MOD([_testmultiphase], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes])
7584+
PY_STDLIB_MOD([_testimportmultiple], [test "$TEST_MODULES" = yes], [test "$have_dynamic_loading" = yes])
7585+
PY_STDLIB_MOD([_testmultiphase], [test "$TEST_MODULES" = yes], [test "$have_dynamic_loading" = yes])
75837586
PY_STDLIB_MOD([_xxtestfuzz], [test "$TEST_MODULES" = yes])
7584-
PY_STDLIB_MOD([_ctypes_test], [test "$TEST_MODULES" = yes], [test "$ac_cv_func_dlopen" = yes], [], [-lm])
7587+
PY_STDLIB_MOD([_ctypes_test], [test "$TEST_MODULES" = yes], [test "$have_dynamic_loading" = yes], [], [-lm])
75857588

75867589
dnl Limited API template modules.
75877590
dnl The limited C API is not compatible with the Py_TRACE_REFS macro.
75887591
dnl Emscripten does not support shared libraries yet.
7589-
PY_STDLIB_MOD([xxlimited], [test "$with_trace_refs" = "no"], [test "$ac_cv_func_dlopen" = yes])
7590-
PY_STDLIB_MOD([xxlimited_35], [test "$with_trace_refs" = "no"], [test "$ac_cv_func_dlopen" = yes])
7592+
PY_STDLIB_MOD([xxlimited], [test "$with_trace_refs" = "no"], [test "$have_dynamic_loading" = yes])
7593+
PY_STDLIB_MOD([xxlimited_35], [test "$with_trace_refs" = "no"], [test "$have_dynamic_loading" = yes])
75917594

75927595
# substitute multiline block, must come after last PY_STDLIB_MOD()
75937596
AC_SUBST([MODULE_BLOCK])

0 commit comments

Comments
 (0)