[Evolution] libxml patch



hi,

filter/* uses libxml but there is no configure check for it. 
the folowing patch applies one.

Also, I ported it to libxml2 because that's my dev environment.

regards,
Mathieu


Index: configure.in
===================================================================
RCS file: /cvs/gnome/evolution/configure.in,v
retrieving revision 1.65
diff -u -r1.65 configure.in
--- configure.in        2000/04/14 16:50:40     1.65
+++ configure.in        2000/04/16 22:06:42
@@ -153,6 +153,31 @@
 AC_SUBST(GNOME_PRINT_LIBS)
 AC_SUBST(GNOME_PRINT_CFLAGS)
 
+
+dnl **************************************************
+dnl * libxml check
+dnl **************************************************
+AC_MSG_CHECKING(for GnomeXML libraries >= 1.8.x)
+XML_CONFIG="xml-config"
+if test "x$XML_CONFIG" != "x"
+then
+       vers=`$XML_CONFIG --version | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 
1000 + $2) * 1000 + $3;}'`
+       if test "$vers" -ge 1008000
+       then
+               GNOME_XML_LIBS="`$XML_CONFIG --libs`"
+               GNOME_XML_CFLAGS="`$XML_CONFIG --cflags`"
+               AC_MSG_RESULT(found)
+       else
+               AC_MSG_ERROR(You need at least GnomeXML 1.8.x for this version of libxml)
+       fi
+else
+       AC_MSG_ERROR(Could not find GnomeXml anywhere.)
+fi
+
+AC_SUBST(GNOME_XML_LIBS)
+AC_SUBST(GNOME_XML_CFLAGS)
+
+
 dnl **************************************************
 dnl * ORBit support
 dnl **************************************************
@@ -236,7 +261,7 @@
 
 
 EXTRA_GNOME_LIBS="`gnome-config --libs libglade gdk_pixbuf gnomecanvaspixbuf gnomeui ` $THREADS_LIBS 
`unicode-config --libs`"
-EXTRA_GNOME_CFLAGS="`gnome-config --cflags libglade gdk_pixbuf gnomecanvaspixbuf gnomeui ` $THREADS_CFLAGS 
`unicode-config --cflags`"
+EXTRA_GNOME_CFLAGS="`gnome-config --cflags xml libglade gdk_pixbuf gnomecanvaspixbuf gnomeui ` 
$THREADS_CFLAGS `unicode-config --cflags`"
 
 AC_SUBST(EXTRA_GNOME_LIBS)
 AC_SUBST(EXTRA_GNOME_CFLAGS)
Index: filter/Makefile.am
===================================================================
RCS file: /cvs/gnome/evolution/filter/Makefile.am,v
retrieving revision 1.1
diff -u -r1.1 Makefile.am
--- filter/Makefile.am  2000/03/02 00:08:15     1.1
+++ filter/Makefile.am  2000/04/16 22:06:45
@@ -1,4 +1,5 @@
 INCLUDES =                                     \
+       -I $(GNOME_XML_CFLAGS)                  \
        -I $(top_srcdir)                        \
        -I $(top_srcdir)/libibex                \
        -I $(top_srcdir)/camel                  \
@@ -28,7 +29,8 @@
        $(GNOMEUI_LIBS)                         \
        $(INTLLIBS)                             \
        $(PTHREAD_LIB)                          \
-       $(EXTRA_GNOME_LIBS)
+       $(EXTRA_GNOME_LIBS)                     \
+       $(GNOME_XML_LIBS)
 
 ##
 
@@ -39,3 +41,7 @@
        filter-format.c                         \
        filter-druid.c                          \
        filter-editor.c
+
+
+
+
Index: filter/filter-arg-types.c
===================================================================
RCS file: /cvs/gnome/evolution/filter/filter-arg-types.c,v
retrieving revision 1.5
diff -u -r1.5 filter-arg-types.c
--- filter/filter-arg-types.c   2000/03/27 21:27:30     1.5
+++ filter/filter-arg-types.c   2000/04/16 22:06:46
@@ -167,7 +167,7 @@
 {
        xmlNodePtr n;
 
-       n = node->childs;
+       n = node->children;
        while (n) {
                if (!strcmp(n->name, "folder")) {
                        filter_arg_string_add(arg, xmlGetProp(n, "folder"));
@@ -395,7 +395,7 @@
 {
        xmlNodePtr n;
 
-       n = node->childs;
+       n = node->children;
        while (n) {
                if (!strcmp(n->name, "address")) {
                        char *nm, *e;
@@ -667,7 +667,7 @@
 
        printf("adding folder values ...\n");
 
-       n = node->childs;
+       n = node->children;
        while (n) {
                if (!strcmp(n->name, "folder")) {
                        char *name = xmlGetProp(n, "name");





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]