diff options
author | Bharata B Rao <bharata@linux.vnet.ibm.com> | 2013-07-16 21:47:41 +0530 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-07-19 12:29:21 +0800 |
commit | e01bee0881e0f0c8a79555f6729d7238841a5b04 (patch) | |
tree | 810fea97360bbe24fdabaae8671aeba8e5e4183f | |
parent | 24943978cbe79634a9a8b02a20efb25b29b3ab49 (diff) |
gluster: Use pkg-config to configure GlusterFS block driver
Use pkg-config to determine the version and library dependency
for GlusterFS block driver.
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rwxr-xr-x | configure | 17 |
1 files changed, 6 insertions, 11 deletions
@@ -2570,23 +2570,18 @@ 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 + if $pkg_config --atleast-version=3 glusterfs-api >/dev/null 2>&1; then + glusterfs="yes" + glusterfs_cflags=`$pkg_config --cflags glusterfs-api 2>/dev/null` + glusterfs_libs=`$pkg_config --libs glusterfs-api 2>/dev/null` + CFLAGS="$CFLAGS $glusterfs_cflags" libs_tools="$glusterfs_libs $libs_tools" libs_softmmu="$glusterfs_libs $libs_softmmu" else if test "$glusterfs" = "yes" ; then feature_not_found "GlusterFS backend support" fi - glusterfs=no + glusterfs="no" fi fi |