Use AM_LDFLAGS instead of LDFLAGS
[yazpp-moved-to-github.git] / doc / installation.xml
1 <chapter id="installation">
2   <!-- $Id: installation.xml,v 1.9 2004-01-07 11:49:03 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      <varlistentry>
56       <term><literal>--with-xslt </literal>directory</term>
57       <listitem><para>
58         Specifies prefix for libxslt (and libxml2).
59         configure must be able to locate <command>xslt-config</command>
60         in PREFIX/bin. If this option is omitted, configure looks
61         for <command>xslt-config</command> in the current PATH.
62        </para></listitem>
63      </varlistentry>
64     </variablelist>
65     For the whole list of <literal>configure</literal> options, refer
66     to the help:
67     <literal>./configure --help</literal>.
68    </para>
69    <para>
70     Configure uses GCC's C/C++ compiler if available. To specify another
71     compiler, set <literal>CXX</literal>. To use other compiler flags,
72     specify <literal>CXXFLAGS</literal>. To use <literal>CC</literal> 
73     with debugging you could use:
74     <screen>
75      CXXFLAGS="-g" CXX=CC ./configure
76     </screen>
77    </para>
78    <para>
79     This is what you have after successful compilation:
80     <variablelist>
81      <varlistentry>
82       <term><literal>src/yaz-proxy</literal></term> 
83       <listitem><para>
84         The YAZ <link linkend="proxy">Z39.50 Proxy</link> utility.
85         This program gets installed in your binaries directory
86         (<parameter>prefix</parameter><literal>/bin</literal>).
87        </para></listitem>
88      </varlistentry>
89
90      <varlistentry>
91       <term><literal>lib/libyaz++.la</literal></term> 
92       <listitem><para>
93         The YAZ++ library, including the
94         <link linkend="zoom">ZOOM-C++</link> classes.
95         This library gets installed in your libraries directory
96         (<parameter>prefix</parameter><literal>/lib</literal>).
97        </para></listitem>
98      </varlistentry>
99
100      <varlistentry>
101       <term><literal>include/yaz++/*.h</literal></term> 
102       <listitem><para>
103         Various C++ header files, which you'll need for YAZ
104         development. All these are installed in your header files area
105         (<parameter>prefix</parameter><literal>/include/yaz++</literal>).
106        </para></listitem>
107      </varlistentry>
108      
109      <varlistentry>
110       <term><literal>yaz++-config</literal></term> 
111       <listitem><para>
112         A Bourne shell-script utility that returns the values of the
113         <envar>CFLAGS</envar> and <envar>LIBS</envar>
114         environment variables
115         needed in order to compile your applications with the YAZ++
116         library.  This script gets installed in your binaries directory
117         (<parameter>prefix</parameter><literal>/bin</literal>).
118        </para></listitem>
119      </varlistentry>
120
121      <varlistentry>
122       <term><literal>zoom/zclient</literal></term> 
123       <listitem><para>
124         ZOOM C++ demonstration client. This client does not
125         get installed in the system directories.
126        </para></listitem>
127      </varlistentry>
128
129      <varlistentry>
130       <term><literal>src/yaz-my-client</literal></term> 
131       <listitem><para>
132         YAZ C++ demonstration client. This client does not
133         get installed in the system directories.
134        </para></listitem>
135      </varlistentry>
136
137      <varlistentry>
138       <term><literal>src/yaz-my-server</literal></term> 
139       <listitem><para>
140         YAZ C++ demonstration server. This server does not
141         get installed in the system directories.
142        </para></listitem>
143      </varlistentry>
144     </variablelist>
145    </para>
146   </section>
147   <section id="windows">
148    <title>Building on Windows</title>
149    <para>
150     You'll find Visual Studio project files in sub directory
151     <filename>win</filename>. Open workspace <filename>yazxx.dsw</filename>
152     which includes the following projects:
153     <variablelist>
154      <varlistentry>
155       <term><literal>yazxx.dsp</literal></term>
156        <listitem><para>
157         Builds the <filename>yazxx.dll</filename>.
158        </para></listitem>
159      </varlistentry>
160      <varlistentry>
161       <term><literal>yazclient.dsp</literal></term>
162        <listitem><para>
163         Builds the sample client <filename>yazmyclient.exe</filename>.
164        </para></listitem>
165      </varlistentry>
166      <varlistentry>
167       <term><literal>yazserver.dsp</literal></term>
168        <listitem><para>
169         Builds the sample server <filename>yazmyserver.exe</filename>.
170        </para></listitem>
171      </varlistentry>
172      <varlistentry>
173       <term><literal>yazserver.dsp</literal></term>
174        <listitem><para>
175         Builds the proxy <filename>yazproxy.exe</filename>.
176        </para></listitem>
177      </varlistentry>
178      <varlistentry>
179       <term><literal>zoomxxclient.dsp</literal></term>
180        <listitem><para>
181         Builds the ZOOM C++ demo client <filename>zoomxxclient.exe</filename>.
182        </para></listitem>
183      </varlistentry>
184     </variablelist>
185    </para>
186    <para>
187     By default, the include path and library path for the projects assumes
188     that YAZ is located in <filename>..\yaz</filename> 
189     (i.e. same prefix as the YAZ++ source).
190     If YAZ is in a different directory you'll have to modify
191     the include path in 
192     <literal>Project | Settings | C/C++ | Preprocessor | Additional include
193      directories</literal>
194     and library path in
195     <literal>Project | Settings | Link | Input | Additional library
196      path</literal>.
197    </para>
198   </section>
199  </chapter>
200  <!-- Keep this comment at the end of the file
201  Local variables:
202  mode: sgml
203  sgml-omittag:t
204  sgml-shorttag:t
205  sgml-minimize-attributes:nil
206  sgml-always-quote-attributes:t
207  sgml-indent-step:1
208  sgml-indent-data:t
209  sgml-parent-document: "yaz++.xml"
210  sgml-local-catalogs: nil
211  sgml-namecase-general:t
212  End:
213  -->