1 <!-- $Id: installation.xml,v 1.7 2001-10-26 20:13:44 adam Exp $ -->
2 <chapter id="installation"><title>Compilation and Installation</title>
4 <sect1><title>Introduction</title>
6 The latest version of the software will generally be found at:
9 <ulink url="http://ftp.indexdata.dk/pub/yaz/">
10 http://ftp.indexdata.dk/pub/yaz/</ulink>
13 We have tried our best to keep the software portable, and on many
14 platforms, you should be able to compile everything with little or
16 So far, the software has been ported to the following platforms with
17 little or no difficulties.
20 <listitem><para>Unix systems</para>
22 <listitem><para>HP/UX</para></listitem>
23 <listitem><para>SunOS/Solaris</para></listitem>
24 <listitem><para>DEC Unix</para></listitem>
25 <listitem><para>OpenBSD/FreeBSD</para></listitem>
26 <listitem><para>Linux</para></listitem>
27 <listitem><para>IBM AIX</para></listitem>
28 <listitem><para>Data General DG/UX (with some CFLAGS tinkering)
30 <listitem><para>SGI/IRIX</para></listitem>
31 <listitem><para>DDE Supermax</para></listitem>
32 </itemizedlist></listitem>
33 <listitem><para>Non-unix systems</para>
35 <listitem><para>Apple Macintosh (using the Codewarrior programming
36 environment and the GUSI socket libraries)</para></listitem>
37 <listitem><para>MS Windows 95/98/NT/W2K (Win32)</para></listitem>
38 <listitem><para>IBM AS/400</para></listitem>
39 </itemizedlist></listitem>
44 If you move the software to other platforms, we'd be grateful if you'd
45 let us know about it. If you run into difficulties, we will try to help
46 if we can, and if you solve the problems, we would be happy to include
47 your fixes in the next release. So far, we have mostly avoided
48 #ifdefs for individual platforms, and we'd like to keep it that
49 way as far as it makes sense.
53 We maintain a mailing-list for the purpose of announcing new releases and
54 bug-fixes, as well as general discussion. Subscribe by sending mail to
55 <ulink url="mailto:yaz-request@indexdata.dk">
56 yaz-request@indexdata.dk
58 General questions and problems can be directed at
59 <ulink url="mailto:yaz-help@indexdata.dk">
61 </ulink>, or the address given at the top of this document.
65 <sect1 id="installation.unix"><title>UNIX</title>
68 Note that if your system doesn't have a native ANSI C compiler, you may
69 have to acquire one separately. We recommend
70 <ulink url="http://gcc.gnu.org">GCC</ulink>.
73 For UNIX, the GNU tools
74 <ulink url="http://www.gnu.org/software/autoconf/">Autoconf</ulink>,
75 <ulink url="http://www.gnu.org/software/automake/">Automake</ulink> and
76 <ulink url="http://www.gnu.org/software/libtool/">Libtool</ulink>
77 is used to generate Makefiles and configure &yaz; for the system.
78 You do <emphasis>not</emphasis> these tools unless you're using the
80 Generally it should be sufficient to run configure without options,
89 The configure script attempts to use use the C compiler specified by
90 the <literal>CC</literal> environment variable. If not set, GNU C will be
91 used if it is available. The <literal>CFLAGS</literal> environment
92 variable holds options to be passed to the C compiler. If you're using
93 Bourne-compatible shell you may pass something like this to use a
94 particular C compiler with optimization enabled:
98 CC=/opt/ccs/bin/cc CFLAGS=-O ./configure
102 To customize &yaz; the configure script also accepts a set of options.
103 The most important are:
106 <varlistentry><term><literal>--prefix </literal>path</term>
107 <listitem><para>Specifies installation prefix. This is
108 only needed if you run <literal>make install</literal> later to
109 perform a "system" installation. The prefix is
110 <literal>/usr/local</literal> if not specified.
113 <varlistentry><term><literal>--enable-tcpd</literal></term>
114 <listitem><para>The front end server will be built using Wietse's
115 <ulink url="ftp://ftp.porcupine.org/pub/security/index.html">
116 TCP wrapper library</ulink>. It allows you to allow/deny
117 clients depending on IP number. The TCP wrapper library is
118 commonly used in Linux/BSD distributions.
121 <varlistentry><term><literal>--enable-threads</literal></term>
122 <listitem><para>&yaz; will be built using POSIX threads.
123 Specifically, <constant>_REENTRANT</constant> will be defined during
131 When configured, build the software by typing:
139 The following files are generated by the make process:
141 <varlistentry><term><filename>lib/libyaz.la</filename></term>
143 Main &yaz; library. This is no ordinary library. It's
145 By default, &yaz; creates a static library in
146 <filename>lib/.libs/libyaz.a</filename>.
147 </para></listitem></varlistentry>
149 <varlistentry><term><filename>lib/libyazthread.la</filename></term>
151 When threading is supported/enabled by configure this GNU libtool
152 library is created. It includes functions that allows &yaz;
154 </para></listitem></varlistentry>
156 <varlistentry><term><filename>ztest/yaz-ztest</filename></term>
157 <listitem><para>Test Z39.50 server.
158 </para></listitem></varlistentry>
160 <varlistentry><term><filename>client/yaz-client</filename></term>
161 <listitem><para>Z39.50 client for testing the protocol.
162 See chapter <link linkend="client">
163 YAZ client</link> for more information.
164 </para></listitem></varlistentry>
166 <varlistentry><term><filename>yaz-config</filename></term>
167 <listitem><para>A Bourne-shell script, generate by configure, that
168 specifies how external applications should compile - and link with
170 </para></listitem></varlistentry>
172 <varlistentry><term><filename>yaz-comp</filename></term>
173 <listitem><para>The ASN.1 compiler for &yaz;. Requires the
174 Tcl Shell, <application>tclsh</application>, in
175 <literal>PATH</literal> to operate.
176 </para></listitem></varlistentry>
178 <varlistentry><term><filename>zoom/zoomsh</filename></term>
180 A simple shell implemented on top of the
181 <link linkend="zoom">ZOOM</link> functions.
182 The shell is a command line application that allows you to enter
183 simple commands perform to perform ZOOM operations.
184 </para></listitem></varlistentry>
186 <varlistentry><term><filename>zoom/zoomtst1</filename>,
187 <filename>zoom/zoomtst2</filename>, ..</term>
189 Several small applications that demonstrates the use of ZOOM.
190 </para></listitem></varlistentry>
196 If you wish to install &yaz; in system directories such as
197 <filename>/usr/local/bin</filename>,
198 <filename>/usr/local/lib</filename> you can type:
206 You probably need to have root access in order to perform this.
207 You must specify the <literal>--prefix</literal> option for configure if
208 you wish to install &yaz; in other directories than the default
209 <filename>/usr/local/</filename>.
213 If you wish to perform an un-installation of &yaz; use:
221 This will only work if you haven't reconfigured &yaz; (and therefore
222 changed installation prefix). Note that uninstall will not
223 remove directories created by make install, e.g.
224 <filename>/usr/local/include/yaz</filename>.
228 <sect1 id="installation.win32"><title>WIN32</title>
231 &yaz; is shipped with "makefiles" for the NMAKE tool that comes
232 with Microsoft Visual C++. Version 6 has been tested. We expect that
233 &yaz; should compile with version 5 as well.
236 Start a command prompt and switch the sub directory
237 <filename>WIN</filename> where the file <filename>makefile</filename>
238 is located. Customize the installation by editing the
239 <filename>makefile</filename> file (for example by using notepad).
241 The following summarises the most important settings in that file:
244 <varlistentry><term><literal>DEBUG</literal></term>
246 If set to 1, the software is
247 compiled with debugging libraries (code generation is
248 multi-threaded debug DLL).
249 If set to 0, the software is compiled with release libraries
250 (code generation is multi-threaded DLL).
253 <varlistentry><term><literal>TCL</literal></term>
255 Specifies the name of the Tcl shell (EXE-file).
256 You do not need setting this or installing Tcl unless you wish
257 to change or add ASN.1 for &yaz;.
263 When satisfied with the settings in the makefile type
267 If command <filename>nmake</filename> is not found on your system
268 you probably haven't defined the environment variables required to
269 use that tool. To fix that, find and run the batch file
270 <filename>vcvars32.bat</filename>. You need to run it from within
271 the command prompt or set the environment variables "globally";
272 otherwise it doesn't work.
275 If you wish to recompile &yaz; - for example if you modify
276 settings in the <filename>makefile</filename> you can delete
277 object files, etc by running.
283 The following files are generated upon successful compilation:
286 <varlistentry><term><filename>bin/yaz.dll</filename></term>
288 &yaz; multi-threaded Dynamic Link Library.
289 </para></listitem></varlistentry>
291 <varlistentry><term><filename>lib/yaz.lib</filename></term>
293 Import library for <filename>yaz.dll</filename>.
294 </para></listitem></varlistentry>
296 <varlistentry><term><filename>bin/yaz-client.exe</filename></term>
298 &yaz; Z39.50 client application. It's a WIN32 console application.
299 See chapter <link linkend="client">YAZ client</link> for more
301 </para></listitem></varlistentry>
303 <varlistentry><term><filename>bin/yaz-ztest.exe</filename></term>
305 Z39.50 multi-threaded test/example server. It's a WIN32
307 </para></listitem></varlistentry>
309 <varlistentry><term><filename>bin/zoomsh.exe</filename></term>
311 Simple console application implemented on top of the
312 <link linkend="zoom">ZOOM</link> functions.
313 The application is a command line shell that allows you to enter
314 simple commands perform to perform ZOOM operations.
315 </para></listitem></varlistentry>
317 <varlistentry><term><filename>bin/zoomtst1.exe</filename>,
318 <filename>bin/zoomtst2.exe</filename>, ..</term>
320 Several small applications that demonstrates the use of ZOOM.
321 </para></listitem></varlistentry>
329 <!-- Keep this comment at the end of the file
334 sgml-minimize-attributes:nil
335 sgml-always-quote-attributes:t
338 sgml-parent-document: "yaz.xml"
339 sgml-local-catalogs: nil
340 sgml-namecase-general:t