$NetBSD: patch-ad,v 1.1 2008/07/27 04:06:00 schmonz Exp $

--- configure.ac.orig	2008-07-16 00:42:17.000000000 -0400
+++ configure.ac
@@ -108,6 +108,18 @@ dnl omindex uses fork(), socketpair(), a
 dnl limits on filter programs.
 AC_CHECK_FUNCS([mmap fork setrlimit socketpair sysmp pstat_getdynamic])
 
+dnl * Do we have RLIMIT_AS?
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+  #include <sys/types.h>
+  #include <sys/time.h>
+  #include <sys/resource.h>
+]], [[
+  struct rlimit r;
+  getrlimit(RLIMIT_AS, &r);
+]])],[
+  AC_DEFINE(HAVE_RLIMIT_AS,, Define if you have RLIMIT_AS for setrlimit())
+],[])
+
 dnl Check that snprintf actually works as it's meant to.
 dnl
 dnl Linux 'man snprintf' warns:
