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 ***/ /*** End i18n ***/
#undef GNOME_XML_HEADER_VERSION_1 #undef HAVE_XML_VERSION_HEADER
#undef GNOME_XML_HEADER_VERSION_2
#endif #endif

View File

@ -60,13 +60,9 @@ GNOME_CHECK_GUILE
GNOME_PRINT_CHECK GNOME_PRINT_CHECK
GNOME_XML_CHECK GNOME_XML_CHECK
AC_CHECK_HEADER(gnome-xml/parserInternals.h, [ AC_CHECK_HEADER(libxml/xmlversion.h, [
GNOME_XML_HEADER_VERSION_1=1 HAVE_XML_VERSION_HEADER=1
AC_DEFINE(GNOME_XML_HEADER_VERSION_1) AC_DEFINE(HAVE_XML_VERSION_HEADER)
])
AC_CHECK_HEADER(libxml/parserInternals.h, [
GNOME_XML_HEADER_VERSION_2=1
AC_DEFINE(GNOME_XML_HEADER_VERSION_2)
]) ])
dnl Set of available languages. dnl Set of available languages.

View File

@ -23,16 +23,32 @@
#include <glib.h> #include <glib.h>
#ifdef GNOME_XML_HEADER_VERSION_1 #ifdef HAVE_XML_VERSION_HEADER
#include <gnome-xml/tree.h> #include <libxml/xmlversion.h>
#include <gnome-xml/parser.h> #endif
#include <gnome-xml/xmlmemory.h>
#include <gnome-xml/parserInternals.h> #if defined(LIBXML_VERSION) && LIBXML_VERSION >= 20000
#elif defined(GNOME_XML_HEADER_VERSION_2)
#include <libxml/tree.h> #include <libxml/tree.h>
#include <libxml/parser.h> #include <libxml/parser.h>
#include <libxml/xmlmemory.h> #include <libxml/xmlmemory.h>
#include <libxml/parserInternals.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 #endif
#include "Account.h" #include "Account.h"

View File

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