unet_CHECK_TYPE_SIZES
dnl Checks for library functions.
-AC_CHECK_FUNC(kqueue)
+AC_CHECK_FUNCS([kqueue setrlimit getrusage times])
dnl Do we have restarting syscalls ?
AC_SYS_RESTARTABLE_SYSCALLS
AC_DEFINE([DEBUGMODE], , [Enable debugging code])
fi
-dnl And now for --enable-asserts
+dnl And now for --disable-asserts
AC_MSG_CHECKING([whether to enable asserts])
AC_ARG_ENABLE([asserts],
-[ --enable-asserts Enable asserts],
+[ --disable-asserts Disable assertion checking],
[unet_cv_enable_asserts=$enable_asserts],
[AC_CACHE_VAL(unet_cv_enable_asserts,
-[unet_cv_enable_asserts=no])])
+[unet_cv_enable_asserts=yes])])
AC_MSG_RESULT([$unet_cv_enable_asserts])
if test x"$unet_cv_enable_asserts" = xno; then
CFLAGS="-g $CFLAGS"
fi
+dnl Check for --disable-headinsand
+AC_MSG_CHECKING([whether to enable head in sand 'features'])
+AC_ARG_ENABLE([headinsand],
+[ --disable-headinsand Disable head in sand (-DNO_HEAD_IN_SAND)],
+[unet_cv_enable_headinsand=$enable_headinsand],
+[AC_CACHE_VAL(unet_cv_enable_headinsand,
+[unet_cv_enable_headinsand=yes])])
+AC_MSG_RESULT([$unet_cv_enable_headinsand])
+
+if test x"$unet_cv_enable_headinsand" = xno; then
+ CFLAGS="-DNO_HEAD_IN_SAND $CFLAGS"
+fi
+
dnl Now check for --enable-profile
AC_MSG_CHECKING([whether to enable profiling support (gprof)])
AC_ARG_ENABLE([profile],