[GRASS-dev] hacking configure for gettext

Glynn Clements glynn at gclements.plus.com
Wed Jun 8 12:41:02 PDT 2016


Michael Barton wrote:

> I would like GRASS to use gettext that is installed in a location
> NOT in the standard /usr/local... I have no problem building gettext
> in such a location but I am having problems telling GRASS where to
> find it.
> 
> The configure switch to enable gettext is --with-nls. I've tried
> adding additional arguments
> 
> --with-nls-includes="/Users/cmbarton/grass_source/gettext/gettext_dist/include"
> --with-nls-libs="/Users/cmbarton/grass_source/gettext/gettext_dist/lib"
> 
> to tell GRASS where to find gettext but these do not seem to do the
> trick.
> 
> Can someone familiar with the build system suggest how to specify
> where to find gettext or now to modify configure so that GRASS can
> find gettext in this other location?

Currently, gettext is treated as a system function, i.e. there's no
way to configure search paths beyond the generic --with-includes= and
--with-libs= switches. It's checked initially without additional
libraries (AC_CHECK_FUNC), and if that fails with -lintl
(AC_CHECK_LIB).

To treat it as an external library function, try the attached patch.

Note that you'll need to add $(INTLINC) to ... something. probably
Either INC (in Grass.make) or NLS_CFLAGS (in Compile.make). Adding it
to individual Makefiles isn't feasible because <libintl.h> is included
from <grass/glocale.h>, which is included by practically everything.

-- 
Glynn Clements <glynn at gclements.plus.com>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gettext.diff
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20160608/e6e50e77/attachment.ksh>


More information about the grass-dev mailing list