Files
MINGW-packages/mingw-w64-python3/0300-MINGW-configure-for-shared-build.patch
2014-10-11 14:46:25 +01:00

52 lines
1.3 KiB
Diff

diff -urN a/configure.ac b/configure.ac
--- a/configure.ac 2014-10-11 14:19:46.432957900 +0100
+++ b/configure.ac 2014-10-11 14:19:49.273120300 +0100
@@ -1045,6 +1045,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
@@ -1053,6 +1060,10 @@
LDLIBRARY='libpython$(LDVERSION).dll.a'
;;
esac
+ case $host in
+ *-*-mingw*)
+ LDLIBRARY='libpython$(LDVERSION).a';;
+ esac
fi
if test "$cross_compiling" = yes; then
@@ -2213,6 +2224,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}
@@ -4888,7 +4905,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