From b7bcae050f312be5cf1e1e4c5dcba3e4355346c4 Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Wed, 17 Jan 2001 06:53:18 +0000 Subject: [PATCH] James LewisMoss's patch to load the right header files for libxml 1 & 2. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3489 57a11ea4-9604-0410-9ed3-97b8803252fd --- acconfig.h | 3 +++ configure.in | 9 +++++++++ src/engine/io-gncxml-r.c | 9 +++++++++ src/engine/io-gncxml-w.c | 8 ++++++++ 4 files changed, 29 insertions(+) diff --git a/acconfig.h b/acconfig.h index 800b4aa1a9..72840aec87 100644 --- a/acconfig.h +++ b/acconfig.h @@ -91,4 +91,7 @@ /*** End i18n ***/ +#undef GNOME_XML_HEADER_VERSION_1 +#undef GNOME_XML_HEADER_VERSION_2 + #endif diff --git a/configure.in b/configure.in index 84c608b534..ef9efefbd8 100644 --- a/configure.in +++ b/configure.in @@ -60,6 +60,15 @@ GNOME_CHECK_GUILE GNOME_PRINT_CHECK GNOME_XML_CHECK +AC_CHECK_HEADER(gnome-xml/parserInternals.h, [ + GNOME_XML_HEADER_VERSION_1=1 + AC_DEFINE(GNOME_XML_HEADER_VERSION_1) +]) +AC_CHECK_HEADER(libxml/parserInternals.h, [ + GNOME_XML_HEADER_VERSION_2=1 + AC_DEFINE(GNOME_XML_HEADER_VERSION_2) +]) + dnl Set of available languages. ALL_LINGUAS="de en_GB es fr it ja ru sv" AM_GNU_GETTEXT diff --git a/src/engine/io-gncxml-r.c b/src/engine/io-gncxml-r.c index 29981f3f5d..14446a724c 100644 --- a/src/engine/io-gncxml-r.c +++ b/src/engine/io-gncxml-r.c @@ -7,6 +7,8 @@ * */ +#include + #ifndef _GNU_SOURCE # define _GNU_SOURCE # include @@ -21,10 +23,17 @@ #include +#ifdef GNOME_XML_HEADER_VERSION_1 #include #include #include #include +#elif defined(GNOME_XML_HEADER_VERSION_2) +#include +#include +#include +#include +#endif #include "Account.h" #include "date.h" diff --git a/src/engine/io-gncxml-w.c b/src/engine/io-gncxml-w.c index 0cd1254d3a..c6f690f82f 100644 --- a/src/engine/io-gncxml-w.c +++ b/src/engine/io-gncxml-w.c @@ -40,6 +40,7 @@ * Boston, MA 02111-1307, USA gnu@gnu.org * \********************************************************************/ +#include #define _GNU_SOURCE @@ -48,10 +49,17 @@ #include #include +#ifdef GNOME_XML_HEADER_VERSION_1 #include #include #include #include +#elif defined(GNOME_XML_HEADER_VERSION_2) +#include +#include +#include +#include +#endif #include "Account.h" #include "date.h"