2 <img src="https://strcpy.net/libevent3.png" alt="libevent logo"/>
7 [![Appveyor Win32 Build Status](https://ci.appveyor.com/api/projects/status/ng3jg0uhy44mp7ik?svg=true)](https://ci.appveyor.com/project/libevent/libevent)
8 [![Travis Build Status](https://travis-ci.org/libevent/libevent.svg?branch=master)](https://travis-ci.org/libevent/libevent)
9 [![Coverage Status](https://coveralls.io/repos/github/libevent/libevent/badge.svg)](https://coveralls.io/github/libevent/libevent)
10 [![Join the chat at https://gitter.im/libevent/libevent](https://badges.gitter.im/libevent/libevent.svg)](https://gitter.im/libevent/libevent?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
14 # 0. BUILDING AND INSTALLATION (Briefly)
20 $ make verify # (optional)
26 The following Libevent specific CMake variables are as follows (the values being
30 # Type of the library to build (SHARED or STATIC)
31 # Default is: SHARED for MSVC, otherwise BOTH
32 EVENT__LIBRARY_TYPE:STRING=DEFAULT
34 # Installation directory for CMake files
35 EVENT_INSTALL_CMAKE_DIR:PATH=lib/cmake/libevent
37 # Enable running gcov to get a test coverage report (only works with
38 # GCC/CLang). Make sure to enable -DCMAKE_BUILD_TYPE=Debug as well.
39 EVENT__COVERAGE:BOOL=OFF
41 # Defines if Libevent should build without the benchmark executables
42 EVENT__DISABLE_BENCHMARK:BOOL=OFF
44 # Define if Libevent should build without support for a debug mode
45 EVENT__DISABLE_DEBUG_MODE:BOOL=OFF
47 # Define if Libevent should not allow replacing the mm functions
48 EVENT__DISABLE_MM_REPLACEMENT:BOOL=OFF
50 # Define if Libevent should build without support for OpenSSL encryption
51 EVENT__DISABLE_OPENSSL:BOOL=OFF
53 # Disable the regress tests
54 EVENT__DISABLE_REGRESS:BOOL=OFF
56 # Disable sample files
57 EVENT__DISABLE_SAMPLES:BOOL=OFF
59 # If tests should be compiled or not
60 EVENT__DISABLE_TESTS:BOOL=OFF
62 # Define if Libevent should not be compiled with thread support
63 EVENT__DISABLE_THREAD_SUPPORT:BOOL=OFF
65 # Enables verbose debugging
66 EVENT__ENABLE_VERBOSE_DEBUG:BOOL=OFF
68 # When cross compiling, forces running a test program that verifies that Kqueue
69 # works with pipes. Note that this requires you to manually run the test program
70 # on the the cross compilation target to verify that it works. See CMake
71 # documentation for try_run for more details
72 EVENT__FORCE_KQUEUE_CHECK:BOOL=OFF
75 __More variables can be found by running `cmake -LAH <sourcedir_path>`__
80 Install CMake: <https://www.cmake.org>
83 $ md build && cd build
84 $ cmake -G "Visual Studio 10" .. # Or whatever generator you want to use cmake --help for a list.
89 $ mkdir build && cd build
90 $ cmake .. # Default to Unix Makefiles.
92 $ make verify # (optional)
95 # 1. BUILDING AND INSTALLATION (In Depth)
99 To build Libevent, type
101 $ ./configure && make
104 (If you got Libevent from the git repository, you will
105 first need to run the included "autogen.sh" script in order to
106 generate the configure script.)
108 You can run the regression tests by running
116 Before reporting any problems, please run the regression tests.
118 To enable low-level tracing, build the library as:
120 $ CFLAGS=-DUSE_DEBUG ./configure [...]
122 Standard configure flags should work. In particular, see:
124 --disable-shared Only build static libraries.
125 --prefix Install all files relative to this directory.
128 The configure script also supports the following flags:
130 --enable-gcc-warnings Enable extra compiler checking with GCC.
131 --disable-malloc-replacement
132 Don't let applications replace our memory
133 management functions.
134 --disable-openssl Disable support for OpenSSL encryption.
135 --disable-thread-support Don't support multithreaded environments.
139 (Note that autoconf is currently the most mature and supported build
140 environment for Libevent; the CMake instructions here are new and
141 experimental, though they _should_ be solid. We hope that CMake will
142 still be supported in future versions of Libevent, and will try to
143 make sure that happens.)
145 First of all install <https://www.cmake.org>.
147 To build Libevent using Microsoft Visual studio open the "Visual Studio Command prompt" and type:
150 $ cd <libevent source dir>
151 $ mkdir build && cd build
152 $ cmake -G "Visual Studio 10" .. # Or whatever generator you want to use cmake --help for a list.
156 In the above, the ".." refers to the dir containing the Libevent source code.
157 You can build multiple versions (with different compile time settings) from the same source tree
158 by creating other build directories.
160 It is highly recommended to build "out of source" when using
161 CMake instead of "in source" like the normal behaviour of autoconf for this reason.
163 The "NMake Makefiles" CMake generator can be used to build entirely via the command line.
165 To get a list of settings available for the project you can type:
173 CMake also provides a GUI that lets you specify the source directory and output (binary) directory
174 that the build should be placed in.
178 For the latest released version of Libevent, see the official website at
179 <http://libevent.org/> .
181 There's a pretty good work-in-progress manual up at
182 <http://www.wangafu.net/~nickm/libevent-book/> .
184 For the latest development versions of Libevent, access our Git repository
188 $ git clone https://github.com/libevent/libevent.git
191 You can browse the git repository online at:
193 <https://github.com/libevent/libevent>
195 To report bugs, issues, or ask for new features:
197 __Patches__: https://github.com/libevent/libevent/pulls
198 > OK, those are not really _patches_. You fork, modify, and hit the "Create Pull Request" button.
199 > You can still submit normal git patches via the mailing list.
201 __Bugs, Features [RFC], and Issues__: https://github.com/libevent/libevent/issues
202 > Or you can do it via the mailing list.
204 There's also a libevent-users mailing list for talking about Libevent
207 <http://archives.seul.org/libevent/users/>
211 The following people have helped with suggestions, ideas, code or
218 * Weston Andros Adamson
251 * Juan Pablo Fernandez
256 * Alexander von Gernler
301 * Mitchell Livingston
326 * Tassilo von Parseval
357 * Joseph Spadavecchia
367 * Constantine Verutin
421 * Carlo Marcelo Arenas Belón
479 * Nicolas J. Bouliane
487 If we have forgotten your name, please contact us.