Skip to content

Commit

Permalink
dont link with gettext
Browse files Browse the repository at this point in the history
Co-authored-by: Алексей <[email protected]>
  • Loading branch information
Alexpux authored and lazka committed Aug 25, 2023
1 parent f4588e9 commit 3899109
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Modules/_localemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ This software comes with no warranty. Use at your own risk.
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pycore_fileutils.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 <stdio.h>
#include <locale.h>
Expand Down
9 changes: 9 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3651,10 +3651,19 @@ AC_SEARCH_LIBS(sem_init, pthread rt posix4)
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
Expand Down

0 comments on commit 3899109

Please sign in to comment.