On 19/08/2010 03:07, Chris Frey wrote:
> On Wed, Aug 18, 2010 at 06:26:34PM -0700, Eric Arseneau wrote:
>> Here is output from grep, I assume this is what you wanted
>>
>> [tools] grep intl *
>> Makefile:       $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
>> Makefile:GLIB2_LIBS = -L/opt/local/lib -lglib-2.0 -lintl -liconv
>> Makefile.in:    $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
>> Binary file bidentify.o matches
>> Binary file btool-btool.o matches
>> i18n.h:#include<libintl.h>
>> [tools] grep INTL *
>> Makefile:INTLLIBS =
>> Makefile:INTL_MACOSX_LIBS = -Wl,-framework -Wl,CoreFoundation
>> Makefile:LIBINTL =
>> Makefile:LTLIBINTL =
> Looks like the default gettext.m4 files are doing a poor job of figuring
> out what the build dependencies are.
>
> I assume you're using gettext 0.17?  Could you send me a copy of your
> m4/gettext.m4 file?  (Should appear after a buildgen.sh)
>
> Thanks,
> - Chris
>
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.

I don't think there's much we can do about #1, I wouldn't like to try 
write a custom configure script which attempts to use /opt/local if on a 
Mac. Possibly just adding a couple of lines to the compiling from source 
documentation to say that you might need to explicitly point configure 
at libintl on some MacPorts configurations.

However we should be able to solve #2 by having a wrapper header file 
for i18n.h which checks if ENABLE_NLS is defined and then #includes 
"i18n.h" if it is defined or dummy macros for INIT_I18N, etc. if it 
isn't defined.

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?

Regards,

Toby

------------------------------------------------------------------------------
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