1 <!-- $Header: /home/cvsroot/yaz/doc/installation.xml,v 1.1 2001-01-04 13:36:24 adam Exp $ -->
2 <chapter><title>Compilation and Installation</title>
5 The latest version of the software will generally be found at
8 <ulink url="http://ftp.indexdata.dk/pub/yaz/">
9 http://ftp.indexdata.dk/pub/yaz/</ulink>
12 We have tried our best to keep the software portable, and on many
13 platforms, you should be able to compile everything with little or no changes.
14 So far, the software has been ported
15 to the following platforms with little or no difficulties.
18 <listitem><para>Unix systems</para>
20 <listitem><para>HP/UX</para></listitem>
21 <listitem><para>SunOS/Solaris</para></listitem>
22 <listitem><para>DEC Unix</para></listitem>
23 <listitem><para>Linux</para></listitem>
24 <listitem><para>IBM AIX</para></listitem>
25 <listitem><para>Data General DG/UX (with some CFLAGS tinkering)
27 <listitem><para>SGI/IRIX</para></listitem>
28 <listitem><para>DDE Supermax</para></listitem>
29 </itemizedlist></listitem>
30 <listitem><para>Non-unix systems</para>
32 <listitem><para>Apple Macintosh (using the Codewarrior programming
33 environment and the GUSI socket libraries)</para></listitem>
34 <listitem><para>MS Windows 95/98/NT/W2K (Win32)</para></listitem>
35 <listitem><para>IBM AS/400</para></listitem>
36 </itemizedlist></listitem>
41 If you move the software to other platforms, we'd be grateful if you'd
42 let us know about it. If you run into difficulties, we will try to help if we
43 can, and if you solve the problems, we would be happy to
44 include your fixes in the next release. So far, we have mostly avoided
45 #ifdefs for individual platforms, and we'd like to keep it that
46 way as far as it makes sense.
50 We maintain a mailing-list for the purpose of announcing new releases and
51 bug-fixes, as well as general discussion. Subscribe by sending mail to
52 <ulink url="mailto:yaz-request@indexdata.dk">yaz-request@indexdata.dk</ulink>.
53 General questions and problems can be directed at
54 <ulink url="mailto:yaz-help@indexdata.dk">yaz-help@indexdata.dk</ulink>, or
55 the address given at the top of this document.
58 <sect1><title>UNIX</title>
61 Note that if your system doesn't have a native ANSI C compiler, you may
62 have to acquire one separately. We recommend gcc.
65 For UNIX we use GNU configure to create Makefiles for &yaz;.
66 Generally it should be sufficient to run configure without options:
74 The configure script attempts to use use the C compiler specified by
75 the <literal>CC</literal> environment variable. If not set, GNU C will be
76 used if it is available. The <literal>CFLAGS</literal> environment variable
77 holds options to be passed to the C compiler. If you're using
78 Bourne-compatible shell you may pass something like this to use a
79 particular C compiler with optimization enabled:
83 CC=/opt/ccs/bin/cc CFLAGS=-O ./configure
87 To customize &yaz; the configure script also accepts a set of options.
88 The most important are:
91 <varlistentry><term><literal>--prefix </literal>path</term>
92 <listitem><para>Specifies installation prefix. This is
93 only needed if you run <literal>make install</literal> later to perform a
94 "system" installation. The prefix is <literal>/usr/local</literal> if not
99 <term><literal>--enable-comp </literal></term>
100 <listitem><para> &yaz; will be built using the ASN.1 compiler for &yaz;
101 (default). If you wish to use the old decoders (in sub directory asn)
102 use <literal>--disable-comp</literal> instead.
105 <varlistentry><term><literal>--enable-threads</literal></term>
106 <listitem><para>&yaz; will be built using POSIX threads.
107 Specifically, <constant>_REENTRANT</constant> will be defined during
115 When configured, build the software by typing:
123 The following files are generated by the make process:
125 <varlistentry><term><filename>lib/libyaz.a</filename></term>
127 The &yaz; programmers' library.
128 </para></listitem></varlistentry>
130 <varlistentry><term><filename>ztest/yaz-ztest</filename></term>
131 <listitem><para>A test Z39.50 server.
132 </para></listitem></varlistentry>
134 <varlistentry><term><filename>client/yaz-client</filename></term>
135 <listitem><para>A command mode Z39.50 client.
136 </para></listitem></varlistentry>
138 <varlistentry><term><filename>yaz-config</filename></term>
139 <listitem><para>A Bourne-shell script that holds build
141 </para></listitem></varlistentry>
143 <varlistentry><term><filename>yaz-comp</filename></term>
144 <listitem><para>The ASN.1 compiler for &yaz;. Requires the
145 Tcl Shell, <application>tclsh</application>, in current path to work.
146 </para></listitem></varlistentry>
152 If you wish to install &yaz; in system directories such as
153 <filename>/usr/local/bin</filename>,
154 <filename>/usr/local/lib</filename> you can type:
162 You probably need to have root access in order to perform this.
163 You must specify the <literal>--prefix</literal> option for configure if
164 you wish to install &yaz; in other directories than the default
165 <filename>/usr/local/</filename>.
169 If you wish to perform an un-installation of &yaz; use:
177 This will only work if you haven't reconfigured &yaz; (and therefore
178 changed installation prefix). Note that uninstall will not
179 remove directories created by make install, e.g.
180 <filename>/usr/local/include/yaz</filename>.
184 <sect1><title>WIN32</title>
187 &yaz; is shipped with "makefiles" for the NMAKE tool that comes
190 Start an MS-DOS prompt and switch the sub directory <filename>WIN</filename>
191 where the file <filename>makefile</filename> is located. Customize the
192 installation by editing the <filename>makefile</filename> file (for example
195 The following summarises the most important settings in that file:
197 <table frame="top"><title>WIN32 makefile settings</title>
201 <entry>Setting</entry>
202 <entry>Description</entry>
208 <entry><literal>NEW_Z3950</literal></entry>
209 <entry> If 1, the auto-generated decoder/encoders
210 for Z39.50 as written by the ASN.1 compiler will be used. If 0, the old
211 decoders for Z39.50 will be used. Note, when 1, the setting TCL should
212 point to the Tcl shell on your system.
217 <entry><literal>DEBUG</literal></entry>
218 <entry> If set to 1, the software is
219 compiled with debugging libraries. If set to 0, the software
220 is compiled with release (non-debugging) libraries.
225 <entry><literal>TCL</literal></entry>
226 <entry> Specifies the name of the Tcl shell (EXE-file).
227 You do not need setting this or installing Tcl unless you wish
228 to change or add ASN.1 for &yaz;.
238 When satisfied with the settings in the makefile type
244 The following files are generated upon successful compilation:
247 <varlistentry><term><filename>bin/yaz.dll</filename></term>
249 the multi-threaded &yaz; DLL.
250 </para></listitem></varlistentry>
252 <varlistentry><term><filename>bin/yaz-ztest.exe</filename></term>
254 A console Z39.50 client application.
255 </para></listitem></varlistentry>
257 <varlistentry><term><filename>bin/yaz-ztest.exe</filename></term>
259 A console Z39.50 multi threaded server.
260 </para></listitem></varlistentry>