Re: Trouble compiling CVS with g++=3.2.2

From Gordon Paynter
DateMon, 20 Jan 2003 20:19:58 +1300 (NZDT)
Subject Re: Trouble compiling CVS with g++=3.2.2
In-Reply-To (3E2B869A-5BEE2FC9-cs-waikato-ac-nz)
>> > 337 #if ENABLE_NLS
>> > 338 #include <libintl.h>
>> > 339 #define _(Text) gettext (Text)
>> > 340 #else
>> > 341 #define textdomain(Domain)
>> > 342 #define _(Text) Text
>> > 342 #endif

> the lib/sysfunc.h stuff was an attempt by whoever wrote mg (or maybe
> mgpp) to be portable across the different unixes. So maybe the "proper"
> solution would be for configure to see if gettext is installed and
> define ENABLE_NLS in config.h if it is. We can't rely on it as it is not
> a POSIX standard.

You're probably right.

Background:
>From what I can make out, you should set ENABLE_NLS if and only if you
have th GNU internationalised version of gettext on your system; otherwise
you should disbale it. For some reason, it is showing up as diabled in my
system, causing clashes when mgpp tries to redefine textdomain. I note
that wget also messes around with gettext and this option in some way.

If I manually add "#define ENABLE_NLS 1" to config.h then the files
compile correctly.

To go one better, if I add
AC_DEFINE(ENABLE_NLS)
to configure.in and
#undef ENABLE_NLS
to acconfig.h then I can run ./configure and compile as usual.

However, I'm not going to commit this though because I don't really
understand what I'm doing, or how to properly test for gettext before
setting ENABLE_NLS. (My policy here is to delegate everything to do with
automake and autoconf as quickly as I possibly can.)


Gordon