]>
Commit | Line | Data |
---|---|---|
ae2e84e3 AD |
1 | --- a/configure |
2 | +++ b/configure | |
3 | @@ -336,6 +336,7 @@ libssh2="" | |
4 | vhdx="" | |
5 | quorum="" | |
6 | numa="" | |
7 | +jemalloc="no" | |
8 | ||
9 | # parse CC options first | |
10 | for opt do | |
11 | @@ -1134,6 +1135,10 @@ for opt do | |
12 | ;; | |
13 | --enable-numa) numa="yes" | |
14 | ;; | |
15 | + --disable-jemalloc) jemalloc="no" | |
16 | + ;; | |
17 | + --enable-jemalloc) jemalloc="yes" | |
18 | + ;; | |
19 | *) | |
20 | echo "ERROR: unknown option $opt" | |
21 | echo "Try '$0 --help' for more information" | |
22 | @@ -1407,6 +1412,8 @@ Advanced options (experts only): | |
23 | --enable-quorum enable quorum block filter support | |
24 | --disable-numa disable libnuma support | |
25 | --enable-numa enable libnuma support | |
26 | + --disable-jemalloc disable jemalloc support | |
27 | + --enable-numa enable jemalloc support | |
28 | ||
29 | NOTE: The object files are built at the place where configure is launched | |
30 | EOF | |
31 | @@ -3325,6 +3332,22 @@ EOF | |
32 | fi | |
33 | ||
34 | ########################################## | |
35 | +# jemalloc probe | |
36 | + | |
37 | +if test "$jemalloc" = "yes" ; then | |
38 | + cat > $TMPC << EOF | |
39 | +#include <stdlib.h> | |
40 | +int main(void) { malloc(1); return 0; } | |
41 | +EOF | |
42 | + | |
43 | + if compile_prog "" "-ljemalloc" ; then | |
44 | + LIBS="-ljemalloc $LIBS" | |
45 | + else | |
46 | + feature_not_found "jemalloc" "install jemalloc devel" | |
47 | + fi | |
48 | +fi | |
49 | + | |
50 | +########################################## | |
51 | # signalfd probe | |
52 | signalfd="no" | |
53 | cat > $TMPC << EOF | |
54 | @@ -4435,6 +4458,7 @@ echo "lzo support $lzo" | |
55 | echo "snappy support $snappy" | |
56 | echo "bzip2 support $bzip2" | |
57 | echo "NUMA host support $numa" | |
58 | +echo "jemalloc support $jemalloc" | |
59 | ||
60 | if test "$sdl_too_old" = "yes"; then | |
61 | echo "-> Your SDL version is too old - please upgrade to have SDL support" |