X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=880d113d932125e115da565fe092fb1a2788595c;hp=ff87acc58b54d2ed460a29658b41656ac0c5db8e;hb=95820b6e6c92025df8d89c0bf39b174e53137c41;hpb=135be493d843d4cae2966a35cbd22a3058ec8e4b diff --git a/configure b/configure index ff87acc5..880d113d 100755 --- 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_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 @@ -888,6 +890,40 @@ if compile_prog "" "" "RUSAGE_THREAD"; then fi echo "RUSAGE_THREAD $rusage_thread" +########################################## +# Check whether we have SCHED_IDLE +sched_idle="no" +cat > $TMPC << EOF +#include +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 +#include +#include +#include +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 @@ -994,6 +1030,12 @@ 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