From dbd7aa2d6b4128faa771d616c429b3a315740cec Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Thu, 12 Jul 2012 15:51:41 -0700 Subject: glusterfs-api.pc: pkgconfig for API consumers Change-Id: I08c60ff9ec5d336077c39f903720f8850d4ddc72 BUG: 839950 Signed-off-by: Anand Avati Reviewed-on: http://review.gluster.com/3665 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Kaleb KEITHLEY --- Makefile.am | 10 ++++++++-- configure.ac | 7 +++++++ glusterfs-api.pc.in | 11 +++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 glusterfs-api.pc.in diff --git a/Makefile.am b/Makefile.am index 3cdd4dfb3..836f17efc 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 0b07c6c1f..cef8634c0 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 000000000..be46bb3d9 --- /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 -- cgit