Message88905
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. |
|
Date |
User |
Action |
Args |
2009-06-04 21:40:20 | rpetrov | set | recipients:
+ rpetrov, brett.cannon, ronaldoussoren, mark.dickinson, benjamin.peterson, erickt, tarek, brodie, ebehar |
2009-06-04 21:40:19 | rpetrov | set | messageid: <1244151619.6.0.330015235615.issue6154@psf.upfronthosting.co.za> |
2009-06-04 21:40:18 | rpetrov | link | issue6154 messages |
2009-06-04 21:40:16 | rpetrov | create | |
|