Files
MINGW-packages/mingw-w64-python3/0300-MINGW-configure-for-shared-build.patch
2016-07-12 14:49:26 +03:00

52 lines
1.4 KiB
Diff

diff -Naur Python-3.5.2-orig/configure.ac Python-3.5.2/configure.ac
--- Python-3.5.2-orig/configure.ac 2016-07-12 14:20:55.967800700 +0300
+++ Python-3.5.2/configure.ac 2016-07-12 14:21:07.520800700 +0300
@@ -1192,6 +1192,13 @@
;;
esac
+ case $host in
+ *-*-mingw*)
+ LDLIBRARY='libpython$(LDVERSION).dll.a'
+ DLLLIBRARY='libpython$(LDVERSION).dll'
+ BLDLIBRARY='-L. -lpython$(LDVERSION)'
+ ;;
+ esac
else # shared is disabled
PY_ENABLE_SHARED=0
case $ac_sys_system in
@@ -1200,6 +1207,10 @@
LDLIBRARY='libpython$(LDVERSION).dll.a'
;;
esac
+ case $host in
+ *-*-mingw*)
+ LDLIBRARY='libpython$(LDVERSION).a';;
+ esac
fi
if test "$cross_compiling" = yes; then
@@ -2526,6 +2537,12 @@
LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
*) LDSHARED="ld";;
esac
+ case $host in
+ *-*-mingw*)
+ LDSHARED='$(CC) -shared -Wl,--enable-auto-image-base'
+ LDCXXSHARED='$(CXX) -shared -Wl,--enable-auto-image-base'
+ ;;
+ esac
fi
AC_MSG_RESULT($LDSHARED)
LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
@@ -5248,7 +5265,8 @@
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