Remove distributed python.m4 to use the system one that's up to date. The python.m4 script in contrib/aclocal/python.m4 uses the distutils module. This module is not present in python > 3.11.