1 <chapter id="installation">
2 <title>Installation</title>
4 You need a C++ compiler to compile and use YAZ proxy.
5 The software was implemented using
6 <ulink url="&url.gcc;">GCC</ulink> so we know that works
7 well with YAZ proxy. From time to time the software has been
8 compiled on Windows using Visual C++. Other compilers should
9 work too. Let us know of portability problems, etc. with
13 YAZ proxy is built on top of the
14 <ulink url="&url.yaz;">YAZ</ulink> and
15 <ulink url="&url.yazplusplus;">YAZ++</ulink>
17 You need to install these first.
18 For some platforms there are binary packages available for YAZ/YAZ++.
21 We also highly recommend that
22 <ulink url="&url.libxml2;">libxml2</ulink> and
23 <ulink url="&url.libxslt;">libXSLT</ulink> are installed.
24 YAZ must be configured with libxml2 support.
26 <ulink url="&url.sru;">SRU</ulink>
28 The YAZ Proxy uses libXSLT for record conversions via XSLT.
31 YAZ proxy may also use USEMARCON to convert between MARC
32 formats. This is useful if you want the proxy to offer more
33 MARC record types than the backend target supports. Get USEMARCON
35 <ulink url="&url.usemarcon;">British Library USEMARCON page
39 <title>Building on Unix</title>
40 <para>On UNIX, the software is compiled as follows:
49 You can supply options for the <literal>configure</literal> script.
50 The most useful ones are:
53 <term><literal>--prefix </literal>directory</term>
55 Specifies installation prefix. By default
56 <literal>/usr/local</literal> is used.
60 <term><literal>--with-yazpp </literal>directory</term>
62 Specifies the location of <filename>yazpp-config</filename>.
63 The <filename>yazpp-config</filename> program is generated in
64 the source directory of YAZ++ as well as the binaries
65 directory when YAZ++ is installed (via make install).
68 If you don't supply this option, <literal>configure</literal> will
69 look for <filename>yazpp-config</filename> in directories of the
70 <envar>PATH</envar> environment - which is nearly always
75 <term><literal>--with-xslt </literal>directory</term>
77 Specifies prefix for libXSLT (and libxml2).
78 configure must be able to locate <command>xslt-config</command>
79 in PREFIX/bin. If this option is omitted, configure looks
80 for <command>xslt-config</command> in the current PATH.
84 <term><literal>--with-usemarcon </literal>directory</term>
86 Specifies USEMARCON installation prefix.
87 configure must be able to locate <command>usemarcon-config</command>
88 in PREFIX/bin. If this option is omitted, configure looks
89 for <command>usemarcon-config</command> in the current PATH.
93 For the whole list of <literal>configure</literal> options, refer
95 <literal>./configure --help</literal>.
98 Configure uses GCC's C/C++ compiler if available. To specify another
99 compiler, set <literal>CXX</literal>. To use other compiler flags,
100 specify <literal>CXXFLAGS</literal>. For example, to use
101 <literal>CC</literal> with debugging do:
103 CXXFLAGS="-g" CXX=CC ./configure
107 This is what you have after successful compilation:
110 <term><literal>src/yazproxy</literal></term>
112 The YAZ Proxy program.
113 It gets installed in your binaries directory
114 (<parameter>prefix</parameter><literal>/bin</literal>).
119 <term><literal>src/libyazproxy.la</literal></term>
121 The YAZ proxy library. This library gets installed in
122 the libraries directory
123 (<parameter>prefix</parameter><literal>/lib</literal>).
128 <term><literal>include/yazproxy/*.h</literal></term>
130 C++ header files, which you'll need for YAZ proxy
131 development. All these are installed in the header files area
132 (<parameter>prefix</parameter><literal>/include/yazproxy</literal>).
137 <term><literal>etc</literal></term>
139 Various files such as
140 configuration files, XSLT files, CQL to RPN conversion files,
141 a sample start/stop control script
142 <filename>yazproxy.ctl.sh</filename> that can be used as
143 template for an <filename>/etc/init.d</filename> script.
144 These files are installed in the YAZ proxy's data area
145 (<parameter>prefix</parameter><literal>/share/yazproxy</literal>).
152 <section id="windows">
153 <title>Building on Windows</title>
155 YAZ++ is shipped with "makefiles" for the NMAKE tool that comes
156 with <ulink url="&url.vstudio;">
157 Microsoft Visual Studio</ulink>.
158 Version 6 and .NET has been tested. We expect that YAZ++ compiles
159 with version 5 as well.
163 The YAZ proxy has never been used in production on Windows. Although
164 it compiles and runs, doesn't mean it scale on that platform.
166 YAZ proxy currently doesn't run as a Service - only as a Console
171 Start a command prompt and switch the sub directory
172 <filename>WIN</filename> where the file <filename>makefile</filename>
173 is located. Customize the installation by editing the
174 <filename>makefile</filename> file (for example by using notepad).
176 The following summarizes the most important settings in that file:
179 <varlistentry><term><literal>DEBUG</literal></term>
181 If set to 1, the software is
182 compiled with debugging libraries (code generation is
183 multi-threaded debug DLL).
184 If set to 0, the software is compiled with release libraries
185 (code generation is multi-threaded DLL).
189 <varlistentry><term><literal>YAZ_DIR</literal></term>
191 This must be set to the home of the YAZ source directory.
195 <varlistentry><term><literal>YAZPP_DIR</literal></term>
197 This must be set to the home of the YAZ++ source directory.
202 <term><literal>HAVE_XSLT</literal>,
203 <literal>LIBXSLT_DIR</literal></term>
206 If <literal>HAVE_LIBXSLT</literal> is set to 1, the proxy is compiled
207 with XSLT and XML support. In this configuration, set
208 <literal>LIBXSLT_DIR</literal> to the
209 <ulink url="&url.libxslt;">libXSLT</ulink> source
215 If you enable libXSLT you have to enable libxml2 and its
216 sub components zlib and iconv as well.
221 Windows versions of libXSLT, libxml2, zlib and iconv can be found
222 <ulink url="&url.libxml2.download.win32;">
229 <term><literal>HAVE_ICONV</literal>,
230 <literal>ICONV_DIR</literal></term>
232 If <literal>HAVE_ICONV</literal> is set to 1, the proxy is
233 compiled with iconv support. In this configuration, set
234 <literal>ICONV_DIR</literal> to the iconv source directory.
239 <term><literal>HAVE_LIBXML2</literal>,
240 <literal>LIBXML2_DIR</literal></term>
243 If <literal>HAVE_LIBXML2</literal> is set to 1, the proxy is compiled
244 with XML support. In this configuration, set
245 <literal>LIBXML2_DIR</literal> to the
246 <ulink url="&url.libxml2;">libxml2</ulink> source directory
248 <literal>ZLIB_DIR</literal> to the zlib directory.
253 YAZ++ is not using ZLIB. But libxml2 is.
262 When satisfied with the settings in the makefile, type
269 If the <filename>nmake</filename> command is not found on your system
270 you probably haven't defined the environment variables required to
271 use that tool. To fix that, find and run the batch file
272 <filename>vcvars32.bat</filename>. You need to run it from within
273 the command prompt or set the environment variables "globally";
274 otherwise it doesn't work.
278 If you wish to recompile YAZ++ - for example if you modify
279 settings in the <filename>makefile</filename> you can delete
280 object files, etc by running.
286 The following files are generated upon successful compilation:
289 <varlistentry><term><filename>bin/yazproxy.dll</filename></term>
292 </para></listitem></varlistentry>
294 <varlistentry><term><filename>lib/yazproxy.lib</filename></term>
296 Import library for <filename>yazproxy.dll</filename>.
297 </para></listitem></varlistentry>
299 <varlistentry><term><filename>bin/yazproxy.exe</filename></term>
301 YAZ proxy. It's a WIN32 console application.
302 </para></listitem></varlistentry>
310 <!-- Keep this comment at the end of the file
315 sgml-minimize-attributes:nil
316 sgml-always-quote-attributes:t
319 sgml-parent-document: "yazproxy.xml"
320 sgml-local-catalogs: nil
321 sgml-namecase-general:t