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