summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorE. M. Bray <erik.bray@lri.fr>2019-05-24 15:33:47 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-05-24 15:33:47 (GMT)
commitc994c8fc196a167c57c8850e8abdee170d366eec (patch)
tree91b6151165264da2965ef85baaa0cbb420ed67f5 /configure.ac
parent438a12dd9d85f463c0bb7bf1505cd87b98b98170 (diff)
downloadcpython-c994c8fc196a167c57c8850e8abdee170d366eec.zip
cpython-c994c8fc196a167c57c8850e8abdee170d366eec.tar.gz
cpython-c994c8fc196a167c57c8850e8abdee170d366eec.tar.bz2
bpo-21536: On Cygwin, C extensions must be linked with libpython (GH-13549)
It is also possible to link against a library or executable with a statically linked libpython, but not both with the same DLL. In fact building a statically linked python is currently broken on Cygwin for other (related) reasons. The same problem applies to other POSIX-like layers over Windows (MinGW, MSYS) but Python's build system does not seem to attempt to support those platforms at the moment.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 0baf0d6..99d99ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4620,9 +4620,9 @@ AC_MSG_CHECKING(LDVERSION)
LDVERSION='$(VERSION)$(ABIFLAGS)'
AC_MSG_RESULT($LDVERSION)
-# On Android the shared libraries must be linked with libpython.
+# On Android and Cygwin the shared libraries must be linked with libpython.
AC_SUBST(LIBPYTHON)
-if test -z "$ANDROID_API_LEVEL"; then
+if test -z "$ANDROID_API_LEVEL" -o "$MACHDEP" != "cygwin"; then
LIBPYTHON=''
else
LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"