glusterfs api fadvise support
[fio.git] / configure
index 3a4a37a5148165e055e854d6e9d57b5fb4ece461..063ccab429b4002b308227415d7663455666734c 100755 (executable)
--- a/configure
+++ b/configure
@@ -1181,8 +1181,27 @@ if compile_prog "" "-lgfapi -lglusterfs" "gfapi"; then
   LIBS="-lgfapi -lglusterfs $LIBS"
   gfapi="yes"
 fi
-echo "Gluster API engine            $gfapi"
+ echo "Gluster API engine            $gfapi"
 
+##########################################
+# check for gfapi fadvise support
+gf_fadvise="no"
+cat > $TMPC << EOF
+#include <glusterfs/api/glfs.h>
+
+int main(int argc, char **argv)
+{
+  struct glfs_fd *fd;
+  int ret = glfs_fadvise(fd, 0, 0, 1);
+
+  return 0;
+}
+EOF
+
+if compile_prog "" "-lgfapi -lglusterfs" "gfapi"; then
+  gf_fadvise="yes"
+fi
+echo "Gluster API use fadvise       $gf_fadvise"
 
 #############################################################################
 
@@ -1314,6 +1333,9 @@ fi
 if test "$gfapi" = "yes" ; then
   output_sym "CONFIG_GFAPI"
 fi
+if test "$gf_fadvise" = "yes" ; then
+  output_sym "CONFIG_GF_FADVISE"
+fi
 
 echo "LIBS+=$LIBS" >> $config_host_mak
 echo "CFLAGS+=$CFLAGS" >> $config_host_mak