GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
modula2

Modula-2: Detect Python version for libgm2 build

libgm2 build now correctly checks for Python 3+, using a new m4 macro for version detection.

The Modula-2 library build process (libgm2) has been updated to accurately detect the Python version. It now uses a new ax_python_interpreter.m4 macro to ensure Python 3.0 or later is present, which is required for the mktargetsrc.py script. If an older Python version is found, certain library functionalities are reduced.

In Details

This commit addresses issues (PRs 126847, 126863) stemming from a prior change (PR 125129) affecting Python version detection in the libgm2 build. A new ax_python_interpreter.m4 macro is introduced to check for AC_PYTHON_INTERPRETER, ensuring Python >= 3.0 is available for mktargetsrc.py. The old AC_PYTHON_DEVEL macro is removed, and several build files are regenerated.

For Context
libgm2
The Modula-2 compiler's runtime libraries and support code.
m4
A macro processor often used in build systems (like autoconf) to generate configuration scripts. ax_python_interpreter.m4 is a custom macro for detecting Python.
AC_PYTHON_INTERPRETER
An autoconf macro used to check for the presence and version of a Python interpreter.
mktargetsrc.py
A Python script used within the GCC build system to generate target-specific source files.
Filed Under: buildmodula2python