On Mon, Oct 04, 2010 at 02:23:52PM +0100, Toby Gray wrote:
> I can see this on the Mac machine that I've been testing with. I think 
> there are two problems here:
> 1) The gettext.m4 file isn't doing a great job of finding libintl. 
> Looking at config.log I can see that it's failing to find libintl when 
> it tries compiling the small samples that it does. If I give configure 
> the '--with-libintl-prefix=/opt/local/' option then it works fine. 
> However not being able to find libintl shouldn't be fatal as it causes 
> ENABLE_NLS to not be defined.
> 2) However the tools and GUI code in Barry #include libintl 
> unconditionally, so will always try to use libintl, even if NLS isn't 
> enabled/available.

Thanks for finding this.  I think #2 is a real bug.


> For solving #2 there is also the option of using the dummy header file 
> which is supplied by gettext in /opt/local/share/gettext/gettext.h or 
> /usr/share/gettext/gettext.h which defines empty implementations of the 
> various functions. The only reason I don't suggest this is I can't think 
> of an easy way to find out where to copy this gettext.h from to add to 
> buildgen.sh (apart from working out the prefix path for autopoint and 
> then working from there).
> 
> Does either writing our own wrapper header file or changing buildgen.sh 
> to pull gettext.h in sound like a sensible idea?


The gettext manual at:
http://www.gnu.org/software/gettext/manual/gettext.html#lib_002fgettext_002eh
says:

        Do not install the gettext.h file in public locations.
        Every package that needs it should contain a copy of it on its own.

So I think each directory that contains an i18n.h header, should also
contain a copy of gettext.h, and i18n.h should include "gettext.h" instead
of <libintl.h>, as the docs say.

I've added this to the repo, copying the gettext.h from Debian Lenny's
gettext 0.17-4 package on my system.  The reason I add two instances of
this file is because of the recent binary packaging issues Martin Owens
and I ran into... it seems better in some cases to keep the sub modules
separate enough to break into separate tarballs if needed.

Could you give it a test compile for me?

Thanks!
- Chris


------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security 
easier or more difficult to achieve? Read this whitepaper to separate the 
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
Barry-devel mailing list
Barry-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/barry-devel

Reply via email to