aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2005-10-17 23:36:57 +1000
committerGravatar axel <axel@liljencrantz.se>2005-10-17 23:36:57 +1000
commitf87178420a7b26ba27f96b6723c84f710b11a8d3 (patch)
tree49a276f419284dc73fdbfb3362affd9c55e7f735 /configure.ac
parentd17f6b7ce4ec374546902064d52e058f0481e66f (diff)
Do not use RLIMIT_AS on systems that don't have it, like NetBSD
darcs-hash:20051017133657-ac50b-b27739229dfa6b3f08c2e9e7f4577cdceaf09beb.gz
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 0d6d05fb..23a3dc0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,7 +71,19 @@ AC_CHECK_FILE([/usr/pkg/lib],[AC_SUBST(LIBDIR,[-L/usr/pkg/lib\ -R/usr/pkg/lib])]
AC_CHECK_FILE([/usr/pkg/include],[AC_SUBST(INCLUDEDIR,[-I/usr/pkg/include])])
AC_CHECK_FUNCS( [wprintf futimes wcwidth wcswidth] )
-AC_CHECK_HEADERS([getopt.h termio.h])
+AC_CHECK_HEADERS([getopt.h termio.h sys/resource.h])
+
+# Check for RLIMIT_AS in sys/resource.h.
+AC_MSG_CHECKING([for RLIMIT_AS in sys/resource.h])
+AC_TRY_COMPILE([#include <sys/resource.h>],
+[int tmp; tmp=RLIMIT_AS;], have_rlimit_as=yes, have_rlimit_as=no)
+if test "$have_rlimit_as" = yes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_RLIMIT_AS], [1],
+ [Define to 1 if HAVE_RLIMIT_AS is defined in <sys/resource.h>.])
+else
+ AC_MSG_RESULT(no)
+fi
AC_CHECK_LIB(socket, connect)
AC_CHECK_LIB(rt, nanosleep)