1 <chapter id="installation">
2 <!-- $Id: installation.xml,v 1.10 2004-03-31 18:28:05 adam Exp $ -->
3 <title>Installation</title>
5 You need a C++ compiler to compile and use YAZ++.
6 The software was implemented using GCC so we know that works
7 well with YAZ++. 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++ is built on top of the
14 <ulink url="http://indexdata.dk/yaz/">YAZ</ulink>
16 You need to install that first.
17 For some platforms there are binary packages for YAZ.
20 <title>Building on Unix</title>
21 <para>On UNIX, the software is compiled as follows:
30 You can supply options for the <literal>configure</literal> script.
31 The most useful ones are:
34 <term><literal>--prefix </literal>directory</term>
36 Specifies installation prefix. By default
37 <literal>/usr/local</literal> is used.
41 <term><literal>--with-yazconfig </literal>directory</term>
43 Specifies the location of <filename>yaz-config</filename>.
44 The <filename>yaz-config</filename> program is generated in
45 the source directory of YAZ as well as the binaries
46 directory when YAZ is installed (via make install).
49 If you don't supply this option, <literal>configure</literal> will
50 look for <filename>yaz-config</filename> in directories of the
51 <envar>PATH</envar> environment - which is nearly always
56 <term><literal>--with-xslt </literal>directory</term>
58 Specifies prefix for libxslt (and libxml2).
59 configure must be able to locate <command>xslt-config</command>
60 in PREFIX/bin. If this option is omitted, configure looks
61 for <command>xslt-config</command> in the current PATH.
65 For the whole list of <literal>configure</literal> options, refer
67 <literal>./configure --help</literal>.
70 Configure uses GCC's C/C++ compiler if available. To specify another
71 compiler, set <literal>CXX</literal>. To use other compiler flags,
72 specify <literal>CXXFLAGS</literal>. To use <literal>CC</literal>
73 with debugging you could use:
75 CXXFLAGS="-g" CXX=CC ./configure
79 This is what you have after successful compilation:
82 <term><literal>proxy/yaz-proxy</literal></term>
84 The YAZ <link linkend="proxy">Z39.50 Proxy</link>.
85 This program gets installed in your binaries directory
86 (<parameter>prefix</parameter><literal>/bin</literal>).
91 <term><literal>src/libyazcpp.la</literal></term>
94 This library gets installed in your libraries directory
95 (<parameter>prefix</parameter><literal>/lib</literal>).
100 <term><literal>src/libzoomcpp.la</literal></term>
102 The <link linkend="zoom">ZOOM-C++</link> library.
103 This library gets installed in your libraries directory
104 (<parameter>prefix</parameter><literal>/lib</literal>).
109 <term><literal>proxy/libyazproxy.la</literal></term>
111 The YAZ proxy library. This library gets installed in
112 your libraries directory
113 (<parameter>prefix</parameter><literal>/lib</literal>).
118 <term><literal>include/yaz++/*.h</literal></term>
120 Various C++ header files, which you'll need for YAZ++
121 development. All these are installed in your header files area
122 (<parameter>prefix</parameter><literal>/include/yaz++</literal>).
127 <term><literal>yaz++-config</literal></term>
129 A Bourne shell-script utility that returns the values of the
130 <envar>CFLAGS</envar> and <envar>LIBS</envar>
131 environment variables
132 needed in order to compile your applications with the YAZ++
133 library. This script gets installed in your binaries directory
134 (<parameter>prefix</parameter><literal>/bin</literal>).
139 <term><literal>zoom/zclient</literal></term>
141 ZOOM C++ demonstration client that uses the ZOOM C++ classes.
142 This client does not get installed in the system directories.
147 <term><literal>src/yaz-my-client</literal></term>
149 YAZ C++ demonstration client. This client does not
150 get installed in the system directories.
155 <term><literal>src/yaz-my-server</literal></term>
157 YAZ C++ demonstration server. This server does not
158 get installed in the system directories.
164 <section id="windows">
165 <title>Building on Windows</title>
167 YAZ++ is shipped with "makefiles" for the NMAKE tool that comes
168 with <ulink url="http://msdn.microsoft.com/vstudio/">
169 Microsoft Visual Studio</ulink>.
170 Version 6 and .NET has been tested. We expect that YAZ++ compiles
171 with version 5 as well.
174 Start a command prompt and switch the sub directory
175 <filename>WIN</filename> where the file <filename>makefile</filename>
176 is located. Customize the installation by editing the
177 <filename>makefile</filename> file (for example by using notepad).
179 The following summarizes the most important settings in that file:
182 <varlistentry><term><literal>DEBUG</literal></term>
184 If set to 1, the software is
185 compiled with debugging libraries (code generation is
186 multi-threaded debug DLL).
187 If set to 0, the software is compiled with release libraries
188 (code generation is multi-threaded DLL).
193 <term><literal>HAVE_XSLT</literal>,
194 <literal>LIBXSLT_DIR</literal></term>
197 If <literal>HAVE_LIBXSLT</literal> is set to 1, the proxy is compiled
198 with XSLT and XML support. In this configuration, set
199 <literal>LIBXSLT_DIR</literal> to the
200 <ulink url="http://www.xmlsoft.org/">libxslt</ulink> source
206 If you enable libXSLT you have to enable libxml2 and its
207 sub components zlib and iconv as well.
212 Windows versions of libxslt, libxml2, zlib and iconv can be found
213 <ulink url="http://www.zlatkovic.com/libxml.en.html">
220 <term><literal>HAVE_ICONV</literal>,
221 <literal>ICONV_DIR</literal></term>
223 If <literal>HAVE_ICONV</literal> is set to 1, the proxy is
224 compiled with iconv support. In this configuration, set
225 <literal>ICONV_DIR</literal> to the iconv source directory.
230 <term><literal>HAVE_LIBXML2</literal>,
231 <literal>LIBXML2_DIR</literal></term>
234 If <literal>HAVE_LIBXML2</literal> is set to 1, the proxy is compiled
235 with XML support. In this configuration, set
236 <literal>LIBXML2_DIR</literal> to the
237 <ulink url="http://www.xmlsoft.org/">libxml2</ulink> source directory
239 <literal>ZLIB_DIR</literal> to the zlib directory.
244 YAZ++ is not using ZLIB. But libxml2 is.
253 When satisfied with the settings in the makefile, type
260 If the <filename>nmake</filename> command is not found on your system
261 you probably haven't defined the environment variables required to
262 use that tool. To fix that, find and run the batch file
263 <filename>vcvars32.bat</filename>. You need to run it from within
264 the command prompt or set the environment variables "globally";
265 otherwise it doesn't work.
269 If you wish to recompile YAZ++ - for example if you modify
270 settings in the <filename>makefile</filename> you can delete
271 object files, etc by running.
277 The following files are generated upon successful compilation:
280 <varlistentry><term><filename>bin/yazpp.dll</filename></term>
282 YAZ++ DLL . Includes ZOOM C++ as well.
283 </para></listitem></varlistentry>
285 <varlistentry><term><filename>lib/yaz.lib</filename></term>
287 Import library for <filename>yazpp.dll</filename>.
288 </para></listitem></varlistentry>
290 <varlistentry><term><filename>bin/yazproxy.dll</filename></term>
293 </para></listitem></varlistentry>
295 <varlistentry><term><filename>lib/yazproxy.lib</filename></term>
297 Import library for <filename>yazproxy.dll</filename>.
298 </para></listitem></varlistentry>
300 <varlistentry><term><filename>bin/yaz-proxy.exe</filename></term>
302 YAZ proxy. It's a WIN32 console application.
303 See <xref linkend="proxy"/> for more information.
304 </para></listitem></varlistentry>
306 <varlistentry><term><filename>bin/zclient.exe</filename></term>
308 ZOOM C++ demo client. A simple WIN32 console application.
309 </para></listitem></varlistentry>
317 <!-- Keep this comment at the end of the file
322 sgml-minimize-attributes:nil
323 sgml-always-quote-attributes:t
326 sgml-parent-document: "yaz++.xml"
327 sgml-local-catalogs: nil
328 sgml-namecase-general:t