From c4e9e4799c1809e52de493f6797ba4a54c1f3d30 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Mon, 12 Jul 2021 11:29:09 -0700 Subject: [PATCH] src/m4/python.m4: Set conftest extension correctly. This fixes a platform-specific issue on x86_64-w64-mingw32 (and likely any other platform with an executable extension) where pyconfigure's checks would fail because this ac_link command would attempt to chmod the non-existent file "conftest". The file will not exist because ac_exeext is ".exe" on that platform, which means the test program actually gets written to a file named "conftest.exe", not "conftest". * m4/python.m4 (AC_LANG_DEFINE): In the chmod command, write conftest$ac_exeext instead of conftest. --- src/m4/python.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m4/python.m4 b/src/m4/python.m4 index 98a68b8..c4c95a3 100644 --- a/src/m4/python.m4 +++ b/src/m4/python.m4 @@ -54,7 +54,7 @@ AC_LANG_DEFINE([Python], [py], [PY], [PYTHON], [], [ac_ext=py ac_compile='chmod +x conftest.$ac_ext >&AS_MESSAGE_LOG_FD' -ac_link='chmod +x conftest.$ac_ext && cp conftest.$ac_ext conftest >&AS_MESSAGE_LOG_FD' +ac_link='chmod +x conftest.$ac_ext && cp conftest.$ac_ext conftest$ac_exeext >&AS_MESSAGE_LOG_FD' ]) -- 2.30.2