Permalink
Browse files

480323 add code to plug in ICU converters by default

This is not configured in by default but after some serious massaging
incorporate that patch from Chromium/Chrome.
  • Loading branch information...
1 parent fbd4ddf commit 48f7dcb7242e236d80465615cb6cfc9cdf4cba46 @Derevko Derevko committed with veillard Nov 4, 2010
Showing with 592 additions and 286 deletions.
  1. +19 −0 configure.in
  2. +525 −284 encoding.c
  3. +14 −0 include/libxml/encoding.h
  4. +1 −1 include/libxml/parser.h
  5. +9 −0 include/libxml/xmlversion.h.in
  6. +6 −0 parser.c
  7. +3 −0 win32/Makefile.msvc
  8. +15 −1 win32/configure.js
View
@@ -128,6 +128,8 @@ AC_ARG_WITH(http,
[ --with-http add the HTTP support (on)])
AC_ARG_WITH(iconv,
[ --with-iconv[[=DIR]] add ICONV support (on)])
+AC_ARG_WITH(icu,
+[ --with-icu add ICU support (off)])
AC_ARG_WITH(iso8859x,
[ --with-iso8859x add ISO8859X support if no iconv (on)])
AC_ARG_WITH(legacy,
@@ -1321,6 +1323,23 @@ XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS"
XML_LIBTOOLLIBS="libxml2.la"
AC_SUBST(WITH_ICONV)
+WITH_ICU=0
+if test "$with_icu" != "yes" ; then
+ echo Disabling ICU support
+else
+ ICU_CONFIG=icu-config
+ if ${ICU_CONFIG} --cflags >/dev/null 2>&1
+ then
+ ICU_LIBS=`icu-config --ldflags`
+ LDFLAGS="$LDFLAGS $ICU_LIBS"
+ WITH_ICU=1
+ echo Enabling ICU support
+ else
+ AC_MSG_ERROR([libicu config program icu-config not found])
+ fi
+fi
+AC_SUBST(WITH_ICU)
+
WITH_ISO8859X=1
if test "$WITH_ICONV" != "1" ; then
if test "$with_iso8859x" = "no" ; then
Oops, something went wrong.

0 comments on commit 48f7dcb

Please sign in to comment.