[PATCH] Add pkgconfig files for cli/genl/nf/route libraries.

Arkadiusz Miśkiewicz arekm at maven.pl
Tue Mar 29 07:59:01 EDT 2011


This patch adds pkgconfig (.pc) files for cli/genl/nf/route libraries
allowing to use PKG_CHECK_MODULES() m4 maco for their detection.

Signed-off-by: Arkadiusz Miśkiwicz <arekm at maven.pl>
---
 Makefile.am           |    5 ++++-
 configure.in          |    3 ++-
 libnl-cli-3.0.pc.in   |   10 ++++++++++
 libnl-genl-3.0.pc.in  |   10 ++++++++++
 libnl-nf-3.0.pc.in    |   10 ++++++++++
 libnl-route-3.0.pc.in |   10 ++++++++++
 6 files changed, 46 insertions(+), 2 deletions(-)
 create mode 100644 libnl-cli-3.0.pc.in
 create mode 100644 libnl-genl-3.0.pc.in
 create mode 100644 libnl-nf-3.0.pc.in
 create mode 100644 libnl-route-3.0.pc.in

diff --git a/Makefile.am b/Makefile.am
index 07017c8..6c922aa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,14 +3,17 @@
 ACLOCAL_AMFLAGS = -I m4
 
 OPT_DIRS =
+PKGCONFIGS =
 
 if ENABLE_CLI
 OPT_DIRS += src
+PKGCONFIGS += libnl-cli-3.0.pc
 endif
 
 SUBDIRS = include lib doc man $(OPT_DIRS)
 
-pkgconfig_DATA = libnl-3.0.pc
+pkgconfig_DATA = libnl-3.0.pc libnl-genl-3.0.pc libnl-nf-3.0.pc \
+		 libnl-route-3.0.pc $(PKGCONFIGS)
 
 sysconfdir = @sysconfdir@/libnl
 sysconf_DATA = etc/pktloc etc/classid
diff --git a/configure.in b/configure.in
index 43150a7..b17b00c 100644
--- a/configure.in
+++ b/configure.in
@@ -44,5 +44,6 @@ AC_CHECK_LIB([m], [pow], [], AC_MSG_ERROR([libm is required]))
 
 AC_CONFIG_FILES([Makefile doc/Doxyfile doc/Makefile lib/Makefile
 	include/Makefile src/Makefile src/lib/Makefile man/Makefile
-	libnl-3.0.pc include/netlink/version.h])
+	libnl-3.0.pc libnl-cli-3.0.pc libnl-genl-3.0.pc libnl-nf-3.0.pc
+	libnl-route-3.0.pc include/netlink/version.h])
 AC_OUTPUT
diff --git a/libnl-cli-3.0.pc.in b/libnl-cli-3.0.pc.in
new file mode 100644
index 0000000..d456675
--- /dev/null
+++ b/libnl-cli-3.0.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libnl-cli
+Description: Command Line Interface library for netlink sockets
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lnl-cli
+Cflags: -I${includedir}
diff --git a/libnl-genl-3.0.pc.in b/libnl-genl-3.0.pc.in
new file mode 100644
index 0000000..4cac98b
--- /dev/null
+++ b/libnl-genl-3.0.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libnl-genl
+Description: Generic Netlink Library
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lnl-genl
+Cflags: -I${includedir}
diff --git a/libnl-nf-3.0.pc.in b/libnl-nf-3.0.pc.in
new file mode 100644
index 0000000..5938001
--- /dev/null
+++ b/libnl-nf-3.0.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libnl-nf
+Description: Netfilter Netlink Library
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lnl-nf
+Cflags: -I${includedir}
diff --git a/libnl-route-3.0.pc.in b/libnl-route-3.0.pc.in
new file mode 100644
index 0000000..d864ea1
--- /dev/null
+++ b/libnl-route-3.0.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libnl-route
+Description: Routing Netlink Library
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lnl-route
+Cflags: -I${includedir}
-- 
1.7.4.2




More information about the libnl mailing list