configure: add TCP_NODELAY check
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/configure b/configure
index 995b5df..d332c5e 100755
--- a/configure
+++ b/configure
@@ -201,6 +201,7 @@
output_sym "CONFIG_GETTIMEOFDAY"
output_sym "CONFIG_CLOCK_GETTIME"
output_sym "CONFIG_SCHED_IDLE"
+ output_sym "CONFIG_TCP_NODELAY"
echo "CC=$CC" >> $config_host_mak
echo "EXTFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
exit 0
@@ -861,6 +862,24 @@
fi
echo "SCHED_IDLE $sched_idle"
+##########################################
+# Check whether we have TCP_NODELAY
+tcp_nodelay="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)
+{
+ return getsockopt(0, 0, TCP_NODELAY, NULL, NULL);
+}
+EOF
+if compile_prog "" "" "TCP_NODELAY"; then
+ tcp_nodelay="yes"
+fi
+echo "TCP_NODELAY $tcp_nodelay"
+
#############################################################################
echo "# Automatically generated by configure - do not modify" > $config_host_mak
@@ -967,6 +986,9 @@
if test "$sched_idle" = "yes" ; then
output_sym "CONFIG_SCHED_IDLE"
fi
+if test "$tcp_nodelay" = "yes" ; then
+ output_sym "CONFIG_TCP_NODELAY"
+fi
echo "LIBS+=$LIBS" >> $config_host_mak
echo "CC=$cc" >> $config_host_mak