1 <chapter id="installation">
2 <!-- $Id: installation.xml,v 1.9 2006-04-06 01:16:54 adam Exp $ -->
3 <title>Installation</title>
5 You need a C++ compiler to compile and use YAZ proxy.
6 The software was implemented using
7 <ulink url="http://gcc.gnu.org/">GCC</ulink> so we know that works
8 well with YAZ proxy. From time to time the software has been
9 compiled on Windows using Visual C++. Other compilers should
10 work too. Let us know of portability problems, etc. with
14 YAZ proxy is built on top of the
15 <ulink url="http://indexdata.dk/yaz/">YAZ</ulink> and
16 <ulink url="http://indexdata.dk/yazplusplus/">YAZ++</ulink>
18 You need to install these first.
19 For some platforms there are binary packages available for YAZ/YAZ++.
22 We also highly recommend that
23 <ulink url="http://xmlsoft.org/">libxml2</ulink> and
24 <ulink url="http://xmlsoft.org/XSLT/">libXSLT</ulink> are installed.
25 YAZ must be configured with libxml2 support.
27 <ulink url="http://www.loc.gov/z3950/agency/zing/srw/">SRW/SRU</ulink>
29 The YAZ Proxy uses libXSLT for record conversions via XSLT.
32 YAZ proxy may also use USEMARCON to convert between MARC
33 formats. This is useful if you want the proxy to offer more
34 MARC record types than the backend target supports. Get USEMARCON
36 <ulink url="http://www.bl.uk/services/bibliographic/usemarcon.html">
37 British Library USEMARCON page
41 <title>Building on Unix</title>
42 <para>On UNIX, the software is compiled as follows:
51 You can supply options for the <literal>configure</literal> script.
52 The most useful ones are:
55 <term><literal>--prefix </literal>directory</term>
57 Specifies installation prefix. By default
58 <literal>/usr/local</literal> is used.
62 <term><literal>--with-yazpp </literal>directory</term>
64 Specifies the location of <filename>yazpp-config</filename>.
65 The <filename>yazpp-config</filename> program is generated in
66 the source directory of YAZ++ as well as the binaries
67 directory when YAZ++ is installed (via make install).
70 If you don't supply this option, <literal>configure</literal> will
71 look for <filename>yazpp-config</filename> in directories of the
72 <envar>PATH</envar> environment - which is nearly always
77 <term><literal>--with-xslt </literal>directory</term>
79 Specifies prefix for libXSLT (and libxml2).
80 configure must be able to locate <command>xslt-config</command>
81 in PREFIX/bin. If this option is omitted, configure looks
82 for <command>xslt-config</command> in the current PATH.
86 <term><literal>--with-usemarcon </literal>directory</term>
88 Specifies USEMARCON installation prefix.
89 configure must be able to locate <command>usemarcon-config</command>
90 in PREFIX/bin. If this option is omitted, configure looks
91 for <command>usemarcon-config</command> in the current PATH.
95 For the whole list of <literal>configure</literal> options, refer
97 <literal>./configure --help</literal>.
100 Configure uses GCC's C/C++ compiler if available. To specify another
101 compiler, set <literal>CXX</literal>. To use other compiler flags,
102 specify <literal>CXXFLAGS</literal>. For example, to use
103 <literal>CC</literal> with debugging do:
105 CXXFLAGS="-g" CXX=CC ./configure
109 This is what you have after successful compilation:
112 <term><literal>src/yazproxy</literal></term>
114 The YAZ Proxy program.
115 It gets installed in your binaries directory
116 (<parameter>prefix</parameter><literal>/bin</literal>).
121 <term><literal>src/libyazproxy.la</literal></term>
123 The YAZ proxy library. This library gets installed in
124 the libraries directory
125 (<parameter>prefix</parameter><literal>/lib</literal>).
130 <term><literal>include/yazproxy/*.h</literal></term>
132 C++ header files, which you'll need for YAZ proxy
133 development. All these are installed in the header files area
134 (<parameter>prefix</parameter><literal>/include/yazproxy</literal>).
139 <term><literal>etc</literal></term>
141 Various files such as
142 configuration files, XSLT files, CQL to RPN conversion files,
143 a sample start/stop control script
144 <filename>yazproxy.ctl.sh</filename> that can be used as
145 template for an <filename>/etc/init.d</filename> script.
146 These files are installed in the YAZ proxy's data area
147 (<parameter>prefix</parameter><literal>/share/yazproxy</literal>).
154 <section id="windows">
155 <title>Building on Windows</title>
157 YAZ++ is shipped with "makefiles" for the NMAKE tool that comes
158 with <ulink url="http://msdn.microsoft.com/vstudio/">
159 Microsoft Visual Studio</ulink>.
160 Version 6 and .NET has been tested. We expect that YAZ++ compiles
161 with version 5 as well.
165 The YAZ proxy has never been used in production on Windows. Although
166 it compiles and runs, doesn't mean it scale on that platform.
168 YAZ proxy currently doesn't run as a Service - only as a Console
173 Start a command prompt and switch the sub directory
174 <filename>WIN</filename> where the file <filename>makefile</filename>
175 is located. Customize the installation by editing the
176 <filename>makefile</filename> file (for example by using notepad).
178 The following summarizes the most important settings in that file:
181 <varlistentry><term><literal>DEBUG</literal></term>
183 If set to 1, the software is
184 compiled with debugging libraries (code generation is
185 multi-threaded debug DLL).
186 If set to 0, the software is compiled with release libraries
187 (code generation is multi-threaded DLL).
191 <varlistentry><term><literal>YAZ_DIR</literal></term>
193 This must be set to the home of the YAZ source directory.
197 <varlistentry><term><literal>YAZPP_DIR</literal></term>
199 This must be set to the home of the YAZ++ source directory.
204 <term><literal>HAVE_XSLT</literal>,
205 <literal>LIBXSLT_DIR</literal></term>
208 If <literal>HAVE_LIBXSLT</literal> is set to 1, the proxy is compiled
209 with XSLT and XML support. In this configuration, set
210 <literal>LIBXSLT_DIR</literal> to the
211 <ulink url="http://www.xmlsoft.org/">libXSLT</ulink> source
217 If you enable libXSLT you have to enable libxml2 and its
218 sub components zlib and iconv as well.
223 Windows versions of libXSLT, libxml2, zlib and iconv can be found
224 <ulink url="http://www.zlatkovic.com/libxml.en.html">
231 <term><literal>HAVE_ICONV</literal>,
232 <literal>ICONV_DIR</literal></term>
234 If <literal>HAVE_ICONV</literal> is set to 1, the proxy is
235 compiled with iconv support. In this configuration, set
236 <literal>ICONV_DIR</literal> to the iconv source directory.
241 <term><literal>HAVE_LIBXML2</literal>,
242 <literal>LIBXML2_DIR</literal></term>
245 If <literal>HAVE_LIBXML2</literal> is set to 1, the proxy is compiled
246 with XML support. In this configuration, set
247 <literal>LIBXML2_DIR</literal> to the
248 <ulink url="http://www.xmlsoft.org/">libxml2</ulink> source directory
250 <literal>ZLIB_DIR</literal> to the zlib directory.
255 YAZ++ is not using ZLIB. But libxml2 is.
264 When satisfied with the settings in the makefile, type
271 If the <filename>nmake</filename> command is not found on your system
272 you probably haven't defined the environment variables required to
273 use that tool. To fix that, find and run the batch file
274 <filename>vcvars32.bat</filename>. You need to run it from within
275 the command prompt or set the environment variables "globally";
276 otherwise it doesn't work.
280 If you wish to recompile YAZ++ - for example if you modify
281 settings in the <filename>makefile</filename> you can delete
282 object files, etc by running.
288 The following files are generated upon successful compilation:
291 <varlistentry><term><filename>bin/yazproxy.dll</filename></term>
294 </para></listitem></varlistentry>
296 <varlistentry><term><filename>lib/yazproxy.lib</filename></term>
298 Import library for <filename>yazproxy.dll</filename>.
299 </para></listitem></varlistentry>
301 <varlistentry><term><filename>bin/yazproxy.exe</filename></term>
303 YAZ proxy. It's a WIN32 console application.
304 </para></listitem></varlistentry>
312 <!-- Keep this comment at the end of the file
317 sgml-minimize-attributes:nil
318 sgml-always-quote-attributes:t
321 sgml-parent-document: "yazproxy.xml"
322 sgml-local-catalogs: nil
323 sgml-namecase-general:t