+
+ <para>
+ The configure script attempts to use use the C compiler specified by
+ the <literal>CC</literal> environment variable. If not set, GNU C will be
+ used if it is available. The <literal>CFLAGS</literal> environment
+ variable holds options to be passed to the C compiler. If you're using
+ Bourne-compatible shell you may pass something like this to use a
+ particular C compiler with optimization enabled:
+ </para>
+
+ <screen>
+ CC=/opt/ccs/bin/cc CFLAGS=-O ./configure
+ </screen>
+
+ <para>
+ To customize &yaz;, the configure script also accepts a set of options.
+ The most important are:
+
+ <variablelist>
+ <varlistentry><term>
+ <literal>--prefix</literal>=<replaceable>prefix</replaceable></term>
+ <listitem><para>Specifies installation prefix for &yaz;. This is
+ only needed if you run <literal>make install</literal> later to
+ perform a "system" installation. The prefix is
+ <literal>/usr/local</literal> if not specified.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry><term><literal>--enable-tcpd</literal></term>
+ <listitem><para>The front end server will be built using Wietse's
+ <ulink url="&url.tcpwrapper;">TCP wrapper library</ulink>.
+ It allows you to allow/deny clients depending on IP number.
+ The TCP wrapper library is often used in GNU/Linux and
+ BSD distributions.
+ See
+ <citerefentry>
+ <refentrytitle>hosts_access</refentrytitle>
+ <manvolnum>5</manvolnum>
+ </citerefentry>
+ and
+ <citerefentry>
+ <refentrytitle>tcpd</refentrytitle>
+ <manvolnum>8</manvolnum>
+ </citerefentry>.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><literal>--enable-threads</literal></term>
+ <listitem><para>&yaz; will be built using POSIX threads.
+ Specifically, <constant>_REENTRANT</constant> will be defined during
+ compilation.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><literal>--disable-shared</literal></term>
+ <listitem><para>The make process will not create shared
+ libraries (also known as shared objects <filename>.so</filename>).
+ By default, shared libraries are created -
+ equivalent to <literal>--enable-shared</literal>.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><literal>--disable-shared</literal></term>
+ <listitem><para>The make process will not create
+ static libraries (<filename>.a</filename>).
+ By default, static libraries are created -
+ equivalent to <literal>--enable-static</literal>.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>
+ <literal>--with-iconv</literal>[=<replaceable>prefix</replaceable>]
+ </term>
+ <listitem><para>Compile &yaz; with iconv library in directory
+ <replaceable>prefix</replaceable>. By default configure will
+ search for iconv on the system. Use this option if it
+ doesn't find iconv. Alternatively,
+ <literal>--without-iconv</literal>, can be uset to force &yaz;
+ not to use iconv.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>
+ <literal>--with-xslt</literal>[=<replaceable>prefix</replaceable>]
+ </term>
+ <listitem><para>Compile &yaz; with
+ <ulink url="&url.libxslt;">libxslt</ulink> in directory
+ <replaceable>prefix</replaceable>.
+ Use this option if you want XSLT and XML support.
+ By default, configure will
+ search for libxslt on the system. Use this option if it
+ libxslt is not found automatically. Alternatively,
+ <literal>--without-xslt</literal>, can be used to force &yaz;
+ not to use libxslt.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry><term>
+ <literal>--with-xml2</literal>[=<replaceable>prefix</replaceable>]
+ </term>
+ <listitem><para>Compile &yaz; with
+ <ulink url="&url.libxml2;">libxml2</ulink> in directory
+ <replaceable>prefix</replaceable>.
+ Use this option if you want &yaz; to use XML and support SRU.
+ By default, configure will
+ search for libxml2 on the system. Use this option if it
+ libxml2 is not found automatically. Alternatively,
+ <literal>--without-xml2</literal>, can be used to force &yaz;
+ not to use libxml2.
+ </para>
+ <para>
+ Note that option <literal>--with-xslt</literal>
+ also enables libxml2.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry><term>
+ <literal>--with-gnutls</literal>[=<replaceable>prefix</replaceable>]
+ </term>
+ <listitem><para>&yaz; will be linked with the GNU TLS libraries and
+ an SSL COMSTACK will be provided. By default configure enables
+ SSL support for YAZ if the GNU TLS development libraries are found
+ on the system.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>
+ <literal>--with-openssl</literal>[=<replaceable>prefix</replaceable>]
+ </term>
+ <listitem><para>&yaz; will be linked with the OpenSSL libraries and
+ an SSL COMSTACK will be provided. If OpenSSL is enabled, GNU TLS
+ is automatically disabled.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term>
+ <literal>--with-icu</literal>[=<replaceable>prefix</replaceable>]
+ </term>
+ <listitem><para>&yaz; will be linked the
+ <ulink url="&url.icu;">ICU</ulink> library in the prefix if given.
+ If prefix is not given, the libraries exposed by the script
+ <application>icu-config</application> will be used if found.
+ </para></listitem>
+ </varlistentry>
+
+ </variablelist>
+
+ </para>
+ <para>
+ When configured, build the software by typing:
+ <screen>
+ make
+ </screen>
+ </para>
+
+ <para>
+ The following files are generated by the make process:
+ <variablelist>
+ <varlistentry><term><filename>src/libyaz.la</filename></term>
+ <listitem><para>
+ Main &yaz; library. This is no ordinary library. It's
+ a Libtool archive.
+ By default, &yaz; creates a static library in
+ <filename>lib/.libs/libyaz.a</filename>.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><filename>src/libyaz_server.la</filename></term>
+ <listitem><para>
+ Generic Frontend server. This is an add-on for libyaz.la.
+ Code in this library uses POSIX threads functions - if POSIX
+ threads are available on the platform.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><filename>src/libyaz_icu.la</filename></term>
+ <listitem><para>
+ Functions that wrap the ICU library.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><filename>ztest/yaz-ztest</filename></term>
+ <listitem><para>Test Z39.50 server.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><filename>client/yaz-client</filename></term>
+ <listitem><para>Z39.50 client for testing the protocol.
+ See chapter <link linkend="yaz-client">
+ YAZ client</link> for more information.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><filename>util/yaz-config</filename></term>
+ <listitem><para>A Bourne-shell script, generated by configure, that
+ specifies how external applications should compile - and link with
+ &yaz;.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><filename>util/yaz-asncomp</filename></term>
+ <listitem><para>The ASN.1 compiler for &yaz;. Requires the
+ Tcl Shell, <application>tclsh</application>, in
+ <literal>PATH</literal> to operate.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><filename>util/yaz-iconv</filename></term>
+ <listitem><para>This program converts data in one character set to
+ another. This command exercises the YAZ character set
+ conversion API.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><filename>util/yaz-marcdump</filename></term>
+ <listitem><para>This program parses ISO2709 encoded MARC records
+ and prints them in line-format or XML.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><filename>util/yaz-icu</filename></term>
+ <listitem><para>This program exposes the ICU wrapper library if that
+ is enabled for YAZ. Only if ICU is available this program is
+ useful.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><filename>zoom/zoomsh</filename></term>
+ <listitem><para>
+ A simple shell implemented on top of the
+ <link linkend="zoom">ZOOM</link> functions.
+ The shell is a command line application that allows you to enter
+ simple commands to perform ZOOM operations.
+ </para></listitem>
+ </varlistentry>
+
+ <varlistentry><term><filename>zoom/zoomtst1</filename>,
+ <filename>zoom/zoomtst2</filename>, ..</term>
+ <listitem><para>
+ Several small applications that demonstrates the ZOOM API.
+ </para></listitem>
+ </varlistentry>
+ </variablelist>
+
+ </para>
+
+ <para>
+ If you wish to install &yaz; in system directories
+ <filename>/usr/local/bin</filename>,
+ <filename>/usr/local/lib</filename> .. etc, you can type:
+ </para>
+
+ <screen>
+ make install
+ </screen>
+
+ <para>
+ You probably need to have root access in order to perform this.
+ You must specify the <literal>--prefix</literal> option for configure if
+ you wish to install &yaz; in other directories than the default
+ <filename>/usr/local/</filename>.
+ </para>
+
+ <para>
+ If you wish to perform an un-installation of &yaz;, use:
+ </para>
+
+ <screen>
+ make uninstall
+ </screen>
+
+ <para>
+ This will only work if you haven't reconfigured &yaz; (and therefore
+ changed installation prefix). Note that uninstall will not
+ remove directories created by make install, e.g.
+ <filename>/usr/local/include/yaz</filename>.
+ </para>
+ </sect2>
+
+ <sect2 id="installation-linking-yaz-unix">
+ <title>How to make apps using YAZ on UNIX</title>
+ <para>
+ This section describes how to compile - and link your own
+ applications using the &yaz; toolkit.
+ If you're used to Makefiles this shouldn't be hard. As for
+ other libraries you have used before, you have to set a proper include
+ path for your C/C++ compiler and specify the location of
+ &yaz; libraries. You can do it by hand, but generally we suggest
+ you use the <filename>yaz-config</filename> that is generated
+ by <filename>configure</filename>. This is especially
+ important if you're using the threaded version of &yaz; which
+ require you to pass more options to your linker/compiler.
+ </para>
+ <para>
+ The <filename>yaz-config</filename> script accepts command line
+ options that makes the <filename>yaz-config</filename> script print
+ options that you should use in your make process.
+ The most important ones are:
+ <literal>--cflags</literal>, <literal>--libs</literal>
+ which prints C compiler flags, and linker flags respectively.
+ </para>
+ <para>
+ A small and complete <literal>Makefile</literal> for a C
+ application consisting of one source file,
+ <filename>myprog.c</filename>, may look like this:
+ <screen>
+ YAZCONFIG=/usr/local/bin/yaz-config
+ CFLAGS=`$(YAZCONFIG) --cflags`
+ LIBS=`$(YAZCONFIG) --libs`
+ myprog: myprog.o
+ $(CC) $(CFLAGS) -o myprog myprog.o $(LIBS)
+ </screen>
+ </para>
+ <para>
+ The CFLAGS variable consists of a C compiler directive that will set
+ the include path to the <emphasis>parent</emphasis> directory
+ of <filename>yaz</filename>. That is, if &yaz; header files were
+ installed in <filename>/usr/local/include/yaz</filename>,
+ then include path is set to <filename>/usr/local/include</filename>.
+ Therefore, in your applications you should use
+ <screen>
+ #include <yaz/proto.h>
+ </screen>
+ and <emphasis>not</emphasis>
+ <screen>
+ #include <proto.h>
+ </screen>
+ </para>
+ <para>
+ For Libtool users, the <filename>yaz-config</filename> script provides
+ a different variant of option <literal>--libs</literal>, called
+ <literal>--lalibs</literal> that returns the name of the
+ Libtool archive(s) for &yaz; rather than the ordinary ones.
+ </para>
+ <para>
+ For applications using the threaded version of &yaz;,
+ specify <literal>threads</literal> after the
+ other options. When <literal>threads</literal> is given,
+ more flags and linker flags will be printed by
+ <filename>yaz-config</filename>. If our previous example was
+ using threads, you'd have to modify the lines that set
+ <literal>CFLAGS</literal> and <literal>LIBS</literal> as
+ follows:
+ <screen>
+ CFLAGS=`$(YAZCONFIG) --cflags threads`
+ LIBS=`$(YAZCONFIG) --libs threads`
+ </screen>
+ There is no need specify POSIX thread libraries in your Makefile.
+ The <literal>LIBS</literal> variable includes that as well.
+ </para>
+ </sect2>
+ </sect1>
+ <sect1 id="installation.win32"><title>WIN32</title>
+
+ <para>The easiest way to install YAZ on Windows is by downloading
+ an installer from
+ <ulink url="&url.yaz.download.win32;">here</ulink>.
+ The installer comes with source too - in case you wish to
+ compile YAZ with different Compiler options etc.