[ovs-dev] [PATCH 07/11] lib: Add support for pkgconfig for libofproto

Thomas Graf tgraf at noironetworks.com
Wed Nov 12 14:06:05 UTC 2014


Signed-off-by: Thomas Graf <tgraf at noironetworks.com>
---
 configure.ac             |  1 +
 ofproto/.gitignore       |  1 +
 ofproto/automake.mk      |  2 ++
 ofproto/libofproto.pc.in | 11 +++++++++++
 4 files changed, 15 insertions(+)
 create mode 100644 ofproto/libofproto.pc.in

diff --git a/configure.ac b/configure.ac
index adc38a6..03dd22f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -174,6 +174,7 @@ AC_CONFIG_FILES(datapath/linux/Makefile.main)
 AC_CONFIG_FILES(include/Makefile)
 AC_CONFIG_FILES(tests/atlocal)
 AC_CONFIG_FILES(lib/libopenvswitch.pc)
+AC_CONFIG_FILES(ofproto/libofproto.pc)
 
 dnl This makes sure that include/openflow gets created in the build directory.
 AC_CONFIG_COMMANDS([include/openflow/openflow.h.stamp])
diff --git a/ofproto/.gitignore b/ofproto/.gitignore
index cd10be1..7ca3fd4 100644
--- a/ofproto/.gitignore
+++ b/ofproto/.gitignore
@@ -1,3 +1,4 @@
 /Makefile
 /Makefile.in
 /ipfix-entities.def
+/libofproto.pc
diff --git a/ofproto/automake.mk b/ofproto/automake.mk
index 6f04852..7cfbe0d 100644
--- a/ofproto/automake.mk
+++ b/ofproto/automake.mk
@@ -59,6 +59,8 @@ if WIN32
 ofproto_libofproto_la_LIBADD += ${PTHREAD_LIBS}
 endif
 
+pkgconfig_DATA += \
+	$(srcdir)/ofproto/libofproto.pc
 
 # Distribute this generated file in order not to require Python at
 # build time if ofproto/ipfix.xml is not modified.
diff --git a/ofproto/libofproto.pc.in b/ofproto/libofproto.pc.in
new file mode 100644
index 0000000..dbedcce
--- /dev/null
+++ b/ofproto/libofproto.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libofproto
+Description: OpenFlow library of Open vSwitch
+Version: @VERSION@
+Libs: -L${libdir} -lofproto
+Libs.private: @LIBS@
+Cflags: -I${includedir}/openflow
-- 
1.9.3




More information about the dev mailing list