Add pkg-config file
We're installing header file pcuif_proto.h so it's better to use
pkg-config for proper version tracking similar to the way it's done for
OpenBSC.
Change-Id: I0520045e5655794df152b98b9755d7cbbd334049
diff --git a/.gitignore b/.gitignore
index 959b09b..234ef0b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,3 +58,5 @@
debian/osmo-pcu.substvars
debian/osmo-pcu/
debian/tmp/
+
+osmo-pcu.pc
diff --git a/Makefile.am b/Makefile.am
index 12cb478..1536016 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,3 +3,5 @@
SUBDIRS = include src examples tests
EXTRA_DIST = osmoappdesc.py
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = osmo-pcu.pc
diff --git a/configure.ac b/configure.ac
index dcde2ed..54c70ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,6 +83,7 @@
AC_SUBST(STD_DEFINES_AND_INCLUDES)
AC_OUTPUT(
+ osmo-pcu.pc
include/Makefile
src/Makefile
examples/Makefile
diff --git a/debian/osmo-pcu.install b/debian/osmo-pcu.install
index 768719c..54dcc63 100644
--- a/debian/osmo-pcu.install
+++ b/debian/osmo-pcu.install
@@ -1,3 +1,4 @@
etc/osmocom/osmo-pcu.cfg
usr/bin/osmo-pcu
usr/include/osmocom/pcu/pcuif_proto.h
+usr/lib/pkgconfig/osmo-pcu.pc
diff --git a/osmo-pcu.pc.in b/osmo-pcu.pc.in
new file mode 100644
index 0000000..b72e9a8
--- /dev/null
+++ b/osmo-pcu.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/
+
+Name: OsmoPCU
+Description: Osmocom PCU implementation
+Requires:
+Version: @VERSION@
+Cflags: -I${includedir}