Index: glib/m4macros/glib-gettext.m4
===================================================================
RCS file: /cvs/gnome/glib/m4macros/glib-gettext.m4,v
retrieving revision 1.18.2.3
diff -u -p -r1.18.2.3 glib-gettext.m4
--- glib/m4macros/glib-gettext.m4	30 May 2003 23:14:30 -0000	1.18.2.3
+++ glib/m4macros/glib-gettext.m4	6 Jun 2003 00:13:36 -0000
@@ -192,8 +192,24 @@ glib_DEFUN([GLIB_WITH_NLS],
 			 return _nl_msg_cat_cntr],
 	    [CATOBJEXT=.gmo 
              DATADIRNAME=share],
+	    [case $host in
+	    *-*-solaris*)
+	     dnl On Solaris, if bind_textdomain_codeset is in libc,
+	     dnl GNU format message catalogs is always supported,
+             dnl since both are added to the libc all together.
+	     dnl Hence, we'd like to go with DATADIRNAME=share and
+	     dnl and CATOBJEXT=.gmo in this case.
+             AC_TRY_LINK([#include <libintl.h>], [return (int) bind_textdomain_codeset ("", "")],
+	    [CATOBJEXT=.gmo 
+             DATADIRNAME=share],
 	    [CATOBJEXT=.mo
              DATADIRNAME=lib])
+	    ;;
+	    *)
+	    CATOBJEXT=.mo
+            DATADIRNAME=lib
+	    ;;
+	     esac]
 	  INSTOBJEXT=.mo
 	else
 	  gt_cv_have_gettext=no
