Use fcntl(..., F_FULLSYNC) if available
[fio.git] / configure
index 0efde7d6a84acf6887e81ec89eae6f8110cbcb0c..fd1d435b4d432f16bde69916ffd6f2fac7253fa6 100755 (executable)
--- a/configure
+++ b/configure
@@ -645,6 +645,25 @@ if compile_prog "" "-lz" "zlib" ; then
 fi
 print_config "zlib" "$zlib"
 
+##########################################
+# fcntl(F_FULLFSYNC) support
+if test "$fcntl_sync" != "yes" ; then
+  fcntl_sync="no"
+fi
+cat > $TMPC << EOF
+#include <unistd.h>
+#include <fcntl.h>
+
+int main(int argc, char **argv)
+{
+  return fcntl(0, F_FULLSYNC);
+}
+EOF
+if compile_prog "" "" "fcntl(F_FULLSYNC)" ; then
+    fcntl_sync="yes"
+fi
+print_config "fcntl(F_FULLSYNC)" "$fcntl_sync"
+
 ##########################################
 # linux-aio probe
 if test "$libaio" != "yes" ; then
@@ -3174,6 +3193,9 @@ fi
 if test "$pdb" = yes; then
   output_sym "CONFIG_PDB"
 fi
+if test "$fcntl_sync" = "yes" ; then
+  output_sym "CONFIG_FCNTL_SYNC"
+fi
 
 print_config "Lib-based ioengines dynamic" "$dynamic_engines"
 cat > $TMPC << EOF