+ printf("%d", GTK_CHECK_VERSION(2, 18, 0));
+}
+EOF
+GTK_CFLAGS=$(pkg-config --cflags gtk+-2.0 gthread-2.0)
+if test "$?" != "0" ; then
+ echo "configure: gtk and gthread not found"
+ exit 1
+fi
+GTK_LIBS=$(pkg-config --libs gtk+-2.0 gthread-2.0)
+if test "$?" != "0" ; then
+ echo "configure: gtk and gthread not found"
+ exit 1
+fi
+if compile_prog "$GTK_CFLAGS" "$GTK_LIBS" "gfio" ; then
+ r=$($TMPE)
+ if test "$r" != "0" ; then
+ gfio="yes"
+ LIBS="$LIBS $GTK_LIBS"
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ else
+ echo "GTK found, but need version 2.18 or higher"
+ gfio="no"
+ fi
+else
+ echo "Please install gtk and gdk libraries"
+ gfio="no"
+fi
+fi
+
+echo "gtk 2.18 or higher $gfio"
+
+# Check whether we have getrusage(RUSAGE_THREAD)
+rusage_thread="no"
+cat > $TMPC << EOF
+#include <sys/time.h>
+#include <sys/resource.h>
+int main(int argc, char **argv)
+{
+ struct rusage ru;
+ getrusage(RUSAGE_THREAD, &ru);
+ return 0;
+}
+EOF
+if compile_prog "" "" "RUSAGE_THREAD"; then
+ rusage_thread="yes"
+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"
+
+##########################################
+# Check whether we have RLIMIT_MEMLOCK
+rlimit_memlock="no"
+cat > $TMPC << EOF
+#include <sys/time.h>
+#include <sys/resource.h>
+int main(int argc, char **argv)
+{
+ struct rlimit rl;
+ return getrlimit(RLIMIT_MEMLOCK, &rl);
+}
+EOF
+if compile_prog "" "" "RLIMIT_MEMLOCK"; then
+ rlimit_memlock="yes"
+fi
+echo "RLIMIT_MEMLOCK $rlimit_memlock"
+
+##########################################
+# Check whether we have pwritev/preadv
+pwritev="no"
+cat > $TMPC << EOF
+#include <stdio.h>
+#include <sys/uio.h>
+int main(int argc, char **argv)
+{
+ return pwritev(0, NULL, 1, 0) + preadv(0, NULL, 1, 0);
+}
+EOF
+if compile_prog "" "" "pwritev"; then
+ pwritev="yes"
+fi
+echo "pwritev/preadv $pwritev"
+
+
+#############################################################################