Merge branch 'master' into gfio
[fio.git] / configure
index ff87acc58b54d2ed460a29658b41656ac0c5db8e..880d113d932125e115da565fe092fb1a2788595c 100755 (executable)
--- a/configure
+++ b/configure
@@ -208,6 +208,8 @@ CYGWIN*)
   output_sym "CONFIG_FDATASYNC"
   output_sym "CONFIG_GETTIMEOFDAY"
   output_sym "CONFIG_CLOCK_GETTIME"
   output_sym "CONFIG_FDATASYNC"
   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
   echo "CC=$CC" >> $config_host_mak
   echo "EXTFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
   exit 0
@@ -888,6 +890,40 @@ if compile_prog "" "" "RUSAGE_THREAD"; then
 fi
 echo "RUSAGE_THREAD                 $rusage_thread"
 
 fi
 echo "RUSAGE_THREAD                 $rusage_thread"
 
+##########################################
+# Check whether we have SCHED_IDLE
+sched_idle="no"
+cat > $TMPC << EOF
+#include <sched.h>
+int main(int argc, char **argv)
+{
+  struct sched_param p;
+  return sched_setscheduler(0, SCHED_IDLE, &p);
+}
+EOF
+if compile_prog "" "" "SCHED_IDLE"; then
+  sched_idle="yes"
+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
 #############################################################################
 
 echo "# Automatically generated by configure - do not modify" > $config_host_mak
@@ -994,6 +1030,12 @@ fi
 if test "$gfio" = "yes" ; then
   echo "CONFIG_GFIO=y" >> $config_host_mak
 fi
 if test "$gfio" = "yes" ; then
   echo "CONFIG_GFIO=y" >> $config_host_mak
 fi
+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 "CFLAGS+=$CFLAGS" >> $config_host_mak
 
 echo "LIBS+=$LIBS" >> $config_host_mak
 echo "CFLAGS+=$CFLAGS" >> $config_host_mak