1362181SdimWelcome to Apache Serf, a high-performance asynchronous HTTP client library.
2251877Speter
3362181SdimThe Apache Serf library is a C-based HTTP client library built upon the Apache
4251877SpeterPortable Runtime (APR) library. It multiplexes connections, running the
5251877Speterread/write communication asynchronously. Memory copies and transformations are
6251877Speterkept to a minimum to provide high performance operation.
7251877Speter
8362181Sdim  * Site: http://serf.apache.org//
9362181Sdim  * Code: http://svn.apache.org/repos/asf/serf/
10362181Sdim  * Issues: https://issues.apache.org/jira/browse/SERF
11362181Sdim  * Mail: dev@serf.apache.org
12251877Speter  * People: Justin Erenkrantz, Greg Stein 
13251877Speter
14251877Speter----
15251877Speter
16253895Speter1. INSTALL
17251877Speter
18253895Speter1.1. SCons build system
19251877Speter
20362181SdimApache Serf uses SCons 2.3 for its build system. If it is not installed
21362181Sdimon your system, then you can install it onto your system. If you do not
22253895Speterhave permissions, then you can download and install the "local"
23253895Speterversion into your home directory. When installed privately, simply
24253895Spetercreate a symlink for 'scons' in your PATH to /path/to/scons/scons.py.
25251877Speter
26253895SpeterFetch the scons-local package:
27262324Speter  http://prdownloads.sourceforge.net/scons/scons-local-2.3.0.tar.gz
28251877Speter
29251877Speter
30362181Sdim1.2 Building Apache Serf
31251877Speter
32253895SpeterTo build serf:
33251877Speter
34253895Speter$ scons APR=/path/to/apr APU=/path/to/apu OPENSSL=/openssl/base PREFIX=/path/to/prefix
35251877Speter
36253895SpeterThe switches are recorded into .saved_config, so they only need to be
37253895Speterspecified the first time scons is run.
38253895Speter
39253895SpeterPREFIX should specify where serf should be installed.  PREFIX defaults to
40253895Speter/usr/local.
41253895Speter
42253895SpeterThe default for the other three switches (APR, APU, OPENSSL) is /usr.
43253895Speter
44253895SpeterThe build system looks for apr-1-config at $APR/bin/apr-1-config, or
45253895Speterthe path should indicate apr-1-config itself. Similarly for the path
46253895Speterto apu-1-config.
47253895Speter
48253895SpeterOPENSSL should specify the root of the install (eg. /opt/local). The
49253895Speterincludes will be found OPENSSL/include and libraries at OPENSSL/lib.
50253895Speter
51253895SpeterIf you wish to use VPATH-style builds (where objects are created in a
52253895Speterdistinct directory from the source), you can use:
53253895Speter
54253895Speter$ scons -Y /path/to/serf/source
55253895Speter
56262324SpeterIf you plan to install the library on a system that uses different
57262324Speterpaths for architecture dependent files, specify LIBDIR. LIBDIR defaults
58262324Speterto /usr/local/lib otherwise. Example for a 64 bit GNU/Linux system:
59262324Speter
60262324Speter$ scons PREFIX=/usr/ LIBDIR=/usr/lib64
61262324Speter
62253895SpeterAt any point, the current settings can be examined:
63253895Speter
64253895Speter$ scons --help
65253895Speter
66253895Speter
67253895Speter1.3 Running the test suite
68253895Speter
69253895Speter$ scons check
70253895Speter
71253895Speter
72362181Sdim1.4 Installing Apache Serf
73253895Speter
74253895Speter$ scons install
75253895Speter
76253895SpeterNote that the PREFIX variable should have been specified in a previous
77253895Speterinvocation of scons (and saved into .saved_config), or it can be
78253895Speterspecified on the install command line:
79253895Speter
80253895Speter$ scons PREFIX=/some/path install
81253895Speter
82262324SpeterDistribution package maintainers regulary install to a buildroot, and
83262324Speterwould normally use something like below in their build systems, with
84262324Speterplaceholders for the specific paths:
85253895Speter
86262324Speter$ scons PREFIX=/usr/ LIBDIR=/usr/lib64
87262324Speter$ scons install --install-sandbox=/path/to/buildroot
88262324Speter
89262324Speter
90253895Speter1.4 Cleaning up the build
91253895Speter
92253895Speter$ scons -c
93