Chapter 2. Installation

Table of Contents

1. Building on Unix
2. Building on Windows

You need a C++ compiler to compile and use YAZ proxy. The software was implemented using GCC so we know that works well with YAZ proxy. From time to time the software has been compiled on Windows using Visual C++. Other compilers should work too. Let us know of portability problems, etc. with your system.

YAZ proxy is built on top of the YAZ and YAZ++ toolkits. You need to install these first. For some platforms there are binary packages available for YAZ/YAZ++.

We also highly recommend that libxml2 and libXSLT are installed. YAZ must be configured with libxml2 support. If not, SRU is not supported. The YAZ Proxy uses libXSLT for record conversions via XSLT.

YAZ proxy may also use USEMARCON to convert between MARC formats. This is useful if you want the proxy to offer more MARC record types than the backend target supports. Get USEMARCON from: British Library USEMARCON page .

1. Building on Unix

On UNIX, the software is compiled as follows:

     $ ./configure
     $ make
     $ su
     # make install
    

You can supply options for the configure script. The most useful ones are:

--prefix directory

Specifies installation prefix. By default /usr/local is used.

--with-yazpp directory

Specifies the location of yazpp-config. The yazpp-config program is generated in the source directory of YAZ++ as well as the binaries directory when YAZ++ is installed (via make install).

If you don't supply this option, configure will look for yazpp-config in directories of the PATH environment - which is nearly always what you want.

--with-xslt directory

Specifies prefix for libXSLT (and libxml2). configure must be able to locate xslt-config in PREFIX/bin. If this option is omitted, configure looks for xslt-config in the current PATH.

--with-usemarcon directory

Specifies USEMARCON installation prefix. configure must be able to locate usemarcon-config in PREFIX/bin. If this option is omitted, configure looks for usemarcon-config in the current PATH.

For the whole list of configure options, refer to the help: ./configure --help.

Configure uses GCC's C/C++ compiler if available. To specify another compiler, set CXX. To use other compiler flags, specify CXXFLAGS. For example, to use CC with debugging do:

     CXXFLAGS="-g" CXX=CC ./configure
    

This is what you have after successful compilation:

src/yazproxy

The YAZ Proxy program. It gets installed in your binaries directory (prefix/bin).

src/libyazproxy.la

The YAZ proxy library. This library gets installed in the libraries directory (prefix/lib).

include/yazproxy/*.h

C++ header files, which you'll need for YAZ proxy development. All these are installed in the header files area (prefix/include/yazproxy).

etc

Various files such as configuration files, XSLT files, CQL to RPN conversion files, a sample start/stop control script yazproxy.ctl.sh that can be used as template for an /etc/init.d script. These files are installed in the YAZ proxy's data area (prefix/share/yazproxy).