summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2012-07-12 15:51:41 -0700
committerAnand Avati <avati@redhat.com>2012-07-18 12:11:37 -0700
commitdbd7aa2d6b4128faa771d616c429b3a315740cec (patch)
tree59babeff1ac4e87a0dd780a28a4b97b22530316a
parent2475e0193c4b4a37028bd8168113d6cd6949fe0e (diff)
glusterfs-api.pc: pkgconfig for API consumers
Change-Id: I08c60ff9ec5d336077c39f903720f8850d4ddc72 BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3665 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
-rw-r--r--Makefile.am10
-rw-r--r--configure.ac7
-rw-r--r--glusterfs-api.pc.in11
3 files changed, 26 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 3cdd4dfb3b3..836f17efc1b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,15 @@
-EXTRA_DIST = autogen.sh COPYING-GPLV2 COPYING-LGPLV3 INSTALL README AUTHORS THANKS NEWS glusterfs.spec
+EXTRA_DIST = autogen.sh \
+ COPYING-GPLV2 COPYING-LGPLV3 \
+ INSTALL README AUTHORS THANKS NEWS \
+ glusterfs.spec glusterfs-api.pc.in
SUBDIRS = argp-standalone libglusterfs rpc api xlators glusterfsd \
$(FUSERMOUNT_SUBDIR) doc extras cli
-CLEANFILES =
+pkgconfigdir = @pkgconfigdir@
+pkgconfig_DATA = glusterfs-api.pc
+
+CLEANFILES =
gitclean: distclean
find . -name Makefile.in -exec rm -f {} \;
diff --git a/configure.ac b/configure.ac
index 0b07c6c1f36..cef8634c04d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,6 +142,7 @@ AC_CONFIG_FILES([Makefile
xlators/mgmt/Makefile
xlators/mgmt/glusterd/Makefile
xlators/mgmt/glusterd/src/Makefile
+ glusterfs-api.pc
api/Makefile
api/src/Makefile
glusterfs.spec])
@@ -151,6 +152,12 @@ AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_LIBTOOL
+AC_ARG_WITH(pkgconfigdir,
+ [ --with-pkgconfigdir=DIR pkgconfig file in DIR @<:@LIBDIR/pkgconfig@:>@],
+ [pkgconfigdir=$withval],
+ [pkgconfigdir='${libdir}/pkgconfig'])
+AC_SUBST(pkgconfigdir)
+
AC_ARG_WITH(mountutildir,
[ --with-mountutildir=DIR mount helper utility in DIR @<:@/sbin@:>@],
[mountutildir=$withval],
diff --git a/glusterfs-api.pc.in b/glusterfs-api.pc.in
new file mode 100644
index 00000000000..be46bb3d9d9
--- /dev/null
+++ b/glusterfs-api.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+
+Name: glusterfs-api
+Description: GlusterFS API
+Version: @VERSION@
+Libs: -Wl,-R${libdir} -L${libdir} -lgfapi -lglusterfs -lgfrpc -lgfxdr
+Cflags: -I${includedir}/glusterfs -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64