aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2014-12-18 14:43:07 +0200
committerPetri Lehtinen <petri@digip.org>2014-12-18 14:43:44 +0200
commitabaae7630ec9df0adca1ec012ddbcc4b211e54f1 (patch)
tree2138659d2a3630690138aafc94d66ba3d70b4ae8 /configure.ac
parent5c1d87592ad3ad2b1742c356d35a5123342f1693 (diff)
downloadjansson-abaae7630ec9df0adca1ec012ddbcc4b211e54f1.zip
jansson-abaae7630ec9df0adca1ec012ddbcc4b211e54f1.tar.gz
jansson-abaae7630ec9df0adca1ec012ddbcc4b211e54f1.tar.bz2
Make it possible to set initial hashtable size
Fixes #213.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 433b499..8c9adcd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,6 +92,13 @@ AC_DEFINE([USE_WINDOWS_CRYPTOAPI], [1],
[Define to 1 if CryptGenRandom should be used for seeding the hash function])
fi
+AC_ARG_ENABLE([initial-hashtable-order],
+ [AS_HELP_STRING([--enable-initial-hashtable-order=VAL],
+ [Number of buckets new object hashtables contain is 2 raised to this power. The default is 3, so empty hashtables contain 2^3 = 8 buckets.])],
+ [initial_hashtable_order=$enableval], [initial_hashtable_order=3])
+AC_DEFINE_UNQUOTED([INITIAL_HASHTABLE_ORDER], [$initial_hashtable_order],
+ [Number of buckets new object hashtables contain is 2 raised to this power. E.g. 3 -> 2^3 = 8.])
+
if test x$GCC = xyes; then
AM_CFLAGS="-Wall -Wextra -Wdeclaration-after-statement"
fi