similar to other patches to add pkgconfig support to libibcm.
Regards
-steve
>From aded41578cc623d31b27276b22a994b101052154 Mon Sep 17 00:00:00 2001
From: Steven Dake <[email protected]>
Date: Mon, 20 Jul 2009 18:58:39 -0700
Subject: [PATCH] Add pkgconfig infrastructure to libibcm.
---
Makefile.am | 2 ++
configure.in | 2 +-
libibcm.spec.in | 1 +
pkgconfig/Makefile.am | 25 +++++++++++++++++++++++++
pkgconfig/ibcm.pc.in | 11 +++++++++++
5 files changed, 40 insertions(+), 1 deletions(-)
create mode 100644 pkgconfig/Makefile.am
create mode 100644 pkgconfig/ibcm.pc.in
diff --git a/Makefile.am b/Makefile.am
index 4b2ad74..ef2ee7b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,6 +27,8 @@ libibcmincludedir = $(includedir)/infiniband
libibcminclude_HEADERS = include/infiniband/cm_abi.h \
include/infiniband/cm.h
+SUBDIRS = pkgconfig
+
EXTRA_DIST = include/infiniband/cm_abi.h include/infiniband/cm.h \
src/libibcm.map libibcm.spec.in
diff --git a/configure.in b/configure.in
index 4e7402d..eeccad2 100644
--- a/configure.in
+++ b/configure.in
@@ -67,5 +67,5 @@ AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes")
-AC_CONFIG_FILES([Makefile libibcm.spec])
+AC_CONFIG_FILES([Makefile pkgconfig/Makefile libibcm.spec])
AC_OUTPUT
diff --git a/libibcm.spec.in b/libibcm.spec.in
index bf2663a..5413d01 100644
--- a/libibcm.spec.in
+++ b/libibcm.spec.in
@@ -50,4 +50,5 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%{_libdir}/lib*.so
%{_libdir}/*.a
+%{_libdir}/pkgconfig/*.pc
%{_includedir}/*
diff --git a/pkgconfig/Makefile.am b/pkgconfig/Makefile.am
new file mode 100644
index 0000000..f0786ad
--- /dev/null
+++ b/pkgconfig/Makefile.am
@@ -0,0 +1,25 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+EXTRA_DIST = ibcm.pc.in
+
+target_LIBS = ibcm.pc
+
+%.pc: ibcm.pc.in Makefile
+ rm -f $...@-t $@
+ sed \
+ -e 's#@''pre...@#$(exec_prefix)#g' \
+ -e 's#@''lib...@#$(libdir)#g' \
+ -e 's#@''libvers...@#$(VERSION)#g' \
+ -e 's#@''l...@#'$(*:lib%=%)'#g' \
+ $< > $...@-t
+ chmod a-w $...@-t
+ mv $...@-t $@
+
+all-local: $(target_LIBS)
+
+install-exec-local: $(target_LIBS) $(target_PACKAGE)
+ $(INSTALL) -d $(DESTDIR)/$(libdir)/pkgconfig
+ $(INSTALL) -m 644 $(target_LIBS) $(DESTDIR)/$(libdir)/pkgconfig
+
+clean-local:
+ rm -f *.pc
diff --git a/pkgconfig/ibcm.pc.in b/pkgconfig/ibcm.pc.in
new file mode 100644
index 0000000..4a8a7e0
--- /dev/null
+++ b/pkgconfig/ibcm.pc.in
@@ -0,0 +1,11 @@
+pref...@prefix@
+exec_prefix=${prefix}
+libd...@libdir@
+includedir=${prefix}/include
+
+Name: @LIB@
+Version: @LIBVERSION@
+Description: @LIB@
+Requires:
+Libs: -L${libdir} -...@lib@
+Cflags: -I${includedir}
--
1.6.2.5
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general