1 <chapter id="installation">
2 <!-- $Id: installation.xml,v 1.2 2004-04-11 11:58:34 adam Exp $ -->
3 <title>Installation</title>
5 You need a C++ compiler to compile and use YAZ proxy.
6 The software was implemented using GCC 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="http://indexdata.dk/yaz/">YAZ</ulink> and
15 <ulink url="http://indexdata.dk/yazplusplus/">YAZ++</ulink>
17 You need to install these first.
18 For some platforms there are binary packages for YAZ/YAZ++.
21 <title>Building on Unix</title>
22 <para>On UNIX, the software is compiled as follows:
31 You can supply options for the <literal>configure</literal> script.
32 The most useful ones are:
35 <term><literal>--prefix </literal>directory</term>
37 Specifies installation prefix. By default
38 <literal>/usr/local</literal> is used.
42 <term><literal>--with-yazppconfig </literal>directory</term>
44 Specifies the location of <filename>yaz++-config</filename>.
45 The <filename>yaz++-config</filename> program is generated in
46 the source directory of YAZ++ as well as the binaries
47 directory when YAZ++ is installed (via make install).
50 If you don't supply this option, <literal>configure</literal> will
51 look for <filename>yaz++-config</filename> in directories of the
52 <envar>PATH</envar> environment - which is nearly always
57 <term><literal>--with-xslt </literal>directory</term>
59 Specifies prefix for libxslt (and libxml2).
60 configure must be able to locate <command>xslt-config</command>
61 in PREFIX/bin. If this option is omitted, configure looks
62 for <command>xslt-config</command> in the current PATH.
66 For the whole list of <literal>configure</literal> options, refer
68 <literal>./configure --help</literal>.
71 Configure uses GCC's C/C++ compiler if available. To specify another
72 compiler, set <literal>CXX</literal>. To use other compiler flags,
73 specify <literal>CXXFLAGS</literal>. To use <literal>CC</literal>
74 with debugging you could use:
76 CXXFLAGS="-g" CXX=CC ./configure
80 This is what you have after successful compilation:
83 <term><literal>src/yazproxy</literal></term>
85 The YAZ <link linkend="proxy">Z39.50 Proxy</link>.
86 This program gets installed in your binaries directory
87 (<parameter>prefix</parameter><literal>/bin</literal>).
92 <term><literal>src/libyazproxy.la</literal></term>
94 The YAZ proxy library. This library gets installed in
95 your libraries directory
96 (<parameter>prefix</parameter><literal>/lib</literal>).
101 <term><literal>include/yazproxy/*.h</literal></term>
103 Various C++ header files, which you'll need for YAZ proxy
104 development. All these are installed in your header files area
105 (<parameter>prefix</parameter><literal>/include/yazproxy</literal>).
112 <section id="windows">
113 <title>Building on Windows</title>
115 YAZ++ is shipped with "makefiles" for the NMAKE tool that comes
116 with <ulink url="http://msdn.microsoft.com/vstudio/">
117 Microsoft Visual Studio</ulink>.
118 Version 6 and .NET has been tested. We expect that YAZ++ compiles
119 with version 5 as well.
122 Start a command prompt and switch the sub directory
123 <filename>WIN</filename> where the file <filename>makefile</filename>
124 is located. Customize the installation by editing the
125 <filename>makefile</filename> file (for example by using notepad).
127 The following summarizes the most important settings in that file:
130 <varlistentry><term><literal>DEBUG</literal></term>
132 If set to 1, the software is
133 compiled with debugging libraries (code generation is
134 multi-threaded debug DLL).
135 If set to 0, the software is compiled with release libraries
136 (code generation is multi-threaded DLL).
141 <term><literal>HAVE_XSLT</literal>,
142 <literal>LIBXSLT_DIR</literal></term>
145 If <literal>HAVE_LIBXSLT</literal> is set to 1, the proxy is compiled
146 with XSLT and XML support. In this configuration, set
147 <literal>LIBXSLT_DIR</literal> to the
148 <ulink url="http://www.xmlsoft.org/">libxslt</ulink> source
154 If you enable libXSLT you have to enable libxml2 and its
155 sub components zlib and iconv as well.
160 Windows versions of libxslt, libxml2, zlib and iconv can be found
161 <ulink url="http://www.zlatkovic.com/libxml.en.html">
168 <term><literal>HAVE_ICONV</literal>,
169 <literal>ICONV_DIR</literal></term>
171 If <literal>HAVE_ICONV</literal> is set to 1, the proxy is
172 compiled with iconv support. In this configuration, set
173 <literal>ICONV_DIR</literal> to the iconv source directory.
178 <term><literal>HAVE_LIBXML2</literal>,
179 <literal>LIBXML2_DIR</literal></term>
182 If <literal>HAVE_LIBXML2</literal> is set to 1, the proxy is compiled
183 with XML support. In this configuration, set
184 <literal>LIBXML2_DIR</literal> to the
185 <ulink url="http://www.xmlsoft.org/">libxml2</ulink> source directory
187 <literal>ZLIB_DIR</literal> to the zlib directory.
192 YAZ++ is not using ZLIB. But libxml2 is.
201 When satisfied with the settings in the makefile, type
208 If the <filename>nmake</filename> command is not found on your system
209 you probably haven't defined the environment variables required to
210 use that tool. To fix that, find and run the batch file
211 <filename>vcvars32.bat</filename>. You need to run it from within
212 the command prompt or set the environment variables "globally";
213 otherwise it doesn't work.
217 If you wish to recompile YAZ++ - for example if you modify
218 settings in the <filename>makefile</filename> you can delete
219 object files, etc by running.
225 The following files are generated upon successful compilation:
228 <varlistentry><term><filename>bin/yazproxy.dll</filename></term>
231 </para></listitem></varlistentry>
233 <varlistentry><term><filename>lib/yazproxy.lib</filename></term>
235 Import library for <filename>yazproxy.dll</filename>.
236 </para></listitem></varlistentry>
238 <varlistentry><term><filename>bin/yazproxy.exe</filename></term>
240 YAZ proxy. It's a WIN32 console application.
241 See <xref linkend="proxy"/> for more information.
242 </para></listitem></varlistentry>
250 <!-- Keep this comment at the end of the file
255 sgml-minimize-attributes:nil
256 sgml-always-quote-attributes:t
259 sgml-parent-document: "yazproxy.xml"
260 sgml-local-catalogs: nil
261 sgml-namecase-general:t