--- Python-3.5.3/configure.ac.orig 2017-02-27 09:04:20.646945800 +0300 +++ Python-3.5.3/configure.ac 2017-02-27 09:07:28.602696300 +0300 @@ -5581,6 +5581,15 @@ done AC_MSG_RESULT(done) +# For mingw build need additional library for linking +case $host in + *-*-mingw*) + LIBS="$LIBS -lversion" + ;; + *) + ;; +esac + # Availability of -O2: AC_MSG_CHECKING(for -O2) saved_cflags="$CFLAGS"