dnl yazproxy, Index Data 1994-2006
dnl See the file LICENSE for details.
-dnl $Id: configure.ac,v 1.12 2006-06-09 09:37:27 adam Exp $
+dnl $Id: configure.ac,v 1.13 2006-07-06 11:50:26 adam Exp $
AC_PREREQ(2.59)
AC_INIT([yazproxy],[1.2.1.1],[adam@indexdata.dk])
AC_CONFIG_SRCDIR(configure.ac)
AM_DISABLE_SHARED
AM_PROG_LIBTOOL
-YAZPP_INIT(threads,1.0)
+YAZPP_INIT(threads,1.0.1)
if test -z "$YAZPPLIB"; then
AC_MSG_ERROR([YAZ++ development libraries missing])
fi
AC_CHECK_HEADERS(pwd.h sys/resource.h sys/stat.h sys/time.h sys/types.h sys/wait.h unistd.h)
AC_CHECK_LIB(dl,dlopen)
dnl
-dnl ----- libXSLT
-AC_SUBST(XSLT_LIBS)
-AC_SUBST(XSLT_CFLAGS)
-xsltdir=default
-AC_ARG_WITH(xslt,[[ --with-xslt[=PREFIX] use libxslt in PREFIX]],xsltdir=$withval)
-if test "$xsltdir" = "yes" -o "$xsltdir" = "default"; then
- for d in /usr /usr/local; do
- if test -x $d/bin/xslt-config; then
- xsltdir=$d
- fi
- done
-fi
-if test "$xsltdir" != "no"; then
- AC_MSG_CHECKING(for libXSLT)
- if test -x $xsltdir/bin/xslt-config; then
- XSLT_LIBS=`$xsltdir/bin/xslt-config --libs`
- XSLT_CFLAGS=`$xsltdir/bin/xslt-config --cflags`
- XSLT_VER=`$xsltdir/bin/xslt-config --version`
- AC_MSG_RESULT($XSLT_VER)
- AC_DEFINE(HAVE_XSLT)
- else
- AC_MSG_RESULT(Not found)
- if test "$xsltdir" = "default"; then
- AC_MSG_WARN([Libxslt development libraries not found.])
- else
- AC_MSG_ERROR([libxslt development libraries not found.]) fi
- fi
-fi
-
AC_SUBST(YAZPROXY_SRC_ROOT)
AC_SUBST(YAZPROXY_BUILD_ROOT)
YAZPROXY_SRC_ROOT=`cd ${srcdir}; pwd`
-/* $Id: mod_helsinki.cpp,v 1.2 2006-06-28 23:38:23 adam Exp $
+/* $Id: mod_helsinki.cpp,v 1.3 2006-07-06 11:50:26 adam Exp $
Copyright (c) 1998-2005, Index Data.
This file is part of the yaz-proxy.
#include <time.h>
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xinclude.h>
{
// see if we have an "args" attribute
const char *args = 0;
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlNodePtr ptr = (xmlNodePtr) element_ptr;
struct _xmlAttr *attr;
-/* $Id: mod_sample.cpp,v 1.6 2006-03-30 10:31:53 adam Exp $
+/* $Id: mod_sample.cpp,v 1.7 2006-07-06 11:50:26 adam Exp $
Copyright (c) 1998-2006, Index Data.
This file is part of the yazproxy.
#include <yazproxy/module.h>
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xinclude.h>
{
// see if we have an "args" attribute
const char *args = 0;
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlNodePtr ptr = (xmlNodePtr) element_ptr;
struct _xmlAttr *attr;
-/* $Id: proxyp.h,v 1.18 2006-06-28 23:38:23 adam Exp $
+/* $Id: proxyp.h,v 1.19 2006-07-06 11:50:26 adam Exp $
Copyright (c) 1998-2006, Index Data.
This file is part of the yazproxy.
02111-1307, USA.
*/
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xinclude.h>
-/* $Id: yaz-proxy-config.cpp,v 1.33 2006-06-28 23:38:23 adam Exp $
+/* $Id: yaz-proxy-config.cpp,v 1.34 2006-07-06 11:50:26 adam Exp $
Copyright (c) 1998-2006, Index Data.
This file is part of the yazproxy.
int mycmp(const char *hay, const char *item, size_t len);
int match_list(int v, const char *m);
int atoi_l(const char **cp);
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
void load_modules(void);
int check_schema(xmlNodePtr ptr, Z_RecordComposition *comp,
const char *schema_identifier);
Yaz_ProxyConfigP::Yaz_ProxyConfigP() : m_modules()
{
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
m_docPtr = 0;
m_proxyPtr = 0;
#endif
Yaz_ProxyConfigP::~Yaz_ProxyConfigP()
{
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
if (m_docPtr)
xmlFreeDoc(m_docPtr);
#endif
delete m_cp;
}
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
void Yaz_ProxyConfigP::load_modules()
{
if (!m_proxyPtr)
int Yaz_ProxyConfig::read_xml(const char *fname)
{
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlDocPtr ndoc = xmlParseFile(fname);
if (!ndoc)
#endif
}
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
const char *Yaz_ProxyConfigP::get_text(xmlNodePtr ptr)
{
for(ptr = ptr->children; ptr; ptr = ptr->next)
}
#endif
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
void Yaz_ProxyConfigP::return_limit(xmlNodePtr ptr,
int *limit_bw,
int *limit_pdu,
}
#endif
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
void Yaz_ProxyConfigP::return_target_info(xmlNodePtr ptr,
const char **url,
int *limit_bw,
return 0;
}
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
int Yaz_ProxyConfigP::check_type_1_attributes(ODR odr, xmlNodePtr ptrl,
Z_AttributeList *attrs,
char **addinfo)
}
#endif
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
int Yaz_ProxyConfigP::check_type_1_structure(ODR odr, xmlNodePtr ptr,
Z_RPNStructure *q,
char **addinfo)
}
#endif
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
int Yaz_ProxyConfigP::check_type_1(ODR odr, xmlNodePtr ptr, Z_RPNQuery *query,
char **addinfo)
{
int Yaz_ProxyConfig::check_query(ODR odr, const char *name, Z_Query *query,
char **addinfo)
{
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlNodePtr ptr;
ptr = m_cp->find_target_node(name, 0);
return 0;
}
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
int Yaz_ProxyConfigP::check_schema(xmlNodePtr ptr, Z_RecordComposition *comp,
const char *schema_identifier)
{
void Yaz_ProxyConfig::target_authentication(const char *name,
ODR odr, Z_InitRequest *req)
{
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlNodePtr ptr = m_cp->find_target_node(name, 0);
if (!ptr)
return ;
const char *peer_IP)
{
int ret = YAZPROXY_RET_NOT_ME;
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlNodePtr ptr;
ptr = m_cp->find_target_node(name, 0);
if (!ptr)
const char *peer_IP)
{
int ret = YAZPROXY_RET_NOT_ME;
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
if (!m_cp->m_proxyPtr)
return 1;
xmlNodePtr ptr;
xfree (*usemarcon_ini_stage2);
*usemarcon_ini_stage2 = 0;
}
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
int syntax_has_matched = 0;
xmlNodePtr ptr;
return 0;
}
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlNodePtr Yaz_ProxyConfigP::find_target_db(xmlNodePtr ptr, const char *db)
{
xmlNodePtr dptr;
const char **target_charset,
const char **default_client_query_charset)
{
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlNodePtr ptr;
if (!m_cp->m_proxyPtr)
return 0;
int Yaz_ProxyConfig::get_file_access_info(const char *path)
{
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlNodePtr ptr;
if (!m_cp->m_proxyPtr)
return 0;
*max_connect = 0;
*limit_connect = 0;
*num_msg_threads = 0;
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlNodePtr ptr;
if (!m_cp->m_proxyPtr)
return;
#endif
}
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
int Yaz_ProxyConfigP::get_explain_ptr(const char *host, const char *db,
xmlNodePtr *ptr_target,
xmlNodePtr *ptr_explain)
const char *Yaz_ProxyConfig::get_explain_name(const char *db,
const char **backend_db)
{
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlNodePtr ptr_target, ptr_explain;
if (m_cp->get_explain_ptr(0, db, &ptr_target, &ptr_explain)
&& ptr_target)
char *Yaz_ProxyConfig::get_explain_doc(ODR odr, const char *name,
const char *db, int *len)
{
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlNodePtr ptr_target, ptr_explain;
if (m_cp->get_explain_ptr(0 /* host */, db, &ptr_target, &ptr_explain))
{
const char **target_charset,
const char **default_client_query_charset)
{
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlNodePtr ptr;
if (!m_cp->m_proxyPtr)
{
-/* $Id: yaz-proxy-main.cpp,v 1.19 2006-03-30 10:32:16 adam Exp $
+/* $Id: yaz-proxy-main.cpp,v 1.20 2006-07-06 11:50:26 adam Exp $
Copyright (c) 1998-2006, Index Data.
This file is part of the yazproxy.
#include <yazpp/pdu-assoc.h>
#include <yazproxy/proxy.h>
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxslt/xsltutils.h>
static_yaz_proxy->reconfig();
}
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
static void proxy_xml_error_handler(void *ctx, const char *fmt, ...)
{
char buf[1024];
signal(SIGHUP, sighup_handler);
#endif
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlSetGenericErrorFunc((void *) "XML", proxy_xml_error_handler);
xsltSetGenericErrorFunc((void *) "XSLT", proxy_xml_error_handler);
#endif
int main(int argc, char **argv)
{
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
xmlInitMemory();
LIBXML_TEST_VERSION
-/* $Id: yaz-proxy.cpp,v 1.69 2006-06-28 23:38:23 adam Exp $
+/* $Id: yaz-proxy.cpp,v 1.70 2006-07-06 11:50:26 adam Exp $
Copyright (c) 1998-2006, Index Data.
This file is part of the yazproxy.
delete m_charset_converter;
xfree(m_optimize);
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
if (m_stylesheet_xsp)
xsltFreeStylesheet((xsltStylesheetPtr) m_stylesheet_xsp);
#endif
void Yaz_Proxy::convert_xsl_delay()
{
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
Z_NamePlusRecord *npr = m_stylesheet_nprl->records[m_stylesheet_offset];
if (npr->which == Z_NamePlusRecord_databaseRecord)
{
{
m_timeout_mode = timeout_normal;
m_stylesheet_nprl = 0;
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
if (m_stylesheet_xsp)
xsltFreeStylesheet((xsltStylesheetPtr) m_stylesheet_xsp);
#endif
z_HTTP_header_add(o, &hres->headers, "WWW-Authenticate", "Basic realm=\"YAZ Proxy\"");
static Z_SOAP_Handler soap_handlers[2] = {
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
{"http://www.loc.gov/zing/srw/", 0,
(Z_SOAP_fun) yaz_srw_codec},
#endif
{
m_parent->low_socket_close();
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
if (m_stylesheet_xsp)
xsltFreeStylesheet((xsltStylesheetPtr) m_stylesheet_xsp);
m_stylesheet_xsp = xsltParseStylesheetFile((const xmlChar*)
{
m_parent->low_socket_close();
-#if HAVE_XSLT
+#if YAZ_HAVE_XSLT
if (m_stylesheet_xsp)
xsltFreeStylesheet((xsltStylesheetPtr) m_stylesheet_xsp);
m_stylesheet_xsp = xsltParseStylesheetFile((const xmlChar*)
# Copyright (C) 1999-2006, Index Data ApS
# All rights reserved.
-# $Id: makefile,v 1.9 2006-04-30 14:11:32 adam Exp $
+# $Id: makefile,v 1.10 2006-07-06 11:50:27 adam Exp $
###########################################################
############### Parameters
!if $(HAVE_LIBXSLT)
LIBXSLT_LIB="$(LIBXSLT_DIR)\lib\libxslt.lib"
-LIBXSLT_DEF=/D HAVE_XSLT=1 /I"$(LIBXSLT_DIR)\include"
+LIBXSLT_DEF=/D YAZ_HAVE_XSLT=1 /I"$(LIBXSLT_DIR)\include"
libxslt: $(BINDIR)\libxslt.dll $(BINDIR)\zlib1.dll
$(BINDIR)\libxslt.dll:
!else
LIBXSLT_LIB=
-LIBXSLT_DEF=/D HAVE_XSLT=0
+LIBXSLT_DEF=/D YAZ_HAVE_XSLT=0
libxslt:
!endif