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
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