summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-07 18:15:50 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-07 18:15:50 +0100
commit723019f727ce53b392389bdadcc1701ae47e6a14 (patch)
tree148912aacb539269a89b0d473abb9a85466628e0 /configure.ac
parent8f79a36a592c796c19037a2513c6fc7098698dee (diff)
Optionally use a pool allocator for rb-tree nodes
This commit restructures the rbtree code to optionally use a pool allocator for the nodes. The option is made depenend on the presence of a pre-processor flag. To the configure script is added an option to enable/disable the use of custom allocators. It makes sense to still allow the malloc/free based routes for better ASAN based instrumentation. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 32ae8ba..95750a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,6 +107,11 @@ AC_ARG_WITH([tools],
[Only build libsquashfs, do not build the tools.])],
[], [with_tools="yes"])
+AC_ARG_ENABLE([custom-alloc],
+ [AS_HELP_STRING([--disable-custom-alloc],
+ [Do not used any custom allocators.])],
+ [], [enable_custom_alloc="yes"])
+
AC_ARG_ENABLE([corpora-tests],
[AS_HELP_STRING([--enable-corpora-tests],
[Perform corpora based reproducability tests.])],
@@ -268,6 +273,8 @@ AC_CHECK_FUNCS([strndup getsubopt])
##### generate output #####
+AM_CONDITIONAL([CUSTOM_ALLOC], [test "x$enable_custom_alloc" = "xyes"])
+
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([lib/sqfs/libsquashfs1.pc])
AC_CONFIG_FILES([Doxyfile])
@@ -303,6 +310,8 @@ AC_MSG_RESULT([
SELinux support: ${with_selinux}
Using pthreads: ${with_pthread}
+ Custom allocators: ${enable_custom_alloc}
+
Building tools: ${with_tools}
Doxygen found: ${with_doxygen}