solaris: ensure that TCP_NODELAY gets picked up
[fio.git] / configure
index caaf30e05608adfe1e48a2b872ed816ac36a175c..8f8674980df1318ba59b76c9bffebd486dc9df11 100755 (executable)
--- a/configure
+++ b/configure
@@ -349,7 +349,7 @@ int main(void)
 }
 EOF
 if compile_prog "" "" "wordsize"; then
-  wordsize=$($TMPE)
+  wordsize=`$TMPE`
 fi
 echo "Wordsize                      $wordsize"
 
@@ -906,9 +906,29 @@ int main(int argc, char **argv)
 EOF
 if compile_prog "" "" "TCP_NODELAY"; then
   tcp_nodelay="yes"
+elif compile_prog "" "-lnsl -lsocket" "TCP_NODELAY"; then
+  tcp_nodelay="yes"
+  LIBS="-lnsl -lsocket $LIBS" 
 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"
+
 #############################################################################
 
 echo "# Automatically generated by configure - do not modify" > $config_host_mak
@@ -1017,6 +1037,9 @@ fi
 if test "$tcp_nodelay" = "yes" ; then
   output_sym "CONFIG_TCP_NODELAY"
 fi
+if test "$rlimit_memlock" = "yes" ; then
+  output_sym "CONFIG_RLIMIT_MEMLOCK"
+fi
 
 echo "LIBS+=$LIBS" >> $config_host_mak
 echo "CC=$cc" >> $config_host_mak