For Libxml2 and friends, YAZ defines YAZ_HAVE_{XML2,XSLT,EXSLT) in
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 6 Jul 2006 10:17:51 +0000 (10:17 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 6 Jul 2006 10:17:51 +0000 (10:17 +0000)
the compitation phase, but also for yaz-config --cflags output. This
allows us to have public headers with Libxml2 stuff in them . It should
also, eventually, make Libxml2 checks redundant in packages using
YAZ, such as yazproxy.

28 files changed:
buildconf.sh
client/client.c
configure.ac
include/yaz/xmlquery.h
src/libxml2_error.c
src/marcdisp.c
src/nfaxml.c
src/nmemsdup.c
src/record_conv.c
src/retrieval.c
src/seshigh.c
src/soap.c
src/srw.c
src/srwutil.c
src/statserv.c
src/xmlquery.c
src/zoom-c.c
test/nfaxmltest1.c
test/tst_record_conv.c
test/tst_retrieval.c
test/tstsoap1.c
test/tstsoap2.c
test/tstxmlquery.c
util/marcdump.c
util/srwtst.c
util/yaz-xmlquery.c
win/makefile
yaz-config.in

index acb37df..5f076a5 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
 #!/bin/sh
-# $Id: buildconf.sh,v 1.39 2006-06-27 12:23:11 adam Exp $
+# $Id: buildconf.sh,v 1.40 2006-07-06 10:17:51 adam Exp $
 
 automake=automake
 aclocal=aclocal
 
 automake=automake
 aclocal=aclocal
@@ -26,7 +26,7 @@ fi
 
 set -x
 # I am tired of underquoted warnings for Tcl macros
 
 set -x
 # I am tired of underquoted warnings for Tcl macros
-$aclocal -I m4 2>&1 | grep -v "warning: underquoted definition"
+$aclocal -I m4
 $libtoolize --automake --force 
 $automake --add-missing 
 $autoconf
 $libtoolize --automake --force 
 $automake --add-missing 
 $autoconf
index 2204574..a2d1116 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2006, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2006, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: client.c,v 1.310 2006-06-02 13:12:53 adam Exp $
+ * $Id: client.c,v 1.311 2006-07-06 10:17:51 adam Exp $
  */
 /** \file client.c
  *  \brief yaz-client program
  */
 /** \file client.c
  *  \brief yaz-client program
@@ -86,7 +86,7 @@ static char *codeset = 0;               /* character set for output */
 static int hex_dump = 0;
 static char *dump_file_prefix = 0;
 static ODR out, in, print;              /* encoding and decoding streams */
 static int hex_dump = 0;
 static char *dump_file_prefix = 0;
 static ODR out, in, print;              /* encoding and decoding streams */
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 static ODR srw_sr_odr_out = 0;
 static Z_SRW_PDU *srw_sr = 0;
 #endif
 static ODR srw_sr_odr_out = 0;
 static Z_SRW_PDU *srw_sr = 0;
 #endif
@@ -689,7 +689,7 @@ int session_connect(const char *arg)
         printf ("Couldn't create comstack\n");
         return 0;
     }
         printf ("Couldn't create comstack\n");
         return 0;
     }
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     if (conn->protocol == PROTO_HTTP)
         queryType = QueryType_CQL;
 #else
     if (conn->protocol == PROTO_HTTP)
         queryType = QueryType_CQL;
 #else
