xref: /freebsd/contrib/ntp/sntp/libevent/README.md (revision a466cc55373fc3cf86837f09da729535b57e69a1)
1<p align="center">
2  <img src="https://strcpy.net/libevent3.png" alt="libevent logo"/>
3</p>
4
5
6
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)
11
12
13
14# 0. BUILDING AND INSTALLATION (Briefly)
15
16## Autoconf
17
18     $ ./configure
19     $ make
20     $ make verify   # (optional)
21     $ sudo make install
22
23## CMake (General)
24
25
26The following Libevent specific CMake variables are as follows (the values being
27the default).
28
29```
30# Type of the library to build (SHARED or STATIC)
31# Default is: SHARED for MSVC, otherwise BOTH
32EVENT__LIBRARY_TYPE:STRING=DEFAULT
33
34# Installation directory for CMake files
35EVENT_INSTALL_CMAKE_DIR:PATH=lib/cmake/libevent
36
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.
39EVENT__COVERAGE:BOOL=OFF
40
41# Defines if Libevent should build without the benchmark executables
42EVENT__DISABLE_BENCHMARK:BOOL=OFF
43
44# Define if Libevent should build without support for a debug mode
45EVENT__DISABLE_DEBUG_MODE:BOOL=OFF
46
47# Define if Libevent should not allow replacing the mm functions
48EVENT__DISABLE_MM_REPLACEMENT:BOOL=OFF
49
50# Define if Libevent should build without support for OpenSSL encryption
51EVENT__DISABLE_OPENSSL:BOOL=OFF
52
53# Disable the regress tests
54EVENT__DISABLE_REGRESS:BOOL=OFF
55
56# Disable sample files
57EVENT__DISABLE_SAMPLES:BOOL=OFF
58
59# If tests should be compiled or not
60EVENT__DISABLE_TESTS:BOOL=OFF
61
62# Define if Libevent should not be compiled with thread support
63EVENT__DISABLE_THREAD_SUPPORT:BOOL=OFF
64
65# Enables verbose debugging
66EVENT__ENABLE_VERBOSE_DEBUG:BOOL=OFF
67
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
72EVENT__FORCE_KQUEUE_CHECK:BOOL=OFF
73```
74
75__More variables can be found by running `cmake -LAH <sourcedir_path>`__
76
77
78## CMake (Windows)
79
80Install CMake: <https://www.cmake.org>
81
82
83     $ md build && cd build
84     $ cmake -G "Visual Studio 10" ..   # Or whatever generator you want to use cmake --help for a list.
85     $ start libevent.sln
86
87## CMake (Unix)
88
89     $ mkdir build && cd build
90     $ cmake ..     # Default to Unix Makefiles.
91     $ make
92     $ make verify  # (optional)
93
94
95# 1. BUILDING AND INSTALLATION (In Depth)
96
97## Autoconf
98
99To build Libevent, type
100
101     $ ./configure && make
102
103
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.)
107
108You can run the regression tests by running
109
110     $ make verify
111
112Install as root via
113
114     $ make install
115
116Before reporting any problems, please run the regression tests.
117
118To enable low-level tracing, build the library as:
119
120     $ CFLAGS=-DUSE_DEBUG ./configure [...]
121
122Standard configure flags should work.  In particular, see:
123
124     --disable-shared          Only build static libraries.
125     --prefix                  Install all files relative to this directory.
126
127
128The configure script also supports the following flags:
129
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.
136
137## CMake (Windows)
138
139(Note that autoconf is currently the most mature and supported build
140environment for Libevent; the CMake instructions here are new and
141experimental, though they _should_ be solid.  We hope that CMake will
142still be supported in future versions of Libevent, and will try to
143make sure that happens.)
144
145First of all install <https://www.cmake.org>.
146
147To build Libevent using Microsoft Visual studio open the "Visual Studio Command prompt" and type:
148
149```
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.
153$ start libevent.sln
154```
155
156In the above, the ".." refers to the dir containing the Libevent source code.
157You can build multiple versions (with different compile time settings) from the same source tree
158by creating other build directories.
159
160It is highly recommended to build "out of source" when using
161CMake instead of "in source" like the normal behaviour of autoconf for this reason.
162
163The "NMake Makefiles" CMake generator can be used to build entirely via the command line.
164
165To get a list of settings available for the project you can type:
166
167```
168$ cmake -LH ..
169```
170
171### GUI
172
173CMake also provides a GUI that lets you specify the source directory and output (binary) directory
174that the build should be placed in.
175
176# 2. USEFUL LINKS:
177
178For the latest released version of Libevent, see the official website at
179<http://libevent.org/> .
180
181There's a pretty good work-in-progress manual up at
182   <http://www.wangafu.net/~nickm/libevent-book/> .
183
184For the latest development versions of Libevent, access our Git repository
185via
186
187```
188$ git clone https://github.com/libevent/libevent.git
189```
190
191You can browse the git repository online at:
192
193<https://github.com/libevent/libevent>
194
195To report bugs, issues, or ask for new features:
196
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.
200
201__Bugs, Features [RFC], and Issues__: https://github.com/libevent/libevent/issues
202> Or you can do it via the mailing list.
203
204There's also a libevent-users mailing list for talking about Libevent
205use and development:
206
207<http://archives.seul.org/libevent/users/>
208
209# 3. ACKNOWLEDGMENTS
210
211The following people have helped with suggestions, ideas, code or
212fixing bugs:
213
214 * Samy Al Bahra
215 * Antony Antony
216 * Jacob Appelbaum
217 * Arno Bakker
218 * Weston Andros Adamson
219 * William Ahern
220 * Ivan Andropov
221 * Sergey Avseyev
222 * Avi Bab
223 * Joachim Bauch
224 * Andrey Belobrov
225 * Gilad Benjamini
226 * Stas Bekman
227 * Denis Bilenko
228 * Julien Blache
229 * Kevin Bowling
230 * Tomash Brechko
231 * Kelly Brock
232 * Ralph Castain
233 * Adrian Chadd
234 * Lawnstein Chan
235 * Shuo Chen
236 * Ka-Hing Cheung
237 * Andrew Cox
238 * Paul Croome
239 * George Danchev
240 * Andrew Danforth
241 * Ed Day
242 * Christopher Davis
243 * Mike Davis
244 * Frank Denis
245 * Antony Dovgal
246 * Mihai Draghicioiu
247 * Alexander Drozdov
248 * Mark Ellzey
249 * Shie Erlich
250 * Leonid Evdokimov
251 * Juan Pablo Fernandez
252 * Christophe Fillot
253 * Mike Frysinger
254 * Remi Gacogne
255 * Artem Germanov
256 * Alexander von Gernler
257 * Diego Giagio
258 * Artur Grabowski
259 * Diwaker Gupta
260 * Kuldeep Gupta
261 * Sebastian Hahn
262 * Dave Hart
263 * Greg Hazel
264 * Nicholas Heath
265 * Michael Herf
266 * Savg He
267 * Mark Heily
268 * Maxime Henrion
269 * Michael Herf
270 * Greg Hewgill
271 * Andrew Hochhaus
272 * Aaron Hopkins
273 * Tani Hosokawa
274 * Jamie Iles
275 * Xiuqiang Jiang
276 * Claudio Jeker
277 * Evan Jones
278 * Marcin Juszkiewicz
279 * George Kadianakis
280 * Makoto Kato
281 * Phua Keat
282 * Azat Khuzhin
283 * Alexander Klauer
284 * Kevin Ko
285 * Brian Koehmstedt
286 * Marko Kreen
287 * Ondřej Kuzník
288 * Valery Kyholodov
289 * Ross Lagerwall
290 * Scott Lamb
291 * Christopher Layne
292 * Adam Langley
293 * Graham Leggett
294 * Volker Lendecke
295 * Philip Lewis
296 * Zhou Li
297 * David Libenzi
298 * Yan Lin
299 * Moshe Litvin
300 * Simon Liu
301 * Mitchell Livingston
302 * Hagne Mahre
303 * Lubomir Marinov
304 * Abilio Marques
305 * Nicolas Martyanoff
306 * Abel Mathew
307 * Nick Mathewson
308 * James Mansion
309 * Nicholas Marriott
310 * Andrey Matveev
311 * Caitlin Mercer
312 * Dagobert Michelsen
313 * Andrea Montefusco
314 * Mansour Moufid
315 * Mina Naguib
316 * Felix Nawothnig
317 * Trond Norbye
318 * Linus Nordberg
319 * Richard Nyberg
320 * Jon Oberheide
321 * John Ohl
322 * Phil Oleson
323 * Alexey Ozeritsky
324 * Dave Pacheco
325 * Derrick Pallas
326 * Tassilo von Parseval
327 * Catalin Patulea
328 * Patrick Pelletier
329 * Simon Perreault
330 * Dan Petro
331 * Pierre Phaneuf
332 * Amarin Phaosawasdi
333 * Ryan Phillips
334 * Dimitre Piskyulev
335 * Pavel Plesov
336 * Jon Poland
337 * Roman Puls
338 * Nate R
339 * Robert Ransom
340 * Balint Reczey
341 * Bert JW Regeer
342 * Nate Rosenblum
343 * Peter Rosin
344 * Maseeb Abdul Qadir
345 * Wang Qin
346 * Alex S
347 * Gyepi Sam
348 * Hanna Schroeter
349 * Ralf Schmitt
350 * Mike Smellie
351 * Steve Snyder
352 * Nir Soffer
353 * Dug Song
354 * Dongsheng Song
355 * Hannes Sowa
356 * Joakim Soderberg
357 * Joseph Spadavecchia
358 * Kevin Springborn
359 * Harlan Stenn
360 * Andrew Sweeney
361 * Ferenc Szalai
362 * Brodie Thiesfield
363 * Jason Toffaletti
364 * Brian Utterback
365 * Gisle Vanem
366 * Bas Verhoeven
367 * Constantine Verutin
368 * Colin Watt
369 * Zack Weinberg
370 * Jardel Weyrich
371 * Jay R. Wren
372 * Zack Weinberg
373 * Mobai Zhang
374 * Alejo
375 * Alex
376 * Taral
377 * propanbutan
378 * masksqwe
379 * mmadia
380 * yangacer
381 * Andrey Skriabin
382 * basavesh.as
383 * billsegall
384 * Bill Vaughan
385 * Christopher Wiley
386 * David Paschich
387 * Ed Schouten
388 * Eduardo Panisset
389 * Jan Heylen
390 * jer-gentoo
391 * Joakim Söderberg
392 * kirillDanshin
393 * lzmths
394 * Marcus Sundberg
395 * Mark Mentovai
396 * Mattes D
397 * Matyas Dolak
398 * Neeraj Badlani
399 * Nick Mathewson
400 * Rainer Keller
401 * Seungmo Koo
402 * Thomas Bernard
403 * Xiao Bao Clark
404 * zeliard
405 * Zonr Chang
406 * Kurt Roeckx
407 * Seven
408 * Simone Basso
409 * Vlad Shcherban
410 * Tim Hentenaar
411 * Breaker
412 * johnsonlee
413 * Philip Prindeville
414 * Vis Virial
415 * Andreas Gustafsson
416 * Andrey Okoshkin
417 * an-tao
418 * baixiangcpp
419 * Bernard Spil
420 * Bogdan Harjoc
421 * Carlo Marcelo Arenas Belón
422 * David Benjamin
423 * David Disseldorp
424 * Dmitry Alimov
425 * Dominic Chen
426 * dpayne
427 * ejurgensen
428 * Fredrik Strupe
429 * Gonçalo Ribeiro
430 * James Synge
431 * Jan Beich
432 * Jesse Fang
433 * Jiri Luznicky
434 * José Luis Millán
435 * Kiyoshi Aman
436 * Leo Zhang
437 * lightningkay
438 * Luke Dashjr
439 * Marcin Szewczyk
440 * Maximilian Brunner
441 * Maya Rashish
442 * Murat Demirten
443 * Nathan French
444 * Nikolay Edigaryev
445 * Philip Herron
446 * Redfoxmoon
447 * stenn
448 * SuckShit
449 * The Gitter Badger
450 * tim-le
451 * Vincent JARDIN
452 * Xiang Zhang
453 * Xiaozhou Liu
454 * yongqing.jiao
455 * Enji Cooper
456 * linxiaohui
457 * Seong-Joong Kim
458 * Tobias Stoeckmann
459 * Yury Korzhetsky
460 * zhuizhuhaomeng
461 * Pierce Lopez
462 * yuangongji
463 * Keith Smiley
464 * jeremyerb
465 * Fabrice Fontaine
466 * wenyg
467 * Aleksandr-Melnikov
468 * ayuseleznev
469 * chenguolong
470 * Dimo Markov
471 * dota17
472 * fanquake
473 * Jan Kasiak
474 * Kamil Rytarowski
475 * Mario Emmenlauer
476 * Michael Davidsaver
477 * mohuang
478 * Nick Grifka
479 * Nicolas J. Bouliane
480 * Paul Osborne
481 * Philip Homburg
482 * Wataru Ashihara
483 * William A Rowe Jr
484 * yangyongsheng
485
486
487If we have forgotten your name, please contact us.
488