#!/bin/sh
cat > conftest.c << EOF
#include <unistd.h>
#include <sys/time.h>
#include <sys/resource.h>
int main() {
struct rlimit rlp;
return !(getrlimit(RLIMIT_CORE, &rlp) == 0 &&
getrlimit(RLIMIT_AS , &rlp) == 0);
}
EOF
if conftest_define HAVE_GETRLIMIT "Checking for getrlimit..."; then
echo "#define MAX_MEMORY 1024*1024*1024" >> config.h
fi