blob: b8615135b06228011bc1e96acffe22f10cca552f [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001From 8887132e85892a72a84ca3878e60f254ad2ce939 Mon Sep 17 00:00:00 2001
2From: Joe MacDonald <joe_macdonald@mentor.com>
3Date: Tue, 24 Feb 2015 15:56:06 -0500
4Subject: [PATCH] libpcap: pkgconfig support
5
6Adding basic structure to support pkg-config.
7
8Upstream-Status: Inappropriate [embedded specific]
9
10Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
11---
12 Makefile.in | 5 +++++
13 configure.in | 1 +
14 libpcap.pc.in | 10 ++++++++++
15 3 files changed, 16 insertions(+)
16 create mode 100644 libpcap.pc.in
17
18diff --git a/Makefile.in b/Makefile.in
19index 1c2d745..1f25faf 100644
20--- a/Makefile.in
21+++ b/Makefile.in
22@@ -60,6 +60,10 @@ V_RPATH_OPT = @V_RPATH_OPT@
23 DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
24 PROG=libpcap
25
26+# pkgconfig support
27+pkgconfigdir = $(libdir)/pkgconfig
28+pkgconfig_DATA = libpcap.pc
29+
30 # Standard CFLAGS
31 FULL_CFLAGS = $(CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
32
33@@ -275,6 +279,7 @@ EXTRA_DIST = \
34 lbl/os-solaris2.h \
35 lbl/os-sunos4.h \
36 lbl/os-ultrix4.h \
37+ libpcap.pc \
38 missing/snprintf.c \
39 mkdep \
40 msdos/bin2c.c \
41diff --git a/configure.in b/configure.in
42index 8f5c86b..fb51b35 100644
43--- a/configure.in
44+++ b/configure.in
45@@ -1700,6 +1700,7 @@ esac
46 AC_PROG_INSTALL
47
48 AC_CONFIG_HEADER(config.h)
49+AC_CONFIG_FILES([libpcap.pc])
50
51 AC_OUTPUT_COMMANDS([if test -f .devel; then
52 echo timestamp > stamp-h
53diff --git a/libpcap.pc.in b/libpcap.pc.in
54new file mode 100644
55index 0000000..4f78ad8
56--- /dev/null
57+++ b/libpcap.pc.in
58@@ -0,0 +1,10 @@
59+prefix=@prefix@
60+exec_prefix=@exec_prefix@
61+libdir=@libdir@
62+includedir=@includedir@
63+
64+Name: libpcap
65+Description: System-independent interface for user-level packet capture.
66+Version: @VERSION@
67+Libs: -L${libdir} -lpcap
68+Cflags: -I${includedir}
69--
701.9.1
71