AM_PATH_PYTHON fails to detect python3.11 which is annoying since it is now the default version. Upstream master branch has https://git.savannah.gnu.org/cgit/automake.git/commit/?id=930a9a73f4bb776ec334eff4cf6e182802841daa (and later https://git.savannah.gnu.org/cgit/automake.git/commit/?id=3cd8f54560c1ee2470ff059801d2612898541555) to fix this, but it looks like its m4/python.m4 is quite different from the 1.16.5 version so it may not be straightforward to backport theses commits. Applying the fix from https://git.savannah.gnu.org/cgit/automake.git/commit/?id=6b4304c12161887171a5ce596157f8e5f25737e4 seems sensible as well.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=87fec07b643dbb06f29781ee0948c060566ba6bc commit 87fec07b643dbb06f29781ee0948c060566ba6bc Author: Tijl Coosemans <tijl@FreeBSD.org> AuthorDate: 2024-06-13 17:44:03 +0000 Commit: Tijl Coosemans <tijl@FreeBSD.org> CommitDate: 2024-06-14 13:08:44 +0000 devel/automake: Support python 3.10+ Add a patch that combines the following upstream commits: https://git.savannah.gnu.org/cgit/automake.git/commit/?id=930a9a73f4bb7 https://git.savannah.gnu.org/cgit/automake.git/commit/?id=3cd8f54560c1e https://git.savannah.gnu.org/cgit/automake.git/commit/?id=6b4304c121618 PR: 279687 devel/automake/Makefile | 2 +- devel/automake/files/patch-m4_python.m4 (new) | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-)