James LewisMoss's update to libxml 2 detection.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3492 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-01-17 23:12:28 +00:00
parent 139d2ee898
commit 759d32ea2e
4 changed files with 48 additions and 25 deletions

View File

@ -91,7 +91,6 @@
/*** End i18n ***/
#undef GNOME_XML_HEADER_VERSION_1
#undef GNOME_XML_HEADER_VERSION_2
#undef HAVE_XML_VERSION_HEADER
#endif

View File

@ -60,13 +60,9 @@ 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)
AC_CHECK_HEADER(libxml/xmlversion.h, [
HAVE_XML_VERSION_HEADER=1
AC_DEFINE(HAVE_XML_VERSION_HEADER)
])
dnl Set of available languages.

View File

@ -23,16 +23,32 @@
#include <glib.h>
#ifdef GNOME_XML_HEADER_VERSION_1
#include <gnome-xml/tree.h>
#include <gnome-xml/parser.h>
#include <gnome-xml/xmlmemory.h>
#include <gnome-xml/parserInternals.h>
#elif defined(GNOME_XML_HEADER_VERSION_2)
#ifdef HAVE_XML_VERSION_HEADER
#include <libxml/xmlversion.h>
#endif
#if defined(LIBXML_VERSION) && LIBXML_VERSION >= 20000
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
#include <libxml/parserInternals.h>
#ifndef xmlChildrenNode
#define xmlChildrenNode children
#define xmlRootNode children
#endif
#else
#include <gnome-xml/tree.h>
#include <gnome-xml/parser.h>
#include <gnome-xml/xmlmemory.h>
#include <gnome-xml/parserInternals.h>
#ifndef xmlChildrenNode
#define xmlChildrenNode childs
#define xmlRootNode root
#endif
#endif
#include "Account.h"

View File

@ -49,16 +49,32 @@
#include <stdlib.h>
#include <string.h>
#ifdef GNOME_XML_HEADER_VERSION_1
#include <gnome-xml/tree.h>
#include <gnome-xml/parser.h>
#include <gnome-xml/xmlmemory.h>
#include <gnome-xml/parserInternals.h>
#elif defined(GNOME_XML_HEADER_VERSION_2)
#ifdef HAVE_XML_VERSION_HEADER
#include <libxml/xmlversion.h>
#endif
#if defined(LIBXML_VERSION) && LIBXML_VERSION >= 20000
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
#include <libxml/parserInternals.h>
#ifndef xmlChildrenNode
#define xmlChildrenNode children
#define xmlRootNode children
#endif
#else
#include <gnome-xml/tree.h>
#include <gnome-xml/parser.h>
#include <gnome-xml/xmlmemory.h>
#include <gnome-xml/parserInternals.h>
#ifndef xmlChildrenNode
#define xmlChildrenNode childs
#define xmlRootNode root
#endif
#endif
#include "Account.h"
@ -85,10 +101,6 @@
static short module = MOD_IO;
/* Pulled from the libxml-1.8.8 header */
#ifndef xmlChildrenNode
#define xmlChildrenNode childs
#define xmlRootNode root
#endif
static const gchar *gncxml_emacs_trailer =
"<!-- Local variables: -->\n"