Describe --with-memcached configure option
[yaz-moved-to-github.git] / doc / installation.xml
1 <chapter id="installation"><title>Compilation and Installation</title>
2
3   <sect1 id="installation-introduction"><title>Introduction</title>
4    <para>
5     The latest version of the software will generally be found at:
6    </para>
7    <para>
8     <ulink url="&url.yaz.download;"/>
9    </para>
10    <para>
11     We have tried our best to keep the software portable, and on many
12     platforms, you should be able to compile everything with little or
13     no changes.
14    </para>
15
16    <para>
17     The software is regularly tested on
18     <ulink url="&url.debian;">Debian GNU/Linux</ulink>,
19     <ulink url="&url.centos;">CentOS</ulink>,
20     <ulink url="&url.ubuntu;">Ubuntu Linux</ulink>,
21     <ulink url="&url.freebsd;">FreeBSD (i386)</ulink>,
22     <ulink url="&url.macosx;">MAC OSX</ulink>,
23     <ulink url="&url.solaris;">Solaris</ulink>,
24     Windows 7, Windows Xp.
25    </para>
26
27    <para>
28     Some versions have be known to work on HP/UX,
29     DEC Unix, <ulink url="&url.netbsd;">NetBSD</ulink>,
30     <ulink url="&url.openbsd;">OpenBSD</ulink>,
31     IBM AIX,
32     Data General DG/UX (with some CFLAGS tinkering),
33     SGI/IRIX, DDE Supermax, Apple Macintosh (using the Codewarrior programming
34     environment and the GUSI socket libraries),
35     IBM AS/400 .
36    </para>
37
38    <para>
39     If you move the software to other platforms, we'd be grateful if you'd
40     let us know about it. If you run into difficulties, we will try to help
41     if we can, and if you solve the problems, we would be happy to include
42     your fixes in the next release. So far, we have mostly avoided
43     <literal>#ifdefs</literal> for individual platforms, and we'd
44     like to keep it that way as far as it makes sense.
45    </para>
46
47    <para>
48     We maintain a mailing-list for the purpose of announcing new releases and
49     bug-fixes, as well as general discussion. Subscribe by
50     filling-in the form
51     <ulink url="&url.yaz.mailinglist;">here</ulink>.
52     General questions and problems can be directed at
53     <ulink url="&url.yaz.mail;"/>, or the address given at the top of
54      this document.
55    </para>
56
57   </sect1>
58   <sect1 id="installation.unix"><title>UNIX</title>
59
60    <para>
61     We provide
62     <ulink url="&url.debian;">Debian GNU/Linux</ulink> (i386 and amd64),
63     <ulink url="&url.ubuntu;">Ubuntu</ulink> (i386 and amd64)
64     and
65     <ulink url="&url.centos;">CentOS</ulink> (amd64 only) packages for &yaz;.
66     You should be able to create packages for other CPUs by building
67     them from the source package.
68    </para>
69
70    <para>
71     YAZ is also part of several packages repositories. Some of them are
72    </para>
73
74    <itemizedlist>
75     <listitem>
76      <para>
77       Solaris CSW: <ulink url="http://www.opencsw.org/packages/yaz/"/>
78      </para>
79     </listitem>
80     <listitem>
81      <para>
82       Solaris: <ulink url="http://unixpackages.com"/>
83      </para>
84     </listitem>
85     <listitem>
86      <para>
87       FreeBSD: <ulink url="http://www.freshports.org/net/yaz"/>
88      </para>
89     </listitem>
90     <listitem>
91      <para>
92       Debian: <ulink url="http://packages.debian.org/search?keywords=yaz"/>
93      </para>
94     </listitem>
95     <listitem>
96      <para>
97       Ubuntu: <ulink url="https://launchpad.net/ubuntu/+source/yaz"/>
98      </para>
99     </listitem>
100     <listitem>
101      <para>
102       NetBSD:
103       <ulink url="http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/net/yaz/README.html"/>
104      </para>
105     </listitem>
106    </itemizedlist>
107
108    <sect2 id="installation.source.unix">
109     <title>Compiling from source on Unix</title>
110
111     <para>
112      Note that if your system doesn't have a native ANSI C compiler, you may
113      have to acquire one separately. We recommend
114      <ulink url="&url.gcc;">GCC</ulink>.
115     </para>
116
117     <para>
118      If you wish to use character set conversion facilities in &yaz; or if you
119      are compiling &yaz; for use with Zebra it is a good idea to ensure that
120      the iconv library is installed. Some Unixes today already have it
121      - if not, we suggest
122      <ulink url="&url.libiconv;">GNU libiconv</ulink>.
123     </para>
124
125     <para>
126      YAZ 3.0.16 and later includes a wrapper for the
127      <ulink url="&url.icu;">ICU</ulink>
128      (International Components for Unicode).
129      In order to use this, the developer version of the ICU library
130      must be available.
131     </para>
132
133     <para>
134      The <ulink url="&url.libxslt;">libxslt</ulink>,
135      <ulink url="&url.libxml2;">libxml2</ulink> librararies are required
136      if &yaz; is to support SRU.
137      These libraries are very portable and should compile out-of-the
138      box on virtually all Unix platforms. It is available in binary
139      forms for Linux and others.
140     </para>
141
142     <para>
143      The GNU tools
144      <ulink url="&url.autoconf;">Autoconf</ulink>,
145      <ulink url="&url.automake;">Automake</ulink> and
146      <ulink url="&url.libtool;">Libtool</ulink>
147      are used to generate Makefiles and configure &yaz; for the system.
148      You do <emphasis>not</emphasis> these tools unless you're using the
149      git version of &yaz;.
150     </para>
151
152     <para>
153      The CQL parser for &yaz; is built using
154      GNU <ulink url="&url.bison;">Bison</ulink>.
155      This tool is only needed if you're using the git version of &yaz;.
156     </para>
157
158     <para>
159      &yaz; includes a tiny ASN.1 compiler. This compiler is
160      written in <ulink url="&url.tcl;">Tcl</ulink>.
161      But as for Bison you do not need it unless you're using git
162      version of &yaz; or you're using the compiler to built own codecs
163      for private ASN.1.
164     </para>
165
166     <para>
167      Generally it should be sufficient to run configure without options,
168      like this:
169     </para>
170
171     <screen>
172      ./configure
173     </screen>
174
175     <para>
176      The configure script attempts to use use the C compiler specified by
177      the <literal>CC</literal> environment variable. If not set, GNU C will be
178      used if it is available. The <literal>CFLAGS</literal> environment
179      variable holds options to be passed to the C compiler. If you're using
180      Bourne-compatible shell you may pass something like this to use a
181      particular C compiler with optimization enabled:
182     </para>
183
184     <screen>
185      CC=/opt/ccs/bin/cc CFLAGS=-O ./configure
186     </screen>
187
188     <para>
189      To customize &yaz;, the configure script also accepts a set of options.
190      The most important are:
191
192      <variablelist>
193       <varlistentry><term>
194         <literal>--prefix</literal>=<replaceable>prefix</replaceable></term>
195        <listitem><para>Specifies installation prefix for &yaz;. This is
196          only needed if you run <literal>make install</literal> later to
197          perform a "system" installation. The prefix is
198          <literal>/usr/local</literal> if not specified.
199         </para></listitem>
200       </varlistentry>
201       <varlistentry><term><literal>--enable-tcpd</literal></term>
202        <listitem><para>The front end server will be built using Wietse's
203          <ulink url="&url.tcpwrapper;">TCP wrapper library</ulink>.
204          It allows you to allow/deny clients depending on IP number.
205          The TCP wrapper library is often used in GNU/Linux and
206          BSD distributions.
207          See
208          <citerefentry>
209           <refentrytitle>hosts_access</refentrytitle>
210           <manvolnum>5</manvolnum>
211          </citerefentry>
212          and
213          <citerefentry>
214           <refentrytitle>tcpd</refentrytitle>
215           <manvolnum>8</manvolnum>
216          </citerefentry>.
217         </para></listitem>
218       </varlistentry>
219
220       <varlistentry><term><literal>--enable-threads</literal></term>
221        <listitem><para>&yaz; will be built using POSIX threads.
222         Specifically, <constant>_REENTRANT</constant> will be defined during
223          compilation.
224         </para></listitem>
225       </varlistentry>
226
227       <varlistentry><term><literal>--disable-shared</literal></term>
228        <listitem><para>The make process will not create shared
229          libraries (also known as shared objects <filename>.so</filename>).
230          By default, shared libraries are created -
231          equivalent to <literal>--enable-shared</literal>.
232         </para></listitem>
233       </varlistentry>
234
235       <varlistentry><term><literal>--disable-shared</literal></term>
236        <listitem><para>The make process will not create
237          static libraries (<filename>.a</filename>).
238          By default, static libraries are created -
239          equivalent to <literal>--enable-static</literal>.
240         </para></listitem>
241       </varlistentry>
242
243       <varlistentry><term>
244         <literal>--with-iconv</literal>[=<replaceable>prefix</replaceable>]
245        </term>
246        <listitem><para>Compile &yaz; with iconv library in directory
247          <replaceable>prefix</replaceable>. By default configure will
248          search for iconv on the system. Use this option if it
249          doesn't find iconv. Alternatively,
250          <literal>--without-iconv</literal>, can be uset to force &yaz;
251          not to use iconv.
252         </para></listitem>
253       </varlistentry>
254
255       <varlistentry><term>
256         <literal>--with-xslt</literal>[=<replaceable>prefix</replaceable>]
257        </term>
258        <listitem><para>Compile &yaz; with
259          <ulink url="&url.libxslt;">libxslt</ulink> in directory
260          <replaceable>prefix</replaceable>.
261          Use this option if you want XSLT and XML support.
262          By default, configure will
263          search for libxslt on the system. Use this option if it
264          libxslt is not found automatically. Alternatively,
265          <literal>--without-xslt</literal>, can be used to force &yaz;
266          not to use libxslt.
267         </para>
268        </listitem>
269       </varlistentry>
270
271       <varlistentry><term>
272         <literal>--with-xml2</literal>[=<replaceable>prefix</replaceable>]
273        </term>
274        <listitem><para>Compile &yaz; with
275          <ulink url="&url.libxml2;">libxml2</ulink> in directory
276          <replaceable>prefix</replaceable>.
277          Use this option if you want &yaz; to use XML and support SRU.
278          By default, configure will
279          search for libxml2 on the system. Use this option if it
280          libxml2 is not found automatically. Alternatively,
281          <literal>--without-xml2</literal>, can be used to force &yaz;
282          not to use libxml2.
283          </para>
284          <para>
285            Note that option <literal>--with-xslt</literal>
286            also enables libxml2.
287          </para>
288        </listitem>
289       </varlistentry>
290
291       <varlistentry><term>
292         <literal>--with-gnutls</literal>[=<replaceable>prefix</replaceable>]
293        </term>
294        <listitem><para>&yaz; will be linked with the GNU TLS libraries and
295          an SSL COMSTACK will be provided. By default configure enables
296          SSL support for YAZ if the GNU TLS development libraries are found
297          on the system.
298         </para></listitem>
299       </varlistentry>
300
301       <varlistentry><term>
302         <literal>--with-icu</literal>[=<replaceable>prefix</replaceable>]
303        </term>
304        <listitem><para>&yaz; will be linked the
305         <ulink url="&url.icu;">ICU</ulink> library in the prefix if given.
306         If prefix is not given, the libraries exposed by the script
307         <application>icu-config</application> will be used if found.
308         </para></listitem>
309       </varlistentry>
310
311       <varlistentry><term>
312         <literal>--with-libgcrypt</literal>[=<replaceable>prefix</replaceable>]
313        </term>
314        <listitem><para>&yaz; will be linked with
315         <ulink url="&url.libgcrypt;">Libgcrypt</ulink> in the prefix if given.
316         If prefix is not given, the libraries exposed by the script
317         <application>libgcrypt-config</application> will be used if found.
318         </para></listitem>
319       </varlistentry>
320
321       <varlistentry><term>
322         <literal>--with-memcached</literal>
323        </term>
324        <listitem><para>&yaz; will be linked with
325         <ulink url="&url.libmemcached;">libMemcached</ulink> to allow
326         for result-set caching for ZOOM.
327         The prefix can not be given. Note that YAZ will only search
328         for libMemcached if Libgcrypt is also enabled.
329         </para></listitem>
330       </varlistentry>
331
332      </variablelist>
333
334     </para>
335     <para>
336      When configured, build the software by typing:
337      <screen>
338       make
339      </screen>
340     </para>
341
342     <para>
343      The following files are generated by the make process:
344      <variablelist>
345       <varlistentry><term><filename>src/libyaz.la</filename></term>
346        <listitem><para>
347          Main &yaz; library. This is no ordinary library. It's
348          a Libtool archive.
349          By default, &yaz; creates a static library in
350          <filename>lib/.libs/libyaz.a</filename>.
351         </para></listitem>
352       </varlistentry>
353
354       <varlistentry><term><filename>src/libyaz_server.la</filename></term>
355        <listitem><para>
356          Generic Frontend server. This is an add-on for libyaz.la.
357          Code in this library uses POSIX threads functions - if POSIX
358          threads are available on the platform.
359         </para></listitem>
360       </varlistentry>
361
362       <varlistentry><term><filename>src/libyaz_icu.la</filename></term>
363        <listitem><para>
364          Functions that wrap the ICU library.
365         </para></listitem>
366       </varlistentry>
367
368       <varlistentry><term><filename>ztest/yaz-ztest</filename></term>
369        <listitem><para>Test Z39.50 server.
370         </para></listitem>
371       </varlistentry>
372
373       <varlistentry><term><filename>client/yaz-client</filename></term>
374        <listitem><para>Z39.50 client for testing the protocol.
375          See chapter <link linkend="yaz-client">
376           YAZ client</link> for more information.
377         </para></listitem>
378       </varlistentry>
379
380       <varlistentry><term><filename>util/yaz-config</filename></term>
381        <listitem><para>A Bourne-shell script, generated by configure, that
382          specifies how external applications should compile - and link with
383          &yaz;.
384         </para></listitem>
385       </varlistentry>
386
387       <varlistentry><term><filename>util/yaz-asncomp</filename></term>
388        <listitem><para>The ASN.1 compiler for &yaz;. Requires the
389          Tcl Shell, <application>tclsh</application>, in
390          <literal>PATH</literal> to operate.
391         </para></listitem>
392       </varlistentry>
393
394       <varlistentry><term><filename>util/yaz-iconv</filename></term>
395        <listitem><para>This program converts data in one character set to
396          another. This command exercises the YAZ character set
397          conversion API.
398         </para></listitem>
399       </varlistentry>
400
401       <varlistentry><term><filename>util/yaz-marcdump</filename></term>
402        <listitem><para>This program parses ISO2709 encoded MARC records
403          and prints them in line-format or XML.
404         </para></listitem>
405       </varlistentry>
406
407       <varlistentry><term><filename>util/yaz-icu</filename></term>
408        <listitem><para>This program exposes the ICU wrapper library if that
409          is enabled for YAZ. Only if ICU is available this program is
410          useful.
411         </para></listitem>
412       </varlistentry>
413
414      <varlistentry><term><filename>zoom/zoomsh</filename></term>
415        <listitem><para>
416          A simple shell implemented on top of the
417          <link linkend="zoom">ZOOM</link> functions.
418          The shell is a command line application that allows you to enter
419          simple commands to perform ZOOM operations.
420         </para></listitem>
421       </varlistentry>
422
423       <varlistentry><term><filename>zoom/zoomtst1</filename>,
424         <filename>zoom/zoomtst2</filename>, ..</term>
425        <listitem><para>
426          Several small applications that demonstrates the ZOOM API.
427         </para></listitem>
428       </varlistentry>
429      </variablelist>
430
431     </para>
432
433     <para>
434      If you wish to install &yaz; in system directories
435      <filename>/usr/local/bin</filename>,
436      <filename>/usr/local/lib</filename> .. etc, you can type:
437     </para>
438
439     <screen>
440      make install
441     </screen>
442
443     <para>
444      You probably need to have root access in order to perform this.
445      You must specify the <literal>--prefix</literal> option for configure if
446      you wish to install &yaz; in other directories than the default
447      <filename>/usr/local/</filename>.
448     </para>
449
450     <para>
451      If you wish to perform an un-installation of &yaz;, use:
452     </para>
453
454     <screen>
455      make uninstall
456     </screen>
457
458     <para>
459      This will only work if you haven't reconfigured &yaz; (and therefore
460      changed installation prefix). Note that uninstall will not
461      remove directories created by make install, e.g.
462      <filename>/usr/local/include/yaz</filename>.
463     </para>
464    </sect2>
465
466    <sect2 id="installation-linking-yaz-unix">
467     <title>How to make apps using YAZ on UNIX</title>
468     <para>
469      This section describes how to compile - and link your own
470      applications using the &yaz; toolkit.
471      If you're used to Makefiles this shouldn't be hard. As for
472      other libraries you have used before, you have to set a proper include
473      path for your C/C++ compiler and specify the location of
474      &yaz; libraries. You can do it by hand, but generally we suggest
475      you use the <filename>yaz-config</filename> that is generated
476      by <filename>configure</filename>. This is especially
477      important if you're using the threaded version of &yaz; which
478      require you to pass more options to your linker/compiler.
479     </para>
480     <para>
481      The <filename>yaz-config</filename> script accepts command line
482      options that makes the <filename>yaz-config</filename> script print
483      options that you should use in your make process.
484      The most important ones are:
485      <literal>--cflags</literal>, <literal>--libs</literal>
486      which prints C compiler flags, and linker flags respectively.
487      </para>
488     <para>
489      A small and complete <literal>Makefile</literal> for a C
490      application consisting of one source file,
491      <filename>myprog.c</filename>, may look like this:
492      <screen>
493       YAZCONFIG=/usr/local/bin/yaz-config
494       CFLAGS=`$(YAZCONFIG) --cflags`
495       LIBS=`$(YAZCONFIG) --libs`
496       myprog: myprog.o
497          $(CC) $(CFLAGS) -o myprog myprog.o $(LIBS)
498       </screen>
499      </para>
500     <para>
501      The CFLAGS variable consists of a C compiler directive that will set
502      the include path to the <emphasis>parent</emphasis> directory
503      of <filename>yaz</filename>. That is, if &yaz; header files were
504      installed in <filename>/usr/local/include/yaz</filename>,
505      then include path is set to <filename>/usr/local/include</filename>.
506      Therefore, in your applications you should use
507      <screen>
508       #include &lt;yaz/proto.h>
509      </screen>
510      and <emphasis>not</emphasis>
511      <screen>
512       #include &lt;proto.h>
513      </screen>
514     </para>
515     <para>
516      For Libtool users, the <filename>yaz-config</filename> script provides
517      a different variant of option <literal>--libs</literal>, called
518      <literal>--lalibs</literal> that returns the name of the
519      Libtool archive(s) for &yaz; rather than the ordinary ones.
520     </para>
521     <para>
522      For applications using the threaded version of &yaz;,
523      specify <literal>threads</literal> after the
524      other options. When <literal>threads</literal> is given,
525      more flags and linker flags will be printed by
526      <filename>yaz-config</filename>. If our previous example was
527       using threads, you'd have to modify the lines that set
528      <literal>CFLAGS</literal> and <literal>LIBS</literal> as
529      follows:
530      <screen>
531       CFLAGS=`$(YAZCONFIG) --cflags threads`
532       LIBS=`$(YAZCONFIG) --libs threads`
533      </screen>
534      There is no need specify POSIX thread libraries in your Makefile.
535      The <literal>LIBS</literal> variable includes that as well.
536     </para>
537    </sect2>
538   </sect1>
539   <sect1 id="installation.win32"><title>WIN32</title>
540
541    <para>The easiest way to install YAZ on Windows is by downloading
542     an installer from
543     <ulink url="&url.yaz.download.win32;">here</ulink>.
544     The installer comes with source too - in case you wish to
545     compile YAZ with different compiler options, etc.
546    </para>
547
548    <sect2 id="installation.win32.source">
549     <title>Compiling from Source on WIN32</title>
550     <para>
551      &yaz; is shipped with "makefiles" for the NMAKE tool that comes
552      with <ulink url="&url.vstudio;">
553      Microsoft Visual Studio</ulink>. It has been tested with
554      Microsoft Visual Studio 2003/2005/2008.
555     </para>
556     <para>
557      Start a command prompt and switch the sub directory
558      <filename>WIN</filename> where the file <filename>makefile</filename>
559      is located. Customize the installation by editing the
560      <filename>makefile</filename> file (for example by using notepad).
561
562      The following summarizes the most important settings in that file:
563
564      <variablelist>
565       <varlistentry><term><literal>DEBUG</literal></term>
566        <listitem><para>
567          If set to 1, the software is
568          compiled with debugging libraries (code generation is
569          multi-threaded debug DLL).
570          If set to 0, the software is compiled with release libraries
571          (code generation is multi-threaded DLL).
572         </para></listitem>
573       </varlistentry>
574       <varlistentry>
575        <term><literal>HAVE_TCL</literal>, <literal>TCL</literal></term>
576        <listitem><para>
577          If <literal>HAVE_TCL</literal> is set to 1, nmake will
578          use the ASN.1 compiler (<ulink url="&url.tcl;">Tcl</ulink> based).
579          You must set <literal>TCL</literal> to the full path of the Tcl
580          interpreter. A Windows version of Tcl is part of
581          <ulink url="&url.gitwindows;">Git for Windows</ulink>.
582         </para>
583         <para>
584          If you do not have Tcl installed, set
585          <literal>HAVE_TCL</literal> to 0.
586         </para></listitem>
587       </varlistentry>
588
589       <varlistentry>
590        <term><literal>HAVE_BISON</literal>,
591         <literal>BISON</literal></term>
592        <listitem><para>
593          If GNU Bison is present, you might set <literal>HAVE_BISON</literal>
594          to 1 and specify the Bison executable in <literal>BISON</literal>.
595          Bison is only required if you use the git version of
596          YAZ or if you modify the grammar for CQL
597          (<filename>cql.y</filename>).
598         </para>
599         <para>
600          A Windows version of GNU Bison is part of
601          <ulink url="&url.gitwindows;">Git for Windows</ulink>.
602         </para></listitem>
603       </varlistentry>
604
605       <varlistentry>
606        <term><literal>HAVE_ICONV</literal>,
607         <literal>ICONV_DIR</literal></term>
608        <listitem><para>
609          If <literal>HAVE_ICONV</literal> is set to 1, YAZ is compiled
610          with iconv support. In this configuration, set
611          <literal>ICONV_DIR</literal> to the iconv source directory.
612         </para></listitem>
613       </varlistentry>
614
615       <varlistentry>
616        <term><literal>HAVE_LIBXML2</literal>,
617         <literal>LIBXML2_DIR</literal></term>
618        <listitem>
619         <para>
620          If <literal>HAVE_LIBXML2</literal> is set to 1, YAZ is compiled
621          with SRU support. In this configuration, set
622          <literal>LIBXML2_DIR</literal> to the
623          <ulink url="&url.libxml2;">libxml2</ulink> source directory
624          and
625          <literal>ZLIB_DIR</literal> to the zlib directory.
626         </para>
627
628         <para>
629          Windows versions of libxslt, libxml2, zlib and iconv can be found
630          <ulink url="&url.libxml2.download.win32;">
631           Igor Zlatkovi&#x0107;' site</ulink>.
632         </para>
633
634         <note>
635          <para>
636           YAZ is not using zlib but libxml2 is depending on it.
637          </para>
638         </note>
639        </listitem>
640       </varlistentry>
641
642       <varlistentry>
643        <term><literal>HAVE_LIBXSLT</literal>,
644         <literal>LIBXSLT_DIR</literal></term>
645        <listitem>
646         <para>
647          If <literal>HAVE_LIBXSLT</literal> is set to 1, YAZ is compiled
648          with XSLT support. In this configuration, set
649          <literal>LIBXSLT_DIR</literal> to the
650          <ulink url="&url.libxslt;">libxslt</ulink> source directory.
651         </para>
652
653         <note>
654          <para>
655           libxslt depends libxml2.
656          </para>
657         </note>
658        </listitem>
659       </varlistentry>
660
661       <varlistentry>
662        <term><literal>HAVE_ICU</literal>,
663         <literal>ICU_DIR</literal></term>
664        <listitem>
665         <para>
666          If <literal>HAVE_ICU</literal> is set to 1, YAZ is compiled
667          with <ulink url="&url.icu;">ICU</ulink> support.
668          In this configuration, set
669          <literal>ICU_DIR</literal> to the
670          <ulink url="&url.icu;">ICU</ulink> source directory.
671         </para>
672        </listitem>
673
674       </varlistentry>
675
676      </variablelist>
677     </para>
678     <para>
679      When satisfied with the settings in the makefile, type
680      <screen>
681       nmake
682      </screen>
683     </para>
684     <note>
685      <para>
686       If the <filename>nmake</filename> command is not found on your system
687       you probably haven't defined the environment variables required to
688       use that tool. To fix that, find and run the batch file
689       <filename>vcvars32.bat</filename>. You need to run it from within
690       the command prompt or set the environment variables "globally";
691       otherwise it doesn't work.
692      </para>
693     </note>
694     <para>
695      If you wish to recompile &yaz; - for example if you modify
696      settings in the <filename>makefile</filename> you can delete
697      object files, etc by running.
698      <screen>
699       nmake clean
700      </screen>
701     </para>
702     <para>
703      The following files are generated upon successful compilation:
704
705      <variablelist>
706       <varlistentry><term><filename>bin/yaz5.dll</filename> /
707           <filename>bin/yaz5d.dll</filename></term>
708        <listitem><para>
709          &yaz; Release/Debug DLL.
710         </para></listitem></varlistentry>
711
712       <varlistentry><term><filename>lib/yaz5.lib</filename> /
713           <filename>lib/yaz5d.lib</filename></term>
714        <listitem><para>
715          Import library for <filename>yaz5.dll</filename> /
716          <filename>yaz5d.dll</filename>.
717         </para></listitem></varlistentry>
718
719       <varlistentry><term><filename>bin/yaz_cond5.dll</filename> /
720           <filename>bin/yaz_cond5d.dll</filename></term>
721        <listitem><para>
722          Release/Debug DLL for condition variable utilities (condvar.c).
723         </para></listitem></varlistentry>
724
725       <varlistentry><term><filename>lib/yaz_cond5.lib</filename> /
726           <filename>lib/yaz_cond5d.lib</filename></term>
727        <listitem><para>
728          Import library for <filename>yaz_cond5.dll</filename> /
729          <filename>yaz_cond5d.dll</filename>.
730         </para></listitem></varlistentry>
731
732       <varlistentry><term><filename>bin/yaz_icu5.dll</filename> /
733           <filename>bin/yaz_icu5d.dll</filename></term>
734        <listitem><para>
735          Release/Debug DLL for the ICU wrapper utility.
736          Only build if HAVE_ICU is 1.
737         </para></listitem></varlistentry>
738
739       <varlistentry><term><filename>lib/yaz_icu5.lib</filename> /
740           <filename>lib/yaz_icu5d.lib</filename></term>
741        <listitem><para>
742          Import library for <filename>yaz_icu5.dll</filename> /
743          <filename>yaz_icu5d.dll</filename>.
744         </para></listitem></varlistentry>
745
746       <varlistentry><term><filename>bin/yaz-ztest.exe</filename></term>
747        <listitem><para>
748          Z39.50 multi-threaded test/example server. It's a WIN32
749          console application.
750         </para></listitem></varlistentry>
751
752       <varlistentry><term><filename>bin/yaz-client.exe</filename></term>
753        <listitem><para>
754          &yaz; Z39.50 client application. It's a WIN32 console application.
755          See chapter <link linkend="yaz-client">YAZ client</link> for more
756          information.
757         </para></listitem></varlistentry>
758
759       <varlistentry><term><filename>bin/yaz-icu.exe</filename></term>
760        <listitem><para>This program exposes the ICU wrapper library if that
761          is enabled for YAZ. Only if ICU is available this program is
762          build.
763         </para></listitem></varlistentry>
764
765       <varlistentry><term><filename>bin/zoomsh.exe</filename></term>
766        <listitem><para>
767          Simple console application implemented on top of the
768          <link linkend="zoom">ZOOM</link> functions.
769          The application is a command line shell that allows you to enter
770          simple commands to perform ZOOM operations.
771         </para></listitem></varlistentry>
772
773       <varlistentry><term><filename>bin/zoomtst1.exe</filename>,
774         <filename>bin/zoomtst2.exe</filename>, ..</term>
775        <listitem><para>
776          Several small applications that demonstrates the ZOOM API.
777         </para></listitem></varlistentry>
778
779      </variablelist>
780
781     </para>
782    </sect2>
783
784    <sect2 id="installation-linking-yaz-win32">
785     <title>How to make apps using YAZ on WIN32</title>
786     <para>
787      This section will go though the process of linking your WIN32
788      applications with &yaz;.
789     </para>
790     <para>
791      Some people are confused by the fact that we use the nmake
792      tool to build &yaz;. They think they have to do that too - in order
793      to make their WIN32 applications work with &yaz;. The good news is that
794      you don't have to. You can use the integrated environment of
795      Visual Studio if desired for your own application.
796     </para>
797     <para>
798      When setting up a project or Makefile you have to set the following:
799      <variablelist>
800       <varlistentry><term>include path</term><listitem><para>
801          Set it to the <filename>include</filename> directory of &yaz;.
802         </para></listitem></varlistentry>
803       <varlistentry><term>import library <filename>yaz5.lib</filename>
804        </term><listitem><para>
805          You must link with this library. It's located in the
806          sub directory <filename>lib</filename> of &yaz;.
807          If you want to link with the debug version of &yaz;, you must
808          link against <filename>yaz5d.lib</filename> instead.
809         </para></listitem></varlistentry>
810       <varlistentry><term>dynamic link library <filename>yaz5.dll</filename>
811        </term><listitem><para>
812          This DLL must be in your execution path when you invoke
813          your application. Specifically, you should distribute this
814          DLL with your application.
815         </para></listitem></varlistentry>
816      </variablelist>
817     </para>
818    </sect2>
819   </sect1>
820  </chapter>
821
822  <!-- Keep this comment at the end of the file
823  Local variables:
824  mode: sgml
825  sgml-omittag:t
826  sgml-shorttag:t
827  sgml-minimize-attributes:nil
828  sgml-always-quote-attributes:t
829  sgml-indent-step:1
830  sgml-indent-data:t
831  sgml-parent-document: "yaz.xml"
832  sgml-local-catalogs: nil
833  sgml-namecase-general:t
834  End:
835  -->
836