Tracing references is not currently thread-safe in the free-threaded build.
--- /dev/null
+Building using :option:`--with-trace-refs` is (temporarily) disallowed when the
+GIL is disabled.
fi
+if test "$disable_gil" = "yes" -a "$with_trace_refs" = "yes";
+then
+ as_fn_error $? "--disable-gil cannot be used with --with-trace-refs" "$LINENO" 5
+fi
# Check for --enable-pystats
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-pystats" >&5
[Define if you want to enable tracing references for debugging purpose])
fi
+if test "$disable_gil" = "yes" -a "$with_trace_refs" = "yes";
+then
+ AC_MSG_ERROR([--disable-gil cannot be used with --with-trace-refs])
+fi
# Check for --enable-pystats
AC_MSG_CHECKING([for --enable-pystats])