fcoe-utils needs to depend on specific versions
of libhbalinux. To add the dependency check in fcoe-utils'
configure.ac we need to generate a LIBHBALINUX.pc file
for libhbalinux.

Signed-off-by: Robert Love <robert.w.l...@intel.com>
---
 Makefile.am       |    5 ++++-
 configure.ac      |    2 +-
 libhbalinux.pc.in |   10 ++++++++++
 3 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 libhbalinux.pc.in

diff --git a/Makefile.am b/Makefile.am
index 34d8788..1349e7b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,7 +8,10 @@ utils.c utils.h
 libhbalinux_la_LDFLAGS = -version-info 2:2:0
 libhbalinux_la_LIBADD = $(PCIACCESS_LIBS)
 
-dist_noinst_DATA = README COPYING INSTALL libhbalinux.spec
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libhbalinux.pc
+
+dist_noinst_DATA = README COPYING INSTALL libhbalinux.pc.in libhbalinux.spec
 
 install-data-hook: libhbalinux.la
        . $${PWD}/$<; \
diff --git a/configure.ac b/configure.ac
index 12973cf..4e2c170 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,6 @@ AC_SUBST(PCIACCESS_LIBS)
 PKG_CHECK_MODULES(HBAAPI, HBAAPI)
 AC_SUBST(HBAAPI_CFLAGS)
 
-AC_CONFIG_FILES([Makefile libhbalinux.spec])
+AC_CONFIG_FILES([Makefile libhbalinux.spec libhbalinux.pc])
 AC_OUTPUT
 
diff --git a/libhbalinux.pc.in b/libhbalinux.pc.in
new file mode 100644
index 0000000..b716efe
--- /dev/null
+++ b/libhbalinux.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libhbalinux
+Description: SNIA HBA API vendor library for Linux
+Version: @VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -ldl

_______________________________________________
devel mailing list
devel@open-fcoe.org
https://lists.open-fcoe.org/mailman/listinfo/devel

Reply via email to