mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
Merge pull request #1441 from fanquake/autoconf_doc_updates
doc: minor autoconf/formatting improvements
This commit is contained in:
commit
612a74c766
@ -3,36 +3,37 @@
|
|||||||
### Jump to:
|
### Jump to:
|
||||||
|
|
||||||
- [Prerequisites](#Prerequisites)
|
- [Prerequisites](#Prerequisites)
|
||||||
- [Autoconf](#autoconf)
|
- [Building on Unix using CMake](#building-on-unix-cmake)
|
||||||
- [Flags](#autoconf-flags)
|
- [Autotools (deprecated)](#autotools-deprecated)
|
||||||
|
- [Flags](#autotools-flags)
|
||||||
- [Building on Windows](#building-on-windows)
|
- [Building on Windows](#building-on-windows)
|
||||||
- [Building on Unix (With CMake)](#building-on-unix-cmake)
|
|
||||||
- [CMake Variables](#cmake-variables)
|
- [CMake Variables](#cmake-variables)
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
### Linux deb-like (ubuntu/debian/...)
|
### Linux deb-like (ubuntu/debian/...)
|
||||||
|
|
||||||
Just install tools using your preferred package manager if you build using autotools:
|
Install build tools using your preferred package manager. For CMake:
|
||||||
|
|
||||||
```sh
|
|
||||||
sudo apt-get install automake autoconf libtool pkg-config
|
|
||||||
```
|
|
||||||
|
|
||||||
or build using cmake:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo apt-get install cmake
|
sudo apt-get install cmake
|
||||||
```
|
```
|
||||||
|
|
||||||
Doxygen is a tool for generating documentation. Git is used to fetch the package version.
|
or using Autotools (deprecated):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo apt-get install automake autoconf libtool pkg-config
|
||||||
|
```
|
||||||
|
|
||||||
|
Doxygen is used for generating documentation.
|
||||||
|
Git is used to fetch the package version.
|
||||||
Install them if needed:
|
Install them if needed:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo apt-get install doxygen git
|
sudo apt-get install doxygen git
|
||||||
```
|
```
|
||||||
|
|
||||||
libevent has encryption layer, you need openssl or mbedTLS for it, you can
|
libevent has encryption layer, you need OpenSSL or MbedTLS for it, you can
|
||||||
install one of this using:
|
install one of this using:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@ -47,7 +48,10 @@ To run the tests, you should install zlib:
|
|||||||
sudo apt-get install zlib1g-dev
|
sudo apt-get install zlib1g-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, python interpreter should be installed if you want to run regression tests.
|
Finally, a python interpreter should be installed if you want to run regression tests:
|
||||||
|
```sh
|
||||||
|
sudo apt-get install python3
|
||||||
|
```
|
||||||
|
|
||||||
### MacOS
|
### MacOS
|
||||||
|
|
||||||
@ -82,11 +86,19 @@ or add `OPENSSL_ROOT_DIR` definition to the cmake command:
|
|||||||
cmake -DOPENSSL_ROOT_DIR=C:/path/to/OpenSSL ...
|
cmake -DOPENSSL_ROOT_DIR=C:/path/to/OpenSSL ...
|
||||||
```
|
```
|
||||||
|
|
||||||
## Autoconf
|
## Building on Unix (CMake)
|
||||||
|
```sh
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake .. # Default to Unix Makefiles
|
||||||
|
make
|
||||||
|
make verify # Optional
|
||||||
```
|
```
|
||||||
$ ./configure
|
|
||||||
$ make
|
## Autotools (deprecated)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./configure
|
||||||
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note: If you had downloaded libevent from the Git repository, then you have to run `./autogen.sh` first!**
|
**Note: If you had downloaded libevent from the Git repository, then you have to run `./autogen.sh` first!**
|
||||||
@ -107,7 +119,7 @@ To enable low-level tracing, build the library as:
|
|||||||
$ CFLAGS=-DUSE_DEBUG ./configure [...]
|
$ CFLAGS=-DUSE_DEBUG ./configure [...]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Autoconf flags
|
### Autotools flags
|
||||||
|
|
||||||
Standard configure flags should work. In particular, see:
|
Standard configure flags should work. In particular, see:
|
||||||
```
|
```
|
||||||
@ -142,15 +154,6 @@ The "NMake Makefiles" CMake generator can be used to build entirely via the comm
|
|||||||
> cmake -LH ..
|
> cmake -LH ..
|
||||||
```
|
```
|
||||||
|
|
||||||
## Building on Unix (CMake)
|
|
||||||
__Install Cmake with your distribution's package manager `apt-get`/`dnf`/etc__
|
|
||||||
```
|
|
||||||
$ mkdir build && cd build
|
|
||||||
$ cmake .. # Default to Unix Makefiles
|
|
||||||
$ make
|
|
||||||
$ make verify # Optional
|
|
||||||
```
|
|
||||||
|
|
||||||
## CMake Variables
|
## CMake Variables
|
||||||
General options:
|
General options:
|
||||||
```
|
```
|
||||||
|
43
README.md
43
README.md
@ -13,40 +13,39 @@
|
|||||||
|
|
||||||
# 1. BUILDING AND INSTALLATION
|
# 1. BUILDING AND INSTALLATION
|
||||||
|
|
||||||
See [Documentation/Building#Autoconf](/Documentation/Building.md#autoconf) for more information
|
|
||||||
|
|
||||||
## CMake (Unix)
|
## CMake (Unix)
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ mkdir build && cd build
|
mkdir build && cd build
|
||||||
$ cmake .. # Default to Unix Makefiles.
|
cmake .. # Default to Unix Makefiles.
|
||||||
$ make
|
make
|
||||||
$ make verify # (optional)
|
make verify # (optional)
|
||||||
```
|
```
|
||||||
|
|
||||||
See [Documentation/Building#Building on Unix (With CMake)](/Documentation/Building.md#building-on-unix-cmake) for more information
|
See [Documentation/Building#Building on Unix using CMake](/Documentation/Building.md#building-on-unix-cmake) for more information.
|
||||||
|
|
||||||
## CMake (Windows)
|
## CMake (Windows)
|
||||||
|
|
||||||
Install CMake: <https://www.cmake.org>
|
Install CMake: <https://www.cmake.org>
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ md build && cd build
|
md build && cd build
|
||||||
$ cmake -G "Visual Studio 10" .. # Or use any generator you want to use. Run cmake --help for a list
|
cmake -G "Visual Studio 10" .. # Or use any generator you want to use. Run cmake --help for a list
|
||||||
$ cmake --build . --config Release # Or "start libevent.sln" and build with menu in Visual Studio.
|
cmake --build . --config Release # Or "start libevent.sln" and build with menu in Visual Studio.
|
||||||
```
|
```
|
||||||
|
|
||||||
See [Documentation/Building#Building on Windows](/Documentation/Building.md#building-on-windows) for more information
|
See [Documentation/Building#Building on Windows](/Documentation/Building.md#building-on-windows) for more information.
|
||||||
|
|
||||||
## Package Managers
|
## Package Managers
|
||||||
|
|
||||||
You can download and install libevent using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
|
You can download and install libevent using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
|
||||||
|
```sh
|
||||||
git clone https://github.com/Microsoft/vcpkg.git
|
git clone https://github.com/Microsoft/vcpkg.git
|
||||||
cd vcpkg
|
cd vcpkg
|
||||||
./bootstrap-vcpkg.sh
|
./bootstrap-vcpkg.sh
|
||||||
./vcpkg integrate install
|
./vcpkg integrate install
|
||||||
./vcpkg install libevent
|
./vcpkg install libevent
|
||||||
|
```
|
||||||
|
|
||||||
The libevent port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
|
The libevent port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
|
||||||
|
|
||||||
@ -54,12 +53,14 @@ The libevent port in vcpkg is kept up to date by Microsoft team members and comm
|
|||||||
|
|
||||||
*Note, since 2.2 it is deprecated*
|
*Note, since 2.2 it is deprecated*
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make verify # (optional)
|
||||||
|
sudo make install
|
||||||
```
|
```
|
||||||
$ ./configure
|
|
||||||
$ make
|
See [Documentation/Building#Autoconf](/Documentation/Building.md#autoconf) for more information.
|
||||||
$ make verify # (optional)
|
|
||||||
$ sudo make install
|
|
||||||
```
|
|
||||||
|
|
||||||
# 2. USEFUL LINKS:
|
# 2. USEFUL LINKS:
|
||||||
|
|
||||||
@ -72,7 +73,7 @@ There's a pretty good work-in-progress manual up at
|
|||||||
For the latest development versions of Libevent, access our Git repository
|
For the latest development versions of Libevent, access our Git repository
|
||||||
via
|
via
|
||||||
|
|
||||||
```
|
```sh
|
||||||
$ git clone https://github.com/libevent/libevent.git
|
$ git clone https://github.com/libevent/libevent.git
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -92,7 +93,7 @@ __Bugs, Features [RFC], and Issues__: https://github.com/libevent/libevent/issue
|
|||||||
There's also a libevent-users mailing list for talking about Libevent
|
There's also a libevent-users mailing list for talking about Libevent
|
||||||
use and development:
|
use and development:
|
||||||
|
|
||||||
<http://archives.seul.org/libevent/users/>
|
<https://archives.seul.org/libevent/users/>
|
||||||
|
|
||||||
# 3. ACKNOWLEDGMENTS
|
# 3. ACKNOWLEDGMENTS
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user