Files
MINGW-packages/mingw-w64-python3/0300-MINGW-configure-for-shared-build.patch
2015-09-21 15:47:39 +03:00

52 lines
1.4 KiB
Diff

diff -Naur Python-3.5.0-orig/configure.ac Python-3.5.0/configure.ac
--- Python-3.5.0-orig/configure.ac 2015-09-21 13:41:19.666882700 +0300
+++ Python-3.5.0/configure.ac 2015-09-21 13:41:27.465102800 +0300
@@ -1174,6 +1174,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
@@ -1182,6 +1189,10 @@
LDLIBRARY='libpython$(LDVERSION).dll.a'
;;
esac
+ case $host in
+ *-*-mingw*)
+ LDLIBRARY='libpython$(LDVERSION).a';;
+ esac
fi
if test "$cross_compiling" = yes; then
@@ -2401,6 +2412,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}
@@ -5118,7 +5135,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