diff -Naur Python-3.8.0-orig/configure.ac Python-3.8.0/configure.ac --- Python-3.8.0-orig/configure.ac 2019-10-22 10:00:49.172323000 +0300 +++ Python-3.8.0/configure.ac 2019-10-22 10:00:50.295525000 +0300 @@ -5450,8 +5450,21 @@ 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 Modules/_io Programs" +case $host in + *-*-mingw*) SRCDIRS="$SRCDIRS PC";; +esac AC_MSG_CHECKING(for build directories) for dir in $SRCDIRS; do if test ! -d $dir; then