summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorRene Engelhard <rene@openoffice.org>2010-06-22 18:51:14 +0200
committerRene Engelhard <rene@openoffice.org>2010-06-22 18:51:14 +0200
commit02689c759baefc21fa2709126142aa22c2dc4202 (patch)
tree02f6a6be94f3f6770f34a99e32fbaea0039b60ee /configure.in
parent4d6cdad9e43b9c431dca7d7ee04ffa2f372fe412 (diff)
configure25: jemalloc is default on Net/FreeBSD
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 192619918c7d..dd07942b2eae 100644
--- a/configure.in
+++ b/configure.in
@@ -808,6 +808,8 @@ AC_ARG_WITH(build-version,
AC_ARG_WITH(alloc,
[ --with-alloc Define which allocator to build with
(choices are oo, system, tcmalloc, jemalloc)
+
+ Note that on FreeBSD/NetBSD system==jemalloc
],,)
AC_ARG_ENABLE(verbose,
[ --enable-verbose Increase build verbosity.
@@ -2678,12 +2680,19 @@ if test "$with_alloc" = "tcmalloc"; then
ALLOC="TCMALLOC";
fi
if test "$with_alloc" = "jemalloc"; then
+ if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then
+ AC_MSG_RESULT(jemalloc)
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -pthread"
AC_CHECK_LIB(jemalloc, malloc, [],
[AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], [])
ALLOC="JEMALLOC";
CFLAGS=$save_CFLAGS
+ else
+ AC_MSG_RESULT([system])
+ ALLOC="SYS_ALLOC";
+ AC_CHECK_FUNCS([malloc realloc calloc free])
+ fi
fi
if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
AC_MSG_RESULT([internal])