$NetBSD: patch-ad,v 1.2 2009/04/20 22:25:38 schmonz Exp $

--- configure.ac.orig	2009-04-19 08:28:01.000000000 -0400
+++ configure.ac
@@ -110,6 +110,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:
