1251877SpeterWelcome to serf, a high-performance asynchronous HTTP client library.
2251877Speter
3251877SpeterThe 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
8251877Speter  * Status: http://code.google.com/p/serf/wiki/
9251877Speter  * Site: http://code.google.com/p/serf/
10251877Speter  * Code: http://serf.googlecode.com/svn/
11251877Speter  * Issues: http://code.google.com/p/serf/issues/list
12251877Speter  * Mail: serf-dev@googlegroups.com
13251877Speter  * People: Justin Erenkrantz, Greg Stein 
14251877Speter
15251877Speter----
16251877Speter
17253895Speter1. INSTALL
18251877Speter
19253895Speter1.1. SCons build system
20251877Speter
21262339Speterserf uses SCons 2.3 for its build system. If it is not installed on
22253895Speteryour system, then you can install it onto your system. If you do not
23253895Speterhave permissions, then you can download and install the "local"
24253895Speterversion into your home directory. When installed privately, simply
25253895Spetercreate a symlink for 'scons' in your PATH to /path/to/scons/scons.py.
26251877Speter
27253895SpeterFetch the scons-local package:
28262339Speter  http://prdownloads.sourceforge.net/scons/scons-local-2.3.0.tar.gz
29251877Speter
30251877Speter
31253895Speter1.2 Building serf
32251877Speter
33253895SpeterTo build serf:
34251877Speter
35253895Speter$ scons APR=/path/to/apr APU=/path/to/apu OPENSSL=/openssl/base PREFIX=/path/to/prefix
36251877Speter
37253895SpeterThe switches are recorded into .saved_config, so they only need to be
38253895Speterspecified the first time scons is run.
39253895Speter
40253895SpeterPREFIX should specify where serf should be installed.  PREFIX defaults to
41253895Speter/usr/local.
42253895Speter
43253895SpeterThe default for the other three switches (APR, APU, OPENSSL) is /usr.
44253895Speter
45253895SpeterThe build system looks for apr-1-config at $APR/bin/apr-1-config, or
46253895Speterthe path should indicate apr-1-config itself. Similarly for the path
47253895Speterto apu-1-config.
48253895Speter
49253895SpeterOPENSSL should specify the root of the install (eg. /opt/local). The
50253895Speterincludes will be found OPENSSL/include and libraries at OPENSSL/lib.
51253895Speter
52253895SpeterIf you wish to use VPATH-style builds (where objects are created in a
53253895Speterdistinct directory from the source), you can use:
54253895Speter
55253895Speter$ scons -Y /path/to/serf/source
56253895Speter
57262339SpeterIf you plan to install the library on a system that uses different
58262339Speterpaths for architecture dependent files, specify LIBDIR. LIBDIR defaults
59262339Speterto /usr/local/lib otherwise. Example for a 64 bit GNU/Linux system:
60262339Speter
61262339Speter$ scons PREFIX=/usr/ LIBDIR=/usr/lib64
62262339Speter
63253895SpeterAt any point, the current settings can be examined:
64253895Speter
65253895Speter$ scons --help
66253895Speter
67253895Speter
68253895Speter1.3 Running the test suite
69253895Speter
70253895Speter$ scons check
71253895Speter
72253895Speter
73253895Speter1.4 Installing serf
74253895Speter
75253895Speter$ scons install
76253895Speter
77253895SpeterNote that the PREFIX variable should have been specified in a previous
78253895Speterinvocation of scons (and saved into .saved_config), or it can be
79253895Speterspecified on the install command line:
80253895Speter
81253895Speter$ scons PREFIX=/some/path install
82253895Speter
83262339SpeterDistribution package maintainers regulary install to a buildroot, and
84262339Speterwould normally use something like below in their build systems, with
85262339Speterplaceholders for the specific paths:
86253895Speter
87262339Speter$ scons PREFIX=/usr/ LIBDIR=/usr/lib64
88262339Speter$ scons install --install-sandbox=/path/to/buildroot
89262339Speter
90262339Speter
91253895Speter1.4 Cleaning up the build
92253895Speter
93253895Speter$ scons -c
94