/* Define if the python directory should be relocated when GDB is moved. */
#undef PYTHON_PATH_RELOCATABLE
+/* Define if GDB should be built against the Python limited C API. */
+#undef Py_LIMITED_API
+
/* Relocated directory for source files. */
#undef RELOC_SRCDIR
with_libexpat_type
with_python
with_python_libdir
+enable_py_limited_api
with_guile
enable_gdb_compile
enable_source_highlight
--enable-gdbtk enable gdbtk graphical user interface (GUI)
--enable-profiling enable profiling of GDB
--enable-codesign=CERT sign gdb with 'codesign -s CERT'
+ --enable-py-limited-api enable build against the Python limited C API,
+ default 'no'
--enable-gdb-compile enable support for the compile subsystem, default
'yes'
--enable-source-highlight
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11891 "configure"
+#line 11894 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11997 "configure"
+#line 12000 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
fi
+# Check whether to build GDB against Python limited C API.
+# Check whether --enable-py-limited-api was given.
+if test "${enable_py_limited_api+set}" = set; then :
+ enableval=$enable_py_limited_api;
+ case $enableval in
+ yes | no)
+ ;;
+ *)
+ as_fn_error $? "bad value $enableval for --enable-py-limited-api" "$LINENO" 5
+ ;;
+ esac
+
+else
+ enable_py_limited_api=no
+fi
+
+
+if test "$enable_py_limited_api" == yes; then
+ # The minimal Python limited API version is currently set to 3.11 for the
+ # support of PyBuffer_FillInfo and PyBuffer_Release.
+ # The choice of the minimal version for the Python limited API won't be frozen
+ # until the end of the migration.
+
+$as_echo "#define Py_LIMITED_API 0x030b0000" >>confdefs.h
+
+fi
+
# -------------------- #
# Check for libguile. #
# -------------------- #
AC_SUBST(PYTHON_LIBS)
AM_CONDITIONAL(HAVE_PYTHON, test "${have_libpython}" != no)
+# Check whether to build GDB against Python limited C API.
+AC_ARG_ENABLE([py-limited-api],
+ [AS_HELP_STRING([--enable-py-limited-api],
+ [enable build against the Python limited C API, default 'no'])],
+ [GDB_CHECK_YES_NO_VAL([$enableval], [--enable-py-limited-api])],
+ [enable_py_limited_api=no])
+
+if test "$enable_py_limited_api" == yes; then
+ # The minimal Python limited API version is currently set to 3.11 for the
+ # support of PyBuffer_FillInfo and PyBuffer_Release.
+ # The choice of the minimal version for the Python limited API won't be frozen
+ # until the end of the migration.
+ AC_DEFINE(Py_LIMITED_API, 0x030b0000,
+ [Define if GDB should be built against the Python limited C API.])
+fi
+
# -------------------- #
# Check for libguile. #
# -------------------- #