source: trunk/gsdl/packages/yaz/doc/yaz-2.html@ 1343

Last change on this file since 1343 was 1343, checked in by johnmcp, 24 years ago

Added the YAZ toolkit source to the packages directory (for z39.50 stuff)

  • Property svn:keywords set to Author Date Id Revision
File size: 6.1 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2<HTML>
3<HEAD>
4 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
5 <TITLE>YAZ User's Guide and Reference: Compilation and Installation</TITLE>
6 <LINK HREF="yaz-3.html" REL=next>
7 <LINK HREF="yaz-1.html" REL=previous>
8 <LINK HREF="yaz.html#toc2" REL=contents>
9</HEAD>
10<BODY>
11<A HREF="yaz-3.html">Next</A>
12<A HREF="yaz-1.html">Previous</A>
13<A HREF="yaz.html#toc2">Contents</A>
14<HR>
15<H2><A NAME="s2">2. Compilation and Installation</A></H2>
16
17<P>The latest version of the software will generally be found at
18<P>
19<BLOCKQUOTE><CODE>
20<PRE>
21http://ftp.indexdata.dk/pub/yaz/
22</PRE>
23</CODE></BLOCKQUOTE>
24<P>We have tried our best to keep the software portable, and on many
25platforms, you should be able to compile everything with little or no changes.
26So far, the software has been ported
27to the following platforms with little or no difficulties.
28<P>
29<UL>
30<LI>Unix systems
31<UL>
32<LI>HP/UX</LI>
33<LI>SunOS/Solaris</LI>
34<LI>DEC Unix</LI>
35<LI>Linux</LI>
36<LI>IBM AIX</LI>
37<LI>Data General DG/UX (with some CFLAGS tinkering)</LI>
38<LI>SGI/IRIX</LI>
39<LI>DDE Supermax</LI>
40</UL>
41</LI>
42<LI>Non-unix systems
43<UL>
44<LI>Apple Macintosh (using the Codewarrior programming environment and the
45GUSI socket libraries)</LI>
46<LI>MS Windows 95/NT (Win32)</LI>
47<LI>IBM AS/400</LI>
48</UL>
49</LI>
50</UL>
51<P>If you move the software to other platforms, we'd be grateful if you'd
52let us know about it. If you run into difficulties, we will try to help if we
53can, and if you solve the problems, we would be happy to
54include your fixes in the next release. So far, we have mostly avoided
55#ifdefs for individual platforms, and we'd like to keep it that
56way as far as it makes sense.
57<P>We maintain a mailing-list for the purpose of announcing new releases and
58bug-fixes, as well as general discussion. Subscribe by sending mail to
59<CODE>[email protected]</CODE>. General questions and problems can be
60directed at <CODE>[email protected]</CODE>, or the address given at the top
61of this document.
62<P>
63<H2><A NAME="ss2.1">2.1 UNIX</A>
64</H2>
65
66<P>Note that if your system doesn't have a native ANSI C compiler, you may
67have to acquire one separately. We recommend gcc.
68<P>For UNIX we use GNU configure to create Makefiles for YAZ.
69Generally it should be sufficient to run configure without options:
70<P>
71<BLOCKQUOTE><CODE>
72<PRE>
73./configure
74</PRE>
75</CODE></BLOCKQUOTE>
76<P>The configure script attempts to use use the C compiler specified by
77the <CODE>CC</CODE> environment variable. If not set, GNU C will be used
78if it is available. The <CODE>CFLAGS</CODE> environment variable holds options
79to be passed to the C compiler. If you're using Bourne-compatible shell
80you may pass something like this to use a particular C compiler with
81optimization enabled:
82<BLOCKQUOTE><CODE>
83<PRE>
84 CC=/opt/ccs/bin/cc CFLAGS=-O ./configure
85</PRE>
86</CODE></BLOCKQUOTE>
87<P>To customize <B>YAZ</B> the configure script also accepts a set of options.
88The most important are:
89<P>
90<DL>
91<DT><B><CODE>-</CODE><CODE>-prefix </CODE>path</B><DD><P>Specifies installation prefix. This is
92only needed if you run <CODE>make install</CODE> later to perform a
93"system" installation. The prefix is <CODE>/usr/local</CODE> if not
94specified.
95<P>
96<DT><B><CODE>-</CODE><CODE>-enable-comp </CODE></B><DD><P>YAZ will be built using
97the ASN.1 compiler for YAZ (default). If you wish to use the
98old decoders (in sub directory asn) use <CODE>--disable-comp</CODE> instead.
99<P>
100<DT><B><CODE>-</CODE><CODE>-enable-threads</CODE></B><DD><P>YAZ will be built using
101POSIX threads. Specifically, <CODE>_REENTRANT</CODE> will be defined
102during compilation.
103</DL>
104<P>When configured, build the software by typing:
105<BLOCKQUOTE><CODE>
106<PRE>
107 make
108</PRE>
109</CODE></BLOCKQUOTE>
110<P>Developers that do modifications to <B>YAZ</B> may wish to run
111<CODE>make depend</CODE> as well to generate object-header file
112dependencies.
113<P>The following files are generated by make
114<DL>
115<DT><B><CODE>lib/libyaz.a</CODE></B><DD><P>The <B>YAZ</B> programmers' library.
116<P>
117<DT><B><CODE>ztest/yaz-ztest</CODE></B><DD><P>A test Z39.50 server.
118<P>
119<DT><B><CODE>client/yaz-client</CODE></B><DD><P>A command mode Z39.50 client.
120<P>
121<DT><B><CODE>yaz-config</CODE></B><DD><P>A Bourne-shell script that holds build
122settings for <B>YAZ</B>.
123<P>
124</DL>
125<P>If you wish to install <B>YAZ</B> in system directories such as /usr/local/bin,
126/usr/local/lib) you can type:
127<P>
128<BLOCKQUOTE><CODE>
129<PRE>
130 make install
131</PRE>
132</CODE></BLOCKQUOTE>
133<P>You probably need to have root access in order to perform this.
134You must specify the <CODE>--prefix</CODE> option for configure if you
135going to install in anything but /usr/local/.
136<P>
137<H2><A NAME="ss2.2">2.2 WIN32</A>
138</H2>
139
140<P><B>YAZ</B> is shipped with "makefiles" for the NMAKE tool that comes
141with Visual C++.
142<P>Start an MS-DOS prompt and switch the sub directory <CODE>WIN</CODE> where
143the file <CODE>makefile</CODE> is located. Customize the installation
144by editing the <CODE>makefile</CODE> file (for example by using notepad).
145<P>The following summarises the most important settings in that file:
146<P>
147<DL>
148<DT><B><CODE>NEW_Z3950</CODE></B><DD><P>If 1, the auto-generated decoder/encoders
149for Z39.50 as written by the ASN.1 compiler will be used. If 0, the old
150decoders for Z39.50 will be used. Note, when 1, the setting TCL should
151point to the Tcl shell on your system.
152<DT><B><CODE>DEBUG</CODE></B><DD><P>If set to 1, the software is
153compiled with debugging libraries. If set to 0, the software
154is compiled with release (non-debugging) libraries.
155</DL>
156<P>When satisfied with the settings in the makefile type
157<BLOCKQUOTE><CODE>
158<PRE>
159nmake
160</PRE>
161</CODE></BLOCKQUOTE>
162<P>The following is generated upon successful compilation:
163<DL>
164<DT><B><CODE>bin/yaz.dll</CODE></B><DD><P>A multithreaded DLL with everything
165except the frontend server library.
166<DT><B><CODE>lib/yaz.lib</CODE></B><DD><P>An import library for <CODE>yaz.dll</CODE>.
167<DT><B><CODE>lib/server.lib</CODE></B><DD><P>The frontend server library.
168<DT><B><CODE>bin/yaz-ztest.exe</CODE></B><DD><P>A test Z39.50 server.
169<DT><B><CODE>bin/yaz-client.exe</CODE></B><DD><P>A command mode Z39.50 client.
170</DL>
171<P>
172<HR>
173<A HREF="yaz-3.html">Next</A>
174<A HREF="yaz-1.html">Previous</A>
175<A HREF="yaz.html#toc2">Contents</A>
176</BODY>
177</HTML>
Note: See TracBrowser for help on using the repository browser.