aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2008-10-16 19:41:45 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2008-10-16 19:41:45 +0400
commit802890f0f2619ff93f543d1fcf55831cb647b174 (patch)
tree7442f1afe9ba2752425d8af5dc1f7b4f628d51d2 /configure
parentcd9b528a22e190c11d47c452b6d83fd1fbd4550c (diff)
downloadrspamd-802890f0f2619ff93f543d1fcf55831cb647b174.tar.gz
rspamd-802890f0f2619ff93f543d1fcf55831cb647b174.zip
* Add support of shared memory chunks to memory pool allocator. Also add locking support (spin mutexes)
* Add simple test case for shared memory allocation
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure29
1 files changed, 29 insertions, 0 deletions
diff --git a/configure b/configure
index d7fa8cf79..a34153948 100755
--- a/configure
+++ b/configure
@@ -756,6 +756,17 @@ if [ $? -eq 0 ] ; then
have_opt "SRANDOMDEV"
fi
+check_function "sched_yield" "sched.h"
+if [ $? -eq 0 ] ; then
+ have_opt "SCHED_YIELD"
+fi
+
+check_function "nanosleep" "time.h"
+if [ $? -eq 0 ] ; then
+ have_opt "NANOSLEEP"
+fi
+
+
check_function "getpagesize" "unistd.h"
if [ $? -eq 0 ] ; then
have_opt "GETPAGESIZE"
@@ -802,6 +813,24 @@ else
have_opt "PATH_MAX"
fi
+check_macro "MAP_SHARED" "sys/mman.h"
+if [ $? -eq 1 ] ; then
+ echo "Shared memory extension to mmap not found, this platform is not supported"
+ exit 1
+fi
+
+check_macro "MAP_ANON" "sys/mman.h"
+if [ $? -eq 0 ] ; then
+ have_opt "MMAP_ANON"
+else
+ if [ -f "/dev/zero" ] ; then
+ have_opt "MMAP_ZERO"
+ else
+ echo "Anon memory extension to mmap not found and /dev/zero not exists, this platform is not supported"
+ exit 1
+ fi
+fi
+
check_package "glib-2.0" "glib.h"
check_package "gmime-2.0" "gmime/gmime.h"
if [ $? -eq 1 ] ; then