Re: Should gtk call bind_textdomain_codeset() also for glib20?



Tor Lillqvist <tml iki fi> writes:

> Owen Taylor writes:
>  >   A workaround for this is to install GNU gettext and use that libintl.
> 
> (That is obviously what I do on Win32.) Only yesterday I noticed that
> gtk+'s configure doesn't find bind_textdomain_codeset unless I
> explicitly specify LIBS=-lintl when running configure. (Even though
> pkg-config --libs glib-2.0 for me does include -lintl.) Should the
> check for bind_textdomain_codeset be taken out from the
> AC_CHECK_FUNCS, and instead put in a separate AC_CHECK_LIB that
> includes $GDK_LIBS?  (Don't have time right now to check.)

I'm putting a fix for this in now, hopefully not breaking anything:

Regads,
                                        Owen

Index: configure.in
===================================================================
RCS file: /cvs/gnome/gtk+/configure.in,v
retrieving revision 1.263
diff -u -p -r1.263 configure.in
--- configure.in	6 Mar 2002 01:56:25 -0000	1.263
+++ configure.in	8 Mar 2002 17:23:15 -0000
@@ -316,7 +316,7 @@ if test "x$enable_rebuilds" = "xyes" && 
 fi
 AC_SUBST(REBUILD)
 
-AC_CHECK_FUNCS(lstat mkstemp bind_textdomain_codeset)
+AC_CHECK_FUNCS(lstat mkstemp)
 
 # sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
 AC_MSG_CHECKING(for sigsetjmp)
@@ -413,6 +413,14 @@ AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION,
 *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of 
 *** GLIB is always available from ftp://ftp.gtk.org/.]),
   gobject gmodule gthread)
+
+dnl
+dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
+dnl
+gtk_save_LIBS=$LIBS
+LIBS="$LIBS $GLIB_LIBS"
+AC_CHECK_FUNCS(bind_textdomain_codeset)
+LIBS=$gtk_save_LIBS
 
 AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
 AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]