Re: Building with libiconv



On 2001.08.09 07:45 Brian Stafford wrote:
> When building with libiconv things are a pain.
> 
> If libiconv is installed in /usr/local the supplied iconv.h overrides the
> one with glibc.  This causes problems building some apps, e.g. GCC 3.0.
> OTOH if libiconv is installed elsewhere balsa fails to build.
> 
> The following patch to configure.in fixes this
> 
> Index: configure.in
> ===================================================================
> RCS file: /cvs/gnome/balsa/configure.in,v
> retrieving revision 1.145
> diff -u -r1.145 configure.in
> --- configure.in        2001/08/08 15:44:53     1.145
> +++ configure.in        2001/08/09 14:46:49
> @@ -492,6 +492,13 @@
>  dnl Link with iconv for charset translation, if not found
>  dnl without library.  Needed for libmutt.
>  dnl #############################################################
> +AC_ARG_WITH(iconv,
> +            [  --with-iconv=DIR           Where libiconv is installed ],
> +           [if test "$with_iconv" != yes -a "$with_iconv" != no ; then
> +                   CPPFLAGS="-I${with_iconv}/include $CPPFLAGS"
> +                   LDFLAGS="-L${with_iconv}/lib $LDFLAGS"
> +            fi])
> +
>  AC_CHECK_LIB(iconv, iconv_open, , [
>         AC_CHECK_FUNC(iconv_open, , [
>                         AC_MSG_ERROR([*** You need iconv for libmutt.])
> 
> 
> Regards
> Brian Stafford
> 

It would be real, real nice (for FreeBSD) if this patch would incorporate
the FreeBSD names as an alternative (or allow alternate names to be
substituted).  To avoid the problem that you speak of, FreeBSD has renamed
the iconv library in question to giconv and iconv_open to libiconv_open
(since FreeBSD has three or four different iconv libraries . . . ).

Then I wouldn't have to hack configure.in and used automake.

jmc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]