engines/net: add socket buffer window size setting
[fio.git] / configure
index e3ec25232706bc7dcb0f41df335626e1cb2d0475..3e3c9785e889cc9ae97dadac32cae1b9e718a886 100755 (executable)
--- a/configure
+++ b/configure
@@ -1074,6 +1074,25 @@ if compile_prog "" "" "TCP_NODELAY"; then
 fi
 echo "TCP_NODELAY                   $tcp_nodelay"
 
+##########################################
+# Check whether we have SO_SNDBUF
+window_size="no"
+cat > $TMPC << EOF
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/tcp.h>
+int main(int argc, char **argv)
+{
+  setsockopt(0, SOL_SOCKET, SO_SNDBUF, NULL, 0);
+  setsockopt(0, SOL_SOCKET, SO_RCVBUF, NULL, 0);
+}
+EOF
+if compile_prog "" "" "SO_SNDBUF"; then
+  window_size="yes"
+fi
+echo "Net engine window_size        $window_size"
+
 ##########################################
 # Check whether we have RLIMIT_MEMLOCK
 rlimit_memlock="no"
@@ -1429,6 +1448,9 @@ fi
 if test "$tcp_nodelay" = "yes" ; then
   output_sym "CONFIG_TCP_NODELAY"
 fi
+if test "$window_size" = "yes" ; then
+  output_sym "CONFIG_NET_WINDOWSIZE"
+fi
 if test "$rlimit_memlock" = "yes" ; then
   output_sym "CONFIG_RLIMIT_MEMLOCK"
 fi