On Fri, Jul 12, 2013 at 12:28:54PM +0530, Bharata B Rao wrote:
gluster: Use pkg-config to configure GlusterFS block driver
The commit message is duplicated in the commit description.
Use pkg-config to determine the version and library dependency
for GlusterFS block driver.
Signed-off-by: Bharata B Rao <address@hidden>
---
configure | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/configure b/configure
index cb0f870..76adcb1 100755
--- a/configure
+++ b/configure
@@ -2566,23 +2566,17 @@ fi
##########################################
# glusterfs probe
if test "$glusterfs" != "no" ; then
- cat > $TMPC <<EOF
-#include <glusterfs/api/glfs.h>
-int main(void) {
- (void) glfs_new("volume");
- return 0;
-}
-EOF
- glusterfs_libs="-lgfapi -lgfrpc -lgfxdr"
- if compile_prog "" "$glusterfs_libs" ; then
- glusterfs=yes
- libs_tools="$glusterfs_libs $libs_tools"
- libs_softmmu="$glusterfs_libs $libs_softmmu"
+ if $pkg_config --atleast-version=3 glusterfs-api >/dev/null 2>&1; then
gfapi was added in Gluster 3.4. Is --atleast-version=3 sufficient?