[GRASS-user] GRASS 6.4.1RC1 wxPython problems on Solaris

Glynn Clements glynn at gclements.plus.com
Sat Mar 12 14:59:05 EST 2011


Ulli Wölfel wrote:

> >> Btw. in order to get it to compile, I had to edit include/Make/
> >> Platform.make and set INTLLIB = -lintl
> >> Maybe this should be fixed in the configure script.
> >
> > The configure script sets INTLLIB according to the location of the
> > gettext() function. If gettext() is available in the standard C lib,
> > INTLLIB will be empty, otherwise -lintl is tried.
> >
> > What error were you getting before you changed INTLLIB? If GRASS needs
> > libintl for a function other than gettext(), we need to know which
> > one.
> 
> It was a linking error. The undefined symbols were:
> libintl_bindtextdomain
> libintl_dgettext

Ugh. My guess is that both libc and libintl have the relevant
functions, but libintl.h provides macros which redirect to the
libintl_* versions. So configure detects that libintl isn't needed,
but the inclusion of <libintl.h> by glocale.h changes that.

Can you test the attached patch (after patching configure.in, the
configure script needs to be re-built with autoconf 2.13)?

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


-------------- next part --------------
Index: configure.in
===================================================================
--- configure.in	(revision 45645)
+++ configure.in	(working copy)
@@ -1621,10 +1621,10 @@
 if test -n "${USE_NLS}" ; then
     AC_DEFINE(USE_NLS)
 
-AC_CHECK_FUNC(gettext, INTLLIB=, [
-AC_CHECK_LIB(intl, gettext, INTLLIB=-lintl, [
-    AC_MSG_ERROR([*** Unable to locate gettext() function.])
-])])
+AC_TRY_LINK([#include <libintl.h>],[dgettext("", "");],[AC_MSG_RESULT(found)],[
+LOC_CHECK_LINK(intl,[#include <libintl.h>],[dgettext("", "");],dgettext,-lintl,INTLLIB,,,[
+    AC_MSG_ERROR([*** Unable to locate dgettext() function.])
+])
 
     HAVE_NLS=1
 fi


More information about the grass-user mailing list