diff --git a/configure.ac b/configure.ac index 92adc44da0..1c24cc74e9 100644 --- a/configure.ac +++ b/configure.ac @@ -134,6 +134,14 @@ fi AC_CONFIG_SRCDIR([Include/object.h]) AC_CONFIG_HEADERS([pyconfig.h]) +dnl *********************************************************************** +dnl * SECTION 1: Platform and Build Configuration Detection +dnl * +dnl * This section determines build/host platform triplets and sets up +dnl * cross-compilation support. It also configures Python-for-build +dnl * and module freezing tools needed during the build process. +dnl *********************************************************************** + AC_CANONICAL_HOST AC_SUBST([build]) AC_SUBST([host]) @@ -1058,6 +1066,14 @@ then fi fi fi + +dnl *********************************************************************** +dnl * SECTION 2: Compiler Detection and Configuration +dnl * +dnl * Detect C/C++ compilers, determine compiler characteristics (vendor, +dnl * version, supported flags), and set up compilation environment. +dnl *********************************************************************** + AC_PROG_CC AC_PROG_CPP AC_PROG_GREP @@ -1712,6 +1728,14 @@ AC_SUBST([ABI_THREAD]) ABIFLAGS="" ABI_THREAD="" +dnl *********************************************************************** +dnl * SECTION 3: Python Build Feature Flags +dnl * +dnl * Handle configure options that control Python interpreter features: +dnl * --disable-gil (free-threading), --with-pydebug, --enable-optimizations, +dnl * --enable-experimental-jit, --enable-pystats, and other build variants. +dnl *********************************************************************** + # Check for --disable-gil # --disable-gil AC_MSG_CHECKING([for --disable-gil]) @@ -4027,6 +4051,14 @@ esac AC_MSG_RESULT(["$TZPATH"])]) AC_SUBST([TZPATH]) +dnl *********************************************************************** +dnl * SECTION 5: External Library Dependencies +dnl * +dnl * Detect external libraries needed by extension modules and the core +dnl * interpreter. This includes system libraries (sockets, threads) and +dnl * optional third-party libraries (OpenSSL, zlib, libffi, SQLite, etc.). +dnl *********************************************************************** + # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. AC_CHECK_LIB([nsl], [t_open], [LIBS="-lnsl $LIBS"]) # SVR4 AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets @@ -7813,6 +7845,18 @@ AS_CASE([$ac_sys_system], dnl AC_MSG_NOTICE([m4_set_list([_PY_STDLIB_MOD_SET_NA])]) +dnl *********************************************************************** +dnl * SECTION 4: Standard Library Extension Module Configuration +dnl * +dnl * This section defines macros for detecting and configuring extension +dnl * modules, then uses them to check dependencies and availability for +dnl * all stdlib extension modules. Modules can be: yes (available), +dnl * missing (enabled but dependencies not met), disabled (explicitly +dnl * disabled), or n/a (not supported on this platform). +dnl * +dnl * Last updated: 2025-11 +dnl *********************************************************************** + dnl Default value for Modules/Setup.stdlib build type AS_CASE([$host_cpu], [wasm32|wasm64], [MODULE_BUILDTYPE=static],