Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] Re: (PR#10535) no check for libcharset!
Home

[Freeciv-Dev] Re: (PR#10535) no check for libcharset!

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#10535) no check for libcharset!
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Oct 2004 20:58:50 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10535 >

Jason Short wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=10535 >
> 
> AM_LIBCHARSET is never called, except for configuration of gui-sdl.
> 
> AM_LANGINFO_CODESET is already called as part of gettext, but since we 
> use it ourselves we shouldn't rely on that.
> 
> This patch fixes it.  It seems libcharset is not included as part of 
> glibc but is a part of GNU libiconv.  So on windows systems this is the 
> only way to find the charset.

Oh, and for it to actually work: we have to add an #include to fciconv.c.

jason

? newtiles
Index: configure.ac
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.ac,v
retrieving revision 1.82
diff -u -r1.82 configure.ac
--- configure.ac        14 Oct 2004 04:25:05 -0000      1.82
+++ configure.ac        15 Oct 2004 03:57:16 -0000
@@ -332,8 +332,12 @@
 fi
 
 dnl Check for libiconv (which is usually included in glibc, but may be
-dnl distributed separately).
+dnl distributed separately).  The libcharset check must come after the
+dnl iconv check.  Langinfo_codeset is already checked in gettext but we
+dnl don't rely on that (since we use it ourselves).
 AM_ICONV
+AM_LIBCHARSET
+AM_LANGINFO_CODESET
 LIBS="$LIBS $LIBICONV"
 
 dnl Check and choose clients
Index: utility/fciconv.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/utility/fciconv.c,v
retrieving revision 1.8
diff -u -r1.8 fciconv.c
--- utility/fciconv.c   7 Oct 2004 14:41:05 -0000       1.8
+++ utility/fciconv.c   15 Oct 2004 03:57:16 -0000
@@ -28,6 +28,10 @@
 #include <langinfo.h>
 #endif
 
+#ifdef HAVE_LIBCHARSET
+#include <libcharset.h>
+#endif
+
 #include "fciconv.h"
 #include "fcintl.h"
 #include "log.h"

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#10535) no check for libcharset!, Jason Short <=