bug-gnu-utils
[Top][All Lists]
Advanced

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

gettext and expat


From: Jens Petersen
Subject: gettext and expat
Date: Mon, 22 Oct 2007 13:34:45 +1000
User-agent: Thunderbird 2.0.0.6 (X11/20070926)

Hi, finally got round to reporting this here:

Any thoughts on this issue from Red Hat bugzilla:

 https://bugzilla.redhat.com/show_bug.cgi?id=285701

it seems current gettext has problems with expat-2.0.x which moved to libexpat.so.1 from libexpat.so.0.

I attach a patch by Nils which is included in coming Fedora 8 which works around the issue.

Thanks, Jens
diff -up gettext-0.16.1/gettext-tools/configure.ac.4-expat~ 
gettext-0.16.1/gettext-tools/configure.ac
--- gettext-0.16.1/gettext-tools/configure.ac.4-expat~  2006-11-27 
18:02:01.000000000 +0100
+++ gettext-0.16.1/gettext-tools/configure.ac   2007-09-14 15:03:43.000000000 
+0200
@@ -238,6 +238,22 @@ case "$host_os" in
     LTLIBEXPAT="-ldl"
     AC_SUBST(LIBEXPAT)
     AC_SUBST(LTLIBEXPAT)
+    AC_CHECK_HEADER([expat.h],[
+        cat > xml_major_version.c << EOF
+#include <stdio.h>
+#include <expat.h>
+int main (void) { printf ("%d\n", XML_MAJOR_VERSION); }
+EOF
+        AC_MSG_CHECKING([for libexpat XML_MAJOR_VERSION])
+        $CC -o xml_major_version xml_major_version.c
+        XML_MAJOR_VERSION=$(./xml_major_version)
+        rm -f ./xml_major_version ./xml_major_version.c
+        AC_MSG_RESULT([$XML_MAJOR_VERSION])
+        AC_SUBST(XML_MAJOR_VERSION)
+        AC_DEFINE_UNQUOTED([XML_MAJOR_VERSION],$XML_MAJOR_VERSION,[The API 
version of the expat library found during compilation.])
+    ],[
+        AC_ERROR([cannot determine version of expat library, expat.h is 
missing])
+    ])
     ;;
   *)
     AC_LIB_HAVE_LINKFLAGS([expat], [],
diff -up gettext-0.16.1/gettext-tools/src/x-glade.c.4-expat~ 
gettext-0.16.1/gettext-tools/src/x-glade.c
--- gettext-0.16.1/gettext-tools/src/x-glade.c.4-expat~ 2006-11-27 
18:02:08.000000000 +0100
+++ gettext-0.16.1/gettext-tools/src/x-glade.c  2007-09-14 15:46:23.000000000 
+0200
@@ -114,6 +114,7 @@ init_keywords ()
 typedef void *XML_Parser;
 typedef char XML_Char;
 typedef char XML_LChar;
+typedef unsigned long XML_Size;
 enum XML_Error { XML_ERROR_NONE };
 typedef void (*XML_StartElementHandler) (void *userData, const XML_Char *name, 
const XML_Char **atts);
 typedef void (*XML_EndElementHandler) (void *userData, const XML_Char *name);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]