apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albert Chin <subversion-...@thewrittenword.com>
Subject Re: [PATCH] link againt iconv on bsd
Date Sun, 21 Jul 2002 05:20:02 GMT
On Sat, Jul 20, 2002 at 12:29:46AM +0200, Branko Cibej wrote:
> Probably should check for the libc iconv first, and have_iconv must 
> always have a value; so tis would become:
> 
> AC_CHECK_FUNCS(iconv, [ have_iconv="1" ], [
>   AC_CHECK_LIB(iconv, iconv, [
>     APR_ADDTO(APRUTIL_EXPORT_LIBS,[-liconv])
>     APR_ADDTO(APRUTIL_LIBS,[-liconv])
>     have_iconv="1"
>   ],
>   [ have_iconv="0" ]
> ])

This won't work with GNU libiconv. Pull down the source for libxml and
look at how they do it then steal it. Don't assume that "iconv" is the
name of a valid function in -liconv. #include <iconv.h> first to
handle redefinitions of iconv.

>From libiconv 1.8 build on Solaris 7:
  $ nm libiconv.so | grep iconv
  ...
  [801]   |    131348|      56|FUNC |GLOB |0    |8      |libiconv
  [811]   |    131420|      20|FUNC |GLOB |0    |8      |libiconv_close
  [803]   |    130096|    1252|FUNC |GLOB |0    |8      |libiconv_open
  [828]   |    131456|     308|FUNC |GLOB |0    |8      |libiconvctl
  [817]   |    131940|     404|FUNC |GLOB |0    |8      |libiconvlist

>From <iconv.h>
  ...
  #ifndef LIBICONV_PLUG
  #define iconv libiconv
  #endif
  ...

-- 
albert chin (china@thewrittenword.com)

Mime
View raw message