+ <!-- $Id: installation.xml,v 1.14 2004-09-11 20:54:02 adam Exp $ -->
+ <title>Installation</title>
+ <para>
+ You need a C++ compiler to compile and use YAZ++.
+ The software was implemented using GCC so we know that works
+ well with YAZ++. From time to time the software has been
+ compiled on Windows using Visual C++. Other compilers should
+ work too. Let us know of portability problems, etc. with
+ your system.
+ </para>
+ <para>
+ YAZ++ is built on top of the
+ <ulink url="http://indexdata.dk/yaz/">YAZ</ulink>
+ toolkit.
+ You need to install that first.
+ For some platforms there are binary packages for YAZ.
+ </para>
+ <section id="unix">
+ <title>Building on Unix</title>
+ <para>On UNIX, the software is compiled as follows:
+ <screen>
+ $ ./configure
+ $ make
+ $ su
+ # make install
+ </screen>
+ </para>
+ <para>
+ You can supply options for the <literal>configure</literal> script.
+ The most useful ones are:
+ <variablelist>
+ <varlistentry>
+ <term><literal>--prefix </literal>directory</term>
+ <listitem><para>
+ Specifies installation prefix. By default
+ <literal>/usr/local</literal> is used.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>--with-yaz </literal>directory</term>
+ <listitem><para>
+ Specifies the location of <filename>yaz-config</filename>.
+ The <filename>yaz-config</filename> program is generated in
+ the source directory of YAZ as well as the binaries
+ directory when YAZ is installed (via make install).
+ </para>
+ <para>
+ If you don't supply this option, <literal>configure</literal> will
+ look for <filename>yaz-config</filename> in directories of the
+ <envar>PATH</envar> environment - which is nearly always
+ what you want.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ For the whole list of <literal>configure</literal> options, refer
+ to the help:
+ <literal>./configure --help</literal>.
+ </para>
+ <para>
+ Configure uses GCC's C/C++ compiler if available. To specify another
+ compiler, set <literal>CXX</literal>. To use other compiler flags,
+ specify <literal>CXXFLAGS</literal>. To use <literal>CC</literal>
+ with debugging you could use:
+ <screen>
+ CXXFLAGS="-g" CXX=CC ./configure
+ </screen>
+ </para>
+ <para>
+ This is what you have after successful compilation:
+ <variablelist>
+ <varlistentry>
+ <term><literal>src/libyazcpp.la</literal></term>
+ <listitem><para>
+ The YAZ++ library.
+ This library gets installed in your libraries directory
+ (<parameter>prefix</parameter><literal>/lib</literal>).
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>src/libzoomcpp.la</literal></term>
+ <listitem><para>
+ The <link linkend="zoom">ZOOM-C++</link> library.
+ This library gets installed in your libraries directory
+ (<parameter>prefix</parameter><literal>/lib</literal>).
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>include/yaz++/*.h</literal></term>
+ <listitem><para>
+ Various C++ header files, which you'll need for YAZ++
+ development. All these are installed in your header files area
+ (<parameter>prefix</parameter><literal>/include/yaz++</literal>).
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>yaz++-config</literal></term>
+ <listitem><para>
+ A Bourne shell-script utility that returns the values of the
+ <envar>CFLAGS</envar> and <envar>LIBS</envar>
+ environment variables
+ needed in order to compile your applications with the YAZ++
+ library. This script gets installed in your binaries directory
+ (<parameter>prefix</parameter><literal>/bin</literal>).
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>zoom/zclient</literal></term>
+ <listitem><para>
+ ZOOM C++ demonstration client that uses the ZOOM C++ classes.
+ This client does not get installed in the system directories.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>src/yaz-my-client</literal></term>
+ <listitem><para>
+ YAZ C++ demonstration client. This client does not
+ get installed in the system directories.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><literal>src/yaz-my-server</literal></term>
+ <listitem><para>
+ YAZ C++ demonstration server. This server does not
+ get installed in the system directories.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </section>
+ <section id="windows">
+ <title>Building on Windows</title>
+ <para>
+ YAZ++ is shipped with "makefiles" for the NMAKE tool that comes
+ with <ulink url="http://msdn.microsoft.com/vstudio/">
+ Microsoft Visual Studio</ulink>.
+ Version 6 and .NET has been tested. We expect that YAZ++ compiles
+ with version 5 as well.
+ </para>
+ <para>
+ Start a command prompt and switch the sub directory
+ <filename>WIN</filename> where the file <filename>makefile</filename>
+ is located. Customize the installation by editing the
+ <filename>makefile</filename> file (for example by using notepad).
+
+ The following summarizes the most important settings in that file:
+
+ <variablelist>
+ <varlistentry><term><literal>DEBUG</literal></term>
+ <listitem><para>
+ If set to 1, the software is
+ compiled with debugging libraries (code generation is
+ multi-threaded debug DLL).
+ If set to 0, the software is compiled with release libraries
+ (code generation is multi-threaded DLL).
+ </para></listitem>
+ </varlistentry>
+ <varlistentry><term><literal>YAZ_DIR</literal></term>
+ <listitem><para>
+ Specifies the directory of the YAZ source.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ <para>
+ When satisfied with the settings in the makefile, type
+ <screen>
+ nmake
+ </screen>
+ </para>
+ <tip>
+ <para>
+ If the <filename>nmake</filename> command is not found on your system
+ you probably haven't defined the environment variables required to
+ use that tool. To fix that, find and run the batch file
+ <filename>vcvars32.bat</filename>. You need to run it from within
+ the command prompt or set the environment variables "globally";
+ otherwise it doesn't work.
+ </para>
+ </tip>
+ <para>
+ If you wish to recompile YAZ++ - for example if you modify
+ settings in the <filename>makefile</filename> you can delete
+ object files, etc by running.
+ <screen>
+ nmake clean
+ </screen>
+ </para>
+ <para>
+ The following files are generated upon successful compilation:
+
+ <variablelist>
+ <varlistentry><term><filename>bin/yazpp.dll</filename></term>
+ <listitem><para>
+ YAZ++ DLL . Includes ZOOM C++ as well.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><filename>lib/yazpp.lib</filename></term>
+ <listitem><para>
+ Import library for <filename>yazpp.dll</filename>.
+ </para></listitem></varlistentry>
+
+ <varlistentry><term><filename>bin/zclient.exe</filename></term>
+ <listitem><para>
+ ZOOM C++ demo client. A simple WIN32 console application.
+ </para></listitem></varlistentry>
+
+ </variablelist>
+
+ </para>
+
+ </section>
+ </chapter>