@@ -1257,7 +1257,7 @@ static int send_deleteResultSetRequest(const char *arg)
     return 2;
 }
 
     return 2;
 }
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 static int send_srw(Z_SRW_PDU *sr)
 {
     const char *charset = negotiationCharset;
 static int send_srw(Z_SRW_PDU *sr)
 {
     const char *charset = negotiationCharset;
@@ -1311,7 +1311,7 @@ static int send_srw(Z_SRW_PDU *sr)
 }
 #endif
 
 }
 #endif
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 static char *encode_SRW_term(ODR o, const char *q)
 {
     const char *in_charset = "ISO-8859-1";
 static char *encode_SRW_term(ODR o, const char *q)
 {
     const char *in_charset = "ISO-8859-1";
@@ -2384,7 +2384,7 @@ static int cmd_explain(const char *arg)
 {
     if (protocol != PROTO_HTTP)
         return 0;
 {
     if (protocol != PROTO_HTTP)
         return 0;
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     if (!conn)
         cmd_open(0);
     if (conn)
     if (!conn)
         cmd_open(0);
     if (conn)
@@ -2449,7 +2449,7 @@ static int cmd_find(const char *arg)
     }
     if (protocol == PROTO_HTTP)
     {
     }
     if (protocol == PROTO_HTTP)
     {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
         if (!conn)
             cmd_open(0);
         if (!conn)
         if (!conn)
             cmd_open(0);
         if (!conn)
@@ -2657,7 +2657,7 @@ static int send_presentRequest(const char *arg)
     return 2;
 }
 
     return 2;
 }
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 static int send_SRW_presentRequest(const char *arg)
 {
     char setstring[100];
 static int send_SRW_presentRequest(const char *arg)
 {
     char setstring[100];
@@ -2725,7 +2725,7 @@ static int cmd_show(const char *arg)
 {
     if (protocol == PROTO_HTTP)
     {
 {
     if (protocol == PROTO_HTTP)
     {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
         if (!conn)
             cmd_open(0);
         if (!conn)
         if (!conn)
             cmd_open(0);
         if (!conn)
@@ -3046,7 +3046,7 @@ int cmd_scan(const char *arg)
 {
     if (protocol == PROTO_HTTP)
     {
 {
     if (protocol == PROTO_HTTP)
     {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
         if (!conn)
             cmd_open(0);
         if (!conn)
         if (!conn)
             cmd_open(0);
         if (!conn)
@@ -3700,7 +3700,7 @@ static void initialize(void)
 struct timeval tv_start;
 #endif
 
 struct timeval tv_start;
 #endif
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 static void handle_srw_record(Z_SRW_record *rec)
 {
     if (rec->recordPosition)
 static void handle_srw_record(Z_SRW_record *rec)
 {
     if (rec->recordPosition)
@@ -3999,7 +3999,7 @@ void wait_and_handle_response(int one_response_only)
                 close_session ();
             }
         }
                 close_session ();
             }
         }
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
         else if (gdu->which == Z_GDU_HTTP_Response)
         {
             http_response(gdu->u.HTTP_Response);
         else if (gdu->which == Z_GDU_HTTP_Response)
         {
             http_response(gdu->u.HTTP_Response);
index 684b43a..23ded0f 100644 (file)
@@ -1,6 +1,6 @@
 dnl YAZ Toolkit, Index Data 1994-2006
 dnl See the file LICENSE for details.
 dnl YAZ Toolkit, Index Data 1994-2006
 dnl See the file LICENSE for details.
-dnl $Id: configure.ac,v 1.27 2006-06-27 12:23:11 adam Exp $
+dnl $Id: configure.ac,v 1.28 2006-07-06 10:17:51 adam Exp $
 AC_PREREQ(2.59)
 AC_INIT([yaz],[2.1.23],[adam@indexdata.dk])
 AC_CONFIG_SRCDIR(configure.ac)
 AC_PREREQ(2.59)
 AC_INIT([yaz],[2.1.23],[adam@indexdata.dk])
 AC_CONFIG_SRCDIR(configure.ac)
@@ -321,10 +321,30 @@ fi
 
 dnl ----- libXSLT/libEXLT/libXML2
 AC_SUBST(XML2_CFLAGS)
 
 dnl ----- libXSLT/libEXLT/libXML2
 AC_SUBST(XML2_CFLAGS)
+AC_SUBST(YAZ_CONFIG_CFLAGS)
+YAZ_CONFIG_CFLAGS=""
 
 
-YAZ_LIBXML2
-YAZ_LIBXSLT
-YAZ_LIBEXSLT
+YAZ_LIBXML2(
+    [
+       AC_DEFINE(YAZ_HAVE_XML2) 
+       YAZ_CONFIG_CFLAGS="$YAZ_CONFIG_CFLAGS -DYAZ_HAVE_XML2=1"
+    ]
+)
+
+YAZ_LIBXSLT(
+    [
+       AC_DEFINE(YAZ_HAVE_XSLT)
+       YAZ_CONFIG_CFLAGS="$YAZ_CONFIG_CFLAGS -DYAZ_HAVE_XSLT=1"
+    ]
+)
+YAZ_LIBEXSLT(
+    [
+       AC_DEFINE(YAZ_HAVE_EXSLT)
+       YAZ_CONFIG_CFLAGS="$YAZ_CONFIG_CFLAGS -DYAZ_HAVE_EXSLT=1"
+    ]
+)
+       
+YAZ_CONFIG_CFLAGS="$YAZ_CONFIG_CFLAGS $XML2_CFLAGS"
 
 if test "$XML2_LIBS"; then
     LIBS="$XML2_LIBS $LIBS"
 
 if test "$XML2_LIBS"; then
     LIBS="$XML2_LIBS $LIBS"
index 7eb13ef..6456f0b 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2006, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2006, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: xmlquery.h,v 1.4 2006-04-20 20:50:51 adam Exp $
+ * $Id: xmlquery.h,v 1.5 2006-07-06 10:17:52 adam Exp $
  */
 
 /** \file xmlquery.h
  */
 
 /** \file xmlquery.h
 #ifndef YAZ_XMLQUERY_H
 #define YAZ_XMLQUERY_H
 
 #ifndef YAZ_XMLQUERY_H
 #define YAZ_XMLQUERY_H
 
+#if YAZ_HAVE_XML2
 #include <yaz/yconfig.h>
 #include <yaz/proto.h>
 
 #include <yaz/yconfig.h>
 #include <yaz/proto.h>
 
+#include <libxml/parser.h>
+
 YAZ_BEGIN_CDECL
 
 YAZ_BEGIN_CDECL
 
-YAZ_EXPORT void yaz_query2xml(const Z_Query *q, void *docp_void);
-YAZ_EXPORT void yaz_rpnquery2xml(const Z_RPNQuery *rpn, void *docp_void);
+YAZ_EXPORT void yaz_query2xml(const Z_Query *q, xmlDocPtr *docp);
+YAZ_EXPORT void yaz_rpnquery2xml(const Z_RPNQuery *rpn, xmlDocPtr *docp);
 
 YAZ_EXPORT void yaz_xml2query(const void *xmlnodep, Z_Query **query, ODR odr,
                               int *error_code, const char **addinfo);
 
 YAZ_EXPORT void yaz_xml2query(const void *xmlnodep, Z_Query **query, ODR odr,
                               int *error_code, const char **addinfo);
@@ -26,6 +29,8 @@ YAZ_EXPORT void yaz_xml2query(const void *xmlnodep, Z_Query **query, ODR odr,
 YAZ_END_CDECL
 
 #endif
 YAZ_END_CDECL
 
 #endif
+#endif
+
 /*
  * Local variables:
  * c-basic-offset: 4
 /*
  * Local variables:
  * c-basic-offset: 4
index 3241a63..00f5881 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 2006, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 2006, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: libxml2_error.c,v 1.1 2006-05-07 17:45:41 adam Exp $
+ * $Id: libxml2_error.c,v 1.2 2006-07-06 10:17:53 adam Exp $
  */
 /**
  * \file libxml2_error.c
  */
 /**
  * \file libxml2_error.c
 #include <yaz/log.h>
 #include <yaz/libxml2_error.h>
 
 #include <yaz/log.h>
 #include <yaz/libxml2_error.h>
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/xmlerror.h>
 #endif
 
 #include <libxml/xmlerror.h>
 #endif
 
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
 #include <libxslt/xsltutils.h>
 #endif
 
 #include <libxslt/xsltutils.h>
 #endif
 
@@ -44,10 +44,10 @@ static void proxy_xml_error_handler(void *ctx, const char *fmt, ...)
 int libxml2_error_to_yazlog(int level, const char *lead_msg)
 {
     libxml2_error_level = level;
 int libxml2_error_to_yazlog(int level, const char *lead_msg)
 {
     libxml2_error_level = level;
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
     xsltSetGenericErrorFunc((void *) "XSLT", proxy_xml_error_handler);
 #endif
     xsltSetGenericErrorFunc((void *) "XSLT", proxy_xml_error_handler);
 #endif
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     xmlSetGenericErrorFunc((void *) "XML", proxy_xml_error_handler);
     return 0;
 #else
     xmlSetGenericErrorFunc((void *) "XML", proxy_xml_error_handler);
     return 0;
 #else
index e7df01e..2b06b2a 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2006, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2006, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: marcdisp.c,v 1.30 2006-05-23 13:17:30 adam Exp $
+ * $Id: marcdisp.c,v 1.31 2006-07-06 10:17:53 adam Exp $
  */
 
 /**
  */
 
 /**
@@ -26,7 +26,7 @@
 #include <yaz/wrbuf.h>
 #include <yaz/yaz-util.h>
 
 #include <yaz/wrbuf.h>
 #include <yaz/yaz-util.h>
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #endif
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #endif
@@ -181,7 +181,7 @@ void yaz_marc_add_controlfield(yaz_marc_t mt, const char *tag,
     }
 }
 
     }
 }
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 void yaz_marc_add_controlfield_xml(yaz_marc_t mt, const xmlNode *ptr_tag,
                                    const xmlNode *ptr_data)
 {
 void yaz_marc_add_controlfield_xml(yaz_marc_t mt, const xmlNode *ptr_tag,
                                    const xmlNode *ptr_data)
 {
@@ -206,7 +206,7 @@ void yaz_marc_add_datafield(yaz_marc_t mt, const char *tag,
     mt->subfield_pp = &n->u.datafield.subfields;
 }
 
     mt->subfield_pp = &n->u.datafield.subfields;
 }
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 void yaz_marc_add_datafield_xml(yaz_marc_t mt, const xmlNode *ptr_tag,
                                 const char *indicator, size_t indicator_len)
 {
 void yaz_marc_add_datafield_xml(yaz_marc_t mt, const xmlNode *ptr_tag,
                                 const char *indicator, size_t indicator_len)
 {
@@ -692,7 +692,7 @@ int yaz_marc_write_iso2709(yaz_marc_t mt, WRBUF wr)
     return 0;
 }
 
     return 0;
 }
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 int yaz_marc_read_xml_subfields(yaz_marc_t mt, const xmlNode *ptr)
 {
     for (; ptr; ptr = ptr->next)
 int yaz_marc_read_xml_subfields(yaz_marc_t mt, const xmlNode *ptr)
 {
     for (; ptr; ptr = ptr->next)
index e423643..4bd2c4e 100644 (file)
@@ -1,7 +1,7 @@
 /*  Copyright (C) 2006, Index Data ApS
  *  See the file LICENSE for details.
  * 
 /*  Copyright (C) 2006, Index Data ApS
  *  See the file LICENSE for details.
  * 
- *  $Id: nfaxml.c,v 1.5 2006-07-06 08:28:37 adam Exp $ 
+ *  $Id: nfaxml.c,v 1.6 2006-07-06 10:17:53 adam Exp $ 
  */
 
 /**
  */
 
 /**
@@ -10,7 +10,7 @@
  *
  */
 
  *
  */
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 
 #include <string.h>
 
 
 #include <string.h>
 
@@ -75,7 +75,7 @@ yaz_nfa *yaz_nfa_parse_xml_file(const char *filepath) {
 
 
 
 
 
 
-#endif /* HAVE_XML2 */
+#endif /* YAZ_HAVE_XML2 */
 
 
 /*
 
 
 /*
index 7b2a051..a0856ec 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2006, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2006, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: nmemsdup.c,v 1.7 2006-05-03 13:04:46 adam Exp $
+ * $Id: nmemsdup.c,v 1.8 2006-07-06 10:17:53 adam Exp $
  */
 
 /**
  */
 
 /**
@@ -16,7 +16,7 @@
 
 #include <string.h>
 #include <yaz/nmem.h>
 
 #include <string.h>
 #include <yaz/nmem.h>
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/tree.h>
 #endif
 
 #include <libxml/tree.h>
 #endif
 
@@ -89,7 +89,7 @@ void nmem_strsplit(NMEM nmem, const char *delim, const char *dstr,
     }
 }
 
     }
 }
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 char *nmem_text_node_cdata(const void *ptr_cdata, NMEM nmem)
 {
     char *cdata;
 char *nmem_text_node_cdata(const void *ptr_cdata, NMEM nmem)
 {
     char *cdata;
index 94447f5..9d8a934 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 2005-2006, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 2005-2006, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: record_conv.c,v 1.10 2006-05-26 15:07:08 adam Exp $
+ * $Id: record_conv.c,v 1.11 2006-07-06 10:17:53 adam Exp $
  */
 /**
  * \file record_conv.c
  */
 /**
  * \file record_conv.c
 #include <yaz/nmem.h>
 #include <yaz/tpath.h>
 
 #include <yaz/nmem.h>
 #include <yaz/tpath.h>
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxml/xinclude.h>
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxml/xinclude.h>
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
 #include <libxslt/xsltutils.h>
 #include <libxslt/transform.h>
 #endif
 #include <libxslt/xsltutils.h>
 #include <libxslt/transform.h>
 #endif
-#if HAVE_EXSLT
+#if YAZ_HAVE_EXSLT
 #include <libexslt/exslt.h>
 #endif
 
 #include <libexslt/exslt.h>
 #endif
 
@@ -64,7 +64,7 @@ enum YAZ_RECORD_CONV_RULE
 struct yaz_record_conv_rule {
     enum YAZ_RECORD_CONV_RULE which;
     union {
 struct yaz_record_conv_rule {
     enum YAZ_RECORD_CONV_RULE which;
     union {
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
         struct {
             xsltStylesheetPtr xsp;
         } xslt;
         struct {
             xsltStylesheetPtr xsp;
         } xslt;
@@ -89,7 +89,7 @@ static void yaz_record_conv_reset(yaz_record_conv_t p)
             if (r->u.marc.iconv_t)
                 yaz_iconv_close(r->u.marc.iconv_t);
         }
             if (r->u.marc.iconv_t)
                 yaz_iconv_close(r->u.marc.iconv_t);
         }
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
         else if (r->which == YAZ_RECORD_CONV_RULE_XSLT)
         {
             xsltFreeStylesheet(r->u.xslt.xsp);
         else if (r->which == YAZ_RECORD_CONV_RULE_XSLT)
         {
             xsltFreeStylesheet(r->u.xslt.xsp);
@@ -112,7 +112,7 @@ yaz_record_conv_t yaz_record_conv_create()
     p->rules = 0;
     p->path = 0;
 
     p->rules = 0;
     p->path = 0;
 
-#if HAVE_EXSLT
+#if YAZ_HAVE_EXSLT
     exsltRegisterAll(); 
 #endif
     yaz_record_conv_reset(p);
     exsltRegisterAll(); 
 #endif
     yaz_record_conv_reset(p);
@@ -146,7 +146,7 @@ static struct yaz_record_conv_rule *add_rule(yaz_record_conv_t p,
 /** \brief parse 'xslt' conversion node */
 static int conv_xslt(yaz_record_conv_t p, const xmlNode *ptr)
 {
 /** \brief parse 'xslt' conversion node */
 static int conv_xslt(yaz_record_conv_t p, const xmlNode *ptr)
 {
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
     struct _xmlAttr *attr;
     const char *stylesheet = 0;
 
     struct _xmlAttr *attr;
     const char *stylesheet = 0;
 
@@ -334,7 +334,7 @@ int yaz_record_conv_configure(yaz_record_conv_t p, const void *ptr_v)
             }
             else if (!strcmp((const char *) ptr->name, "exslt"))
             {
             }
             else if (!strcmp((const char *) ptr->name, "exslt"))
             {
-#if HAVE_EXSLT
+#if YAZ_HAVE_EXSLT
                 if (conv_xslt(p, ptr))
                     return -1;
 #else
                 if (conv_xslt(p, ptr))
                     return -1;
 #else
@@ -425,7 +425,7 @@ int yaz_record_conv_record(yaz_record_conv_t p,
             }
             yaz_marc_destroy(mt);
         }
             }
             yaz_marc_destroy(mt);
         }
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
         else if (r->which == YAZ_RECORD_CONV_RULE_XSLT)
         {
             xmlDocPtr doc = xmlParseMemory(wrbuf_buf(record),
         else if (r->which == YAZ_RECORD_CONV_RULE_XSLT)
         {
             xmlDocPtr doc = xmlParseMemory(wrbuf_buf(record),
@@ -443,7 +443,7 @@ int yaz_record_conv_record(yaz_record_conv_t p,
                     xmlChar *out_buf = 0;
                     int out_len;
 
                     xmlChar *out_buf = 0;
                     int out_len;
 
-#if HAVE_XSLTSAVERESULTTOSTRING
+#if YAZ_HAVE_XSLTSAVERESULTTOSTRING
                     xsltSaveResultToString(&out_buf, &out_len, res,
                                            r->u.xslt.xsp); 
 #else
                     xsltSaveResultToString(&out_buf, &out_len, res,
                                            r->u.xslt.xsp); 
 #else
index d902642..12cf9d8 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 2005-2006, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 2005-2006, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: retrieval.c,v 1.10 2006-05-09 13:39:47 adam Exp $
+ * $Id: retrieval.c,v 1.11 2006-07-06 10:17:53 adam Exp $
  */
 /**
  * \file retrieval.c
  */
 /**
  * \file retrieval.c
@@ -21,7 +21,7 @@
 #include <yaz/tpath.h>
 #include <yaz/proto.h>
 
 #include <yaz/tpath.h>
 #include <yaz/proto.h>
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxml/xinclude.h>
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxml/xinclude.h>
index 768e22a..3b2614c 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: seshigh.c,v 1.87 2006-06-20 21:20:51 adam Exp $
+ * $Id: seshigh.c,v 1.88 2006-07-06 10:17:53 adam Exp $
  */
 /**
  * \file seshigh.c
  */
 /**
  * \file seshigh.c
@@ -50,7 +50,7 @@
 #include <unistd.h>
 #endif
 
 #include <unistd.h>
 #endif
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #endif
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #endif
@@ -577,7 +577,7 @@ static void set_esn(Z_RecordComposition **comp_p, const char *esn, NMEM nmem)
 
 static int retrieve_fetch(association *assoc, bend_fetch_rr *rr)
 {
 
 static int retrieve_fetch(association *assoc, bend_fetch_rr *rr)
 {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     yaz_record_conv_t rc = 0;
     const char *match_schema = 0;
     int *match_syntax = 0;
     yaz_record_conv_t rc = 0;
     const char *match_schema = 0;
     int *match_syntax = 0;
@@ -1141,7 +1141,7 @@ static void srw_bend_search(association *assoc, request *req,
 
 static char *srw_bend_explain_default(void *handle, bend_explain_rr *rr)
 {
 
 static char *srw_bend_explain_default(void *handle, bend_explain_rr *rr)
 {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     xmlNodePtr ptr = rr->server_node_ptr;
     if (!ptr)
         return 0;
     xmlNodePtr ptr = rr->server_node_ptr;
     if (!ptr)
         return 0;
@@ -1791,7 +1791,7 @@ static void process_http_request(association *assoc, request *req)
         if (http_code == 200 || http_code == 500)
         {
             static Z_SOAP_Handler soap_handlers[4] = {
         if (http_code == 200 || http_code == 500)
         {
             static Z_SOAP_Handler soap_handlers[4] = {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
                 {"http://www.loc.gov/zing/srw/", 0,
                  (Z_SOAP_fun) yaz_srw_codec},
                 {"http://www.loc.gov/zing/srw/v1.0/", 0,
                 {"http://www.loc.gov/zing/srw/", 0,
                  (Z_SOAP_fun) yaz_srw_codec},
                 {"http://www.loc.gov/zing/srw/v1.0/", 0,
@@ -2288,7 +2288,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb)
                 assoc->init->implementation_name,
                 odr_prepend(assoc->encode, "GFS", resp->implementationName));
 
                 assoc->init->implementation_name,
                 odr_prepend(assoc->encode, "GFS", resp->implementationName));
 
-    version = odr_strdup(assoc->encode, "$Revision: 1.87 $");
+    version = odr_strdup(assoc->encode, "$Revision: 1.88 $");
     if (strlen(version) > 10)   /* check for unexpanded CVS strings */
         version[strlen(version)-2] = '\0';
     resp->implementationVersion = odr_prepend(assoc->encode,
     if (strlen(version) > 10)   /* check for unexpanded CVS strings */
         version[strlen(version)-2] = '\0';
     resp->implementationVersion = odr_prepend(assoc->encode,
index 45e86cb..5bfa8b3 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: soap.c,v 1.13 2006-03-01 23:24:25 adam Exp $
+ * $Id: soap.c,v 1.14 2006-07-06 10:17:54 adam Exp $
  */
 /**
  * \file soap.c
  */
 /**
  * \file soap.c
@@ -14,7 +14,7 @@
 
 #include <yaz/soap.h>
 
 
 #include <yaz/soap.h>
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
index 958a85b..aaadd43 100644 (file)
--- a/src/srw.c
+++ b/src/srw.c
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: srw.c,v 1.45 2006-05-07 14:31:30 adam Exp $
+ * $Id: srw.c,v 1.46 2006-07-06 10:17:54 adam Exp $
  */
 /**
  * \file srw.c
  */
 /**
  * \file srw.c
@@ -10,7 +10,7 @@
  */
 
 #include <yaz/srw.h>
  */
 
 #include <yaz/srw.h>
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
index 841b571..9e698c6 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: srwutil.c,v 1.44 2006-06-14 05:47:10 adam Exp $
+ * $Id: srwutil.c,v 1.45 2006-07-06 10:17:54 adam Exp $
  */
 /**
  * \file srwutil.c
  */
 /**
  * \file srwutil.c
@@ -333,7 +333,7 @@ int yaz_srw_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
             const char *charset_p = 0;
             
             static Z_SOAP_Handler soap_handlers[4] = {
             const char *charset_p = 0;
             
             static Z_SOAP_Handler soap_handlers[4] = {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
                 {"http://www.loc.gov/zing/srw/", 0,
                  (Z_SOAP_fun) yaz_srw_codec},
                 {"http://www.loc.gov/zing/srw/v1.0/", 0,
                 {"http://www.loc.gov/zing/srw/", 0,
                  (Z_SOAP_fun) yaz_srw_codec},
                 {"http://www.loc.gov/zing/srw/v1.0/", 0,
@@ -422,7 +422,7 @@ int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
                    Z_SOAP **soap_package, ODR decode, char **charset,
                    Z_SRW_diagnostic **diag, int *num_diag)
 {
                    Z_SOAP **soap_package, ODR decode, char **charset,
                    Z_SRW_diagnostic **diag, int *num_diag)
 {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     static Z_SOAP_Handler soap_handlers[2] = {
         {"http://www.loc.gov/zing/srw/", 0,
          (Z_SOAP_fun) yaz_srw_codec},
     static Z_SOAP_Handler soap_handlers[2] = {
         {"http://www.loc.gov/zing/srw/", 0,
          (Z_SOAP_fun) yaz_srw_codec},
@@ -447,7 +447,7 @@ int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
     {
         char *db = "Default";
         const char *p0 = hreq->path, *p1;
     {
         char *db = "Default";
         const char *p0 = hreq->path, *p1;
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
         const char *operation = 0;
         char *version = 0;
         char *query = 0;
         const char *operation = 0;
         char *version = 0;
         char *query = 0;
@@ -486,7 +486,7 @@ int yaz_sru_decode(Z_HTTP_Request *hreq, Z_SRW_PDU **srw_pdu,
         if (!strcmp(hreq->method, "POST"))
             p1 = hreq->content_buf;
         yaz_uri_array(p1, decode, &uri_name, &uri_val);
         if (!strcmp(hreq->method, "POST"))
             p1 = hreq->content_buf;
         yaz_uri_array(p1, decode, &uri_name, &uri_val);
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
         if (uri_name)
         {
             int i;
         if (uri_name)
         {
             int i;
@@ -1207,7 +1207,7 @@ int yaz_sru_soap_encode(Z_HTTP_Request *hreq, Z_SRW_PDU *srw_pdu,
                         ODR odr, const char *charset)
 {
     Z_SOAP_Handler handlers[2] = {
                         ODR odr, const char *charset)
 {
     Z_SOAP_Handler handlers[2] = {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
         {"http://www.loc.gov/zing/srw/", 0, (Z_SOAP_fun) yaz_srw_codec},
 #endif
         {0, 0, 0}
         {"http://www.loc.gov/zing/srw/", 0, (Z_SOAP_fun) yaz_srw_codec},
 #endif
         {0, 0, 0}
index 1735314..ccd0007 100644 (file)
@@ -5,7 +5,7 @@
  * NT threaded server code by
  *   Chas Woodfield, Fretwell Downing Informatics.
  *
  * NT threaded server code by
  *   Chas Woodfield, Fretwell Downing Informatics.
  *
- * $Id: statserv.c,v 1.38 2006-05-08 10:16:47 adam Exp $
+ * $Id: statserv.c,v 1.39 2006-07-06 10:17:54 adam Exp $
  */
 
 /**
  */
 
 /**
@@ -36,7 +36,7 @@
 #include <pwd.h>
 #endif
 
 #include <pwd.h>
 #endif
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxml/xinclude.h>
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxml/xinclude.h>
@@ -144,11 +144,11 @@ static void get_logbits(int force)
 
 static int add_listener(char *where, int listen_id);
 
 
 static int add_listener(char *where, int listen_id);
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 static xmlDocPtr xml_config_doc = 0;
 #endif
 
 static xmlDocPtr xml_config_doc = 0;
 #endif
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 static xmlNodePtr xml_config_get_root()
 {
     xmlNodePtr ptr = 0;
 static xmlNodePtr xml_config_get_root()
 {
     xmlNodePtr ptr = 0;
@@ -168,7 +168,7 @@ static xmlNodePtr xml_config_get_root()
 }
 #endif
 
 }
 #endif
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 static char *nmem_dup_xml_content(NMEM n, xmlNodePtr ptr)
 {
     unsigned char *cp;
 static char *nmem_dup_xml_content(NMEM n, xmlNodePtr ptr)
 {
     unsigned char *cp;
@@ -222,7 +222,7 @@ static struct gfs_server * gfs_server_new()
     n->directory = 0;
     n->docpath = 0;
     n->stylesheet = 0;
     n->directory = 0;
     n->docpath = 0;
     n->stylesheet = 0;
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     n->retrieval = yaz_retrieval_create();
 #endif
     return n;
     n->retrieval = yaz_retrieval_create();
 #endif
     return n;
@@ -322,7 +322,7 @@ static void xml_config_read()
 {
     struct gfs_server **gfsp = &gfs_server_list;
     struct gfs_listen **gfslp = &gfs_listen_list;
 {
     struct gfs_server **gfsp = &gfs_server_list;
     struct gfs_listen **gfslp = &gfs_listen_list;
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     xmlNodePtr ptr = xml_config_get_root();
 
     if (!ptr)
     xmlNodePtr ptr = xml_config_get_root();
 
     if (!ptr)
@@ -467,7 +467,7 @@ static void xml_config_open()
 #endif
     
     gfs_nmem = nmem_create();
 #endif
     
     gfs_nmem = nmem_create();
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     if (control_block.xml_config[0] == '\0')
         return;
 
     if (control_block.xml_config[0] == '\0')
         return;
 
@@ -496,7 +496,7 @@ static void xml_config_open()
 
 static void xml_config_close()
 {
 
 static void xml_config_close()
 {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     if (xml_config_doc)
     {
         xmlFreeDoc(xml_config_doc);
     if (xml_config_doc)
     {
         xmlFreeDoc(xml_config_doc);
@@ -1440,7 +1440,7 @@ int check_options(int argc, char **argv)
             option_copy(control_block.pid_fname, arg);
             break;
         case 'f':
             option_copy(control_block.pid_fname, arg);
             break;
         case 'f':
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
             option_copy(control_block.xml_config, arg);
 #else
             fprintf(stderr, "%s: Option -f unsupported since YAZ is compiled without Libxml2 support\n", me);
             option_copy(control_block.xml_config, arg);
 #else
             fprintf(stderr, "%s: Option -f unsupported since YAZ is compiled without Libxml2 support\n", me);
index 2323509..62ebd7f 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2006, Index Data ApS
  * All rights reserved.
  *
  * Copyright (C) 1995-2006, Index Data ApS
  * All rights reserved.
  *
- * $Id: xmlquery.c,v 1.9 2006-05-02 20:47:45 adam Exp $
+ * $Id: xmlquery.c,v 1.10 2006-07-06 10:17:54 adam Exp $
  */
 
 /** \file xmlquery.c
  */
 
 /** \file xmlquery.c
@@ -13,7 +13,7 @@
 #include <string.h>
 #include <assert.h>
 
 #include <string.h>
 #include <assert.h>
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
@@ -248,18 +248,17 @@ xmlNodePtr yaz_query2xml_cql(const char *cql, xmlNodePtr node)
     return 0;
 }
 
     return 0;
 }
 
-void yaz_rpnquery2xml(const Z_RPNQuery *rpn, void *docp_void)
+void yaz_rpnquery2xml(const Z_RPNQuery *rpn, xmlDocPtr *docp)
 {
     Z_Query query;
 
     query.which = Z_Query_type_1;
     query.u.type_1 = (Z_RPNQuery *) rpn;
 {
     Z_Query query;
 
     query.which = Z_Query_type_1;
     query.u.type_1 = (Z_RPNQuery *) rpn;
-    yaz_query2xml(&query, docp_void);
+    yaz_query2xml(&query, docp);
 }
 
 }
 
-void yaz_query2xml(const Z_Query *q, void *docp_void)
+void yaz_query2xml(const Z_Query *q, xmlDocPtr *docp)
 {
 {
-    xmlDocPtr *docp = (xmlDocPtr *) docp_void;
     xmlNodePtr top_node, q_node = 0, child_node = 0;
 
     assert(q);
     xmlNodePtr top_node, q_node = 0, child_node = 0;
 
     assert(q);
@@ -777,7 +776,7 @@ void yaz_xml2query(const void *xmlnodep, Z_Query **query, ODR odr,
     yaz_xml2query_(xmlnodep, query, odr, error_code, addinfo);
 }
 
     yaz_xml2query_(xmlnodep, query, odr, error_code, addinfo);
 }
 
-/* HAVE_XML2 */
+/* YAZ_HAVE_XML2 */
 #endif
 
 /*
 #endif
 
 /*
index 82044fa..0ff631d 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: zoom-c.c,v 1.80 2006-06-16 12:34:32 adam Exp $
+ * $Id: zoom-c.c,v 1.81 2006-07-06 10:17:54 adam Exp $
  */
 /**
  * \file zoom-c.c
  */
 /**
  * \file zoom-c.c
@@ -152,7 +152,7 @@ static void set_dset_error (ZOOM_connection c, int error,
                 addinfo2 ? addinfo2 : "");
 }
 
                 addinfo2 ? addinfo2 : "");
 }
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 static void set_HTTP_error (ZOOM_connection c, int error,
                             const char *addinfo, const char *addinfo2)
 {
 static void set_HTTP_error (ZOOM_connection c, int error,
                             const char *addinfo, const char *addinfo2)
 {
@@ -1008,7 +1008,7 @@ static zoom_ret do_connect (ZOOM_connection c)
 
     if (c->cs && c->cs->protocol == PROTO_HTTP)
     {
 
     if (c->cs && c->cs->protocol == PROTO_HTTP)
     {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
         const char *path = 0;
 
         c->proto = PROTO_HTTP;
         const char *path = 0;
 
         c->proto = PROTO_HTTP;
@@ -1196,7 +1196,7 @@ static zoom_ret ZOOM_connection_send_init (ZOOM_connection c)
         ZOOM_options_get(c->options, "implementationName"),
         odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName));
 
         ZOOM_options_get(c->options, "implementationName"),
         odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName));
 
-    version = odr_strdup(c->odr_out, "$Revision: 1.80 $");
+    version = odr_strdup(c->odr_out, "$Revision: 1.81 $");
     if (strlen(version) > 10)   /* check for unexpanded CVS strings */
         version[strlen(version)-2] = '\0';
     ireq->implementationVersion = odr_prepend(c->odr_out,
     if (strlen(version) > 10)   /* check for unexpanded CVS strings */
         version[strlen(version)-2] = '\0';
     ireq->implementationVersion = odr_prepend(c->odr_out,
@@ -1274,7 +1274,7 @@ static zoom_ret ZOOM_connection_send_init (ZOOM_connection c)
     return send_APDU (c, apdu);
 }
 
     return send_APDU (c, apdu);
 }
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 static zoom_ret send_srw (ZOOM_connection c, Z_SRW_PDU *sr)
 {
     Z_GDU *gdu;
 static zoom_ret send_srw (ZOOM_connection c, Z_SRW_PDU *sr)
 {
     Z_GDU *gdu;
@@ -1305,7 +1305,7 @@ static zoom_ret send_srw (ZOOM_connection c, Z_SRW_PDU *sr)
 }
 #endif
 
 }
 #endif
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 static zoom_ret ZOOM_connection_srw_send_search(ZOOM_connection c)
 {
     int i;
 static zoom_ret ZOOM_connection_srw_send_search(ZOOM_connection c)
 {
     int i;
@@ -3406,7 +3406,7 @@ static void recv_apdu (ZOOM_connection c, Z_APDU *apdu)
     }
 }
 
     }
 }
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 static void handle_srw_response(ZOOM_connection c,
                                 Z_SRW_searchRetrieveResponse *res)
 {
 static void handle_srw_response(ZOOM_connection c,
                                 Z_SRW_searchRetrieveResponse *res)
 {
@@ -3485,7 +3485,7 @@ static void handle_srw_response(ZOOM_connection c,
 }
 #endif
 
 }
 #endif
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 static void handle_http(ZOOM_connection c, Z_HTTP_Response *hres)
 {
     int ret = -1;
 static void handle_http(ZOOM_connection c, Z_HTTP_Response *hres)
 {
     int ret = -1;
@@ -3605,7 +3605,7 @@ static int do_read (ZOOM_connection c)
             recv_apdu (c, gdu->u.z3950);
         else if (gdu->which == Z_GDU_HTTP_Response)
         {
             recv_apdu (c, gdu->u.z3950);
         else if (gdu->which == Z_GDU_HTTP_Response)
         {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
             handle_http (c, gdu->u.HTTP_Response);
 #else
             set_ZOOM_error(c, ZOOM_ERROR_DECODE, 0);
             handle_http (c, gdu->u.HTTP_Response);
 #else
             set_ZOOM_error(c, ZOOM_ERROR_DECODE, 0);
index 04c26ee..106c78d 100644 (file)
@@ -1,7 +1,7 @@
 /*  Copyright (C) 2006, Index Data ApS
  *  See the file LICENSE for details.
  *
 /*  Copyright (C) 2006, Index Data ApS
  *  See the file LICENSE for details.
  *
- *  $Id: nfaxmltest1.c,v 1.1 2006-07-05 08:12:48 heikki Exp $
+ *  $Id: nfaxmltest1.c,v 1.2 2006-07-06 10:17:55 adam Exp $
  *
  */
 
  *
  */
 
@@ -13,7 +13,7 @@
 #include <yaz/test.h>
 #include <yaz/nfaxml.h>
 
 #include <yaz/test.h>
 #include <yaz/nfaxml.h>
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 
 
 #include <libxml/parser.h>
 
 
index 7846373..358b73d 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 2005-2006, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 2005-2006, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: tst_record_conv.c,v 1.8 2006-05-08 10:16:47 adam Exp $
+ * $Id: tst_record_conv.c,v 1.9 2006-07-06 10:17:55 adam Exp $
  *
  */
 #include <yaz/record_conv.h>
  *
  */
 #include <yaz/record_conv.h>
@@ -16,7 +16,7 @@
 #include <config.h>
 #endif
 
 #include <config.h>
 #endif
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
 #include <libxml/parser.h>
 #include <libxml/tree.h>
@@ -113,7 +113,7 @@ static void tst_configure()
     YAZ_CHECK(conv_configure_test("<convert><bad/></convert>",
                                   "Bad element 'bad'."
                                   "Expected marc, xslt, ..", 0));
     YAZ_CHECK(conv_configure_test("<convert><bad/></convert>",
                                   "Bad element 'bad'."
                                   "Expected marc, xslt, ..", 0));
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
     YAZ_CHECK(conv_configure_test("<convert>"
                                   "<xslt stylesheet=\"tst_record_conv.xsl\"/>"
                                   "<marc"
     YAZ_CHECK(conv_configure_test("<convert>"
                                   "<xslt stylesheet=\"tst_record_conv.xsl\"/>"
                                   "<marc"
@@ -295,10 +295,10 @@ int main(int argc, char **argv)
 {
     YAZ_CHECK_INIT(argc, argv);
     libxml2_error_to_yazlog(0 /* disable log */, 0);
 {
     YAZ_CHECK_INIT(argc, argv);
     libxml2_error_to_yazlog(0 /* disable log */, 0);
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     tst_configure();
 #endif
     tst_configure();
 #endif
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
     tst_convert();
 #endif
     YAZ_CHECK_TERM;
     tst_convert();
 #endif
     YAZ_CHECK_TERM;
index 32e9782..66c9477 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 2005-2006, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 2005-2006, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: tst_retrieval.c,v 1.5 2006-05-09 13:39:47 adam Exp $
+ * $Id: tst_retrieval.c,v 1.6 2006-07-06 10:17:55 adam Exp $
  *
  */
 #include <yaz/retrieval.h>
  *
  */
 #include <yaz/retrieval.h>
@@ -16,7 +16,7 @@
 #include <config.h>
 #endif
 
 #include <config.h>
 #endif
 
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
 
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
 #include <libxml/parser.h>
 #include <libxml/tree.h>
@@ -233,7 +233,7 @@ int main(int argc, char **argv)
 
     libxml2_error_to_yazlog(0 /* disable it */, "");
 
 
     libxml2_error_to_yazlog(0 /* disable it */, "");
 
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
     tst_configure();
 #endif
     YAZ_CHECK_TERM;
     tst_configure();
 #endif
     YAZ_CHECK_TERM;
index 7da6967..2290e83 100644 (file)
@@ -2,18 +2,18 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: tstsoap1.c,v 1.6 2006-01-30 16:58:06 adam Exp $
+ * $Id: tstsoap1.c,v 1.7 2006-07-06 10:17:55 adam Exp $
  */
 
 #include <stdlib.h>
  */
 
 #include <stdlib.h>
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 #endif
 #include <yaz/test.h>
 
 void tst()
 {
 #include <libxml/parser.h>
 #endif
 #include <yaz/test.h>
 
 void tst()
 {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     xmlChar *buf_out;
     int len_out;
     xmlDocPtr doc;
     xmlChar *buf_out;
     int len_out;
     xmlDocPtr doc;
@@ -38,14 +38,14 @@ void tst()
 #endif
 
 
 #endif
 
 
-/* HAVE_XML2 */
+/* YAZ_HAVE_XML2 */
 #endif
 }
 
 int main(int argc, char **argv)
 {
     YAZ_CHECK_INIT(argc, argv);
 #endif
 }
 
 int main(int argc, char **argv)
 {
     YAZ_CHECK_INIT(argc, argv);
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     LIBXML_TEST_VERSION;
 #endif
     tst();
     LIBXML_TEST_VERSION;
 #endif
     tst();
index 8884920..6bf0181 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: tstsoap2.c,v 1.4 2006-02-01 19:53:00 adam Exp $
+ * $Id: tstsoap2.c,v 1.5 2006-07-06 10:17:55 adam Exp $
  */
 
 #include <stdlib.h>
  */
 
 #include <stdlib.h>
@@ -10,7 +10,7 @@
 #include <yaz/srw.h>
 #include <yaz/soap.h>
 
 #include <yaz/srw.h>
 #include <yaz/soap.h>
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 
 static void tst_srw(void)
 #include <libxml/parser.h>
 
 static void tst_srw(void)
@@ -52,7 +52,7 @@ static void tst_srw(void)
 int main(int argc, char **argv)
 {
     YAZ_CHECK_INIT(argc, argv);
 int main(int argc, char **argv)
 {
     YAZ_CHECK_INIT(argc, argv);
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     LIBXML_TEST_VERSION;
     tst_srw();
 #endif
     LIBXML_TEST_VERSION;
     tst_srw();
 #endif
index aea6177..8f0e13b 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: tstxmlquery.c,v 1.10 2006-02-23 11:17:25 adam Exp $
+ * $Id: tstxmlquery.c,v 1.11 2006-07-06 10:17:55 adam Exp $
  */
 
 #include <stdlib.h>
  */
 
 #include <stdlib.h>
@@ -14,7 +14,7 @@
 #include <yaz/pquery.h>
 #include <yaz/test.h>
 
 #include <yaz/pquery.h>
 #include <yaz/test.h>
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #endif
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #endif
@@ -47,7 +47,7 @@ enum pqf2xml_status pqf2xml_text(const char *pqf, const char *expect_xml,
         status = PQF_FAILED;
     else
     {
         status = PQF_FAILED;
     else
     {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
         xmlDocPtr doc = 0;
 
         yaz_rpnquery2xml(rpn, &doc);
         xmlDocPtr doc = 0;
 
         yaz_rpnquery2xml(rpn, &doc);
@@ -107,7 +107,7 @@ enum pqf2xml_status pqf2xml_text(const char *pqf, const char *expect_xml,
 static void tst()
 {
     YAZ_CHECK_EQ(pqf2xml_text("@attr 1=4 bad query", "", 0), PQF_FAILED);
 static void tst()
 {
     YAZ_CHECK_EQ(pqf2xml_text("@attr 1=4 bad query", "", 0), PQF_FAILED);
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     YAZ_CHECK_EQ(pqf2xml_text(
                      "@attr 1=4 computer", 
                      "<?xml version=\"1.0\"?>\n"
     YAZ_CHECK_EQ(pqf2xml_text(
                      "@attr 1=4 computer", 
                      "<?xml version=\"1.0\"?>\n"
index f5087e4..3b6163c 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2006, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2006, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: marcdump.c,v 1.39 2006-06-12 16:12:58 mike Exp $
+ * $Id: marcdump.c,v 1.40 2006-07-06 10:17:55 adam Exp $
  */
 
 #define _FILE_OFFSET_BITS 64
  */
 
 #define _FILE_OFFSET_BITS 64
@@ -11,7 +11,7 @@
 #include <config.h>
 #endif
 
 #include <config.h>
 #endif
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
@@ -54,7 +54,7 @@ static void usage(const char *prog)
              prog);
 } 
 
              prog);
 } 
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 static void marcdump_read_xml(yaz_marc_t mt, const char *fname)
 {
     xmlNodePtr ptr;
 static void marcdump_read_xml(yaz_marc_t mt, const char *fname)
 {
     xmlNodePtr ptr;
@@ -105,7 +105,7 @@ static void dump(const char *fname, const char *from, const char *to,
 
     if (read_xml)
     {
 
     if (read_xml)
     {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
         marcdump_read_xml(mt, fname);
 #else
         return;
         marcdump_read_xml(mt, fname);
 #else
         return;
@@ -285,7 +285,7 @@ int main (int argc, char **argv)
             cfile = fopen(arg, "w");
             break;
         case 'x':
             cfile = fopen(arg, "w");
             break;
         case 'x':
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
             read_xml = 1;
 #else
             fprintf(stderr, "%s: -x not supported."
             read_xml = 1;
 #else
             fprintf(stderr, "%s: -x not supported."
index 1524abc..35e60b4 100644 (file)
@@ -2,13 +2,13 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: srwtst.c,v 1.4 2005-06-25 15:46:07 adam Exp $
+ * $Id: srwtst.c,v 1.5 2006-07-06 10:17:55 adam Exp $
  */
 
 #include <stdlib.h>
 #include <yaz/srw.h>
 
  */
 
 #include <stdlib.h>
 #include <yaz/srw.h>
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 Z_SOAP_Handler h[2] = {
     {"http://www.loc.gov/zing/srw/v1.0/", 0, (Z_SOAP_fun) yaz_srw_codec},
     {0, 0, 0}
 Z_SOAP_Handler h[2] = {
     {"http://www.loc.gov/zing/srw/v1.0/", 0, (Z_SOAP_fun) yaz_srw_codec},
     {0, 0, 0}
index 12a9c47..b2dc588 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
  * Copyright (C) 1995-2005, Index Data ApS
  * See the file LICENSE for details.
  *
- * $Id: yaz-xmlquery.c,v 1.2 2006-03-06 08:11:41 adam Exp $
+ * $Id: yaz-xmlquery.c,v 1.3 2006-07-06 10:17:55 adam Exp $
  */
 
 #include <stdlib.h>
  */
 
 #include <stdlib.h>
 #include <yaz/pquery.h>
 #include <yaz/test.h>
 
 #include <yaz/pquery.h>
 #include <yaz/test.h>
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 #include <libxml/parser.h>
 #endif
 
 static char *prog = "yaz-xmlquery";
 
 #include <libxml/parser.h>
 #endif
 
 static char *prog = "yaz-xmlquery";
 
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
 void pqftoxmlquery(const char *pqf)
 {
     YAZ_PQF_Parser parser = yaz_pqf_create();
 void pqftoxmlquery(const char *pqf)
 {
     YAZ_PQF_Parser parser = yaz_pqf_create();
@@ -163,7 +163,7 @@ void usage()
 
 int main (int argc, char **argv)
 {
 
 int main (int argc, char **argv)
 {
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
     char *arg;
     int r;
     int active = 0;
     char *arg;
     int r;
     int active = 0;
index 4ad9634..879a6c2 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright (C) 1994-2006, Index Data ApS
 # All rights reserved.
 # Copyright (C) 1994-2006, Index Data ApS
 # All rights reserved.
-# $Id: makefile,v 1.112 2006-07-05 13:05:32 adam Exp $
+# $Id: makefile,v 1.113 2006-07-06 10:17:56 adam Exp $
 #
 # Programmed by
 #  Heikki Levanto & Adam Dickmeiss
 #
 # Programmed by
 #  Heikki Levanto & Adam Dickmeiss
@@ -151,7 +151,7 @@ iconv:
 
 !if $(HAVE_LIBXML2)
 LIBXML2_LIB="$(LIBXML2_DIR)\lib\libxml2.lib"
 
 !if $(HAVE_LIBXML2)
 LIBXML2_LIB="$(LIBXML2_DIR)\lib\libxml2.lib"
-LIBXML2_DEF=/D HAVE_XML2=1 /I"$(LIBXML2_DIR)\include"
+LIBXML2_DEF=/D YAZ_HAVE_XML2=1 /I"$(LIBXML2_DIR)\include"
 libxml2: $(BINDIR)\libxml2.dll $(BINDIR)\zlib1.dll
 
 $(BINDIR)\libxml2.dll:
 libxml2: $(BINDIR)\libxml2.dll $(BINDIR)\zlib1.dll
 
 $(BINDIR)\libxml2.dll:
@@ -162,7 +162,7 @@ $(BINDIR)\zlib1.dll:
 
 !else
 LIBXML2_LIB=
 
 !else
 LIBXML2_LIB=
-LIBXML2_DEF=/D HAVE_XML2=0
+LIBXML2_DEF=/D YAZ_HAVE_XML2=0
 libxml2: 
 
 !endif
 libxml2: 
 
 !endif
@@ -171,7 +171,7 @@ libxml2:
 LIBXSLT_LIB="$(LIBXSLT_DIR)\lib\libxslt.lib"
 LIBXSLT_DEF= \
        /D HAVE_XSLTSAVERESULTTOSTRING=1 \
 LIBXSLT_LIB="$(LIBXSLT_DIR)\lib\libxslt.lib"
 LIBXSLT_DEF= \
        /D HAVE_XSLTSAVERESULTTOSTRING=1 \
-       /D HAVE_XSLT=1 \
+       /D YAZ_HAVE_XSLT=1 \
        /I"$(LIBXSLT_DIR)\include"
 libxslt: $(BINDIR)\libxslt.dll
 
        /I"$(LIBXSLT_DIR)\include"
 libxslt: $(BINDIR)\libxslt.dll
 
@@ -180,7 +180,7 @@ $(BINDIR)\libxslt.dll:
 
 !else
 LIBXSLT_LIB=
 
 !else
 LIBXSLT_LIB=
-LIBXSLT_DEF=/D HAVE_XSLT=0
+LIBXSLT_DEF=/D YAZ_HAVE_XSLT=0
 libxslt: 
 !endif
 
 libxslt: 
 !endif
 
index d2325ab..e4d99da 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
 #!/bin/sh
-# $Id: yaz-config.in,v 1.24 2006-06-13 15:36:09 adam Exp $
+# $Id: yaz-config.in,v 1.25 2006-07-06 10:17:51 adam Exp $
 yazprefix=@prefix@
 yaz_echo_cflags=no
 yaz_echo_libs=no
 yazprefix=@prefix@
 yaz_echo_cflags=no
 yaz_echo_libs=no
@@ -75,11 +75,13 @@ done
 
 lyaz="-lyaz"
 
 
 lyaz="-lyaz"
 
+YAZINC="@YAZ_CONFIG_CFLAGS@"
+
 if test "$yaz_echo_source" = "yes"; then
     YAZBIN=${yaz_build_root}/bin
     YAZLIB="-L${yaz_build_root}/src/.libs $lyaz $yazextralibs"
     YAZLALIB="${yaz_build_root}/src/libyaz.la $yazextralibs"
 if test "$yaz_echo_source" = "yes"; then
     YAZBIN=${yaz_build_root}/bin
     YAZLIB="-L${yaz_build_root}/src/.libs $lyaz $yazextralibs"
     YAZLALIB="${yaz_build_root}/src/libyaz.la $yazextralibs"
-    YAZINC="-I${yaz_src_root}/include"
+    YAZINC="$YAZINC -I${yaz_src_root}/include"
     YAZCOMP=${yaz_src_root}/util/yaz-asncomp
 else
     YAZBIN=${yazprefix}/bin
     YAZCOMP=${yaz_src_root}/util/yaz-asncomp
 else
     YAZBIN=${yazprefix}/bin
@@ -91,15 +93,11 @@ else
        YAZLIB="-L$yazprefix/lib $lyaz $yazextralibs"
     fi
     YAZLALIB=$YAZLIB
        YAZLIB="-L$yazprefix/lib $lyaz $yazextralibs"
     fi
     YAZLALIB=$YAZLIB
-    if test "$yazprefix" = "/usr"; then
-       YAZINC=
-    else
-       YAZINC=-I$yazprefix/include
+    if test "$yazprefix" != "/usr"; then
+       YAZINC="$YAZINC -I$yazprefix/include"
     fi
 fi
 
     fi
 fi
 
-YAZINC="$YAZINC @YAZ_CONF_CFLAGS@"
-
 if test "$lib_thread" = "yes"; then
     YAZINC="$YAZINC @THREAD_CFLAGS@"
 fi
 if test "$lib_thread" = "yes"; then
     YAZINC="$YAZINC @THREAD_CFLAGS@"
 fi