Describe option -u and -p
[yazpp-moved-to-github.git] / doc / installation.xml
1 <chapter id="installation">
2   <!-- $Id: installation.xml,v 1.8 2003-10-24 11:18:51 adam Exp $ -->
3   <title>Installation</title>
4   <para>
5    You need a C++ compiler to compile and use YAZ++.
6    The software was implemented using GCC so we know that works
7    well with YAZ++. From time to time the software has been
8    compiled on Windows using Visual C++. Other compilers should
9    work too. Let us know of portability problems, etc. with
10    your system.
11   </para>
12   <para>
13    YAZ++ is built on top of the 
14    <ulink url="http://indexdata.dk/yaz/">YAZ</ulink>
15    toolkit.
16    You need to install that first.
17    For some platforms there are binary packages for YAZ.
18   </para>
19   <section id="unix">
20    <title>Building on Unix</title>
21    <para>On UNIX, the software is compiled as follows:
22     <screen>
23      $ ./configure
24      $ make
25      $ su
26      # make install
27     </screen>
28    </para>
29    <para>
30     You can supply options for the <literal>configure</literal> script.
31     The most useful ones are:
32     <variablelist>
33      <varlistentry>
34       <term><literal>--prefix </literal>directory</term>
35       <listitem><para>
36         Specifies installation prefix. By default
37         <literal>/usr/local</literal> is used.
38        </para></listitem>
39      </varlistentry>
40      <varlistentry>
41       <term><literal>--with-yazconfig </literal>directory</term>
42       <listitem><para>
43         Specifies the location of <filename>yaz-config</filename>.
44         The <filename>yaz-config</filename> program is generated in
45         the source directory of YAZ as well as the binaries
46         directory when YAZ is installed (via make install).
47         </para>
48        <para>
49         If you don't supply this option, <literal>configure</literal> will
50         look for <filename>yaz-config</filename> in directories of the
51         <envar>PATH</envar> environment - which is nearly always
52         what you want.
53        </para></listitem>
54      </varlistentry>
55     </variablelist>
56     For the whole list of <literal>configure</literal> options, refer
57     to the help:
58     <literal>./configure --help</literal>.
59    </para>
60    <para>
61     Configure uses GCC's C/C++ compiler if available. To specify another
62     compiler, set <literal>CXX</literal>. To use other compiler flags,
63     specify <literal>CXXFLAGS</literal>. To use <literal>CC</literal> 
64     with debugging you could use:
65     <screen>
66      CXXFLAGS="-g" CXX=CC ./configure
67     </screen>
68    </para>
69    <para>
70     This is what you have after successful compilation:
71     <variablelist>
72      <varlistentry>
73       <term><literal>src/yaz-proxy</literal></term> 
74       <listitem><para>
75         The YAZ <link linkend="proxy">Z39.50 Proxy</link> utility.
76         This program gets installed in your binaries directory
77         (<parameter>prefix</parameter><literal>/bin</literal>).
78        </para></listitem>
79      </varlistentry>
80
81      <varlistentry>
82       <term><literal>lib/libyaz++.la</literal></term> 
83       <listitem><para>
84         The YAZ++ library, including the
85         <link linkend="zoom">ZOOM-C++</link> classes.
86         This library gets installed in your libraries directory
87         (<parameter>prefix</parameter><literal>/lib</literal>).
88        </para></listitem>
89      </varlistentry>
90
91      <varlistentry>
92       <term><literal>include/yaz++/*.h</literal></term> 
93       <listitem><para>
94         Various C++ header files, which you'll need for YAZ
95         development. All these are installed in your header files area
96         (<parameter>prefix</parameter><literal>/include/yaz++</literal>).
97        </para></listitem>
98      </varlistentry>
99      
100      <varlistentry>
101       <term><literal>yaz++-config</literal></term> 
102       <listitem><para>
103         A Bourne shell-script utility that returns the values of the
104         <envar>CFLAGS</envar> and <envar>LIBS</envar>
105         environment variables
106         needed in order to compile your applications with the YAZ++
107         library.  This script gets installed in your binaries directory
108         (<parameter>prefix</parameter><literal>/bin</literal>).
109        </para></listitem>
110      </varlistentry>
111
112      <varlistentry>
113       <term><literal>zoom/zclient</literal></term> 
114       <listitem><para>
115         ZOOM C++ demonstration client. This client does not
116         get installed in the system directories.
117        </para></listitem>
118      </varlistentry>
119
120      <varlistentry>
121       <term><literal>src/yaz-my-client</literal></term> 
122       <listitem><para>
123         YAZ C++ demonstration client. This client does not
124         get installed in the system directories.
125        </para></listitem>
126      </varlistentry>
127
128      <varlistentry>
129       <term><literal>src/yaz-my-server</literal></term> 
130       <listitem><para>
131         YAZ C++ demonstration server. This server does not
132         get installed in the system directories.
133        </para></listitem>
134      </varlistentry>
135     </variablelist>
136    </para>
137   </section>
138   <section id="windows">
139    <title>Building on Windows</title>
140    <para>
141     You'll find Visual Studio project files in sub directory
142     <filename>win</filename>. Open workspace <filename>yazxx.dsw</filename>
143     which includes the following projects:
144     <variablelist>
145      <varlistentry>
146       <term><literal>yazxx.dsp</literal></term>
147        <listitem><para>
148         Builds the <filename>yazxx.dll</filename>.
149        </para></listitem>
150      </varlistentry>
151      <varlistentry>
152       <term><literal>yazclient.dsp</literal></term>
153        <listitem><para>
154         Builds the sample client <filename>yazmyclient.exe</filename>.
155        </para></listitem>
156      </varlistentry>
157      <varlistentry>
158       <term><literal>yazserver.dsp</literal></term>
159        <listitem><para>
160         Builds the sample server <filename>yazmyserver.exe</filename>.
161        </para></listitem>
162      </varlistentry>
163      <varlistentry>
164       <term><literal>yazserver.dsp</literal></term>
165        <listitem><para>
166         Builds the proxy <filename>yazproxy.exe</filename>.
167        </para></listitem>
168      </varlistentry>
169      <varlistentry>
170       <term><literal>zoomxxclient.dsp</literal></term>
171        <listitem><para>
172         Builds the ZOOM C++ demo client <filename>zoomxxclient.exe</filename>.
173        </para></listitem>
174      </varlistentry>
175     </variablelist>
176    </para>
177    <para>
178     By default, the include path and library path for the projects assumes
179     that YAZ is located in <filename>..\yaz</filename> 
180     (i.e. same prefix as the YAZ++ source).
181     If YAZ is in a different directory you'll have to modify
182     the include path in 
183     <literal>Project | Settings | C/C++ | Preprocessor | Additional include
184      directories</literal>
185     and library path in
186     <literal>Project | Settings | Link | Input | Additional library
187      path</literal>.
188    </para>
189   </section>
190  </chapter>
191  <!-- Keep this comment at the end of the file
192  Local variables:
193  mode: sgml
194  sgml-omittag:t
195  sgml-shorttag:t
196  sgml-minimize-attributes:nil
197  sgml-always-quote-attributes:t
198  sgml-indent-step:1
199  sgml-indent-data:t
200  sgml-parent-document: "yaz++.xml"
201  sgml-local-catalogs: nil
202  sgml-namecase-general:t
203  End:
204  -->