Message88905
| Author |
rpetrov |
| Recipients |
benjamin.peterson, brett.cannon, brodie, ebehar, erickt, mark.dickinson, ronaldoussoren, rpetrov, tarek |
| Date |
2009年06月04日.21:40:16 |
| SpamBayes Score |
8.749408e-08 |
| Marked as misclassified |
No |
| Message-id |
<1244151619.6.0.330015235615.issue6154@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The current check for *gettext/*textdomain* functions is not so correct.
It mix(!?!) checks for headers with check for functions.
GNU libc include them and on linux we will see in pyconfig.h (trunk):
-----------
/* #undef WITH_LIBINTL */
#define HAVE_LIBINTL_H 1
#define HAVE_BIND_TEXTDOMAIN_CODESET 1
-----------
If system "C" library don't include them then configure check(search) in
additional libraries (-lintl) but in this case
"bind_textdomain_codeset" is not detected.
As the current check is "AC_CHECK_LIB(intl, textdomain, [ACTION], ..."
the library is not added to LIBS (see autoconf texinfo pages as reference).
Another file is setup.py . Trunk version add library "intl" if
WITH_LIBINTL is defined and on darwin adds '-framework',
'CoreFoundation' to link flags.
It seems to me that patch is not so simple.
May i propose following changes:
- remove current check for function "bind_textdomain_codeset";
- remove current check for header "libintl.h"
- replace "AC_CHECK_LIB(intl, textdomain, ..." with
AC_SEARCH_LIBS(bindtextdomain, intl,
#ACTION-IF-FOUND
check for header "libintl.h"
check for function "bind_textdomain_codeset"
- adjust use of defines in locale module
- adjust setup.py if necessary (I don't know p3k branch)
In a more advanced check I won't add library "intl" to $LIBS.
The check will be similar to the check for readline + restore of LIBS
after check and I will move line for locale module from Setup.dist into
Setup.config.in as example:
_locale _localemodule.c @LOCALE_LIBS@ #
where LOCALE_LIBS is substituted by configure script. |
|