83 lines
2.2 KiB
Diff
83 lines
2.2 KiB
Diff
diff -urN a/configure.ac b/configure.ac
|
|
--- a/configure.ac 2014-10-11 14:19:50.412185500 +0100
|
|
+++ b/configure.ac 2014-10-11 14:19:53.083338300 +0100
|
|
@@ -2084,6 +2084,9 @@
|
|
CYGWIN*) SHLIB_SUFFIX=.dll;;
|
|
*) SHLIB_SUFFIX=.so;;
|
|
esac
|
|
+ case $host_os in
|
|
+ mingw*) SHLIB_SUFFIX=.dll;;
|
|
+ esac
|
|
fi
|
|
AC_MSG_RESULT($SHLIB_SUFFIX)
|
|
|
|
@@ -3060,6 +3063,12 @@
|
|
fi
|
|
;;
|
|
esac
|
|
+ case $host in
|
|
+ *-*-mingw*)
|
|
+ DYNLOADFILE="dynload_win.o"
|
|
+ extra_machdep_objs="$extra_machdep_objs PC/dl_nt.o"
|
|
+ ;;
|
|
+ esac
|
|
fi
|
|
AC_MSG_RESULT($DYNLOADFILE)
|
|
if test "$DYNLOADFILE" != "dynload_stub.o"
|
|
@@ -4293,6 +4302,12 @@
|
|
*)
|
|
EXT_SUFFIX=${SHLIB_SUFFIX};;
|
|
esac
|
|
+case $host_os in
|
|
+ mingw*)
|
|
+ dnl Synchronized with _PyImport_DynLoadFiletab (dynload_win.c)
|
|
+ dnl Do not use more then one dot on this platform !
|
|
+ EXT_SUFFIX=-$SOABI$SHLIB_SUFFIX;;
|
|
+esac
|
|
|
|
AC_MSG_CHECKING(LDVERSION)
|
|
LDVERSION='$(VERSION)$(ABIFLAGS)'
|
|
diff -urN a/Makefile.pre.in b/Makefile.pre.in
|
|
--- a/Makefile.pre.in 2014-10-11 14:19:50.412185500 +0100
|
|
+++ b/Makefile.pre.in 2014-10-11 14:19:53.085338400 +0100
|
|
@@ -746,6 +746,12 @@
|
|
-DSHLIB_EXT='"$(EXT_SUFFIX)"' \
|
|
-o $@ $(srcdir)/Python/dynload_hpux.c
|
|
|
|
+Python/dynload_win.o: $(srcdir)/Python/dynload_win.c Makefile
|
|
+ $(CC) -c $(PY_CORE_CFLAGS) \
|
|
+ -DSHLIB_SUFFIX='"$(SHLIB_SUFFIX)"' \
|
|
+ -DEXT_SUFFIX='"$(EXT_SUFFIX)"' \
|
|
+ -o $@ $(srcdir)/Python/dynload_win.c
|
|
+
|
|
Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile
|
|
$(CC) -c $(PY_CORE_CFLAGS) \
|
|
-DABIFLAGS='"$(ABIFLAGS)"' \
|
|
diff -urN a/Python/dynload_win.c b/Python/dynload_win.c
|
|
--- a/Python/dynload_win.c 2014-10-11 14:19:50.418185800 +0100
|
|
+++ b/Python/dynload_win.c 2014-10-11 14:19:53.087338500 +0100
|
|
@@ -18,6 +18,12 @@
|
|
#endif
|
|
|
|
const char *_PyImport_DynLoadFiletab[] = {
|
|
+#ifdef EXT_SUFFIX
|
|
+ EXT_SUFFIX, /* include SOABI flags where is encoded debug */
|
|
+#endif
|
|
+#ifdef SHLIB_SUFFIX
|
|
+ "-abi" PYTHON_ABI_STRING SHLIB_SUFFIX,
|
|
+#endif
|
|
#ifdef _DEBUG
|
|
"_d.pyd",
|
|
#else
|
|
@@ -27,6 +33,10 @@
|
|
};
|
|
|
|
|
|
+#if defined(__MINGW32__)
|
|
+/* avoid compile error: conflicting types for 'strcasecmp' */
|
|
+# define strcasecmp fake_strcasecmp
|
|
+#endif
|
|
/* Case insensitive string compare, to avoid any dependencies on particular
|
|
C RTL implementations */
|
|
|