diff -Naur Python-3.6.5-orig/configure.ac Python-3.6.5/configure.ac --- Python-3.6.5-orig/configure.ac 2018-04-16 09:53:08.790604200 +0300 +++ Python-3.6.5/configure.ac 2018-04-16 09:53:09.021005200 +0300 @@ -5447,6 +5447,16 @@ THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" done +case $host in + *-*-mingw*) + dnl Required for windows builds as Objects/exceptions.c require + 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" + ;; +esac + AC_SUBST(SRCDIRS) SRCDIRS="Parser Objects Python Modules Programs" AC_MSG_CHECKING(for build directories)