[build] Adding pkg-config support

This commit is contained in:
Al
2016-02-16 11:31:02 -05:00
parent 37c09d1ed9
commit 4349a45b0f
4 changed files with 32 additions and 3 deletions

View File

@@ -201,12 +201,12 @@ Before you install, make sure you have the following prerequisites:
**On Linux (Debian)**
```
sudo apt-get install libsnappy-dev autoconf automake libtool
sudo apt-get install libsnappy-dev autoconf automake libtool pkg-config
```
**On Mac OSX**
```
sudo brew install snappy autoconf automake libtool
sudo brew install snappy autoconf automake libtool pkg-config
```
Then to install the C library:
@@ -223,6 +223,20 @@ sudo make install
sudo ldconfig
```
libpostal has support for pkg-config, so you can use the pkg-config to print the flags needed to link your program against it:
```
pkg-config --cflags libpostal # print compiler flags
pkg-config --libs libpostal # print linker flags
pkg-config --cflags --libs libpostal # print both
```
For example:
```
gcc app.c `pkg-config --cflags --libs libpostal`
```
Bindings
--------