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>
|
---|
21 | http://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
|
---|
25 | platforms, you should be able to compile everything with little or no changes.
|
---|
26 | So far, the software has been ported
|
---|
27 | to 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
|
---|
45 | GUSI 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
|
---|
52 | let us know about it. If you run into difficulties, we will try to help if we
|
---|
53 | can, and if you solve the problems, we would be happy to
|
---|
54 | include 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
|
---|
56 | way as far as it makes sense.
|
---|
57 | <P>We maintain a mailing-list for the purpose of announcing new releases and
|
---|
58 | bug-fixes, as well as general discussion. Subscribe by sending mail to
|
---|
59 | <CODE>[email protected]</CODE>. General questions and problems can be
|
---|
60 | directed at <CODE>[email protected]</CODE>, or the address given at the top
|
---|
61 | of 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
|
---|
67 | have to acquire one separately. We recommend gcc.
|
---|
68 | <P>For UNIX we use GNU configure to create Makefiles for YAZ.
|
---|
69 | Generally 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
|
---|
77 | the <CODE>CC</CODE> environment variable. If not set, GNU C will be used
|
---|
78 | if it is available. The <CODE>CFLAGS</CODE> environment variable holds options
|
---|
79 | to be passed to the C compiler. If you're using Bourne-compatible shell
|
---|
80 | you may pass something like this to use a particular C compiler with
|
---|
81 | optimization 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.
|
---|
88 | The most important are:
|
---|
89 | <P>
|
---|
90 | <DL>
|
---|
91 | <DT><B><CODE>-</CODE><CODE>-prefix </CODE>path</B><DD><P>Specifies installation prefix. This is
|
---|
92 | only needed if you run <CODE>make install</CODE> later to perform a
|
---|
93 | "system" installation. The prefix is <CODE>/usr/local</CODE> if not
|
---|
94 | specified.
|
---|
95 | <P>
|
---|
96 | <DT><B><CODE>-</CODE><CODE>-enable-comp </CODE></B><DD><P>YAZ will be built using
|
---|
97 | the ASN.1 compiler for YAZ (default). If you wish to use the
|
---|
98 | old 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
|
---|
101 | POSIX threads. Specifically, <CODE>_REENTRANT</CODE> will be defined
|
---|
102 | during 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
|
---|
112 | dependencies.
|
---|
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
|
---|
122 | settings 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.
|
---|
134 | You must specify the <CODE>--prefix</CODE> option for configure if you
|
---|
135 | going 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
|
---|
141 | with Visual C++.
|
---|
142 | <P>Start an MS-DOS prompt and switch the sub directory <CODE>WIN</CODE> where
|
---|
143 | the file <CODE>makefile</CODE> is located. Customize the installation
|
---|
144 | by 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
|
---|
149 | for Z39.50 as written by the ASN.1 compiler will be used. If 0, the old
|
---|
150 | decoders for Z39.50 will be used. Note, when 1, the setting TCL should
|
---|
151 | point to the Tcl shell on your system.
|
---|
152 | <DT><B><CODE>DEBUG</CODE></B><DD><P>If set to 1, the software is
|
---|
153 | compiled with debugging libraries. If set to 0, the software
|
---|
154 | is compiled with release (non-debugging) libraries.
|
---|
155 | </DL>
|
---|
156 | <P>When satisfied with the settings in the makefile type
|
---|
157 | <BLOCKQUOTE><CODE>
|
---|
158 | <PRE>
|
---|
159 | nmake
|
---|
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
|
---|
165 | except 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>
|
---|