summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 18:37:03 +0000
committermmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-06 18:37:03 +0000
commite6d08cad82c6175196682a0730be347d5dddd415 (patch)
tree0e37904d053ce3e28c4e3889079d0cc5e3fee177
parent754e5bc23b758ef3444dd7383822563e46da8405 (diff)
downloadchromium_src-e6d08cad82c6175196682a0730be347d5dddd415.zip
chromium_src-e6d08cad82c6175196682a0730be347d5dddd415.tar.gz
chromium_src-e6d08cad82c6175196682a0730be347d5dddd415.tar.bz2
Allow third_party/libxml to compile on Linux. This uses static config.h and xmlversion.h files generated by ./configure, which probably isn't ideal, but it's a start.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@441 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/SConscript.main.linux4
-rw-r--r--third_party/libxml/README.google5
-rw-r--r--third_party/libxml/SConscript77
-rw-r--r--third_party/libxml/configure10
-rw-r--r--third_party/libxml/google.patch53
-rw-r--r--third_party/libxml/linux/config.h296
-rw-r--r--third_party/libxml/linux/include/libxml/xmlversion.h415
-rwxr-xr-xthird_party/libxml/linux/xml2-config106
8 files changed, 933 insertions, 33 deletions
diff --git a/build/SConscript.main.linux b/build/SConscript.main.linux
index 95244f1..c41dbe5 100644
--- a/build/SConscript.main.linux
+++ b/build/SConscript.main.linux
@@ -78,7 +78,7 @@ env = Environment(
ICU38_DIR = '$THIRD_PARTY_DIR/icu38',
LIBJPEG_DIR = '$THIRD_PARTY_DIR/libjpeg',
LIBPNG_DIR = '$THIRD_PARTY_DIR/libpng',
- #LIBXML_DIR = '$THIRD_PARTY_DIR/libxml',
+ LIBXML_DIR = '$THIRD_PARTY_DIR/libxml',
#LIBXSLT_DIR = '$THIRD_PARTY_DIR/libxslt',
LZMA_SDK_DIR = '$THIRD_PARTY_DIR/lzma_sdk',
MODP_B64_DIR = '$THIRD_PARTY_DIR/modp_b64',
@@ -361,8 +361,8 @@ if LoadComponent('third_party'):
'$ICU38_DIR/SConscript',
'$LIBJPEG_DIR/SConscript',
'$LIBPNG_DIR/SConscript',
+ '$LIBXML_DIR/SConscript',
# TODO(linux): bring these back.
- #'$LIBXML_DIR/SConscript',
#'$LIBXSLT_DIR/SConscript',
'$LZMA_SDK_DIR/SConscript',
'$MODP_B64_DIR/SConscript',
diff --git a/third_party/libxml/README.google b/third_party/libxml/README.google
index b194f34..2cbcd56 100644
--- a/third_party/libxml/README.google
+++ b/third_party/libxml/README.google
@@ -4,6 +4,9 @@ includes the following modifications :
* Modified encoding.c to fix memory leak (06/13/2008)
* Modified win32/configure.js NOT to use iconv
* Modified win32/configure.js to be able to clobber a read-only Makefile
+* Modified configure to enable icu.
+* Modified configure to not generate Makefiles and other unused build files..
+* Added pre-generated Linux headers to linux/.
* Changed 'LoadLibrary' to 'LoadLibraryA' in xmlmodule.c (used with
'const char*' as an argument)
* Changed bogus '(unsigned long)' cast to '(unsigned short)' in xmlregexp.c
@@ -25,4 +28,6 @@ To import a new snapshot of libxml:
- Apply the patch in google.patch and reconcile any conflict
- Then, make any necessary changes to remove compile-time warnings.
- Update google.patch
+- 'cd linux && sh ../configure --without-iconv' to re-generate config.h and
+ include/libxml/xmlversion.h.
- Update this README to reflect the new version number.
diff --git a/third_party/libxml/SConscript b/third_party/libxml/SConscript
index 92c27c4..542c38d 100644
--- a/third_party/libxml/SConscript
+++ b/third_party/libxml/SConscript
@@ -47,12 +47,22 @@ env.Append(
'U_STATIC_IMPLEMENTATION',
'LIBXML_STATIC',
],
- CCFLAGS = [
- '/TC',
- '/wd4800',
- ],
)
+if env['PLATFORM'] == 'win32':
+ env.Append(
+ CCFLAGS = [
+ '/TC',
+ '/wd4800',
+ ],
+ )
+elif env['PLATFORM'] == 'posix':
+ env.Append(
+ CPPDEFINES = [
+ '_REENTRANT',
+ ],
+ )
+
input_files = [
'c14n.c',
@@ -103,31 +113,42 @@ input_files = [
env.ChromeStaticLibrary('libxml', input_files)
-config_files = [
- # The configure.js script must be first in this list; the
- # env.Command() call below executes the first list element.
+if env['PLATFORM'] == 'win32':
+ config_files = [
+ # The configure.js script must be first in this list; the
+ # env.Command() call below executes the first list element.
- 'win32/configure.js',
- 'win32/Makefile.msvc',
+ 'win32/configure.js',
+ 'win32/Makefile.msvc',
- 'config.h.in',
- 'configure.in',
- 'libxml-2.0-uninstalled.pc.in',
- 'libxml-2.0.pc.in',
- 'libxml.spec.in',
- 'xml2-config.in',
- 'xml2Conf.sh.in',
+ 'config.h.in',
+ 'configure.in',
+ 'libxml-2.0-uninstalled.pc.in',
+ 'libxml-2.0.pc.in',
+ 'libxml.spec.in',
+ 'xml2-config.in',
+ 'xml2Conf.sh.in',
- 'include/libxml/xmlversion.h.in',
- 'include/win32config.h',
-]
+ 'include/libxml/xmlversion.h.in',
+ 'include/win32config.h',
+ ]
+
+ copied_files = []
+ for cf in config_files:
+ result = env.Command('scons/' + cf, cf, Copy('$TARGET', '$SOURCE'))
+ copied_files.extend(result)
+
+ env.Command(['scons/config.h', 'scons/include/libxml/xmlversion.h'],
+ copied_files,
+ 'cd ${SOURCE.dir} && $CSCRIPT ${SOURCE.file} $CONFIG_OPTIONS',
+ CONFIG_OPTIONS='compiler=msvc iconv=no icu=yes')
+elif env['PLATFORM'] == 'posix':
+ config_files = [
+ 'config.h',
+ 'include/libxml/xmlversion.h',
+ 'xml2-config',
+ ]
+ for cf in config_files:
+ result = env.Command('scons/' + cf, 'linux/' + cf,
+ Copy('$TARGET', '$SOURCE'))
-copied_files = []
-for cf in config_files:
- result = env.Command('scons/' + cf, cf, Copy('$TARGET', '$SOURCE'))
- copied_files.extend(result)
-
-env.Command(['scons/config.h', 'scons/include/libxml/xmlversion.h'],
- copied_files,
- 'cd ${SOURCE.dir} && $CSCRIPT ${SOURCE.file} $CONFIG_OPTIONS',
- CONFIG_OPTIONS='compiler=msvc iconv=no icu=yes')
diff --git a/third_party/libxml/configure b/third_party/libxml/configure
index d02721f..c2e694a 100644
--- a/third_party/libxml/configure
+++ b/third_party/libxml/configure
@@ -952,6 +952,7 @@ XPATH_OBJ
TEST_XPATH
WITH_OUTPUT
WITH_ICONV
+WITH_ICU
WITH_ISO8859X
WITH_SCHEMATRON
TEST_SCHEMATRON
@@ -28792,6 +28793,8 @@ else
fi
+WITH_ICU=1
+
WITH_ICONV=0
if test "$with_iconv" = "no" ; then
echo Disabling ICONV support
@@ -29213,7 +29216,7 @@ rm -f COPYING.LIB COPYING
ln -s Copyright COPYING
# keep on one line for cygwin c.f. #130896
-ac_config_files="$ac_config_files libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py"
+ac_config_files="$ac_config_files include/libxml/xmlversion.h xml2-config "
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -30119,6 +30122,7 @@ XPATH_OBJ!$XPATH_OBJ$ac_delim
TEST_XPATH!$TEST_XPATH$ac_delim
WITH_OUTPUT!$WITH_OUTPUT$ac_delim
WITH_ICONV!$WITH_ICONV$ac_delim
+WITH_ICU!$WITH_ICU$ac_delim
WITH_ISO8859X!$WITH_ISO8859X$ac_delim
WITH_SCHEMATRON!$WITH_SCHEMATRON$ac_delim
TEST_SCHEMATRON!$TEST_SCHEMATRON$ac_delim
@@ -30130,7 +30134,7 @@ WITH_DEBUG!$WITH_DEBUG$ac_delim
DEBUG_OBJ!$DEBUG_OBJ$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 98; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -30794,5 +30798,5 @@ if test "$no_create" != yes; then
fi
-chmod +x xml2-config python/setup.py
+chmod +x xml2-config
echo Done configuring
diff --git a/third_party/libxml/google.patch b/third_party/libxml/google.patch
index 10fde21..5cd4e9b 100644
--- a/third_party/libxml/google.patch
+++ b/third_party/libxml/google.patch
@@ -1,3 +1,56 @@
+diff -ur libxml2-2.6.31.orig/configure libxml2-2.6.31/configure
+--- libxml2-2.6.31.orig/configure 2008-01-11 00:01:56.000000000 -0800
++++ libxml2-2.6.31/configure 2008-08-05 12:19:40.000000000 -0700
+@@ -952,6 +952,7 @@
+ TEST_XPATH
+ WITH_OUTPUT
+ WITH_ICONV
++WITH_ICU
+ WITH_ISO8859X
+ WITH_SCHEMATRON
+ TEST_SCHEMATRON
+@@ -28792,6 +28793,8 @@
+ fi
+
+
++WITH_ICU=1
++
+ WITH_ICONV=0
+ if test "$with_iconv" = "no" ; then
+ echo Disabling ICONV support
+@@ -29213,7 +29216,7 @@
+ ln -s Copyright COPYING
+
+ # keep on one line for cygwin c.f. #130896
+-ac_config_files="$ac_config_files libxml2.spec:libxml.spec.in Makefile include/Makefile include/libxml/Makefile doc/Makefile doc/examples/Makefile doc/devhelp/Makefile example/Makefile python/Makefile python/tests/Makefile xstc/Makefile include/libxml/xmlversion.h xml2-config libxml-2.0.pc libxml-2.0-uninstalled.pc python/setup.py"
++ac_config_files="$ac_config_files include/libxml/xmlversion.h xml2-config"
+
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+@@ -30119,6 +30122,7 @@
+ TEST_XPATH!$TEST_XPATH$ac_delim
+ WITH_OUTPUT!$WITH_OUTPUT$ac_delim
+ WITH_ICONV!$WITH_ICONV$ac_delim
++WITH_ICU!$WITH_ICU$ac_delim
+ WITH_ISO8859X!$WITH_ISO8859X$ac_delim
+ WITH_SCHEMATRON!$WITH_SCHEMATRON$ac_delim
+ TEST_SCHEMATRON!$TEST_SCHEMATRON$ac_delim
+@@ -30130,7 +30134,7 @@
+ DEBUG_OBJ!$DEBUG_OBJ$ac_delim
+ _ACEOF
+
+- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 98; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+@@ -30794,5 +30798,5 @@
+ fi
+
+
+-chmod +x xml2-config python/setup.py
++chmod +x xml2-config
+ echo Done configuring
diff -ur libxml2-2.6.31/encoding.c libxml/encoding.c
--- libxml2-2.6.31/encoding.c 2007-05-28 07:08:52.000000000 -0700
+++ libxml/encoding.c 2008-03-17 14:28:09.000000000 -0400
diff --git a/third_party/libxml/linux/config.h b/third_party/libxml/linux/config.h
new file mode 100644
index 0000000..a3f8707
--- /dev/null
+++ b/third_party/libxml/linux/config.h
@@ -0,0 +1,296 @@
+/* config.h. Generated from config.h.in by configure. */
+/* config.h.in. Generated from configure.in by autoheader. */
+#define PACKAGE "libxml2"
+#define VERSION "2.6.31"
+#define HAVE_LIBZ 1
+/* #undef HAVE_LIBM */
+#define HAVE_ISINF
+#define HAVE_ISNAN
+/* #undef HAVE_LIBHISTORY */
+/* #undef HAVE_LIBREADLINE */
+#define HAVE_LIBPTHREAD
+#define HAVE_PTHREAD_H
+
+/* Define if IPV6 support is there */
+#define SUPPORT_IP6
+
+/* Define if getaddrinfo is there */
+#define HAVE_GETADDRINFO
+
+/* Define to 1 if you have the <ansidecl.h> header file. */
+/* #undef HAVE_ANSIDECL_H */
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the <arpa/nameser.h> header file. */
+#define HAVE_ARPA_NAMESER_H 1
+
+/* Whether struct sockaddr::__ss_family exists */
+/* #undef HAVE_BROKEN_SS_FAMILY */
+
+/* Define to 1 if you have the `class' function. */
+/* #undef HAVE_CLASS */
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#define HAVE_CTYPE_H 1
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Have dlopen based dso */
+#define HAVE_DLOPEN
+
+/* Define to 1 if you have the <dl.h> header file. */
+/* #undef HAVE_DL_H */
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `finite' function. */
+#define HAVE_FINITE 1
+
+/* Define to 1 if you have the <float.h> header file. */
+#define HAVE_FLOAT_H 1
+
+/* Define to 1 if you have the `fpclass' function. */
+/* #undef HAVE_FPCLASS */
+
+/* Define to 1 if you have the `fprintf' function. */
+#define HAVE_FPRINTF 1
+
+/* Define to 1 if you have the `fp_class' function. */
+/* #undef HAVE_FP_CLASS */
+
+/* Define to 1 if you have the <fp_class.h> header file. */
+/* #undef HAVE_FP_CLASS_H */
+
+/* Define to 1 if you have the `ftime' function. */
+#define HAVE_FTIME 1
+
+/* Define if getaddrinfo is there */
+#define HAVE_GETADDRINFO
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+/* #undef HAVE_IEEEFP_H */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define if isinf is there */
+#define HAVE_ISINF
+
+/* Define if isnan is there */
+#define HAVE_ISNAN
+
+/* Define to 1 if you have the `isnand' function. */
+/* #undef HAVE_ISNAND */
+
+/* Define if history library is there (-lhistory) */
+/* #undef HAVE_LIBHISTORY */
+
+/* Define if pthread library is there (-lpthread) */
+#define HAVE_LIBPTHREAD
+
+/* Define if readline library is there (-lreadline) */
+/* #undef HAVE_LIBREADLINE */
+
+/* Have compression library */
+#define HAVE_LIBZ 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the `localtime' function. */
+#define HAVE_LOCALTIME 1
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#define HAVE_MALLOC_H 1
+
+/* Define to 1 if you have the <math.h> header file. */
+#define HAVE_MATH_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <nan.h> header file. */
+/* #undef HAVE_NAN_H */
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the `printf' function. */
+#define HAVE_PRINTF 1
+
+/* Define if <pthread.h> is there */
+#define HAVE_PTHREAD_H
+
+/* Define to 1 if you have the <resolv.h> header file. */
+#define HAVE_RESOLV_H 1
+
+/* Have shl_load based dso */
+/* #undef HAVE_SHLLOAD */
+
+/* Define to 1 if you have the `signal' function. */
+#define HAVE_SIGNAL 1
+
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if you have the `sprintf' function. */
+#define HAVE_SPRINTF 1
+
+/* Define to 1 if you have the `sscanf' function. */
+#define HAVE_SSCANF 1
+
+/* Define to 1 if you have the `stat' function. */
+#define HAVE_STAT 1
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strndup' function. */
+#define HAVE_STRNDUP 1
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#define HAVE_SYS_MMAN_H 1
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#define HAVE_SYS_TIMEB_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <time.h> header file. */
+#define HAVE_TIME_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Whether va_copy() is available */
+#define HAVE_VA_COPY 1
+
+/* Define to 1 if you have the `vfprintf' function. */
+#define HAVE_VFPRINTF 1
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#define HAVE_VSNPRINTF 1
+
+/* Define to 1 if you have the `vsprintf' function. */
+#define HAVE_VSPRINTF 1
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#define HAVE_ZLIB_H 1
+
+/* Define to 1 if you have the `_stat' function. */
+/* #undef HAVE__STAT */
+
+/* Whether __va_copy() is available */
+/* #undef HAVE___VA_COPY */
+
+/* Name of package */
+#define PACKAGE "libxml2"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* Define to 1 if the C compiler supports function prototypes. */
+#define PROTOTYPES 1
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Support for IPv6 */
+#define SUPPORT_IP6
+
+/* Version number of package */
+#define VERSION "2.6.31"
+
+/* Determine what socket length (socklen_t) data type is */
+#define XML_SOCKLEN_T socklen_t
+
+/* Using the Win32 Socket implementation */
+/* #undef _WINSOCKAPI_ */
+
+/* Define like PROTOTYPES; this can be used by system headers. */
+#define __PROTOTYPES 1
+
+/* Win32 Std C name mangling work-around */
+/* #undef snprintf */
+
+/* ss_family is not defined here, use __ss_family instead */
+/* #undef ss_family */
+
+/* Win32 Std C name mangling work-around */
+/* #undef vsnprintf */
diff --git a/third_party/libxml/linux/include/libxml/xmlversion.h b/third_party/libxml/linux/include/libxml/xmlversion.h
new file mode 100644
index 0000000..48adae8
--- /dev/null
+++ b/third_party/libxml/linux/include/libxml/xmlversion.h
@@ -0,0 +1,415 @@
+/*
+ * Summary: compile-time version informations
+ * Description: compile-time version informations for the XML library
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_VERSION_H__
+#define __XML_VERSION_H__
+
+#include <libxml/xmlexports.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * use those to be sure nothing nasty will happen if
+ * your library and includes mismatch
+ */
+#ifndef LIBXML2_COMPILING_MSCCDEF
+XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
+#endif /* LIBXML2_COMPILING_MSCCDEF */
+
+/**
+ * LIBXML_DOTTED_VERSION:
+ *
+ * the version string like "1.2.3"
+ */
+#define LIBXML_DOTTED_VERSION "2.6.31"
+
+/**
+ * LIBXML_VERSION:
+ *
+ * the version number: 1.2.3 value is 10203
+ */
+#define LIBXML_VERSION 20631
+
+/**
+ * LIBXML_VERSION_STRING:
+ *
+ * the version number string, 1.2.3 value is "10203"
+ */
+#define LIBXML_VERSION_STRING "20631"
+
+/**
+ * LIBXML_VERSION_EXTRA:
+ *
+ * extra version information, used to show a CVS compilation
+ */
+#define LIBXML_VERSION_EXTRA ""
+
+/**
+ * LIBXML_TEST_VERSION:
+ *
+ * Macro to check that the libxml version in use is compatible with
+ * the version the software has been compiled against
+ */
+#define LIBXML_TEST_VERSION xmlCheckVersion(20631);
+
+#ifndef VMS
+#if 0
+/**
+ * WITH_TRIO:
+ *
+ * defined if the trio support need to be configured in
+ */
+#define WITH_TRIO
+#else
+/**
+ * WITHOUT_TRIO:
+ *
+ * defined if the trio support should not be configured in
+ */
+#define WITHOUT_TRIO
+#endif
+#else /* VMS */
+/**
+ * WITH_TRIO:
+ *
+ * defined if the trio support need to be configured in
+ */
+#define WITH_TRIO 1
+#endif /* VMS */
+
+/**
+ * LIBXML_THREAD_ENABLED:
+ *
+ * Whether the thread support is configured in
+ */
+#if 1
+#if defined(_REENTRANT) || defined(__MT__) || \
+ (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L))
+#define LIBXML_THREAD_ENABLED
+#endif
+#endif
+
+/**
+ * LIBXML_TREE_ENABLED:
+ *
+ * Whether the DOM like tree manipulation API support is configured in
+ */
+#if 1
+#define LIBXML_TREE_ENABLED
+#endif
+
+/**
+ * LIBXML_OUTPUT_ENABLED:
+ *
+ * Whether the serialization/saving support is configured in
+ */
+#if 1
+#define LIBXML_OUTPUT_ENABLED
+#endif
+
+/**
+ * LIBXML_PUSH_ENABLED:
+ *
+ * Whether the push parsing interfaces are configured in
+ */
+#if 1
+#define LIBXML_PUSH_ENABLED
+#endif
+
+/**
+ * LIBXML_READER_ENABLED:
+ *
+ * Whether the xmlReader parsing interface is configured in
+ */
+#if 1
+#define LIBXML_READER_ENABLED
+#endif
+
+/**
+ * LIBXML_PATTERN_ENABLED:
+ *
+ * Whether the xmlPattern node selection interface is configured in
+ */
+#if 1
+#define LIBXML_PATTERN_ENABLED
+#endif
+
+/**
+ * LIBXML_WRITER_ENABLED:
+ *
+ * Whether the xmlWriter saving interface is configured in
+ */
+#if 1
+#define LIBXML_WRITER_ENABLED
+#endif
+
+/**
+ * LIBXML_SAX1_ENABLED:
+ *
+ * Whether the older SAX1 interface is configured in
+ */
+#if 1
+#define LIBXML_SAX1_ENABLED
+#endif
+
+/**
+ * LIBXML_FTP_ENABLED:
+ *
+ * Whether the FTP support is configured in
+ */
+#if 1
+#define LIBXML_FTP_ENABLED
+#endif
+
+/**
+ * LIBXML_HTTP_ENABLED:
+ *
+ * Whether the HTTP support is configured in
+ */
+#if 1
+#define LIBXML_HTTP_ENABLED
+#endif
+
+/**
+ * LIBXML_VALID_ENABLED:
+ *
+ * Whether the DTD validation support is configured in
+ */
+#if 1
+#define LIBXML_VALID_ENABLED
+#endif
+
+/**
+ * LIBXML_HTML_ENABLED:
+ *
+ * Whether the HTML support is configured in
+ */
+#if 1
+#define LIBXML_HTML_ENABLED
+#endif
+
+/**
+ * LIBXML_LEGACY_ENABLED:
+ *
+ * Whether the deprecated APIs are compiled in for compatibility
+ */
+#if 1
+#define LIBXML_LEGACY_ENABLED
+#endif
+
+/**
+ * LIBXML_C14N_ENABLED:
+ *
+ * Whether the Canonicalization support is configured in
+ */
+#if 1
+#define LIBXML_C14N_ENABLED
+#endif
+
+/**
+ * LIBXML_CATALOG_ENABLED:
+ *
+ * Whether the Catalog support is configured in
+ */
+#if 1
+#define LIBXML_CATALOG_ENABLED
+#endif
+
+/**
+ * LIBXML_DOCB_ENABLED:
+ *
+ * Whether the SGML Docbook support is configured in
+ */
+#if 1
+#define LIBXML_DOCB_ENABLED
+#endif
+
+/**
+ * LIBXML_XPATH_ENABLED:
+ *
+ * Whether XPath is configured in
+ */
+#if 1
+#define LIBXML_XPATH_ENABLED
+#endif
+
+/**
+ * LIBXML_XPTR_ENABLED:
+ *
+ * Whether XPointer is configured in
+ */
+#if 1
+#define LIBXML_XPTR_ENABLED
+#endif
+
+/**
+ * LIBXML_XINCLUDE_ENABLED:
+ *
+ * Whether XInclude is configured in
+ */
+#if 1
+#define LIBXML_XINCLUDE_ENABLED
+#endif
+
+/**
+ * LIBXML_ICONV_ENABLED:
+ *
+ * Whether iconv support is available
+ */
+#if 0
+#define LIBXML_ICONV_ENABLED
+#endif
+
+/**
+ * LIBXML_ICU_ENABLED:
+ *
+ * Whether icu support is available
+ */
+#if 1
+#define LIBXML_ICU_ENABLED
+#endif
+
+/**
+ * LIBXML_ISO8859X_ENABLED:
+ *
+ * Whether ISO-8859-* support is made available in case iconv is not
+ */
+#if 1
+#define LIBXML_ISO8859X_ENABLED
+#endif
+
+/**
+ * LIBXML_DEBUG_ENABLED:
+ *
+ * Whether Debugging module is configured in
+ */
+#if 1
+#define LIBXML_DEBUG_ENABLED
+#endif
+
+/**
+ * DEBUG_MEMORY_LOCATION:
+ *
+ * Whether the memory debugging is configured in
+ */
+#if 0
+#define DEBUG_MEMORY_LOCATION
+#endif
+
+/**
+ * LIBXML_DEBUG_RUNTIME:
+ *
+ * Whether the runtime debugging is configured in
+ */
+#if 0
+#define LIBXML_DEBUG_RUNTIME
+#endif
+
+/**
+ * LIBXML_UNICODE_ENABLED:
+ *
+ * Whether the Unicode related interfaces are compiled in
+ */
+#if 1
+#define LIBXML_UNICODE_ENABLED
+#endif
+
+/**
+ * LIBXML_REGEXP_ENABLED:
+ *
+ * Whether the regular expressions interfaces are compiled in
+ */
+#if 1
+#define LIBXML_REGEXP_ENABLED
+#endif
+
+/**
+ * LIBXML_AUTOMATA_ENABLED:
+ *
+ * Whether the automata interfaces are compiled in
+ */
+#if 1
+#define LIBXML_AUTOMATA_ENABLED
+#endif
+
+/**
+ * LIBXML_EXPR_ENABLED:
+ *
+ * Whether the formal expressions interfaces are compiled in
+ */
+#if 1
+#define LIBXML_EXPR_ENABLED
+#endif
+
+/**
+ * LIBXML_SCHEMAS_ENABLED:
+ *
+ * Whether the Schemas validation interfaces are compiled in
+ */
+#if 1
+#define LIBXML_SCHEMAS_ENABLED
+#endif
+
+/**
+ * LIBXML_SCHEMATRON_ENABLED:
+ *
+ * Whether the Schematron validation interfaces are compiled in
+ */
+#if 1
+#define LIBXML_SCHEMATRON_ENABLED
+#endif
+
+/**
+ * LIBXML_MODULES_ENABLED:
+ *
+ * Whether the module interfaces are compiled in
+ */
+#if 1
+#define LIBXML_MODULES_ENABLED
+/**
+ * LIBXML_MODULE_EXTENSION:
+ *
+ * the string suffix used by dynamic modules (usually shared libraries)
+ */
+#define LIBXML_MODULE_EXTENSION ".so"
+#endif
+
+/**
+ * LIBXML_ZLIB_ENABLED:
+ *
+ * Whether the Zlib support is compiled in
+ */
+#if 1
+#define LIBXML_ZLIB_ENABLED
+#endif
+
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * Macro used to signal to GCC unused function parameters
+ */
+#ifdef __GNUC__
+#ifdef HAVE_ANSIDECL_H
+#include <ansidecl.h>
+#endif
+#ifndef ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED __attribute__((unused))
+#endif
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif
+
+
diff --git a/third_party/libxml/linux/xml2-config b/third_party/libxml/linux/xml2-config
new file mode 100755
index 0000000..2eaeb88
--- /dev/null
+++ b/third_party/libxml/linux/xml2-config
@@ -0,0 +1,106 @@
+#! /bin/sh
+
+prefix=/usr/local
+exec_prefix=${prefix}
+includedir=${prefix}/include
+libdir=${exec_prefix}/lib
+
+usage()
+{
+ cat <<EOF
+Usage: xml2-config [OPTION]
+
+Known values for OPTION are:
+
+ --prefix=DIR change libxml prefix [default $prefix]
+ --exec-prefix=DIR change libxml exec prefix [default $exec_prefix]
+ --libs print library linking information
+ --cflags print pre-processor and compiler flags
+ --modules module support enabled
+ --help display this help and exit
+ --version output version information
+EOF
+
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1
+fi
+
+cflags=false
+libs=false
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case "$1" in
+ --prefix=*)
+ prefix=$optarg
+ includedir=$prefix/include
+ libdir=$prefix/lib
+ ;;
+
+ --prefix)
+ echo $prefix
+ ;;
+
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ libdir=$exec_prefix/lib
+ ;;
+
+ --exec-prefix)
+ echo $exec_prefix
+ ;;
+
+ --version)
+ echo 2.6.31
+ exit 0
+ ;;
+
+ --help)
+ usage 0
+ ;;
+
+ --cflags)
+ echo -I${includedir}/libxml2
+ ;;
+
+ --libtool-libs)
+ if [ -r ${libdir}/libxml2.la ]
+ then
+ echo ${libdir}/libxml2.la
+ fi
+ ;;
+
+ --modules)
+ echo 1
+ ;;
+
+ --libs)
+ if [ "`uname`" = "Linux" ]
+ then
+ if [ "-L${libdir}" = "-L/usr/lib" -o "-L${libdir}" = "-L/usr/lib64" ]
+ then
+ echo -lxml2 -lz -lm
+ else
+ echo -L${libdir} -lxml2 -lz -lm
+ fi
+ else
+ echo -L${libdir} -lxml2 -lz -lm
+ fi
+ ;;
+
+ *)
+ usage
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+exit 0