From: Adam Dickmeiss Date: Mon, 17 Feb 2003 22:35:47 +0000 (+0000) Subject: Use libxml2 instead of libxslt(and libxml2) X-Git-Tag: YAZ.2.0~39 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=1f20fcf7c28b057d36b866ce9ba63dee95c27d41;p=yaz-moved-to-github.git Use libxml2 instead of libxslt(and libxml2) --- diff --git a/CHANGELOG b/CHANGELOG index ee5f6d4..e243943 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,8 +2,8 @@ Possible compatibility problems with earlier versions marked with '*'. --- 1.9.3 2003/MM/DD -Support for SRW 1.0. This is an optional feature and requires -libxml and libxslt to operate. Enable it by specifying --with-xslt +Support for SRW 1.0 over HTTP. This is an optional feature and +requires libxml2 to operate. Enable SOAP by specifying --with-xml2 for configure. Z39.50 Query Type-104 added - to facilitate CQL within Z39.50. diff --git a/configure.in b/configure.in index d66b29a..964d140 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl YAZ Toolkit, Index Data 1994-2003 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.105 2003-02-14 20:32:59 adam Exp $ +dnl $Id: configure.in,v 1.106 2003-02-17 22:35:47 adam Exp $ AC_INIT(include/yaz/yaz-version.h) AM_INIT_AUTOMAKE(yaz, 1.9.3) dnl @@ -329,7 +329,7 @@ if test "$enable_threads" = "yes" -a "$HAVETHREADS" = "0"; then fi AM_CONDITIONAL(ISTHR, test $HAVETHREADS = "1") dnl -dnl ----- libXML2/XSLT +dnl ----- libXSLT AC_SUBST(XSLT_LIB) AC_SUBST(XSLT_CFLAGS) xsltdir=no @@ -354,6 +354,31 @@ if test "$xsltdir" != "no"; then fi fi dnl +dnl ----- libXML2 +AC_SUBST(XML2_LIBS) +AC_SUBST(XML2_CFLAGS) +xml2dir=no +AC_ARG_WITH(xml2, [ --with-xml2[=PREFIX] Use libxml2 in PREFIX/{lib,include}],[xml2dir=$withval]) +if test "$xml2dir" = "yes"; then + for d in /usr /usr/local; do + if test -x $d/bin/xml2-config; then + xml2dir=$d + fi + done +fi +if test "$xml2dir" != "no"; then + AC_MSG_CHECKING(for libXML2) + if test -x $xml2dir/bin/xml2-config; then + XML2_LIBS=`$xml2dir/bin/xml2-config --libs` + XML2_CFLAGS=`$xml2dir/bin/xml2-config --cflags` + XML2_VER=`$xml2dir/bin/xml2-config --version` + AC_MSG_RESULT($XML2_VER) + AC_DEFINE(HAVE_XML2) + else + AC_MSG_RESULT(Not found) + fi +fi +dnl dnl ------ Memory debugging AC_ARG_ENABLE(memdebug, [ --enable-memdebug enable memory debugging],[enable_memdebug=$enableval],[enable_memdebug=none]) if test "$enable_memdebug" = "yes"; then diff --git a/server/seshigh.c b/server/seshigh.c index f9b5923..58af6b1 100644 --- a/server/seshigh.c +++ b/server/seshigh.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: seshigh.c,v 1.138 2003-02-17 22:34:39 adam Exp $ + * $Id: seshigh.c,v 1.139 2003-02-17 22:35:48 adam Exp $ */ /* @@ -695,7 +695,7 @@ static void process_http_request(association *assoc, request *req) } else if (!strcmp(hreq->method, "POST")) { -#if HAVE_XSLT +#if HAVE_XML2 const char *content_type = z_HTTP_header_lookup(hreq->headers, "Content-Type"); const char *soap_action = z_HTTP_header_lookup(hreq->headers, diff --git a/zoom/Makefile.am b/zoom/Makefile.am index 4283b6f..f0422ab 100644 --- a/zoom/Makefile.am +++ b/zoom/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.8 2003-02-12 15:06:44 adam Exp $ +## $Id: Makefile.am,v 1.9 2003-02-17 22:35:48 adam Exp $ ## Copyright (C) 2001, Index Data AM_CPPFLAGS = -I$(top_srcdir)/include @@ -6,15 +6,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include noinst_PROGRAMS = zoomtst1 zoomtst2 zoomtst3 zoomtst4 zoomtst5 zoomtst6 zoomtst7 zoomtst8 bin_PROGRAMS = zoomsh -zoomtst1_LDADD = ../lib/libyaz.la $(XSLT_LIB) -zoomtst2_LDADD = ../lib/libyaz.la $(XSLT_LIB) -zoomtst3_LDADD = ../lib/libyaz.la $(XSLT_LIB) -zoomtst4_LDADD = ../lib/libyaz.la $(XSLT_LIB) -zoomtst5_LDADD = ../lib/libyaz.la $(XSLT_LIB) -zoomtst6_LDADD = ../lib/libyaz.la $(XSLT_LIB) -zoomtst7_LDADD = ../lib/libyazmalloc.la ../lib/libyaz.la $(XSLT_LIB) -zoomtst8_LDADD = ../lib/libyaz.la $(XSLT_LIB) -zoomsh_LDADD = ../lib/libyaz.la $(XSLT_LIB) $(READLINE_LIBS) +LDADD = ../lib/libyazmalloc.la ../lib/libyaz.la $(XML2_LIBS) $(READLINE_LIBS) zoomtst1_SOURCES = zoomtst1.c zoomtst2_SOURCES = zoomtst2.c diff --git a/ztest/Makefile.am b/ztest/Makefile.am index 3922dd8..14b17f7 100644 --- a/ztest/Makefile.am +++ b/ztest/Makefile.am @@ -1,4 +1,4 @@ -## $Id: Makefile.am,v 1.12 2003-02-12 15:06:44 adam Exp $ +## $Id: Makefile.am,v 1.13 2003-02-17 22:35:48 adam Exp $ if ISSSL sslbin=yaz-ztest-ssl @@ -16,11 +16,11 @@ extra=../lib/libyazthread.la endif yaz_ztest_LDADD=$(extra) ../lib/libyaz.la \ - $(XSLT_LIB) $(LIBTHREAD) + $(XML2_LIBS) $(LIBTHREAD) yaz_ztest_ssl_LDADD=$(extra) ../lib/libyazssl.la ../lib/libyaz.la \ - $(SSL_LIBS) $(XSLT_LIB) $(LIBTHREAD) + $(SSL_LIBS) $(XML2_LIBS) $(LIBTHREAD) AM_CFLAGS=@CFLAGSTHREADS@ -AM_CPPFLAGS=-I$(top_srcdir)/include $(XSLT_CFLAGS) +AM_CPPFLAGS=-I$(top_srcdir)/include $(XML2_CFLAGS) diff --git a/zutil/Makefile.am b/zutil/Makefile.am index 08c742c..503e94d 100644 --- a/zutil/Makefile.am +++ b/zutil/Makefile.am @@ -1,13 +1,13 @@ -## $Id: Makefile.am,v 1.15 2003-02-12 15:06:44 adam Exp $ +## $Id: Makefile.am,v 1.16 2003-02-17 22:35:48 adam Exp $ noinst_LTLIBRARIES = libzutil.la -AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/srw $(XSLT_CFLAGS) +AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_srcdir)/srw $(XML2_CFLAGS) libzutil_la_SOURCES = zget.c yaz-ccl.c diagbib1.c logrpn.c \ otherinfo.c pquery.c sortspec.c z3950oid.c charneg.c \ zoom-c.c zoom-opt.c zoom-p.h grs1disp.c zgdu.c soap.c srw.c -srwtst_LDADD = ../odr/libodr.la libzutil.la $(XSLT_LIB) ../util/libutil.la +srwtst_LDADD = ../odr/libodr.la libzutil.la $(XML2_LIBS) ../util/libutil.la srwtst_SOURCES = srwtst.c -noinst_PROGRAMS = srwtst \ No newline at end of file +noinst_PROGRAMS = srwtst diff --git a/zutil/soap.c b/zutil/soap.c index 157533c..f06ae8f 100644 --- a/zutil/soap.c +++ b/zutil/soap.c @@ -2,12 +2,12 @@ * Copyright (c) 2002-2003, Index Data. * See the file LICENSE for details. * - * $Id: soap.c,v 1.3 2003-02-17 14:35:42 adam Exp $ + * $Id: soap.c,v 1.4 2003-02-17 22:35:48 adam Exp $ */ #include -#if HAVE_XSLT +#if HAVE_XML2 #include #include diff --git a/zutil/srw.c b/zutil/srw.c index 3976e8c..61e1509 100644 --- a/zutil/srw.c +++ b/zutil/srw.c @@ -2,12 +2,12 @@ * Copyright (c) 2002-2003, Index Data. * See the file LICENSE for details. * - * $Id: srw.c,v 1.3 2003-02-17 14:35:42 adam Exp $ + * $Id: srw.c,v 1.4 2003-02-17 22:35:48 adam Exp $ */ #include -#if HAVE_XSLT +#if HAVE_XML2 #include #include diff --git a/zutil/srwtst.c b/zutil/srwtst.c index 0c7d8da..d31dca2 100644 --- a/zutil/srwtst.c +++ b/zutil/srwtst.c @@ -2,12 +2,12 @@ * Copyright (c) 2002-2003, Index Data. * See the file LICENSE for details. * - * $Id: srwtst.c,v 1.2 2003-02-17 21:23:31 adam Exp $ + * $Id: srwtst.c,v 1.3 2003-02-17 22:35:48 adam Exp $ */ #include -#if HAVE_XSLT +#if 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} diff --git a/zutil/zoom-c.c b/zutil/zoom-c.c index 2d299c1..a2b6008 100644 --- a/zutil/zoom-c.c +++ b/zutil/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (c) 2000-2003, Index Data * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.21 2003-02-17 21:23:32 adam Exp $ + * $Id: zoom-c.c,v 1.22 2003-02-17 22:35:48 adam Exp $ * * ZOOM layer for C, connections, result sets, queries. */ @@ -712,7 +712,7 @@ static zoom_ret do_connect (ZOOM_connection c) if (memcmp(c->host_port, "http:", 5) == 0) { -#if HAVE_XSLT +#if HAVE_XML2 const char *path; c->proto = PROTO_SRW; effective_host = c->host_port + 5; @@ -975,7 +975,7 @@ static zoom_ret ZOOM_connection_send_init (ZOOM_connection c) return send_APDU (c, apdu); } -#if HAVE_XSLT +#if HAVE_XML2 static zoom_ret send_srw (ZOOM_connection c, Z_SRW_searchRetrieve *sr) { Z_SOAP_Handler h[2] = { @@ -1018,7 +1018,7 @@ static zoom_ret send_srw (ZOOM_connection c, Z_SRW_searchRetrieve *sr) } #endif -#if HAVE_XSLT +#if HAVE_XML2 static zoom_ret ZOOM_connection_srw_send_search(ZOOM_connection c) { int i; @@ -2391,7 +2391,7 @@ static void handle_apdu (ZOOM_connection c, Z_APDU *apdu) } } -#if HAVE_XSLT +#if HAVE_XML2 static void handle_srw_response(ZOOM_connection c, Z_SRW_searchRetrieveResponse *res) { @@ -2458,7 +2458,7 @@ static void handle_srw_response(ZOOM_connection c, } #endif -#if HAVE_XSLT +#if HAVE_XML2 static void handle_http(ZOOM_connection c, Z_HTTP_Response *hres) { int ret = -1; @@ -2572,7 +2572,7 @@ static int do_read (ZOOM_connection c) handle_apdu (c, gdu->u.z3950); else if (gdu->which == Z_GDU_HTTP_Response) { -#if HAVE_XSLT +#if HAVE_XML2 handle_http (c, gdu->u.HTTP_Response); #else set_ZOOM_error(c, ZOOM_ERROR_DECODE, 0);