Strange tests for iconv support ...

Richard Sharpe rsharpe at richardsharpe.com
Sun Jun 15 01:39:14 GMT 2003


Hi,

In configure.in, we test for the presence of iconv support in several ways 
(based on some stuff in aclocal.m4) and then go on to check for a working 
iconv.

Now the check for iconv might turn up that the iconv include file is 
giconv.h and the library might be differently named. However, in the test 
to see if we have a working iconv:

># check for iconv in libc
>AC_CACHE_CHECK([for working iconv],samba_cv_HAVE_NATIVE_ICONV,[
>AC_TRY_RUN([
>#include <iconv.h>
>main() {
>       iconv_t cd = iconv_open("ASCII", "UCS-2LE");
>       if (cd == 0 || cd == (iconv_t)-1) return -1;
>       return 0;
>}
>],

we take no account of the fact that the include file might be differently
named nor do we handle the possibility of a differently named library.

Does anyone have any comments here?

I suspect that gm_ICONV in aclocal.m4 should return the name of the 
include file and the name of the library in variables like 
gm_iconv_include_name and gm_iconv_lib_name?

Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, 
sharpe[at]ethereal.com, http://www.richardsharpe.com




More information about the samba-technical mailing list