diff -Naur Python-2.7.6/configure.ac Python-2.7.6/configure.ac --- Python-2.7.6/configure.ac 2014-02-13 15:45:51.168000000 +0400 +++ Python-2.7.6/configure.ac 2014-02-13 15:38:15.419400000 +0400 @@ -2446,10 +2461,19 @@ fi # check if we need libintl for locale functions +case $host in + *-*-mingw*) + dnl Native windows build don't use libintl (see _localemodule.c). + dnl Also we don't like setup.py to add "intl" library to the list + dnl when build _locale module. + ;; + *) AC_CHECK_LIB(intl, textdomain, [AC_DEFINE(WITH_LIBINTL, 1, [Define to 1 if libintl is needed for locale functions.]) LIBS="-lintl $LIBS"]) + ;; +esac # checks for system dependent C++ extensions support case "$ac_sys_system" in diff -Naur Python-2.7.6/Modules/_localemodule.c Python-2.7.6/Modules/_localemodule.c --- Python-2.7.6/Modules/_localemodule.c 2014-02-13 15:45:43.882800000 +0400 +++ Python-2.7.6/Modules/_localemodule.c 2013-11-10 11:36:41.000000000 +0400 @@ -10,6 +10,13 @@ ******************************************************************/ #include "Python.h" +#ifdef __MINGW32__ +/* The header libintl.h and library libintl may exist on mingw host. + * To be compatible with MSVC build we has to undef some defines. + */ +#undef HAVE_LIBINTL_H +#undef HAVE_BIND_TEXTDOMAIN_CODESET +#endif #include #include