diff --git a/config/python.m4 b/config/python.m4
index c8f784ed47dc360bac02c16a34b751f8e5126bed..de346fb53aa428cb1bf184428938db614295c6f8 100644
--- a/config/python.m4
+++ b/config/python.m4
@@ -44,6 +44,9 @@ if a == b:
     print(a)
 else:
     print(a + ' ' + b)"`
+if test "$PORTNAME" = win32 ; then
+    python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
+fi
 AC_MSG_RESULT([$python_includespec])
 
 AC_SUBST(python_majorversion)[]dnl
diff --git a/configure b/configure
index 6691d7382c4502e2ec90190f5605d24e6d01ad2b..191e8f0326370ad99603bc64bf3122de10f13e72 100755
--- a/configure
+++ b/configure
@@ -7487,6 +7487,9 @@ if a == b:
     print(a)
 else:
     print(a + ' ' + b)"`
+if test "$PORTNAME" = win32 ; then
+    python_includespec=`echo $python_includespec | sed 's,\,/,g'`
+fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
 $as_echo "$python_includespec" >&6; }
 
diff --git a/src/pl/plpython/Makefile b/src/pl/plpython/Makefile
index 4c9d1461473e4241f5bed03685ba42eee73e2781..39cfb654fb2108441883aadfcdcc18a232ff639e 100644
--- a/src/pl/plpython/Makefile
+++ b/src/pl/plpython/Makefile
@@ -5,14 +5,12 @@ top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
 
-# Windows needs to convert backslashed paths to normal slashes,
-# and we have to remove -lpython from the link since we are building our own
+# On Windows we have to remove -lpython from the link since we are
+# building our own
 ifeq ($(PORTNAME), win32)
-python_includespec := $(subst \,/,$(python_includespec))
 override python_libspec =
 endif
 
-
 override CPPFLAGS := -I. -I$(srcdir) $(python_includespec) $(CPPFLAGS)
 
 rpathdir = $(python_libdir)