#!/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
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
* 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
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
printf ("Couldn't create comstack\n");
return 0;
}
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
if (conn->protocol == PROTO_HTTP)
queryType = QueryType_CQL;
#else
return 2;
}
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
static int send_srw(Z_SRW_PDU *sr)
{
const char *charset = negotiationCharset;
}
#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";
{
if (protocol != PROTO_HTTP)
return 0;
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
if (!conn)
cmd_open(0);
if (conn)
}
if (protocol == PROTO_HTTP)
{
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
if (!conn)
cmd_open(0);
if (!conn)
return 2;
}
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
static int send_SRW_presentRequest(const char *arg)
{
char setstring[100];
{
if (protocol == PROTO_HTTP)
{
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
if (!conn)
cmd_open(0);
if (!conn)
{
if (protocol == PROTO_HTTP)
{
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
if (!conn)
cmd_open(0);
if (!conn)
struct timeval tv_start;
#endif
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
static void handle_srw_record(Z_SRW_record *rec)
{
if (rec->recordPosition)
close_session ();
}
}
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
else if (gdu->which == Z_GDU_HTTP_Response)
{
http_response(gdu->u.HTTP_Response);
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)
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"
* 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
#ifndef YAZ_XMLQUERY_H
#define YAZ_XMLQUERY_H
+#if YAZ_HAVE_XML2
#include <yaz/yconfig.h>
#include <yaz/proto.h>
+#include <libxml/parser.h>
+
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_END_CDECL
#endif
+#endif
+
/*
* Local variables:
* c-basic-offset: 4
* 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
#include <yaz/log.h>
#include <yaz/libxml2_error.h>
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#include <libxml/xmlerror.h>
#endif
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
#include <libxslt/xsltutils.h>
#endif
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
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
xmlSetGenericErrorFunc((void *) "XML", proxy_xml_error_handler);
return 0;
#else
* 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 $
*/
/**
#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
}
}
-#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)
{
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)
{
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)
/* 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 $
*/
/**
*
*/
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#include <string.h>
-#endif /* HAVE_XML2 */
+#endif /* YAZ_HAVE_XML2 */
/*
* 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 $
*/
/**
#include <string.h>
#include <yaz/nmem.h>
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#include <libxml/tree.h>
#endif
}
}
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
char *nmem_text_node_cdata(const void *ptr_cdata, NMEM nmem)
{
char *cdata;
* 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
#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>
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
#include <libxslt/xsltutils.h>
#include <libxslt/transform.h>
#endif
-#if HAVE_EXSLT
+#if YAZ_HAVE_EXSLT
#include <libexslt/exslt.h>
#endif
struct yaz_record_conv_rule {
enum YAZ_RECORD_CONV_RULE which;
union {
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
struct {
xsltStylesheetPtr xsp;
} xslt;
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);
p->rules = 0;
p->path = 0;
-#if HAVE_EXSLT
+#if YAZ_HAVE_EXSLT
exsltRegisterAll();
#endif
yaz_record_conv_reset(p);
/** \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;
}
else if (!strcmp((const char *) ptr->name, "exslt"))
{
-#if HAVE_EXSLT
+#if YAZ_HAVE_EXSLT
if (conv_xslt(p, ptr))
return -1;
#else
}
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),
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
* 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
#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>
* 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
#include <unistd.h>
#endif
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#include <libxml/tree.h>
#endif
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;
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;
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,
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,
* 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
#include <yaz/soap.h>
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#include <libxml/tree.h>
* 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
*/
#include <yaz/srw.h>
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#include <libxml/tree.h>
* 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
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,
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},
{
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;
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;
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}
* 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 $
*/
/**
#include <pwd.h>
#endif
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xinclude.h>
static int add_listener(char *where, int listen_id);
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
static xmlDocPtr xml_config_doc = 0;
#endif
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
static xmlNodePtr xml_config_get_root()
{
xmlNodePtr ptr = 0;
}
#endif
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
static char *nmem_dup_xml_content(NMEM n, xmlNodePtr ptr)
{
unsigned char *cp;
n->directory = 0;
n->docpath = 0;
n->stylesheet = 0;
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
n->retrieval = yaz_retrieval_create();
#endif
return n;
{
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)
#endif
gfs_nmem = nmem_create();
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
if (control_block.xml_config[0] == '\0')
return;
static void xml_config_close()
{
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
if (xml_config_doc)
{
xmlFreeDoc(xml_config_doc);
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);
* 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
#include <string.h>
#include <assert.h>
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#include <libxml/tree.h>
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;
- 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);
yaz_xml2query_(xmlnodep, query, odr, error_code, addinfo);
}
-/* HAVE_XML2 */
+/* YAZ_HAVE_XML2 */
#endif
/*
* 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
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)
{
if (c->cs && c->cs->protocol == PROTO_HTTP)
{
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
const char *path = 0;
c->proto = PROTO_HTTP;
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,
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;
}
#endif
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
static zoom_ret ZOOM_connection_srw_send_search(ZOOM_connection c)
{
int i;
}
}
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
static void handle_srw_response(ZOOM_connection c,
Z_SRW_searchRetrieveResponse *res)
{
}
#endif
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
static void handle_http(ZOOM_connection c, Z_HTTP_Response *hres)
{
int ret = -1;
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);
/* 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 $
*
*/
#include <yaz/test.h>
#include <yaz/nfaxml.h>
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#include <libxml/parser.h>
* 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 <config.h>
#endif
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#include <libxml/tree.h>
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_INIT(argc, argv);
libxml2_error_to_yazlog(0 /* disable log */, 0);
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
tst_configure();
#endif
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
tst_convert();
#endif
YAZ_CHECK_TERM;
* 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 <config.h>
#endif
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
#include <libxml/parser.h>
#include <libxml/tree.h>
libxml2_error_to_yazlog(0 /* disable it */, "");
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
tst_configure();
#endif
YAZ_CHECK_TERM;
* 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>
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#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;
#endif
-/* HAVE_XML2 */
+/* YAZ_HAVE_XML2 */
#endif
}
int main(int argc, char **argv)
{
YAZ_CHECK_INIT(argc, argv);
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
LIBXML_TEST_VERSION;
#endif
tst();
* 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 <yaz/srw.h>
#include <yaz/soap.h>
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#include <libxml/parser.h>
static void tst_srw(void)
int main(int argc, char **argv)
{
YAZ_CHECK_INIT(argc, argv);
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
LIBXML_TEST_VERSION;
tst_srw();
#endif
* 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 <yaz/pquery.h>
#include <yaz/test.h>
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#include <libxml/tree.h>
#endif
status = PQF_FAILED;
else
{
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
xmlDocPtr doc = 0;
yaz_rpnquery2xml(rpn, &doc);
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"
* 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
#include <config.h>
#endif
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#include <libxml/parser.h>
#include <libxml/tree.h>
prog);
}
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
static void marcdump_read_xml(yaz_marc_t mt, const char *fname)
{
xmlNodePtr ptr;
if (read_xml)
{
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
marcdump_read_xml(mt, fname);
#else
return;
cfile = fopen(arg, "w");
break;
case 'x':
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
read_xml = 1;
#else
fprintf(stderr, "%s: -x not supported."
* 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>
-#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}
* 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 <yaz/pquery.h>
#include <yaz/test.h>
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
#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();
int main (int argc, char **argv)
{
-#if HAVE_XML2
+#if YAZ_HAVE_XML2
char *arg;
int r;
int active = 0;
# 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
!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:
!else
LIBXML2_LIB=
-LIBXML2_DEF=/D HAVE_XML2=0
+LIBXML2_DEF=/D YAZ_HAVE_XML2=0
libxml2:
!endif
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
!else
LIBXSLT_LIB=
-LIBXSLT_DEF=/D HAVE_XSLT=0
+LIBXSLT_DEF=/D YAZ_HAVE_XSLT=0
libxslt:
!endif
#!/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
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"
- YAZINC="-I${yaz_src_root}/include"
+ YAZINC="$YAZINC -I${yaz_src_root}/include"
YAZCOMP=${yaz_src_root}/util/yaz-asncomp
else
YAZBIN=${yazprefix}/bin
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
-YAZINC="$YAZINC @YAZ_CONF_CFLAGS@"
-
if test "$lib_thread" = "yes"; then
YAZINC="$YAZINC @THREAD_CFLAGS@"
fi