diff options
author | Thomas Graf <tgraf@redhat.com> | 2011-09-13 22:58:08 +0200 |
---|---|---|
committer | Thomas Graf <tgraf@redhat.com> | 2011-09-13 22:58:08 +0200 |
commit | 4c210adcb572d8950fdc6b5135406e06e55f8b56 (patch) | |
tree | e4f354d4fdd7462dfa2b21c8833890bd5bb80db8 /doc | |
parent | a73cb2f26932d90a2d47a28e9c524e7f33dcffbd (diff) | |
download | libnl-4c210adcb572d8950fdc6b5135406e06e55f8b56.tar.gz |
Switch to libtool versioning system
It has been a request that multiple libnl versions should be installabe
in parallel.
In order to achieve this, the basename of the library was changed to
libnl-3 which reflects the 3rd generation of libnl APIs. It also means
that release based library versioning is left behind and libtool
versioning is used instead.
Projects using pkgconfig will automatically link against the new library
basename and will not notice a difference.
The SO versioning is based on the glib model:
current := 100 * minor + micro - revision
revision := revision
age := age (number of backwards compatible versions)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/core.txt | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/doc/core.txt b/doc/core.txt index 796e9fc..c10cbc0 100644 --- a/doc/core.txt +++ b/doc/core.txt @@ -7,7 +7,7 @@ Netlink Library (libnl) ======================= Thomas Graf <tgraf@suug.ch> -3.1, Aug 11 2011: +3.2, Sep 13 2011: :numbered: == Introduction @@ -59,6 +59,25 @@ The low level APIs are described in: === Linking to this Library +.Checking the presence using autoconf + +Projects using autoconf may use +PKG_CHECK_MODULES()+ to check if +a specific version of libnl is available on the system. The example +below also shows how to retrieve the +CFLAGS+ and linking dependencies +required to link against the library. + +[source] +---- +PKG_CHECK_MODULES(LIBNL3, libnl-3.0 >= 3.1, [have_libnl3=yes], [have_libnl3=no]) +if (test "${have_libnl3}" = "yes"); then + CFLAGS += "$LIBNL3_CFLAGS" + LIBS += "$LIBNL3_LIBS" +fi +---- + +NOTE: The pkgconfig file is named +libnl-3.0.pc+ for historic reasons, it also + covers library versions >= 3.1. + .Main Header The main header is `<netlink/netlink.h>`. Additional headers need to @@ -77,7 +96,7 @@ makes use of. .Linking to libnl ----- -$ gcc myprogram.c -o myprogram -lnl +$ gcc myprogram.c -o myprogram $(pkgconfig --cflags --libs libnl-3.0) ----- === Debugging |