Re: Building with libiconv



On 2001.08.10 06:51 Pawel Salek wrote:
> This one is in. 
> 
> Concerning BSD issues, I am 100% to support it but I am not sure how to
> check for it, would something like this work on BSD:
> 
> 
> AC_CHECK_LIB(iconv, iconv_open, , [
> 	AC_CHECK_LIB(giconv, iconv_open, , [
> 		AC_CHECK_FUNC(iconv_open, , [
>                 	AC_MSG_ERROR([*** You need iconv for balsa.])
> 		])
> 	])
> ])
> 
> (this works on linux, without iconv). Test for linux, *with* iconv would
> be appreciated as well.
> 
> /Pawel
> 

Well, currently my hack to configure.in replaces iconv with giconv and
iconv_open with libiconv_open so that you have:

AC_CHECK_LIB(giconv, libiconv_open, , [
	AC_CHECK_FUNC(libiconv_open, , [
		AC_MSG_ERROR([*** You need giconv for libmutt.])
		])
	])

Note that I have to pass gcc the paths to the header and the library
explicitly by setting (in the environment)
CPPFLAGS="-I${LOCALBASE}/include" and LIBS=-L${LOCALBASE}/lib -lgiconv"
where LOCALBASE is set by my build environment (by default) to/usr/local. 
If this isn't done, the test will fail.

jmc
==============
> On 2001-08-09 16: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
> > 
> -- 
> Pawel Salek (pawsa@theochem.kth.se) http://www.theochem.kth.se/~pawsa/
> Theoretical Chemistry Division, KTH voice: +46 8 790-8202
> 
> _______________________________________________
> balsa-list mailing list
> balsa-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/balsa-list
> 




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