Build: Add section headers to organize configure.ac

The configure.ac file has grown to 8,200+ lines, making it difficult
to navigate and understand its organization. This adds 5 major section
headers to divide the file into logical groups:

Section 1 (line 137): Platform and Build Configuration Detection
  - Platform triplet detection, cross-compilation setup

Section 2 (line 1070): Compiler Detection and Configuration
  - C/C++ compiler detection and characteristics

Section 3 (line 1731): Python Build Feature Flags
  - --disable-gil, --with-pydebug, --enable-optimizations, etc.

Section 4 (line 7840): Standard Library Extension Module Configuration
  - PY_STDLIB_MOD macro and module dependency detection

Section 5 (line 4054): External Library Dependencies
  - System and third-party library detection

These are comment-only changes that do not affect the generated
configure script. They make the file more maintainable and help
developers quickly locate relevant sections.
This commit is contained in:
Greg Shuflin
2025-11-15 00:36:10 -08:00
parent ae606bb600
commit 157934eb4b

View File

@@ -134,6 +134,14 @@ fi
AC_CONFIG_SRCDIR([Include/object.h]) AC_CONFIG_SRCDIR([Include/object.h])
AC_CONFIG_HEADERS([pyconfig.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_CANONICAL_HOST
AC_SUBST([build]) AC_SUBST([build])
AC_SUBST([host]) AC_SUBST([host])
@@ -1058,6 +1066,14 @@ then
fi fi
fi 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_CC
AC_PROG_CPP AC_PROG_CPP
AC_PROG_GREP AC_PROG_GREP
@@ -1712,6 +1728,14 @@ AC_SUBST([ABI_THREAD])
ABIFLAGS="" ABIFLAGS=""
ABI_THREAD="" 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 # Check for --disable-gil
# --disable-gil # --disable-gil
AC_MSG_CHECKING([for --disable-gil]) AC_MSG_CHECKING([for --disable-gil])
@@ -4027,6 +4051,14 @@ esac
AC_MSG_RESULT(["$TZPATH"])]) AC_MSG_RESULT(["$TZPATH"])])
AC_SUBST([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. # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
AC_CHECK_LIB([nsl], [t_open], [LIBS="-lnsl $LIBS"]) # SVR4 AC_CHECK_LIB([nsl], [t_open], [LIBS="-lnsl $LIBS"]) # SVR4
AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets 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 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 dnl Default value for Modules/Setup.stdlib build type
AS_CASE([$host_cpu], AS_CASE([$host_cpu],
[wasm32|wasm64], [MODULE_BUILDTYPE=static], [wasm32|wasm64], [MODULE_BUILDTYPE=static],