Merge remote-tracking branch 'ffmancera/bug24861'
[tor/appveyor.git] / INSTALL
blobddb790b0b171439bc1948829f2e5c75c541fdd3b
2 Most users who realize that INSTALL files still exist should simply
3 follow the directions at
4 https://www.torproject.org/docs/tor-doc-unix
6 If you got the source from git, run "./autogen.sh", which will
7 run the various auto* programs. Then you can run ./configure, and
8 refer to the above instructions.
10 If it doesn't build for you:
12   If you have problems finding libraries, try
13     CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" \
14     ./configure
15   or
16     ./configure --with-libevent-dir=/usr/local
17   rather than simply ./configure.
19   If you have mysterious autoconf failures while linking openssl,
20   consider setting your LD_LIBRARY_PATH to the openssl lib directory.
21   For example, "setenv LD_LIBRARY_PATH /usr/athena/lib".
23   Lastly, check out
24   https://www.torproject.org/docs/faq#DoesntWork
26 How to do static builds of tor:
28 Tor supports linking each of the libraries it needs statically. Use the
29 --enable-static-X ./configure option in conjunction with the --with-X-dir
30 option for libevent, zlib, and openssl. For this to work sanely, libevent
31 should be built with --disable-shared --enable-static --with-pic, and
32 OpenSSL should be built with no-shared no-dso.
34 If you need to build tor so that system libraries are also statically linked,
35 use the --enable-static-tor ./configure option. This won't work on OS X
36 unless you build the required crt0.o yourself. It is also incompatible with
37 the --enable-gcc-hardening option.
39 An example of how to build a mostly static tor:
40 ./configure --enable-static-libevent \
41             --enable-static-openssl  \
42             --enable-static-zlib     \
43             --with-libevent-dir=/tmp/static-tor/libevent-1.4.14b-stable \
44             --with-openssl-dir=/tmp/static-tor/openssl-0.9.8r/ \
45             --with-zlib-dir=/tmp/static-tor/zlib-1.2.5
47 An example of how to build an entirely static tor:
48 ./configure --enable-static-tor \
49             --with-libevent-dir=/tmp/static-tor/libevent-1.4.14b-stable \
50             --with-openssl-dir=/tmp/static-tor/openssl-0.9.8r/ \
51             --with-zlib-dir=/tmp/static-tor/zlib-1.2.5