diff --git a/configure.ac b/configure.ac index fb2dcb0d828105..859808fddcc7c5 100644 --- a/configure.ac +++ b/configure.ac @@ -6470,6 +6470,16 @@ do 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="\ Modules \ @@ -6491,6 +6501,10 @@ SRCDIRS="\ Python \ Python/frozen_modules \ Python/deepfreeze" +case $host in + *-*-mingw*) SRCDIRS="$SRCDIRS PC";; +esac + AC_MSG_CHECKING(for build directories) for dir in $SRCDIRS; do if test ! -d $dir; then