diff options
author | Anand Avati <avati@redhat.com> | 2012-07-12 15:40:43 -0700 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-07-18 12:12:25 -0700 |
commit | b324e317311974fbbb9ba13548364213a7a7a41a (patch) | |
tree | a0e7241d7bf12a4304d7b3819859aa273b614fa8 /api/examples/configure.ac | |
parent | dbd7aa2d6b4128faa771d616c429b3a315740cec (diff) |
glfsxmp: libgfapi based example
This is an example application which uses libgfapi. It is
a complete autotools based build system which demonstrates the
required changes in configure.ac, Makefile.am etc to successfuly
detect for and build an application against libgfapi.
There are two approaches to building a libgfapi based application:
1. In the presence of pkg-config in your build system.
This is the recommended approach which is also used in this example.
For this approach to work, you need to build glusterfs by passing
--pkgconfigdir=/usr/lib64/pkgconfig (or the appropriate directory)
in your distro. This already happens if you build RPMs with the
glusterfs.spec provided in glusterfs.git. You will also need to
install glusterfs-api RPM.
2. In the absence of pkg-config in your build system.
Make sure your LDFLAGS includes -L/path/to/lib where libgfapi.so is
installed and -I/path/to/include/glusterfs where the 'api' directory
Change-Id: Ic4eab2df002d7e8d20593a03e643859423048848
BUG: 839950
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.com/3666
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'api/examples/configure.ac')
-rw-r--r-- | api/examples/configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/api/examples/configure.ac b/api/examples/configure.ac new file mode 100644 index 00000000000..b80177a4e87 --- /dev/null +++ b/api/examples/configure.ac @@ -0,0 +1,12 @@ + +AC_INIT([glfs-test],[0.1],[gluster-devel@nongu.org]) + +AM_INIT_AUTOMAKE + +AC_CONFIG_FILES([Makefile]) + +AC_PROG_CC + +PKG_CHECK_MODULES([GLFS], [glusterfs-api >= 3]) + +AC_OUTPUT |