60 lines
1.9 KiB
Diff
60 lines
1.9 KiB
Diff
From be8aa607725e3e010cc3f74948b8c21804dda8bf Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
|
|
<alexey.pawlow@gmail.com>
|
|
Date: Thu, 17 Jun 2021 18:51:24 +0530
|
|
Subject: [PATCH 011/N] configure: add options so that shared build is
|
|
possible on MINGW
|
|
|
|
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
|
|
---
|
|
configure.ac | 15 ++++++++++++++-
|
|
1 file changed, 14 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 5b51d92..ba112e9 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -1549,6 +1549,11 @@ if test $enable_shared = "yes"; then
|
|
LDLIBRARY='libpython$(LDVERSION).dll.a'
|
|
DLLLIBRARY='libpython$(LDVERSION).dll'
|
|
;;
|
|
+ MINGW*)
|
|
+ LDLIBRARY='libpython$(LDVERSION).dll.a'
|
|
+ DLLLIBRARY='libpython$(LDVERSION).dll'
|
|
+ BLDLIBRARY='-L. -lpython$(LDVERSION)'
|
|
+ ;;
|
|
SunOS*)
|
|
LDLIBRARY='libpython$(LDVERSION).so'
|
|
BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
|
|
@@ -1599,6 +1604,9 @@ else # shared is disabled
|
|
BLDLIBRARY='$(LIBRARY)'
|
|
LDLIBRARY='libpython$(LDVERSION).dll.a'
|
|
;;
|
|
+ MINGW*)
|
|
+ LDLIBRARY='libpython$(LDVERSION).a'
|
|
+ ;;
|
|
esac
|
|
fi
|
|
|
|
@@ -3521,6 +3529,10 @@ then
|
|
CYGWIN*)
|
|
LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
|
|
LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
|
|
+ MINGW*)
|
|
+ LDSHARED='$(CC) -shared -Wl,--enable-auto-image-base'
|
|
+ LDCXXSHARED='$(CXX) -shared -Wl,--enable-auto-image-base'
|
|
+ ;;
|
|
*) LDSHARED="ld";;
|
|
esac
|
|
fi
|
|
@@ -6912,7 +6924,8 @@ case $host in
|
|
dnl "errmap.h" from $srcdir/PC.
|
|
dnl Note we cannot use BASECPPFLAGS as autogenerated pyconfig.h
|
|
dnl has to be before customized located in ../PC.
|
|
- CPPFLAGS="-I\$(srcdir)/PC $CPPFLAGS"
|
|
+ dnl (-I. at end is workaround for setup.py logic)
|
|
+ CPPFLAGS="-I\$(srcdir)/PC $CPPFLAGS -I."
|
|
;;
|
|
esac
|
|
|