summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Nilsson <troglobit@gmail.com>2019-10-05 08:35:08 +0200
committerJoachim Nilsson <troglobit@gmail.com>2019-10-05 08:35:08 +0200
commita6629720902151d49d5cc32f28594166c5e7fae5 (patch)
tree1f798ef976d6c7095871999c631617466830f7a1
parent8b85fdac0b4dc8b078cc0c70dcd783fdbead1bdd (diff)
downloadlibnet-a6629720902151d49d5cc32f28594166c5e7fae5.tar.gz
README: Add section on how to use libnet with pkg-config
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
-rw-r--r--README.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/README.md b/README.md
index 48e8200..09f35af 100644
--- a/README.md
+++ b/README.md
@@ -65,6 +65,34 @@ UNIX and GNU/Linux systems, see `chmcmd`, which is available in the
sudo apt install fp-utils-3.0.4
+Using -lnet
+-----------
+
+Libnet is installed as a library and a set of include files. The main
+include file to use in your program is:
+
+ #include <libnet.h>
+
+To get the correct search paths to both the header and library files,
+use the standard `pkg-config` tool:
+
+ $ pkg-config --libs --static --cflags libnet
+ -I/usr/local/include -L/usr/local/lib -lnet
+
+The prefix path `/usr/local/` shown here is only the default. Use the
+`configure` script to select a different prefix when installing libnet.
+
+For GNU autotools based projects, use the following in `configure.ac`:
+
+ # Check for required libraries
+ PKG_CHECK_MODULES([libnet], [libnet >= 1.2])
+
+and in your `Makefile.am`:
+
+ proggy_CFLAGS = $(libnet_CFLAGS)
+ proggy_LDADD = $(libnet_LIBS)
+
+
Origin & References
-------------------